瀏覽代碼

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

gjy 2 年之前
父節點
當前提交
90039e5ec2

+ 1 - 0
src/components/balanceAlert.vue

@@ -162,6 +162,7 @@ export default {
               this.deptBudgetList.warehouseName == '白城鹏羽库' ||
               this.deptBudgetList.warehouseName == '洮南胡力吐粮食储备库' ||
               this.deptBudgetList.warehouseName == '洮南向阳乡金昊' ||
+              this.deptBudgetList.warehouseName == '洮南光明储备库' ||
               this.deptBudgetList.warehouseName == '甘南林峰库' ||
               this.deptBudgetList.warehouseName == '肇东金信库' ||
               this.deptBudgetList.warehouseName == '呼兰大金仓'||

+ 32 - 20
src/views/profitable/cashout.vue

@@ -136,7 +136,7 @@
         <span style="margin-top:5px;margin-left: 10px;" v-if='mode!="暂不分配"'>合计分配:{{amount}}元</span>  
         </div>
         <el-table ref="tableref" v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.purpose=="库点费用"&&mode!="暂不分配"&&deptBudgetList.flag!="是"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
-          <el-table-column  width="150" v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
+          <el-table-column key="1"  width="150" v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select v-model="scope.row.warehouseName" filterable placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -152,19 +152,19 @@
               </el-select>
             </template>
           </el-table-column> -->
-          <el-table-column width="200" v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="日期">
+          <el-table-column key="2" width="200" v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{selectware(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column width="200" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">
+          <el-table-column key="3" width="200" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{receiptDocDatechange(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="库点费用"||deptBudgetList.purpose=="合同费用"' prop="date" label="货源">
+          <el-table-column key="4" v-if='deptBudgetList.purpose=="库点费用"||deptBudgetList.purpose=="合同费用"' prop="date" label="货源">
               <template slot-scope="scope">
                 <!-- {{scope.row.goodsourcelist}} -->
                 <!-- <el-select class="goodsource" v-if="scope.row.orderId &&confirmFlag==0" v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
@@ -182,22 +182,22 @@
                 </el-select>
             </template>
           </el-table-column>
-          <el-table-column width="150" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货名">
+          <el-table-column key="5" width="150" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货名">
             <template slot-scope="scope">
                <span>{{scope.row.goodsName?scope.row.goodsName:'自动获取'}}</span>
             </template>
           </el-table-column>
-          <el-table-column width="150" prop="inWarehouseWeight" label="入库量(吨)">
+          <el-table-column key="6" width="150" prop="inWarehouseWeight" label="入库量(吨)">
             <template slot-scope="scope">
                <span>{{scope.row.inWarehouseWeight?scope.row.inWarehouseWeight:'自动获取'}}</span>
             </template>
           </el-table-column>
-          <el-table-column width="200" prop="date" label="分配金额(元)">
+          <el-table-column key="7" width="200" prop="date" label="分配金额(元)">
             <template slot-scope="scope">
                 <el-input placeholder="输入费用名称,1-15个字" class="input_css" v-model="scope.row.distributionMoney"></el-input>
             </template>
           </el-table-column>
-          <el-table-column prop="address" label="操作" width="200">
+          <el-table-column key="8" prop="address" label="操作" width="200">
             <template slot-scope="scope">
                 <img class='add' @click='addlist()' src="../../../public/img/add.png" alt="">
                 <img class='del' @click='dellist(scope.row)' src="../../../public/img/del.png" alt="">
@@ -304,7 +304,7 @@
                num += Number(this.feeDetailsDistributions[i].distributionMoney)
              }
            }
-           return num
+           return num.toFixed(2)
          }
        }
     },
@@ -448,9 +448,9 @@
                 }
               }
               if (i == this.feeDetailsDistributions.length - 1) {
-                this.feeDetailsDistributions[i].distributionMoney = this.deptBudgetList.amountMoney - moneyDiff
+                this.feeDetailsDistributions[i].distributionMoney = (this.deptBudgetList.amountMoney - moneyDiff).toFixed(2)
               }
-              money = this.feeDetailsDistributions[i].distributionMoney + moneyDiff
+              money = (this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
         }
       }
     },
@@ -460,7 +460,9 @@
         if(!this.deptBudgetList.amountMoney&&this.moneys=='按重量自动分配'){
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             if(this.feeDetailsDistributions[i].receiptDocDate==e){
-              this.feeDetailsDistributions[i].receiptDocDate=''
+              // this.feeDetailsDistributions[i].receiptDocDate=''
+              this.$set(this.feeDetailsDistributions[index],'receiptDocDate','')
+
             }
           }
           this.$message({
@@ -490,7 +492,8 @@
         // console.log(this.feeDetailsDistributions)
       },
       receiptDocDatechange(e,index){
-        this.feeDetailsDistributions[index].orderId=''
+        // this.feeDetailsDistributions[index].orderId=''
+        this.$set(this.feeDetailsDistributions[index],'orderId','')
         var arr=[]
         this.goodsourcelist[index]=[]
         getwarehousingorder({warehouseName:this.deptBudgetList.warehouseName,receiptDocDate:e}).toPromise()
@@ -539,7 +542,8 @@
         searchType: this.searchType,
         searchKeyWord: this.searchKeyWord,
         goodsName: this.goodsName,
-        goodsSource: this.goodsSource == '全部客户' ? '' : this.goodsSource
+        goodsSource: this.goodsSource == '全部客户' ? '' : this.goodsSource,
+        confirmFlag : this.confirmFlag
       })
         .toPromise()
         .then((response) => {
@@ -579,10 +583,10 @@
                 }
               }
               if (i == this.feeDetailsDistributions.length - 1) {
-                this.feeDetailsDistributions[i].distributionMoney = this.deptBudgetList.amountMoney - moneyDiff
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.amountMoney - moneyDiff).toFixed(2)
               }
               // this.feeDetailsDistributions[i].distributionMoney = Math.round((this.feeDetailsDistributions[i].inWarehouseWeight / weight) * this.deptBudgetList.amountMoney)
-              money = this.feeDetailsDistributions[i].distributionMoney + moneyDiff
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
             }
           }
         })
@@ -614,7 +618,12 @@
         }
       },
       returnsales(){
-        this.$router.go(-1)
+        // this.$router.go(-1)
+        this.feeDetailsDistributions = [{receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',goodsName:'',goodsSource:'',index:0}]
+        this.goodsourcelist = []
+        this.$router.push({
+          path:'expensemanagementdetails'
+        })
       },
       handlefujian(file) {
         // console.log(file)
@@ -804,7 +813,7 @@
             }else{
               var repetition=data.filter((item,index)=>{
                 return this.feeDetailsDistributions[i].warehouseName==item.warehouseName&&this.feeDetailsDistributions[i].receiptDocDate==item.receiptDocDate
-                && this.feeDetailsDistributions[i].goodsSource == item.goodsSource
+                && this.feeDetailsDistributions[i].goodsSource == item.goodsSource && this.feeDetailsDistributions[i].orderId==item.orderId
               })
               if(repetition.length==0){
                 data.push(this.feeDetailsDistributions[i])
@@ -844,6 +853,7 @@
         }
        
         if(this.deptBudgetList.expensesPurpose==1&&this.deptBudgetList.costType==3&&this.mode=='全部分配'||this.deptBudgetList.expensesPurpose==3&&this.mode=='全部分配'&&this.deptBudgetList.storageFeeFlag!=1){
+          this.deptBudgetList.amountMoney = Number(this.deptBudgetList.amountMoney).toFixed(2)
           if(this.amount!=this.deptBudgetList.amountMoney){
             this.$message({
                 message: '请款金额与分配金额不相等!',
@@ -873,6 +883,7 @@
                 message: '费用名称输入错误!',
                 type: 'warning',
           })
+          return
         }
         if(!this.deptBudgetList.amountMoney){
           this.$message({
@@ -931,6 +942,7 @@
           console.log(e)
       },
       addlist(){
+        this.confirmFlag = 0
         this.feeDetailsDistributions.push({receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',time:0,id:0,weight:0,goodsName:'',goodsSource:'',index:0,   goodsNameKey: null,index:this.feeDetailsDistributions.length})
       },
       dellist(row) {
@@ -954,9 +966,9 @@
                 }
               }
               if (i == this.feeDetailsDistributions.length - 1) {
-                this.feeDetailsDistributions[i].distributionMoney = this.deptBudgetList.amountMoney - moneyDiff
+                this.feeDetailsDistributions[i].distributionMoney = (this.deptBudgetList.amountMoney - moneyDiff).toFixed(2)
               }
-              money = this.feeDetailsDistributions[i].distributionMoney + moneyDiff
+              money = (this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
 
                 }
               }

+ 33 - 21
src/views/profitable/cashoutaduitNQ.vue

@@ -133,7 +133,8 @@
           </div>
         </div>
         <!-- 经营性费用不分配 -->
-        <div v-if='deptBudgetList.expensesPurpose!=5'>
+        <div v-if='deptBudgetList.expensesPurpose==1&&deptBudgetList.costType==3||deptBudgetList.expensesPurpose==3&&deptBudgetList.storageFeeFlag!=1'>
+        <!-- <div v-if='deptBudgetList.expensesPurpose!=5'> -->
           <div style="display:flex">
             <div style='margin:0 50px 10px;font-weight:bold'>费用分配</div>
             <div>可分配金额{{deptBudgetList.unallocatedAmount}}元</div>
@@ -167,7 +168,7 @@
         </div>
  
         <el-table ref="tableref" v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.purpose=="库点费用"&&mode!="暂不分配"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
-          <el-table-column width="200" v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
+          <el-table-column key="1" width="200" v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select v-model="scope.row.warehouseName" placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -175,7 +176,7 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column width="200" v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="日期">
+          <el-table-column key="2" width="200" v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="日期">
             <template slot-scope="scope">
                <ws-select v-model="scope.row.receiptDocDate" placeholder="选择日期" @change="((value)=>{selecttime(value, scope.row,scope.$index)})">
                 <ws-option v-for="item in datelist[scope.$index]" :key="item.time" :label="item.time" :value="item.time"
@@ -183,13 +184,13 @@
               </ws-select>
             </template>
           </el-table-column>
-          <el-table-column width="200" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">
+          <el-table-column key="3" width="200" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{receiptDocDatechange(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货源">
+          <el-table-column key="4" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货源">
               <template slot-scope="scope">
                 <!-- {{scope.row.goodsourcelist}} -->
                 <!-- <el-select v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
@@ -206,22 +207,22 @@
                 </el-select>
             </template>
           </el-table-column>
-          <el-table-column  width="200" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货名">
+          <el-table-column key="5"  width="200" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货名">
             <template slot-scope="scope">
                <span>{{scope.row.goodsName?scope.row.goodsName:'自动获取'}}</span>
             </template>
           </el-table-column>
-          <el-table-column width="200" prop="inWarehouseWeight" label="入库量(吨)">
+          <el-table-column key="6" width="200" prop="inWarehouseWeight" label="入库量(吨)">
             <template slot-scope="scope">
                <span>{{scope.row.inWarehouseWeight?scope.row.inWarehouseWeight:'自动获取'}}</span>
             </template>
           </el-table-column>
-          <el-table-column width="200" prop="date" label="分配金额(元)">
+          <el-table-column key="7" width="200" prop="date" label="分配金额(元)">
             <template slot-scope="scope">
                 <el-input placeholder="输入费用名称,1-15个字" class="input_css" v-model="scope.row.distributionMoney"></el-input>
             </template>
           </el-table-column>
-          <el-table-column prop="address" label="操作" width="200">
+          <el-table-column key="8" prop="address" label="操作" width="200">
             <template slot-scope="scope">
                 <img class='add' @click='addlist()' src="../../../public/img/add.png" alt="">
                 <img class='del' @click='dellist(scope.row)' src="../../../public/img/del.png" alt="">
@@ -344,7 +345,7 @@
               num += Number(this.feeDetailsDistributions[i].distributionMoney)
             }
           }
-          return num
+          return num.toFixed(2)
         }
       }
     },
@@ -401,7 +402,8 @@
         searchType: this.searchType,
         searchKeyWord: this.searchKeyWord,
         goodsName: this.goodsName,
-        goodsSource: this.goodsSource == '全部客户' ? '' : this.goodsSource
+        goodsSource: this.goodsSource == '全部客户' ? '' : this.goodsSource,
+        confirmFlag : this.confirmFlag
       })
         .toPromise()
         .then((response) => {
@@ -444,9 +446,9 @@
                 }
               }
               if (i == this.feeDetailsDistributions.length - 1) {
-                this.feeDetailsDistributions[i].distributionMoney = this.deptBudgetList.unallocatedAmount - moneyDiff
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
               }
-              money = this.feeDetailsDistributions[i].distributionMoney + moneyDiff
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
             }
           }
         })
@@ -509,11 +511,13 @@
         }
         for (let i = 0; i < this.goodsourcelist[index].length; i++) {
           if(this.goodsourcelist[index][i].id==e){
-            this.feeDetailsDistributions[index].goodsSource=this.goodsourcelist[index][i].goodsSource
+            // this.feeDetailsDistributions[index].goodsSource=this.goodsourcelist[index][i].goodsSource
+            this.$set(this.feeDetailsDistributions[index],'goodsSource',this.goodsourcelist[index][i].goodsSource)
             this.feeDetailsDistributions[index].inWarehouseWeight=this.goodsourcelist[index][i].weight
             this.feeDetailsDistributions[index].goodsName=this.goodsourcelist[index][i].goodsName
             this.feeDetailsDistributions[index].goodsNameKey=this.goodsourcelist[index][i].goodsNameKey
             this.feeDetailsDistributions[index].orderId = this.goodsourcelist[index][i].id
+            this.$forceUpdate()
             }
         }
         // if(this.moneys=='按重量自动分配'){
@@ -537,9 +541,9 @@
                 }
               }
               if (i == this.feeDetailsDistributions.length - 1) {
-                this.feeDetailsDistributions[i].distributionMoney = this.deptBudgetList.unallocatedAmount - moneyDiff
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
               }
-              money = this.feeDetailsDistributions[i].distributionMoney + moneyDiff
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
         }
       }
       },
@@ -590,11 +594,17 @@
           })
       },
       returnsales(){
-        this.$router.go(-1)
+        // this.$router.go(-1)
+        this.feeDetailsDistributions = [{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
+        this.goodsourcelist = []
+        this.$router.push({
+          path:'expensemanagementdetails'
+        })
       },
        submit(status){
         //经营性费用不进行分配
-        if(this.deptBudgetList.expensesPurpose!=5&&this.mode!='暂不分配'){
+        if(this.deptBudgetList.expensesPurpose==1&&this.deptBudgetList.costType==3&&this.mode!='暂不分配'||this.deptBudgetList.expensesPurpose=='3'&&this.deptBudgetList.storageFeeFlag!=1&&this.mode!='暂不分配'){
+        // if(this.deptBudgetList.expensesPurpose!=5&&this.mode!='暂不分配'){
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             if(!this.feeDetailsDistributions[i].distributionMoney){
               this.$message({
@@ -671,7 +681,7 @@
             }else{
               var repetition=data.filter((item,index)=>{
                 return this.feeDetailsDistributions[i].warehouseName==item.warehouseName&&this.feeDetailsDistributions[i].receiptDocDate==item.receiptDocDate
-                && this.feeDetailsDistributions[i].goodsSource == item.goodsSource
+                && this.feeDetailsDistributions[i].goodsSource == item.goodsSource && this.feeDetailsDistributions[i].orderId==item.orderId
               })
               if(repetition.length==0){
                 data.push(this.feeDetailsDistributions[i])
@@ -688,6 +698,7 @@
           }
         }
         if(this.mode=='全部分配'){
+          this.deptBudgetList.unallocatedAmount = Number(this.deptBudgetList.unallocatedAmount).toFixed(2)
           if(this.amount!=this.deptBudgetList.unallocatedAmount){
             this.$message({
                 message: '请款金额与分配金额不相等!',
@@ -797,6 +808,7 @@
           console.log(e)
       },
       addlist(){
+        this.confirmFlag = 0
         this.feeDetailsDistributions.push({proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:this.feeDetailsDistributions.length})
       },
       dellist(row) {
@@ -819,9 +831,9 @@
                 }
               }
               if (i == this.feeDetailsDistributions.length - 1) {
-                this.feeDetailsDistributions[i].distributionMoney = this.deptBudgetList.unallocatedAmount - moneyDiff
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
               }
-              money = this.feeDetailsDistributions[i].distributionMoney + moneyDiff
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
               
                 }
               }

+ 2 - 0
src/views/profitable/contractprofitsdetails.vue

@@ -87,6 +87,8 @@
               <span v-if='scope.row.agreementType=="销售合同"'>-</span>
               <span v-else>{{scope.row.surplus}}</span>
             </template>
+          </el-table-column>
+           <el-table-column width="150" prop="settlementPrice" label="结算单价(元/吨)">
           </el-table-column>
           <el-table-column width="120" prop="profit" label="利润(万元)">
           </el-table-column>

+ 38 - 25
src/views/profitable/expenseallot.vue

@@ -151,7 +151,7 @@
         <span style="margin-top:5px;margin-left: 10px" v-if='mode!="暂不分配"'>合计分配:{{amount}}元</span>  
         </div>
         <el-table ref="tableref" v-if='deptBudgetList.expensesPurpose==1&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.expensesPurpose==3&&mode!="暂不分配"||deptBudgetList.expensesPurpose==2&&mode!="暂不分配"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
-          <el-table-column width="200" v-if='deptBudgetList.expensesPurpose==1' prop="date" label="仓库名称" min-width="110">
+          <el-table-column key="1" width="200" v-if='deptBudgetList.expensesPurpose==1' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select v-model="scope.row.warehouseName" placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -159,7 +159,7 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column width="200" v-if='deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
+          <el-table-column key="2" width="200" v-if='deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select  @change="((value)=>{receiptDocDatechange1(value, scope.$index)})" v-model="scope.row.warehouseName" placeholder="选择仓库">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -167,25 +167,25 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column width="200" v-if='deptBudgetList.expensesPurpose==1' prop="date" label="日期">
+          <el-table-column key="3" width="200" v-if='deptBudgetList.expensesPurpose==1' prop="date" label="日期">
             <template slot-scope="scope">
               <el-date-picker @change="((value)=>{selectware(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column width="200" v-if='deptBudgetList.expensesPurpose==2' prop="date" label="日期">
+          <el-table-column key="4" width="200" v-if='deptBudgetList.expensesPurpose==2' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{receiptDocDatechange1(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column width="200" v-if='deptBudgetList.expensesPurpose==3' prop="date" label="日期">
+          <el-table-column key="5" width="200" v-if='deptBudgetList.expensesPurpose==3' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{receiptDocDatechange(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==3||deptBudgetList.expensesPurpose==2||deptBudgetList.expensesPurpose==1' prop="date" label="货源">
+          <el-table-column key="6"  v-if='deptBudgetList.expensesPurpose==3||deptBudgetList.expensesPurpose==2||deptBudgetList.expensesPurpose==1' prop="date" label="货源">
               <template slot-scope="scope" >
                 <!-- {{scope.row.goodsourcelist}} -->
                 <!-- <el-select v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
@@ -202,22 +202,22 @@
                 </el-select>
             </template>
           </el-table-column>
-          <el-table-column width="200" v-if='deptBudgetList.expensesPurpose==3' prop="date" label="货名">
+          <el-table-column key="7" width="200" v-if='deptBudgetList.expensesPurpose==3' prop="date" label="货名">
             <template slot-scope="scope">
                <span>{{scope.row.goodsName?scope.row.goodsName:'自动获取'}}</span>
             </template>
           </el-table-column>
-          <el-table-column width="200" prop="inWarehouseWeight" label="入库量(吨)">
+          <el-table-column key="8" width="200" prop="inWarehouseWeight" label="入库量(吨)">
             <template slot-scope="scope">
                <span>{{scope.row.inWarehouseWeight?scope.row.inWarehouseWeight:'自动获取'}}</span>
             </template>
           </el-table-column>
-          <el-table-column width="200" prop="date" label="分配金额(元)">
+          <el-table-column key="9" width="200" prop="date" label="分配金额(元)">
             <template slot-scope="scope">
                 <el-input placeholder="输入分配金额" class="input_css" v-model="scope.row.distributionMoney"></el-input>
             </template>
           </el-table-column>
-          <el-table-column prop="address" label="操作" width="200">
+          <el-table-column key="10" prop="address" label="操作" width="200">
             <template slot-scope="scope">
                 <img class='add' @click='addlist()' src="../../../public/img/add.png" alt="">
                 <img class='del' @click='dellist(scope.row)' src="../../../public/img/del.png" alt="">
@@ -314,7 +314,7 @@
               num += Number(this.feeDetailsDistributions[i].distributionMoney)
             }
           }
-          return num
+          return num.toFixed(2)
         }
         
       }
@@ -379,7 +379,8 @@
         searchType: this.searchType,
         searchKeyWord: this.searchKeyWord,
         goodsName: this.goodsName,
-        goodsSource: this.goodsSource == '全部客户' ? '' : this.goodsSource
+        goodsSource: this.goodsSource == '全部客户' ? '' : this.goodsSource,
+        confirmFlag : this.confirmFlag
       })
         .toPromise()
         .then((response) => {
@@ -424,9 +425,9 @@
                 }
               }
               if (i == this.feeDetailsDistributions.length - 1) {
-                this.feeDetailsDistributions[i].distributionMoney = this.deptBudgetList.unallocatedAmount - moneyDiff
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
               }
-              money = this.feeDetailsDistributions[i].distributionMoney + moneyDiff
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
             }
           }
         })
@@ -463,7 +464,8 @@
         if(!this.deptBudgetList.amountMoney&&this.moneys=='按重量自动分配'){
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             if(this.feeDetailsDistributions[i].orderId==e){
-              this.feeDetailsDistributions[i].orderId=''
+              this.$set(this.feeDetailsDistributions[index],'orderId','')
+              // this.feeDetailsDistributions[i].orderId=''
             }
           }
           this.$message({
@@ -474,11 +476,13 @@
         }
         for (let i = 0; i < this.goodsourcelist[index].length; i++) {
           if(this.goodsourcelist[index][i].id==e){
-            this.feeDetailsDistributions[index].goodsSource=this.goodsourcelist[index][i].goodsSource
+            // this.feeDetailsDistributions[index].goodsSource=this.goodsourcelist[index][i].goodsSource
+            this.$set(this.feeDetailsDistributions[index],'goodsSource',this.goodsourcelist[index][i].goodsSource)
             this.feeDetailsDistributions[index].inWarehouseWeight=this.goodsourcelist[index][i].weight
             this.feeDetailsDistributions[index].goodsName=this.goodsourcelist[index][i].goodsName
             this.feeDetailsDistributions[index].goodsNameKey=this.goodsourcelist[index][i].goodsNameKey
             this.feeDetailsDistributions[index].orderId = this.goodsourcelist[index][i].id
+            this.$forceUpdate()
             }
         }
         // if(this.moneys=='按重量自动分配'){
@@ -502,9 +506,9 @@
                 }
               }
               if (i == this.feeDetailsDistributions.length - 1) {
-                this.feeDetailsDistributions[i].distributionMoney = this.deptBudgetList.unallocatedAmount - moneyDiff
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
               }
-              money = this.feeDetailsDistributions[i].distributionMoney + moneyDiff
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
         }
       }
       },
@@ -564,15 +568,22 @@
             for (let i = 0; i < response.length; i++) {
               arr.push({goodsSource:response[i].goodsSource,id:response[i].id,weight:response[i].inWarehouseWeight,goodsName:response[i].goodsName,goodsNameKey:response[i].goodsNameKey})
             }
-            this.feeDetailsDistributions[index].goodsSource=''
-            this.feeDetailsDistributions[index].weight=''
+            this.$set(this.feeDetailsDistributions[index],'goodsSource','')
+            this.$set(this.feeDetailsDistributions[index],'weight','')
+            // this.feeDetailsDistributions[index].goodsSource=''
+            // this.feeDetailsDistributions[index].weight=''
              this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
           })
         }
         
       },
       returnsales(){
-        this.$router.go(-1)
+        // this.$router.go(-1)
+        this.feeDetailsDistributions=[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}]
+        this.goodsourcelist = []
+        this.$router.push({
+          path:'expensemanagementdetails'
+        })
       },
        submit(){
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
@@ -641,7 +652,7 @@
             }else{
               var repetition=data.filter((item,index)=>{
                 return this.feeDetailsDistributions[i].warehouseName==item.warehouseName&&this.feeDetailsDistributions[i].receiptDocDate==item.receiptDocDate
-                && this.feeDetailsDistributions[i].goodsSource == item.goodsSource
+                && this.feeDetailsDistributions[i].goodsSource == item.goodsSource && this.feeDetailsDistributions[i].orderId==item.orderId
               })
               if(repetition.length==0){
                 data.push(this.feeDetailsDistributions[i])
@@ -658,6 +669,7 @@
           }
         }
         if(this.mode=='全部分配'){
+          this.deptBudgetList.unallocatedAmount = Number(this.deptBudgetList.unallocatedAmount).toFixed(2)
           if(this.amount!=this.deptBudgetList.unallocatedAmount){
             this.$message({
                 message: '请款金额与分配金额不相等!',
@@ -698,6 +710,7 @@
           console.log(e)
       },
       addlist(){
+        this.confirmFlag = 0
         this.feeDetailsDistributions.push({proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:this.feeDetailsDistributions.length})
       },
       dellist(row) {
@@ -720,9 +733,9 @@
                 }
               }
               if (i == this.feeDetailsDistributions.length - 1) {
-                this.feeDetailsDistributions[i].distributionMoney = this.deptBudgetList.unallocatedAmount - moneyDiff
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
               }
-              money = this.feeDetailsDistributions[i].distributionMoney + moneyDiff
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
               
                 }
               }
@@ -761,7 +774,7 @@
             response.type='保证金'
           }
           this.deptBudgetList=response 
-          this.feeDetailsDistributions = this.deptBudgetList.expenseAllocationInfoList
+          // this.feeDetailsDistributions = this.deptBudgetList.expenseAllocationInfoList
           if(response.addressUrl){
             var arr=[]
             var srcs=response.addressUrl.split(',')

+ 53 - 40
src/views/profitable/expensemanagentedit.vue

@@ -191,7 +191,7 @@
         <span style="margin-top:5px;margin-left: 10px" v-if='mode!="暂不分配"'>合计分配:{{amount}}元</span>  
         </div>
         <el-table ref="tableref" v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.purpose=="库点费用"&&mode!="暂不分配"||deptBudgetList.expensesPurpose==2&&mode!="暂不分配"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
-          <el-table-column width="150" v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
+          <el-table-column key="1" width="150" v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select v-model="scope.row.warehouseName" placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -199,7 +199,7 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column width="150" v-if='deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
+          <el-table-column key="2" width="150" v-if='deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select  @change="((value)=>{receiptDocDatechange1(value, scope.$index)})" v-model="scope.row.warehouseName" placeholder="选择仓库">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -215,19 +215,19 @@
               </ws-select>
             </template>
           </el-table-column> -->
-          <el-table-column width="200" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">
+          <el-table-column key="3" width="200" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{receiptDocDatechange(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column width="200" v-if='deptBudgetList.expensesPurpose==1||deptBudgetList.expensesPurpose==2' prop="date" label="日期">
+          <el-table-column  key="4" width="200" v-if='deptBudgetList.expensesPurpose==1||deptBudgetList.expensesPurpose==2' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{receiptDocDatechange1(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="库点费用"||deptBudgetList.expensesPurpose==2||deptBudgetList.expensesPurpose==1' prop="date" label="货源">
+          <el-table-column key="5" v-if='deptBudgetList.purpose=="库点费用"||deptBudgetList.expensesPurpose==2||deptBudgetList.expensesPurpose==1' prop="date" label="货源">
               <template slot-scope="scope">
                 <!-- {{scope.row.goodsourcelist}} -->
                 <!-- <el-select v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
@@ -244,22 +244,22 @@
                 </el-select>
             </template>
           </el-table-column>
-          <el-table-column width="150" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货名">
+          <el-table-column key="6" width="150" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货名">
             <template slot-scope="scope">
                <span>{{scope.row.goodsName?scope.row.goodsName:'自动获取'}}</span>
             </template>
           </el-table-column>
-          <el-table-column width="150" prop="inWarehouseWeight" label="入库量(吨)">
+          <el-table-column key="7" width="150" prop="inWarehouseWeight" label="入库量(吨)">
             <template slot-scope="scope">
                <span>{{scope.row.inWarehouseWeight?scope.row.inWarehouseWeight:'自动获取'}}</span>
             </template>
           </el-table-column>
-          <el-table-column width="200" prop="date" label="分配金额(元)">
+          <el-table-column key="8" width="200" prop="date" label="分配金额(元)">
             <template slot-scope="scope">
                 <el-input placeholder="输入费用名称,1-15个字" class="input_css" v-model="scope.row.distributionMoney"></el-input>
             </template>
           </el-table-column>
-          <el-table-column prop="address" label="操作" width="200">
+          <el-table-column key="9" prop="address" label="操作" width="200">
             <template slot-scope="scope">
                 <img class='add' @click='addlist()' src="../../../public/img/add.png" alt="">
                 <img class='del' @click='dellist(scope.row)' src="../../../public/img/del.png" alt="">
@@ -363,7 +363,7 @@ weight: 4000}]],
            for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
              num += Number(this.feeDetailsDistributions[i].distributionMoney)
            }
-           return num
+           return num.toFixed(2)
          }
        }
     },
@@ -420,7 +420,8 @@ weight: 4000}]],
         searchType: this.searchType,
         searchKeyWord: this.searchKeyWord,
         goodsName: this.goodsName,
-        goodsSource: this.goodsSource == '全部客户' ? '' : this.goodsSource
+        goodsSource: this.goodsSource == '全部客户' ? '' : this.goodsSource,
+        confirmFlag : this.confirmFlag
       })
         .toPromise()
         .then((response) => {
@@ -461,9 +462,9 @@ weight: 4000}]],
                 }
               }
               if (i == this.feeDetailsDistributions.length - 1) {
-                this.feeDetailsDistributions[i].distributionMoney = this.deptBudgetList.unallocatedAmount - moneyDiff
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
               }
-              money = this.feeDetailsDistributions[i].distributionMoney + moneyDiff
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
             }
           }
         })
@@ -492,6 +493,7 @@ weight: 4000}]],
           })
       },
       selectgoodsSource(e,item,index){
+        debugger
         var weight=0
         var money=0
         var moneyDiff = 0
@@ -509,11 +511,13 @@ weight: 4000}]],
         }
         for (let i = 0; i < this.goodsourcelist[index].length; i++) {
           if(this.goodsourcelist[index][i].id==e){
-            this.feeDetailsDistributions[index].goodsSource=this.goodsourcelist[index][i].goodsSource
+            // this.feeDetailsDistributions[index].goodsSource=this.goodsourcelist[index][i].goodsSource
+            this.$set(this.feeDetailsDistributions[index],'goodsSource',this.goodsourcelist[index][i].goodsSource) 
             this.feeDetailsDistributions[index].inWarehouseWeight=this.goodsourcelist[index][i].weight
             this.feeDetailsDistributions[index].goodsName=this.goodsourcelist[index][i].goodsName
             this.feeDetailsDistributions[index].goodsNameKey=this.goodsourcelist[index][i].goodsNameKey
             this.feeDetailsDistributions[index].orderId = this.goodsourcelist[index][i].id
+            this.$forceUpdate()
             }
         }
         // if(this.moneys=='按重量自动分配'){
@@ -537,9 +541,9 @@ weight: 4000}]],
                 }
               }
               if (i == this.feeDetailsDistributions.length - 1) {
-                this.feeDetailsDistributions[i].distributionMoney = this.deptBudgetList.unallocatedAmount - moneyDiff
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
               }
-              money = this.feeDetailsDistributions[i].distributionMoney + moneyDiff
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
         }
       }
       },
@@ -598,8 +602,10 @@ weight: 4000}]],
             for (let i = 0; i < response.length; i++) {
               arr.push({goodsSource:response[i].goodsSource,id:response[i].id,weight:response[i].inWarehouseWeight,goodsName:response[i].goodsName,goodsNameKey:response[i].goodsNameKey})
             }
-            this.feeDetailsDistributions[index].goodsSource=''
-            this.feeDetailsDistributions[index].weight=''
+            // this.feeDetailsDistributions[index].goodsSource=''
+            // this.feeDetailsDistributions[index].weight=''
+            this.$set(this.feeDetailsDistributions[index],'goodsSource','')
+            this.$set(this.feeDetailsDistributions[index],'weight','')
              this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
           })
         }
@@ -625,20 +631,20 @@ weight: 4000}]],
         this.deptBudgetList.totalDistribution=this.amount
         if(this.deptBudgetList.purpose=='合同费用'&&this.deptBudgetList.type=='非粮款'||this.deptBudgetList.purpose=='库点费用'){
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
-            if(!this.feeDetailsDistributions[i].distributionMoney){
+            if(!this.feeDetailsDistributions[i].distributionMoney&&this.feeDetailsDistributions[i].distributionMoney!=0){
               this.$message({
                 message: '分配金额不能为空!',
                 type: 'warning',
               })
               return
             }
-            if(this.feeDetailsDistributions[i].distributionMoney<0){
-              this.$message({
-                message: '分配金额应大于0!',
-                type: 'warning',
-              })
-              return
-            }
+            // if(this.feeDetailsDistributions[i].distributionMoney<0){
+            //   this.$message({
+            //     message: '分配金额应大于0!',
+            //     type: 'warning',
+            //   })
+            //   return
+            // }
             if(!this.feeDetailsDistributions[i].orderId){
               this.$message({
                 message: '货源不能为空!',
@@ -681,7 +687,7 @@ weight: 4000}]],
           this.deptBudgetList.expenseAllocationInfoList=this.feeDetailsDistributions
         }
          if(this.deptBudgetList.expensesPurpose==1||this.deptBudgetList.expensesPurpose==2){
-        var data=[]
+          var data=[]
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             if(data.length==0){
               data.push(this.feeDetailsDistributions[i])
@@ -704,14 +710,14 @@ weight: 4000}]],
           }
         }
         if(this.deptBudgetList.expensesPurpose==3){
-        var data=[]
+          var data=[]
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             if(data.length==0){
               data.push(this.feeDetailsDistributions[i])
             }else{
               var repetition=data.filter((item,index)=>{
                 return this.feeDetailsDistributions[i].warehouseName==item.warehouseName&&this.feeDetailsDistributions[i].receiptDocDate==item.receiptDocDate
-                && this.feeDetailsDistributions[i].goodsSource == item.goodsSource
+                && this.feeDetailsDistributions[i].goodsSource == item.goodsSource && this.feeDetailsDistributions[i].orderId==item.orderId
               })
               if(repetition.length==0){
                 data.push(this.feeDetailsDistributions[i])
@@ -723,7 +729,6 @@ weight: 4000}]],
                   return
               }
             }
-            
           }
         }
         this.deptBudgetList.expensesType=2
@@ -743,6 +748,7 @@ weight: 4000}]],
         }
        
         if(this.deptBudgetList.expensesPurpose==1&&this.deptBudgetList.costType==3&&this.mode=='全部分配'||this.deptBudgetList.expensesPurpose==3&&this.mode=='全部分配'){
+          this.deptBudgetList.unallocatedAmount = Number(this.deptBudgetList.unallocatedAmount).toFixed(2)
           if(this.amount!=this.deptBudgetList.unallocatedAmount){
             this.$message({
                 message: '请款金额与分配金额不相等!',
@@ -767,12 +773,13 @@ weight: 4000}]],
           })
           return
         }
-        if(this.deptBudgetList.expenseName.length<1||this.deptBudgetList.expenseName.length>15){
-          this.$message({
-                message: '费用名称输入错误!',
-                type: 'warning',
-          })
-        }
+        // if(this.deptBudgetList.expenseName.length<1||this.deptBudgetList.expenseName.length>15){
+        //   this.$message({
+        //         message: '费用名称输入错误!',
+        //         type: 'warning',
+        //   })
+        // return
+        // }
         if(!this.deptBudgetList.amountMoney){
           this.$message({
                 message: '金额不能为空!',
@@ -806,6 +813,7 @@ weight: 4000}]],
           console.log(e)
       },
       addlist(){
+        this.confirmFlag = 0
         this.feeDetailsDistributions.push({receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',time:0,id:0,weight:0,goodsName:'',goodsSource:'',index:0,   goodsNameKey: null,index:this.feeDetailsDistributions.length})
       },
       dellist(row){
@@ -860,9 +868,9 @@ weight: 4000}]],
                 }
               }
               if (i == this.feeDetailsDistributions.length - 1) {
-                this.feeDetailsDistributions[i].distributionMoney = this.deptBudgetList.unallocatedAmount - moneyDiff
+                this.feeDetailsDistributions[i].distributionMoney = (this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
               }
-              money = this.feeDetailsDistributions[i].distributionMoney + moneyDiff
+              money = (this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
 
                 }
               }
@@ -934,7 +942,7 @@ weight: 4000}]],
             response.type='保证金'
           }
           this.deptBudgetList=response
-          this.feeDetailsDistributions = this.defineComponent.expenseAllocationInfoList
+          // this.feeDetailsDistributions = this.deptBudgetList.expenseAllocationInfoList
           this.dataList=[]
           if(response.addressUrl){
             var arr=[]
@@ -992,7 +1000,12 @@ weight: 4000}]],
           }
      },
       returnsales(){
-        this.$router.go(-1)
+        // this.$router.go(-1)
+        this.feeDetailsDistributions = [{receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',goodsName:'',goodsSource:'',index:0,}],
+        this.goodsourcelist = []
+        this.$router.push({
+          path:'expensemanagementdetails'
+        })
       },
       handlefujian(file) {
         // console.log(file)

+ 4 - 4
src/views/warehousenew/transformation.vue

@@ -293,10 +293,10 @@ export default {
         this.$message.error('请选择折转后重量')
         return
       }
-      if (Number(this.transformationAdd.afterWeight) > Number(this.transformationAdd.beforeWeight)) {
-        this.$message.error('折转后重量不可超过折转前重量')
-        return
-      }
+      // if (Number(this.transformationAdd.afterWeight) > Number(this.transformationAdd.beforeWeight)) {
+      //   this.$message.error('折转后重量不可超过折转前重量')
+      //   return
+      // }
       this.$confirm(`确定提交折转信息?`, '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',

+ 9 - 7
src/views/warehousenew/warehousingOrder.vue

@@ -181,13 +181,13 @@
           </template>
         </el-table-column>
         <el-table-column prop="avgCost" width="90" class="table_td" label="平均成本"></el-table-column>
-        <el-table-column prop="requestFunds" width="100" class="table_td tablerequestFunds" label="请款">
+        <el-table-column prop="requestFunds" width="150" class="table_td tablerequestFunds" label="请款">
           <template scope="scope">
             <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>
           </template>
         </el-table-column>
-        <el-table-column prop="remark" width="100" class="table_td" label="请款备注">
+        <el-table-column prop="remark" width="150" class="table_td" label="请款备注">
           <template scope="scope">
             <div v-if="!scope.row.select" @click.stop="lookRemark(scope.row)">
               <span class="text_css">查看</span>
@@ -403,7 +403,7 @@
         <el-button type="primary" @click="fieldrationssubmit">提交</el-button>
       </span>
     </el-dialog>
-    <el-dialog :title="'输入' + titletype" :visible.sync="dialogVisiblecontent" width="30%" :before-close="handleClose5"
+    <el-dialog :title="'输入' + titletype" :visible.sync="dialogVisiblecontent" width="30%" @close="handleClose5"
       :close-on-click-modal="false">
       <div>
         <el-input type="textarea" :rows="5" maxlength="500" placeholder="请输入内容" v-model="textarea">
@@ -512,7 +512,7 @@
       :title="title1"
       :visible.sync="rejectshow"
       width="30%"
-      :before-close="handleClose5">
+      @close="handleClose6">
       <span>{{title1=='驳回'?'驳回审核':'通过审核'}}</span>
       <div>
         <el-input
@@ -695,7 +695,7 @@ export default {
       spanArr: [],
       options1: [],
       id: '',
-
+      avgCost:'',
       customerInfo: {},
       appendixIdss: [],
       paymentScreenshot: '',
@@ -1937,7 +1937,7 @@ export default {
         })
     },
     rejectclick(){
-      if(this.title=='通过'){
+      if(this.title1=='通过'){
         this.aduithandle(this.auditdata, 0, true)
       }else{
         this.aduithandle(this.auditdata, 0, false)
@@ -1981,6 +1981,7 @@ export default {
           this.rejectshow=false
           this.getList()
         }
+        this.rejectshow = false
       }
 
     },
@@ -2029,6 +2030,7 @@ export default {
                 data[q].inWarehouseWeight1 = data[q].inWarehouseWeight.toFixed(3)
                 data[q].surplusWeight =(data[q].inWarehouseWeight - data[q].outWarehouseWeight + data[q].profitAndLoss).toFixed(3)
               }
+              data[q].avgCost = Number(data[q].avgCost).toFixed(2)
               console.log(response.records[i].warehouseType)
               data[q].select = false
               data[q].weightedit = false
@@ -2162,7 +2164,7 @@ export default {
     handleClose() {
       this.aduitshow = false
     },
-    handleClose5() {
+    handleClose6() {
       this.rejectshow = false
     },
     handleClose3() {