Procházet zdrojové kódy

优化取样记录状态处理并调整代理配置

yusheng před 6 měsíci
rodič
revize
140c8984c9

+ 4 - 2
src/views/inspectionWork/components/inspectionProjectReport.vue

@@ -732,8 +732,10 @@
           );
 
           this.tableData = JSON.parse(JSON.stringify(list));
-          this.form.remainingSampleCount =
-            this.form.sampleQuantity + this.form.remainingSampleCount;
+          if (this.form.qualityWorkOrderId) {
+            this.form.remainingSampleCount =
+              this.form.sampleQuantity + this.form.remainingSampleCount;
+          }
         }
 
         this.visible = true;

+ 8 - 5
src/views/sample/sampleRecord/components/addSample.vue

@@ -664,7 +664,10 @@
         let data = await samplingRecordsPage({
           qualityWorkOrderId: row.id
         });
-        let list = data.list.filter((item) => item.status === 0);
+        let list = data.list.filter(
+          (item) => item.status === 0 || item.status === 4
+        );
+        let list1 = data.list.filter((item) => item.status != 3);
         if (list?.length) {
           this.getById(list[0].id);
           this.type = 'edit';
@@ -677,14 +680,14 @@
           this.form.qualityWorkOrderName = row.name;
           this.workSampleQuantity = Number(row.sampleQuantity) || 0;
 
-          if (!data?.list.length) {
+          if (!list1?.length) {
             this.form.isFirstSampling = 1;
           } else {
-            this.$set(this.form, 'unit', data?.list[0].unit);
+            this.$set(this.form, 'unit', list1[0].unit);
           }
-          await this.datasource(data?.list[0]?.unit);
+          await this.datasource(list1[0]?.unit);
           await this.queryQualityTempleContent(
-            !data?.list.length && row.qualityMode == 1
+            !list1.length && row.qualityMode == 1
           );
         }
       },

+ 7 - 3
src/views/sample/sampleRecord/index.vue

@@ -40,7 +40,7 @@
             @click="addSampleOpen('edit', row)"
             v-if="
               [0, 3].includes(row.approvalStatus) &&
-              $hasPermission('qms:samplingrecord:update')
+              $hasPermission('qms:samplingrecord:update')&&row.status!='3'
             "
           >
             编辑
@@ -50,7 +50,7 @@
             :underline="false"
             v-if="
               [0, 3].includes(row.approvalStatus) &&
-              $hasPermission('qms:samplingrecord:update')
+              $hasPermission('qms:samplingrecord:update')&&row.status!='3'
             "
             @click="approvalSubmit(row)"
             >提交</el-link
@@ -58,7 +58,7 @@
           <el-popconfirm
             class="ele-action"
             title="确定要删除此信息吗?"
-            v-if="[0, 3].includes(row.approvalStatus)"
+            v-if="[0, 3].includes(row.approvalStatus)&&row.status!='3'"
             @confirm="listCancel(row.id)"
           >
             <template v-slot:reference>
@@ -276,6 +276,10 @@
                 ? '审核中'
                 : _row.status == 2
                 ? '已取样'
+                : _row.status == 3
+                ? '已作废'
+                : _row.status == 4
+                ? '不通过'
                 : '未提交';
             }
           },

+ 1 - 1
vue.config.js

@@ -38,7 +38,7 @@ module.exports = {
         // target: 'http://192.168.1.30:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://124.71.68.31:50001',
-        target: 'http://192.168.1.3:18086',
+        target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.3:18086', // 付丽
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {