|
@@ -39,7 +39,7 @@ export default {
|
|
|
classifyList: [],
|
|
|
otherList: [],
|
|
|
formData: {},
|
|
|
- showbtn:false,
|
|
|
+ showbtn: false,
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -198,7 +198,14 @@ export default {
|
|
|
}>平分费用</el-button> : null}
|
|
|
{this.formData.normList[row.pfuqinid].bianji ? <el-button type="text" onClick={
|
|
|
() => {
|
|
|
- this.formData.normList[row.pfuqinid].bianji = false
|
|
|
+ var item = this.formData.normList[row.pfuqinid]
|
|
|
+ if ([0, 0, 0, ...item.workerList.map(val => Number(val.settleAmount))].reduce(function (prev, curr, idx, arr) {
|
|
|
+ return prev + curr;
|
|
|
+ }) == Number(item.settleAmount)) {
|
|
|
+ this.formData.normList[row.pfuqinid].bianji = false
|
|
|
+ } else {
|
|
|
+ this.$message.warning(`费用信息-${item.channelText}-${item.parentCategoryName}-${item.categoryName}-${item.label}:合计结算总金额与总金额不等`)
|
|
|
+ }
|
|
|
}
|
|
|
}>确定</el-button> : null}
|
|
|
{!this.formData.normList[row.pfuqinid].bianji ? <el-button type="text" onClick={
|
|
@@ -324,7 +331,14 @@ export default {
|
|
|
}>平分费用</el-button> : null}
|
|
|
{this.formData.otherNormList[row.pfuqinid].bianji ? <el-button type="text" onClick={
|
|
|
() => {
|
|
|
- this.formData.otherNormList[row.pfuqinid].bianji = false
|
|
|
+ var item = this.formData.otherNormList[row.pfuqinid]
|
|
|
+ if ([0, 0, 0, ...item.workerList.map(val => Number(val.settleAmount))].reduce(function (prev, curr, idx, arr) {
|
|
|
+ return prev + curr;
|
|
|
+ }) == Number(item.settleAmount)) {
|
|
|
+ this.formData.otherNormList[row.pfuqinid].bianji = false
|
|
|
+ } else {
|
|
|
+ this.$message.warning(`其他费用信息-${item.channelText}-${item.type}-${item.label}:合计结算总金额与总金额不等`)
|
|
|
+ }
|
|
|
}
|
|
|
}>确定</el-button> : null}
|
|
|
{!this.formData.otherNormList[row.pfuqinid].bianji ? <el-button type="text" onClick={
|
|
@@ -1174,7 +1188,7 @@ export default {
|
|
|
item.settleNum = item.settleNum || ""
|
|
|
normList.push({ ...item, pfuqinid: pfuqinid, zijideid: 0, bianji: res.data.settleStatus == 'YJS' ? false : true })
|
|
|
item.workerList.map((resdata, ind_) => {
|
|
|
- if(resdata.poolStatus === "NO"){ this.showbtn = true }
|
|
|
+ if (resdata.poolStatus === "NO") { this.showbtn = true }
|
|
|
if (ind_ !== 0) { normList.push({ pfuqinid: pfuqinid, zijideid: ind_ }) }
|
|
|
if (ind_ == item.workerList.length - 1) { pfuqinid += (ind_ + 1) }
|
|
|
})
|
|
@@ -1185,7 +1199,7 @@ export default {
|
|
|
item.settleNum = item.settleNum || ""
|
|
|
otherNormList.push({ ...item, pfuqinid: qtpfuqinid, zijideid: 0, bianji: res.data.settleStatus == 'YJS' ? false : true })
|
|
|
item.workerList.map((resdata, ind_) => {
|
|
|
- if(resdata.poolStatus === "NO"){ this.showbtn = true }
|
|
|
+ if (resdata.poolStatus === "NO") { this.showbtn = true }
|
|
|
if (ind_ !== 0) { otherNormList.push({ pfuqinid: qtpfuqinid, zijideid: ind_ }) }
|
|
|
if (ind_ == item.workerList.length - 1) { qtpfuqinid += (ind_ + 1) }
|
|
|
})
|