소스 검색

修改仓储费计算页面

阿伏兔 4 년 전
부모
커밋
6dabe435f4
2개의 변경된 파일109개의 추가작업 그리고 67개의 파일을 삭제
  1. 2 3
      src/views/warehouseBusiness/outStock/index.vue
  2. 107 64
      src/views/warehouseBusiness/storageFeeCalculation/index.vue

+ 2 - 3
src/views/warehouseBusiness/outStock/index.vue

@@ -3914,7 +3914,7 @@ export default {
               for (let i in this.dataList) {
               for (let i in this.dataList) {
                 let fQty =
                 let fQty =
                   this.dataList[i].fQty === this.dataListSelection[li].fQty;
                   this.dataList[i].fQty === this.dataListSelection[li].fQty;
-              
+
                 let fGoodsid =
                 let fGoodsid =
                   this.dataList[i].fGoodsid ===
                   this.dataList[i].fGoodsid ===
                   this.dataListSelection[li].fGoodsid;
                   this.dataListSelection[li].fGoodsid;
@@ -4008,7 +4008,7 @@ export default {
           // }
           // }
         }
         }
           this.$refs["form"].validate((valid) => {
           this.$refs["form"].validate((valid) => {
-            
+
             if (valid) {
             if (valid) {
               let formData = new window.FormData();
               let formData = new window.FormData();
               console.log(this.form);
               console.log(this.form);
@@ -4033,7 +4033,6 @@ export default {
               for (let i in this.dataList) {
               for (let i in this.dataList) {
                 let fQty =
                 let fQty =
                   this.dataList[i].fQty === this.dataListSelection[li].fQty;
                   this.dataList[i].fQty === this.dataListSelection[li].fQty;
-              
                 let fGoodsid =
                 let fGoodsid =
                   this.dataList[i].fGoodsid ===
                   this.dataList[i].fGoodsid ===
                   this.dataListSelection[li].fGoodsid;
                   this.dataListSelection[li].fGoodsid;

+ 107 - 64
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -167,57 +167,51 @@
       <el-table-column type="index" label="行号" align="center"/>
       <el-table-column type="index" label="行号" align="center"/>
       <el-table-column
       <el-table-column
         :show-overflow-tooltip="true"
         :show-overflow-tooltip="true"
-        label="货权方"
+        label="单据编号"
         align="center"
         align="center"
-        prop="fCorpid"
+        prop="fBillno"
       />
       />
-      <el-table-column label="提单号" align="center" prop="fMblno"/>
+      <el-table-column label="客户名称" align="center" prop="fCorpid"/>
       <el-table-column
       <el-table-column
-        label="唛头"
+        label="计费日期"
         align="center"
         align="center"
-        prop="fMarks"
-      />
-      <el-table-column
-        label="出库日期"
-        align="center"
-        prop="createTime"
+        prop="fBillingDeadline"
         width="180"
         width="180"
       >
       >
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
+          <span>{{ parseTime(scope.row.fBillingDeadline, "{y}-{m}-{d}") }}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column label="仓库" align="center" prop="fWarehouseid"/>
-
-      <el-table-column label="出库件数" align="center" prop="fQty"/>
-      <!--      <el-table-column label="入库毛重" align="center" prop="fGrossweight"/>-->
-      <!-- <el-table-column label="货转客户名称" align="center" prop="fTocorpid" /> -->
-      <el-table-column label="出库毛重" align="center" prop="fGrossweight"/>
-      <el-table-column label="净重" align="center" prop="fNetweight"/>
       <el-table-column
       <el-table-column
-        width="100"
-        label="入库状态"
+        label="备注"
         align="center"
         align="center"
-        prop="fItemsStatus">
+        prop="remark"
+      />
+      <el-table-column
+        label="单据状态"
+        align="center"
+        prop="fBillstatus"
+      >
         <template slot-scope="scope">
         <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 === '6'">全部入账</span>
+          <span v-if="scope.row.fBillstatus === 1">新建</span>
+          <span v-if="scope.row.fBillstatus === 2">暂存</span>
+          <span v-if="scope.row.fBillstatus === 3">审核驳回</span>
+          <span v-if="scope.row.fBillstatus === 4">提交审核</span>
+          <span v-if="scope.row.fBillstatus === 5">审核中</span>
+          <span v-if="scope.row.fBillstatus === 6">审核通过</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <el-table-column
       <el-table-column
-        width="100"
-        label="费用状态"
+        label="制单人"
         align="center"
         align="center"
-        prop="fBillstatus">
-        <template slot-scope="scope">
-          <span v-if="scope.row.fBillstatus === '1'">录入</span>
-          <span v-if="scope.row.fBillstatus === '2'">录入</span>
-          <span v-if="scope.row.fBillstatus === '3'">驳回</span>
-          <span v-if="scope.row.fBillstatus === '4'">请核</span>
-          <span v-if="scope.row.fBillstatus === '5'">审核中</span>
-          <span v-if="scope.row.fBillstatus === '6'">全部入账</span>
-        </template>
+        prop="createBy"
+      />
+      <el-table-column
+        label="制单日期"
+        align="center"
+        prop="createTime"
+        width="180"
+      >
       </el-table-column>
       </el-table-column>
       <el-table-column
       <el-table-column
         label="操作"
         label="操作"
@@ -230,7 +224,7 @@
             size="mini"
             size="mini"
             type="text"
             type="text"
             icon="el-icon-edit"
             icon="el-icon-edit"
-            v-if="scope.row.fBillstatus === '6'"
+            v-if="scope.row.fBillstatus > 3"
             @click="handleUpdate(scope.row, true)"
             @click="handleUpdate(scope.row, true)"
             v-hasPermi="['warehouseBusiness:warehousebills:edit']"
             v-hasPermi="['warehouseBusiness:warehousebills:edit']"
           >查看
           >查看
@@ -239,6 +233,7 @@
             size="mini"
             size="mini"
             type="text"
             type="text"
             icon="el-icon-edit"
             icon="el-icon-edit"
+            v-if="scope.row.fBillstatus <= 3"
             @click="handleUpdate(scope.row, false)"
             @click="handleUpdate(scope.row, false)"
             v-hasPermi="['warehouseBusiness:warehousebills:edit']"
             v-hasPermi="['warehouseBusiness:warehousebills:edit']"
           >修改
           >修改
@@ -247,6 +242,7 @@
             size="mini"
             size="mini"
             type="text"
             type="text"
             icon="el-icon-delete"
             icon="el-icon-delete"
+            v-if="scope.row.fBillstatus <= 3"
             @click="handleDelete(scope.row)"
             @click="handleDelete(scope.row)"
             v-hasPermi="['warehouseBusiness:warehousebills:remove']"
             v-hasPermi="['warehouseBusiness:warehousebills:remove']"
           >删除
           >删除
@@ -335,6 +331,16 @@
         </el-row>
         </el-row>
         <el-row>
         <el-row>
           <el-col :span="5">
           <el-col :span="5">
+            <el-form-item label="业务编号" prop="fBillno">
+              <el-input
+                disabled
+                v-model="form.fBillno"
+                style="width: 80%"
+                placeholder="业务编号"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="5">
             <el-form-item label="制单人" prop="createBy">
             <el-form-item label="制单人" prop="createBy">
               <el-input
               <el-input
                 disabled
                 disabled
@@ -357,11 +363,21 @@
               </el-date-picker>
               </el-date-picker>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
+          <el-col :span="5">
+            <el-form-item disabled label="备注" prop="remark">
+              <el-input
+                :disabled="browseStatus"
+                v-model="form.remark"
+                placeholder="制单人"
+              />
+            </el-form-item>
+          </el-col>
         </el-row>
         </el-row>
       </el-form>
       </el-form>
       <div style="font-size:18px">
       <div style="font-size:18px">
         计费物资明细
         计费物资明细
-        <el-button @click="calculateCost">计算仓储费</el-button>
+        <el-button :disabled="browseStatus" @click="calculateCost">计算仓储费</el-button>
+        <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
       </div>
       </div>
       <div class="dialogTableTitle flex a-center jlr"
       <div class="dialogTableTitle flex a-center jlr"
            style="display:flex;justify-content:space-between;align-items:center;margin: 10px 0;">
            style="display:flex;justify-content:space-between;align-items:center;margin: 10px 0;">
@@ -433,6 +449,13 @@
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column
           <el-table-column
+            prop="fMarks"
+            header-align="center"
+            align="center"
+            width="140px"
+            label="唛头"
+          />
+          <el-table-column
             prop="fBsdate"
             prop="fBsdate"
             header-align="center"
             header-align="center"
             align="center"
             align="center"
@@ -554,6 +577,12 @@
           </el-table-column>
           </el-table-column>
         </el-table>
         </el-table>
       </div>
       </div>
+      <div>
+        <el-button :disabled="browseStatus" @click.prevent="addCollection()"
+        >新行
+        </el-button>
+        <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
+      </div>
       <div style="font-size:18px">应收款明细</div>
       <div style="font-size:18px">应收款明细</div>
       <div class="dialogTableTitle flex a-center jlr"
       <div class="dialogTableTitle flex a-center jlr"
            style="display:flex;justify-content:space-between;align-items:center;margin: 10px 0;">
            style="display:flex;justify-content:space-between;align-items:center;margin: 10px 0;">
@@ -660,7 +689,7 @@
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column
           <el-table-column
-            prop="funitprice"
+            prop="fUnitprice"
             header-align="center"
             header-align="center"
             align="center"
             align="center"
             width="150px"
             width="150px"
@@ -670,7 +699,7 @@
               <el-input
               <el-input
                 oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
                 oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
                 v-model="scope.row.fUnitprice"
                 v-model="scope.row.fUnitprice"
-                @change="changeContractAmt(scope.row)"
+                @change="changeEstmateAmt(scope.row)"
                 :disabled="browseStatus"
                 :disabled="browseStatus"
                 placeholder="单价"
                 placeholder="单价"
                 show-word-limit
                 show-word-limit
@@ -743,7 +772,7 @@
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column
           <el-table-column
-            prop="remarks"
+            prop="remark"
             header-align="center"
             header-align="center"
             align="center"
             align="center"
             width="150px"
             width="150px"
@@ -751,7 +780,7 @@
           >
           >
             <template slot-scope="scope">
             <template slot-scope="scope">
               <el-input
               <el-input
-                v-model="scope.row.remarks"
+                v-model="scope.row.remark"
                 :disabled="browseStatus"
                 :disabled="browseStatus"
                 placeholder="备注"
                 placeholder="备注"
                 show-word-limit
                 show-word-limit
@@ -780,15 +809,12 @@
         <el-button type="success" prop="取 消" @click="cancel"
         <el-button type="success" prop="取 消" @click="cancel"
         >取 消
         >取 消
         </el-button>
         </el-button>
-        <el-button type="warning" prop="保 存" @click="submitForm(2)"
-        >保 存
-        </el-button>
+        <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
         <el-button
         <el-button
           :disabled="browseStatus"
           :disabled="browseStatus"
           style="background-color: #008000; color: #fff"
           style="background-color: #008000; color: #fff"
           @click="submitForm(6)"
           @click="submitForm(6)"
-        >请 核</el-button
-        >
+        >请 核</el-button>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
   </div>
   </div>
@@ -808,6 +834,7 @@
   import { listGoods } from "@/api/basicdata/goods";
   import { listGoods } from "@/api/basicdata/goods";
   import { listFees } from "@/api/basicdata/fees";
   import { listFees } from "@/api/basicdata/fees";
   import { listCorps } from "@/api/basicdata/corps";
   import { listCorps } from "@/api/basicdata/corps";
+  import moment from 'moment'
 
 
   export default {
   export default {
     name: "StorageFeeCalculation",
     name: "StorageFeeCalculation",
@@ -853,7 +880,7 @@
           fId: 'SJCK',
           fId: 'SJCK',
           fName: '出库'
           fName: '出库'
         }, {
         }, {
-          fId: 'CKZZ',
+          fId: 'KCZZ',
           fName: '库存总账'
           fName: '库存总账'
         }],
         }],
         // 货权方(客户数据)
         // 货权方(客户数据)
@@ -879,6 +906,7 @@
           dictLabel: '固定',
           dictLabel: '固定',
           dictValue: 5
           dictValue: 5
         }],
         }],
+        fTaxrate: 0,
         // 费用名称
         // 费用名称
         fWbuOptions: [],
         fWbuOptions: [],
         // 查询参数
         // 查询参数
@@ -939,6 +967,9 @@
     },
     },
     created() {
     created() {
       this.getList();
       this.getList();
+      this.getDicts("tax_rate").then((response) => {
+        this.fTaxrate = response.data[0].dictValue
+      });
     },
     },
     methods: {
     methods: {
       queryUser() {
       queryUser() {
@@ -963,6 +994,7 @@
         this.loading = true;
         this.loading = true;
         listStorageFeeCalculation(this.queryParams).then((response) => {
         listStorageFeeCalculation(this.queryParams).then((response) => {
           this.warehousebillsList = response.rows;
           this.warehousebillsList = response.rows;
+          this.$set(this.form, 'createTime', moment(Date.parse(this.warehousebillsList.createTime)).format("YYYY-MM-DD HH:mm:ss"))
           this.total = response.total;
           this.total = response.total;
           this.loading = false;
           this.loading = false;
         });
         });
@@ -971,6 +1003,7 @@
       cancel() {
       cancel() {
         this.open = false;
         this.open = false;
         this.reset();
         this.reset();
+        this.getList();
       },
       },
       // 计算仓储费
       // 计算仓储费
       calculateCost() {
       calculateCost() {
@@ -992,11 +1025,30 @@
           this.getStorageFee()
           this.getStorageFee()
         }
         }
       },
       },
+      // 添加费用新行
+      // 收款信息
+      addCollection() {
+        this.warehouseDrList.push({
+          fCorpid: null,
+          fFeeid: null,
+          fFeeunitid: 2,
+          fQty: 0,
+          fUnitprice: 0,
+          fAmount: 0,
+          fCurrency: "RMB",
+          fExrate: "1",
+          fTaxrate: this.fTaxrate,
+          fCxrate: "1",
+          fRate: null,
+          remark: null,
+        });
+      },
       getStorageFee () {
       getStorageFee () {
         calculateStorageFees(this.form).then((response) => {
         calculateStorageFees(this.form).then((response) => {
           this.dataList = []
           this.dataList = []
           this.warehouseDrList = []
           this.warehouseDrList = []
           this.form.fId = response.data.warehouseBills.fId
           this.form.fId = response.data.warehouseBills.fId
+          this.form.fBillno = response.data.warehouseBills.fBillno
           if (response.data.warehouseFeesList) {
           if (response.data.warehouseFeesList) {
             this.warehouseDrList = response.data.warehouseFeesList
             this.warehouseDrList = response.data.warehouseFeesList
           }
           }
@@ -1147,24 +1199,16 @@
           this.title = "编辑仓储费计算";
           this.title = "编辑仓储费计算";
         });
         });
       },
       },
-      // 数量计算
-      changeContractAmt(row) {
-        if (row.fUnitprice !== "") {
-          if (row.fQty !== "") {
-            this.$set(row, 'fAmount', Number(row.fUnitprice) * Number(row.fQty)).toFixed(2);
-          } else {
-            this.$set(row, 'fAmount', row.fUnitprice);
-          }
-        }
-      },
       changeEstmateAmt(row) {
       changeEstmateAmt(row) {
-        if (row.fUnitprice !== "") {
-          if (row.fQty !== "") {
-            this.$set(row, "fAmount", Number(row.fUnitprice) * Number(row.fQty)).toFixed(2);
-          } else {
-            this.$set(row, "fAmount", row.fUnitprice);
-          }
+        let fQty = 0
+        let fUnitprice = 0
+        if (row.fUnitprice && row.fUnitprice !== "") {
+          fUnitprice = row.fUnitprice
+        }
+        if (row.fQty && row.fQty !== "") {
+          fQty = row.fQty
         }
         }
+        this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
       },
       },
       changefBsdate(row) {
       changefBsdate(row) {
         if (this.dataList.length > 0) {
         if (this.dataList.length > 0) {
@@ -1175,7 +1219,6 @@
       },
       },
       // 合计
       // 合计
       getSummaries(param) {
       getSummaries(param) {
-        console.log(param);
         const {columns, data} = param;
         const {columns, data} = param;
         const sums = [];
         const sums = [];
         var values = [];
         var values = [];