Bläddra i källkod

仓储模块修改

wengyuwen 4 år sedan
förälder
incheckning
55446ac733

+ 64 - 24
src/views/agreement/agreementTask/index.vue

@@ -133,6 +133,17 @@
         >导出
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-download"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate(null,2)"
+          v-hasPermi="['agreement:agreementStorage:export']"
+        >复制新增
+        </el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
     <el-table v-loading="loading" :data="agreementList" @selection-change="handleSelectionChange">
@@ -446,6 +457,8 @@ export default {
   },
   data() {
     return {
+      addOrEdid:1,
+      idCopy:'',
       stop:false,
       lander:'',
       operator:'',
@@ -827,6 +840,7 @@ export default {
     },
     // 取消按钮
     cancel() {
+      this.idCopy = null
       this.reset()
       this.getList()
       this.open = false
@@ -892,6 +906,7 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.fId)
+      this.idCopy = this.ids[0]
       this.single = selection.length !== 1
       this.multiple = !selection.length
     },
@@ -944,30 +959,52 @@ export default {
       });
     },
     /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.stop = false
-      this.browseStatus = false
-      this.determine = false
-      this.reset()
-      this.cancelButton = true
-      const fId = row.fId || this.ids
-      getAgreement(fId).then(response => {
-        this.register()
-        this.deptName = response.data.dept.deptName
-        this.form = response.data.tWarehouseAgreement
-        this.$set(this.form, 'fTaskType', this.form.fTaskType + '')
-        this.$set(this.form, 'fEnddate', Date.parse(this.form.fEnddate))
-        this.$set(this.form, 'fBegindate', Date.parse(this.form.fBegindate))
-        this.operator = this.form.createBy
-        this.fMblnoOptions = response.data.corps
-        this.agreementitemsList = response.data.tWarehouseAgreementitems
-        for (let item in this.agreementitemsList) {
-          this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
-        }
-        this.fWbuOptions = response.data.feesList
-        this.open = true
-        this.title = '修改作业费'
-      })
+    handleUpdate(row,num) {
+      if(num === 2){
+        getAgreement(this.idCopy).then(response => {
+          this.register()
+          this.deptName = response.data.dept.deptName
+          this.form = response.data.tWarehouseAgreement
+          this.form.fId = null
+          this.form.fBillstatus = ''
+          this.$set(this.form, 'fTaskType', this.form.fTaskType + '')
+          this.$set(this.form, 'fEnddate', Date.parse(this.form.fEnddate))
+          this.$set(this.form, 'fBegindate', Date.parse(this.form.fBegindate))
+          this.operator = this.form.createBy
+          this.fMblnoOptions = response.data.corps
+          this.agreementitemsList = response.data.tWarehouseAgreementitems
+          for (let item in this.agreementitemsList) {
+            this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
+          }
+          this.fWbuOptions = response.data.feesList
+          this.open = true
+          this.title = '修改作业费'
+        })
+      }else{
+        this.stop = false
+        this.browseStatus = false
+        this.determine = false
+        this.reset()
+        this.cancelButton = true
+        const fId = row.fId || this.ids
+        getAgreement(fId).then(response => {
+          this.register()
+          this.deptName = response.data.dept.deptName
+          this.form = response.data.tWarehouseAgreement
+          this.$set(this.form, 'fTaskType', this.form.fTaskType + '')
+          this.$set(this.form, 'fEnddate', Date.parse(this.form.fEnddate))
+          this.$set(this.form, 'fBegindate', Date.parse(this.form.fBegindate))
+          this.operator = this.form.createBy
+          this.fMblnoOptions = response.data.corps
+          this.agreementitemsList = response.data.tWarehouseAgreementitems
+          for (let item in this.agreementitemsList) {
+            this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
+          }
+          this.fWbuOptions = response.data.feesList
+          this.open = true
+          this.title = '修改作业费'
+        })
+      }
     },
     /** 远程模糊查询用户 */
     corpsRemoteMethod(name) {
@@ -982,6 +1019,9 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
+      if(this.addOrEdid == 2){
+        this.$set(this.form, 'fId', null)
+      }
       this.$refs['form'].validate(valid => {
         if (valid) {
           let formData = new window.FormData()

+ 61 - 20
src/views/warehouseBusiness/agreement/index.vue

@@ -111,6 +111,17 @@
         >导出
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-download"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate(null,2)"
+          v-hasPermi="['agreement:agreementStorage:export']"
+        >复制新增
+        </el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -174,7 +185,7 @@
             size="mini"
             type="text"
             icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
+            @click="handleUpdate(scope.row,1)"
             v-hasPermi="['agreement:agreementStorage:edit']"
             v-if="scope.row.fBillstatus < 4"
           >修改
@@ -442,6 +453,8 @@ export default {
   },
   data() {
     return {
+      addOrEdid:1,
+      idCopy:'',
       colseButton:true,
       cancelButton:true,
       // 审批状态
@@ -561,6 +574,12 @@ export default {
     this.Jump()
   },
   methods: {
+    //复制新增按钮
+    handleCopy(){
+      getAgreement().then(response => {
+
+      })
+    },
     homepaGe(){
       let view = {
         fullPath: "/agreement/agreementStorage",
@@ -948,6 +967,7 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.fId)
+      this.idCopy = this.ids[0]
       this.single = selection.length !== 1
       this.multiple = !selection.length
     },
@@ -977,25 +997,43 @@ export default {
       })
     },
     /** 修改按钮操作 */
-    handleUpdate(row) {
-      // this.reset()
-      this.notChange = false
-      this.browseStatus = false
-      const fId = row.fId || this.ids
-      getAgreement(fId).then(response => {
-        this.deptName = response.data.dept.deptName
-        this.form = response.data.tWarehouseAgreement
-        this.fMblnoOptions = response.data.corps
-        this.agreementitemsList = response.data.tWarehouseAgreementitems
-        for (let item in this.agreementitemsList) {
-          this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
-          // this.fWRemoteMethod(this.agreementitemsList[item].fFeeid)
-        }
-        this.fWbuOptions = response.data.feesList
-        this.add = row
-        this.open = true
-        this.title = '修改仓储费'
-      })
+    handleUpdate(row,num) {
+      if (num === 2){
+        getAgreement(this.idCopy).then(response => {
+          this.deptName = response.data.dept.deptName
+          this.form = response.data.tWarehouseAgreement
+          this.form.fId = null
+          this.form.fBillstatus = ''
+          this.fMblnoOptions = response.data.corps
+          this.agreementitemsList = response.data.tWarehouseAgreementitems
+          for (let item in this.agreementitemsList) {
+            this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
+            // this.fWRemoteMethod(this.agreementitemsList[item].fFeeid)
+          }
+          this.fWbuOptions = response.data.feesList
+          this.add = row
+          this.open = true
+          this.title = '新增仓储费'
+        })
+      }else {
+        this.notChange = false
+        this.browseStatus = false
+        const fId = row.fId || this.ids
+        getAgreement(fId).then(response => {
+          this.deptName = response.data.dept.deptName
+          this.form = response.data.tWarehouseAgreement
+          this.fMblnoOptions = response.data.corps
+          this.agreementitemsList = response.data.tWarehouseAgreementitems
+          for (let item in this.agreementitemsList) {
+            this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
+            // this.fWRemoteMethod(this.agreementitemsList[item].fFeeid)
+          }
+          this.fWbuOptions = response.data.feesList
+          this.add = row
+          this.open = true
+          this.title = '修改仓储费'
+        })
+      }
     },
     /** 远程模糊查询用户 */
     corpsRemoteMethod(name) {
@@ -1021,6 +1059,9 @@ export default {
     },
     /** 保存按钮 */
     submitForm() {
+      if(this.addOrEdid == 2){
+        this.$set(this.form, 'fId', null)
+      }
       this.$refs['form'].validate(valid => {
         if (valid) {
           let formData = new window.FormData()

+ 67 - 15
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -639,22 +639,36 @@
         @selection-change="Selectinventory"
         show-summary
       >
-        <el-table-column type="selection" width="55" align="center"/>
-        <el-table-column label="序号" type="index" width="80">
+        <el-table-column type="selection" width="55" fixed align="center"/>
+        <el-table-column label="序号" type="index" fixed width="80">
         </el-table-column>
         <el-table-column
           prop="fGoodsids"
           header-align="center"
           align="center"
+          fixed
           width="140px"
           label="品名"
         >
         </el-table-column>
-
+        <el-table-column
+          prop="fBillstatus"
+          header-align="center"
+          width="150px"
+          fixed
+          align="center"
+          label="状态"
+        >
+          <template slot-scope="scope">
+            <span v-if="scope.row.fBillstatus === 6">货转</span>
+            <span v-else>录入</span>
+          </template>
+        </el-table-column>
         <el-table-column
           prop="fBsdate"
           header-align="center"
           align="center"
+          fixed
           width="150px"
           label="货转日期"
         >
@@ -882,18 +896,7 @@
             />
           </template>
         </el-table-column>
-        <el-table-column
-          prop="fBillstatus"
-          header-align="center"
-          width="150px"
-          align="center"
-          label="状态"
-        >
-          <template slot-scope="scope">
-            <span v-if="scope.row.fBillstatus === 6">货转</span>
-            <span v-else>录入</span>
-          </template>
-        </el-table-column>
+
         <el-table-column
           header-align="center"
           align="center"
@@ -2780,6 +2783,50 @@
                 }
               }
               this.formBrowseStatus = true
+              this.$refs['form'].validate((valid) => {
+                if (this.form.fCorpid === this.form.fTocorpid) {
+                  this.$message.error('新货权方不得与货权方一致')
+                  return false
+                }
+                // if (this.dataList.length === 0) {
+                //   this.$message.error('请添加库存明细!')
+                //   return false
+                // }
+                this.updateDeduplication()
+                for (let list in this.dataList) {
+                  if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
+                    this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转件数!')
+                    return false
+                  }
+                  if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
+                    this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转毛重(kg)!')
+                    return false
+                  }
+                }
+                if (valid) {
+                  this.form.fBillstatus = 2
+                  let formData = new window.FormData()
+                  formData.append("warehouseBills", JSON.stringify(this.form));
+                  formData.append("warehousebillsitems", JSON.stringify(this.dataList));
+                  formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+                  formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+                  formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
+                  addGoodsTransfer(formData).then((response) => {
+                    this.form = response.data.warehouseBills
+                    this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
+                    this.$set(this.form, 'fFeetunit',this.form.fFeetunit + '')
+                    this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
+                    this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
+                    this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
+                    this.dataList = response.data.warehousebillsitems
+                    for (let li in this.dataList) {
+                      this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
+                      this.$set(this.dataList[li], 'fBusinessType', this.dataList[li].fBusinessType + '')
+                    }
+                  })
+                }
+              })
+
             })
           }
         })
@@ -3235,4 +3282,9 @@
   .el-icon-s-home,.el-icon-s-order,.el-icon-circle-plus,.el-icon-remove{
     padding-right: 5px;
   }
+  .el-table {
+    .el-table__body-wrapper {
+      z-index: 2;
+    }
+  }
 </style>

+ 135 - 8
src/views/warehouseBusiness/inStock/index.vue

@@ -474,6 +474,7 @@
             <el-form-item label="业务时间" prop="fBstime">
               <el-time-picker
                 style="width: 80%"
+                :disabled="browseStatus || formBrowseStatus"
                 v-model="form.fBstime"
                 :picker-options="{
                 selectableRange: '00:00:01 - 23:59:59'
@@ -1021,7 +1022,7 @@
               <el-button  size="small" type="info" :disabled="browseStatus" prop="打印" @click="showEditDialog_sss"
               >作业单
               </el-button>
-              <el-button size="small" @click="discharge" :disabled="browseStatus">卸货完成</el-button>
+              <el-button size="small" @click="discharge" :disabled="browseStatus">叫车进场</el-button>
               <el-button
                 size="small"
                 :disabled="dataListSelection.length <= 0 || browseStatus"
@@ -1120,7 +1121,7 @@
               header-align="center"
               align="center"
               width="140px"
-              label="品名"
+              label="*品名"
             >
               <template slot-scope="scope">
                 <el-select
@@ -2785,7 +2786,7 @@
               class="zzss"
               v-else
             >
-              日期:{{ Printinglist[0].fOriginalbilldate }}
+              日期:{{ Printinglist[0].fOriginalbilldate }} {{ fBstime.slice(11,19) }}
             </td>
 
             <!-- <td
@@ -2868,7 +2869,7 @@
           <tr>
             <td
               width="900"
-              colspan="4"
+              colspan="2"
               class="zzss"
               style="font-size: 28px; font-weight: bold;"
             >
@@ -2881,6 +2882,10 @@
             >
               入库日期:{{ fBsdates }}
             </td>
+            <td v-if="!fBstime" colspan="2" style="padding-bottom: 0; font-weight: bold;">入库时间:</td>
+            <td v-else width="900" colspan="2" class="zzss" style="padding-bottom: 0; font-weight: bold;">
+              入库时间:{{ fBstime.slice(11,19) }}
+            </td>
           </tr>
 
 <!--          <tr v-for="(item, index) in Printinglist" :key="index">-->
@@ -3091,6 +3096,7 @@ export default {
         name:null
       },
       closeButton:true,
+      fBstime:'',
       //表单校验
       checkout: {
         fGoodsids:[
@@ -3285,7 +3291,7 @@ export default {
         fBusinessType:null,
         fItemsStatus: null,
         fFeetunit: '2',
-        fBstime:new Date()
+        fBstime:''
       },
       // 表单校验
       rules: {
@@ -3601,7 +3607,7 @@ export default {
     printSomething() {
       // 此处的style即为打印时的样式
       const style =
-        "@media print { .print-div{ border:none;padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
+        "@media print { .print-div{ border:none;padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center;border:1px solid #000}}";
       print({
         printable: "print_area3",
         type: "html",
@@ -3612,7 +3618,7 @@ export default {
     printSomething1() {
       // 此处的style即为打印时的样式
       const style =
-        "@media print { .print-div{ border:none;padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
+        "@media print { .print-div{ border:none;padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center;border:1px solid #000}}";
       print({
         printable: "print_area2",
         type: "html",
@@ -3742,6 +3748,7 @@ export default {
     showEditDialog_ss() {
       if (this.Printinglist.length > 0) {
         for (let li in this.Printinglist) {
+          console.log(this.Printinglist[li])
           if (this.dataListSelection.length > 0) {
             this.fTruckno = this.dataListSelection[0].fTruckno;
             this.fCntrtype = this.dataListSelection[0].fCntrtype;
@@ -3892,6 +3899,7 @@ export default {
           this.fBsdates = Y + M + D
         }
         this.editDialogVisible_sss = true
+        this.fBstime = this.form.fBstime
       } else {
         this.$message.error('请选择需要打印的明细!')
       }
@@ -4397,7 +4405,7 @@ export default {
       this.form = {
         fItemsStatus: null,
         fFeetunit:"2",
-        fBstime:new Date()
+        fBstime: new Date()
       }
       this.browseStatus = status;
       this.queryUser();
@@ -4509,6 +4517,7 @@ export default {
     // 库存总账多选框
     whgenlegSelectionChange(selection) {
       this.dialogWhgenlegList = selection;
+      console.log(selection)
     },
     // 合计
     getSummaries(param) {
@@ -4765,6 +4774,116 @@ export default {
               }
             }
             this.msgSuccess('入账成功')
+            this.$refs['form'].validate((valid) => {
+              if (valid) {
+                if(!this.dataList.length){
+                  this.form.fBillstatus = status
+                  this.form.fNetweight = this.fNetweight
+                  this.form.fPlanvolumn = this.fPlanvolumn
+                  this.form.fGrossweight = this.fGrossweight
+                  this.form.fQty = this.fQty
+                  // if (!this.form.fId) {
+                  //   this.form.fId = this.fid
+                  // }
+                  // if (!this.form.fBusinessType) {
+                  //   this.$message.error('请选择货物属性!')
+                  //   return false
+                  // }
+                  for (let list in this.dataList) {
+                    if (!this.dataList[list].fBusinessType) {
+                      this.$message.error('请输入库存明细的货物属性!')
+                      return false
+                    }
+                  }
+                  let formDatae = new window.FormData()
+                  // 附件数据
+                  this.form.fBillingway = this.form.fFeetunit
+                  // this.form.fBstime = JSON.stringify(this.form.fBstime)
+                  formDatae.append('tWarehouseBills', JSON.stringify(this.form))
+                  // 库存明细
+                  formDatae.append('tWarehousebillsitems', JSON.stringify(this.dataList))
+                  // 附件数据
+                  formDatae.append('tEnclosure', JSON.stringify(this.relevantAttachments))
+                  // 费用明细付款
+                  formDatae.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
+                  // 收款
+                  formDatae.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
+                  addWarehousebills(formDatae).then((response) => {
+                    this.form = response.data.warehouseBills
+                    this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
+                    this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
+                    this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
+                    this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
+                    this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
+                    this.dataList = response.data.warehousebillsitems
+                    for (let list in this.dataList) {
+                      this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
+                      this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+                    }
+                    this.fid = response.data.warehouseBills.fId
+                    this.getList()
+                  })
+                }else{
+                  for(let item in this.dataList){
+                    if(!this.dataList[item].fGoodsids){
+                      this.$message.error("请维护第"+ (Number(item)+1) +"行品名!")
+                      return false
+                    }
+                    if(!this.dataList[item].fMarks){
+                      this.$message.error("请维护第"+ (Number(item)+1) +"行货物属性!")
+                      return false
+                    }
+                  }
+                  this.form.fBillstatus = status
+                  this.form.fNetweight = this.fNetweight
+                  this.form.fPlanvolumn = this.fPlanvolumn
+                  this.form.fGrossweight = this.fGrossweight
+                  this.form.fQty = this.fQty
+                  // if (!this.form.fId) {
+                  //   this.form.fId = this.fid
+                  // }
+                  // if (!this.form.fBusinessType) {
+                  //   this.$message.error('请选择货物属性!')
+                  //   return false
+                  // }
+                  for (let list in this.dataList) {
+                    if (!this.dataList[list].fBusinessType) {
+                      this.$message.error('请输入库存明细的货物属性!')
+                      return false
+                    }
+                  }
+                  let formDatae = new window.FormData()
+                  // 附件数据
+                  this.form.fBillingway = this.form.fFeetunit
+                  formDatae.append('tWarehouseBills', JSON.stringify(this.form))
+                  // 库存明细
+                  formDatae.append('tWarehousebillsitems', JSON.stringify(this.dataList))
+                  // 附件数据
+                  formDatae.append('tEnclosure', JSON.stringify(this.relevantAttachments))
+                  // 费用明细付款
+                  formDatae.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
+                  // 收款
+                  formDatae.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
+                  addWarehousebills(formDatae).then((response) => {
+                    this.msgSuccess('保存成功')
+                    this.form = response.data.warehouseBills
+                    this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
+                    this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
+                    this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
+                    this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
+                    this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
+                    this.dataList = response.data.warehousebillsitems
+                    for (let list in this.dataList) {
+                      this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
+                      this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+                    }
+                    this.fid = response.data.warehouseBills.fId
+                    this.getList()
+                  })
+                }
+              }
+            })
+
             this.$refs.checkout.clearSelection()
             this.contrOl = true
           })
@@ -4933,6 +5052,7 @@ export default {
     },
     // 提交保存保存成功
     preservation() {
+      console.log(this.form.fBstime)
       this.$refs['form'].validate((valid) => {
         if (valid) {
           if(!this.dataList.length){
@@ -4957,6 +5077,7 @@ export default {
             let formDatae = new window.FormData()
             // 附件数据
             this.form.fBillingway = this.form.fFeetunit
+            // this.form.fBstime = JSON.stringify(this.form.fBstime)
             formDatae.append('tWarehouseBills', JSON.stringify(this.form))
             // 库存明细
             formDatae.append('tWarehousebillsitems', JSON.stringify(this.dataList))
@@ -5338,4 +5459,10 @@ export default {
 .el-icon-s-home,.el-icon-s-order,.el-icon-circle-plus,.el-icon-remove{
   padding-right: 5px;
 }
+
+.el-table {
+  .el-table__body-wrapper {
+    z-index: 2;
+  }
+}
 </style>

+ 106 - 33
src/views/warehouseBusiness/outStock/index.vue

@@ -455,6 +455,7 @@
             <el-form-item label="业务时间" prop="fBstime">
               <el-time-picker
                 style="width: 80%"
+                :disabled="browseStatus || formBrowseStatus"
                 v-model="form.fBstime"
                 :picker-options="{
                 selectableRange: '00:00:01 - 23:59:59'
@@ -464,8 +465,8 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="车辆类型" prop="fCartype">
-              <el-select style="width: 80%" v-model="form.fCartype">
+            <el-form-item label="车辆类型" prop="fCartype" >
+              <el-select style="width: 80%" v-model="form.fCartype":disabled="contrOl">
                 <el-option
                   v-for="(dict, index) in fCartypeOptions"
                   :key="index.dictValue"
@@ -908,7 +909,7 @@
             </div>
             <div style="display: flex">
               <el-button type="info" :disabled="printinglist.length <= 0 || browseStatus" prop="打印" @click="printJobSheet">作业单</el-button>
-              <el-button :disabled="printinglist.length <= 0 || browseStatus" @click="discharge">装货完成</el-button>
+              <el-button :disabled="printinglist.length <= 0 || browseStatus" @click="discharge">叫车进场</el-button>
               <el-button
                 :disabled="dataListSelection.length <= 0 || browseStatus"
                 @click.prevent="creditClick"
@@ -942,14 +943,38 @@
             @selection-change="selectinventory"
             show-summary
           >
-            <el-table-column type="selection" width="55" align="center" />
-            <el-table-column label="序号" type="index" width="80">
+            <el-table-column type="selection" width="55" fixed align="center" />
+            <el-table-column label="序号" type="index" fixed width="80">
             </el-table-column>
+            <el-table-column
+              prop="fBillstatus"
+              header-align="center"
+              width="150px"
+              fixed
+              align="center"
+              label="状态"
+            >
+              <template slot-scope="scope">
+              <span v-if="form.fBusinessType === '5'">
+                 <span v-if="scope.row.fBillstatus === 40">已装箱</span>
+                <span v-if="scope.row.fBillstatus === 20">待装箱</span>
+                <span v-if="scope.row.fBillstatus === 30">装箱中</span>
+                <span v-if="scope.row.fBillstatus === 10">计划</span>
+              </span>
 
+                <span v-if="form.fBusinessType !== '5'">
+                 <span v-if="scope.row.fBillstatus === 40">已出库</span>
+                <span v-if="scope.row.fBillstatus === 20">待出库</span>
+                <span v-if="scope.row.fBillstatus === 30">出库中</span>
+                <span v-if="scope.row.fBillstatus === 10">计划</span>
+              </span>
+              </template>
+            </el-table-column>
             <el-table-column
               prop="fBsdate"
               header-align="center"
               align="center"
+              fixed
               width="150px"
               label="出库日期"
             >
@@ -985,7 +1010,7 @@
               header-align="center"
               align="center"
               width="140px"
-              label="品名"
+              label="*品名"
             >
             </el-table-column>
             <el-table-column
@@ -1314,29 +1339,6 @@
               </template>
             </el-table-column>
             <el-table-column
-              prop="fBillstatus"
-              header-align="center"
-              width="150px"
-              align="center"
-              label="状态"
-            >
-              <template slot-scope="scope">
-              <span v-if="form.fBusinessType === '5'">
-                 <span v-if="scope.row.fBillstatus === 40">已装箱</span>
-                <span v-if="scope.row.fBillstatus === 20">待装箱</span>
-                <span v-if="scope.row.fBillstatus === 30">装箱中</span>
-                <span v-if="scope.row.fBillstatus === 10">计划</span>
-              </span>
-
-                <span v-if="form.fBusinessType !== '5'">
-                 <span v-if="scope.row.fBillstatus === 40">已出库</span>
-                <span v-if="scope.row.fBillstatus === 20">待出库</span>
-                <span v-if="scope.row.fBillstatus === 30">出库中</span>
-                <span v-if="scope.row.fBillstatus === 10">计划</span>
-              </span>
-              </template>
-            </el-table-column>
-            <el-table-column
               header-align="center"
               align="center"
               label="操作"
@@ -2645,10 +2647,10 @@
           <tr>
             <td
               width="900"
-              colspan="4"
+              colspan="2"
               class="zzss"
-              style="font-size: 28px; font-weight: bold"
-            >
+              style="padding-bottom: 0px; font-weight: bold;"
+            >车辆类型:{{ form.fCartype }}
             </td>
             <td
               width="500"
@@ -2658,6 +2660,16 @@
             >
               出库日期:{{ fBsdate }}
             </td>
+            <td v-if="!fBstime" colspan="2" style="padding-bottom: 0; font-weight: bold;">出库时间</td>
+            <td
+              v-else
+              width="500"
+              colspan="2"
+              style="padding-bottom: 0px; font-weight: bold;"
+              class="zzss"
+            >
+              出库时间:{{ fBstime.slice(11,19) }}
+            </td>
           </tr>
 <!--          <tr v-for="(item, index) in printinglist" :key="index">-->
 <!--            <td width="200">车号</td>-->
@@ -2802,6 +2814,7 @@ export default {
   },
   data() {
     return {
+      fBstime:'',
       browseStatu:false,
       key_s:'',
       // 劳务公司
@@ -3024,7 +3037,7 @@ export default {
         fWarehouseid: null,
         fBusinessType: null,
         fCartype: 0,
-        fBstime:new Date()
+        fBstime:''
       },
       // 表单校验
       rules: {
@@ -3370,6 +3383,7 @@ export default {
           if (response.data.enclosures) {
             this.relevantAttachments = response.data.enclosures;
           }
+          this.$set(this.form,'fCartype',response.data.warehousebills.fCartype + '')
           this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
           this.$set(this.form, "fEta", Date.parse(this.form.fEta));
           this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
@@ -3861,6 +3875,11 @@ export default {
     },
     // 作业单打印
     printJobSheet() {
+      for(let item in this.fCartypeOptions){
+        if(this.form.fCartype == this.fCartypeOptions[item].dictValue){
+          this.$set(this.form,'fCartype',this.fCartypeOptions[item].dictLabel)
+        }
+      }
       if (this.printinglist.length <= 0) {
         this.$message.error("请维护出库明细!");
         return false;
@@ -3932,6 +3951,7 @@ export default {
         }
         setTimeout(() => {
           this.openPrintJobSheet = true
+          this.fBstime = this.form.fBstime
         }, 200);
       }
     },
@@ -4269,8 +4289,10 @@ export default {
       }
       getWarehousebills(fId).then((response) => {
         if (response.data.warehousebills) {
+          console.log(response)
           this.form = response.data.warehousebills;
           this.before = this.form.createBy
+          this.$set(this.form,'fCartype',response.data.warehousebills.fCartype + '')
           this.$set(this.form, "fEta", Date.parse(this.form.fEta));
           this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
           this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
@@ -4594,6 +4616,7 @@ export default {
             this.dataWithdrawList = []
             this.dataListSelection = []
             this.msgSuccess("出库成功");
+            this.saveForm()
             this.$refs.tableList.clearSelection();
             this.formBrowseStatus = true;
             this.contrOl = true
@@ -4604,6 +4627,49 @@ export default {
                 }
               }
             }
+            this.$refs['form'].validate((valid) => {
+              for (let li in this.dataList) {
+                for(let list in this.fStorageTypeOptions){
+                  if (this.dataList[li].fBusinessType  === this.fStorageTypeOptions[list].dictLabel) {
+                    this.$set(this.dataList[li], 'fBusinessType', this.fStorageTypeOptions[list].dictValue)
+                    break
+                  }
+                }
+              }
+              if (valid) {
+                this.form.fNetweight = this.fNetweight
+                this.form.fGrossweight = this.fGrossweight
+                this.form.fQty = this.fQty
+                setTimeout(() => {
+                  this.form.fBillstatus = 2
+                  let formData = new window.FormData()
+                  formData.append("warehouseBills", JSON.stringify(this.form));
+                  formData.append("warehousebillsitems", JSON.stringify(this.dataList));
+                  formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+                  formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+                  formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
+                  addWarehousebills(formData).then((response) => {
+                    console.log(response.data.warehouseBills)
+                    this.form = response.data.warehouseBills
+                    this.$set(this.form,'fCartype',response.data.warehouseBills.fCartype + '')
+                    this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
+                    this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
+                    this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
+                    this.$set(this.form, 'fFeetunit', this.form.fFeetunit + '')
+                    this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
+                    this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
+                    this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
+                    this.$set(this.form, 'fBusinessType', Date.parse(this.form.fChargedate))
+                    this.dataList = response.data.warehousebillsitems
+                    for (let list in this.dataList) {
+                      this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+                      this.$set(this.dataList[list], "fBusinessType", this.dataList[list].fBusinessType + '');
+                    }
+                  })
+                }, 200);
+              }
+            })
+
           });
         }
       });
@@ -4842,7 +4908,9 @@ export default {
             formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
             addWarehousebills(formData).then((response) => {
               this.msgSuccess('保存成功')
+              console.log(response.data.warehouseBills)
               this.form = response.data.warehouseBills
+              this.$set(this.form,'fCartype',response.data.warehouseBills.fCartype + '')
               this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
               this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
               this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
@@ -5190,4 +5258,9 @@ export default {
 .el-icon-s-home,.el-icon-s-order,.el-icon-circle-plus,.el-icon-remove{
   padding-right: 5px;
 }
+.el-table {
+  .el-table__body-wrapper {
+    z-index: 2;
+  }
+}
 </style>

+ 408 - 49
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -443,6 +443,7 @@
             <el-form-item label="业务时间" prop="fBstime">
               <el-time-picker
                 style="width: 80%"
+                :disabled="browseStatus || formBrowseStatus"
                 v-model="form.fBstime"
                 :picker-options="{
                 selectableRange: '00:00:01 - 23:59:59'
@@ -854,7 +855,7 @@
             </div>
             <div style="display: flex">
               <el-button type="info" :disabled="printinglist.length <= 0 || browseStatus" prop="打印" @click="printJobSheet">作业单</el-button>
-              <el-button :disabled="printinglist.length <= 0 || browseStatus " @click="discharge">装货</el-button>
+              <el-button :disabled="printinglist.length <= 0 || browseStatus " @click="discharge">叫车进场</el-button>
               <el-button
                 :disabled="dataListSelection.length <= 0 || browseStatus"
                 @click.prevent="creditClick"
@@ -895,15 +896,29 @@
             @selection-change="selectinventory"
             show-summary
           >
-            <el-table-column type="selection" width="55" align="center" />
-            <el-table-column label="序号" type="index" width="80">
+            <el-table-column type="selection" width="55" fixed align="center" />
+            <el-table-column label="序号" type="index" fixed width="80"/>
+            <el-table-column
+              prop="fBillstatus"
+              header-align="center"
+              width="150px"
+              fixed
+              align="center"
+              label="状态"
+            >
+              <template slot-scope="scope">
+                <span v-if="scope.row.fBillstatus === 10">计划</span>
+                <span v-if="scope.row.fBillstatus === 20">待入库</span>
+                <span v-if="scope.row.fBillstatus === 30">入库中</span>
+                <span v-if="scope.row.fBillstatus === 40">已入库</span>
+              </template>
             </el-table-column>
-
             <el-table-column
               prop="fBsdate"
               header-align="center"
               align="center"
               width="150px"
+              fixed
               label="入库日期"
             >
               <template slot-scope="scope">
@@ -938,7 +953,7 @@
               header-align="center"
               align="center"
               width="140px"
-              label="品名"
+              label="*品名"
             >
             </el-table-column>
             <el-table-column
@@ -1041,7 +1056,7 @@
                   oninput='this.value=this.value.replace(/[^\-?\d]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "")'
                   @change="qtyChange(scope.row)"
                   v-model="scope.row.fQty"
-                  :disabled="browseStatus || scope.row.fBillstatus > 20"
+                  :disabled="browseStatus || scope.row.fBillstatus === 40"
                   placeholder="调拨件数"
                   show-word-limit
                 />
@@ -1057,7 +1072,7 @@
               <template slot-scope="scope">
                 <el-input
                   oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
-                  :disabled="browseStatus || scope.row.fBillstatus > 20"
+                  :disabled="browseStatus || scope.row.fBillstatus === 40"
                   v-model="scope.row.fGrossweight"
                   @change="changeStock(scope.row)"
                   placeholder="调拨毛重"
@@ -1290,20 +1305,7 @@
                 />
               </template>
             </el-table-column>
-            <el-table-column
-              prop="fBillstatus"
-              header-align="center"
-              width="150px"
-              align="center"
-              label="状态"
-            >
-              <template slot-scope="scope">
-                <span v-if="scope.row.fBillstatus === 10">计划</span>
-                <span v-if="scope.row.fBillstatus === 20">待入库</span>
-                <span v-if="scope.row.fBillstatus === 30">入库中</span>
-                <span v-if="scope.row.fBillstatus === 40">已入库</span>
-              </template>
-            </el-table-column>
+
             <el-table-column
               header-align="center"
               align="center"
@@ -2293,7 +2295,7 @@
           <tr>
             <td
               width="900"
-              colspan="4"
+              colspan="2"
               class="zzss"
               style="font-size: 28px; font-weight: bold"
             >
@@ -2306,6 +2308,19 @@
             >
               调拨日期:{{ form.fBsdates }}
             </td>
+            <td v-if="!fBstime"
+                colspan="2"
+                style="padding-bottom: 0px; font-weight: bold;"
+            >调拨时间:</td>
+            <td
+              v-else
+              width="500"
+              colspan="2"
+              style="padding-bottom: 0px; font-weight: bold;"
+              class="zzss"
+            >
+              调拨时间:{{ fBstime.slice(11,19) }}
+            </td>
           </tr>
 <!--          <tr v-for="(item, index) in printinglist" :key="index">-->
 <!--            <td width="200">车号</td>-->
@@ -2384,6 +2399,235 @@
       </el-dialog>
     </el-dialog>
     <el-dialog
+      title="调拨收货单打印"
+      style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
+      :visible.sync="editDialogVisible_ss"
+      :close-on-click-modal="false"
+      width="70%"
+      :modal="false"
+    >
+      <table
+        id="print_area3"
+        class="biaoge zzss"
+        border="1"
+        style="border-collapse: collapse; border: none;"
+      >
+        <tr>
+          <td
+            width="1400"
+            colspan="6"
+            class="zzss"
+            style="font-size: 26px; font-weight: bold; border: none"
+          >
+            大木国际物流(青岛)有限公司收货单
+          </td>
+        </tr>
+        <!-- <div v-for="{{}}" :key="index"> -->
+        <tr>
+          <td width="400">车号:</td>
+          <td width="400" v-if="printinglist.length === 0"></td>
+          <td width="400" v-else>{{ printinglist[0].fTruckno }}</td>
+          <td
+            width="500"
+            colspan="4"
+            style="padding-bottom: 0px; font-weight: bold;"
+            class="zzss"
+            v-if="printinglist.length === 0 || !fBstime"
+          >
+            日期:
+          </td>
+          <td
+
+            width="500"
+            colspan="4"
+            style="padding-bottom: 0px; font-weight: bold;"
+            class="zzss"
+            v-else
+          >
+            日期:{{ printinglist[0].fOriginalbilldate }} {{ fBstime.slice(11,19) }}
+          </td>
+
+          <!-- <td
+            width="500"
+            colspan="2"
+            style="padding-bottom: 0px; font-weight: bold; border: none"
+            class="zzss"
+          >
+          </td> -->
+        </tr>
+        <tr v-for="(item, index) in printinglist" :key="index">
+          <td width="250">货物品名:</td>
+          <td width="200" colspan="">{{ item.fGoodsids }}</td>
+          <!-- <td width="200" colspan="2">件数: 161件</td> -->
+          <!-- <td width="200"></td> -->
+          <td width="200" colspan="4" class="zzss">
+            件数: {{ item.fQty }}件
+          </td>
+        </tr>
+        <!-- <tr>
+          <td width="1400" colspan="6">&nbsp;</td>
+        </tr> -->
+        <tr>
+          <td>备注:</td>
+          <td colspan="5">{{ form.remark }}</td>
+        </tr>
+        <tr>
+          <td>司机签字:</td>
+          <td></td>
+          <td colspan="2">司机电话:</td>
+          <td colspan="2" v-if="dataList.length !== 0">{{ dataList[0].fDriverTel }}</td>
+          <td colspan="2" v-else>1</td>
+        </tr>
+        <tr>
+          <td>制单人:</td>
+          <td>{{ form.createBy }}</td>
+          <td colspan="2">收货人:</td>
+          <td colspan="2">{{ form.fContacts }}</td>
+        </tr>
+        <!-- <tr>
+          <td colspan="6" class="zzss">&nbsp;</td>
+        </tr> -->
+        <tr>
+          <td width="280" class="zzss"></td>
+          <td width="280" class="zzss"></td>
+          <td width="280" class="zzss"></td>
+          <td width="280" class="zzss"></td>
+          <td width="290" class="zzss">地址:{{ fAddr }}</td>
+          <td width="290" class="zzss">电话:{{ form.fTel }}</td>
+        </tr>
+        <!-- </div> -->
+      </table>
+      <el-button @click="printSomething2">打印</el-button>
+      <el-button @click="editDialogVisible_ss = false">取消 </el-button>
+    </el-dialog>
+    <el-dialog
+      title="调拨进仓单打印"
+      :modal="false"
+      style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
+      :visible.sync="editDialogVisible_s"
+      :close-on-click-modal="false"
+      @close="closeDialog"
+      width="70%"
+    >
+      <table
+        id="print_area2"
+        class="biaoge zzss"
+        border="1"
+        style="border-collapse: collapse; border: none"
+      >
+        <tr>
+          <td
+            width="100"
+            colspan="7"
+            class="zzss"
+            style="font-size: 28px; font-weight: bold; border: none"
+          >
+            青岛大木进仓单
+          </td>
+        </tr>
+        <tr>
+          <td
+            width="100"
+            colspan="7"
+            class="zzss"
+            style="font-size: 28px; font-weight: bold; border: none"
+          >
+            &nbsp;
+          </td>
+        </tr>
+        <tr>
+          <td width="450" colspan="2" class="zzss">
+            货权方:{{ form.fCorpidName }}
+          </td>
+          <td width="450" colspan="2" class="zzss">
+            仓库:{{ form.fWarehouseid }}
+          </td>
+          <td width="450" colspan="3" class="zzss">地址:{{ fAddr }}</td>
+        </tr>
+        <tr>
+          <td width="200" colspan="2" class="zzss">保管方:大木有限公司</td>
+          <td width="200" colspan="2" class="zzss">
+            联系人:{{ form.fContacts }}
+          </td>
+          <td width="200" colspan="3" class="zzss">电话:{{ form.fTel }}</td>
+        </tr>
+        <tr>
+          <td width="100" border="1">提单号</td>
+          <td width="100">品名</td>
+          <td width="100">箱型</td>
+          <td width="100">品牌</td>
+          <td width="100">件数</td>
+          <td width="100">重量</td>
+          <td width="100">包装规格</td>
+        </tr>
+        <tr>
+          <td width="100">{{ form.fMblno }}</td>
+          <td width="100">{{ form.fProductName }}</td>
+          <td width="100">{{ dataList.fCntrtype }}</td>
+          <td width="100">{{ form.fMarks }}</td>
+          <td width="100">包</td>
+          <td width="100">吨</td>
+          <td width="100">{{ fPackagespecs }}</td>
+        </tr>
+        <tr>
+          <td width="100">序号</td>
+          <td width="100">入货日期</td>
+          <td width="100">箱量(20GP)</td>
+          <td width="100">重量</td>
+          <td width="100">件数</td>
+          <td width="100">入库重量</td>
+          <td width="100">入库件数</td>
+        </tr>
+        <tr v-for="(item, indexx) in printinglist" :key="indexx">
+          <td width="100">{{ indexx + 1 }}</td>
+          <td width="100">{{ item.fBsdate }}</td>
+          <td width="100">{{ item.fCntqty }}</td>
+          <td width="100">{{ (item.fGrossweight / 1000).toFixed(2) }}</td>
+          <td width="100">{{ item.fPlanqty }}</td>
+          <td width="100">{{ (item.fNetweight / 1000).toFixed(2) }}</td>
+          <td width="100">{{ item.fQty }}</td>
+        </tr>
+        <tr>
+          <td width="100" colspan="2">合计:</td>
+          <td width="100">{{ fCntqty }}</td>
+          <td width="100">{{ form.sumFGrossweight }}</td>
+          <td width="100">{{ fPlanqty }}</td>
+          <td width="100">{{ form.sumFNetweight}}</td>
+          <td width="100">{{ fQty }}</td>
+        </tr>
+        <tr>
+          <td width="100">备注:</td>
+          <td width="100" colspan="6"></td>
+        </tr>
+        <tr>
+          <td width="100" colspan="7" class="zzss">
+            本进仓单经仓管员签字并经保管方盖章后即专项作为货物所有人的货权证明,本单据不得转让。
+          </td>
+        </tr>
+        <tr style="border: none">
+          <td width="100" colspan="2" class="zzss" style="border: none">
+            开单员:
+          </td>
+          <td width="100" colspan="3" class="zzss" style="border: none"></td>
+          <td width="100" colspan="2" class="zzss" style="border: none">
+            仓管员:
+          </td>
+        </tr>
+        <tr style="border: none">
+          <td width="100" colspan="2" class="zzss" style="border: none">
+            开单时间:
+          </td>
+          <td width="100" colspan="3" class="zzss" style="border: none"></td>
+          <td width="100" colspan="2" class="zzss" style="border: none">
+            (盖章)
+          </td>
+        </tr>
+      </table>
+      <el-button @click="printSomething1">打印</el-button>
+      <el-button @click="editDialogVisible_s = false">取消 </el-button>
+    </el-dialog>
+
+    <el-dialog
       title="选择库位"
       :data="treeselectList"
       :visible.sync="choiceWarehouse"
@@ -2453,6 +2697,10 @@ export default {
   },
   data() {
     return {
+      fBstime:'',
+      fPackagespecs: "",
+      editDialogVisible_s: false,
+      editDialogVisible_ss: false,
       fCompanyOptIons:[],
       fleetOptions:[],
       activeIndex: '1',
@@ -2669,7 +2917,7 @@ export default {
         fBsdates: null,
         fTrademodeid: null,
         fWarehouseid: null,
-        fBstime:new Date()
+        fBstime:''
       },
       // 表单校验
       rules: {
@@ -2752,10 +3000,97 @@ export default {
   activated(){
     this.Jump()
   },
-  // watch:{
-  //   'form.fWarehouseid' : 'warehouseMethod'
-  // },
   methods: {
+    closeDialog() {
+      for (let aorp in this.Printinglist) {
+        this.$set(
+          this.Printinglist[aorp],
+          "fBsdate",
+          Date.parse(this.Printinglist[aorp].fBsdate)
+        );
+      }
+    },
+    //入库单打印
+    showEditDialog_s() {
+      if (this.printinglist.length > 0) {
+        this.editDialogVisible_s = true;
+        let sumFNetweight = 0
+        let sumFGrossweight = 0
+        for (let aorp in this.printinglist) {
+          sumFNetweight = Number(sumFNetweight) + Number(this.printinglist[aorp].fNetweight)
+          sumFGrossweight = Number(sumFGrossweight) + Number(this.printinglist[aorp].fGrossweight)
+          var date = new Date(this.printinglist[aorp].fBsdate);
+          var Y = date.getFullYear() + "-";
+          var M =
+            (date.getMonth() + 1 < 10
+              ? "0" + (date.getMonth() + 1)
+              : date.getMonth() + 1) + "-";
+          var D =
+            (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
+          this.$set(this.printinglist[aorp], "fBsdate", Y + M + D);
+        }
+        this.$set(this.form , 'sumFNetweight', parseFloat(Number(sumFNetweight) / 1000).toFixed(2))
+        this.$set(this.form , 'sumFGrossweight', parseFloat(Number(sumFGrossweight) / 1000).toFixed(2))
+        for (let corp in this.fMblnoOptions) {
+          if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
+            this.$set(this.form, "fCorpidName", this.fMblnoOptions[corp].fName);
+          }
+        }
+        for (let sorp in this.warehouseOptions) {
+          if (this.form.fWarehouseid === this.warehouseOptions[sorp].fId) {
+            this.$set(this.form, "fWarehouseid", this.warehouseOptions[sorp].fName);
+          }
+        }
+      } else {
+        this.$message.error("请选择需要打印的明细!");
+      }
+    },
+    printSomething1() {
+      // 此处的style即为打印时的样式
+      const style =
+        "@media print { .print-div{ border:none;padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center;border:1px solid #000}}";
+      print({
+        printable: "print_area2",
+        type: "html",
+        style: style, // 亦可使用引入的外部css;
+        scanStyles: false,
+      });
+    },
+    //收货单打印
+    showEditDialog_ss() {
+      if (this.printinglist.length > 0) {
+        for (let warehouseCr in this.printinglist) {
+          if (!this.printinglist[warehouseCr].fWarehouseInformation) {
+            this.$message.error('请选择调入库位')
+            return false
+          } else if (!this.printinglist[warehouseCr].fDriverName || this.printinglist[warehouseCr].fDriverName !== this.printinglist[0].fDriverName) {
+            this.$message.error('请选择相同司机名')
+            return false
+          } else if (!this.printinglist[warehouseCr].fDriverTel || this.printinglist[warehouseCr].fDriverTel !== this.printinglist[0].fDriverTel) {
+            this.$message.error('请选择相同司机电话')
+            return false
+          } else if (!this.printinglist[warehouseCr].fTruckno || this.printinglist[warehouseCr].fTruckno !== this.printinglist[0].fTruckno) {
+            this.$message.error('请选择相同车号')
+            return false
+          }
+        }
+        this.editDialogVisible_ss = true
+      } else {
+        this.$message.error('请选择需要打印的明细!')
+      }
+    },
+    printSomething2() {
+      // 此处的style即为打印时的样式
+      const style =
+        "@media print { .print-div{ border:none;padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center;border:1px solid #000}}";
+      print({
+        printable: "print_area3",
+        type: "html",
+        style: style, // 亦可使用引入的外部css;
+        scanStyles: false,
+      });
+    },
+
     //仓库电话、仓库联系人带入
     warwhouseTel(){
       for(let item in this.warehouseOptions){
@@ -3319,6 +3654,10 @@ export default {
     },
     // 作业单打印
     printJobSheet() {
+      if (this.printinglist.length <= 0) {
+        this.$message.error("请维护出库明细!");
+        return false;
+      }
       let fTruckno = this.printinglist[0].fTruckno
       let fDriverName = this.printinglist[0].fDriverName
       for (let warehouseCr in this.printinglist) {
@@ -3376,31 +3715,9 @@ export default {
       }
       setTimeout(() => {
         this.openPrintJobSheet = true
+        this.fBstime = this.form.fBstime
       }, 200);
     },
-    showEditDialog_ss() {
-      if (this.printinglist.length > 0) {
-        for (let warehouseCr in this.printinglist) {
-         if (!this.printinglist[warehouseCr].fWarehouseInformation) {
-            this.$message.error('请选择调入库位')
-            return false
-          } else if (!this.printinglist[warehouseCr].fDriverName || this.printinglist[warehouseCr].fDriverName !== this.printinglist[0].fDriverName) {
-            this.$message.error('请选择相同司机名')
-            return false
-          } else if (!this.printinglist[warehouseCr].fDriverTel || this.printinglist[warehouseCr].fDriverTel !== this.printinglist[0].fDriverTel) {
-            this.$message.error('请选择相同司机电话')
-            return false
-          } else if (!this.printinglist[warehouseCr].fTruckno || this.printinglist[warehouseCr].fTruckno !== this.printinglist[0].fTruckno) {
-            this.$message.error('请选择相同车号')
-            return false
-          }
-        }
-        this.openPrintJobSheet = true
-        this.addList()
-      } else {
-        this.$message.error('请选择需要打印的明细!')
-      }
-    },
     // 收款信息
     addCollection() {
       if(this.form.fBusinessType == null){
@@ -4135,6 +4452,43 @@ export default {
                 }
               }
             }
+            //保存
+            this.$refs['form'].validate((valid) => {
+              // if (this.dataList.length === 0) {
+              //   this.$message.error('请添加库存明细!')
+              //   return false
+              // }
+              for (let list in this.dataList) {
+                this.changeStock(this.dataList[list])
+              }
+              if (valid) {
+                setTimeout(() => {
+                  this.form.fBillstatus = 2
+                  let formData = new window.FormData()
+                  // this.dataList.fTransferWarehouselocid = this.treeselectList.fWarehouselocid
+                  formData.append("warehouseBills", JSON.stringify(this.form));
+                  formData.append("warehousebillsitems", JSON.stringify(this.dataList));
+                  formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+                  formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+                  formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
+                  addStockTransfer(formData).then((response) => {
+                    this.form = response.data.warehouseBills
+                    this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
+                    this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
+                    this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
+                    this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
+                    this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
+                    this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
+                    this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
+                    this.dataList = response.data.warehousebillsitems
+                    for (let li in this.dataList) {
+                      this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
+                      this.$set(this.dataList[li], 'fBusinessType', this.dataList[li].fBusinessType + '')
+                    }
+                  })
+                }, 200);
+              }
+            })
           })
         }
       });
@@ -4700,4 +5054,9 @@ export default {
 .el-icon-s-home,.el-icon-s-order,.el-icon-circle-plus,.el-icon-remove{
   padding-right: 5px;
 }
+.el-table {
+  .el-table__body-wrapper {
+    z-index: 2;
+  }
+}
 </style>