|
|
@@ -98,8 +98,8 @@
|
|
|
:businessId="row.id"
|
|
|
businessCode="qmsqualityinspectionprint"
|
|
|
></jimureportBrowse>
|
|
|
-
|
|
|
- <el-link v-if="row.status == 1 && isReportApproval == 1 && row.reportApprovalStatus == 0" type="primary" :underline="false" @click="reportApprovalSubmit(row)"
|
|
|
+ <!-- 质检报告审批 -->
|
|
|
+ <el-link v-if="row.status == 1 && isReportApproval == 1 && !row.reportApprovalStatus" type="primary" :underline="false" @click="reportApprovalSubmit(row)"
|
|
|
>质检报告审批</el-link
|
|
|
>
|
|
|
|
|
|
@@ -181,6 +181,7 @@ import { getFile } from '@/api/system/file';
|
|
|
import { getByCode } from '@/api/system/dictionary-data';
|
|
|
import { parameterGetByCode } from '@/api/main/index';
|
|
|
import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
+import { getCategoryByCode } from '@/api/main/index';
|
|
|
|
|
|
export default {
|
|
|
mixins: [dictMixins,tabMixins],
|
|
|
@@ -409,9 +410,9 @@ export default {
|
|
|
this.requestDict('质检计划类型');
|
|
|
this.requestDict('不良品处理类型');
|
|
|
this.requestDict('取样类型');
|
|
|
+ this.getCode()
|
|
|
this.getTnspectionPlanType();
|
|
|
this.getQualityMethodCode();
|
|
|
- this.getCode()
|
|
|
},
|
|
|
computed: {
|
|
|
seekList() {
|
|
|
@@ -474,13 +475,16 @@ export default {
|
|
|
planList: this.statusList
|
|
|
}
|
|
|
];
|
|
|
+ },
|
|
|
+ clientEnvironmentId() {
|
|
|
+ return this.$store.state.user.info.clientEnvironmentId;
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
reportApprovalSubmit(res) {
|
|
|
console.log(res, 'res');
|
|
|
this.processSubmitDialogFlag = true;
|
|
|
- this.$nextTick(() => {
|
|
|
+ this.$nextTick(async () => {
|
|
|
let params = {
|
|
|
businessId: res.id,
|
|
|
businessKey: 'qms_report_approval',
|
|
|
@@ -491,7 +495,20 @@ export default {
|
|
|
businessType: '质检报告单'
|
|
|
}
|
|
|
};
|
|
|
+ console.log(this.clientEnvironmentId, 'parathis.clientEnvironmentIdms');
|
|
|
+ if (this.clientEnvironmentId == 5) {
|
|
|
+ // 嘉实环境
|
|
|
+ const data = await getCategoryByCode(res.productCode);
|
|
|
|
|
|
+ // 判断品类
|
|
|
+ if (data && data.categoryLevelCodePath?.includes('W3-209')) {
|
|
|
+ // 药品
|
|
|
+ params.businessKey = 'qms_report_approval1';
|
|
|
+ } else {
|
|
|
+ // 器械
|
|
|
+ params.businessKey = 'qms_report_approval';
|
|
|
+ }
|
|
|
+ }
|
|
|
this.$refs.processSubmitDialogRef.init(params);
|
|
|
});
|
|
|
},
|
|
|
@@ -500,7 +517,10 @@ export default {
|
|
|
parameterGetByCode({
|
|
|
code: 'qms_report_approval'
|
|
|
}).then((res) => {
|
|
|
+ console.log(res, 'qms_report_approval');
|
|
|
+ console
|
|
|
this.isReportApproval = res.value;
|
|
|
+ console.log('isReportApproval', this.isReportApproval)
|
|
|
});
|
|
|
},
|
|
|
datasource({ page, where, limit }) {
|