ソースを参照

责任人验证

yusheng 6 ヶ月 前
コミット
fdd396bd57

+ 8 - 0
src/api/inspectionProjectTask/index.js

@@ -67,3 +67,11 @@ export async function getById(id) {
   }
   }
   return Promise.reject(new Error(res.data.message));
   return Promise.reject(new Error(res.data.message));
 }
 }
+
+// 检查是否责任人
+export async function verificationQualityInspector(id) {
+  const res = await request.post(
+    `/qms/taskmonad/verificationQualityInspector/${id}`
+  );
+  return res.data.code;
+}

+ 13 - 4
src/views/inspectionProjectTask/index.vue

@@ -67,7 +67,8 @@
   import {
   import {
     getList,
     getList,
     sampleCollection,
     sampleCollection,
-    getById
+    getById,
+    verificationQualityInspector
   } from '@/api/inspectionProjectTask';
   } from '@/api/inspectionProjectTask';
   import dictMixins from '@/mixins/dictMixins';
   import dictMixins from '@/mixins/dictMixins';
   export default {
   export default {
@@ -284,17 +285,25 @@
         this.$refs.table.reload({ page: 1, where: where });
         this.$refs.table.reload({ page: 1, where: where });
       },
       },
 
 
-      sampleCollection(row) {
+      async sampleCollection(row) {
+        const code = await verificationQualityInspector(row.id);
+        if (code == '-1') {
+          return;
+        }
         sampleCollection({ id: row.id }).then((res) => {
         sampleCollection({ id: row.id }).then((res) => {
           this.$message.success('收样成功');
           this.$message.success('收样成功');
-
           this.reload();
           this.reload();
         });
         });
       },
       },
       /* 报工 */
       /* 报工 */
       async report(row, type) {
       async report(row, type) {
+        if (type != 'detail') {
+          const code = await verificationQualityInspector(row.id);
+          if (code == '-1') {
+            return;
+          }
+        }
         const res = await getById(row.id);
         const res = await getById(row.id);
-
         this.$refs.inspectionProjectReportRef.open(
         this.$refs.inspectionProjectReportRef.open(
           { workData: res.data, list: res.data.templateList },
           { workData: res.data, list: res.data.templateList },
           type,
           type,

+ 1 - 0
src/views/inspectionWork/edit.vue

@@ -1549,6 +1549,7 @@
         this.$refs.baseInfoRefs.$refs.form1.validate((valid) => {
         this.$refs.baseInfoRefs.$refs.form1.validate((valid) => {
           if (!valid) return false;
           if (!valid) return false;
           //单样全部
           //单样全部
+          console.log(this.form.recordingMethod,'this.form.recordingMethod')
           if (this.form.recordingMethod == 2) {
           if (this.form.recordingMethod == 2) {
             if (this.qualityType == 2 && this.isReportProcessProduce) {
             if (this.qualityType == 2 && this.isReportProcessProduce) {
               for (let i = 0; i < this.sampleList.length; i++) {
               for (let i = 0; i < this.sampleList.length; i++) {

+ 3 - 2
src/views/sample/sampleRecord/components/addSample.vue

@@ -257,7 +257,7 @@
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :span="10" v-if="form.conditionType == 1">
             <el-col :span="10" v-if="form.conditionType == 1">
-              <el-form-item prop="unit" label="单位">
+              <el-form-item prop="packingUnit" label="单位">
                 <el-select
                 <el-select
                   v-model="form.packingUnit"
                   v-model="form.packingUnit"
                   placeholder="请选择"
                   placeholder="请选择"
@@ -400,7 +400,8 @@
           ],
           ],
           quantity: [{ required: true, message: '请输入', trigger: 'change' }],
           quantity: [{ required: true, message: '请输入', trigger: 'change' }],
           portion: [{ required: true, message: '请输入', trigger: 'change' }],
           portion: [{ required: true, message: '请输入', trigger: 'change' }],
-          unit: [{ required: true, message: '请选择', trigger: 'change' }]
+          unit: [{ required: true, message: '请选择', trigger: 'change' }],
+          packingUnit: [{ required: true, message: '请选择', trigger: 'change' }],
         },
         },
         sampleQuantityList: [
         sampleQuantityList: [
           { label: '批样', value: 1 },
           { label: '批样', value: 1 },

+ 5 - 7
src/views/unqualifiedProduct/unqualifiedList/components/create.vue

@@ -103,11 +103,11 @@
         <!--        <el-table-column label="规格" align="center" prop="specification">-->
         <!--        <el-table-column label="规格" align="center" prop="specification">-->
         <!--        </el-table-column>-->
         <!--        </el-table-column>-->
 
 
-        <el-table-column label="数量" align="center" prop="unqualifiedQuantity">
+        <el-table-column label="数量" align="center" prop="measureQuantity">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <el-form-item
             <el-form-item
               label-width="0px"
               label-width="0px"
-              :prop="'poList.' + scope.$index + '.unqualifiedQuantity'"
+              :prop="'poList.' + scope.$index + '.measureQuantity'"
               :rules="[
               :rules="[
                 {
                 {
                   required: true,
                   required: true,
@@ -118,13 +118,11 @@
               ]"
               ]"
             >
             >
               <el-input
               <el-input
-                v-model.number="scope.row.unqualifiedQuantity"
+                v-model.number="scope.row.measureQuantity"
                 size="small"
                 size="small"
                 style="width: 100%"
                 style="width: 100%"
                 placeholder="输入数量"
                 placeholder="输入数量"
-                @input="
-                  scope.row.measureQuantity = scope.row.unqualifiedQuantity
-                "
+              
               ></el-input>
               ></el-input>
             </el-form-item>
             </el-form-item>
           </template>
           </template>
@@ -588,7 +586,7 @@
           }
           }
 
 
           if (this.title == '修改') {
           if (this.title == '修改') {
-            updateData({ ...this.form, id: this.id })
+            updateData({ ...this.form })
               .then((res) => {
               .then((res) => {
                 this.loading = false;
                 this.loading = false;
                 this.$message.success('成功');
                 this.$message.success('成功');