zhongtianhaoyuan 3 gadi atpakaļ
vecāks
revīzija
7a4f5fd400

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

@@ -108,3 +108,7 @@ export const API_POST_SUSPENDINSTANCE ='/paymentManagement/api/ReSettlement'
 export const API_POST_IMPORT ='/qualityInspectionManagement/api/importQuality'
 // 结算单
 export const API_GET_SETTLEACCOUT = '/warehouseInOutInfo/getInfo'
+// 退回
+export const API_POST_RETURN= '/weighingManagement/weightReturn'
+// 新检斤保存
+export const API_POST_SUBMIT= '/warehouseInOutInfo/api/newInOutWarehouse'

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

@@ -36,3 +36,5 @@ export const API_POST_COLLECTION_MONEY = '/paymentManagement/api/collectMoney'
 export const API_POST_COLLECTION_EDITCOLLECT = '/paymentManagement/api/editCollect'
 // 添加备注
 export const API_POST_COLLECTION_ADDREMARKS = '/paymentManagement/api/addRemarks'
+// 新检斤保存
+export const API_POST_NEW_SUBMIT = '/warehouseInOutInfo/api/newInOutWarehouse'

+ 7 - 1
src/model/houseSelfCollect/index.js

@@ -55,7 +55,9 @@ import {
   API_POST_SUSPENDINSTANCE,
   API_POST_IMPORT,
   API_GET_INSPECT_CONTRACTNO,
-  API_GET_SETTLEACCOUT
+  API_GET_SETTLEACCOUT,
+  API_POST_RETURN,
+  API_POST_SUBMIT
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -167,3 +169,7 @@ export const suspendinstance = appRx.post(API_POST_SUSPENDINSTANCE, errorCatcher
 export const importWord = appRx.post(API_POST_IMPORT, errorCatcher, errorHandle, filter)
 // 查看结算单
 export const getsettleaccout = appRx.get(API_GET_SETTLEACCOUT, errorCatcher, errorHandle, filter)
+// 退回
+export const returnInfo = appRx.post(API_POST_RETURN, errorCatcher, errorHandle, filter)
+// 新检斤保存
+export const newSubmit = appRx.post(API_POST_SUBMIT, errorCatcher, errorHandle, filter)

+ 5 - 3
src/model/outboundManagement/index.js

@@ -20,8 +20,8 @@ import {
     API_POST_COLLECTION_EDITCOLLECT,
     API_POST_COLLECTION_ADDREMARKS,
     API_POST_COLLECTION_MONEY,
-    API_GET_INSPECT_CONTRANCLISTWEIGHING
-
+    API_GET_INSPECT_CONTRANCLISTWEIGHING,
+    API_POST_NEW_SUBMIT
 }   from '@/api/V2/outboundManagement'
 
   //质检列表
@@ -61,4 +61,6 @@ export const getcollection = appRx.get(API_GET_COLLECTION_LIST, errorCatcher, er
 //编辑实际应收
 export const editcollect = appRx.post(API_POST_COLLECTION_EDITCOLLECT, errorCatcher, errorHandle, filter)
 //添加备注
-export const remarksAdd = appRx.post(API_POST_COLLECTION_ADDREMARKS, errorCatcher, errorHandle, filter)
+export const remarksAdd = appRx.post(API_POST_COLLECTION_ADDREMARKS, errorCatcher, errorHandle, filter)
+//新检斤保存
+export const newSubmit = appRx.post(API_POST_NEW_SUBMIT, errorCatcher, errorHandle, filter)

+ 93 - 79
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -59,10 +59,10 @@
                       :value="item.inOutTaskNo" />
                   </el-select>
                 </ws-form-item>
-                <ws-form-item v-if='serviceManagementType==3' label="业务编号" span="1" prop="qualityNo">
+                <!-- <ws-form-item v-if='serviceManagementType==3' label="业务编号" span="1" prop="qualityNo">
                   <ws-input v-model="deptBudgetList.qualityNo" placeholder="自动获取,不可编辑" maxlength="100" disabled
                     size="small" />
-                </ws-form-item>
+                </ws-form-item> -->
                 <ws-form-item v-if='serviceManagementType==3' label="购粮性质" span="1" prop="natureOfGrainPurchase">
                   <ws-input v-model="deptBudgetList.natureOfGrainPurchase" placeholder="请输入购粮性质" maxlength="10"
                     size="small" :disabled="disabled" />
@@ -167,10 +167,10 @@
                       top: -1px;
                     " src="../../../public/img/edit.png" @click="editClick(3)" alt="" /> -->
                 </ws-form-item>
-                <ws-form-item v-if='serviceManagementType==1' label="业务编号" span="1" prop="qualityNo">
+                <!-- <ws-form-item v-if='serviceManagementType==1' label="业务编号" span="1" prop="qualityNo">
                   <ws-input v-model="deptBudgetList.qualityNo" placeholder="自动获取,不可编辑" maxlength="100" disabled
                     size="small" />
-                </ws-form-item>
+                </ws-form-item> -->
 
                 <ws-form-item v-if='serviceManagementType==1' label="囤位号" span="1" prop="storageTagNo">
                   <ws-input :disabled='recheck' v-model="deptBudgetList.storageTagNo" placeholder="选填,1-10个字符"
@@ -1031,18 +1031,18 @@
                   }
                    this.getNowTime()
                   var count = ''
-                  if (this.serviceManagementType == 3) {
-                    if (this.warehouseCount < 10) {
-                      count = '000' + (this.warehouseCount + 1)
-                    }
-                    if (this.warehouseCount < 100 && this.warehouseCount >= 10) {
-                      count = '00' + (this.warehouseCount + 1)
-                    }
-                    if (this.warehouseCount < 1000 && this.warehouseCount >= 100) {
-                      count = '0' + (this.warehouseCount + 1)
-                    }
-                    this.deptBudgetList.qualityNo = 'SGRK' + this.getTime() + this.warehouseNo + count
-                  }
+                  // if (this.serviceManagementType == 3) {
+                  //   if (this.warehouseCount < 10) {
+                  //     count = '000' + (this.warehouseCount + 1)
+                  //   }
+                  //   if (this.warehouseCount < 100 && this.warehouseCount >= 10) {
+                  //     count = '00' + (this.warehouseCount + 1)
+                  //   }
+                  //   if (this.warehouseCount < 1000 && this.warehouseCount >= 100) {
+                  //     count = '0' + (this.warehouseCount + 1)
+                  //   }
+                  //   this.deptBudgetList.qualityNo = 'SGRK' + this.getTime() + this.warehouseNo + count
+                  // }
 
                 })
             })
@@ -1116,19 +1116,19 @@
                 titleNoOther: '',
               }
                this.getNowTime()
-              if (this.serviceManagementType == 3) {
-                var count = ''
-                if (this.warehouseCount < 10) {
-                  count = '000' + (this.warehouseCount + 1)
-                }
-                if (this.warehouseCount < 100 && this.warehouseCount >= 10) {
-                  count = '00' + (this.warehouseCount + 1)
-                }
-                if (this.warehouseCount < 1000 && this.warehouseCount >= 100) {
-                  count = '0' + (this.warehouseCount + 1)
-                }
-                this.deptBudgetList.qualityNo = 'SGRK' + this.getTime() + this.warehouseNo + count
-              }
+              // if (this.serviceManagementType == 3) {
+              //   var count = ''
+              //   if (this.warehouseCount < 10) {
+              //     count = '000' + (this.warehouseCount + 1)
+              //   }
+              //   if (this.warehouseCount < 100 && this.warehouseCount >= 10) {
+              //     count = '00' + (this.warehouseCount + 1)
+              //   }
+              //   if (this.warehouseCount < 1000 && this.warehouseCount >= 100) {
+              //     count = '0' + (this.warehouseCount + 1)
+              //   }
+              //   this.deptBudgetList.qualityNo = 'SGRK' + this.getTime() + this.warehouseNo + count
+              // }
               this.getList()
             })
         }
@@ -1289,19 +1289,19 @@
           inOutTypeKey: 1
         }
          this.getNowTime()
-        if (this.serviceManagementType == 3) {
-          var count = ''
-          if (this.warehouseCount < 10) {
-            count = '000' + (this.warehouseCount + 1)
-          }
-          if (this.warehouseCount < 100 && this.warehouseCount >= 10) {
-            count = '00' + (this.warehouseCount + 1)
-          }
-          if (this.warehouseCount < 1000 && this.warehouseCount >= 100) {
-            count = '0' + (this.warehouseCount + 1)
-          }
-          this.deptBudgetList.qualityNo = 'SGRK' + this.getTime() + this.warehouseNo + count
-        }
+        // if (this.serviceManagementType == 3) {
+        //   var count = ''
+        //   if (this.warehouseCount < 10) {
+        //     count = '000' + (this.warehouseCount + 1)
+        //   }
+        //   if (this.warehouseCount < 100 && this.warehouseCount >= 10) {
+        //     count = '00' + (this.warehouseCount + 1)
+        //   }
+        //   if (this.warehouseCount < 1000 && this.warehouseCount >= 100) {
+        //     count = '0' + (this.warehouseCount + 1)
+        //   }
+        //   this.deptBudgetList.qualityNo = 'SGRK' + this.getTime() + this.warehouseNo + count
+        // }
       },
       statustypechangelist(status) {
         this.statusType = status
@@ -1396,19 +1396,19 @@
                         inOutTypeKey: 1
                       }
                        this.getNowTime()
-                      if (this.serviceManagementType == 3) {
-                        var count = ''
-                        if (this.warehouseCount < 10) {
-                          count = '000' + (this.warehouseCount + 1)
-                        }
-                        if (this.warehouseCount < 100 && this.warehouseCount >= 10) {
-                          count = '00' + (this.warehouseCount + 1)
-                        }
-                        if (this.warehouseCount < 1000 && this.warehouseCount >= 100) {
-                          count = '0' + (this.warehouseCount + 1)
-                        }
-                        this.deptBudgetList.qualityNo = 'SGRK' + this.getTime() + this.warehouseNo + count
-                      }
+                      // if (this.serviceManagementType == 3) {
+                      //   var count = ''
+                      //   if (this.warehouseCount < 10) {
+                      //     count = '000' + (this.warehouseCount + 1)
+                      //   }
+                      //   if (this.warehouseCount < 100 && this.warehouseCount >= 10) {
+                      //     count = '00' + (this.warehouseCount + 1)
+                      //   }
+                      //   if (this.warehouseCount < 1000 && this.warehouseCount >= 100) {
+                      //     count = '0' + (this.warehouseCount + 1)
+                      //   }
+                      //   this.deptBudgetList.qualityNo = 'SGRK' + this.getTime() + this.warehouseNo + count
+                      // }
                       this.getList()
                     } else {
                       this.$message.error('提交失败')
@@ -2071,7 +2071,21 @@
             return
           }
         }
+        // deptBudgetList.qualityNo//业务编号改为后端生成
+        delete this.deptBudgetList.qualityNo
+        if(this.serviceManagementType == 1){
+            if(this.deptBudgetList.inOutType == '移库入库'){
+              this.deptBudgetList.numberLetter = "YKRK"
+          }else{
+              this.deptBudgetList.numberLetter = "CGRK"
+          }
+        }else{
+           this.deptBudgetList.numberLetter = "SGRK"
+        }
+        
+        this.deptBudgetList.warehouseNo = this.warehouseNo
         console.log(this.deptBudgetList, '入库对象')
+        // return
 
         this.$confirm(`确定提交入库信息`, {
             cancelButtonText: '取消',
@@ -2405,13 +2419,13 @@
       },
       warehousetypechange(status) {
         this.serviceManagementType = status
-        if (status == 3) {
-          //解决冲突别解决没了(注意)
-          this.outType = '他运'
-          this.warehouseCount = '000' + Number(this.warehouseCount + 1)
-          this.deptBudgetList.qualityNo = 'SGRK' + this.getTime() + this.warehouseNo + this.warehouseCount.substring(
-            this.warehouseCount.length - 4)
-        }
+        // if (status == 3) {
+        //   //解决冲突别解决没了(注意)
+        //   this.outType = '他运'
+        //   this.warehouseCount = '000' + Number(this.warehouseCount + 1)
+        //   this.deptBudgetList.qualityNo = 'SGRK' + this.getTime() + this.warehouseNo + this.warehouseCount.substring(
+        //     this.warehouseCount.length - 4)
+        // }
         this.getList()
       },
       // 默认按钮暂时不用
@@ -2461,8 +2475,8 @@
               this.customerPhone = this.outContractNo[i].buyerPhone
               this.warehouseTradeCount = this.warehouseTradeCount1
               this.warehouseTradeCount = '000' + (Number(this.warehouseTradeCount) + 1)
-              this.deptBudgetList.qualityNo = 'CGRK' + this.getTime() + this.warehouseNo + this.warehouseTradeCount
-                .substring(this.warehouseTradeCount.length - 4)
+              // this.deptBudgetList.qualityNo = 'CGRK' + this.getTime() + this.warehouseNo + this.warehouseTradeCount
+                // .substring(this.warehouseTradeCount.length - 4)
               if (!this.outContractNo[i].unitContractPrice) {
                 this.deptBudgetList.tips = '卖方' + this.outContractNo[i].seller
               } else {
@@ -2473,8 +2487,8 @@
             } else if (this.outContractNo[i].inOutType == '移库入库') {
               this.customerName = localStorage.getItem('ws-pf_compName')
               this.warehouseTradeCount = '000' + (Number(this.warehouseTradeCount) + 1)
-              this.deptBudgetList.qualityNo = 'YKRK' + this.getTime() + this.warehouseNo + this.warehouseTradeCount
-                .substring(this.warehouseTradeCount.length - 4)
+              // this.deptBudgetList.qualityNo = 'YKRK' + this.getTime() + this.warehouseNo + this.warehouseTradeCount
+                // .substring(this.warehouseTradeCount.length - 4)
               this.deptBudgetList.goodsName = data.goodsName
               this.deptBudgetList.goodsNameKey = data.goodsNameKey
               this.deptBudgetList.grade = data.grade
@@ -2616,19 +2630,19 @@
               titleNoOther: '',
             }
              this.getNowTime()
-            if (this.serviceManagementType == 3) {
-              var count = ''
-              if (this.warehouseCount < 10) {
-                count = '000' + Number(this.warehouseCount + 1)
-              }
-              if (this.warehouseCount < 100 && this.warehouseCount >= 10) {
-                count = '00' + Number(this.warehouseCount + 1)
-              }
-              if (this.warehouseCount < 1000 && this.warehouseCount >= 100) {
-                count = '0' + Number(this.warehouseCount + 1)
-              }
-              this.deptBudgetList.qualityNo = 'SGRK' + this.getTime() + this.warehouseNo + count
-            }
+            // if (this.serviceManagementType == 3) {
+            //   var count = ''
+            //   if (this.warehouseCount < 10) {
+            //     count = '000' + Number(this.warehouseCount + 1)
+            //   }
+            //   if (this.warehouseCount < 100 && this.warehouseCount >= 10) {
+            //     count = '00' + Number(this.warehouseCount + 1)
+            //   }
+            //   if (this.warehouseCount < 1000 && this.warehouseCount >= 100) {
+            //     count = '0' + Number(this.warehouseCount + 1)
+            //   }
+            //   this.deptBudgetList.qualityNo = 'SGRK' + this.getTime() + this.warehouseNo + count
+            // }
             this.getList()
           }
         }

+ 2 - 1
src/views/houseSelfCollect/inspectionManagementrecord.vue

@@ -34,7 +34,7 @@
       </template>
     </BaseHeaderLayout>
     <!-- <div style="height:calc(100vh - 600px)"> -->
-    <el-table :data="inspect" style="width: 100%; margin-top: 20px" ref="inspect" border height="calc(100% - 130px)">
+    <el-table :data="inspect" style="width: 100%; margin-top: 20px" ref="inspect" border height="calc(100% - 160px)">
       <el-table-column type="index" label="序号" width="50">
         <template scope="scope">
           <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
@@ -97,6 +97,7 @@
           </div>
           <el-button @click="print(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionQuality.print`">打印
           </el-button>
+          
         </template>
       </el-table-column>
     </el-table>

+ 262 - 145
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -142,7 +142,7 @@
                 <el-button @click="print(1)" v-if="information == '皮重'" type="primary">保存并打印
                 </el-button>
               </div>
-               <!-- <div>
+              <!-- <div>
                       <div>粮源</div>
                       <div class='stocks' v-for='(item,index) in stocks'>
                         <el-select v-model="item.warehouseName" filterable placeholder="选择所属仓库" @change="warehouseNameChange" :value="searchType">
@@ -294,6 +294,7 @@
     getinspectLookGoods,
     selectWarehouseSelf,
     getsettleaccout,
+    newSubmit
   } from '@/model/houseSelfCollect/index'
   import {
     addstorageputList
@@ -452,7 +453,11 @@
         allowEdit: 0,
         mListTop: [],
         mListBottom: [],
-        stocks:[{warehouseName:'',weight:'',cost:''}],
+        stocks: [{
+          warehouseName: '',
+          weight: '',
+          cost: ''
+        }],
         pListTop: [],
         carList1: [],
         pListBottom: [],
@@ -644,7 +649,7 @@
           clearInterval(that.timer)
           that.refresh = 60
           that.timer = setInterval(function() {
-            console.log(that.refresh)
+            // console.log(that.refresh)
             if (that.refresh == 0) {
               that.refresh = 60
               getweighingList({
@@ -721,6 +726,7 @@
           })
           .toPromise()
           .then((response) => {
+            debugger
             this.dialogDataList = [] //点击确认时先清空要打印的数组
             this.dialogData = response
             if (response.compName == '黑龙江秋收有限公司') {
@@ -835,11 +841,14 @@
         }
         // this.deptBudgetTotal = this.carList.length
       },
-      addstocks(index){
-       this.stocks.push({warehouseName:'',cost:''})
+      addstocks(index) {
+        this.stocks.push({
+          warehouseName: '',
+          cost: ''
+        })
       },
-      delstocks(index){
-        this.stocks.splice(index,1)
+      delstocks(index) {
+        this.stocks.splice(index, 1)
       },
       handleSizeChange(val) {
         console.log(`每页 ${val} 条`)
@@ -959,7 +968,7 @@
             this.weighingList.inOutType = this.pList[0].qualityInspectionManagement.inOutType
             this.weighingList.inOutTypeKey = this.pList[0].qualityInspectionManagement.inOutTypeKey
             this.weighingList.deductionAmount = this.pList[0].qualityInspectionManagement.deductionAmount
-            console.log(this.weighingList)
+            // console.log(this.weighingList)
             this.carWeightInfo = {
               carNumber: this.pList[0].carNumber,
               type: this.information,
@@ -1200,7 +1209,7 @@
       },
       handleCurrentChange(val) {
         this.submitAllow = false
-        
+
         if (val) {
           this.currentRow = val
           this.carWeightInfo = {
@@ -1214,7 +1223,8 @@
             this.weighingList.boxNoOther = val.qualityInspectionManagement.boxNoOther
             this.weighingList.titleNo = val.qualityInspectionManagement.titleNo
             this.weighingList.titleNoOther = val.qualityInspectionManagement.titleNoOther
-            if (this.tpyeNo == 2 && this.status == 1 && val && val.qualityInspectionManagement.confirm == 0&&this.warehouseName != '克东千丰库') {
+            if (this.tpyeNo == 2 && this.status == 1 && val && val.qualityInspectionManagement.confirm == 0 && this
+              .warehouseName != '克东千丰库') {
               this.submitAllow = true
               this.$message({
                 message: '该条质检信息未确认',
@@ -1423,7 +1433,6 @@
             type: 'warning',
           })
           .then(() => {
-            debugger
             var that = this
             var warehousing = {}
             //贸易入库保存需要再走入库接口
@@ -1491,81 +1500,155 @@
                           )
                         } else {
                           //累计售粮没有超上限完成毛检保存
-                          // this.weighingList.relationId = this.relationId;
-                          grossWeight(this.weighingList)
-                            .toPromise()
-                            .then((response) => {
-                              if (this.reader) {
-                                this.reader.cancel()
-                              }
-                              this.$notify.success({
-                                title: '成功',
-                                message: '保存成功',
+                          if (this.inWarehouseType == 1) { //判断贸易入库提交毛重
+                            warehousing.grossWeight /= 1000
+                            warehousing.tare /= 1000
+                            warehousing.netWeight /= 1000
+                            warehousing.pureWeight = 1000
+                            warehousing.deductionAmount *= 1000
+                            warehousing.deductionWeight /= 1000
+                            warehousing.statusFlag = 1
+                            warehousing.inOutFlag = 2
+                            warehousing.id = warehousing.warehouseInOutId
+                            warehousing.warehouseInOutDetail.id = warehousing.inOutDetailId
+                            warehousing.weighingManagement = this.weighingList
+                            newSubmit(warehousing)
+                              .toPromise()
+                              .then((response) => {
+                                this.$notify.success({
+                                  title: '成功',
+                                  message: '保存成功',
+                                })
+                                this.getList()
+
                               })
-                              //贸易入库需要再走入库接口
-                              if (this.inWarehouseType == 1) {
-                                warehousing.grossWeight /= 1000
-                                warehousing.tare /= 1000
-                                warehousing.netWeight /= 1000
-                                warehousing.pureWeight = 1000
-                                warehousing.deductionAmount *= 1000
-                                warehousing.deductionWeight /= 1000
-                                warehousing.statusFlag = 1
-                                warehousing.inOutFlag =2
-                                warehousing.id = warehousing.warehouseInOutId
-                                warehousing.warehouseInOutDetail.id = warehousing.inOutDetailId
-                                addstorageputList(warehousing).toPromise().then((response) => {
-                                  if (response == 'OK') {
-                                    this.getList()
-                                  }
+                          } else { //收购入库
+                            grossWeight(this.weighingList)
+                              .toPromise()
+                              .then((response) => {
+                                if (this.reader) {
+                                  this.reader.cancel()
+                                }
+                                this.$notify.success({
+                                  title: '成功',
+                                  message: '保存成功',
                                 })
-                              } else {
                                 this.getList()
-                              }
-                            })
-                            .catch((response) => {
-                              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-                            })
+                              })
+                          }
+                          //累计售粮没有超上限完成毛检保存
+                          // this.weighingList.relationId = this.relationId;
+                          // grossWeight(this.weighingList)
+                          //   .toPromise()
+                          //   .then((response) => {
+                          //     if (this.reader) {
+                          //       this.reader.cancel()
+                          //     }
+                          //     this.$notify.success({
+                          //       title: '成功',
+                          //       message: '保存成功',
+                          //     })
+                          //     //贸易入库需要再走入库接口
+                          //     if (this.inWarehouseType == 1) {
+                          //       warehousing.grossWeight /= 1000
+                          //       warehousing.tare /= 1000
+                          //       warehousing.netWeight /= 1000
+                          //       warehousing.pureWeight = 1000
+                          //       warehousing.deductionAmount *= 1000
+                          //       warehousing.deductionWeight /= 1000
+                          //       warehousing.statusFlag = 1
+                          //       warehousing.inOutFlag =2
+                          //       warehousing.id = warehousing.warehouseInOutId
+                          //       warehousing.warehouseInOutDetail.id = warehousing.inOutDetailId
+                          //       addstorageputList(warehousing).toPromise().then((response) => {
+                          //         if (response == 'OK') {
+                          //           this.getList()
+                          //         }
+                          //       })
+                          //     } else {
+                          //       this.getList()
+                          //     }
+                          //   })
+                          //   .catch((response) => {
+                          //     // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                          //   })
                         }
                       }
                     }
                   })
               } else {
-                grossWeight(this.weighingList)
-                  .toPromise()
-                  .then((response) => {
-                    if (this.reader) {
-                      this.reader.cancel()
-                    }
-                    this.$notify.success({
-                      title: '成功',
-                      message: '保存成功',
+                if (this.inWarehouseType == 1) { //贸易入库
+                  warehousing.grossWeight /= 1000
+                  warehousing.tare /= 1000
+                  warehousing.netWeight /= 1000
+                  warehousing.pureWeight = 1000
+                  warehousing.deductionAmount *= 1000
+                  warehousing.deductionWeight /= 1000
+                  warehousing.statusFlag = 1
+                  warehousing.inOutFlag = 2
+                  delete warehousing.status
+                  warehousing.id = warehousing.warehouseInOutId
+                  warehousing.warehouseInOutDetail.id = warehousing.inOutDetailId
+                  warehousing.weighingManagement = this.weighingList
+
+                  newSubmit(warehousing)
+                    .toPromise()
+                    .then((response) => {
+                      this.$notify.success({
+                        title: '成功',
+                        message: '保存成功',
+                      })
+                      this.getList()
                     })
-                    //贸易入库需要再走入库接口
-                    if (this.inWarehouseType == 1) {
-                      warehousing.grossWeight /= 1000
-                      warehousing.tare /= 1000
-                      warehousing.netWeight /= 1000
-                      warehousing.pureWeight = 1000
-                      warehousing.deductionAmount *= 1000
-                      warehousing.deductionWeight /= 1000
-                      warehousing.statusFlag = 1
-                      warehousing.inOutFlag = 2
-                      delete warehousing.status
-                      warehousing.id = warehousing.warehouseInOutId
-                      warehousing.warehouseInOutDetail.id = warehousing.inOutDetailId
-                      addstorageputList(warehousing).toPromise().then((response) => {
-                        if (response == 'OK') {
-                          this.getList()
-                        }
+                } else { //收购入库
+                  grossWeight(this.weighingList)
+                    .toPromise()
+                    .then((response) => {
+                      if (this.reader) {
+                        this.reader.cancel()
+                      }
+                      this.$notify.success({
+                        title: '成功',
+                        message: '保存成功',
                       })
-                    } else {
                       this.getList()
-                    }
-                  })
-                  .catch((response) => {
-                    // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-                  })
+                    })
+                }
+                // grossWeight(this.weighingList)
+                //   .toPromise()
+                //   .then((response) => {
+                //     if (this.reader) {
+                //       this.reader.cancel()
+                //     }
+                //     this.$notify.success({
+                //       title: '成功',
+                //       message: '保存成功',
+                //     })
+                //     //贸易入库需要再走入库接口
+                //     if (this.inWarehouseType == 1) {
+                //       warehousing.grossWeight /= 1000
+                //       warehousing.tare /= 1000
+                //       warehousing.netWeight /= 1000
+                //       warehousing.pureWeight = 1000
+                //       warehousing.deductionAmount *= 1000
+                //       warehousing.deductionWeight /= 1000
+                //       warehousing.statusFlag = 1
+                //       warehousing.inOutFlag = 2
+                //       delete warehousing.status
+                //       warehousing.id = warehousing.warehouseInOutId
+                //       warehousing.warehouseInOutDetail.id = warehousing.inOutDetailId
+                //       addstorageputList(warehousing).toPromise().then((response) => {
+                //         if (response == 'OK') {
+                //           this.getList()
+                //         }
+                //       })
+                //     } else {
+                //       this.getList()
+                //     }
+                //   })
+                //   .catch((response) => {
+                //     // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                //   })
               }
             } else if (this.tpyeNo == 2) {
               //皮重
@@ -1576,10 +1659,10 @@
               // // 入库添加
               // let _url3 = process.env.VUE_APP_BASE_API + '/warehouseInOutInfo/InOutWarehouse'
 
-              console.log(this.inWarehouseType)
-               //贸易入库需要再走入库接口
-              if (this.inWarehouseType == 1) {
-                getsettleaccout({
+              // console.log(this.inWarehouseType)
+              //贸易入库需要再走入库接口
+              if (this.inWarehouseType == 1) { //贸易入库皮检
+                getsettleaccout({//查看结算单
                   id: this.weighingList.warehouseInOutId
                 }).toPromise().then((response) => {
                   that.inOutData = response
@@ -1601,8 +1684,6 @@
                   // that.inOutDate.deductionAmount= Number(warehousing.deductionAmount) * 1000
                   // that.inOutDate.deductionWeight=warehousing.deductionWeight /1000
                   // that.inOutDate.inOutFlag = 2
-                  console.log(that.inOutData)
-
                   // warehousing.statusFlag = 3
                   // warehousing.grossWeight /= 1000
                   // warehousing.tare /= 1000
@@ -1618,52 +1699,81 @@
                   // warehousing.id = warehousing.warehouseInOutId
                   // // delete that.inOutDate.status
                   // that.inOutDate = Object.assign(that.inOutDate, warehousing)
-                  addstorageputList(that.inOutData).toPromise().then((response) => {
-                    this.weighingList.warehouseId = this.cangid;
-                    this.weighingList.skinInspector = localStorage.getItem('ws-pf_staffName')
-                    tare(this.weighingList)
-                      .toPromise()
-                      .then((response) => {
-                        console.log(1111)
-                        // if (this.reader) {
-                        //   this.reader.cancel()
-                        // }
-                        this.$notify.success({
-                          title: '成功',
-                          message: '保存成功',
-                        })
-                        this.idPrint = response
-                        if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this
-                            .warehouseName == '哈尔滨依兰库' || this
-                            .warehouseName == '白城内陆港')) {
-                          if (this.weighingList.seller && this.weighingList.buyer) {
-                            let cang = {}
-                            cang.value = this.weighingList.seller
-                            cang.label = this.weighingList.seller
-                            if (this.check(this.weighingList.seller, 1)) {
-                              this.ewCustomerOptions.push(cang)
-                            }
-                            let cang1 = {}
-                            cang1.value = this.weighingList.buyer
-                            cang1.label = this.weighingList.buyer
-                            if (this.check(this.weighingList.buyer, 2)) {
-                              this.companyNameEWOptions.push(cang1)
-                            }
-                          }
+                  that.weighingList.warehouseId = that.cangid;
+                  that.weighingList.skinInspector = localStorage.getItem('ws-pf_staffName')
+                  that.inOutData.weighingManagement = that.weighingList
+                  newSubmit(that.inOutData).toPromise().then((response) => { //检斤新接口
+                    this.$notify.success({
+                      title: '成功',
+                      message: '保存成功',
+                    })
+                    this.idPrint = response
+                    if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' ||
+                        this
+                        .warehouseName == '哈尔滨依兰库' || this
+                        .warehouseName == '白城内陆港')) {
+                      if (this.weighingList.seller && this.weighingList.buyer) {
+                        let cang = {}
+                        cang.value = this.weighingList.seller
+                        cang.label = this.weighingList.seller
+                        if (this.check(this.weighingList.seller, 1)) {
+                          this.ewCustomerOptions.push(cang)
                         }
-                        this.isShowPrintType = true
-                        this.getList()
-                      
-                      })
-                      .catch((response) => {})
+                        let cang1 = {}
+                        cang1.value = this.weighingList.buyer
+                        cang1.label = this.weighingList.buyer
+                        if (this.check(this.weighingList.buyer, 2)) {
+                          this.companyNameEWOptions.push(cang1)
+                        }
+                      }
+                    }
+                    this.isShowPrintType = true
+                    this.getList()
                   })
-                  
+                  // addstorageputList(that.inOutData).toPromise().then((response) => {
+                  //   this.weighingList.warehouseId = this.cangid;
+                  //   this.weighingList.skinInspector = localStorage.getItem('ws-pf_staffName')
+                  //   tare(this.weighingList)
+                  //     .toPromise()
+                  //     .then((response) => {
+                  //       console.log(1111)
+                  //       // if (this.reader) {
+                  //       //   this.reader.cancel()
+                  //       // }
+                  //       this.$notify.success({
+                  //         title: '成功',
+                  //         message: '保存成功',
+                  //       })
+                  //       this.idPrint = response
+                  //       if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this
+                  //           .warehouseName == '哈尔滨依兰库' || this
+                  //           .warehouseName == '白城内陆港')) {
+                  //         if (this.weighingList.seller && this.weighingList.buyer) {
+                  //           let cang = {}
+                  //           cang.value = this.weighingList.seller
+                  //           cang.label = this.weighingList.seller
+                  //           if (this.check(this.weighingList.seller, 1)) {
+                  //             this.ewCustomerOptions.push(cang)
+                  //           }
+                  //           let cang1 = {}
+                  //           cang1.value = this.weighingList.buyer
+                  //           cang1.label = this.weighingList.buyer
+                  //           if (this.check(this.weighingList.buyer, 2)) {
+                  //             this.companyNameEWOptions.push(cang1)
+                  //           }
+                  //         }
+                  //       }
+                  //       this.isShowPrintType = true
+                  //       this.getList()
+                  //     })
+                  //     .catch((response) => {})
+                  // })
+
                 })
-              } else {
+              } else { //收购入库皮检
                 tare(this.weighingList)
                   .toPromise()
                   .then((response) => {
-                    console.log(1111)
                     // if (this.reader) {
                     //   this.reader.cancel()
                     // }
@@ -1692,11 +1802,10 @@
                     }
                     this.isShowPrintType = true
                     this.getList()
-                  
                   })
                   .catch((response) => {})
               }
-              
+
             }
           })
           .catch(() => {
@@ -1710,28 +1819,36 @@
   /deep/.el-pagination {
     margin-bottom: 0;
   }
-.stocks{
-  position: relative;
-   /deep/.el-select{
-     width: 30.33%;
-   }
-  /deep/.el-select>.el-input {
-    display: inline-block;
-}
-/deep/>.el-input{
-  width:29.3333%;
-}
-.add,.del{
-  position:absolute;
-  right:16px;
-  transform: translateY(20%);
-  width:20px;
-  height:20px;
-}
-.del{
-  right:-7px;
-}
-}
+
+  .stocks {
+    position: relative;
+
+    /deep/.el-select {
+      width: 30.33%;
+    }
+
+    /deep/.el-select>.el-input {
+      display: inline-block;
+    }
+
+    /deep/>.el-input {
+      width: 29.3333%;
+    }
+
+    .add,
+    .del {
+      position: absolute;
+      right: 16px;
+      transform: translateY(20%);
+      width: 20px;
+      height: 20px;
+    }
+
+    .del {
+      right: -7px;
+    }
+  }
+
   .center {
     background: #E8ECF6;
   }

+ 2 - 2
src/views/houseSelfCollect/paymentManagement.vue

@@ -93,7 +93,7 @@
           <ws-button type="primary">导入</ws-button>
         </el-upload>
       </template>
-      <template slot="right"> </template>
+      <template slot="right"></template>
     </BaseHeaderLayout>
     <el-table :data="paymentList" ref="table" style="width: 100%; margin-top: 20px" border height="calc(100% - 170px)"
       @row-click="handleRowClick" @selection-change="handleSelectionChange" :summary-method="getSummaries" show-summary>
@@ -476,7 +476,7 @@
         goodsName:'全部',
       }
     },
-    mounted() {debugger
+    mounted() {
       this.userJurisdiction = getHp('acquisitionManagement.acquisitionPay.print')
 
       this.getPassYearFormatDate()

+ 26 - 4
src/views/houseSelfCollect/weightCheckRecord.vue

@@ -68,11 +68,11 @@
         <el-table-column prop="secretaryWeigher" label="司称员"></el-table-column>
         <el-table-column prop="grossDate" label="检斤时间"></el-table-column>
         <el-table-column prop="status" label="状态"></el-table-column>
-        <el-table-column label="操作">
+        <el-table-column label="操作" min-width="170">
           <template scope="scope">
             <!-- <el-button size="small" @click="print(scope.row)">打印</el-button> -->
-            <el-button @click="print(scope.row)" v-if="scope.row.status == '已称皮重' || scope.row.status == '已称毛重'"
-              v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button>
+            <el-button @click="print(scope.row)" v-if="scope.row.status == '已称皮重' || scope.row.status == '已称毛重'" v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button>
+            <el-button @click="backInfo(scope.row)" v-if="scope.row.status == '已称皮重'">退回</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -147,7 +147,8 @@
   import {
     selectWarehouseSelf,
     getweighingList,
-    getPrint
+    getPrint,
+    returnInfo
   } from '@/model/houseSelfCollect/index'
   import weightCheckPrint from './component/weightCheckPrint.vue'
   export default {
@@ -282,6 +283,27 @@
       this.getList()
     },
     methods: {
+       backInfo(row){
+           this.$confirm('确定要退回该信息?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+              returnInfo(row)
+            .toPromise()
+            .then((response) => {
+               this.$notify.success({
+                    title: '成功',
+                    message: '退回成功!',
+                })
+                this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+          })
+      },
       typePrintCannelClick() {
         this.onePrint = false //单个打印标识
         this.dialogDataList = [] //打个打印取消时数组至空

+ 285 - 266
src/views/outboundManagement/weighingManagementNew.vue

@@ -83,10 +83,10 @@
                         <ws-input v-else v-model="weighingList.inOutTaskNo" placeholder="自动获取,不可编辑" maxlength="100"
                           disabled size="small" />
                       </ws-form-item>
-                      <ws-form-item label="业务编号" span="1" prop="number">
+                      <!-- <ws-form-item label="业务编号" span="1" prop="number">
                         <ws-input v-model="weighingList.number" placeholder="自动获取,不可编辑" maxlength="100" disabled
                           size="small" />
-                      </ws-form-item>
+                      </ws-form-item> -->
                       <ws-form-item label="合同编号" span="1" prop="contractNo" v-show="inWarehouseType == 1"
                         v-if="weighingList.contractNo && tpyeNo == 1">
                         <ws-input v-model="weighingList.contractNo" placeholder="自动获取,不可编辑" maxlength="100" disabled
@@ -140,8 +140,8 @@
                       weighingList.outType == '汽运' ||
                       weighingList.outType == '集装箱船'
                     ">
-                        <ws-input v-if="!carstatus || carjudge"  v-model="weighingList.carNo"
-                          placeholder="请输入车牌号" maxlength="7" size="small" />
+                        <ws-input v-if="!carstatus || carjudge" v-model="weighingList.carNo" placeholder="请输入车牌号"
+                          maxlength="7" size="small" />
                         <el-select v-else filterable clearable v-model="weighingList.carNo" placeholder="请选择车牌号"
                           class="typeselect" @change="carChange">
                           <el-option v-for="item in options2" :key="item.constKey"
@@ -153,38 +153,33 @@
                       weighingList.outType == '汽运' ||
                       weighingList.outType == '集装箱船'
                     ">
-                        <ws-input  v-model="weighingList.boxNo" placeholder="请输入箱号"
-                          maxlength="20" size="small" />
+                        <ws-input v-model="weighingList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
                       </ws-form-item>
                       <ws-form-item label="封号-1" span="1" prop="titleNo" v-if="
                       weighingList.outType == '汽运' ||
                       weighingList.outType == '集装箱船'
                     ">
-                        <ws-input  v-model="weighingList.titleNo" placeholder="请输入封号"
-                          maxlength="20" size="small" />
+                        <ws-input v-model="weighingList.titleNo" placeholder="请输入封号" maxlength="20" size="small" />
                       </ws-form-item>
                       <ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="
                       weighingList.outType == '汽运' ||
                       weighingList.outType == '集装箱船'
                     ">
-                        <ws-input  v-model="weighingList.boxNoOther" placeholder="请输入箱号"
-                          maxlength="20" size="small" />
+                        <ws-input v-model="weighingList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" />
                       </ws-form-item>
-                      
+
                       <ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="
                       weighingList.outType == '汽运' ||
                       weighingList.outType == '集装箱船'
                     ">
-                        <ws-input  v-model="weighingList.titleNoOther" placeholder="请输入封号"
-                          maxlength="20" size="small" />
+                        <ws-input v-model="weighingList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" />
                       </ws-form-item>
                       <ws-form-item label="车厢号-1" span="1" prop="wingNumber" v-if="weighingList.outType == '火运'">
-                        <ws-input  v-model="weighingList.wingNumber" placeholder="请输入车厢号"
-                          maxlength="20" size="small" />
+                        <ws-input v-model="weighingList.wingNumber" placeholder="请输入车厢号" maxlength="20" size="small" />
                       </ws-form-item>
                       <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther" v-if="weighingList.outType == '火运'">
-                        <ws-input  v-model="weighingList.wingNumberOther" placeholder="请输入车厢号"
-                          maxlength="20" size="small" />
+                        <ws-input v-model="weighingList.wingNumberOther" placeholder="请输入车厢号" maxlength="20"
+                          size="small" />
                       </ws-form-item>
                       <ws-form-item label="船名" span="1" prop="shipName" v-if="weighingList.outType == '散船'">
                         <ws-input v-model="weighingList.shipName" placeholder="请输入船名" maxlength="20" size="small" />
@@ -295,12 +290,10 @@
           </el-col>
         </el-row>
       </div>
-
-
     </div>
-
-    <el-dialog width="70%" class="title_css" center :visible.sync="isShowPrint" title="出库检斤单" @opened="opendBtn"
-      @close="closeDialog" :close-on-click-modal="false">
+    <!-- @opened="opendBtn" -->
+    <el-dialog width="70%" class="title_css" center :visible.sync="isShowPrint" title="出库检斤单" @close="closeDialog"
+      :close-on-click-modal="false">
       <weightCheckPrint :tableData="inspect" ref="saveImg"></weightCheckPrint>
       <div style="text-align: center">
         <el-button type="primary" @click="closePrint">关闭</el-button>
@@ -321,6 +314,7 @@
     getweighingList,
     selectWarehouseSelf,
     delelteWeighing,
+    newSubmit
   } from '@/model/outboundManagement/index'
   import {
     pullDown,
@@ -366,7 +360,11 @@
         monitorUrl2: '',
         index: 0,
         inspect: {},
-        stocks:[{warehouseName:'',weight:'',cost:''}],
+        stocks: [{
+          warehouseName: '',
+          weight: '',
+          cost: ''
+        }],
         id: 0,
         options2: [],
         isSelectType: false,
@@ -464,11 +462,14 @@
     },
     activated() {},
     methods: {
-      addstocks(index){
-       this.stocks.push({warehouseName:'',cost:''})
+      addstocks(index) {
+        this.stocks.push({
+          warehouseName: '',
+          cost: ''
+        })
       },
-      delstocks(index){
-        this.stocks.splice(index,1)
+      delstocks(index) {
+        this.stocks.splice(index, 1)
       },
       refreshClick(type) {
         let that = this
@@ -481,7 +482,7 @@
               warehouseName: that.warehouseName,
               managementType: 3,
               statusType: that.statusType,
-               // loadingstatus: 1,
+              // loadingstatus: 1,
             })
             .toPromise()
             .then((response) => {
@@ -522,7 +523,7 @@
                   warehouseName: that.warehouseName,
                   managementType: 3,
                   statusType: that.statusType,
-                   loadingstatus: 1,
+                  loadingstatus: 1,
                 })
                 .toPromise()
                 .then((response) => {
@@ -976,12 +977,12 @@
           }
         }
         if (!this.weighingList.binNumber) {
-            this.$message({
-              message: '仓位号不能为空',
-              type: 'warning',
-            })
-            return
-          }
+          this.$message({
+            message: '仓位号不能为空',
+            type: 'warning',
+          })
+          return
+        }
         if (this.tpyeNo == 1) {
           if (!this.weighingList.tare) {
             this.$message({
@@ -1048,17 +1049,16 @@
           .then(() => {
             this.weighingList.inOutFlag = 1
             this.weighingList.statusFlag = 3
-            if (this.weighingList.grossWeight) {
-              this.weighingList.grossWeight = this.weighingList.grossWeight / 1000
-            }
-
-            if (this.weighingList.netWeight) {
-              this.weighingList.netWeight = this.weighingList.netWeight / 1000
-            }
-            this.weighingList.tare = this.weighingList.tare / 1000
-            if (this.weighingList.buckleMiscellaneous) {
-              this.weighingList.buckleMiscellaneous = this.weighingList.buckleMiscellaneous / 1000
-            }
+            // if (this.weighingList.grossWeight) {
+            //   this.weighingList.grossWeight = this.weighingList.grossWeight / 1000
+            // }
+            // if (this.weighingList.netWeight) {
+            //   this.weighingList.netWeight = this.weighingList.netWeight / 1000
+            // }
+            // this.weighingList.tare = this.weighingList.tare / 1000
+            // if (this.weighingList.buckleMiscellaneous) {
+            //   this.weighingList.buckleMiscellaneous = this.weighingList.buckleMiscellaneous / 1000
+            // }
             if (this.tpyeNo == 1) {
               //  this.weighingList.serviceManagementType=2
               this.weighingList.statusFlag = 1
@@ -1067,106 +1067,88 @@
               this.weighingList.baseId = this.warehouseId
               this.weighingList.skinInspector =
                 localStorage.getItem('ws-pf_staffName')
-              if (this.weighingList.id) { 
-                var weighingList1 =  JSON.parse(JSON.stringify(this.weighingList))//为了解除双向绑定问题,不影响this.weighingList的数据
+              if (this.weighingList.id) { //修改皮重
+                var weighingList1 = JSON.parse(JSON.stringify(this.weighingList)) //为了解除双向绑定问题,不影响this.weighingList的数据
                 weighingList1.id = this.weighingList.warehouseInOutId
                 weighingList1.warehouseInOutDetail.id = this.weighingList.inOutDetailId
-                addstorageputList(weighingList1)
+                weighingList1.weighingManagement = this.weighingList
+                if (weighingList1.tare) {//为了解决出入库与检斤单位不一致(出入库单位吨,检斤公斤)
+                  weighingList1.tare = weighingList1.tare / 1000
+                }
+                if (weighingList1.netWeight) {
+                  weighingList1.netWeight = weighingList1.netWeight / 1000
+                }
+                newSubmit(weighingList1)
                   .toPromise()
                   .then((response) => {
-                    this.weighingList.tare = this.weighingList.tare * 1000
-                    this.weighingList.warehouseInOutId = response
-                    tareEdit(this.weighingList)
-                      .toPromise()
-                      .then((response) => {
-                        getweighing({
-                            id: this.weighingList.id
-                          })
-                          .toPromise().then((response) => {
-                            if (this.reader) {
-                              this.reader.cancel()
-                            }
-                            this.$notify({
-                              title: '成功',
-                              message: '提交成功',
-                              type: 'success',
-                            })
-                            this.getList()
-                            this.weighingList = response
-                            this.warehouseCount = Number(this.warehouseCount) + 1
-                            this.warehouseCount1 = Number(this.warehouseCount1) + 1
-                            this.inspect = JSON.parse(
-                              JSON.stringify(this.weighingLis)
-                            )
-                            this.isShowPrint = true
-                            this.weighingList = {
-                              grossWeight: 0,
-                              tare: 0,
-                              tips: '',
-                              // contractNo:'',
-                              // inOutTaskNo:'',
-                              buckleMiscellaneous: 0,
-                              netWeight: 0,
-                              receivableWeighingFee: '',
-                              warehouseInOutDetail: {
-                                grade: '',
-                                imperfectGrain: '',
-                                impurity: '',
-                                jiaorenli: '',
-                                bulkDensity: '',
-                                mildewGrain: '',
-                              },
-                              qualityInspectionManagement: {
-                                boxNo: '暂无',
-                                boxNoOther: '暂无',
-                                titleNo: '暂无',
-                                titleNoOther: '暂无',
-                              },
-                            }
-                          })
+                    getweighing({
+                        id: this.weighingList.id
+                      })
+                      .toPromise().then((response) => {
+                        if (this.reader) {
+                          this.reader.cancel()
+                        }
+                        this.$notify({
+                          title: '成功',
+                          message: '提交成功',
+                          type: 'success',
+                        })
+                        this.getList()
+                        this.weighingList = response
+                        // this.warehouseCount = Number(this.warehouseCount) + 1
+                        // this.warehouseCount1 = Number(this.warehouseCount1) + 1
+                        this.inspect = JSON.parse(
+                          JSON.stringify(this.weighingList)
+                        )
+                        this.isShowPrint = true
+                        this.weighingList = {
+                          grossWeight: 0,
+                          tare: 0,
+                          tips: '',
+                          // contractNo:'',
+                          // inOutTaskNo:'',
+                          buckleMiscellaneous: 0,
+                          netWeight: 0,
+                          receivableWeighingFee: '',
+                          warehouseInOutDetail: {
+                            grade: '',
+                            imperfectGrain: '',
+                            impurity: '',
+                            jiaorenli: '',
+                            bulkDensity: '',
+                            mildewGrain: '',
+                          },
+                          qualityInspectionManagement: {
+                            boxNo: '暂无',
+                            boxNoOther: '暂无',
+                            titleNo: '暂无',
+                            titleNoOther: '暂无',
+                          },
+                        }
                       })
                   })
-                  .catch((response) => {
-                    this.$notify.warning(response)
-                    if (this.weighingList.grossWeight) {
-                      this.weighingList.grossWeight = this.weighingList.grossWeight * 1000
-                    }
-
-                    if (this.weighingList.netWeight) {
-                      this.weighingList.netWeight = this.weighingList.netWeight * 1000
-                    }
-                    this.weighingList.tare = this.weighingList.tare * 1000
-                  })
-              } else {
+              } else { //新增皮检信息
                 this.weighingList.relationId = this.relationId
                 this.weighingList.warehouseId = this.warehouseId
                 this.weighingList.baseId = this.warehouseId
-                var weighingList1 =  JSON.parse(JSON.stringify(this.weighingList))//为了解除双向绑定问题,不影响this.weighingList的数据
+                this.weighingList.warehouseNo = this.warehouseNo
+                var weighingList1 = JSON.parse(JSON.stringify(this.weighingList)) //为了解除双向绑定问题,不影响this.weighingList的数据
                 weighingList1.id = this.weighingList.warehouseInOutId
                 weighingList1.warehouseInOutDetail.id = this.weighingList.inOutDetailId
-                console.log(weighingList1)
-                addstorageputList(weighingList1)
+                weighingList1.weighingManagement = this.weighingList
+                if (weighingList1.tare) {//为了解决出入库与检斤单位不一致(出入库单位吨,检斤公斤)
+                  weighingList1.tare = weighingList1.tare / 1000
+                }
+                if (weighingList1.netWeight) {
+                  weighingList1.netWeight = weighingList1.netWeight / 1000
+                }
+                newSubmit(weighingList1)
                   .toPromise()
                   .then((response) => {
-                    this.weighingList.tare = this.weighingList.tare * 1000
-                    this.weighingList.warehouseInOutId = response
-                    tareAdd(this.weighingList)
-                      .toPromise()
-                      .then((response) => {
-                        getweighing({
-                            id: response
-                          })
-                          .toPromise()
-                          .then((response) => {
-                            this.weighingList = response
-                            this.warehouseCount = Number(this.warehouseCount) + 1
-                            this.warehouseCount1 = Number(this.warehouseCount1) + 1
-                            this.inspect = JSON.parse(
-                              JSON.stringify(this.weighingList)
-                            )
-                            this.isShowPrint = true
-                          })
-
+                    getweighing({
+                        id: response
+                      })
+                      .toPromise().then((response) => {
                         if (this.reader) {
                           this.reader.cancel()
                         }
@@ -1176,6 +1158,13 @@
                           type: 'success',
                         })
                         this.getList()
+                        this.weighingList = response
+                        // this.warehouseCount = Number(this.warehouseCount) + 1
+                        // this.warehouseCount1 = Number(this.warehouseCount1) + 1
+                        this.inspect = JSON.parse(
+                          JSON.stringify(this.weighingList)
+                        )
+                        this.isShowPrint = true
                         this.weighingList = {
                           grossWeight: 0,
                           tare: 0,
@@ -1200,125 +1189,152 @@
                             titleNoOther: '暂无',
                           },
                         }
-                        // 	if (this.reader) {
-                        // 		this.reader.cancel()
-                        // 	}
-                        // 	this.$notify.success({
-                        // 	title: '成功',
-                        // 	message: '提交成功',
-                        // })
-                        // 	this.isShowPrint=true
-                        // 	this.weighingList.grossWeight=this.weighingList.grossWeight*1000
-                        // 	this.weighingList.tare=this.weighingList.tare*1000
-                        // 	this.weighingList.netWeight=this.weighingList.netWeight*1000
-                        // 	this.weighingList.buckleMiscellaneous=this.weighingList.buckleMiscellaneous*1000
-                        // 	this.inspect=JSON.parse(JSON.stringify(this.weighingList))
-                        // 	this.weighingList= {
-                        // 		grossWeight: 0,
-                        // 		tare: 0,
-                        // 		tips:'',
-                        // 			// contractNo:'',
-                        // 			// inOutTaskNo:'',
-                        // 		buckleMiscellaneous: 0,
-                        // 		netWeight: 0,
-                        // 		receivableWeighingFee: '',
-                        // 		warehouseInOutDetail: {
-                        // 			grade:'',
-                        // 			imperfectGrain:'',
-                        // 			impurity:'',
-                        // 			jiaorenli:'',
-                        // 			bulkDensity:'',
-                        // 			mildewGrain:'',
-                        // 		},
-                        // 		qualityInspectionManagement: {
-                        // 			boxNo: "暂无",
-                        // 			boxNoOther: "暂无",
-                        // 			titleNo: "暂无",
-                        // 			titleNoOther: "暂无",
-                        // 		}
-                        // 	}
                       })
                   })
-                  .catch((response) => {})
               }
             } else if (this.tpyeNo == 2) {
               this.weighingList.secretaryWeigher =
                 localStorage.getItem('ws-pf_staffName')
               this.weighingList.warehouseId = this.warehouseId
               this.weighingList.baseId = this.warehouseId
-              var weighingList1 =  JSON.parse(JSON.stringify(this.weighingList))//为了解除双向绑定问题,不影响this.weighingList的数据
+              var weighingList1 = JSON.parse(JSON.stringify(this.weighingList)) //为了解除双向绑定问题,不影响this.weighingList的数据
               weighingList1.id = this.weighingList.warehouseInOutId
               weighingList1.warehouseInOutDetail.id = this.weighingList.inOutDetailId
-              console.log(weighingList1)
-              addstorageputList(weighingList1)
+              weighingList1.weighingManagement = this.weighingList
+              if (weighingList1.grossWeight) {//为了解决出入库与检斤单位不一致(出入库单位吨,检斤公斤)
+                weighingList1.grossWeight = weighingList1.grossWeight / 1000
+              }
+              if (weighingList1.netWeight) {
+                weighingList1.netWeight = weighingList1.netWeight / 1000
+              }
+              if (weighingList1.tare) {
+                weighingList1.tare = weighingList1.tare / 1000
+              }
+              newSubmit(weighingList1)
                 .toPromise()
                 .then((response) => {
-                  this.weighingList.grossWeight =
-                    this.weighingList.grossWeight * 1000
-                  this.weighingList.tare = this.weighingList.tare * 1000
-                  this.weighingList.netWeight =
-                    this.weighingList.netWeight * 1000
-                  this.weighingList.buckleMiscellaneous =
-                    this.weighingList.buckleMiscellaneous * 1000
-                  this.weighingList.warehouseInOutId = response
-                  grossWeight(this.weighingList)
-                    .toPromise()
-                    .then((response) => {
-                      getweighing({
-                          id: response
-                        })
-                        .toPromise()
-                        .then((response) => {
-                          this.weighingList = response
-                          this.inspect = JSON.parse(
-                            JSON.stringify(this.weighingList)
-                          )
-                          this.isShowPrint = true
-                        })
-                      if (this.reader) {
-                        this.reader.cancel()
-                      }
-                      // 	this.$notify.success({
-                      // 	title: '成功',
-                      // 	message: '提交成功',
-                      // })
-                      this.$notify({
-                        title: '成功',
-                        message: '提交成功',
-                        type: 'success',
-                      })
-                      this.inspect = JSON.parse(JSON.stringify(this.weighingList))
-
+                  getweighing({
+                      id: response
+                    })
+                    .toPromise().then((response) => {
+                      this.weighingList = response
+                      this.inspect = JSON.parse(
+                        JSON.stringify(this.weighingList)
+                      )
                       this.isShowPrint = true
-                      this.weighingList = {
-                        grossWeight: 0,
-                        selfLoading: 0,
-                        tare: 0,
-                        tips: '',
-                        // contractNo:'',
-                        // inOutTaskNo:'',
-                        buckleMiscellaneous: 0,
-                        netWeight: 0,
-                        receivableWeighingFee: '',
-                        warehouseInOutDetail: {
-                          grade: '',
-                          imperfectGrain: '',
-                          impurity: '',
-                          jiaorenli: '',
-                          bulkDensity: '',
-                          mildewGrain: '',
-                        },
-                        qualityInspectionManagement: {
-                          boxNo: '暂无',
-                          boxNoOther: '暂无',
-                          titleNo: '暂无',
-                          titleNoOther: '暂无',
-                        },
-                      }
-                      this.getList()
+
                     })
+                  if (this.reader) {
+                    this.reader.cancel()
+                  }
+                  // 	this.$notify.success({
+                  // 	title: '成功',
+                  // 	message: '提交成功',
+                  // })
+                  this.$notify({
+                    title: '成功',
+                    message: '提交成功',
+                    type: 'success',
+                  })
+                  this.inspect = JSON.parse(JSON.stringify(this.weighingList))
+
+                  this.isShowPrint = true
+                  this.weighingList = {
+                    grossWeight: 0,
+                    selfLoading: 0,
+                    tare: 0,
+                    tips: '',
+                    // contractNo:'',
+                    // inOutTaskNo:'',
+                    buckleMiscellaneous: 0,
+                    netWeight: 0,
+                    receivableWeighingFee: '',
+                    warehouseInOutDetail: {
+                      grade: '',
+                      imperfectGrain: '',
+                      impurity: '',
+                      jiaorenli: '',
+                      bulkDensity: '',
+                      mildewGrain: '',
+                    },
+                    qualityInspectionManagement: {
+                      boxNo: '暂无',
+                      boxNoOther: '暂无',
+                      titleNo: '暂无',
+                      titleNoOther: '暂无',
+                    },
+                  }
+                  this.getList()
                 })
-                .catch((response) => {})
+              // addstorageputList(weighingList1)
+              //   .toPromise()
+              //   .then((response) => {
+              //     this.weighingList.grossWeight =
+              //       this.weighingList.grossWeight * 1000
+              //     this.weighingList.tare = this.weighingList.tare * 1000
+              //     this.weighingList.netWeight =
+              //       this.weighingList.netWeight * 1000
+              //     this.weighingList.buckleMiscellaneous =
+              //       this.weighingList.buckleMiscellaneous * 1000
+              //     this.weighingList.warehouseInOutId = response
+              //     grossWeight(this.weighingList)
+              //       .toPromise()
+              //       .then((response) => {
+              //         getweighing({
+              //             id: response
+              //           })
+              //           .toPromise()
+              //           .then((response) => {
+              //             this.weighingList = response
+              //             this.inspect = JSON.parse(
+              //               JSON.stringify(this.weighingList)
+              //             )
+              //             this.isShowPrint = true
+              //           })
+              //         if (this.reader) {
+              //           this.reader.cancel()
+              //         }
+              //         // 	this.$notify.success({
+              //         // 	title: '成功',
+              //         // 	message: '提交成功',
+              //         // })
+              //         this.$notify({
+              //           title: '成功',
+              //           message: '提交成功',
+              //           type: 'success',
+              //         })
+              //         this.inspect = JSON.parse(JSON.stringify(this.weighingList))
+
+              //         this.isShowPrint = true
+              //         this.weighingList = {
+              //           grossWeight: 0,
+              //           selfLoading: 0,
+              //           tare: 0,
+              //           tips: '',
+              //           // contractNo:'',
+              //           // inOutTaskNo:'',
+              //           buckleMiscellaneous: 0,
+              //           netWeight: 0,
+              //           receivableWeighingFee: '',
+              //           warehouseInOutDetail: {
+              //             grade: '',
+              //             imperfectGrain: '',
+              //             impurity: '',
+              //             jiaorenli: '',
+              //             bulkDensity: '',
+              //             mildewGrain: '',
+              //           },
+              //           qualityInspectionManagement: {
+              //             boxNo: '暂无',
+              //             boxNoOther: '暂无',
+              //             titleNo: '暂无',
+              //             titleNoOther: '暂无',
+              //           },
+              //         }
+              //         this.getList()
+              //       })
+              //   })
+              //   .catch((response) => {})
             }
           })
           .catch(() => {
@@ -1605,15 +1621,14 @@
         return date.getFullYear() + mouth + day
       },
       contractNoChange(e) {
-        debugger
         this.warehouseCount = this.warehouseCount1
         for (let i = 0; i < this.taskNolist.length; i++) {
           if (this.taskNolist[i].inOutTaskNo == e) {
             //  this.weighingList.number = this.taskNolist[i].inOutTaskNo
-              // this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
-              // this.weighingList.number = 'XSCK' + this.getTime() +  this.warehouseNo + this.warehouseCount.substring(this.warehouseCount.length - 4)
-             this.weighingList.goodsName = this.taskNolist[i].goodsName
-             this.weighingList.tips = this.taskNolist[i].businessDescribe
+            // this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
+            this.weighingList.numberLetter = 'XSCK'
+            this.weighingList.goodsName = this.taskNolist[i].goodsName
+            this.weighingList.tips = this.taskNolist[i].businessDescribe
             var data = this.taskNolist[i]
             if (this.taskNolist[i].contractNo) {
               // console.log(this.taskNolist[i])
@@ -1637,7 +1652,7 @@
             this.weighingList.inOutType = this.outContractNo[i].inOutType
             if (this.outContractNo[i].inOutType == '销售出库') {
               this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
-              this.weighingList.number = 'XSCK' + this.getTime() +  this.warehouseNo + this.warehouseCount.substring(this.warehouseCount.length - 4)
+              this.weighingList.numberLetter = 'XSCK'
               this.weighingList.buyer = this.outContractNo[i].buyer
               this.weighingList.seller = localStorage.getItem('ws-pf_compName')
               if (!this.outContractNo[i].unitContractPrice) {
@@ -1653,11 +1668,8 @@
               this.weighingList.inOutTypeKey = 1
             } else if (this.outContractNo[i].inOutType == '移库出库') {
               this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
-              this.weighingList.number =
-                'YKCK' +
-                this.getTime() +
-                this.warehouseNo +
-                this.warehouseCount.substring(this.warehouseCount.length - 4)
+              this.weighingList.numberLetter = 'YKCK'
+
               this.weighingList.buyer = this.outContractNo[i].receiveWarehouse
               this.weighingList.seller = this.outContractNo[i].sendWarehouse
               this.weighingList.goodsName = data.goodsName
@@ -1775,7 +1787,7 @@
           .then((response) => {
             this.outContractNo = response
           })
-          // this.refreshClick(1)
+        // this.refreshClick(1)
         getweighingList({
             compId: localStorage.getItem('ws-pf_compId'),
             currentPage: this.currentPage,
@@ -1960,23 +1972,30 @@
     text-align: center;
     margin: 20px auto;
   }
-.stocks{
-  position: relative;
-  /deep/.el-select>.el-input {
-    display: inline-block;
-}
-/deep/>.el-input{
-  width:33.3333%;
-}
-.add,.del{
-  position:absolute;
-  right:-16px;
-  transform: translateY(20%);
-}
-.del{
-  right:-40px;
-}
-}
+
+  .stocks {
+    position: relative;
+
+    /deep/.el-select>.el-input {
+      display: inline-block;
+    }
+
+    /deep/>.el-input {
+      width: 33.3333%;
+    }
+
+    .add,
+    .del {
+      position: absolute;
+      right: -16px;
+      transform: translateY(20%);
+    }
+
+    .del {
+      right: -40px;
+    }
+  }
+
   .butCss {
     opacity: 0;
     color: #000;