koushanshan 3 tahun lalu
induk
melakukan
1f1ed5da85

+ 24 - 0
src/api/pages/pdm/process-node-reverse.js

@@ -0,0 +1,24 @@
+/**
+ *   @desc   : 工序撤销
+ *   @date   : 2023/2/27 14:14
+ *   @author : 寇珊珊
+ */
+export default {
+  processNodeReverseService:{
+    prefix:'/mdm-server/pdm/collect',
+    // 获取明细
+    getDetail:'/mdm-server/pdm/register/getDetail',
+    //查询
+    search:{key:'search',url:'/list_by'},
+    //查询明细
+    searchDetail:{key:'searchDetail',url:'/defect_list_by'},
+  }
+}
+export const routeUrl = {
+  //工序撤销
+  processNodeReverse:{
+    add:{key:'add',url:'/pdm/process-node-reverse/add'},
+  },
+
+
+}

+ 26 - 0
src/api/pages/pdm/prod-defect.js

@@ -0,0 +1,26 @@
+/**
+ *   @desc   : 产品报损
+ *   @date   : 2023/2/27 14:14
+ *   @author : 寇珊珊
+ */
+export default {
+  prodDefectService:{
+    prefix:'/mdm-server/pdm/collect',
+    // 获取明细
+    getDetail:'/mdm-server/pdm/register/getDetail',
+    //查询
+    search:{key:'search',url:'/list_by'},
+    //查询明细
+    searchDetail:{key:'searchDetail',url:'/defect_list_by'},
+  }
+}
+export const routeUrl = {
+  //产品报损
+  prodDefect:{
+    //新建
+    add:{key:'add',url:'/pdm/prod-defect/add'},
+    //撤销
+    reverse:{key:'reverse',url:'/pdm/prod-defect/reverse'},
+  },
+
+}

+ 0 - 11
src/api/pages/pdm/produce.js

@@ -47,17 +47,6 @@ export const routeUrl = {
   recover:{
     add:{key:'add',url:'/pdm/data-collection/recover-add',flgSameRoute: true},
   },
-  //工序撤销
-  processNodeReverse:{
-    add:{key:'add',url:'/pdm/process-node-reverse/add'},
-  },
-  //产品报损
-  prodDefect:{
-    //新建
-    add:{key:'add',url:'/pdm/prod-defect/add'},
-    //撤销
-    reverse:{key:'reverse',url:'/pdm/prod-defect/reverse'},
-  },
 
 
 }

+ 1 - 1
src/view/pdm/process-node-reverse/index.vue

@@ -141,7 +141,7 @@
        */
       getData(params) {
         params.flgUndo = this.flgUndo
-        return this.excute(this.$service.produceService, this.$service.produceService.search.url, params)
+        return this.excute(this.$service.processNodeReverseService, this.$service.processNodeReverseService.search.url, params)
       },
 
     },

+ 3 - 2
src/view/pdm/prod-defect/index.vue

@@ -123,8 +123,8 @@
        */
       getData(params) {
         params.flowNodeId = this.flowNodeId
-        this.excute(this.$service.produceService, this.$service.produceService.search.url, params).then((res) => {
-          console.log(res)
+        let excute = this.excute(this.$service.prodDefectService, this.$service.prodDefectService.search.url, params)
+        excute.then((res) => {
           for (let i  of  res.data.list) {
             if (i.productionDefectList && i.productionDefectList.length > 0) {
               i.blameUserCode = i.productionDefectList[0].blameUserCode
@@ -135,6 +135,7 @@
           }
           this.tableData = res.data.list
         })
+        return excute
       },
 
     },

+ 30 - 24
src/view/pdm/prod-defect/reverse.vue

@@ -51,27 +51,31 @@
           <DkFormItem prop="remarks">
             <InputPop ref="remarks" v-model="formData.remarks" :readonly="true"/>
           </DkFormItem>
+        </DkForm>
+      </DkPanel>
+      <!--报损信息-->
+      <DkPanel prop="LossReportingInformation">
+        <!--  下拉区域  -->
+        <DkForm slot="content" ref="formInline" v-model="LossReportingFormData" style="width: 95%">
           <!--撤销原因-->
           <DkFormItem :required="true" prop="undoReason">
-            <InputPop ref="undoReason" v-model="formData.undoReason"/>
+            <InputPop ref="undoReason" v-model="LossReportingFormData.undoReason"/>
           </DkFormItem>
         </DkForm>
       </DkPanel>
-      <div>
-        <!--明细-->
-        <DkPanel prop="details">
-          <div slot="content" :style="'height: ' + tableHeight + 'px'">
-            <!--撤销信息-->
-            <EditTable slot="left" ref="submitTable" :data="detailList"
-                       :columns="detailColumns"
-                       :height="tableHeight-120"
-                       :freeze="false"
-                       :add-flag="false"
-                       @delRow="delSubmitTable"
-            ></EditTable>
-          </div>
-        </DkPanel>
-      </div>
+      <!--明细-->
+      <DkPanel prop="details">
+        <div slot="content" :style="'height: ' + tableHeight + 'px'">
+          <!--撤销信息-->
+          <EditTable slot="left" ref="submitTable" :data="detailList"
+                     :columns="detailColumns"
+                     :height="tableHeight-120"
+                     :freeze="false"
+                     :add-flag="false"
+                     @delRow="delSubmitTable"
+          ></EditTable>
+        </div>
+      </DkPanel>
     </DkCollapse>
     <!--      下部分按钮区域-->
     <DkSaveButton ref="saveButton" :loading="loading" @save="save" @close="close"></DkSaveButton>
@@ -95,7 +99,6 @@
         formData: {
           barCode: '',
           ftyId: this.$store.state.user.ftyId,
-          undoReason: null,//撤销原因
           productId: null,
           productCode: null,
           productName: null,
@@ -106,6 +109,9 @@
           blameUserCode: null,//责任工号
           remarks: null,//备注
         },
+        LossReportingFormData:{
+          undoReason: null,//撤销原因
+        },
         // 明细列表
         detailColumns: [
           // 产品条码
@@ -150,7 +156,7 @@
               this.formData.blameUserCode = res.data.productionDefectList[0].blameUserCode//责任工号
               this.formData.remarks = res.data.productionDefectList[0].remarks//备注
             } else {
-              this.formData.barCode= null
+              this.formData.barCode = null
               this.$Message.error(res.message)
             }
           })
@@ -170,7 +176,7 @@
        *   @author : 寇珊珊
        */
       addRow() {
-        if(this.formData.barCode) {
+        if (this.formData.barCode) {
           //校验名称是否重复
           if (!this.validDataRow()) {
             return
@@ -218,7 +224,7 @@
         }
         this.params = {
           barCodeList: this.barCodeList,
-          undoReason: this.formData.undoReason,
+          undoReason: this.LossReportingFormData.undoReason,
         }
       },
       /**
@@ -226,8 +232,8 @@
        *   @date   : 2023/4/6 10:33
        *   @author : 寇珊珊
        */
-      validData(){
-        if(this.formData.barCode){
+      validData() {
+        if (this.formData.barCode) {
           this.$Message.error(this.$t('W_132'))
           return false
         }
@@ -249,8 +255,8 @@
       clear(value) {
         if (!value) {
           this.detailList = []
-          this.barCodeList =[]
-          this.formData.undoReason = null
+          this.barCodeList = []
+          this.LossReportingFormData.undoReason = null
         }
         this.formData.barCode = null
         this.formData.productId = null

+ 1 - 1
src/view/pdm/thmeter-record/index.vue

@@ -121,7 +121,7 @@
           // 湿温度计名称
           { field: 'thmeterName', type: 'disabled', width: 'auto', },
           //温度
-          { field: 'temperature', type: 'number', max: 99999, digits:2, width: 'auto', },
+          { field: 'temperature', type: 'number',  min:-99999,max: 99999, digits:2, negative:true, width: 'auto', },
           //湿度
           { field: 'humidity', type: 'number', max: 99999, digits:2, width: 'auto', },
           // 备注