Parcourir la source

查看,箱量计价单位判断。

tong il y a 4 ans
Parent
commit
103a4ec575

Fichier diff supprimé car celui-ci est trop grand
+ 313 - 158
src/views/warehouseBusiness/inStock/index.vue


+ 154 - 7
src/views/warehouseBusiness/outStock/index.vue

@@ -111,7 +111,7 @@
           type="primary"
           icon="el-icon-plus"
           size="mini"
-          @click="handleAdd"
+          @click="handleAdd(false)"
           v-hasPermi="['warehouseBusiness:warehousebills:add']"
         >新增
         </el-button>
@@ -199,7 +199,15 @@
             size="mini"
             type="text"
             icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
+            @click="handleUpdate(scope.row, true)"
+            v-hasPermi="['warehouseBusiness:warehousebills:edit']"
+          >查看
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row, false)"
             v-hasPermi="['warehouseBusiness:warehousebills:edit']"
           >修改
           </el-button>
@@ -244,6 +252,7 @@
                 v-model="form.fCorpid"
                 filterable
                 remote
+                :disabled="browseStatus"
                 style="width: 250px"
                 :remote-method="corpsRemoteMethod"
                 placeholder="请选择原货权方"
@@ -262,6 +271,7 @@
               <el-select
                 v-model="form.fStltypeid"
                 placeholder="请选择结算方式"
+                :disabled="browseStatus"
                 clearable
                 style="width: 250px"
               >
@@ -279,6 +289,7 @@
               <el-input
                 v-model="form.fMblno"
                 style="width: 250px"
+                :disabled="browseStatus"
                 placeholder="手工输入"
               />
             </el-form-item>
@@ -291,6 +302,7 @@
                 v-model="form.fBsdate"
                 style="width: 250px"
                 type="date"
+                :disabled="browseStatus"
                 @change="changefBsdate"
                 value-format="timestamp"
                 placeholder="业务日期"
@@ -305,6 +317,7 @@
                 v-model="form.fStorekeeper"
                 filterable
                 remote
+                :disabled="browseStatus"
                 style="width: 250px"
                 :remote-method="userRemoteMethod"
                 placeholder="请选择仓管员"
@@ -324,6 +337,7 @@
                 v-model="form.fWarehouseid"
                 filterable
                 remote
+                :disabled="browseStatus"
                 style="width: 250px"
                 :remote-method="warehouseRemoteMethod"
                 placeholder="请选择仓库"
@@ -355,6 +369,7 @@
               <el-select
                 v-model="form.fIfdamage"
                 placeholder="请选择是否破损"
+                :disabled="browseStatus"
                 clearable
                 style="width: 250px"
               >
@@ -372,6 +387,7 @@
               <el-select
                 v-model="form.fIfweigh"
                 placeholder="请选择是否过磅"
+                :disabled="browseStatus"
                 clearable
                 style="width: 250px"
               >
@@ -392,6 +408,7 @@
               <el-select
                 v-model="form.fIfpledge"
                 placeholder="请选择是否过磅"
+                :disabled="browseStatus"
                 clearable
                 style="width: 250px"
               >
@@ -408,6 +425,7 @@
             <el-form-item label="质押银行" prop="fbankcorpid">
               <el-input
                 v-model="form.fBankcorpid"
+                :disabled="browseStatus"
                 laceholder="质押银行"
                 style="width: 250px"
               />
@@ -418,6 +436,7 @@
               <el-select
                 v-model="form.fFeetunit"
                 placeholder="请选择计费单位"
+                :disabled="browseStatus"
                 clearable
                 style="width: 250px"
               >
@@ -436,6 +455,7 @@
             <el-input
               style="width: 100%"
               v-model="form.remark"
+              :disabled="browseStatus"
               type="textarea"
               placeholder="请输入内容"
             />
@@ -470,6 +490,7 @@
             <el-form-item label="仓库电话" prop="ftel">
               <el-input
                 v-model="form.fTel"
+                :disabled="browseStatus"
                 style="width: 250px"
                 placeholder="请输仓库入电话"
               />
@@ -479,6 +500,7 @@
             <el-form-item label="船名航次" prop="fvslvoy">
               <el-input
                 v-model="form.fVslvoy"
+                :disabled="browseStatus"
                 style="width: 250px"
                 placeholder="船名航次"
               />
@@ -492,6 +514,7 @@
                 v-model="form.fEta"
                 style="width: 250px"
                 type="date"
+                :disabled="browseStatus"
                 value-format="timestamp"
                 placeholder="到港日期"
               >
@@ -503,6 +526,7 @@
               <el-input
                 v-model="form.fCustomno"
                 style="width: 250px"
+                :disabled="browseStatus"
                 laceholder="报关单号"
               />
             </el-form-item>
@@ -514,6 +538,7 @@
                 v-model="form.fSbu"
                 filterable
                 remote
+                :disabled="browseStatus"
                 :remote-method="fSbuRemoteMethod"
                 style="width: 250px"
                 placeholder="请选择经营单位"
@@ -549,6 +574,7 @@
               <el-input
                 v-model="form.fOriginalbillno"
                 style="width: 250px"
+                :disabled="browseStatus"
                 placeholder="单据编号"
               />
             </el-form-item>
@@ -558,6 +584,7 @@
               <el-select
                 v-model="form.fTrademodeid"
                 placeholder="请选择贸易方式"
+                :disabled="browseStatus"
                 clearable
                 style="width: 250px"
               >
@@ -619,6 +646,7 @@
               <el-input
                 v-model="form.fMarks"
                 style="width: 250px"
+                :disabled="browseStatus"
                 placeholder="唛头"
               />
             </el-form-item>
@@ -694,12 +722,30 @@
             <el-input
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fCntrtype"
+              :disabled="browseStatus"
               placeholder="箱型"
               show-word-limit
             />
           </template>
         </el-table-column>
         <el-table-column
+          prop="fCntqty"
+          header-align="center"
+          align="center"
+          width="140px"
+          label="箱量"
+        >
+          <template slot-scope="scope">
+            <el-input
+              oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+              v-model="scope.row.fCntqty"
+              placeholder="箱量"
+              :disabled="browseStatus"
+              show-word-limit
+            />
+          </template>
+        </el-table-column>
+        <el-table-column
           prop="fQtyblc"
           header-align="center"
           align="center"
@@ -716,6 +762,7 @@
         >
           <template slot-scope="scope">
             <el-input
+            :disabled="browseStatus"
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fGrossweight"
               placeholder="出库毛重"
@@ -734,6 +781,7 @@
             <el-input
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fNetweight"
+              :disabled="browseStatus"
               placeholder="出库净重"
               show-word-limit
             />
@@ -750,6 +798,7 @@
             <el-input
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fQty"
+              :disabled="browseStatus"
               placeholder="出库件数"
               show-word-limit
             />
@@ -766,6 +815,7 @@
             <el-input
               oninput="value=value.replace(/[^\d.]/g,'')"
               v-model="scope.row.fPackagespecs"
+              :disabled="browseStatus"
               placeholder="包装规格"
               show-word-limit
             />
@@ -799,6 +849,7 @@
                 v-for="dict in kqhouseOptions"
                 :key="dict.fId"
                 :label="dict.fName"
+                :disabled="browseStatus"
                 :value="dict.fId"
               ></el-option>
             </el-select>
@@ -815,6 +866,7 @@
             <el-input
               v-model="scope.row.fCntrno"
               placeholder="箱号"
+              :disabled="browseStatus"
               show-word-limit
             />
           </template>
@@ -831,6 +883,7 @@
               oninput="value=value.replace(/[^\d.]/g,'')"
               v-model="scope.row.fGoodsval"
               placeholder="货值"
+              :disabled="browseStatus"
               show-word-limit
             />
           </template>
@@ -847,6 +900,7 @@
               oninput="value=value.replace(/[^\d.]/g,'')"
               v-model="scope.row.fTruckno"
               placeholder="车号"
+              :disabled="browseStatus"
               show-word-limit
             />
           </template>
@@ -862,6 +916,7 @@
             <el-input
               v-model="scope.row.remark"
               placeholder="备注"
+              :disabled="browseStatus"
               show-word-limit
             />
           </template>
@@ -987,6 +1042,7 @@
         border
         stripe
         show-summary
+        :summary-method="getwarehouseDrList"
       >
         <el-table-column label="序号" type="index" width="80">
         </el-table-column>
@@ -1008,6 +1064,7 @@
               v-model="scope.row.fCorpid"
               filterable
               remote
+              :disabled="browseStatus"
               :remote-method="corpsRemoteMethod"
               placeholder="客户名称"
             >
@@ -1032,6 +1089,7 @@
               v-model="scope.row.fFeeid"
               filterable
               remote
+              :disabled="browseStatus"
               :remote-method="fWRemoteMethod"
               placeholder="费用名称"
             >
@@ -1060,6 +1118,8 @@
             <el-select
               v-model="scope.row.fFeeUnitid"
               placeholder="请选择计费单位"
+              @change="changefFeeunitid"
+              :disabled="browseStatus"
               clearable
             >
               <el-option
@@ -1083,6 +1143,7 @@
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fQty"
               placeholder="数量"
+              :disabled="browseStatus"
               @change="changeEstmateAmt(scope.row)"
               show-word-limit
             />
@@ -1100,6 +1161,7 @@
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fUnitprice"
               placeholder="单价"
+              :disabled="browseStatus"
               @change="changeContractAmt(scope.row)"
               show-word-limit
             />
@@ -1190,7 +1252,7 @@
           header-align="center"
           align="center"
           label="操作"
-          width="150px"
+          width="200px"
         >
           <template slot-scope="scope">
             <el-button size="small">审核费用</el-button>
@@ -1215,6 +1277,7 @@
         border
         stripe
         show-summary
+        :summary-method="getwarehouseCrList"
       >
         <el-table-column label="序号" type="index" width="80">
         </el-table-column>
@@ -1236,6 +1299,7 @@
               v-model="scope.row.fCorpid"
               filterable
               remote
+              :disabled="browseStatus"
               :remote-method="corpsRemoteMethod"
               placeholder="客户名称"
             >
@@ -1265,6 +1329,7 @@
               v-model="scope.row.fFeeid"
               filterable
               remote
+              :disabled="browseStatus"
               :remote-method="fWRemoteMethod"
               placeholder="费用名称"
             >
@@ -1293,6 +1358,8 @@
             <el-select
               v-model="scope.row.fFeeUnitid"
               placeholder="请选择计费单位"
+              @change="changefFeeunitids"
+              :disabled="browseStatus"
               clearable
             >
               <el-option
@@ -1316,6 +1383,7 @@
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fQty"
               @change="changeEstmateAmt(scope.row)"
+              :disabled="browseStatus"
               placeholder="数量"
               show-word-limit
             />
@@ -1333,6 +1401,7 @@
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fUnitprice"
               @change="changeContractAmt(scope.row)"
+              :disabled="browseStatus"
               placeholder="单价"
               show-word-limit
             />
@@ -1422,7 +1491,7 @@
         <el-table-column
           header-align="center"
           align="center"
-          width="150px"
+          width="200px"
           label="操作"
         >
           <template slot-scope="scope">
@@ -1829,6 +1898,9 @@
     },
     data() {
       return {
+        fFeeUnitid: "",
+        fFeeUnitids: "",
+        browseStatus: false,
         fGrossweight: '',
         fNetweight: '',
         fQty: '',
@@ -2295,7 +2367,8 @@
         this.dialogWhgenlegList = selection
       },
       /** 新增按钮操作 */
-      handleAdd() {
+      handleAdd(status) {
+        this.browseStatus = status
         this.reset();
         this.queryUser();
         this.open = true;
@@ -2306,7 +2379,8 @@
         this.title = "出库单";
       },
       /** 修改按钮操作 */
-      handleUpdate(row) {
+      handleUpdate(row, status) {
+        this.browseStatus = status
         this.reset();
         const fId = row.fId || this.ids;
         getWarehousebills(fId).then((response) => {
@@ -2403,14 +2477,19 @@
           if (column.property === 'fqty') {
             values = data.map(item => Number(item['fQty']))
           }
+        if (column.property === "fCntqty") {
+                  values = data.map((item) => Number(item["fCntqty"]));
+                }
       
         // const values = data.map(item => Number(item[column.property]))
-        if (column.property === 'fgrossweight' || column.property === 'fnetweight' || column.property === 'fqty') {
+        if (column.property === 'fgrossweight' || column.property === 'fnetweight' || column.property === 'fqty' ||
+          column.property === "fCntqty") {
           sums[index] = values.reduce((prev, curr) => {
             const value = Number(curr)
             if (!isNaN(value)) {
             if (column.property === 'fgrossweight') {
                   this.form.fGrossweight = prev + curr
+                  this.fGrossweight = prev + curr;
                 }
             if (column.property === 'fnetweight') {
                 this.form.fNetweight = prev + curr
@@ -2418,6 +2497,9 @@
             if (column.property === 'fqty') {
                 this.form.fQty = prev + curr
             }
+            if (column.property === "fCntqty") {
+                this.fCntqty = prev + curr;
+              }
               return prev + curr
             } else {
               return prev
@@ -2430,6 +2512,71 @@
    return sums
 
     },
+      // 收款信息计价单位合计
+    getwarehouseDrList(param) {
+      console.log(param);
+      const { columns, data } = param;
+      const sums = [];
+      var values = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = "总价";
+          return;
+        }
+        if (index === 3) {
+          // values = data.map((item) => Number(item["fFeeUnitid"]));
+           sums[index] = this.fFeeUnitid;
+          return;
+
+        }
+      });
+      this.sums = sums;
+      return sums;
+
+    },
+    // 付款信息计价单位合计
+    getwarehouseCrList(param) {
+      console.log(param);
+      const { columns, data } = param;
+      const sums = [];
+      var values = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = "总价";
+          return;
+        }
+        if (index === 3) {
+          // values = data.map((item) => Number(item["fFeeUnitid"]));
+           sums[index] = this.fFeeUnitids;
+          return;
+
+        }
+      });
+      this.sums = sums;
+      return sums;
+
+    },
+    // 计价单位选择
+    changefFeeunitid(row) {
+       console.log(row)
+       if(row === "0"){
+         console.log(this.fCntqty)
+         this.fFeeUnitid = this.fCntqty
+       }else{
+         console.log(this.fGrossweight)
+         this.fFeeUnitid = this.fGrossweight
+       }
+    },
+     // 计价单位选择
+    changefFeeunitids(row) {
+       console.log(row)
+       if(row === "0"){
+         console.log(this.fFeeUnitid)
+         this.fFeeUnitids = this.fCntqty
+       }else{
+         this.fFeeUnitids = this.fGrossweight
+       }
+    },
       /** 提交按钮 */
       submitForm(status) {
         console.log(this.form.fGrossweight)

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff