浏览代码

Merge branch 'master' of git.echepei.com:zhujiawei/Warehouse_management_ui

caojunjie 4 年之前
父节点
当前提交
b58c552ab5

+ 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>

+ 262 - 30
src/views/warehouseBusiness/inStock/index.vue

@@ -269,19 +269,36 @@
       :data="warehousebillsList"
       @selection-change="handleSelectionChange"
     >
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column type="index" label="行号" align="center" />
+      <el-table-column type="selection" width="55" fixed align="center" />
+      <el-table-column type="index" label="行号" align="center" fixed/>
+      <el-table-column
+        width="100"
+        label="入库状态"
+        fixed
+        align="center"
+        prop="fItemsStatus"
+      >
+        <template slot-scope="scope">
+          <span v-if="scope.row.fItemsStatus === 1">计划</span>
+          <span v-if="scope.row.fItemsStatus === 2">待入库</span>
+          <span v-if="scope.row.fItemsStatus === 3">入库中</span>
+          <span v-if="scope.row.fItemsStatus === 4">已入库</span>
+        </template>
+      </el-table-column>
+
       <el-table-column
         :show-overflow-tooltip="true"
         label="货权方"
+        fixed
         align="center"
         prop="fCorpid"
       />
-      <el-table-column label="提单号" align="center" prop="fMblno" show-overflow-tooltip/>
-      <el-table-column label="品名" :show-overflow-tooltip="true" align="center" prop="fProductName" />
-      <el-table-column label="品牌" align="center" prop="fMarks" />
+      <el-table-column label="提单号" fixed align="center" prop="fMblno" show-overflow-tooltip/>
+      <el-table-column label="品名" fixed :show-overflow-tooltip="true" align="center" prop="fProductName" />
+      <el-table-column label="品牌" fixed align="center" prop="fMarks" />
       <el-table-column
         label="入库日期"
+        fixed
         align="center"
         prop="fBsdate"
         width="100"
@@ -295,7 +312,7 @@
         prop="fTrademodeid"
         :formatter="fTrademodeidFormat"
       /> -->
-      <el-table-column label="仓库" align="center" prop="fWarehouseid" />
+      <el-table-column label="仓库" fixed align="center" prop="fWarehouseid" />
       <el-table-column label="计划件数" align="center" prop="fPlanqty" />
       <el-table-column label="入库件数" align="center" prop="fQty" />
       <!--      <el-table-column label="入库毛重" align="center" prop="fGrossweight"/>-->
@@ -310,19 +327,6 @@
                        :formatter="fBusinessTypeFormat"/>
       <el-table-column
         width="100"
-        label="入库状态"
-        align="center"
-        prop="fItemsStatus"
-      >
-        <template slot-scope="scope">
-          <span v-if="scope.row.fItemsStatus === 1">计划</span>
-          <span v-if="scope.row.fItemsStatus === 2">待入库</span>
-          <span v-if="scope.row.fItemsStatus === 3">入库中</span>
-          <span v-if="scope.row.fItemsStatus === 4">已入库</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        width="100"
         label="费用状态"
         align="center"
         prop="fBillstatus"
@@ -474,6 +478,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 +1026,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 +1125,7 @@
               header-align="center"
               align="center"
               width="140px"
-              label="品名"
+              label="*品名"
             >
               <template slot-scope="scope">
                 <el-select
@@ -2785,7 +2790,7 @@
               class="zzss"
               v-else
             >
-              日期:{{ Printinglist[0].fOriginalbilldate }}
+              日期:{{ Printinglist[0].fOriginalbilldate }} {{ fBstime.slice(11,19) }}
             </td>
 
             <!-- <td
@@ -2868,7 +2873,7 @@
           <tr>
             <td
               width="900"
-              colspan="4"
+              colspan="2"
               class="zzss"
               style="font-size: 28px; font-weight: bold;"
             >
@@ -2881,6 +2886,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 +3100,7 @@ export default {
         name:null
       },
       closeButton:true,
+      fBstime:'',
       //表单校验
       checkout: {
         fGoodsids:[
@@ -3285,7 +3295,7 @@ export default {
         fBusinessType:null,
         fItemsStatus: null,
         fFeetunit: '2',
-        fBstime:new Date()
+        fBstime:''
       },
       // 表单校验
       rules: {
@@ -3601,7 +3611,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 +3622,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 +3752,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 +3903,7 @@ export default {
           this.fBsdates = Y + M + D
         }
         this.editDialogVisible_sss = true
+        this.fBstime = this.form.fBstime
       } else {
         this.$message.error('请选择需要打印的明细!')
       }
@@ -4397,7 +4409,7 @@ export default {
       this.form = {
         fItemsStatus: null,
         fFeetunit:"2",
-        fBstime:new Date()
+        fBstime: new Date()
       }
       this.browseStatus = status;
       this.queryUser();
@@ -4509,6 +4521,7 @@ export default {
     // 库存总账多选框
     whgenlegSelectionChange(selection) {
       this.dialogWhgenlegList = selection;
+      console.log(selection)
     },
     // 合计
     getSummaries(param) {
@@ -4765,6 +4778,130 @@ export default {
               }
             }
             this.msgSuccess('入账成功')
+            getWarehousebills(this.form.fId).then((response) => {
+              if (response.data.warehousebills) {
+                this.form = response.data.warehousebills;
+                this.before = this.form.createBy
+                if (this.form.fBillstatus > 2) {
+                  this.approvalStatus = false;
+                } else {
+                  this.fMblno = true;
+                }
+                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.$set(this.form, "fFeeUnitid", this.form.fFeeunitid + "");
+                this.$set(this.form, "fPlannetweight", this.form.fPlannetweight.toFixed(2));
+                this.$set(this.form, "fPlangrossweight", this.form.fPlangrossweight.toFixed(2));
+              }
+              if (response.data.warehouseBillsItem) {
+                this.dataList = response.data.warehouseBillsItem;
+                for (let list in this.dataList) {
+                  this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+                  if (this.dataList[list].fBillstatus > 10) {
+                    this.formBrowseStatus = true;
+                    this.$set(this.dataList[list], "fBusinessType", this.dataList[list].fBusinessType + '')
+                  }else{
+                    this.formBrowseStatus = false;
+                  }
+                  if(this.dataList[list].fBillstatus === 40){
+                    this.contrOl = true
+                  }else{
+                    this.contrOl = false
+                  }
+                }
+              }
+              if (response.data.corps) {
+                this.fMblnoOptions = response.data.corps;
+                this.KHblnoOptions = response.data.corps;
+                this.fCompanyOptIons = response.data.corps;
+                this.fleetOptions = response.data.corps;
+              }
+              if (response.data.feesList) {
+                this.fWbuOptions = response.data.feesList;
+              }
+              if (response.data.warehouse) {
+                this.warehouseOptions = response.data.warehouse;
+              }
+              if (response.data.warehouseBillsItem) {
+                this.dataList = response.data.warehouseBillsItem;
+                for(let list in this.dataList){
+                  if (this.dataList[list].fBillstatus > 10) {
+                    this.formBrowseStatus = true;
+                  }
+                }
+              }
+              if (response.data.enclosures) {
+                this.relevantAttachments = response.data.enclosures;
+              }
+              for (let list in this.dataList) {
+                this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+              }
+              this.kqhouseOptions = response.data.warehouseAreas;
+              this.warehouseDrList = response.data.warehousebillsfeesDr;
+              for (let dr in this.warehouseDrList) {
+                this.$set(this.warehouseDrList[dr], "fFeeUnitid", this.warehouseDrList[dr].fFeeunitid + '');
+                this.$set(this.warehouseDrList[dr], "fQty", this.warehouseDrList[dr].fQty.toFixed(2));
+                this.$set(this.warehouseDrList[dr], "fAmount", this.warehouseDrList[dr].fAmount.toFixed(2));
+              }
+              this.warehouseCrList = response.data.warehousebillsfeesCr;
+              for (let cr in this.warehouseCrList) {
+                this.$set(this.warehouseCrList[cr], "fFeeUnitid", this.warehouseCrList[cr].fFeeunitid + "");
+              }
+              this.userOptions = response.data.sysUser;
+              // this.warehouseDrList[0].fBusinessType = this.form.fBusinessType
+              this.open = true;
+              this.title = "修改仓入库";
+              this.warehousesssMethod()
+            });
+            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()
+              console.log("000")
+            })
             this.$refs.checkout.clearSelection()
             this.contrOl = true
           })
@@ -4885,6 +5022,85 @@ export default {
                 this.$set(this.dataList[li], "fBusinessType", this.dataList[li].fBusinessType + '')
               }
               this.msgSuccess("卸货成功");
+              getWarehousebills(this.form.fId).then((response) => {
+                if (response.data.warehousebills) {
+                  this.form = response.data.warehousebills;
+                  this.before = this.form.createBy
+                  if (this.form.fBillstatus > 2) {
+                    this.approvalStatus = false;
+                  } else {
+                    this.fMblno = true;
+                  }
+                  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.$set(this.form, "fFeeUnitid", this.form.fFeeunitid + "");
+                  this.$set(this.form, "fPlannetweight", this.form.fPlannetweight.toFixed(2));
+                  this.$set(this.form, "fPlangrossweight", this.form.fPlangrossweight.toFixed(2));
+                }
+                if (response.data.warehouseBillsItem) {
+                  this.dataList = response.data.warehouseBillsItem;
+                  for (let list in this.dataList) {
+                    this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+                    if (this.dataList[list].fBillstatus > 10) {
+                      this.formBrowseStatus = true;
+                      this.$set(this.dataList[list], "fBusinessType", this.dataList[list].fBusinessType + '')
+                    }else{
+                      this.formBrowseStatus = false;
+                    }
+                    if(this.dataList[list].fBillstatus === 40){
+                      this.contrOl = true
+                    }else{
+                      this.contrOl = false
+                    }
+                  }
+                }
+                if (response.data.corps) {
+                  this.fMblnoOptions = response.data.corps;
+                  this.KHblnoOptions = response.data.corps;
+                  this.fCompanyOptIons = response.data.corps;
+                  this.fleetOptions = response.data.corps;
+                }
+                if (response.data.feesList) {
+                  this.fWbuOptions = response.data.feesList;
+                }
+                if (response.data.warehouse) {
+                  this.warehouseOptions = response.data.warehouse;
+                }
+                if (response.data.warehouseBillsItem) {
+                  this.dataList = response.data.warehouseBillsItem;
+                  for(let list in this.dataList){
+                    if (this.dataList[list].fBillstatus > 10) {
+                      this.formBrowseStatus = true;
+                    }
+                  }
+                }
+                if (response.data.enclosures) {
+                  this.relevantAttachments = response.data.enclosures;
+                }
+                for (let list in this.dataList) {
+                  this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+                }
+                this.kqhouseOptions = response.data.warehouseAreas;
+                this.warehouseDrList = response.data.warehousebillsfeesDr;
+                for (let dr in this.warehouseDrList) {
+                  this.$set(this.warehouseDrList[dr], "fFeeUnitid", this.warehouseDrList[dr].fFeeunitid + '');
+                  this.$set(this.warehouseDrList[dr], "fQty", this.warehouseDrList[dr].fQty.toFixed(2));
+                  this.$set(this.warehouseDrList[dr], "fAmount", this.warehouseDrList[dr].fAmount.toFixed(2));
+                }
+                this.warehouseCrList = response.data.warehousebillsfeesCr;
+                for (let cr in this.warehouseCrList) {
+                  this.$set(this.warehouseCrList[cr], "fFeeUnitid", this.warehouseCrList[cr].fFeeunitid + "");
+                }
+                this.userOptions = response.data.sysUser;
+                // this.warehouseDrList[0].fBusinessType = this.form.fBusinessType
+                this.open = true;
+                this.title = "修改仓入库";
+                this.warehousesssMethod()
+              });
+
               this.$refs.checkout.clearSelection();
             });
           }
@@ -4933,10 +5149,12 @@ export default {
     },
     // 提交保存保存成功
     preservation() {
+      console.log(this.form.fBstime)
       this.$refs['form'].validate((valid) => {
         if (valid) {
           if(!this.dataList.length){
-            this.form.fBillstatus = status
+            console.log(status)
+            // this.form.fBillstatus = status
             this.form.fNetweight = this.fNetweight
             this.form.fPlanvolumn = this.fPlanvolumn
             this.form.fGrossweight = this.fGrossweight
@@ -4957,6 +5175,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))
@@ -4981,10 +5200,12 @@ export default {
               }
               this.fid = response.data.warehouseBills.fId
               this.getList()
+              console.log("000")
             })
           }else{
             for(let item in this.dataList){
               if(!this.dataList[item].fGoodsids){
+                console.log(this.dataList[item].fGoodsids)
                 this.$message.error("请维护第"+ (Number(item)+1) +"行品名!")
                 return false
               }
@@ -4993,7 +5214,8 @@ export default {
                 return false
               }
             }
-            this.form.fBillstatus = status
+            console.log(status)
+            // this.form.fBillstatus = status
             this.form.fNetweight = this.fNetweight
             this.form.fPlanvolumn = this.fPlanvolumn
             this.form.fGrossweight = this.fGrossweight
@@ -5013,7 +5235,8 @@ export default {
             }
             let formDatae = new window.FormData()
             // 附件数据
-            this.form.fBillingway = this.form.fFeetunit
+            // this.form.fBillingway = this.form.fFeetunit
+            console.log(this.form.fBillstatus)
             formDatae.append('tWarehouseBills', JSON.stringify(this.form))
             // 库存明细
             formDatae.append('tWarehousebillsitems', JSON.stringify(this.dataList))
@@ -5024,6 +5247,7 @@ export default {
             // 收款
             formDatae.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
             addWarehousebills(formDatae).then((response) => {
+              console.log(this.form.fBillstatus)
               this.msgSuccess('保存成功')
               this.form = response.data.warehouseBills
               this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
@@ -5038,6 +5262,7 @@ export default {
               }
               this.fid = response.data.warehouseBills.fId
               this.getList()
+              console.log("111")
             })
           }
         }
@@ -5094,6 +5319,7 @@ export default {
             this.msgSuccess('提交成功')
             this.open = false
             this.getList()
+
             this.reset()
           })
         }
@@ -5338,4 +5564,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>

+ 227 - 69
src/views/warehouseBusiness/outStock/index.vue

@@ -254,20 +254,37 @@
       :data="warehousebillsList"
       @selection-change="handleSelectionChange"
     >
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column type="index" label="行号" align="center" />
+      <el-table-column type="selection" width="55" fixed align="center" />
+      <el-table-column type="index" label="行号" fixed align="center" />
+      <el-table-column
+        width="100"
+        label="出库状态"
+        fixed
+        align="center"
+        prop="fItemsStatus"
+      >
+        <template slot-scope="scope">
+          <span v-if="scope.row.fItemsStatus === 1">计划</span>
+          <span v-if="scope.row.fItemsStatus === 2">卸货中</span>
+          <span v-if="scope.row.fItemsStatus === 3">已装货</span>
+          <span v-if="scope.row.fItemsStatus === 4">已出库</span>
+        </template>
+      </el-table-column>
+
       <el-table-column
         :show-overflow-tooltip="true"
         label="货权方"
+        fixed
         align="center"
         prop="fCorpid"
       />
-      <el-table-column label="提单号" align="center" prop="fMblno" show-overflow-tooltip/>
-      <el-table-column label="品名" :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
-      <el-table-column label="品牌" align="center" prop="fMarks" />
+      <el-table-column label="提单号" align="center" prop="fMblno" fixed show-overflow-tooltip/>
+      <el-table-column label="品名" :show-overflow-tooltip="true" fixed align="ceter" prop="fProductName" />
+      <el-table-column label="品牌" align="center" fixed prop="fMarks" />
       <el-table-column
         label="出库日期"
         align="center"
+        fixed
         prop="createTime"
         style="width: 60%"
         width="100"
@@ -276,7 +293,7 @@
         <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
       </template>
       </el-table-column>
-      <el-table-column label="仓库" align="center" prop="fWarehouseid" />
+      <el-table-column label="仓库" fixed align="center" prop="fWarehouseid" />
       <el-table-column label="计划件数" align="center" prop="fPlanqty" />
       <el-table-column label="出库件数" align="center" prop="fQty" />
       <el-table-column label="出库毛重(kg)" align="center" prop="fGrossweight" width="100"/>
@@ -288,19 +305,6 @@
       <el-table-column label="业务类别" align="center" prop="fBusinessType" :formatter="fBusinessTypeFormat"/>
       <el-table-column
         width="100"
-        label="出库状态"
-        align="center"
-        prop="fItemsStatus"
-      >
-        <template slot-scope="scope">
-          <span v-if="scope.row.fItemsStatus === 1">计划</span>
-          <span v-if="scope.row.fItemsStatus === 2">卸货中</span>
-          <span v-if="scope.row.fItemsStatus === 3">已装货</span>
-          <span v-if="scope.row.fItemsStatus === 4">已出库</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        width="100"
         label="费用状态"
         align="center"
         prop="fBillstatus"
@@ -455,6 +459,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 +469,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 +913,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 +947,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 +1014,7 @@
               header-align="center"
               align="center"
               width="140px"
-              label="品名"
+              label="*品名"
             >
             </el-table-column>
             <el-table-column
@@ -1314,29 +1343,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="操作"
@@ -2318,6 +2324,8 @@
               <span v-if="scope.row.fFeeUnitid === 3">净重</span>
               <span v-if="scope.row.fFeeUnitid === 4">尺码</span>
               <span v-if="scope.row.fFeeUnitid === 5">固定</span>
+              <span v-if="scope.row.fFeeUnitid === 5">其他</span>
+              <span v-if="scope.row.fFeeUnitid === 7">箱量</span>
             </template>
           </el-table-column>
           <el-table-column
@@ -2645,10 +2653,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;"
+            >车辆类型:{{ fCartype }}
             </td>
             <td
               width="500"
@@ -2658,6 +2666,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 +2820,8 @@ export default {
   },
   data() {
     return {
+      fCartype:'',
+      fBstime:'',
       browseStatu:false,
       key_s:'',
       // 劳务公司
@@ -3024,7 +3044,7 @@ export default {
         fWarehouseid: null,
         fBusinessType: null,
         fCartype: 0,
-        fBstime:new Date()
+        fBstime:''
       },
       // 表单校验
       rules: {
@@ -3370,6 +3390,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 +3882,11 @@ export default {
     },
     // 作业单打印
     printJobSheet() {
+      for(let item in this.fCartypeOptions){
+        if(this.form.fCartype == this.fCartypeOptions[item].dictValue){
+          this.fCartype = this.fCartypeOptions[item].dictLabel
+        }
+      }
       if (this.printinglist.length <= 0) {
         this.$message.error("请维护出库明细!");
         return false;
@@ -3932,6 +3958,7 @@ export default {
         }
         setTimeout(() => {
           this.openPrintJobSheet = true
+          this.fBstime = this.form.fBstime
         }, 200);
       }
     },
@@ -4067,6 +4094,7 @@ export default {
       });
       this.loading = true;
       listWarehousebills(this.queryParams).then((response) => {
+        console.log(response)
         this.warehousebillsList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -4269,8 +4297,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));
@@ -4298,8 +4328,6 @@ export default {
         if (response.data.corps) {
           this.fMblnoOptions = response.data.corps;
           this.KHblnoOptions = response.data.corps;
-          this.fleetOptions = response.data.corps;
-          this.fCompanyOptIons = response.rows;
         }
         if (response.data.feesList) {
           this.fWbuOptions = response.data.feesList;
@@ -4594,16 +4622,134 @@ export default {
             this.dataWithdrawList = []
             this.dataListSelection = []
             this.msgSuccess("出库成功");
+            console.log(this.form.fBillstatus)
             this.$refs.tableList.clearSelection();
             this.formBrowseStatus = true;
             this.contrOl = true
+            this.form.fBillstatus = 40
             for (let li in listSelection) {
               for (let i in this.dataList) {
-                if (listSelection[li].fId === this.dataList[i].fId) {
+                console.log(this.dataList[i].fId)
+                console.log(listSelection[li].fId)
+                if (listSelection[li].fId == this.dataList[i].fId) {
                   this.$set(this.dataList[i], "fBillstatus", 40);
+                  console.log(this.dataList[i].fBillstatus)
                 }
               }
             }
+            console.log(this.form.fBillstatus)
+            getWarehousebills(this.form.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));
+                this.$set(this.form, "createTime", Date.parse(this.form.createTime));
+                this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
+                if (this.form.fBillstatus > 2) {
+                  this.approvalStatus = false;
+                } else {
+                  this.approvalStatus = true;
+                }
+              }
+              if (response.data.warehouseBillsItem) {
+                this.dataList = response.data.warehouseBillsItem;
+                for (let list in this.dataList) {
+                  this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+                  if (this.dataList[list].fBillstatus > 10) {
+                    this.formBrowseStatus = true;
+                    this.$set(this.dataList[list], "fBusinessType", this.dataList[list].fBusinessType + '')
+                  }
+                  if(this.dataList[list].fBillstatus === 40){
+                    this.contrOl = true
+                  }
+                }
+              }
+              if (response.data.corps) {
+                this.fMblnoOptions = response.data.corps;
+                this.KHblnoOptions = response.data.corps;
+              }
+              if (response.data.feesList) {
+                this.fWbuOptions = response.data.feesList;
+              }
+              if (response.data.warehouse) {
+                this.warehouseOptions = response.data.warehouse;
+              }
+              if (response.data.warehouseBillsItem) {
+                this.dataList = response.data.warehouseBillsItem;
+                for (let list in this.dataList) {
+                  this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+                }
+              }
+              if (response.data.enclosures) {
+                this.relevantAttachments = response.data.enclosures;
+              }
+              this.goodsOptions = response.data.goodsList;
+              this.kqhouseOptions = response.data.warehouseAreas;
+
+              this.warehouseDrList = response.data.warehousebillsfeesDr;
+              for (let dr in this.warehouseDrList) {
+                this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+                this.$set(this.warehouseDrList[dr], "fQty", this.warehouseDrList[dr].fQty.toFixed(2));
+                this.$set(this.warehouseDrList[dr], "fAmount", this.warehouseDrList[dr].fAmount.toFixed(2));
+              }
+              this.warehouseCrList = response.data.warehousebillsfeesCr;
+              for (let cr in this.warehouseCrList) {
+                this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
+                // this.$set(this.warehouseCrList[cr], "fBusinessType", response.data.warehousebillsfeesCr);
+              }
+              this.userOptions = response.data.sysUser;
+              this.open = true;
+              this.title = "修改仓入库";
+              this.warehousesssMethod()
+              console.log(this.form.fBillstatus)
+            });
+
+            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(() => {
+                  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);
+                console.log(this.form.fBillstatus)
+              }
+            })
           });
         }
       });
@@ -4808,7 +4954,7 @@ export default {
         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)
+              // this.$set(this.dataList[li], 'fBusinessType', this.fStorageTypeOptions[list].dictValue)
               break
             }
           }
@@ -4842,7 +4988,10 @@ 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
+              console.log(this.form.fBusinessType)
+              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 + '')
@@ -4850,7 +4999,8 @@ export default {
               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.$set(this.form, 'fBusinessType', this.form.fBusinessType + '')
+              console.log(this.form.fBusinessType)
               this.dataList = response.data.warehousebillsitems
               for (let list in this.dataList) {
                 this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
@@ -4905,18 +5055,21 @@ export default {
             return false
           }
         }
-        for (let list in this.warehouseDrList) {
-          if (!this.warehouseDrList[list].fCorpid) {
-            this.$message.error('请选择客户名称')
-            return false
-          }
-        }
-        for (let list in this.warehouseCrList) {
-          if (!this.warehouseCrList[list].fCorpid) {
-            this.$message.error('请选择客户名称')
-            return false
-          }
-        }
+
+        // for (let index in this.warehouseDrList) {
+        //   if (!this.warehouseDrList[index].fCorpid) {
+        //     console.log(index)
+        //     console.log(this.warehouseDrList[index].fCorpid)
+        //     this.$message.error('请选择客户名称')
+        //     return false
+        //   }
+        // }
+        // for (let list in this.warehouseCrList) {
+        //   if (!this.warehouseCrList[list].fCorpid) {
+        //     this.$message.error('请选择客户名称')
+        //     return false
+        //   }
+        // }
         if (valid) {
           setTimeout(() => {
             this.form.fBillstatus = status
@@ -5190,4 +5343,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>

+ 432 - 69
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -255,28 +255,45 @@
       :data="warehousebillsList"
       @selection-change="handleSelectionChange"
     >
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column type="index" label="行号" align="center" />
+      <el-table-column type="selection" width="55" fixed align="center" />
+      <el-table-column type="index" label="行号" fixed align="center" />
+      <el-table-column
+        width="100"
+        fixed
+        label="调拨状态"
+        align="center"
+        prop="fItemsStatus"
+      >
+        <template slot-scope="scope">
+          <span v-if="scope.row.fItemsStatus === 1">计划</span>
+          <span v-if="scope.row.fItemsStatus === 2">待调拨</span>
+          <span v-if="scope.row.fItemsStatus === 3">调拨中</span>
+          <span v-if="scope.row.fItemsStatus === 6">已调拨</span>
+        </template>
+      </el-table-column>
+
       <el-table-column
         :show-overflow-tooltip="true"
         label="货权方"
+        fixed
         align="center"
         prop="fCorpid"
       />
-      <el-table-column label="提单号" align="center" prop="fMblno" show-overflow-tooltip/>
-      <el-table-column label="品名" :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
-      <el-table-column label="品牌" align="center" prop="fMarks" />
+      <el-table-column label="提单号" fixed align="center" prop="fMblno" show-overflow-tooltip/>
+      <el-table-column label="品名" fixed :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
+      <el-table-column label="品牌" fixed align="center" prop="fMarks" />
       <el-table-column
         label="调拨日期"
         align="center"
+        fixed
         prop="createTime"
         width="100"
         ><template slot-scope="scope">
           <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="调入仓库" align="center" prop="fWarehouseid" />
-      <el-table-column label="调出仓库" align="center" prop="fInwarehouseid" />
+      <el-table-column label="调入仓库" fixed align="center" prop="fWarehouseid" />
+      <el-table-column label="调出仓库" fixed align="center" prop="fInwarehouseid" />
       <el-table-column label="计划调拨件数" align="center" prop="fPlanqty" width="100"/>
       <el-table-column label="调拨件数" align="center" prop="fQty" />
       <el-table-column label="调拨毛重(kg)" align="center" prop="fGrossweight" width="100"/>
@@ -285,19 +302,6 @@
 
       <el-table-column
         width="100"
-        label="调拨状态"
-        align="center"
-        prop="fItemsStatus"
-      >
-        <template slot-scope="scope">
-          <span v-if="scope.row.fItemsStatus === 1">计划</span>
-          <span v-if="scope.row.fItemsStatus === 2">待调拨</span>
-          <span v-if="scope.row.fItemsStatus === 3">调拨中</span>
-          <span v-if="scope.row.fItemsStatus === 6">已调拨</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        width="100"
         label="费用状态"
         align="center"
         prop="fBillstatus"
@@ -443,6 +447,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 +859,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 +900,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 +957,7 @@
               header-align="center"
               align="center"
               width="140px"
-              label="品名"
+              label="*品名"
             >
             </el-table-column>
             <el-table-column
@@ -1041,7 +1060,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 +1076,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 +1309,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 +2299,7 @@
           <tr>
             <td
               width="900"
-              colspan="4"
+              colspan="2"
               class="zzss"
               style="font-size: 28px; font-weight: bold"
             >
@@ -2306,6 +2312,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 +2403,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 +2701,10 @@ export default {
   },
   data() {
     return {
+      fBstime:'',
+      fPackagespecs: "",
+      editDialogVisible_s: false,
+      editDialogVisible_ss: false,
       fCompanyOptIons:[],
       fleetOptions:[],
       activeIndex: '1',
@@ -2669,7 +2921,7 @@ export default {
         fBsdates: null,
         fTrademodeid: null,
         fWarehouseid: null,
-        fBstime:new Date()
+        fBstime:''
       },
       // 表单校验
       rules: {
@@ -2752,10 +3004,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 +3658,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 +3719,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 +4456,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 +5058,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>