Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

gjy 2 years ago
parent
commit
e534ef20aa
2 changed files with 34 additions and 24 deletions
  1. 4 1
      src/model/profitable/index.js
  2. 30 23
      src/views/warehousenew/warehousingOrder.vue

+ 4 - 1
src/model/profitable/index.js

@@ -13,6 +13,7 @@ import {
   API_GET_WAREHOUSE,
   API_GET_WAREHOUSE,
   API_GET_LOOK,
   API_GET_LOOK,
   API_POST_SUBMIT,
   API_POST_SUBMIT,
+
   API_POST_SHOUGUAN,
   API_POST_SHOUGUAN,
   API_POST_SUBMITPAY,
   API_POST_SUBMITPAY,
   API_GET_WAREHOUSE_NO,
   API_GET_WAREHOUSE_NO,
@@ -128,4 +129,6 @@ export const getboodinfo= appRx.get(API_BOODINFO, errorCatcher, errorHandle, fil
 
 
 export const getcontractno= appRx.get(API_GET_CONTRACT, errorCatcher, errorHandle, filter)
 export const getcontractno= appRx.get(API_GET_CONTRACT, errorCatcher, errorHandle, filter)
 //抵粮款
 //抵粮款
-export const setfoodallowance= appRx.post(API_SET_FOODALLOWANCE, errorCatcher, errorHandle, filter)
+export const setfoodallowance= appRx.post(API_SET_FOODALLOWANCE, errorCatcher, errorHandle, filter)
+//费用下拉详情筛选
+export const getXialaList= appRx.get(API_GETXIALALIST, errorCatcher, errorHandle, filter)

+ 30 - 23
src/views/warehousenew/warehousingOrder.vue

@@ -106,7 +106,13 @@
             <span v-else>{{ scope.$index + 1 }}</span>
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column prop="contractNo" label="合同编号" width="130"></el-table-column>
+        <el-table-column prop="contractNo" label="合同编号" width="190">
+          <template  scope="scope">
+            <span>
+              {{ scope.row.contractNo }} ({{ scope.row.inType }})
+            </span>
+          </template>
+        </el-table-column>
         <el-table-column prop="buyer" label="买方" width="150"></el-table-column>
         <el-table-column prop="buyer" label="买方" width="150"></el-table-column>
         <el-table-column prop="goodsSource" label="货源" width="130">
         <el-table-column prop="goodsSource" label="货源" width="130">
           <template scope="scope">
           <template scope="scope">
@@ -121,7 +127,7 @@
         </el-table-column> -->
         </el-table-column> -->
         <el-table-column prop="goodsName" label="货名" width="120">
         <el-table-column prop="goodsName" label="货名" width="120">
         </el-table-column>
         </el-table-column>
-        <el-table-column prop="inWarehouseWeight1" width="170" class="table_td" label="加权水分">
+        <el-table-column prop="inWarehouseWeight1" width="130" class="table_td" label="加权水分">
           <template scope="scope">
           <template scope="scope">
             <span v-if='scope.row.edit == false'>{{ scope.row.weightedMoisture }}</span>
             <span v-if='scope.row.edit == false'>{{ scope.row.weightedMoisture }}</span>
             <el-input style='width:80%;' v-if='scope.row.edit' v-model='scope.row.weightedMoisture'></el-input>
             <el-input style='width:80%;' v-if='scope.row.edit' v-model='scope.row.weightedMoisture'></el-input>
@@ -164,13 +170,13 @@
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column prop="avgCost" width="90" class="table_td" label="平均成本"></el-table-column>
         <el-table-column prop="avgCost" width="90" class="table_td" label="平均成本"></el-table-column>
-        <el-table-column prop="requestFunds" width="150" class="table_td tablerequestFunds" label="请款">
+        <el-table-column prop="requestFunds" width="100" class="table_td tablerequestFunds" label="请款">
           <template scope="scope">
           <template scope="scope">
             <span v-if="!scope.row.select">{{ scope.row.requestFunds }}</span>
             <span v-if="!scope.row.select">{{ scope.row.requestFunds }}</span>
             <el-input @focus="qingkuan(scope.row, item.id)" v-else v-model='scope.row.requestFunds'></el-input>
             <el-input @focus="qingkuan(scope.row, item.id)" v-else v-model='scope.row.requestFunds'></el-input>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column prop="remark" width="150" class="table_td" label="请款备注">
+        <el-table-column prop="remark" width="100" class="table_td" label="请款备注">
           <template scope="scope">
           <template scope="scope">
             <div v-if="!scope.row.select" @click.stop="lookRemark(scope.row)">
             <div v-if="!scope.row.select" @click.stop="lookRemark(scope.row)">
               <span class="text_css">查看</span>
               <span class="text_css">查看</span>
@@ -187,7 +193,9 @@
       </el-table>
       </el-table>
     </div>
     </div>
     <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
     <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-      :page-size="pageSize" layout="total,  prev, pager, next, jumper" :total="deptBudgetTotal"></el-pagination>
+        style="text-align: center" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal">
+      </el-pagination>
     <el-dialog title="付款" :visible.sync="aduitshow" width="50%" :before-close="handleClose">
     <el-dialog title="付款" :visible.sync="aduitshow" width="50%" :before-close="handleClose">
       <div style='display:flex;'>
       <div style='display:flex;'>
         <div style='width:50%;'>
         <div style='width:50%;'>
@@ -352,7 +360,7 @@
         </div>
         </div>
         <el-form ref="form" :model="form" label-width="140px">
         <el-form ref="form" :model="form" label-width="140px">
           <el-form-item label="折干前重量(吨)">
           <el-form-item label="折干前重量(吨)">
-            <el-input v-model="fieldrationsList.beforeWeight"></el-input>
+            <el-input v-model="fieldrationsList.beforeWeight" disabled></el-input>
           </el-form-item>
           </el-form-item>
           <!-- <el-form-item label="折干前成本(元/吨)">
           <!-- <el-form-item label="折干前成本(元/吨)">
               <el-input disabled placeholder="自动计算,不可编辑" v-model="fieldrationsList.beforeCost"></el-input>
               <el-input disabled placeholder="自动计算,不可编辑" v-model="fieldrationsList.beforeCost"></el-input>
@@ -365,7 +373,7 @@
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
           <el-form-item label="折干后重量(吨)">
           <el-form-item label="折干后重量(吨)">
-            <el-input @input="afterWeightchange" v-model="fieldrationsList.afterWeight"></el-input>
+            <el-input @input="afterWeightchange" v-model="fieldrationsList.afterWeight" disabled></el-input>
           </el-form-item>
           </el-form-item>
           <!-- <el-form-item label="折干后成本(元/吨)">
           <!-- <el-form-item label="折干后成本(元/吨)">
               <el-input disabled  placeholder="自动计算,不可编辑" v-model="fieldrationsList.afterCost"></el-input>
               <el-input disabled  placeholder="自动计算,不可编辑" v-model="fieldrationsList.afterCost"></el-input>
@@ -593,6 +601,7 @@ export default {
       value1: '',
       value1: '',
       value: '',
       value: '',
       value2: '',
       value2: '',
+      deptBudgetTotal: 0,
       pageSize: 10,
       pageSize: 10,
       searchType: '',
       searchType: '',
       searchTypeText: '待审核',
       searchTypeText: '待审核',
@@ -614,10 +623,9 @@ export default {
       endDate: '',
       endDate: '',
       startDate: '',
       startDate: '',
       warehouseName: '',
       warehouseName: '',
-      goodsName:"",
-      reserves:"",
+      goodsName:'',
+      reserves:'',
       goodsList:[],
       goodsList:[],
-      deptBudgetTotal: 0,
       compId: localStorage.getItem('ws-pf_compId'),
       compId: localStorage.getItem('ws-pf_compId'),
       historyList: [],
       historyList: [],
       money: 0,
       money: 0,
@@ -640,7 +648,7 @@ export default {
       dialogTitle: '',
       dialogTitle: '',
       titletype: '',
       titletype: '',
       remark: '',
       remark: '',
-      baseId:""
+      baseId:''
     }
     }
   },
   },
   // activated() {
   // activated() {
@@ -682,7 +690,7 @@ export default {
               } else {
               } else {
                 return prev;
                 return prev;
               }
               }
-            }, 0).toFixed(2)
+            }, 0).toFixed(3)
           }
           }
 
 
         } else {
         } else {
@@ -696,8 +704,8 @@ export default {
       if (e == '全部仓库' || e == '') {
       if (e == '全部仓库' || e == '') {
         this.warehouseName = ''
         this.warehouseName = ''
         this.goodsList = []
         this.goodsList = []
-        this.goodsName = ""
-        this.baseId = ""
+        this.goodsName = ''
+        this.baseId = ''
       }else{
       }else{
         for(let i =0 ; i<this.warehouseList.length;i++){
         for(let i =0 ; i<this.warehouseList.length;i++){
           if(this.warehouseList[i].warehouseName == e){
           if(this.warehouseList[i].warehouseName == e){
@@ -718,8 +726,8 @@ export default {
             break
             break
           }
           }
         }
         }
-        this.goodsName= ""
-        this.reserves = ""
+        this.goodsName= ''
+        this.reserves = ''
       }
       }
       this.getList()
       this.getList()
     },
     },
@@ -863,11 +871,11 @@ export default {
       item.summation = 0
       item.summation = 0
       for (let i = 0; i < val.length; i++) {
       for (let i = 0; i < val.length; i++) {
         if (val[i].surplusWeight) {
         if (val[i].surplusWeight) {
-          item.summation += val[i].surplusWeight
+          item.summation += Number(val[i].surplusWeight)
         }
         }
 
 
       }
       }
-      item.summation = item.summation.toFixed(2)
+      item.summation = item.summation.toFixed(3)
       this.$forceUpdate()
       this.$forceUpdate()
       // console.log(val,item.summation,1111111111)
       // console.log(val,item.summation,1111111111)
       this.multipleSelection1[item.id] = val
       this.multipleSelection1[item.id] = val
@@ -1136,7 +1144,7 @@ export default {
       console.log(this.currectdata)
       console.log(this.currectdata)
       this.fieldrationsList.warehousingOrderList = this.currectdata
       this.fieldrationsList.warehousingOrderList = this.currectdata
       this.fieldrationsList.baseId = this.currectdata[0].baseId
       this.fieldrationsList.baseId = this.currectdata[0].baseId
-      this.fieldrationsList.beforeWeight = weight.toFixed(2)
+      this.fieldrationsList.beforeWeight = weight.toFixed(3)
       getbyname({ warehouseId: this.currectdata[0].baseId, goodsName: this.currectdata[0].goodsName }).toPromise()
       getbyname({ warehouseId: this.currectdata[0].baseId, goodsName: this.currectdata[0].goodsName }).toPromise()
         .then((response) => {
         .then((response) => {
           if (response) {
           if (response) {
@@ -1149,7 +1157,7 @@ export default {
               weight2 += ((deductWeight / 100) * this.currectdata[i].surplusWeight)
               weight2 += ((deductWeight / 100) * this.currectdata[i].surplusWeight)
             }
             }
             console.log(this.currectdata)
             console.log(this.currectdata)
-            this.fieldrationsList.afterWeight = weight2.toFixed(2)
+            this.fieldrationsList.afterWeight = weight2.toFixed(3)
             this.fieldrationsshow = true
             this.fieldrationsshow = true
           }
           }
         })
         })
@@ -1177,7 +1185,6 @@ export default {
         });
         });
         return
         return
       }
       }
-
       if (currectData.length == 0) {
       if (currectData.length == 0) {
         this.$message({
         this.$message({
           message: '请选择一条数据!',
           message: '请选择一条数据!',
@@ -1736,10 +1743,10 @@ export default {
             for (let q = 0; q < data.length; q++) {
             for (let q = 0; q < data.length; q++) {
               if (data[q].inType == '收购入库') {
               if (data[q].inType == '收购入库') {
                 data[q].inWarehouseWeight1 = Number((data[q].inWarehouseWeight).toFixed(3))
                 data[q].inWarehouseWeight1 = Number((data[q].inWarehouseWeight).toFixed(3))
-                data[q].surplusWeight = (data[q].inWarehouseWeight) - data[q].outWarehouseWeight + data[q].profitAndLoss
+                data[q].surplusWeight = ((data[q].inWarehouseWeight) - data[q].outWarehouseWeight + data[q].profitAndLoss).toFixed(3)
               } else {
               } else {
                 data[q].inWarehouseWeight1 = data[q].inWarehouseWeight.toFixed(3)
                 data[q].inWarehouseWeight1 = data[q].inWarehouseWeight.toFixed(3)
-                data[q].surplusWeight = data[q].inWarehouseWeight - data[q].outWarehouseWeight + data[q].profitAndLoss
+                data[q].surplusWeight =(data[q].inWarehouseWeight - data[q].outWarehouseWeight + data[q].profitAndLoss).toFixed(3)
               }
               }
               console.log(response.records[i].warehouseType)
               console.log(response.records[i].warehouseType)
               data[q].select = false
               data[q].select = false