|
@@ -54,7 +54,11 @@
|
|
|
<div v-else>暂无附件</div>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <div style='margin:0 50px 10px;font-weight:bold'>费用分配</div>
|
|
|
+ <div style="display:flex;">
|
|
|
+ <div style='margin:0 50px 10px;font-weight:bold'>费用分配</div>
|
|
|
+ <div>可分配金额{{deptBudgetList.unallocatedAmount}}元</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<div style='margin:10px auto;width:90%;'>
|
|
|
<ws-select v-model="mode" placeholder="费用分配方式" class="typeselect" @change="modeselect">
|
|
|
<ws-option v-for="item in modeList" :key="item.value" :label="item.value" :value="item.value"
|
|
@@ -85,10 +89,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column v-if='deptBudgetList.expensesPurpose==1' 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+item.goodsSource" :value="item.time"
|
|
|
- style="color: #8890b1" />
|
|
|
- </ws-select>
|
|
|
+ <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 v-if='deptBudgetList.expensesPurpose==2' prop="date" label="日期">
|
|
@@ -103,7 +105,7 @@
|
|
|
value-format="yyyy-MM-dd" ></el-date-picker>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-if='deptBudgetList.expensesPurpose==3||deptBudgetList.expensesPurpose==2' prop="date" label="货源">
|
|
|
+ <el-table-column 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)})">
|
|
@@ -220,14 +222,14 @@
|
|
|
},
|
|
|
selectware(e,index){
|
|
|
var arr=[]
|
|
|
- this.datelist=[]
|
|
|
- getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:e}).toPromise()
|
|
|
+ this.datelist[index]=[]
|
|
|
+ getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:this.feeDetailsDistributions[index].warehouseName,receiptDocDate:this.feeDetailsDistributions[index].receiptDocDate}).toPromise()
|
|
|
.then(response => {
|
|
|
for (let i = 0; i < response.length; i++) {
|
|
|
response[i].issuingDate=response[i].issuingTime.split(' ')[0]
|
|
|
- arr.push({time:response[i].issuingDate,id:response[i].id,weight:response[i].inWarehouseWeight,goodsSource:response[i].goodsSource})
|
|
|
+ arr.push({goodsSource:response[i].goodsSource,id:response[i].id,weight:response[i].inWarehouseWeight,goodsName:response[i].goodsName,goodsNameKey:response[i].goodsNameKey})
|
|
|
}
|
|
|
- this.$set(this.datelist,index,JSON.parse(JSON.stringify(arr)))
|
|
|
+ this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
|
|
|
})
|
|
|
},
|
|
|
selectgoodsSource(e,item,index){
|
|
@@ -259,7 +261,7 @@
|
|
|
return total + currentValue.inWarehouseWeight;
|
|
|
}, 0)
|
|
|
for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
|
|
|
- this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney)
|
|
|
+ this.$set(this.feeDetailsDistributions[i],'distributionMoney',Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney))
|
|
|
money+=this.feeDetailsDistributions[i].distributionMoney
|
|
|
}
|
|
|
}
|
|
@@ -412,7 +414,7 @@
|
|
|
}
|
|
|
}
|
|
|
if(this.mode=='全部分配'){
|
|
|
- if(this.amount!=this.deptBudgetList.amountMoney){
|
|
|
+ if(this.amount!=this.deptBudgetList.unallocatedAmount){
|
|
|
this.$message({
|
|
|
message: '请款金额与分配金额不相等!',
|
|
|
type: 'warning',
|
|
@@ -421,7 +423,7 @@
|
|
|
}
|
|
|
}
|
|
|
if(this.mode=='部分分配'){
|
|
|
- if(this.amount>this.deptBudgetList.amountMoney){
|
|
|
+ if(this.amount>this.deptBudgetList.unallocatedAmount){
|
|
|
this.$message({
|
|
|
message: '分配金额不可超过请款金额!',
|
|
|
type: 'warning',
|