|
@@ -4,7 +4,7 @@
|
|
|
<lookForm :config="projectInfo" ref="lookinfo"></lookForm>
|
|
|
</inputLegend>
|
|
|
<inputLegend :label="'工程结算单'" isopen="true">
|
|
|
- <div style="margin: 0 0 20px" v-show="!isBaogan">
|
|
|
+ <!-- <div style="margin: 0 0 20px" v-show="!isBaogan">
|
|
|
<tableDispatch
|
|
|
@getTotalPrice="getTotalPrice"
|
|
|
v-if="moneyShow"
|
|
@@ -13,8 +13,15 @@
|
|
|
:desArr="desArr"
|
|
|
:isDetailShow="true"
|
|
|
/>
|
|
|
- </div>
|
|
|
- <lookForm :config="config1" v-if="inputFormShow"></lookForm>
|
|
|
+ </div> -->
|
|
|
+ <lookForm :config="config4" v-if="inputFormShow && !isBaogan"></lookForm>
|
|
|
+ <lookForm :config="config1" v-if="inputFormShow && isBaogan"></lookForm>
|
|
|
+
|
|
|
+ <legendLook :label="'结算费用'" isopen="true" v-if="inputFormShow">
|
|
|
+ <div style="margin: 0 0 20px">
|
|
|
+ <tableBudget :eidtAction="false" v-show="!isBaogan" ref="tableBudget" :settleArr="settleArr2"></tableBudget>
|
|
|
+ </div>
|
|
|
+ </legendLook>
|
|
|
<div style="margin: 0 0 20px">
|
|
|
<tablePriceTotal v-if="moneyShow" ref="tablePrice" :moneyObj="moneyObj"></tablePriceTotal>
|
|
|
</div>
|
|
@@ -26,8 +33,10 @@
|
|
|
<script>
|
|
|
// import flowMap from "@/components/flowMap/mainFlow.vue";
|
|
|
import lookForm from '@/components/projectCom/lookForm/index.vue'
|
|
|
+import legendLook from '@/components/projectCom/legendLook/index.vue'
|
|
|
import inputLegend from '@/components/projectCom/legend/index.vue'
|
|
|
import proNews from '@/components/projectCom/proNews/index.vue'
|
|
|
+import tableBudget from './tableBudget'
|
|
|
import tableDispatch from './tableDispatch'
|
|
|
import tablePriceTotal from './tablePriceTotal.vue'
|
|
|
import { getProjcetInfo } from '@/api/process/processDetail.ts'
|
|
@@ -36,7 +45,7 @@ import { detailInfo } from '@/views/zhpt/projectManager/newInstall/common/detail
|
|
|
import commonMe from '@/utils/common.js'
|
|
|
export default {
|
|
|
name: 'wxCheck',
|
|
|
- components: { lookForm, proNews, inputLegend, tableDispatch, tablePriceTotal },
|
|
|
+ components: { lookForm, proNews, inputLegend, tableDispatch, tablePriceTotal, tableBudget, legendLook },
|
|
|
props: {
|
|
|
inputData: {} //当前数据的信息
|
|
|
},
|
|
@@ -51,6 +60,7 @@ export default {
|
|
|
str3: '',
|
|
|
str4: '',
|
|
|
settleArr: [],
|
|
|
+ settleArr2: null,
|
|
|
isBaogan: false,
|
|
|
isJizhong: false,
|
|
|
moneyShow: false,
|
|
@@ -78,6 +88,23 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
+ config4: {
|
|
|
+ data: {}, //原始数据
|
|
|
+ showfield: [
|
|
|
+ {
|
|
|
+ group: [
|
|
|
+ {
|
|
|
+ field: 'settlementModeName', //存储字段
|
|
|
+ label: '结算方式' //显示标签
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'realhushu', //存储字段
|
|
|
+ label: '实际户数' //显示标签
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
config2: {
|
|
|
data: {}, //原始数据
|
|
|
showfield: [
|
|
@@ -171,16 +198,18 @@ export default {
|
|
|
* 按实结算计算费用
|
|
|
*/
|
|
|
getTotalPriceAn(value) {
|
|
|
- this.config1.showfield.forEach((item) => {
|
|
|
- item.group.forEach((item2, index) => {
|
|
|
- if (item2.field) {
|
|
|
- if (item2.field == 'SettleTotalPrice') {
|
|
|
- item2.value = value
|
|
|
- this.moneyObj.receivable = value
|
|
|
+ if (this.isBaogan) {
|
|
|
+ this.config1.showfield.forEach((item) => {
|
|
|
+ item.group.forEach((item2, index) => {
|
|
|
+ if (item2.field) {
|
|
|
+ if (item2.field == 'SettleTotalPrice') {
|
|
|
+ item2.value = value
|
|
|
+ this.moneyObj.receivable = value
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
+ }
|
|
|
this.config2.showfield.forEach((item) => {
|
|
|
item.group.forEach((item2, index) => {
|
|
|
if (item2.field) {
|
|
@@ -196,16 +225,18 @@ export default {
|
|
|
* 计算费用
|
|
|
*/
|
|
|
getTotalPrice(value) {
|
|
|
- this.config1.showfield.forEach((item) => {
|
|
|
- item.group.forEach((item2, index) => {
|
|
|
- if (item2.field) {
|
|
|
- if (item2.field == 'SettleTotalPrice') {
|
|
|
- item2.value = value
|
|
|
- this.moneyObj.receivable = (value - this.moneyObj.waterElectricity).toFixed(2)
|
|
|
+ if (this.isBaogan) {
|
|
|
+ this.config1.showfield.forEach((item) => {
|
|
|
+ item.group.forEach((item2, index) => {
|
|
|
+ if (item2.field) {
|
|
|
+ if (item2.field == 'SettleTotalPrice') {
|
|
|
+ item2.value = value
|
|
|
+ this.moneyObj.receivable = (value - this.moneyObj.waterElectricity).toFixed(2)
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
+ }
|
|
|
this.config2.showfield.forEach((item) => {
|
|
|
item.group.forEach((item2, index) => {
|
|
|
if (item2.field) {
|
|
@@ -228,6 +259,10 @@ export default {
|
|
|
if (val.dataMap && val.dataMap.tfBillWService && val.dataMap.tfBillWService[0]) {
|
|
|
this.settleArr = val.dataMap.tfBillWService
|
|
|
}
|
|
|
+ if (val.dataMap && val.dataMap.tfChargeWService && val.dataMap.tfChargeWService[0]) {
|
|
|
+ this.settleArr2 = val.dataMap.tfChargeWService[0]
|
|
|
+ console.log('settleArr2', this.settleArr2)
|
|
|
+ }
|
|
|
this.config2.showfield.forEach((item) => {
|
|
|
item.group.forEach((item2, index) => {
|
|
|
if (item2.field) {
|
|
@@ -255,6 +290,15 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
+ this.config4.showfield.forEach((item) => {
|
|
|
+ item.group.forEach((item2, index) => {
|
|
|
+ if (item2.field) {
|
|
|
+ if (item2.field == 'realhushu') {
|
|
|
+ item2.value = val.numberValue
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
} else if (val.pageCode == 'contractCheck_addProject' && val.isValid) {
|
|
|
if (val.dataMap && val.dataMap.tfContractWService && val.dataMap.tfContractWService[0]) {
|
|
|
let {
|
|
@@ -298,6 +342,15 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
+ this.config4.showfield.forEach((item) => {
|
|
|
+ item.group.forEach((item2, index) => {
|
|
|
+ if (item2.field) {
|
|
|
+ if (item2.field == 'settlementModeName') {
|
|
|
+ item2.value = settlementModeName
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
} else if (val.pageCode == 'userPayment_addUserSettle' && val.isValid) {
|
|
|
if (val.dataMap && val.dataMap.tfChargeRefundWService && val.dataMap.tfChargeRefundWService[0]) {
|
|
@@ -368,11 +421,14 @@ export default {
|
|
|
).toFixed(2)
|
|
|
this.getTotalPriceAn(allPrice)
|
|
|
} else {
|
|
|
- if (this.settleArr) {
|
|
|
- this.settleArr.forEach((item) => {
|
|
|
- allPrice += item.amountMoney
|
|
|
- })
|
|
|
- allPrice = allPrice.toFixed(2)
|
|
|
+ // if (this.settleArr) {
|
|
|
+ // this.settleArr.forEach((item) => {
|
|
|
+ // allPrice += item.amountMoney
|
|
|
+ // })
|
|
|
+ // allPrice = allPrice.toFixed(2)
|
|
|
+ // } else
|
|
|
+ if (this.settleArr2) {
|
|
|
+ allPrice = this.settleArr2.realAmount
|
|
|
} else {
|
|
|
allPrice = (this.str1 + this.str2 + this.str3 + this.str4).toFixed(2)
|
|
|
}
|