|
@@ -44,7 +44,7 @@
|
|
|
prop="contractNo" class="readonly">
|
|
|
<ws-select v-model="deptBudgetList.autoAssign" class="typeselect">
|
|
|
<ws-option label="不自动分配" value="不自动分配" style="color: #8890b1" />
|
|
|
- <ws-option label="仓储费自动分配" value="仓储费自动分配" style="color: #8890b1" />
|
|
|
+ <!-- <ws-option label="仓储费自动分配" value="仓储费自动分配" style="color: #8890b1" /> -->
|
|
|
<ws-option label="燃料费自动分配" value="燃料费自动分配" style="color: #8890b1" />
|
|
|
</ws-select>
|
|
|
</el-form-item>
|
|
@@ -114,10 +114,10 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div
|
|
|
- v-if='deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "利息" || deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "非粮款" || deptBudgetList.purpose == "库点费用" && deptBudgetList.autoAssign == "不自动分配"'
|
|
|
+ v-if='deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "利息" || deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "非粮款"|| deptBudgetList.purpose == "库点费用" && deptBudgetList.autoAssign == 1 && mode != "暂不分配" || deptBudgetList.purpose == "库点费用" && deptBudgetList.autoAssign == "不自动分配" && mode != "暂不分配"'
|
|
|
class='expensetitle'>费用分配</div>
|
|
|
<div
|
|
|
- v-if='deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "利息" || deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "非粮款" || deptBudgetList.purpose == "库点费用" && deptBudgetList.autoAssign == "不自动分配"'
|
|
|
+ v-if='deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "利息" || deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "非粮款"|| deptBudgetList.purpose == "库点费用" && deptBudgetList.autoAssign == 1 && mode != "暂不分配" || deptBudgetList.purpose == "库点费用" && deptBudgetList.autoAssign == "不自动分配" && mode != "暂不分配"'
|
|
|
style='margin:0 auto 10px;width:90%;display: flex;'>
|
|
|
<ws-select v-model="mode" placeholder="费用分配方式" @change="modeselect">
|
|
|
<ws-option v-for="item in modeList" :key="item.value" :label="item.value" :value="item.value"
|
|
@@ -144,16 +144,16 @@
|
|
|
style="color: #8890b1" />
|
|
|
</ws-select>
|
|
|
<div style='width:30%;margin-left: 10px'
|
|
|
- v-if='deptBudgetList.purpose == "库点费用" && deptBudgetList.flag == "否" && mode != "暂不分配"'>
|
|
|
+ v-if='deptBudgetList.purpose == "库点费用" && mode != "暂不分配" && deptBudgetList.autoAssign == "不自动分配"'>
|
|
|
<el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
|
|
|
start-placeholder="开始日期" value-format='yyyy-MM-dd' end-placeholder="结束日期" :picker-options="pickerOptions"
|
|
|
@change="dateChange">
|
|
|
</el-date-picker>
|
|
|
</div>
|
|
|
<el-button style="margin-left: 10px" type="primary" @click="queren"
|
|
|
- v-if='deptBudgetList.purpose == "库点费用" && deptBudgetList.flag == "否" && mode != "暂不分配"'>确认</el-button>
|
|
|
+ v-if='deptBudgetList.purpose == "库点费用" && mode != "暂不分配" && deptBudgetList.autoAssign == "不自动分配" || deptBudgetList.purpose == "库点费用" && mode != "暂不分配" && deptBudgetList.autoAssign == 1'>确认</el-button>
|
|
|
<ws-select style="margin-left: 25px"
|
|
|
- v-if='(deptBudgetList.purpose == "库点费用" && mode != "暂不分配" && deptBudgetList.flag == "否")'
|
|
|
+ v-if='(deptBudgetList.purpose == "库点费用" && mode != "暂不分配"&& deptBudgetList.autoAssign == "不自动分配" || deptBudgetList.purpose == "库点费用" && mode != "暂不分配" && deptBudgetList.autoAssign == 1 )'
|
|
|
v-model="goodsSource" placeholder="全部客户" @change='sourceChange'>
|
|
|
<ws-option key="全部客户" label="全部客户" value="全部客户" style="color: #8890b1" />
|
|
|
<ws-option v-for="item in customerList" :key="item.orderId" :label="item.goodsSource" :value="item.orderId"
|
|
@@ -162,7 +162,8 @@
|
|
|
<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 == "合同费用" && deptBudgetList.type == "非粮款" && mode != "暂不分配" || deptBudgetList.purpose == "库点费用" && mode != "暂不分配" && deptBudgetList.autoAssign == "不自动分配"'
|
|
|
+ v-if='deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "利息" && mode != "暂不分配" || deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "非粮款" && mode != "暂不分配" || deptBudgetList.purpose == "库点费用" && mode != "暂不分配" && deptBudgetList.autoAssign == "不自动分配"
|
|
|
+ || deptBudgetList.purpose == "库点费用" && mode != "暂不分配" && deptBudgetList.autoAssign == 1'
|
|
|
:data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
|
|
|
<el-table-column key="1" width="150" v-if='deptBudgetList.purpose == "合同费用"' prop="date" label="仓库名称"
|
|
|
min-width="110">
|
|
@@ -287,8 +288,9 @@ export default {
|
|
|
disabled: false,
|
|
|
warecontractList: [],
|
|
|
dateRange: this.disabledDate(),
|
|
|
+ // flag: '否',
|
|
|
feeDetailsDistributions: [{ receiptDocDate: '', inWarehouseWeight: 0, distributionMoney: 0, warehouseName: '', goodsName: '', goodsSource: '', index: 0 }],
|
|
|
- deptBudgetList: { purpose: '合同费用', type: '粮款', flag: '否', payerHeader:'',noPaymentFlag:'',autoAssign: '不自动分配', payee: '', accountNumber: '',paymentIdentifi: '', bank: '', bankBranch: '', wareExpenseType: '杂费', },
|
|
|
+ deptBudgetList: { purpose: '合同费用', type: '粮款', payerHeader:'',noPaymentFlag:'',autoAssign: '不自动分配', payee: '', accountNumber: '',paymentIdentifi: '', bank: '', bankBranch: '', wareExpenseType: '杂费', },
|
|
|
makeWordData: {},
|
|
|
warehouseList: [],
|
|
|
contractList: [],
|
|
@@ -302,7 +304,7 @@ export default {
|
|
|
wareList: [{ key: 1, value: '指定仓库' }, { key: 2, value: '全部仓库' }],
|
|
|
datesList: [{ key: 1, value: '固定日期' }, { key: 2, value: '指定日期' }],
|
|
|
|
|
|
- typeList: [{ key: 1, value: '杂费' }, { key: 2, value: '水电费' }, { key: 3, value: '伙食费' }, { key: 4, value: '人工费' }, { key: 5, value: '物质采买' }, { key: 6, value: '燃料费' }, { key: 7, value: '加油费' }],
|
|
|
+ typeList: [{ key: 1, value: '杂费' }, { key: 2, value: '水电费' }, { key: 3, value: '伙食费' }, { key: 4, value: '人工费' }, { key: 5, value: '物质采买' }, { key: 6, value: '燃料费' }, { key: 7, value: '加油费' },{ key: 8, value: '仓储费' }],
|
|
|
moneysList: [{ key: 1, value: '按重量自动分配' }, { key: 2, value: '指定分配金额' }],
|
|
|
goodsList: [{ key: 1, value: '全部货品' }, { key: 2, value: '指定货品' }],
|
|
|
Num: 0,
|
|
@@ -482,6 +484,7 @@ export default {
|
|
|
this.feeDetailsDistributions[index].orderId = this.goodsourcelist[index][i].id
|
|
|
}
|
|
|
}
|
|
|
+ debugger
|
|
|
if (this.moneys == '按重量自动分配') {
|
|
|
for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
|
|
|
weight += Number(this.feeDetailsDistributions[i].inWarehouseWeight)
|
|
@@ -494,9 +497,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (i == this.feeDetailsDistributions.length - 1) {
|
|
|
- this.feeDetailsDistributions[i].distributionMoney = (this.deptBudgetList.amountMoney - moneyDiff).toFixed(2)
|
|
|
+ this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.amountMoney - moneyDiff).toFixed(2)
|
|
|
}
|
|
|
- money = (this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
|
|
|
+ money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -668,7 +671,7 @@ export default {
|
|
|
this.feeDetailsDistributions = [{ receiptDocDate: '', inWarehouseWeight: 0, distributionMoney: 0, warehouseName: '', goodsName: '', goodsSource: '', index: 0 }]
|
|
|
this.goodsourcelist = []
|
|
|
this.$router.push({
|
|
|
- path: 'expensemanagementdetails'
|
|
|
+ path: 'expensemanagement'
|
|
|
})
|
|
|
},
|
|
|
handlefujian(file) {
|
|
@@ -789,19 +792,19 @@ export default {
|
|
|
this.deptBudgetList.costNo = 'HTF' + this.getdate() + this.Num
|
|
|
} else if (this.deptBudgetList.purpose == '库点费用') {
|
|
|
this.deptBudgetList.expensesPurpose = 3
|
|
|
+ debugger
|
|
|
+ for (var i = 0;i<this.typeList.length;i++) {
|
|
|
+ if (this.typeList[i].key == 8) {
|
|
|
+ this.deptBudgetList.storageFeeFlag = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ debugger
|
|
|
|
|
|
- if (this.deptBudgetList.flag == '是') {
|
|
|
- this.deptBudgetList.storageFeeFlag = 1
|
|
|
- this.deptBudgetList.expenseAllocationInfoList = []
|
|
|
- } else {
|
|
|
- this.deptBudgetList.storageFeeFlag = 0
|
|
|
- if (this.mode == '暂不分配') {
|
|
|
+ if (this.mode == '暂不分配') {
|
|
|
this.deptBudgetList.expenseAllocationInfoList = []
|
|
|
} else {
|
|
|
this.deptBudgetList.expenseAllocationInfoList = this.feeDetailsDistributions
|
|
|
- }
|
|
|
}
|
|
|
-
|
|
|
this.deptBudgetList.costNo = 'KDF' + this.getdate() + this.Num
|
|
|
} else if (this.deptBudgetList.purpose == '经营性费用') {
|
|
|
this.deptBudgetList.expensesPurpose = 5
|
|
@@ -811,7 +814,6 @@ export default {
|
|
|
this.deptBudgetList.costNo = 'BYJ' + this.getdate() + this.Num
|
|
|
this.$set(this.deptBudgetList,'wareExpenseType','')
|
|
|
this.$set(this.deptBudgetList,'type','')
|
|
|
- this.$set(this.deptBudgetList,'flag','')
|
|
|
}
|
|
|
//选中状态下,备用金支付标识为1
|
|
|
if(this.selected == true){
|
|
@@ -915,8 +917,8 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (this.deptBudgetList.autoAssign != '燃料费自动分配' && this.deptBudgetList.autoAssign != '仓储费自动分配') {//库点费用 仓储费自动分配和煤款自动分配不需要自动请款
|
|
|
- if (this.deptBudgetList.expensesPurpose == 1 && this.deptBudgetList.costType == 3 && this.mode == '全部分配' || this.deptBudgetList.expensesPurpose == 3 && this.mode == '全部分配' && this.deptBudgetList.storageFeeFlag != 1) {
|
|
|
+ if (this.deptBudgetList.autoAssign != '燃料费自动分配') {//库点费用 仓储费自动分配和煤款自动分配不需要自动请款
|
|
|
+ if (this.deptBudgetList.expensesPurpose == 1 && this.deptBudgetList.costType == 3 && this.mode == '全部分配' || this.deptBudgetList.expensesPurpose == 3 && this.mode == '全部分配') {
|
|
|
this.deptBudgetList.amountMoney = Number(this.deptBudgetList.amountMoney).toFixed(2)
|
|
|
if (this.amount != this.deptBudgetList.amountMoney) {
|
|
|
this.$message({
|
|
@@ -926,7 +928,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- if (this.deptBudgetList.expensesPurpose == 1 && this.deptBudgetList.costType == 3 && this.mode == '部分分配' || this.deptBudgetList.expensesPurpose == 3 && this.mode == '部分分配' && this.deptBudgetList.storageFeeFlag != 1) {
|
|
|
+ if (this.deptBudgetList.expensesPurpose == 1 && this.deptBudgetList.costType == 3 && this.mode == '部分分配' || this.deptBudgetList.expensesPurpose == 3 && this.mode == '部分分配') {
|
|
|
if (this.amount > this.deptBudgetList.amountMoney) {
|
|
|
this.$message({
|
|
|
message: '分配金额不可超过请款金额!',
|
|
@@ -939,9 +941,6 @@ export default {
|
|
|
if (this.deptBudgetList.purpose == '库点费用') {
|
|
|
if (this.deptBudgetList.autoAssign == '不自动分配') {
|
|
|
this.deptBudgetList.autoAssign = 1
|
|
|
- } else if (this.deptBudgetList.autoAssign == '仓储费自动分配') {
|
|
|
- this.deptBudgetList.autoAssign = 3
|
|
|
- this.deptBudgetList.expenseAllocationInfoList = []
|
|
|
} else if (this.deptBudgetList.autoAssign == '煤款自动分配') {
|
|
|
if (!this.deptBudgetList.coalPrice) {
|
|
|
this.$message({
|
|
@@ -1012,7 +1011,7 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
this.mode = '全部分配'
|
|
|
- this.deptBudgetList = { purpose: '合同费用', type: '粮款', flag: '否', payee: '', noPaymentFlag:'',accountNumber: '',payerHeader:'',paymentIdentifi: '', bank: '', bankBranch: '', wareExpenseType: '杂费', }
|
|
|
+ this.deptBudgetList = { purpose: '合同费用', type: '粮款', payee: '', noPaymentFlag:'',accountNumber: '',payerHeader:'',paymentIdentifi: '', bank: '', bankBranch: '', wareExpenseType: '杂费', }
|
|
|
this.feeDetailsDistributions = [{ receiptDocDate: '', inWarehouseWeight: 0, distributionMoney: 0, warehouseName: '', goodsName: '', goodsSource: '', index: 0 }]
|
|
|
this.paymentScreenshot = []
|
|
|
this.$refs.upload.clearFiles()
|