|
@@ -134,7 +134,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"
|
|
@@ -142,7 +142,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"
|
|
@@ -158,19 +158,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)})">
|
|
@@ -187,22 +187,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="">
|
|
@@ -306,7 +306,7 @@ weight: 4000}]],
|
|
|
for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
|
|
|
num += Number(this.feeDetailsDistributions[i].distributionMoney)
|
|
|
}
|
|
|
- return num
|
|
|
+ return num.toFixed(2)
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -404,9 +404,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)
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -435,6 +435,7 @@ weight: 4000}]],
|
|
|
})
|
|
|
},
|
|
|
selectgoodsSource(e,item,index){
|
|
|
+ debugger
|
|
|
var weight=0
|
|
|
var money=0
|
|
|
var moneyDiff = 0
|
|
@@ -452,11 +453,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=='按重量自动分配'){
|
|
@@ -480,9 +483,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)
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -541,8 +544,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)))
|
|
|
})
|
|
|
}
|
|
@@ -686,6 +691,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: '请款金额与分配金额不相等!',
|
|
@@ -805,9 +811,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)
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -937,7 +943,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)
|