浏览代码

质检添加货名sdy

zhongtianhaoyuan 3 年之前
父节点
当前提交
edb6aa949e

+ 2 - 0
src/api/V2/houseSelfCollect/index.js

@@ -87,4 +87,6 @@ export const API_POST_INVOICING = '/paymentManagement/api/readXmlManagement'
 export const API_POST_EXPORT = '/paymentManagement/export'
 // 车牌号
 export const API_GET_SHIPPINGINFOFORMATION = '/shippingInformation/selectShippingInformation'
+//确认质检信息
+export const API_POST_INSPECTIONCHECK = '/qualityInspectionManagement/api/editQualityInspection'
 

+ 5 - 2
src/model/houseSelfCollect/index.js

@@ -45,7 +45,8 @@ import {
   API_GET_INSPECT_GETJURISDICTION,
   API_POST_INVOICING,
   API_POST_EXPORT,
-  API_GET_SHIPPINGINFOFORMATION
+  API_GET_SHIPPINGINFOFORMATION,
+  API_POST_INSPECTIONCHECK
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -136,4 +137,6 @@ export const invoicing  = appRx.post(API_POST_INVOICING, errorCatcher, errorHand
 
 export const export1 = appRx.post(API_POST_EXPORT)
 // 车牌号
-export const getshippinginfo  = appRx.get(API_GET_SHIPPINGINFOFORMATION, errorCatcher, errorHandle, filter)
+export const getshippinginfo  = appRx.get(API_GET_SHIPPINGINFOFORMATION, errorCatcher, errorHandle, filter)
+// 确认初检信息
+export const postCheck  = appRx.post(API_POST_INSPECTIONCHECK, errorCatcher, errorHandle, filter)

+ 29 - 3
src/views/houseSelfCollect/inspectInfo.vue

@@ -62,8 +62,7 @@
                 size="small" />
             </ws-form-item>
             <ws-form-item label="货名" span="1" prop="goodsName">
-              <ws-select v-model="inspect.goodsName" placeholder="" class="typeselect" :disabled="disabledName"
-                @change="waterContentChange">
+              <ws-select v-model="inspect.goodsName" placeholder="" class="typeselect" :disabled="disabledName" @change="waterContentChange">
                 <ws-option v-for="item in goodNameList" :key="item.goodsName" :label="item.goodsName"
                   :value="item.goodsName" />
               </ws-select>
@@ -149,6 +148,7 @@
           </ws-info-table>
           <div class="but">
             <el-button @click="cancel" v-if="types != 2" type="primary">取消</el-button>
+               <el-button @click="checkOk" v-if="types ==3 || types == 4" type="primary">确认初检信息</el-button>
             <el-button @click="print" v-if="types ==3 || types ==1" type="primary">保存
             </el-button>
             <el-button @click="print" v-if="types == 5 || types==4" type="primary">确认并打印</el-button>
@@ -180,7 +180,8 @@
     getamount,
     getCount,
     getDryGrainPrice,
-    getshippinginfo
+    getshippinginfo,
+    postCheck
   } from '@/model/houseSelfCollect/index'
   import {
     packList
@@ -280,11 +281,36 @@
       } else {
         this.disabled1 = false
         this.disabled = false
+        this.disabledName = false
       }
       this.calculation()
       this.getList(this.id)
     },
     methods: {
+      //确认初检信息
+      checkOk(){
+        this.$confirm('确定初检信息后,初检员不需要再次确认质检信息,是否确认提交', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              postCheck({id:this.id,flag:2})
+                .toPromise()
+                .then((response) => {
+                  debugger
+                  if(response == "OK"){
+                      this.$message.success('提交成功')
+                        this.$router.push({path: 'inspectionManagement' })
+                  }else{
+                    this.$message.error('提交失败')
+                  }
+                }).catch(() => {
+              return false
+            })
+        })
+
+      },
       printSmall() {
         window.open('../../../static/inspection.html?type=1&dataList=' + JSON.stringify(this.inspect))
       },

+ 10 - 6
src/views/tradeServicesManagement/warehouseReceiptEdit.vue

@@ -232,11 +232,11 @@ export default {
         },
       compOptionList:[],
       taskhistories:[],
-        warehouseList: [],
-        cwNumberList:[],
-        goodsList:[],
-        bankList:[],
-        threeList:[],
+      warehouseList: [],
+      cwNumberList:[],
+      goodsList:[],
+      bankList:[],
+      threeList:[],
     }
   },
   activated() {
@@ -297,7 +297,7 @@ export default {
             this.deptBudgetList.goodsNameKey = _data[i].goodsNameKey
             this.deptBudgetList.goodsName = _data[i].goodsName
             this.deptBudgetList.nowWeight = _data[i].storage
-             this.deptBudgetList.useWeight =  _data[i].useStorage
+            this.deptBudgetList.useWeight =  _data[i].useStorage
              return
           }
         }
@@ -343,8 +343,12 @@ export default {
         }
         if(this.goodsList.length == 0){
           this.deptBudgetList.goodsName = ""
+             this.deptBudgetList.nowWeight = ''
+            this.deptBudgetList.useWeight = ""
         }else{
            this.deptBudgetList.goodsName = this.goodsList[0].goodsName
+            this.deptBudgetList.nowWeight = this.goodsList[0].storage
+            this.deptBudgetList.useWeight = this.goodsList[0].useStorage
         }
       },
     getcompList(){