فهرست منبع

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

wengyuwen 4 سال پیش
والد
کامیت
fe4abbe80d

+ 56 - 0
src/main.js

@@ -82,6 +82,62 @@ new Vue({
   store,
   render: h => h(App)
 })
+Vue.directive("dialogDrag", {
+  bind(el, binding, vnode, oldVnode) {
+    const dialogHeaderEl = el.querySelector(".el-dialog__header");
+    const dragDom = el.querySelector(".el-dialog");
+    const enlarge = el.querySelector(".enlarge");
+    dialogHeaderEl.style.cursor = "move";
+
+    // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
+    const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
+    if (enlarge) {
+      enlarge.onclick = (e) => {
+        dragDom.style.top = "0px";
+        dragDom.style.left = "0px";
+      };
+    }
+    dialogHeaderEl.onmousedown = (e) => {
+      // 鼠标按下,计算当前元素距离可视区的距离
+      const disX = e.clientX - dialogHeaderEl.offsetLeft;
+      const disY = e.clientY - dialogHeaderEl.offsetTop;
+
+      // 获取到的值带px 正则匹配替换
+      let styL, styT;
+
+      // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
+      if (sty.left.includes("%")) {
+        styL =
+          +document.body.clientWidth * (+sty.left.replace(/\%/g, "") / 100);
+        styT =
+          +document.body.clientHeight * (+sty.top.replace(/\%/g, "") / 100);
+      } else {
+        styL = +sty.left.replace(/\px/g, "");
+        styT = +sty.top.replace(/\px/g, "");
+      }
+
+      document.onmousemove = function (e) {
+        // 通过事件委托,计算移动的距离
+        const l = e.clientX - disX;
+        const t = e.clientY - disY;
+
+        // 移动当前元素
+
+        if (t + styT >= 0) {
+          dragDom.style.top = `${t + styT}px`;
+        }
+        dragDom.style.left = `${l + styL}px`;
+        // 将此时的位置传出去
+        // binding.value({x:e.pageX,y:e.pageY})
+      };
+
+      document.onmouseup = function (e) {
+        document.onmousemove = null;
+        document.onmouseup = null;
+      };
+    };
+  },
+});
 Vue.directive("input-limit", {
   bind(el, binding) {
     var wins_0 = /[^\d]/g //整数判断

+ 533 - 208
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -1,5 +1,22 @@
 <template>
-  <div class="app-container">
+  <div>
+    <el-breadcrumb separator="/">
+      <el-breadcrumb-item
+        ><span style="font-weight: 700">入库</span></el-breadcrumb-item
+      >
+      <el-breadcrumb-item
+        ><span style="font-weight: 700">入库详情页</span></el-breadcrumb-item
+      >
+    </el-breadcrumb>
+    <br />
+    <div>
+      <el-popconfirm title="是否确认离开此页面?" @confirm="changeShow">
+        <el-button slot="reference" size="mini" icon="el-icon-arrow-left"
+          >返回列表</el-button
+        >
+      </el-popconfirm>
+    </div>
+    <br />
     <el-form ref="form" :model="form" :rules="rules" label-width="120px">
       <el-row>
         <el-col :span="8">
@@ -755,17 +772,22 @@
                 @click="printZyd"
                 >作业单
               </el-button>
-              <el-button size="small" :disabled="browseStatus"
+              <el-button
+                size="small"
+                :disabled="browseStatus"
+                @click="discharge"
                 >叫车进场</el-button
               >
               <el-button
                 size="small"
                 :disabled="dataListSelection.length <= 0 || browseStatus"
+                @click="creditClick"
                 >入库确认
               </el-button>
               <el-button
                 size="small"
                 :disabled="dataWithdrawList.length <= 0 || browseStatus"
+                @click.prevent="withdrawClick"
                 >撤回入库
               </el-button>
               <el-dropdown @command="handleCommand" style="margin-left: 10px">
@@ -783,7 +805,6 @@
               </el-dropdown>
             </el-col>
           </el-row>
-          {{detailList}}
           <el-table
             :data="detailList"
             tooltip-effect="dark"
@@ -972,7 +993,20 @@
                     scope.row.fBillstatus === 30 ||
                     scope.row.fBillstatus === 40
                   "
-                  @click.native.prevent="wDeleteRow(scope.$index, dataList)"
+                  type="text"
+                  @click.native.prevent="fixRow(scope.row, scope.$index)"
+                  size="small"
+                  >修改</el-button
+                >
+                <el-button
+                  :disabled="
+                    browseStatus ||
+                    scope.row.fBillstatus === 20 ||
+                    scope.row.fBillstatus === 30 ||
+                    scope.row.fBillstatus === 40
+                  "
+                  type="text"
+                  @click.native.prevent="wDeleteRow(scope.$index, detailList)"
                   size="small"
                   >移除</el-button
                 >
@@ -1010,7 +1044,8 @@
       </el-collapse-item>
     </el-collapse>
     <el-dialog
-      title="入库明细"
+      v-dialogDrag
+      :title="title"
       :visible.sync="weightList"
       width="80%"
       :close-on-click-modal="false"
@@ -1245,7 +1280,12 @@
         </el-form>
       </div>
       <span slot="footer" class="dialog-footer">
-        <el-button type="info" @click="imporTable">导入库存明细</el-button>
+        <el-button v-if="fixdetaiNum == null" type="info" @click="imporTable"
+          >导入库存明细</el-button
+        >
+        <el-button v-else type="info" @click="fiximporTable"
+          >确认修改</el-button
+        >
         <el-button @click="weightList = false">取 消</el-button>
       </span>
     </el-dialog>
@@ -1348,6 +1388,187 @@
       </span>
     </el-dialog>
     <el-dialog
+      :visible.sync="print_shd"
+      width="70%"
+      :close-on-click-modal="false"
+      :modal="false"
+    >
+      <div id="print_area1" class="print-div">
+        <div
+          class="print-title"
+          style="
+            display: flex;
+            justify-content: center;
+            font-size: 24px;
+            margin-bottom: 5px;
+          "
+        >
+          {{ company }}有限公司收货单
+        </div>
+        <div class="print_table" style="display: flex">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+            <tr>
+              <td>车号</td>
+              <td>{{ fTruckno }}</td>
+              <td>日期</td>
+              <td>{{ fBsdate }}</td>
+            </tr>
+            <tr v-for="(item, index) in Printinglist" :key="index">
+              <td>货物品名</td>
+              <td>{{ item.fGoodsids }}</td>
+              <td>件数</td>
+              <td>{{ item.fQty }}件</td>
+            </tr>
+            <tr>
+              <td>备注</td>
+              <td colspan="3"></td>
+            </tr>
+            <tr>
+              <td>司机签字</td>
+              <td></td>
+              <td>司机电话</td>
+              <td>{{ fDriverTel }}</td>
+            </tr>
+            <tr>
+              <td>制单人</td>
+              <td>{{ form.createBy }}</td>
+              <td>收货人</td>
+              <td>{{ form.fContacts }}</td>
+            </tr>
+            <tr>
+              <td>地址</td>
+              <td>{{ stockaddr }}</td>
+              <td>电话</td>
+              <td>{{ form.fTel }}</td>
+            </tr>
+          </table>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" :disabled="browseStatus" @click="addprint"
+          >打印
+        </el-button>
+        <el-button @click="print_shd = false">取消 </el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+      :visible.sync="print_rkd"
+      width="70%"
+      :close-on-click-modal="false"
+      :modal="false"
+    >
+      <div id="print_area1" class="print-div">
+        <div
+          class="print-title"
+          style="
+            display: flex;
+            justify-content: center;
+            font-size: 24px;
+            margin-bottom: 5px;
+          "
+        >
+          {{ company }}有限公司进仓单
+        </div>
+        <div class="print_table" style="display: flex">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+            <tr>
+              <td>货权方</td>
+              <td>{{ form.fCorpidName }}</td>
+              <td>仓库</td>
+              <td>{{ form.fWarehouseids }}</td>
+              <td>地址</td>
+              <td colspan="2">{{ stockaddr }}</td>
+            </tr>
+            <tr>
+              <td>保管方</td>
+              <td width="200">{{ company }}有限公司</td>
+              <td>联系人</td>
+              <td>{{ form.fContacts }}</td>
+              <td>电话</td>
+              <td colspan="2">{{ form.fTel }}</td>
+            </tr>
+            <tr>
+              <td>提单号</td>
+              <td>品名</td>
+              <td>箱型</td>
+              <td>品牌</td>
+              <td>件数</td>
+              <td>重量</td>
+              <td>包装规格</td>
+            </tr>
+            <tr>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+            </tr>
+            <tr>
+              <td>序号</td>
+              <td>入货日期</td>
+              <td>箱量(20GP)</td>
+              <td>重量</td>
+              <td>件数</td>
+              <td>入库重量</td>
+              <td>入库件数</td>
+            </tr>
+            <tr v-for="(item, index) in Printinglist" :key="index">
+              <td>{{ index + 1 }}</td>
+              <td>{{ item.fBsdate }}</td>
+              <td>{{ item.fCntqty }}</td>
+              <td v-if="item.fGrossweight">
+                {{ (item.fGrossweight / 1000).toFixed(2) }}
+              </td>
+              <td v-else></td>
+              <td>{{ item.fPlanqty }}</td>
+              <td v-if="item.fNetweight">
+                {{ (item.fNetweight / 1000).toFixed(2) }}
+              </td>
+              <td v-else></td>
+              <td>{{ item.fQty }}</td>
+            </tr>
+            <tr>
+              <td colspan="2">合计</td>
+              <td>{{ allfCntqty }}</td>
+              <td>{{ (allfGrossweight / 1000).toFixed(2) }}</td>
+              <td>{{ allfPlanqty }}</td>
+              <td>{{ (allfNetweight / 1000).toFixed(2) }}</td>
+              <td>{{ allfQty }}</td>
+            </tr>
+            <tr>
+              <td>备注</td>
+              <td colspan="6"></td>
+            </tr>
+            <tr>
+              <td colspan="7">
+                本进仓单经仓管员签字并经保管方盖章后即专项作为货物所有人的货权证明,本单据不得转让。
+              </td>
+            </tr>
+          </table>
+        </div>
+        <div
+          style="display: flex; justify-content: space-between; font-size: 12px"
+        >
+          <div>开单员:</div>
+          <div style="width: 150px">仓管员:</div>
+        </div>
+        <div
+          style="display: flex; justify-content: space-between; font-size: 12px"
+        >
+          <div>开单时间:</div>
+          <div style="width: 150px">(盖章)</div>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" :disabled="browseStatus" @click="addprint"
+          >打印
+        </el-button>
+        <el-button @click="print_rkd = false">取消 </el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
       :visible.sync="print_lhd"
       width="70%"
       :close-on-click-modal="false"
@@ -1428,7 +1649,7 @@
             </tr>
             <tr>
               <td colspan="2">合计:</td>
-              <td>{{ allFqty }}</td>
+              <td>{{ allfQty }}</td>
               <td></td>
               <td></td>
               <td></td>
@@ -1510,7 +1731,7 @@
             </tr>
             <tr>
               <td colspan="5">合计:</td>
-              <td>{{ allFqty }}</td>
+              <td>{{ allfQty }}</td>
               <td>{{ allfGrossweight }}</td>
               <td>{{ allfNetweight }}</td>
               <td></td>
@@ -1559,9 +1780,7 @@
         >
           <div>入&nbsp;库&nbsp;单</div>
         </div>
-        <div
-          style="display: flex; justify-content: flex-end; margin-bottom: 5px"
-        >
+        <div style="display: flex; margin-bottom: 5px">
           <div>
             <div>报关单号:{{ form.fCustomno }}</div>
             <div>存货地点:</div>
@@ -1675,7 +1894,7 @@
               <td>总毛重</td>
               <td colspan="2">{{ form.fPlangrossweight }}</td>
               <td>本垛件数</td>
-              <td colspan="2">{{ allFqty }}</td>
+              <td colspan="2">{{ allfQty }}</td>
             </tr>
             <tr>
               <td>本垛净重</td>
@@ -1759,6 +1978,12 @@ import Cookies from "js-cookie";
 import { getToken } from "@/utils/auth";
 export default {
   name: "inStock",
+  props: {
+    chiId: {
+      type: Number,
+      required: null,
+    },
+  },
   components: {
     UploadFile,
   },
@@ -1806,6 +2031,7 @@ export default {
         fDriverName: [{ required: true, message: " ", trigger: "blur" }],
         fDriverTel: [{ required: true, message: " ", trigger: "blur" }],
         fDriverIdCar: [{ required: true, message: " ", trigger: "blur" }],
+        fCntrno: [{ required: true, message: " ", trigger: "blur" }],
       },
       browseStatus: false,
       formBrowseStatus: false,
@@ -1830,33 +2056,9 @@ export default {
       fSbuOptions: [],
       Pledgebank: [],
       collapselist: ["1"],
-      dataListSelection: [],
-      dataWithdrawList: [],
       fStorageTypeOptions: [],
       weightList: false,
-      importList: {
-        fBillstatus: null,
-        fMblno: null,
-        fQty: null,
-        fNetweight: null,
-        fGrossweight: null,
-        fBsdate: null,
-        fGoodsid: null,
-        fBusinessType: null,
-        fMarks: null,
-        fWarehouseInformation: null,
-        fCntrtype: null,
-        fCntqty: null,
-        fPackagespecs: null,
-        fTruckno: null,
-        fDriverName: null,
-        fDriverTel: null,
-        fDriverIdCar: null,
-        fSerialNumber: null,
-        fCntrno: null,
-        fGoodsval: null,
-        remark: null,
-      },
+      importList: {},
       headers: {
         Authorization: "Bearer " + getToken(),
       },
@@ -1873,18 +2075,24 @@ export default {
       print_dpxx: false,
       company: "",
       Printinglist: [],
-      //垛位
-      allFqty: "",
-      //本垛毛重
-      allfNetweight: "",
-      //本垛净重
-      allfGrossweight: "",
       //库位
       stockName: "",
       //库位地址
       stockaddr: "",
       Collectionoptionss: [],
       fDriverTel: "",
+      fBsdate: "",
+      fTruckno: "",
+      allfCntqty: 0,
+      allfGrossweight: 0,
+      allfPlanqty: 0,
+      allfNetweight: 0,
+      allfQty: 0,
+      fixdetaiNum: null,
+      dataListSelection: [],
+      dataWithdrawList: [],
+      title: "",
+      fWarehouselocid: null,
     };
   },
   created() {
@@ -1919,13 +2127,6 @@ export default {
     });
     this.company = localStorage.getItem("companyName");
     this.queryUser();
-      if(this.$route.query.id){
-      this.getForm();
-    }else{
-      this.resetForm("form");
-      this.resetForm("importList");
-      this.detailList=[]
-    }
   },
   filters: {
     fStorageFormat(row) {
@@ -1948,23 +2149,167 @@ export default {
     },
   },
   methods: {
-    // 收款选
-    Collectionoptions(selection) {
-      this.Collectionoptionss = selection;
-      for (let lest in this.fWbuOptions) {
-        for (let li in this.Collectionoptionss) {
+    init() {
+      this.resetForm("form");
+      this.resetForm("importList");
+      this.detailList = [];
+      this.getForm();
+    },
+    reset() {
+      this.importList = {
+        fBillstatus: null,
+        fMblno: null,
+        fQty: null,
+        fNetweight: null,
+        fGrossweight: null,
+        fBsdate: null,
+        fGoodsid: null,
+        fBusinessType: null,
+        fMarks: null,
+        fWarehouselocid: null,
+        fWarehouseInformation: null,
+        fCntrtype: null,
+        fCntqty: null,
+        fPackagespecs: null,
+        fTruckno: null,
+        fDriverName: null,
+        fDriverTel: null,
+        fDriverIdCar: null,
+        fSerialNumber: null,
+        fCntrno: null,
+        fGoodsval: null,
+        remark: null,
+      };
+    },
+    discharge() {
+      if (this.Printinglist.length > 0) {
+        for (let item in this.Printinglist) {
+          if (this.Printinglist[item].fBillstatus === 10) {
+            return this.$message.error("请先打印作业单");
+          }
+          if (this.Printinglist[item].fBillstatus >= 30) {
+            return this.$message.error("请勿重复卸货");
+          }
           if (
-            this.fWbuOptions[lest].fId === this.Collectionoptionss[li].fFeeid
+            this.Printinglist[item].ifCntrno == 1 &&
+            !this.Printinglist[item].fCntrno
           ) {
-            this.$set(
-              this.Collectionoptionss[li],
-              "fFeeids",
-              this.fWbuOptions[lest].fName
+            return this.$message.error(
+              "请输入第" + (Number(item) + 1) + "行的箱号"
             );
           }
         }
+        let formData = new window.FormData();
+        formData.append("warehouseBills", JSON.stringify(this.form));
+        formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+        formData.append(
+          "warehousebillsitems",
+          JSON.stringify(this.Printinglist)
+        );
+        formData.append(
+          "warehousebillsfeesDr",
+          JSON.stringify(this.warehouseDrList)
+        );
+        formData.append(
+          "warehousebillsfeesCr",
+          JSON.stringify(this.warehouseCrList)
+        );
+        disChargelist(formData).then((response) => {
+          if ((response.code = 200)) {
+            this.detailList.map((e, index) => {
+              response.data.warehousebillsitems.map((item) => {
+                if (e.fId == item.fId) {
+                  e = item;
+                  this.$set(this.detailList, index, e);
+                }
+              });
+            });
+            this.msgSuccess("卸货成功");
+          }
+        });
+      } else {
+        this.$message.error("请选择需要卸货的明细!");
       }
     },
+    creditClick() {
+      for (let item in this.Printinglist) {
+        if (!this.Printinglist[item].fId) {
+          return this.$message.error("请存在未保存的数据");
+        }
+        if (this.Printinglist[item].fBillstatus == 10) {
+          return this.$message.error("请存在未打印的作业单");
+        }
+        if (this.Printinglist[item].fBillstatus == 20) {
+          return this.$message.error("请存在未卸货的数据");
+        }
+      }
+      let formData = new window.FormData();
+      formData.append("warehouseBills", JSON.stringify(this.form));
+      formData.append("warehousebillsitems", JSON.stringify(this.Printinglist));
+      formData.append(
+        "warehousebillsfeesDr",
+        JSON.stringify(this.warehouseDrList)
+      );
+      formData.append(
+        "warehousebillsfeesCr",
+        JSON.stringify(this.warehouseCrList)
+      );
+      formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+      formData.append("whgenleg", JSON.stringify(this.relevantAttachments));
+      addWhgenleg(formData).then((response) => {
+        if ((response.code = 200)) {
+          this.detailList.map((e, index) => {
+            response.data.warehousebillsitems.map((item) => {
+              if (e.fId == item.fId) {
+                e = item;
+                this.$set(this.detailList, index, e);
+              }
+            });
+          });
+          this.msgSuccess("入库成功");
+        }
+      });
+    },
+    // 撤回入账
+    withdrawClick() {
+      for (let item in this.Printinglist) {
+        if (!this.Printinglist[item].fId) {
+          return this.$message.error("请存在未保存的数据");
+        }
+        if (this.Printinglist[item].fBillstatus == 10) {
+          return this.$message.error("请存在未打印的作业单");
+        }
+        if (this.Printinglist[item].fBillstatus == 20) {
+          return this.$message.error("请存在未卸货的数据");
+        }
+        if (this.Printinglist[item].fBillstatus == 30) {
+          return this.$message.error("请存在未入库的数据");
+        }
+      }
+      // 撤回入库
+      let formData = new window.FormData();
+      formData.append("warehouseBills", JSON.stringify(this.form));
+      formData.append("warehousebillsitems", JSON.stringify(this.Printinglist));
+      formData.append(
+        "warehousebillsfeesDr",
+        JSON.stringify(this.warehouseDrList)
+      );
+      formData.append(
+        "warehousebillsfeesCr",
+        JSON.stringify(this.warehouseCrList)
+      );
+      formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+      updateCredit(formData).then((response) => {
+        this.Printinglist.map((e) => {
+          this.detailList.map((item, index) => {
+            if (e.fId == item.fId) {
+              this.$set(this.detailList[index], "fBillstatus", 10);
+            }
+          });
+        });
+        this.msgSuccess("撤回成功");
+      });
+    },
     fStorageTypeFormat(row) {
       let fStorageType;
       this.fStorageTypeOptions.map((e) => {
@@ -1992,7 +2337,7 @@ export default {
       return timeFormat;
     },
     getForm() {
-      getWarehousebills(this.$route.query.id).then((response) => {
+      getWarehousebills(this.chiId).then((response) => {
         this.form = response.data.warehousebills;
         this.$set(this.form, "fEta", Date.parse(this.form.fEta));
         this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
@@ -2067,8 +2412,8 @@ export default {
                   });
               } else {
                 this.mblnoStatus = "";
-                this.form=response.data.warehouseBills
-                this.detailList=response.data.warehousebillsitems
+                this.form = response.data.warehouseBills;
+                this.detailList = response.data.warehousebillsitems;
                 this.msgSuccess("保存成功");
               }
             });
@@ -2082,6 +2427,14 @@ export default {
       this.$refs["importList"].validate((valid) => {
         if (valid) {
           let obj = {};
+          this.fWarehouselocid = null;
+          this.fWarehouseidOptions.map((e) => {
+            if (
+              e.fWarehouseInformation == this.importList.fWarehouseInformation
+            ) {
+              this.fWarehouselocid = e.id;
+            }
+          });
           this.detailList.push({
             fBillstatus: 10,
             fMblno: this.form.fMblno,
@@ -2092,6 +2445,7 @@ export default {
             fGoodsid: this.importList.fGoodsid,
             fBusinessType: this.importList.fBusinessType,
             fMarks: this.importList.fMarks,
+            fWarehouselocid: this.fWarehouselocid,
             fWarehouseInformation: this.importList.fWarehouseInformation,
             fCntrtype: this.importList.fCntrtype,
             fCntqty: this.importList.fCntqty,
@@ -2109,38 +2463,24 @@ export default {
         }
       });
     },
+
+    fiximporTable() {
+      this.detailList[this.fixdetaiNum] = this.importList;
+      this.weightList = false;
+    },
     // 库存明细多选
     Selectinventory(selection) {
       this.Printinglist = selection;
+      //允许确认入库list
       this.dataListSelection = [];
+      this.dataListSelection = selection.filter((e) => e.fBillstatus == 30);
+      //允许撤销入库list
       this.dataWithdrawList = [];
-      if (!selection || selection.length === 0) {
-        return false;
-      } else {
-        for (let se in selection) {
-          if (!selection[se].fBillstatus || selection[se].fBillstatus !== 40) {
-            this.dataListSelection.push(selection[se]);
-          } else if (
-            selection[se].fBillstatus &&
-            selection[se].fBillstatus === 40
-          ) {
-            this.dataWithdrawList.push(selection[se]);
-          }
-        }
-      }
-      // 打印回显仓库
-      for (let corp in this.warehouseOptions) {
-        this.fAddr = this.warehouseOptions[corp].fAddr;
-      }
-      // 合计
-      this.allFqty = 0;
-      this.allfGrossweight = 0;
-      this.allfNetweight = 0;
-      for (let corp in this.Printinglist) {
-        this.allFqty += this.Printinglist[corp].fQty;
-        this.allfGrossweight += this.Printinglist[corp].fGrossweight;
-        this.allfNetweight += this.Printinglist[corp].fNetweight;
-      }
+      this.dataWithdrawList = selection.filter((e) => e.fBillstatus == 40);
+      console.log("ruku");
+      console.log(this.dataListSelection);
+      console.log("chexiao");
+      console.log(this.dataWithdrawList);
     },
     // 合计
     getSummaries(param) {
@@ -2169,25 +2509,11 @@ export default {
           sums[index] = values.reduce((prev, curr) => {
             const value = Number(curr);
             if (!isNaN(value)) {
-              if (column.property === "fGrossweight") {
-                this.fGrossweight = prev + curr;
-              }
-              if (column.property === "fNetweight") {
-                this.fNetweight = prev + curr;
-              }
               if (column.property === "fQty") {
-                this.fQty = prev + curr;
                 this.sumMum = prev + curr;
               }
-              if (column.property === "fCntqty") {
-                this.fCntqty = prev + curr;
-              }
               return prev + curr;
             } else {
-              if (column.property === "fQty") {
-                this.fQty = prev;
-                this.mum = prev;
-              }
               return prev;
             }
           }, 0);
@@ -2225,7 +2551,9 @@ export default {
     addRelevant() {
       this.$refs["form"].validate((valid) => {
         if (valid) {
-          this.resetForm("importList");
+          this.title = "新增";
+          this.reset();
+          this.fixdetaiNum = null;
           if (
             !this.form.fPlannetweight ||
             !this.form.fPlangrossweight ||
@@ -2263,40 +2591,76 @@ export default {
       });
     },
     printZyd() {
-      for (let item in this.Printinglist) {
-        if (!this.Printinglist[item].fId) {
-          return this.$message.error("请先保存!");
+      if (this.Printinglist.length > 0) {
+        for (let item in this.Printinglist) {
+          if (!this.Printinglist[item].fId) {
+            return this.$message.error("请先保存!");
+          }
+          if (
+            this.Printinglist[item].fTruckno !== this.Printinglist[0].fTruckno
+          ) {
+            return this.$message.error("请选择车相同车号");
+          }
         }
+        this.print_zyd = true;
+        this.warehouseOptions.map((e) => {
+          if (e.fId == this.form.fWarehouseid) {
+            this.stockaddr = e.fAddr;
+          }
+        });
+        this.fDriverTel = this.Printinglist[0].fDriverTel;
+      } else {
+        this.$message.error("请选择需要打印的明细!");
       }
-      this.print_zyd = true;
-      this.warehouseOptions.map((e) => {
-        if (e.fId == this.form.fWarehouseid) {
-          this.stockaddr = e.fAddr;
-        }
-      });
-      this.fDriverTel = this.Printinglist[0].fDriverTel;
     },
     handleCommand(command) {
-      for (let corp in this.fMblnoOptions) {
-        if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
-          this.$set(this.form, "fCorpidName", this.fMblnoOptions[corp].fName);
-        }
-      }
-      this.warehouseOptions.map((e) => {
-        if (e.fId == this.form.fWarehouseid) {
-          this.stockName = e.fName;
-          this.stockaddr = e.fAddr;
-        }
-      });
-      this.fDriverTel = this.Printinglist[0].fDriverTel;
-      console.log(this.fDriverTel);
       if (this.Printinglist.length > 0) {
         this.$refs["form"].validate((valid) => {
           if (valid) {
+            for (let corp in this.fMblnoOptions) {
+              if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
+                this.$set(
+                  this.form,
+                  "fCorpidName",
+                  this.fMblnoOptions[corp].fName
+                );
+              }
+            }
+            this.warehouseOptions.map((e) => {
+              if (e.fId == this.form.fWarehouseid) {
+                this.stockName = e.fName;
+                this.stockaddr = e.fAddr;
+              }
+            });
+            this.fDriverTel = this.Printinglist[0].fDriverTel;
+            this.fBsdate = this.Printinglist[0].fBsdate;
+            this.fTruckno = this.Printinglist[0].fTruckno;
+            this.allfCntqty = 0;
+            this.allfGrossweight = 0;
+            this.allfPlanqty = 0;
+            this.allfNetweight = 0;
+            this.allfQty = 0;
+            this.Printinglist.map((e) => {
+              if (e.fCntqty) {
+                this.allfCntqty += e.fCntqty;
+              }
+              if (e.fGrossweight) {
+                this.allfGrossweight += e.fGrossweight;
+              }
+              if (e.fPlanqty) {
+                this.allfPlanqty += e.fPlanqty;
+              }
+              if (e.fNetweight) {
+                this.allfNetweight += e.fNetweight;
+              }
+              if (e.fQty) {
+                this.allfQty += e.fQty;
+              }
+            });
             if (command == "a") {
-              this.showEditDialog_ss();
+              this.print_shd = true;
             } else if (command == "b") {
-              this.showEditDialog_s();
+              this.print_rkd = true;
             } else if (command == "c") {
               this.print_lhd = true;
             } else if (command == "d") {
@@ -2320,9 +2684,27 @@ export default {
       var obj = {};
       this.CntrTable.push(obj);
     },
+    fixRow(row, index) {
+      this.title = "修改";
+      this.reset();
+      this.fixdetaiNum = null;
+      this.fixdetaiNum = index;
+      row.fBsdate = new Date(row.fBsdate).getTime();
+      this.importList = row;
+      this.weightList = true;
+    },
     deleteRow(index, rows) {
       rows.splice(index, 1);
     },
+    wDeleteRow(index, rows) {
+      rows.splice(index, 1);
+      this.sumMum = 0;
+      this.detailList.map((e) => {
+        if (e.fQty) {
+          this.sumMum += e.fQty;
+        }
+      });
+    },
     //获取登陆人
     queryUser() {
       queryUserVal().then((response) => {
@@ -2461,7 +2843,10 @@ export default {
       if (status == "zyd") {
         let formData = new window.FormData();
         formData.append("warehouseBills", JSON.stringify(this.form));
-        formData.append("warehousebillsitems", JSON.stringify(this.detailList));
+        formData.append(
+          "warehousebillsitems",
+          JSON.stringify(this.Printinglist)
+        );
         formData.append(
           "warehousebillsfeesDr",
           JSON.stringify(this.warehouseDrList)
@@ -2472,7 +2857,14 @@ export default {
         );
         formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
         addJoblist(formData).then((response) => {
-          console.log(response);
+          this.detailList.map((e, index) => {
+            response.data.warehousebillsitems.map((item) => {
+              if (e.fId == item.fId) {
+                e = item;
+                this.$set(this.detailList, index, e);
+              }
+            });
+          });
         });
       }
       const style =
@@ -2485,82 +2877,15 @@ export default {
         scanStyles: false,
       });
     },
-    // // 打印作业单
-    // addList() {
-    //   this.$refs["form"].validate((valid) => {
-    //     if (valid) {
-    //       let dataList = [];
-    //       for (let se in this.dataListSelection) {
-    //         if (Number(this.dataListSelection[se].fBillstatus) <= 10) {
-    //           dataList.push(this.dataListSelection[se]);
-    //         }
-    //       }
-    //       if (dataList.length !== 0) {
-    //         let formData = new window.FormData();
-    //         formData.append("warehouseBills", JSON.stringify(this.form));
-    //         formData.append("warehousebillsitems", JSON.stringify(dataList));
-    //         formData.append(
-    //           "warehousebillsfeesDr",
-    //           JSON.stringify(this.warehouseDrList)
-    //         );
-    //         formData.append(
-    //           "warehousebillsfeesCr",
-    //           JSON.stringify(this.warehouseCrList)
-    //         );
-    //         formData.append(
-    //           "tEnclosure",
-    //           JSON.stringify(this.relevantAttachments)
-    //         );
-
-    //         addJoblist(formData).then((response) => {
-    //           if (response.code == 200) {
-    //             for (let li in response.data.warehousebillsitems) {
-    //               for (let item in this.Printinglist) {
-    //                 // if (this.Printinglist[item].fId == response.data.warehousebillsitems[li].fId) {
-    //                 //   this.Printinglist[item] = response.data.warehousebillsitems[li]
-    //                 // }
-    //                 if (!this.Printinglist[0].fSerialNumber) {
-    //                   this.fSerialNumber =
-    //                     response.data.warehousebillsitems[0].fSerialNumber;
-    //                 } else {
-    //                   this.fSerialNumber = this.Printinglist[0].fSerialNumber;
-    //                 }
-    //               }
-    //               for (let index in this.dataList) {
-    //                 if (
-    //                   response.data.warehousebillsitems[li].fId ==
-    //                   this.dataList[index].fId
-    //                 ) {
-    //                   this.dataList[index].fSerialNumber =
-    //                     response.data.warehousebillsitems[li].fSerialNumber;
-    //                   this.dataList[index].fBillstatus =
-    //                     response.data.warehousebillsitems[li].fBillstatus;
-    //                 }
-    //               }
-    //             }
-    //             this.print_zyd = false;
-
-    //             setTimeout(function () {
-    //               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_area1",
-    //                 type: "html",
-    //                 style: style, // 亦可使用引入的外部css;
-    //                 scanStyles: false,
-    //               });
-    //               this.print_zyd = false;
-    //             }, 100);
-    //           } else {
-    //             return;
-    //           }
-    //         });
-    //       } else {
-    //         this.printSomething2();
-    //       }
-    //     }
-    //   });
-    // },
+    changeShow(status) {
+      if (status == "save") {
+        this.saveForm();
+      }
+      this.resetForm("form");
+      this.resetForm("importList");
+      this.detailList = [];
+      this.$emit("changeShow", "true");
+    },
   },
   watch: {
     // 监听 addOrUpdateVisible 改变

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 480 - 464
src/views/Warehousing/inStock/index.vue


+ 194 - 111
src/views/jiGang/index.vue

@@ -87,7 +87,7 @@
         @selection-change="handleSelectionChange"
       >
         <el-table-column type="selection" width="55" align="center"/>
-        <el-table-column type="index" label="行号" align="center" fixed/>
+        <el-table-column type="index" label="行号" align="center" fixed width="60"/>
         <el-table-column
           label="日期"
           sortable
@@ -169,12 +169,15 @@
       <div style="margin-bottom: 20px;">
         <el-button round icon="el-icon-arrow-left" @click="open" size="small">返回列表</el-button>
         <el-button type="primary" round size="small" @click="submitForm" icon="el-icon-edit">保 存</el-button>
-        <el-button type="success" round size="small" @click="submit" icon="el-icon-check">提 交</el-button>
-        <el-button type="danger" round size="small" icon="el-icon-close" @click="cancellation" v-if="queryParams.fBillstatus >2">撤销提交</el-button>
+        <el-button type="success" round size="small" @click="submit" icon="el-icon-check" :disabled="disabled">提 交</el-button>
+        <el-button type="danger" round size="small" icon="el-icon-close" @click="cancellation"
+                   v-if="queryParams.fBillstatus >2">撤销提交
+        </el-button>
       </div>
       <el-form
         :model="queryParams"
-        ref="queryForm"
+        ref="rules"
+        :rules="rules"
         :inline="true"
         label-width="88px"
       >
@@ -234,7 +237,6 @@
         stripe
         show-summary
         :disabled="disabled"
-        @selection-change="Collectionoptions"
         :summary-method="warehouseDrSummaries"
       >
         <el-table-column type="selection" width="55" align="center"/>
@@ -254,6 +256,7 @@
               remote
               :remote-method="corpsRemoteMethod"
               placeholder="客户名称"
+              :disabled="disabled"
             >
               <el-option
                 v-for="(dict, index) in KHblnoOptions"
@@ -265,7 +268,7 @@
           </template>
         </el-table-column>
         <el-table-column
-          prop="fFeeUnitid"
+          prop="fFeeunitid"
           header-align="center"
           align="center"
           width="180px"
@@ -274,8 +277,9 @@
           <template slot-scope="scope">
             <el-select
               style="width: 80%"
-              v-model="scope.row.fFeeUnitid"
+              v-model="scope.row.fFeeunitid"
               filterable
+              :disabled="disabled"
             >
               <el-option
                 v-for="(dict, index) in businessTypeOption"
@@ -286,6 +290,32 @@
             </el-select>
           </template>
         </el-table-column>
+
+
+        <el-table-column
+          prop="fFeeid"
+          header-align="center"
+          align="center"
+          width="180px"
+          label="费用名称"
+        >
+          <template slot-scope="scope">
+            <el-select
+              style="width: 80%"
+              v-model="scope.row.fFeeid"
+              filterable
+              :disabled="disabled"
+            >
+              <el-option
+                v-for="(dict, index) in fFeeid_s"
+                :key="index.fId"
+                :label="dict.fName"
+                :value="dict.fId"
+              ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+
         <el-table-column
           prop="fInventoryDays"
           header-align="center"
@@ -298,6 +328,7 @@
               v-model="scope.row.fInventoryDays"
               placeholder="请选择箱型"
               clearable
+              :disabled="disabled"
             >
               <el-option
                 v-for="(dict, index) in jFeetunitOptions"
@@ -320,7 +351,9 @@
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fQty"
               placeholder="箱量"
+              @input="calculation(scope.row)"
               show-word-limit
+              :disabled="disabled"
             />
           </template>
         </el-table-column>
@@ -337,6 +370,8 @@
               v-model="scope.row.fUnitprice"
               placeholder="单价"
               show-word-limit
+              @input="calculation(scope.row)"
+              :disabled="disabled"
             />
           </template>
         </el-table-column>
@@ -349,6 +384,7 @@
         >
           <template slot-scope="scope">
             <el-input
+              :disabled="disabled"
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fAmt"
               placeholder="金额"
@@ -367,7 +403,7 @@
                     deleteRow(scope.$index, warehouseDrList)
                   "
               size="small"
-              :disabled="browseStatus"
+              :disabled="disabled"
             >移除
             </el-button
             >
@@ -390,12 +426,14 @@
             type="primary"
             @click.prevent="addpayment()"
             size="small"
+            :disabled="disabled"
           >新行
           </el-button>
         </div>
       </div>
       <el-table
         :data="warehouseCrList"
+        :disabled="disabled"
         ref="table"
         tooltip-effect="dark"
         border
@@ -417,6 +455,7 @@
             <el-select
               v-model="scope.row.fCorpid"
               filterable
+              :disabled="disabled"
               remote
               :remote-method="corpsRemoteMethod"
               placeholder="客户名称"
@@ -431,7 +470,7 @@
           </template>
         </el-table-column>
         <el-table-column
-          prop="fFeeUnitid"
+          prop="fFeeunitid"
           header-align="center"
           align="center"
           width="180px"
@@ -440,8 +479,9 @@
           <template slot-scope="scope">
             <el-select
               style="width: 80%"
-              v-model="scope.row.fFeeUnitid"
+              v-model="scope.row.fFeeunitid"
               filterable
+              :disabled="disabled"
             >
               <el-option
                 v-for="(dict, index) in businessTypeOption"
@@ -453,6 +493,29 @@
           </template>
         </el-table-column>
         <el-table-column
+          prop="fFeeid"
+          header-align="center"
+          align="center"
+          width="180px"
+          label="费用名称"
+        >
+          <template slot-scope="scope">
+            <el-select
+              style="width: 80%"
+              v-model="scope.row.fFeeid"
+              filterable
+              :disabled="disabled"
+            >
+              <el-option
+                v-for="(dict, index) in fFeeid_s"
+                :key="index.fId"
+                :label="dict.fName"
+                :value="dict.fId"
+              ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
           prop="fInventoryDays"
           header-align="center"
           align="center"
@@ -463,6 +526,7 @@
             <el-select
               v-model="scope.row.fInventoryDays"
               placeholder="请选择箱型"
+              :disabled="disabled"
               clearable
             >
               <el-option
@@ -483,9 +547,11 @@
         >
           <template slot-scope="scope">
             <el-input
+              :disabled="disabled"
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fQty"
               placeholder="箱量"
+              @input="calculation(scope.row)"
               show-word-limit
             />
           </template>
@@ -499,8 +565,10 @@
         >
           <template slot-scope="scope">
             <el-input
+              :disabled="disabled"
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fUnitprice"
+              @input="calculation(scope.row)"
               placeholder="单价"
               show-word-limit
             />
@@ -515,6 +583,7 @@
         >
           <template slot-scope="scope">
             <el-input
+              :disabled="disabled"
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fAmt"
               placeholder="金额"
@@ -534,7 +603,7 @@
                     deleteRoww(scope.$index, warehouseCrList)
                   "
               size="small"
-              :disabled="browseStatus"
+              :disabled="disabled"
             >移除
             </el-button
             >
@@ -546,19 +615,33 @@
 </template>
 
 <script>
-import { listCorps, preservation, submit, allInformation,single ,singleDeletion,listCorps_s,revokeContainerPort} from '@/api/jiGang'
-import { listFees } from '@/api/basicdata/fees'
+import {
+  listCorps,
+  preservation,
+  submit,
+  allInformation,
+  single,
+  singleDeletion,
+  listCorps_s,
+  revokeContainerPort
+} from '@/api/jiGang'
+import {listFees} from '@/api/basicdata/fees'
 
 export default {
   name: 'jiGang',
   data() {
     return {
+      rules:{
+        fBsdate:[{required: true, message: ' ', trigger: 'blur'}],
+        fMblno:[{required: true, message: ' ', trigger: 'blur'}]
+      },
       showSearch: true,
       jiGang: false,
-      disabled:false,
+      disabled: false,
       agreementList: [],
       warehouseCrList: [],
       fCNameOptions: [],
+      fFeeid_s: [],
       fStltypeOptions: [],
       jFeetunitOptions: [],
       KHblnoOptions: [],
@@ -568,22 +651,31 @@ export default {
       businessTypeOption: [],
       loading: true,
       blnoOptions: [],
-      single:true,
-      total:0,
+      single: true,
+      total: 0,
       query: {
         pageNum: 1,
         pageSize: 10
       },
-      selection:[],
+      selection: [],
       queryParams: {}
     }
   },
   created() {
     allInformation().then(res => {
       console.log(res)
-      this.jFeetunitOptions = res.data.cntrList
-      this.businessTypeOption = res.data.pierList
-      this.KHblnoOptions = res.data.corpList
+      if (res.data.corpList) {
+        this.KHblnoOptions = res.data.corpList
+      }
+      if (res.data.pierList) {
+        this.businessTypeOption = res.data.pierList
+      }
+      if (res.data.cntrList) {
+        this.jFeetunitOptions = res.data.cntrList
+      }
+      if (res.data.fees) {
+        this.fFeeid_s = res.data.fees
+      }
     })
     this.getList()
   },
@@ -610,7 +702,7 @@ export default {
       if (name == null || name === '') {
         return false
       }
-      let queryParams = { pageNum: 1, fName: name, type: 1 }
+      let queryParams = {pageNum: 1, fName: name, type: 1}
       listCorps(queryParams).then((response) => {
         console.log(response)
         this.fMblnoOptions = response.rows
@@ -620,7 +712,7 @@ export default {
     changeFeeId(row) {
       for (let li in this.fWbuOptions) {
         if (row.fFeeid === this.fWbuOptions[li].fId) {
-          this.$set(row, 'fFeeUnitid', this.fWbuOptions[li].fFeeunitid + '')
+          this.$set(row, 'fFeeunitid', this.fWbuOptions[li].fFeeunitid + '')
           this.changeFeeUnit(row)
           break
         }
@@ -645,68 +737,67 @@ export default {
     handleSelectionChange(selection) {
       console.log(selection)
       this.selection = selection
-      if (selection.length === 1){
+      if (selection.length === 1) {
         this.single = false
-      }else {
+      } else {
         this.single = true
       }
     },
-    handleUpdate(row){
+    handleUpdate(row) {
       let fId
-      if (this.selection.length == 1){
+      if (this.selection.length == 1) {
         fId = this.selection[0].fId
-      }else {
+      } else {
         fId = row.fId
       }
-      single(fId).then(res =>{
-        if (res.code === 200){
+      single(fId).then(res => {
+        if (res.code === 200) {
           this.jiGang = true
           this.queryParams = res.data.warehouseBills
           this.warehouseDrList = res.data.feesDrList
           this.warehouseCrList = res.data.feesCrList
-          this.warehouseDrList.fFeeUnitid = this.warehouseDrList.fFeeUnitid +''
-          this.warehouseCrList.fFeeUnitid = this.warehouseCrList.fFeeUnitid +''
-          if (this.queryParams.fBillstatus !== 2){
+          for (let item in this.warehouseDrList){
+            this.warehouseDrList[item].fFeeunitid = this.warehouseDrList[item].fFeeunitid + ''
+          }
+          for (let item in this.warehouseCrList){
+            this.warehouseCrList[item].fFeeunitid = this.warehouseCrList[item].fFeeunitid + ''
+          }
+          if (this.queryParams.fBillstatus !== 2) {
             this.disabled = true
-          }else {
+          } else {
             this.disabled = false
           }
         }
       })
     },
-    handleDelete(row){
-      singleDeletion(row.fId).then(res =>{
+    handleDelete(row) {
+      singleDeletion(row.fId).then(res => {
         console.log(res)
+        if (res.code === 200){
+          this.$message.success(res.msg);
+          this.getList()
+        }
       })
     },
     handleAdd() {
       this.jiGang = true
+      this.disabled = false
       this.queryParams = {}
       this.warehouseDrList = []
       this.warehouseCrList = []
     },
     addpayment() {
       this.warehouseCrList.push({
-        fCorpid: null,
-        fFeeid: null,
-        fFeeUnitid: '',
-        fQty: null,
-        fUnitprice: null,
-        fAmount: null,
-        fCurrency: 'RMB',
-        fExrate: '1',
-        fTaxrate: '',
-        fCxrate: null,
-        fRate: null,
-        remarks: null,
-        fMblno: '',
-        fProductName: '',
-        fMarks: '',
-        fBusinessType: '',
-        fSrcTypeId: 0
+        fCorpid: '',
+        fFeeunitid: '',
+        fInventoryDays: '',
+        fQty: '',
+        fUnitprice: '',
+        fAmt: '',
+        fFeeid: ''
       })
       this.fWbuOptions = []
-      let queryParams = { pageNum: 1, fDc: 'C' }
+      let queryParams = {pageNum: 1, fDc: 'C'}
       listFees(queryParams).then((response) => {
         this.fCNameOptions = response.rows
       })
@@ -718,72 +809,80 @@ export default {
       rows.splice(index, 1)
     },
     submitForm() {
-      let formDatae = new window.FormData()
-      formDatae.append('warehouseBills', JSON.stringify(this.queryParams))
-      formDatae.append('feesCr', JSON.stringify(this.warehouseDrList))
-      formDatae.append('feesDr', JSON.stringify(this.warehouseCrList))
-      preservation(formDatae).then(res => {
-        console.log(res)
-        if (res.code === 200){
-          this.$message.success('保存成功');
+      this.$refs["rules"].validate((valid) => {
+        if (valid) {
+          let formDatae = new window.FormData()
+          formDatae.append('warehouseBills', JSON.stringify(this.queryParams))
+          formDatae.append('feesDr', JSON.stringify(this.warehouseDrList))
+          formDatae.append('feesCr', JSON.stringify(this.warehouseCrList))
+          preservation(formDatae).then(res => {
+            console.log(res)
+            if (res.code === 200) {
+              this.$message.success('保存成功');
+              this.getList()
+              this.jiGang = false
+            }
+          })
         }
-      })
+      });
     },
     submit() {
-      let formDatae = new window.FormData()
-      formDatae.append('warehouseBills', JSON.stringify(this.queryParams))
-      formDatae.append('feesCr', JSON.stringify(this.warehouseDrList))
-      formDatae.append('feesDr', JSON.stringify(this.warehouseCrList))
-      submit(formDatae).then(res => {
-        console.log(res)
-        if(res.code === 200){
-          this.$message.success('提交成功');
+      this.$refs["rules"].validate((valid) => {
+        if (valid) {
+          let formDatae = new window.FormData()
+          formDatae.append('warehouseBills', JSON.stringify(this.queryParams))
+          formDatae.append('feesDr', JSON.stringify(this.warehouseDrList))
+          formDatae.append('feesCr', JSON.stringify(this.warehouseCrList))
+          submit(formDatae).then(res => {
+            console.log(res)
+            if (res.code === 200) {
+              this.$message.success('提交成功');
+              this.getList()
+              this.jiGang = false
+            }
+          })
         }
-      })
+      });
     },
-    cancellation(){
-      let formDatae = new window.FormData()
-      formDatae.append('warehouseBills', JSON.stringify(this.queryParams))
-      formDatae.append('feesCr', JSON.stringify(this.warehouseDrList))
-      formDatae.append('feesDr', JSON.stringify(this.warehouseCrList))
-      revokeContainerPort(formDatae).then(res => {
+    cancellation() {
+      // let formDatae = new window.FormData()
+      // formDatae.append('warehouseBills', JSON.stringify(this.queryParams))
+      // formDatae.append('feesDr', JSON.stringify(this.warehouseDrList))
+      // formDatae.append('feesCr', JSON.stringify(this.warehouseCrList))
+      revokeContainerPort(this.queryParams.fId).then(res => {
         console.log(res)
-        if(res.code === 200){
+        if (res.code === 200) {
           this.$message.success('撤销成功');
+          this.getList()
+          this.jiGang = false
         }
       })
     },
+    calculation(row) {
+      console.log(row)
+      if (row.fQty && row.fUnitprice) {
+        row.fAmt = Number(row.fQty) * Number(row.fUnitprice)
+      }
+    },
     addCollection() {
       this.warehouseDrList.push({
         fCorpid: '',
-        fFeeUnitid: '',
+        fFeeunitid: '',
         fInventoryDays: '',
         fQty: '',
         fUnitprice: '',
-        fAmt: ''
+        fAmt: '',
+        fFeeid: ''
       })
       this.fWbuOptions = []
-      let queryParams = { pageNum: 1, fDc: 'D' }
+      let queryParams = {pageNum: 1, fDc: 'D'}
       listFees(queryParams).then((response) => {
         this.fDNameOptions = response.rows
       })
     },
-    fWRemoteMethod(name) {
-      if (name == null || name === '') {
-        return false
-      }
-      let queryParams = { pageNum: 1, fDc: 'C', fName: name }
-      listFees(queryParams).then((response) => {
-        this.fCNameOptions = response.rows
-      })
-      let query = { pageNum: 1, fDc: 'D', fName: name }
-      listFees(query).then((response) => {
-        this.fDNameOptions = response.rows
-      })
-    },
     // 付款合计
     warehouseDrSummaries(param) {
-      const { columns, data } = param
+      const {columns, data} = param
       const sums = []
       columns.forEach((column, index) => {
         if (index === 0) {
@@ -810,22 +909,6 @@ export default {
       })
       return sums
     },
-    Collectionoptions(selection) {
-      this.Collectionoptionss = selection
-      for (let lest in this.fWbuOptions) {
-        for (let li in this.Collectionoptionss) {
-          if (
-            this.fWbuOptions[lest].fId === this.Collectionoptionss[li].fFeeid
-          ) {
-            this.$set(
-              this.Collectionoptionss[li],
-              'fFeeids',
-              this.fWbuOptions[lest].fName
-            )
-          }
-        }
-      }
-    }
   }
 }
 </script>

+ 14 - 0
src/views/track/cabinet/index.vue

@@ -764,6 +764,20 @@ export default {
           checked: 0,
           width: 100,
         },
+        {
+          surface: "37",
+          label: "mBillNo",
+          name: "主单号",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "38",
+          label: "billKind",
+          name: "单据类型",
+          checked: 0,
+          width: 100,
+        },
       ],
       allCheck: false,
       title: "",

+ 1 - 1
src/views/warehouseBusiness/cargoClearance/index.vue

@@ -4039,7 +4039,7 @@ export default {
     },
     Jump() {
       this.approval = this.$route.query.data;
-      if (this.approval) {
+      if (this.approval && this.approval !== "{}") {
         let queryParams = { pageNum: 1, fDc: "C" };
         listFees(queryParams).then((response) => {
           this.fCNameOptions = response.rows;

+ 2 - 2
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -2682,7 +2682,7 @@ export default {
           index === 13 ||
           index === 11 ||
           index === 12 ||
-          index === 14 || 
+          index === 14 ||
           index === 15
         ) {
           const values = data.map((item) => Number(item[column.property]));
@@ -2740,7 +2740,7 @@ export default {
     },
     Jump() {
       this.approval = this.$route.query.data;
-      if (this.approval) {
+      if (this.approval && this.approval !== "{}") {
         this.getTreeselect();
         this.reset();
         this.colseButton = false;

+ 2 - 2
src/views/warehouseBusiness/inStock/index.vue

@@ -3567,7 +3567,7 @@
             <div>入&nbsp;库&nbsp;单</div>
           </div>
           <div
-            style="display: flex; justify-content: flex-end; margin-bottom: 5px"
+            style="display: flex; margin-bottom: 5px"
           >
             <div>
               <div>报关单号:{{ form.fCustomno }}</div>
@@ -4633,7 +4633,7 @@ export default {
     //首页审批跳转
     adoPt() {
       this.approval = this.$route.query.data;
-      if (this.approval) {
+      if (this.approval && this.approval !== "{}") {
         let queryParams = { pageNum: 1, fDc: "C" };
         listFees(queryParams).then((response) => {
           this.fCNameOptions = response.rows;

+ 1 - 1
src/views/warehouseBusiness/outStock/index.vue

@@ -4586,7 +4586,7 @@ export default {
     //审批页面跳转
     adoPt() {
       this.approval = this.$route.query.data;
-      if (this.approval) {
+      if (this.approval && this.approval !== "{}") {
         let queryParams = { pageNum: 1, fDc: "C" };
         listFees(queryParams).then((response) => {
           this.fCNameOptions = response.rows;

+ 1 - 1
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -4232,7 +4232,7 @@ export default {
     },
     Jump() {
       this.approval = this.$route.query.data;
-      if (this.approval) {
+      if (this.approval && this.approval !== "{}") {
         let queryParams = { pageNum: 1, fDc: "C" };
         listFees(queryParams).then((response) => {
           this.fCNameOptions = response.rows;

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است