|
@@ -18,6 +18,8 @@
|
|
<el-form-item label-width='100px' label="用途" span="1" prop="purpose" class="readonly">
|
|
<el-form-item label-width='100px' label="用途" span="1" prop="purpose" class="readonly">
|
|
<ws-select disabled v-model="deptBudgetList.expensesPurpose" placeholder="" class="typeselect" >
|
|
<ws-select disabled v-model="deptBudgetList.expensesPurpose" placeholder="" class="typeselect" >
|
|
<ws-option label="合同费用" value="1"
|
|
<ws-option label="合同费用" value="1"
|
|
|
|
+ style="color: #8890b1" />
|
|
|
|
+ <ws-option label="运费" value="2"
|
|
style="color: #8890b1" />
|
|
style="color: #8890b1" />
|
|
<ws-option label="库点费用" value="3"
|
|
<ws-option label="库点费用" value="3"
|
|
style="color: #8890b1" />
|
|
style="color: #8890b1" />
|
|
@@ -65,8 +67,8 @@
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
- <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"' class='expensetitle'>费用分配</div>
|
|
|
|
- <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"' style='margin:0 auto 10px;width:90%;'>
|
|
|
|
|
|
+ <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"||deptBudgetList.expensesPurpose==2' class='expensetitle'>费用分配</div>
|
|
|
|
+ <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"||deptBudgetList.expensesPurpose==2' style='margin:0 auto 10px;width:90%;'>
|
|
<ws-select v-model="mode" placeholder="费用分配方式" @change="modeselect">
|
|
<ws-select v-model="mode" placeholder="费用分配方式" @change="modeselect">
|
|
<ws-option v-for="item in modeList" :key="item.value" :label="item.value" :value="item.value"
|
|
<ws-option v-for="item in modeList" :key="item.value" :label="item.value" :value="item.value"
|
|
style="color: #8890b1" />
|
|
style="color: #8890b1" />
|
|
@@ -92,8 +94,8 @@
|
|
</ws-select>
|
|
</ws-select>
|
|
<span v-if='mode!="暂不分配"'>合计分配:{{amount}}元</span>
|
|
<span v-if='mode!="暂不分配"'>合计分配:{{amount}}元</span>
|
|
</div>
|
|
</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 v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
|
|
|
|
|
|
+ <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 v-if='deptBudgetList.purpose=="合同费用"||deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-select v-model="scope.row.warehouseName" placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
|
|
<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"
|
|
<el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
|
|
@@ -101,10 +103,10 @@
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="日期">
|
|
|
|
|
|
+ <el-table-column v-if='deptBudgetList.purpose=="合同费用"||deptBudgetList.expensesPurpose==2' prop="date" label="日期">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<ws-select v-model="scope.row.receiptDocDate" placeholder="选择日期" @change="((value)=>{selecttime(value, scope.row,scope.$index)})">
|
|
<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"
|
|
|
|
|
|
+ <ws-option v-for="item in datelist[scope.$index]" :key="item.time" :label="item.time+'/'+item.goodsSource" :value="item.time"
|
|
style="color: #8890b1" />
|
|
style="color: #8890b1" />
|
|
</ws-select>
|
|
</ws-select>
|
|
</template>
|
|
</template>
|
|
@@ -115,6 +117,8 @@
|
|
value-format="yyyy-MM-dd" ></el-date-picker>
|
|
value-format="yyyy-MM-dd" ></el-date-picker>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <el-table-column v-if='deptBudgetList.expensesPurpose==2' prop="goodsSource" label="货源">
|
|
|
|
+ </el-table-column>
|
|
<el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货源">
|
|
<el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货源">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<!-- {{scope.row.goodsourcelist}} -->
|
|
<!-- {{scope.row.goodsourcelist}} -->
|
|
@@ -241,7 +245,7 @@ weight: 4000}]],
|
|
.then(response => {
|
|
.then(response => {
|
|
for (let i = 0; i < response.length; i++) {
|
|
for (let i = 0; i < response.length; i++) {
|
|
response[i].issuingDate=response[i].issuingTime.split(' ')[0]
|
|
response[i].issuingDate=response[i].issuingTime.split(' ')[0]
|
|
- arr.push({time:response[i].issuingDate,id:response[i].id,weight:response[i].inWarehouseWeight})
|
|
|
|
|
|
+ arr.push({time:response[i].issuingDate,id:response[i].id,weight:response[i].inWarehouseWeight,goodsSource:response[i].goodsSource})
|
|
}
|
|
}
|
|
this.$set(this.datelist,index,JSON.parse(JSON.stringify(arr)))
|
|
this.$set(this.datelist,index,JSON.parse(JSON.stringify(arr)))
|
|
})
|
|
})
|
|
@@ -391,7 +395,7 @@ weight: 4000}]],
|
|
this.deptBudgetList.expenseAllocationInfoList=[]
|
|
this.deptBudgetList.expenseAllocationInfoList=[]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(this.deptBudgetList.expensesPurpose==1){
|
|
|
|
|
|
+ if(this.deptBudgetList.expensesPurpose==1||this.deptBudgetList.expensesPurpose==2){
|
|
var data=[]
|
|
var data=[]
|
|
for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
|
|
for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
|
|
if(data.length==0){
|
|
if(data.length==0){
|
|
@@ -521,9 +525,32 @@ weight: 4000}]],
|
|
if(row.id==0){
|
|
if(row.id==0){
|
|
this.feeDetailsDistributions.splice(row.index,1)
|
|
this.feeDetailsDistributions.splice(row.index,1)
|
|
}else{
|
|
}else{
|
|
|
|
+ this.feeDetailsDistributions.splice(row.index,1)
|
|
|
|
+ var data=localStorage.getItem('expensebh')
|
|
|
|
+ var data1=[]
|
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
|
+ if(data[i].id==row.id){
|
|
|
|
+ var data1=data.splice(row.i,1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(data1.length>0){
|
|
|
|
+ localStorage.setItem('expensebh',data1)
|
|
|
|
+ }else{
|
|
|
|
+ localStorage.removeItem('expensebh')
|
|
|
|
+ }
|
|
|
|
+
|
|
deloneallocationinfo({id:row.id}).toPromise().then((response) => {
|
|
deloneallocationinfo({id:row.id}).toPromise().then((response) => {
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
+ }else{
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '费用分配必须保留一个!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
}
|
|
}
|
|
var weight=0
|
|
var weight=0
|
|
var money=0
|
|
var money=0
|
|
@@ -578,7 +605,7 @@ weight: 4000}]],
|
|
this.paymentScreenshot=srcs
|
|
this.paymentScreenshot=srcs
|
|
}
|
|
}
|
|
if(localStorage.getItem('expensebh')){
|
|
if(localStorage.getItem('expensebh')){
|
|
- if(this.deptBudgetList.expensesPurpose==3||this.deptBudgetList.expensesPurpose==1){
|
|
|
|
|
|
+ if(this.deptBudgetList.expensesPurpose==3||this.deptBudgetList.expensesPurpose==1||this.deptBudgetList.expensesPurpose==2){
|
|
this.getgoodsourcelist()
|
|
this.getgoodsourcelist()
|
|
}
|
|
}
|
|
// console.log(this.feeDetailsDistributions)
|
|
// console.log(this.feeDetailsDistributions)
|
|
@@ -599,12 +626,12 @@ weight: 4000}]],
|
|
id:data[q].id,weight:data[q].inWarehouseWeight,goodsName:data[q].goodsName,goodsNameKey:data[q].goodsNameKey})
|
|
id:data[q].id,weight:data[q].inWarehouseWeight,goodsName:data[q].goodsName,goodsNameKey:data[q].goodsNameKey})
|
|
}
|
|
}
|
|
this.$set(this.goodsourcelist,i,JSON.parse(JSON.stringify(arr)))
|
|
this.$set(this.goodsourcelist,i,JSON.parse(JSON.stringify(arr)))
|
|
- }else if(this.deptBudgetList.expensesPurpose==1){
|
|
|
|
|
|
+ }else if(this.deptBudgetList.expensesPurpose==1||this.deptBudgetList.expensesPurpose==2){
|
|
const data = await getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:this.feeDetailsDistributions[i].warehouseName}).toPromise()
|
|
const data = await getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:this.feeDetailsDistributions[i].warehouseName}).toPromise()
|
|
this.datelist[i]=[]
|
|
this.datelist[i]=[]
|
|
for (let q = 0; q < data.length; q++) {
|
|
for (let q = 0; q < data.length; q++) {
|
|
data[i].issuingDate=data[i].issuingTime.split(' ')[0]
|
|
data[i].issuingDate=data[i].issuingTime.split(' ')[0]
|
|
- arr.push({time:data[i].issuingDate,id:data[i].id,weight:data[i].inWarehouseWeight})
|
|
|
|
|
|
+ arr.push({time:data[i].issuingDate,id:data[i].id,weight:data[i].inWarehouseWeight,goodsSource:data[i].goodsSource})
|
|
}
|
|
}
|
|
this.$set(this.datelist,i,JSON.parse(JSON.stringify(arr)))
|
|
this.$set(this.datelist,i,JSON.parse(JSON.stringify(arr)))
|
|
}
|
|
}
|