gjy 2 lat temu
rodzic
commit
f04a27b79f

+ 5 - 2
src/model/statisticalReport/index.js

@@ -50,7 +50,8 @@ import {
     API_POST_EDIT_SETTLEMENTWEIGHT,
     API_POST_INVOICELIST,
     API_POST_SUBMITLOGISTICS,
-    API_POST_EDITTRANTASK
+    API_POST_EDITTRANTASK,
+    API_POST_EDIT_TRANSETTLEMENT
 } from '@/api/V2/statisticalReport'
 //期货采购入库报表
 export const getpurchreceipt = appRx.get(API_GET_PURCHRECEIPT, errorCatcher, errorHandle, filter)
@@ -162,4 +163,6 @@ export const SetYunShuPrice = appRx.post(API_POST_YUNSHUSETPRICE, errorCatcher,
 // 汽运请款
 export const submitlogistics = appRx.post(API_POST_SUBMITLOGISTICS, errorCatcher, errorHandle, filter)
 // 船运反馈
-export const edittrantask = appRx.post(API_POST_EDITTRANTASK, errorCatcher, errorHandle, filter)
+export const edittrantask = appRx.post(API_POST_EDITTRANTASK, errorCatcher, errorHandle, filter)
+// 船运反馈
+export const editgrainprice = appRx.post(API_POST_EDIT_TRANSETTLEMENT, errorCatcher, errorHandle, filter)

+ 41 - 26
src/views/statisticalReport/autoSettlementList.vue

@@ -31,6 +31,11 @@
             <el-option key="全部仓库" label="全部仓库" value="" style="color: #8890b1" />
             <el-option v-for="item in warehouseList1" :key="item.id" :label="item.warehouseName" :value="item.warehouseName" style="color: #8890b1" />
           </el-select>
+          <el-select v-model="carType" filterable placeholder="" @change="carTypeChange" >
+            <el-option key="全部" label="全部" value="" style="color: #8890b1" />
+            <el-option key="未卸车" label="未卸车" value="1" style="color: #8890b1" />
+            <el-option key="已卸车" label="已卸车" value="2" style="color: #8890b1" />
+          </el-select>
           <!-- <el-input v-model="startAddress" placeholder="可按照发货地进行查找" clearable maxlength="500" type="input"
           class="findValue" @keyup.enter.native="find()"></el-input>
         <ws-button class="find" type="primary" @click="find()"><img width="16" height="16" style="
@@ -41,11 +46,14 @@
             " src="../../../public/img/sousuo.png" alt="" /></ws-button> -->
         </el-col>
       </el-row>
+      <!-- <el-row>
+        <div>粮食单价:<span v-if="grainPricetext=='编辑'">{{grainPrice}}</span><el-input></el-input><el-button type="primary" @click="editgrainPrice">{{grainPricetext}}</el-button></div>
+      </el-row> -->
       <el-row>
         <div style="color:red">注:审核时,同一运输阶段勾选任意复选框,当前运输阶段下所有条目都通过审核!</div>
       </el-row>
-      <el-table :summary-method="countTotal"
-    show-summary class="wenzi" :data="warehouseList.records" style="width: 100%; margin-top: 20px" ref="warehouseList"   @row-click="handleRowClick"
+      <!-- <div>合计 装车净重(吨):{{totalList.loadingWeight}} 卸车净重(吨):{{totalList.unloadingWeight}}</div> -->
+      <el-table class="wenzi" :data="warehouseList.records" style="width: 100%; margin-top: 20px" ref="warehouseList"   @row-click="handleRowClick"
         @selection-change="handleSelectionChange">
         <el-table-column :selectable="selectInit" type="selection" width="55"></el-table-column>
         <el-table-column type="index" label="序号" width="50"></el-table-column>
@@ -404,7 +412,8 @@ import {
   autocontract,
   autopaymoney,
   openinvoicelist,
-  submitlogistics
+  submitlogistics,
+  editgrainprice
   // postaudit,
   //   getselectctcontractno,
 } from '@/model/statisticalReport/index'
@@ -444,6 +453,7 @@ export default {
     return { 
       alreadyInvoice: '',
       needReapply: true,
+      totalList:[],
       dialogFormVisible1: false,
       dialogFormVisible2: false,
       dialogFormVisible3: false,
@@ -455,6 +465,8 @@ export default {
       dialogFormVisible11: false,
       dialogFormVisible16: false,
       dialogVisible: false,
+      grainPrice:'',
+      grainPricetext:'编辑',
       form: {
         transactionPrice: '',
         transactionsNumber: '',
@@ -536,6 +548,7 @@ export default {
         paymentScreenshot: '',
         id: '',
       },
+      carType:'',
       settlementPrice:0,
       amountNotPayable: 0,
       amountEdPayable: 0,
@@ -566,30 +579,22 @@ export default {
     warehouseNameChange(){
       this.getList()
     },
-    countTotal(param) {
-      console.log(param)
-      const { columns, data } = param;
-        const sums = [];
-        columns.forEach((column, index) => {
-          if (index === 0) {
-            sums[index] = '合计';
-            return;
+    carTypeChange(){
+      this.getList()
+    },
+    countTotal(data) {
+      var sums={
+        loadingWeight:0,
+        unloadingWeight:0
+      }
+        for (let i = 0; i < data.length; i++) {
+          if(!isNaN(data[i].loadingWeight)){
+            sums.loadingWeight+=Number(data[i].loadingWeight)
           }
-          const values = data.map(item => Number(item[column.property]));
-          if (!values.every(value => isNaN(value))) {
-            sums[index] = values.reduce((prev, curr) => {
-              const value = Number(curr);
-              if (!isNaN(value)) {
-                return prev + curr;
-              } else {
-                return prev;
-              }
-            }, 0);
-            sums[index] += ' 元';
-          } else {
-            sums[index] = 'N/A';
+          if(!isNaN(data[i].unloadingWeight)){
+            sums.unloadingWeight+=Number(data[i].unloadingWeight)
           }
-        });
+        }
         return sums;
     },
     onChange() {
@@ -1252,6 +1257,14 @@ export default {
     editRecord() {
       this.dialogFormVisible16 = true
     },
+    ArrSet(Arr, id) {
+      var obj = {};
+      const arrays = Arr.reduce((setArr, item) => {
+        obj[item[id]] ? '' : obj[item[id]] = true && setArr.push(item);
+        return setArr;
+      }, []);
+      return arrays;
+    },
     handlepass() {
       var that = this
       if (this.modification.length == 0) {
@@ -1267,6 +1280,7 @@ export default {
             return
           }
         }
+        var arr=this.ArrSet(this.modification,this.contractNo)
         
         this.$confirm(`是否确定请款?`, {
           cancelButtonText: '取消',
@@ -1291,7 +1305,7 @@ export default {
     },
     handleSelectionChange(val) {
       if (val.length !== 0) {
-        this.totalNumer = this.countTotal(val, 'shipped')
+        this.totalList = this.countTotal(val)
       }
       this.modification = val
     },
@@ -1365,6 +1379,7 @@ export default {
         searchType: this.searchType,
         contractNo: this.contractNo,
         manualFlag: this.manualFlag,
+        carType:this.carType
       })
         .toPromise()
         .then((response) => {

+ 6 - 5
src/views/warehousenew/warehousingOrder.vue

@@ -1004,9 +1004,9 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             });
             return
           }
-          if(!arr1[i].contractNo){
+          if(arr1[i].inType!='采购入库'&&arr1[i].inType!='收购入库'){
             this.$message({
-              message: '请选择货源是采购合同的条目',
+              message: '请选择货源是采购合同或收购合同的条目',
               type: 'warning'
             });
             return
@@ -1113,7 +1113,6 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
           // _this.dialogTitle=arr1[i].contractNo
         }
         var weight=0
-        var weight2=0
         for (let i = 0; i < arr1.length; i++) {
           console.log(arr1[i].surplusWeight)
           weight+=Number(arr1[i].surplusWeight)
@@ -1181,9 +1180,9 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             });
             return
           }
-          if(arr1[i].inType!='采购入库'){
+          if(arr1[i].inType!='采购入库'&&arr1[i].inType!='收购入库'){
             this.$message({
-              message: '请选择货源是采购合同的条目',
+              message: '请选择货源是采购合同或收购合同的条目',
               type: 'warning'
             });
             return
@@ -1248,6 +1247,8 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
           
         }else if(localStorage.getItem('ws-pf_staffName')=='杜大光'){
           return true
+        }else if(localStorage.getItem('ws-pf_staffName')=='范占国'){
+          return true
         }else if(localStorage.getItem('ws-pf_roleName')=='财务'){
           return true
         }else if(localStorage.getItem('ws-pf_roleName')=='出纳'){