|
@@ -66,6 +66,12 @@
|
|
|
ref="listCoomModalRef"
|
|
ref="listCoomModalRef"
|
|
|
@success="successModal"
|
|
@success="successModal"
|
|
|
></listCoomModal>
|
|
></listCoomModal>
|
|
|
|
|
+ <processSubmitDialog
|
|
|
|
|
+ :processSubmitDialogFlag.sync="processSubmitDialogFlag"
|
|
|
|
|
+ v-if="processSubmitDialogFlag"
|
|
|
|
|
+ ref="processSubmitDialogRef"
|
|
|
|
|
+ @reload="reload"
|
|
|
|
|
+ ></processSubmitDialog>
|
|
|
</ele-modal>
|
|
</ele-modal>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -74,9 +80,10 @@
|
|
|
import certificate_conformity_jangnan_template from './certificate_conformity_jangnan_template.vue';
|
|
import certificate_conformity_jangnan_template from './certificate_conformity_jangnan_template.vue';
|
|
|
import certificate_conformity_general_template from './certificate_conformity_general_template.vue';
|
|
import certificate_conformity_general_template from './certificate_conformity_general_template.vue';
|
|
|
import listCoomModal from './listCoomModal.vue';
|
|
import listCoomModal from './listCoomModal.vue';
|
|
|
- import { save, update } from '@/api/certificateManagement';
|
|
|
|
|
|
|
+ import { save, update, getById } from '@/api/certificateManagement';
|
|
|
import bpmDetail from '@/views/bpm/processInstance/detail.vue';
|
|
import bpmDetail from '@/views/bpm/processInstance/detail.vue';
|
|
|
import { getCode } from '@/api/login';
|
|
import { getCode } from '@/api/login';
|
|
|
|
|
+ import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'print',
|
|
name: 'print',
|
|
@@ -87,10 +94,12 @@
|
|
|
certificate_conformity_jangnan_template,
|
|
certificate_conformity_jangnan_template,
|
|
|
listCoomModal,
|
|
listCoomModal,
|
|
|
certificate_conformity_general_template,
|
|
certificate_conformity_general_template,
|
|
|
- bpmDetail
|
|
|
|
|
|
|
+ bpmDetail,
|
|
|
|
|
+ processSubmitDialog
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ processSubmitDialogFlag: false,
|
|
|
QRvisible: false,
|
|
QRvisible: false,
|
|
|
form: {
|
|
form: {
|
|
|
reportTemplateCode: '',
|
|
reportTemplateCode: '',
|
|
@@ -131,8 +140,8 @@
|
|
|
add() {
|
|
add() {
|
|
|
this.$refs.listCoomModalRef.open();
|
|
this.$refs.listCoomModalRef.open();
|
|
|
},
|
|
},
|
|
|
- save() {
|
|
|
|
|
- let data = this.$refs.template1Ref.getValue()
|
|
|
|
|
|
|
+ save(type) {
|
|
|
|
|
+ let data = this.$refs.template1Ref.getValue();
|
|
|
let api = data.id ? update : save;
|
|
let api = data.id ? update : save;
|
|
|
if (!data.productCode) {
|
|
if (!data.productCode) {
|
|
|
this.$message.warning('请选择合格证');
|
|
this.$message.warning('请选择合格证');
|
|
@@ -148,29 +157,53 @@
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
|
|
|
|
|
api(data)
|
|
api(data)
|
|
|
- .then((msg) => {
|
|
|
|
|
|
|
+ .then((res) => {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
this.$message.success('操作成功');
|
|
this.$message.success('操作成功');
|
|
|
- this.$emit('reload');
|
|
|
|
|
- this.close();
|
|
|
|
|
|
|
+ if (type == 'sub') {
|
|
|
|
|
+ this.approvalSubmit(data.id || res);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.reload();
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
.catch((e) => {
|
|
.catch((e) => {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ reload() {
|
|
|
|
|
+ this.close();
|
|
|
|
|
+ this.$emit('reload');
|
|
|
|
|
+ },
|
|
|
close() {
|
|
close() {
|
|
|
this.QRvisible = false;
|
|
this.QRvisible = false;
|
|
|
this.form = {
|
|
this.form = {
|
|
|
reportTemplateCode: '',
|
|
reportTemplateCode: '',
|
|
|
reportTemplateId: '',
|
|
reportTemplateId: '',
|
|
|
reportTemplateName: '',
|
|
reportTemplateName: '',
|
|
|
- code:""
|
|
|
|
|
|
|
+ code: ''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
successModal(data) {
|
|
successModal(data) {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.template1Ref.init({...this.form,...data});
|
|
|
|
|
|
|
+ this.$refs.template1Ref.init({ ...this.form, ...data });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ async approvalSubmit(id) {
|
|
|
|
|
+ const res = await getById(id);
|
|
|
|
|
+ this.processSubmitDialogFlag = true;
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ businessId: res.id,
|
|
|
|
|
+ businessKey: 'qms_certificate',
|
|
|
|
|
+ formCreateUserId: res.createUserId,
|
|
|
|
|
+ variables: {
|
|
|
|
|
+ businessCode: res.code,
|
|
|
|
|
+ businessName: res.productName,
|
|
|
|
|
+ businessType: '合格证'
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+ this.$refs.processSubmitDialogRef.init(params);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
print() {
|
|
print() {
|