apply-clients 3.0.4 → 3.0.5-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist.zip +0 -0
- package/index.html +1 -1
- package/package.json +4 -3
- package/src/App.vue +126 -15
- package/src/apply.js +16 -0
- package/src/bootstrap/fonts/PingFangSC-Regular.ttf +0 -0
- package/src/bootstrap/less/bootstrap.less +1 -2
- package/src/bootstrap/less/standard.less +208 -0
- package/src/components/Util.js +4 -0
- package/src/components/app_apply/FieldExploration.vue +2 -2
- package/src/components/app_apply/Ventilation.vue +2 -2
- package/src/components/image/doc.jpg +0 -0
- package/src/components/image/excel.jpg +0 -0
- package/src/components/image/pdf.jpg +0 -0
- package/src/components/image//345/233/276/345/261/20212.png +0 -0
- package/src/components/image//345/233/276/345/261/20213.png +0 -0
- package/src/components/image//345/233/276/345/261/20216.png +0 -0
- package/src/components/image//345/244/232/350/276/271/345/275/2422.png +0 -0
- package/src/components/image//345/244/232/350/276/271/345/275/2422/346/213/267/350/264/235.png +0 -0
- package/src/components/image//346/244/255/345/234/2062.png +0 -0
- package/src/components/image//346/244/255/345/234/2065.png +0 -0
- package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/235.png +0 -0
- package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/2352.png +0 -0
- package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/2353.png +0 -0
- package/src/components/image//347/273/2044.png +0 -0
- package/src/components/image//347/273/2045.png +0 -0
- package/src/components/image//347/273/2046.png +0 -0
- package/src/components/image//350/257/235/345/212/241/347/273/237/350/256/241/346/225/260/346/215/256/345/261/225/347/244/272.png +0 -0
- package/src/components/product/Function/InstallFunction.vue +9 -5
- package/src/components/product/Function/InstallInfoSelect.vue +98 -69
- package/src/components/product/Function/Service/FunctionServiceControl.vue +47 -4
- package/src/components/product/Function/functions/AddContract.vue +161 -139
- package/src/components/product/Function/functions/BuyerMessage.vue +285 -137
- package/src/components/product/Function/functions/InstallFee.vue +1117 -912
- package/src/components/product/MaterialBatchList.vue +109 -0
- package/src/components/product/MaterialBatchManage.vue +34 -0
- package/src/components/product/Procedures/ProceduresDataGrid.vue +1022 -0
- package/src/components/product/Process/ExplorationSelect.vue +208 -73
- package/src/components/product/Process/ExplorationUser.vue +94 -39
- package/src/components/product/Process/MaterialUseList.vue +159 -0
- package/src/components/product/Process/ModifyUserFiles.vue +15 -5
- package/src/components/product/Process/ProcessInfo/history_control.vue +139 -110
- package/src/components/product/Process/Processes/ApplyUpload.vue +279 -0
- package/src/components/product/Process/Processes/CustomerMaterialMessage.vue +499 -210
- package/src/components/product/Process/Processes/CustomerRecordMessage.vue +949 -753
- package/src/components/product/Process/Processes/ProjectSettlement.vue +535 -24
- package/src/components/product/Process/Processes/ReceiveBatch.vue +301 -121
- package/src/components/product/Process/Processes/Service/ApplyChangeHistory.vue +105 -0
- package/src/components/product/Process/Processes/Service/ApplyChargeSearch.vue +27 -14
- package/src/components/product/Process/Processes/Service/ServiceControl.vue +1727 -336
- package/src/components/product/Process/Processes/Upload.vue +532 -0
- package/src/components/product/Process/ShowBackReason.vue +1 -1
- package/src/components/product/ServiceView.vue +359 -122
- package/src/components/product/Statistics/ApplyStatisticsROOT.vue +27 -0
- package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +212 -23
- package/src/components/product/Supervisory/SupervisoryControl.vue +79 -26
- package/src/components/product/Supervisory/SupervisoryList.vue +182 -41
- package/src/components/product/Supervisory/SupervisoryhCart.vue +4 -2
- package/src/components/product/VueUtils/Tree.vue +330 -0
- package/src/components/product/VueUtils/rightview/InstallCardList2.vue +29 -38
- package/src/stores/ApplyLoadParams.js +1 -1
- package/src/stores/PagedListLogic.js +173 -0
- package/.npmignore +0 -12
- package/yarn.lock +0 -9008
|
@@ -1,13 +1,34 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
2
|
+
<div class="auto">
|
|
3
|
+
<show-back-reason class="auto col-sm-7" v-if="selectdata.f_back_reason && selectdata.f_back_reason!=''"
|
|
4
|
+
:data="show_data"></show-back-reason>
|
|
5
|
+
<div class="auto col-sm-7" v-if="!(selectdata.f_back_reason && selectdata.f_back_reason!='')"></div>
|
|
6
|
+
<div class="auto col-sm-4">
|
|
7
|
+
<p v-show="changeHistoryData.length>0" class="text-right" href="#" @click="searchChangeHistory"><a href="#">点我查看修改历史</a>
|
|
8
|
+
</p>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
|
|
4
13
|
<!--<gas-stop v-if="selectdata.defname == '停气碰口'"></gas-stop>-->
|
|
5
|
-
<material-message v-if="selectdata.defname=='材料导入'
|
|
14
|
+
<material-message v-if="selectdata.defname=='材料导入'" v-ref:material
|
|
6
15
|
:selectdata="selectdata"
|
|
16
|
+
:state="2"
|
|
7
17
|
:edit="true"></material-message>
|
|
8
|
-
<
|
|
18
|
+
<material-message v-if="selectdata.defname=='材料审核'" v-ref:material
|
|
19
|
+
:selectdata="selectdata"
|
|
20
|
+
:state="1"
|
|
21
|
+
:edit="true"></material-message>
|
|
22
|
+
<receive-batch v-if="selectdata.defname == '派工单'" :selectdata="selectdata" :showprint="true"
|
|
23
|
+
v-ref:receivebatch></receive-batch>
|
|
9
24
|
<project-settlement v-if="selectdata.defname == '工程结算'" :selectdata="selectdata"></project-settlement>
|
|
10
25
|
<installfee :infee="selectdata" :showfee='true' v-if="selectdata.defname == '通气条件确认'"></installfee>
|
|
26
|
+
<buyer-message v-ref:buyermessagev :selectdata="selectdata" :state="1"
|
|
27
|
+
v-if="selectdata.defname == '收费'||selectdata.defname == '勘察初设'"></buyer-message>
|
|
28
|
+
<installfee :infee="selectdata" v-if="selectdata.defname == '收费'"></installfee>
|
|
29
|
+
<record-message v-if="selectdata.defname=='营收数据导入'" v-ref:record :selectdata="selectdata" :key="'tittle22'"
|
|
30
|
+
:edit="true">
|
|
31
|
+
</record-message>
|
|
11
32
|
<service-view v-ref:service_show :data="show_data" v-if="showview" :is_show_datacheck="datacheck"></service-view>
|
|
12
33
|
|
|
13
34
|
<modal :show.sync="showbuyerinfo" v-ref:modal backdrop="false">
|
|
@@ -38,8 +59,10 @@
|
|
|
38
59
|
<td style="text-align: center">{{row.f_buyer_addphone}}</td>
|
|
39
60
|
<td style="text-align: center">{{row.f_buyer_bank}}</td>
|
|
40
61
|
<td style="text-align: center">{{row.f_buyer_email}}</td>
|
|
41
|
-
<td style="text-align: center"
|
|
42
|
-
<button type="button" class="btn btn-success"
|
|
62
|
+
<td style="text-align: center">
|
|
63
|
+
<button type="button" class="btn btn-success"
|
|
64
|
+
@click='$parent.$parent.$parent.$parent.confirmbuyerinfo(row)'>选择
|
|
65
|
+
</button>
|
|
43
66
|
</td>
|
|
44
67
|
</template>
|
|
45
68
|
</data-grid>
|
|
@@ -51,13 +74,26 @@
|
|
|
51
74
|
<button v-show="showbuyerinfo" type="button" class="btn btn-default" @click='closebuyerinfo'>取消</button>
|
|
52
75
|
</footer>
|
|
53
76
|
</modal>
|
|
54
|
-
|
|
77
|
+
<modal :show.sync="showChangeHistoryInfo" v-ref:modal backdrop="false">
|
|
78
|
+
<header slot="modal-header" class="modal-header">
|
|
79
|
+
<button type="button" class="close" @click="closeChangeHistoryInfo"><span>×</span></button>
|
|
80
|
+
<h4 class="modal-title">更改历史</h4>
|
|
81
|
+
</header>
|
|
82
|
+
<article slot="modal-body" class="modal-body">
|
|
83
|
+
<div class="col-sm-12 span recordTable" style="margin-top: 10px;min-height: 350px">
|
|
84
|
+
<apply-change-history v-if="showChangeHistoryInfo" :history_data="changeHistoryData"></apply-change-history>
|
|
85
|
+
</div>
|
|
86
|
+
</article>
|
|
87
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
88
|
+
</footer>
|
|
89
|
+
</modal>
|
|
55
90
|
<!--打印报表html-->
|
|
56
91
|
<div v-show="false">
|
|
57
|
-
<div class="row" style="display: flex;justify-content: center;" id='bill-
|
|
92
|
+
<div class="row" style="display: flex;justify-content: center;" id='bill-fee3'>
|
|
58
93
|
{{{bill}}}
|
|
59
94
|
</div>
|
|
60
|
-
<report-print id='bill-
|
|
95
|
+
<report-print id='bill-fee3' top='15mm' left='5mm' width='90%' height='70%' :showbtn="false" preview="true"
|
|
96
|
+
v-ref:reportprint></report-print>
|
|
61
97
|
</div>
|
|
62
98
|
|
|
63
99
|
</template>
|
|
@@ -88,70 +124,108 @@
|
|
|
88
124
|
props: ['selectdata'],
|
|
89
125
|
data() {
|
|
90
126
|
return {
|
|
127
|
+
leijijiaofeijine:0, //累计缴费金额
|
|
128
|
+
tujiansum: 0,
|
|
129
|
+
anzhuangsum: 0,
|
|
130
|
+
showChangeHistoryInfo: false, // 历史数据模态框
|
|
131
|
+
changeHistoryData: [], // 修改历史数据处理
|
|
91
132
|
data: null, // 数据库数据,json配置文件数据的数据集合
|
|
92
133
|
json_datas: null, // Json配置文件集合
|
|
93
134
|
showview: false, // 控制显示service-view组件
|
|
94
135
|
show_data: null, // 给view层显示的数据
|
|
95
|
-
department_search:
|
|
136
|
+
department_search: [], // 当前部门下所有人
|
|
96
137
|
contract: null, // 单值表合同编号记录
|
|
97
|
-
technologist:[], // 技术人员 角色下的人
|
|
98
|
-
price:0,
|
|
99
|
-
cost:0,
|
|
100
|
-
number:0,
|
|
101
|
-
pgd:'',
|
|
138
|
+
technologist: [], // 技术人员 角色下的人
|
|
139
|
+
price: 0,
|
|
140
|
+
cost: 0,
|
|
141
|
+
number: 0,
|
|
142
|
+
pgd: '',
|
|
102
143
|
showbuyerinfo: false, // 新增购货方信息模态框开关
|
|
103
144
|
selectsellid: null, //需要打票收费id
|
|
104
|
-
buyerinfo:{
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
145
|
+
buyerinfo: {
|
|
146
|
+
id: '',
|
|
147
|
+
f_buyer_name: '',
|
|
148
|
+
f_buyer_identify: '',
|
|
149
|
+
f_buyer_addphone: '',
|
|
150
|
+
f_buyer_bank: '',
|
|
151
|
+
f_buyer_email: '',
|
|
152
|
+
rows: [] // 购货方信息
|
|
112
153
|
},
|
|
113
154
|
bill: ''
|
|
114
155
|
}
|
|
115
156
|
},
|
|
116
157
|
methods: {
|
|
117
|
-
/*
|
|
118
|
-
|
|
119
|
-
*/
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
158
|
+
/*
|
|
159
|
+
============================================收费临时使用
|
|
160
|
+
*/
|
|
161
|
+
// 判断部门
|
|
162
|
+
// checkParetment() {
|
|
163
|
+
// let flag = ''
|
|
164
|
+
// let str = this.$appdata.getSingleValue("客户服务部")
|
|
165
|
+
// let str2 = this.$appdata.getSingleValue("工程技术部")
|
|
166
|
+
// let arr = str.split(",")
|
|
167
|
+
// let arr2 = str2.split(",")
|
|
168
|
+
// for (let i = 0; i < arr.length; i++) {
|
|
169
|
+
// if (arr[i] == this.selectdata.f_apply_type) {
|
|
170
|
+
// flag = '客户服务部'
|
|
171
|
+
// break
|
|
172
|
+
// }
|
|
173
|
+
// }
|
|
174
|
+
// for (let i = 0; i < arr2.length; i++) {
|
|
175
|
+
// if (arr2[i] == this.selectdata.f_apply_type) {
|
|
176
|
+
// flag = '工程技术部'
|
|
177
|
+
// break
|
|
178
|
+
// }
|
|
179
|
+
// }
|
|
180
|
+
// return flag
|
|
181
|
+
// },
|
|
182
|
+
// 查看修改历史记录
|
|
183
|
+
searchChangeHistory() {
|
|
184
|
+
console.log("查看修改历史记录")
|
|
185
|
+
this.showChangeHistoryInfo = true
|
|
186
|
+
},
|
|
187
|
+
getmodel() {
|
|
188
|
+
return this.$refs.service_show.getmodel()
|
|
127
189
|
},
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
190
|
+
async printbill(sellid) {
|
|
191
|
+
let result = await this.$resetpost('rs/report/billReport', {data: {condition: `f_sell_id = ${sellid}`}}, {
|
|
192
|
+
resolveMsg: null,
|
|
193
|
+
rejectMsg: "提取数据出错,请重试!"
|
|
194
|
+
})
|
|
195
|
+
this.bill = result.data
|
|
196
|
+
console.log('this.bill', this.bill)
|
|
197
|
+
this.$nextTick(() => {
|
|
198
|
+
this.$refs.reportprint.print()
|
|
199
|
+
})
|
|
200
|
+
},
|
|
201
|
+
confirmbuyerinfo(args) {
|
|
202
|
+
let drawbilldata = {
|
|
203
|
+
sellid: this.selectsellid,
|
|
204
|
+
buyerid: args.id,
|
|
205
|
+
operator: this.$login.f.name
|
|
206
|
+
}
|
|
207
|
+
this.closebuyerinfo()
|
|
208
|
+
this.$resetpost('rs/logic/applyDrawBill', {data: drawbilldata}, {resolveMsg: null, rejectMsg: "开发票失败"})
|
|
209
|
+
.then((res) => {
|
|
210
|
+
if (res.data.status === 200) {
|
|
211
|
+
this.$showAlert('申请开具增值税电子发票成功,请稍后到报建功能中【报建收费】中查看电子发票', 'success', 5000)
|
|
212
|
+
/*let n = 0
|
|
213
|
+
var id = setInterval(async ()=>{
|
|
214
|
+
if(n>=3){
|
|
215
|
+
this.$showMessage('电子票延迟,请稍后查看!')
|
|
216
|
+
clearInterval(id)
|
|
153
217
|
}
|
|
154
|
-
|
|
218
|
+
if (this.seeeticket(res.data) === 'success'){
|
|
219
|
+
clearInterval(id)
|
|
220
|
+
this.load()
|
|
221
|
+
}
|
|
222
|
+
n++
|
|
223
|
+
this.$showAlert('电子发票开票中,请稍后...', 'info',3000)
|
|
224
|
+
},3000)*/
|
|
225
|
+
} else {
|
|
226
|
+
this.$showAlert('电子发票开票失败,失败代码为:' + res.data.status, 'warning', 3000)
|
|
227
|
+
}
|
|
228
|
+
})
|
|
155
229
|
},
|
|
156
230
|
// 金额转大写
|
|
157
231
|
smalltoBIG(n) {
|
|
@@ -181,40 +255,53 @@
|
|
|
181
255
|
},
|
|
182
256
|
// 关闭模态框
|
|
183
257
|
closebuyerinfo() {
|
|
184
|
-
|
|
185
|
-
|
|
258
|
+
this.showbuyerinfo = false
|
|
259
|
+
this.selectsellid = null
|
|
260
|
+
},
|
|
261
|
+
// 关闭历史数据模态框
|
|
262
|
+
closeChangeHistoryInfo() {
|
|
263
|
+
this.showChangeHistoryInfo = false
|
|
186
264
|
},
|
|
187
265
|
//根据票据流水号查看票据
|
|
188
266
|
async seeeticket(val) {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
267
|
+
console.log('该票据流水号为:', val.f_fpqqlsh)
|
|
268
|
+
var eticketData = await this.$resetpost('rs/sql/querySingleTable', {
|
|
269
|
+
data: {
|
|
270
|
+
items: 'f_bill_url,f_url_code',
|
|
271
|
+
tablename: 't_eticket',
|
|
272
|
+
condition: `f_serial_number=${val.f_fpqqlsh}`
|
|
273
|
+
}
|
|
274
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
275
|
+
console.log('eticketData:', eticketData)
|
|
276
|
+
var data = eticketData.data[0]
|
|
277
|
+
if (data.f_bill_url && data.f_bill_url != '') {
|
|
278
|
+
console.log(data)
|
|
279
|
+
var auth = data.f_bill_url.split("/")
|
|
280
|
+
console.log("截取", auth)
|
|
281
|
+
var authCode = auth[auth.length - 1]
|
|
282
|
+
var url = `https://${auth[2]}/ent-views/fpExtract/get_fapiao.html?pwd=${data.f_url_code}&authCode=${authCode}`
|
|
283
|
+
this.$showAlert('开票成功!', 'success', 500)
|
|
284
|
+
window.open(url)
|
|
285
|
+
return 'success'
|
|
286
|
+
}
|
|
287
|
+
return 'fail'
|
|
204
288
|
},
|
|
205
|
-
async loadbuyer(){
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
289
|
+
async loadbuyer() {
|
|
290
|
+
//获取购货方信息
|
|
291
|
+
let querybuyerdata = {
|
|
292
|
+
tablename: 't_buyer_info',
|
|
293
|
+
condition: `f_process_id = '${this.selectdata.f_process_id}' and f_apply_num = '${this.selectdata.f_apply_num}'`
|
|
294
|
+
}
|
|
295
|
+
let buyerinfos = await this.$resetpost('rs/sql/singleTable', {data: querybuyerdata}, {
|
|
296
|
+
resolveMsg: null,
|
|
297
|
+
rejectMsg: '获取购货方信息失败'
|
|
298
|
+
})
|
|
299
|
+
this.buyerinfo.rows = buyerinfos.data
|
|
213
300
|
},
|
|
214
|
-
/*
|
|
215
|
-
|
|
216
|
-
*/
|
|
217
|
-
//
|
|
301
|
+
/*
|
|
302
|
+
============================================收费临时使用结束
|
|
303
|
+
*/
|
|
304
|
+
// AOP后续特殊化处理
|
|
218
305
|
async special(model) {
|
|
219
306
|
if (model.button.button_name === '提交' && model.button.button_event && model.button.button_event === '分支流程异步处理') {
|
|
220
307
|
// 分支流程异步处理
|
|
@@ -227,6 +314,7 @@
|
|
|
227
314
|
}, {resolveMsg: null, rejectMsg: '分支流程异步处理保存失败'})
|
|
228
315
|
console.log("分支流程异步处理:", JSON.stringify(res.data))
|
|
229
316
|
}
|
|
317
|
+
|
|
230
318
|
if (this.data.distribute_async && model.button.button_name === '下发') {
|
|
231
319
|
// 同流程节点异步处理
|
|
232
320
|
let http = new HttpResetClass();
|
|
@@ -250,12 +338,27 @@
|
|
|
250
338
|
console.log("流程的异步处理:", JSON.stringify(res.data))
|
|
251
339
|
}
|
|
252
340
|
},
|
|
341
|
+
hasChangeHistory() {
|
|
342
|
+
let http = new HttpResetClass()
|
|
343
|
+
let data = {
|
|
344
|
+
tablename: 't_apply_change_record',
|
|
345
|
+
condition: ` defname = '${this.selectdata.defname}' and f_process_id ='${this.selectdata.f_process_id}' and f_filiale = '${this.$login.f.f_fengongsi}'`
|
|
346
|
+
}
|
|
347
|
+
http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: "历史纪录"}).then((res) => {
|
|
348
|
+
this.changeHistoryData = []
|
|
349
|
+
this.changeHistoryData = res.data
|
|
350
|
+
})
|
|
351
|
+
},
|
|
253
352
|
// 组件初始化操作
|
|
254
353
|
refurbish(val) {
|
|
255
354
|
this.selectdata = val
|
|
256
355
|
this.json_datas = this.$workflow_vue
|
|
257
356
|
let sum = 0
|
|
258
357
|
let jsonData = {}
|
|
358
|
+
if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length == 0) {
|
|
359
|
+
this.$showMessage("网络故障,请刷新页面")
|
|
360
|
+
return
|
|
361
|
+
}
|
|
259
362
|
for (let i = 0; i < this.json_datas.activitys.length; i++) {
|
|
260
363
|
if (this.selectdata.defname == this.json_datas.activitys[i].title) {
|
|
261
364
|
jsonData = this.json_datas.activitys[i]
|
|
@@ -263,7 +366,7 @@
|
|
|
263
366
|
}
|
|
264
367
|
}
|
|
265
368
|
for (let j = 0; j < jsonData.fields.length; j++) {
|
|
266
|
-
|
|
369
|
+
jsonData.fields[j].value = ''
|
|
267
370
|
if (jsonData.fields[j].default) {
|
|
268
371
|
jsonData.fields[j].value = jsonData.fields[j].default
|
|
269
372
|
}
|
|
@@ -271,6 +374,11 @@
|
|
|
271
374
|
if (sum == 1) {
|
|
272
375
|
this.data = null
|
|
273
376
|
this.data = jsonData
|
|
377
|
+
// 历史数据查询
|
|
378
|
+
this.hasChangeHistory()
|
|
379
|
+
// selectdata 填充 data
|
|
380
|
+
this.data = Object.assign({}, this.data, this.selectdata)
|
|
381
|
+
|
|
274
382
|
this.initializtion()
|
|
275
383
|
} else if (sum == 0) {
|
|
276
384
|
this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
|
|
@@ -278,40 +386,85 @@
|
|
|
278
386
|
this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
|
|
279
387
|
}
|
|
280
388
|
},
|
|
389
|
+
// AOP:进入vue组件前初始化内容
|
|
281
390
|
// json配置数据处理 比如下拉框的options
|
|
282
391
|
async initializtion() {
|
|
392
|
+
if(this.show_data&&this.show_data.f_process_id == this.data.f_process_id&&this.show_data.defname==this.selectdata.defname){
|
|
393
|
+
this.data = Object.assign({}, this.data, this.selectdata,this.show_data)
|
|
394
|
+
}
|
|
283
395
|
this.showview = false
|
|
396
|
+
// 如果selectdata有这些key,则把selectdata的value赋值给data的value
|
|
397
|
+
for(let i=0;i<this.data.fields.length;i++){
|
|
398
|
+
if (this.selectdata[this.data.fields[i].field]) {
|
|
399
|
+
if (String(this.selectdata[this.data.fields[i].field]).startsWith("{")) {
|
|
400
|
+
if(this.data.fields[i].field=='f_survey_name') {
|
|
401
|
+
let json = JSON.parse(this.selectdata[this.data.fields[i].field])
|
|
402
|
+
this.data.fields[i].value=json.name
|
|
403
|
+
this.selectdata.f_survey_id = json.id
|
|
404
|
+
}else{
|
|
405
|
+
this.data.fields[i].value = JSON.parse(this.selectdata[this.data.fields[i].field])
|
|
406
|
+
this.selectdata[this.data.fields[i].field] = JSON.parse(this.selectdata[this.data.fields[i].field])
|
|
407
|
+
}
|
|
408
|
+
} else {
|
|
409
|
+
this.data.fields[i].value = this.selectdata[this.data.fields[i].field]
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
// 有合同号不给合同表里插入数据
|
|
414
|
+
for (let i = 0; i < this.data.tables.length; i++) {
|
|
415
|
+
if ('t_contract' == this.data.tables[i] && this.selectdata.f_contract_number) {
|
|
416
|
+
this.data.tables.splice(i, 1)
|
|
417
|
+
}
|
|
418
|
+
}
|
|
284
419
|
// 下发人 options 处理,options初始化
|
|
285
|
-
if (this.
|
|
420
|
+
if (this.data.source) {
|
|
286
421
|
let http = new HttpResetClass()
|
|
287
|
-
|
|
422
|
+
await http.load('POST', 'rs/search', `{"source":${this.data.source},"userid":"${this.$login.f.id}"}`, {
|
|
288
423
|
resolveMsg: null,
|
|
289
|
-
rejectMsg:
|
|
424
|
+
rejectMsg: null
|
|
425
|
+
}).then((res) => {
|
|
426
|
+
// console.log("search查询部门下所有人:", res.data)
|
|
427
|
+
let jsonString = JSON.stringify(res.data)
|
|
428
|
+
let jsonArray = []
|
|
429
|
+
if (jsonString.startsWith("{")) {
|
|
430
|
+
jsonArray.push(res.data)
|
|
431
|
+
res.data = jsonArray
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
this.department_search = res.data
|
|
435
|
+
if (this.department_search && this.showview) {
|
|
436
|
+
let array = []
|
|
437
|
+
for (let k = 0; k < this.department_search.length; k++) {
|
|
438
|
+
array.push({
|
|
439
|
+
label: this.department_search[k].name,
|
|
440
|
+
value: {id: this.department_search[k].id, name: this.department_search[k].name}
|
|
441
|
+
})
|
|
442
|
+
}
|
|
443
|
+
for (let x = 0; x < this.data.buttons.length; x++) {
|
|
444
|
+
if (this.data && this.data.buttons[x].button_name == "下发") {
|
|
445
|
+
this.data.buttons[x].button_fields[0].options = array
|
|
446
|
+
}
|
|
447
|
+
if (this.show_data && this.show_data.buttons[x].button_name == "下发") {
|
|
448
|
+
this.show_data.buttons[x].button_fields[0].options = array
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
290
452
|
})
|
|
291
|
-
console.log("search查询部门下所有人:", JSON.stringify(res.data))
|
|
292
|
-
let jsonString = JSON.stringify(res.data)
|
|
293
|
-
let jsonArray = []
|
|
294
|
-
if (jsonString.startsWith("{")) {
|
|
295
|
-
jsonArray.push(res.data)
|
|
296
|
-
res.data = jsonArray
|
|
297
|
-
}
|
|
298
|
-
this.department_search = res.data
|
|
299
453
|
}
|
|
300
|
-
|
|
301
454
|
// selectdata 填充 data
|
|
302
|
-
this.data = Object.assign({}, this.data, this.selectdata)
|
|
455
|
+
// this.data = Object.assign({}, this.data, this.selectdata)
|
|
303
456
|
// onetomany 数据获取
|
|
304
457
|
if (this.data.onetomany) {
|
|
305
458
|
console.log('判断是onetomany,this.data.onetomany的数据为=>' + JSON.stringify(this.data.onetomany))
|
|
306
459
|
for (let index = 0; index < this.data.onetomany.length; index++) {
|
|
307
460
|
let http = new HttpResetClass()
|
|
308
|
-
let data ={}
|
|
309
|
-
if(this.data.onetomany[index].tables[0]=='t_charge_record'){
|
|
461
|
+
let data = {}
|
|
462
|
+
if (this.data.onetomany[index].tables[0] == 't_charge_record') {
|
|
310
463
|
data = {
|
|
311
464
|
tablename: this.data.onetomany[index].tables[0],
|
|
312
|
-
condition: `f_apply_num = '${this.selectdata.f_apply_num}' and f_process_id='${this.selectdata.f_process_id}' and f_charging_status != '
|
|
465
|
+
condition: `f_apply_num = '${this.selectdata.f_apply_num}' and f_process_id='${this.selectdata.f_process_id}' and f_charging_status != '无效'`
|
|
313
466
|
}
|
|
314
|
-
}else {
|
|
467
|
+
} else {
|
|
315
468
|
data = {
|
|
316
469
|
tablename: this.data.onetomany[index].tables[0],
|
|
317
470
|
condition: `f_apply_num = '${this.selectdata.f_apply_num}' and f_process_id='${this.selectdata.f_process_id}'`
|
|
@@ -325,10 +478,10 @@
|
|
|
325
478
|
let rows = []
|
|
326
479
|
console.log('查询返回结果res.data=>' + JSON.stringify(res.data))
|
|
327
480
|
this.data.onetomany[index].rows = res.data
|
|
328
|
-
console.log(JSON.stringify('this.data.onetomany[index].rows=>' + JSON.stringify(this.data.onetomany[index].rows)))
|
|
481
|
+
// console.log(JSON.stringify('this.data.onetomany[index].rows=>' + JSON.stringify(this.data.onetomany[index].rows)))
|
|
329
482
|
|
|
330
483
|
// 初始化onetomany中的fields
|
|
331
|
-
for(let j =0;j<this.data.onetomany[index].fields.length;j++){
|
|
484
|
+
for (let j = 0; j < this.data.onetomany[index].fields.length; j++) {
|
|
332
485
|
// 如果配置类型为select,优先从参数列表获取options
|
|
333
486
|
if (this.data.onetomany[index].fields[j].type === 'select') {
|
|
334
487
|
let temp = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
|
|
@@ -341,38 +494,162 @@
|
|
|
341
494
|
}
|
|
342
495
|
}
|
|
343
496
|
|
|
344
|
-
|
|
497
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
498
|
+
for (let p = 0; p < this.data.fields.length; p++) {
|
|
499
|
+
if (this.data.fields[p].type === 'select') {
|
|
500
|
+
let temp = Vue.$appdata.getParam(this.data.fields[p].label)
|
|
501
|
+
// if(this.data.fields[p].disabled){
|
|
502
|
+
// this.data.fields[p].options = []
|
|
503
|
+
// }else
|
|
504
|
+
if (temp && temp.length > 0) {
|
|
505
|
+
if (this.data.fields[p].label) {
|
|
506
|
+
this.data.fields[p].options = Vue.$appdata.getParam(this.data.fields[p].label)
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
345
511
|
// 初始化 fields
|
|
346
512
|
for (let i = 0; i < this.data.fields.length; i++) {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
513
|
+
|
|
514
|
+
/*
|
|
515
|
+
{
|
|
516
|
+
"label": "累计缴费金额",
|
|
517
|
+
"field": "f_cumulative_money",
|
|
518
|
+
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"label": "未结总金额",
|
|
522
|
+
"field": "f_unaccounts_money",
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"label": "累计开票金额"
|
|
526
|
+
"field": "f_cumulative_invoicing"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"label": "未开票金额",
|
|
530
|
+
"field": "f_residual_invoicing",
|
|
531
|
+
},
|
|
532
|
+
*/
|
|
533
|
+
if(this.data.fields[i].label === '设计单位'){
|
|
534
|
+
if(this.selectdata.f_apply_type == '民用散户'||this.selectdata.f_apply_type == '民用整改'){
|
|
535
|
+
this.data.fields[i].required = false
|
|
536
|
+
}else{
|
|
537
|
+
this.data.fields[i].required = true
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
if(this.data.fields[i].label === '累计缴费金额'){
|
|
541
|
+
let http = new HttpResetClass()
|
|
542
|
+
let data = {
|
|
543
|
+
columnname: 'f_charge_money',
|
|
544
|
+
tablename: 't_charge_record',
|
|
545
|
+
condition: `f_charging_status='有效' and f_process_id = '${this.selectdata.f_process_id}'`
|
|
546
|
+
}
|
|
547
|
+
let res = await http.load('POST', 'rs/sql/getSum', {data: data}, {resolveMsg: null, rejectMsg: '获取缴费金额获取失败'})
|
|
548
|
+
if(res.data[0].f_charge_money){
|
|
549
|
+
this.data.fields[i].value = res.data[0].f_charge_money
|
|
550
|
+
}else {
|
|
551
|
+
this.data.fields[i].value = 0
|
|
552
|
+
}
|
|
553
|
+
this.leijijiaofeijine = res.data[0].f_charge_money
|
|
554
|
+
for (let k = 0; k < this.data.fields.length; k++) {
|
|
555
|
+
if(this.data.fields[k].label=='未结总金额'){
|
|
556
|
+
this.data.fields[k].value= Number(this.selectdata.f_contract_money) - this.data.fields[i].value
|
|
557
|
+
console.log(this.data.fields[k].label,this.data.fields[k].value)
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
console.log(this.data.fields[i].label,this.data.fields[i].value)
|
|
561
|
+
}
|
|
562
|
+
if(this.data.fields[i].label === '累计开票金额'){
|
|
563
|
+
let http = new HttpResetClass()
|
|
564
|
+
let data = {
|
|
565
|
+
columnname: 'f_charge_money',
|
|
566
|
+
tablename: 't_charge_record',
|
|
567
|
+
condition: `f_charging_status='有效' and f_process_id = '${this.selectdata.f_process_id}' and (f_invoice_num !='' or f_invoice_num is not null)`
|
|
568
|
+
}
|
|
569
|
+
let res = await http.load('POST', 'rs/sql/getSum', {data: data}, {resolveMsg: null, rejectMsg: '获取累计缴费金额获取失败'})
|
|
570
|
+
this.data.fields[i].value = res.data[0].f_charge_money
|
|
571
|
+
for (let k = 0; k < this.data.fields.length; k++) {
|
|
572
|
+
if(this.data.fields[k].label=='未开票金额'){
|
|
573
|
+
this.data.fields[k].value= Number(this.leijijiaofeijine) - res.data[0].f_charge_money
|
|
574
|
+
console.log(this.data.fields[k].label,this.data.fields[k].value)
|
|
575
|
+
console.log("this.data.fields1",this.data.fields)
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
console.log(this.data.fields[i].label,this.data.fields[i].value)
|
|
579
|
+
console.log("this.data.fields",this.data.fields)
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
if (this.data.fields[i].label === '气表品牌') {
|
|
583
|
+
if (!this.data.fields[i].value) {
|
|
584
|
+
let http = new HttpResetClass()
|
|
585
|
+
let data = {
|
|
586
|
+
columnname: 'f_meter_brand,id',
|
|
587
|
+
tablename: 't_gasbrand',
|
|
588
|
+
condition: ` 1=1 `
|
|
589
|
+
}
|
|
590
|
+
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {resolveMsg: null, rejectMsg: '获取气表品牌失败'})
|
|
591
|
+
this.data.fields[i].options=[]
|
|
592
|
+
for(let x=0;x<res.data.length;x++){
|
|
593
|
+
this.data.fields[i].options.push({label:res.data[x].f_meter_brand,value:{id:res.data[x].id,name:res.data[x].f_meter_brand}})
|
|
594
|
+
}
|
|
595
|
+
console.log("气表品牌",this.data.fields[i].options)
|
|
596
|
+
if (this.showview) {
|
|
597
|
+
this.$refs.service_show.update()
|
|
598
|
+
}
|
|
599
|
+
}
|
|
350
600
|
}
|
|
351
|
-
|
|
352
|
-
if (this.data.fields[i].
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
601
|
+
|
|
602
|
+
if (this.data.fields[i].label == '合同金额' || this.data.fields[i].label == '合同总金额') {
|
|
603
|
+
if (this.data.fields[i].value == null || this.data.fields[i].value == '') {
|
|
604
|
+
this.data.fields[i].value = "0"
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
if (this.data.fields[i].label == '技术人员'||this.data.fields[i].label == '设计人员') {
|
|
608
|
+
let buyerinfos = []
|
|
609
|
+
let numReg = /^[0-9]+$/
|
|
610
|
+
let numRe = new RegExp(numReg)
|
|
611
|
+
if (numRe.test(this.data.fields[i].value)) {
|
|
612
|
+
let querydata = {
|
|
613
|
+
tablename: 't_user',
|
|
614
|
+
condition: `id = ${this.data.fields[i].value}`
|
|
615
|
+
}
|
|
616
|
+
buyerinfos = await this.$resetpost('rs/sql/singleTable', {data: querydata}, {
|
|
617
|
+
resolveMsg: null,
|
|
618
|
+
rejectMsg: '获取人员失败'
|
|
619
|
+
})
|
|
620
|
+
this.data.fields[i].value = {
|
|
621
|
+
id: buyerinfos.data[0].id,
|
|
622
|
+
name: buyerinfos.data[0].name
|
|
623
|
+
}
|
|
356
624
|
}
|
|
357
625
|
}
|
|
626
|
+
|
|
358
627
|
if (this.data.defname === '工程结算') {
|
|
359
628
|
var a = 0
|
|
360
629
|
var b = 0
|
|
361
630
|
var c = 0
|
|
362
631
|
for (let i = 0; i < this.data.fields.length; i++) {
|
|
363
632
|
if (this.data.fields[i].label === '最终核算成本金额') {
|
|
364
|
-
|
|
365
|
-
|
|
633
|
+
this.data.fields[i].value = (this.cost + this.number + this.anzhuangsum + this.tujiansum)
|
|
634
|
+
a = this.data.fields[i].value
|
|
366
635
|
}
|
|
367
636
|
if (this.data.fields[i].label === '合同总金额') {
|
|
368
637
|
b = this.data.fields[i].value
|
|
369
|
-
}
|
|
638
|
+
}
|
|
639
|
+
if (this.data.fields[i].label === '材料成本金额') {
|
|
370
640
|
this.data.fields[i].value = this.number
|
|
371
|
-
}
|
|
641
|
+
}
|
|
642
|
+
if (this.data.fields[i].label === '安装人工成本') {
|
|
643
|
+
this.data.fields[i].value = this.anzhuangsum
|
|
644
|
+
}
|
|
645
|
+
if (this.data.fields[i].label === '土建人工成本') {
|
|
646
|
+
this.data.fields[i].value = this.tujiansum
|
|
647
|
+
}
|
|
648
|
+
if (this.data.fields[i].label === '其他成本金额') {
|
|
372
649
|
this.data.fields[i].value = this.cost
|
|
373
650
|
}
|
|
374
651
|
}
|
|
375
|
-
c=b-a
|
|
652
|
+
c = b - a
|
|
376
653
|
for (let i = 0; i < this.data.fields.length; i++) {
|
|
377
654
|
if (this.data.fields[i].label === '工程盈利') {
|
|
378
655
|
this.data.fields[i].value = c
|
|
@@ -392,78 +669,236 @@
|
|
|
392
669
|
}
|
|
393
670
|
// 特殊处理
|
|
394
671
|
//施工环节 如果是个人报建需要提交表具信息
|
|
672
|
+
// 如果安装表数为1,则显示是否有表选项
|
|
395
673
|
if (this.data.defname === '施工') {
|
|
396
674
|
for (let i = 0; i < this.data.fields.length; i++) {
|
|
397
|
-
if (this.data.fields[i].label
|
|
398
|
-
|| this.data.
|
|
399
|
-
|
|
400
|
-
|
|
675
|
+
if (this.data.fields[i].label == '是否有表') { //
|
|
676
|
+
if (this.data.f_apply_type === '管线整改' || this.data.f_apply_type === '商业预埋管线'|| this.data.f_apply_type === '商业新建管线') { //一定没有表
|
|
677
|
+
this.data.fields[i].value = '否'
|
|
678
|
+
this.selectdata.f_hasmeter = '否'
|
|
679
|
+
this.data.fields[i].hidden = true
|
|
680
|
+
this.data.fields[i].required = false
|
|
681
|
+
} else if (this.data.f_install_num == 1 && (this.data.f_apply_type === '民用整改' || this.data.f_apply_type === '非居整改' || this.data.f_apply_type === '内部投建'||(this.data.f_apply_type != '管线整改'&&this.data.f_apply_type.includes("整改")))) { // 民用整改,非居整改,内部投建可能不安装表
|
|
401
682
|
this.data.fields[i].hidden = false
|
|
402
683
|
this.data.fields[i].required = true
|
|
684
|
+
} else{
|
|
685
|
+
this.data.fields[i].hidden = false
|
|
686
|
+
this.data.fields[i].required = true
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
// 如果是民用散户默认 跳过 内验 和 外验
|
|
691
|
+
if(this.selectdata.f_apply_type == '民用散户'){
|
|
692
|
+
for (let i = 0; i < this.data.fields.length; i++) {
|
|
693
|
+
if (this.data.fields[i].label == '是否内验' || this.data.fields[i].label == '是否发起外验') { //this.data.f_install_num != 1&&
|
|
694
|
+
this.data.fields[i].value = '否'
|
|
695
|
+
this.data.fields[i].hidden = true
|
|
696
|
+
this.data.fields[i].required = false
|
|
403
697
|
}
|
|
404
698
|
}
|
|
405
699
|
}
|
|
406
700
|
}
|
|
407
|
-
|
|
701
|
+
|
|
702
|
+
// 只有工商用户才让显示 6方以上 还是 6方以下
|
|
703
|
+
if(this.data.fields[i].label == '6方以上'){
|
|
704
|
+
if(this.selectdata.f_apply_type == '工业'||this.selectdata.f_apply_type == '商业'){
|
|
705
|
+
this.data.fields[i].value = null
|
|
706
|
+
this.data.fields[i].hidden = false
|
|
707
|
+
this.data.fields[i].required = true
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
if(this.data.fields[i].label == '是否内验'){
|
|
712
|
+
// 工业,商业
|
|
713
|
+
if(this.selectdata.f_apply_type == '工业'||this.selectdata.f_apply_type == '商业'){
|
|
714
|
+
this.data.fields[i].value = '是'
|
|
715
|
+
this.data.fields[i].hidden = true
|
|
716
|
+
this.data.fields[i].required = false
|
|
717
|
+
}
|
|
718
|
+
// 如果是 民用成套户 或者 民用集体散户 是否内验 和 是否外验 都是是
|
|
719
|
+
if(this.selectdata.f_apply_type == '民用成套户'||this.selectdata.f_apply_type == '民用集体散户'||this.selectdata.f_apply_type == '民用集体户'){
|
|
720
|
+
this.data.fields[i].value = '是'
|
|
721
|
+
this.data.fields[i].hidden = true
|
|
722
|
+
this.data.fields[i].required = false
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
if(this.data.fields[i].label == '是否发起外验'){
|
|
728
|
+
// 如果是 民用成套户 或者 民用集体散户 是否内验 和 是否外验 都是是
|
|
729
|
+
if(this.selectdata.f_apply_type == '工业'||this.selectdata.f_apply_type == '商业'){
|
|
730
|
+
this.data.fields[i].hidden = true
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
// 如果是 民用成套户 或者 民用集体散户 是否内验 和 是否外验 都是是
|
|
734
|
+
if(this.selectdata.f_apply_type == '民用成套户'||this.selectdata.f_apply_type == '民用集体散户'||this.selectdata.f_apply_type == '民用集体户'){
|
|
735
|
+
this.data.fields[i].value = '是'
|
|
736
|
+
this.data.fields[i].hidden = true
|
|
737
|
+
this.data.fields[i].required = false
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
|
|
408
742
|
if (this.data.defname === '通气') {
|
|
743
|
+
for (let i = 0; i < this.data.fields.length; i++) {
|
|
744
|
+
if (this.data.fields[i].label == '是否有表' && !this.data.fields[i].value) { //this.data.f_install_num != 1&&
|
|
745
|
+
this.data.fields[i].value = '否'
|
|
746
|
+
this.data.fields[i].hidden = true
|
|
747
|
+
this.data.fields[i].required = false
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
if(this.data.fields[i].label === '是否装新表'){
|
|
753
|
+
for(let k=0;k<this.data.fields.length;k++){
|
|
754
|
+
if(this.data.fields[i].value == '是'){
|
|
755
|
+
if(this.data.fields[k].label=='用气性质'||
|
|
756
|
+
this.data.fields[k].label=='气价类型'||
|
|
757
|
+
this.data.fields[k].label=='气价名称'
|
|
758
|
+
){
|
|
759
|
+
this.data.fields[k].required=true,
|
|
760
|
+
this.data.fields[k].hidden=false
|
|
761
|
+
}
|
|
762
|
+
}else{
|
|
763
|
+
if(this.data.fields[k].label=='用气性质'||
|
|
764
|
+
this.data.fields[k].label=='气价类型'||
|
|
765
|
+
this.data.fields[k].label=='气价名称'){
|
|
766
|
+
this.data.fields[k].required=false,
|
|
767
|
+
this.data.fields[k].hidden=true
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
//通气环节可以调出施工环节的表信息来修改
|
|
774
|
+
if (this.data.defname == '通气' || this.data.defname == '施工') {
|
|
775
|
+
console.log("是否有表", this.selectdata.f_hasmeter)
|
|
409
776
|
for (let i = 0; i < this.data.fields.length; i++) {
|
|
410
777
|
if (this.data.fields[i].label === '气表品牌'
|
|
411
778
|
|| this.data.fields[i].label === '气表型号'
|
|
779
|
+
|| this.data.fields[i].label === '表号'
|
|
780
|
+
|| this.data.fields[i].label === '通气表号'
|
|
781
|
+
|| this.data.fields[i].label === '左右表'
|
|
412
782
|
|| this.data.fields[i].label === '气表厂家') {
|
|
413
|
-
if (this.data.
|
|
783
|
+
if (this.data.f_install_num == 1 && this.selectdata.f_hasmeter && this.selectdata.f_hasmeter == '是') {
|
|
414
784
|
this.data.fields[i].hidden = false
|
|
415
785
|
this.data.fields[i].required = true
|
|
786
|
+
} else if ((this.data.f_install_num == 1 && this.selectdata.f_hasmeter && this.selectdata.f_hasmeter == '否')) {
|
|
787
|
+
this.data.fields[i].hidden = true
|
|
788
|
+
this.data.fields[i].required = false
|
|
416
789
|
}
|
|
790
|
+
if (this.data.fields[i].label === '表号') {
|
|
791
|
+
console.log("表号", this.data.fields[i].value)
|
|
792
|
+
}
|
|
793
|
+
} else if (this.data.fields[i].label === '气表品牌id' || this.data.fields[i].label === '气表型号id') {
|
|
794
|
+
this.data.fields[i].hidden = true
|
|
795
|
+
this.data.fields[i].required = false
|
|
417
796
|
}
|
|
418
797
|
}
|
|
419
798
|
}
|
|
420
|
-
|
|
799
|
+
|
|
800
|
+
let array = this.$login.f.rolesnames.split(',')
|
|
801
|
+
if ((this.data.fields[i].label === '技术人员' || array.includes("工程技术部负责人")) && (this.selectdata.defname == '报装申请' || this.selectdata.defname == '勘察初设' || this.selectdata.defname == '任务分配' || this.selectdata.defname == '合同信息')) { //{"source":"this.getParentByType($organization$).getChildByName($技术人员$).getChildren()","userid":"296851"}
|
|
421
802
|
let http = new HttpResetClass()
|
|
422
|
-
let res = await http.load('POST', 'rs/search', `{"source":"this.getParentByType($organization$).getChildByName($技术人员$).getChildren()","userid":"${this.$login.f.id}"}`, {
|
|
803
|
+
let res = await http.load('POST', 'rs/search', `{"source":"this.getParentByType($organization$).getChildByName($工程技术部门$).getChildByName($技术人员$).getChildren()","userid":"${this.$login.f.id}"}`, {
|
|
423
804
|
resolveMsg: null,
|
|
424
|
-
rejectMsg: 'search
|
|
805
|
+
rejectMsg: null // 'search查询技术人员失败,请联系管理员配置技术人员角色'
|
|
425
806
|
})
|
|
426
|
-
console.log("search查询部门下所有人:", JSON.stringify(res.data))
|
|
807
|
+
// console.log("search查询部门下所有人:", JSON.stringify(res.data))
|
|
427
808
|
this.technologist = res.data
|
|
428
809
|
if (this.technologist) {
|
|
429
810
|
let array = []
|
|
430
811
|
for (let k = 0; k < this.technologist.length; k++) {
|
|
431
|
-
array.push({
|
|
812
|
+
array.push({
|
|
813
|
+
label: this.technologist[k].name,
|
|
814
|
+
value: {name: this.technologist[k].name, id: this.technologist[k].id}
|
|
815
|
+
})
|
|
432
816
|
}
|
|
433
|
-
this.data.fields[i].
|
|
434
|
-
|
|
435
|
-
}
|
|
436
|
-
if (this.data.fields[i].label == '县/区') {
|
|
437
|
-
console.log('小区获取区县。。。。。' + JSON.stringify(this.$login.f.f_allArea))
|
|
438
|
-
let rs = []
|
|
439
|
-
for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
|
|
440
|
-
let temp = {
|
|
441
|
-
label: this.$login.f.f_allArea[i].label,
|
|
442
|
-
value: this.$login.f.f_allArea[i].label
|
|
817
|
+
if (!array.includes("工程技术部负责人") && this.data.fields[i].label === '技术人员') {
|
|
818
|
+
this.data.fields[i].options = array
|
|
443
819
|
}
|
|
444
|
-
|
|
820
|
+
|
|
445
821
|
}
|
|
446
|
-
this.data.fields[i].options = [{label: '全部', value: ''}, ...rs]
|
|
447
822
|
}
|
|
823
|
+
// if (this.data.fields[i].label == '县/区') {
|
|
824
|
+
// console.log('小区获取区县。。。。。' + JSON.stringify(this.$login.f.f_allArea))
|
|
825
|
+
// let rs = []
|
|
826
|
+
// for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
|
|
827
|
+
// let temp = {
|
|
828
|
+
// label: this.$login.f.f_allArea[i].label,
|
|
829
|
+
// value: this.$login.f.f_allArea[i].label
|
|
830
|
+
// }
|
|
831
|
+
// rs.push(temp)
|
|
832
|
+
// }
|
|
833
|
+
// this.data.fields[i].options = [{label: '全部', value: ''}, ...rs]
|
|
834
|
+
// }
|
|
448
835
|
|
|
449
836
|
if (this.data.fields[i].label == '合同类型') {
|
|
450
|
-
this.data.fields[i].value
|
|
837
|
+
this.data.fields[i].value = '主合同'
|
|
451
838
|
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
839
|
+
if (this.data.fields[i].label == '合同业务办理人') {
|
|
840
|
+
if (this.selectdata.f_apply_kefu_employee) {
|
|
841
|
+
if (this.selectdata.f_apply_kefu_employee.startsWith("{") && this.selectdata.f_apply_kefu_employee.endsWith("}")) {
|
|
842
|
+
let temp = JSON.parse(this.selectdata.f_apply_kefu_employee)
|
|
843
|
+
this.data.fields[i].value = temp.name
|
|
844
|
+
} else {
|
|
845
|
+
this.data.fields[i].value = this.selectdata.f_apply_kefu_employee
|
|
846
|
+
}
|
|
456
847
|
} else {
|
|
457
|
-
this
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
848
|
+
if (this.selectdata.f_survey_name) {
|
|
849
|
+
if (this.selectdata.f_survey_name.startsWith("{") && this.selectdata.f_survey_name.endsWith("}")) {
|
|
850
|
+
let temp = JSON.parse(this.selectdata.f_survey_name)
|
|
851
|
+
this.data.fields[i].value = temp.name
|
|
852
|
+
} else {
|
|
853
|
+
this.data.fields[i].value = this.selectdata.f_survey_name
|
|
854
|
+
}
|
|
462
855
|
}
|
|
463
|
-
let dt = new Date()
|
|
464
|
-
this.data.fields[i].value = dt.getFullYear() + ((dt.getMonth() + 1) < 10 ? '0' + (dt.getMonth() + 1) : dt.getMonth()) + temp
|
|
465
856
|
}
|
|
466
857
|
}
|
|
858
|
+
if (this.data.fields[i].label == '合同编号' && !this.selectdata[this.data.fields[i].field] && this.selectdata.defname == '合同信息') {
|
|
859
|
+
if (!this.$appdata.getSingleValue('所属公司编码')) {
|
|
860
|
+
this.$showMessage(`请先去参数管理设置: 所属公司编码`)
|
|
861
|
+
}
|
|
862
|
+
if (!this.$appdata.getSingleValue('报装合同编号')){
|
|
863
|
+
this.$showMessage(`请先去参数管理设置: ${this.data.fields[i].label}`)
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
// if (this.data.fields[i].label == '合同编号' && !this.selectdata[this.data.fields[i].field] && this.selectdata.defname == '合同审核') {
|
|
867
|
+
// if (!this.$appdata.getSingleValue('所属公司编码')) {
|
|
868
|
+
// this.$showMessage(`请先去参数管理设置: 所属公司编码`)
|
|
869
|
+
// }
|
|
870
|
+
// if (!this.$appdata.getSingleValue(this.data.fields[i].label)) {
|
|
871
|
+
// this.$showMessage(`请先去参数管理设置: ${this.data.fields[i].label}`)
|
|
872
|
+
// } else {
|
|
873
|
+
// let http = new HttpResetClass()
|
|
874
|
+
// //获取购货方信息
|
|
875
|
+
// let data = {
|
|
876
|
+
// tablename: 't_singlevalue',
|
|
877
|
+
// condition: `name = '合同编号' and f_filialeids = '${this.$login.f.f_orgids}'`
|
|
878
|
+
// }
|
|
879
|
+
// let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
|
|
880
|
+
// resolveMsg: null,
|
|
881
|
+
// rejectMsg: '获取合同编号失败'
|
|
882
|
+
// }).then((res) => {
|
|
883
|
+
// let temp = res.data[0].value
|
|
884
|
+
// this.contract = temp
|
|
885
|
+
// while (temp.length < 4) {
|
|
886
|
+
// temp = '0' + temp
|
|
887
|
+
// }
|
|
888
|
+
// let dt = new Date().Format("yyyyMM")
|
|
889
|
+
// this.data.fields[i].value = this.$appdata.getSingleValue('所属公司编码') + dt + temp
|
|
890
|
+
// if (this.showview) {
|
|
891
|
+
// this.$refs.service_show.data.fields[i].value = this.$appdata.getSingleValue('所属公司编码') + dt + temp
|
|
892
|
+
// this.$refs.service_show.update()
|
|
893
|
+
// }
|
|
894
|
+
//
|
|
895
|
+
// })
|
|
896
|
+
//
|
|
897
|
+
// // this.$refs.service_show.update()
|
|
898
|
+
// }
|
|
899
|
+
// }
|
|
900
|
+
|
|
901
|
+
|
|
467
902
|
}
|
|
468
903
|
// 初始化 buttons_fields
|
|
469
904
|
for (let i = 0; i < this.data.buttons.length; i++) {
|
|
@@ -486,7 +921,10 @@
|
|
|
486
921
|
for (let k = 0; k < this.department_search.length; k++) {
|
|
487
922
|
// 将id转换为name
|
|
488
923
|
if (Number(this.department_search[k].id) === Number(this.selectdata[this.data.buttons[i].button_fields[0].field])) {
|
|
489
|
-
this.data.buttons[i].button_fields[0].value =
|
|
924
|
+
this.data.buttons[i].button_fields[0].value = {
|
|
925
|
+
id: this.department_search[k].id,
|
|
926
|
+
name: this.department_search[k].name
|
|
927
|
+
}
|
|
490
928
|
}
|
|
491
929
|
}
|
|
492
930
|
}
|
|
@@ -494,7 +932,21 @@
|
|
|
494
932
|
if (this.department_search) {
|
|
495
933
|
let array = []
|
|
496
934
|
for (let k = 0; k < this.department_search.length; k++) {
|
|
497
|
-
array.push({
|
|
935
|
+
array.push({
|
|
936
|
+
label: this.department_search[k].name,
|
|
937
|
+
value: {id: this.department_search[k].id, name: this.department_search[k].name}
|
|
938
|
+
})
|
|
939
|
+
}
|
|
940
|
+
this.data.buttons[i].button_fields[0].options = array
|
|
941
|
+
}
|
|
942
|
+
let array = this.$login.f.rolesnames.split(',')
|
|
943
|
+
if (this.selectdata.defname == '任务分配' && array.includes("工程技术部负责人")) {
|
|
944
|
+
let array = []
|
|
945
|
+
for (let k = 0; k < this.technologist.length; k++) {
|
|
946
|
+
array.push({
|
|
947
|
+
label: this.technologist[k].name,
|
|
948
|
+
value: {id: this.technologist[k].id, name: this.technologist[k].name}
|
|
949
|
+
})
|
|
498
950
|
}
|
|
499
951
|
this.data.buttons[i].button_fields[0].options = array
|
|
500
952
|
}
|
|
@@ -508,29 +960,185 @@
|
|
|
508
960
|
}
|
|
509
961
|
// 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
|
|
510
962
|
let temp = JSON.parse(JSON.stringify(this.data))
|
|
963
|
+
// let temp = this.data
|
|
511
964
|
// 退回原因展示
|
|
965
|
+
console.log("this.selectdata.f_back_reason:-----" + this.selectdata.f_back_reason)
|
|
512
966
|
if (this.selectdata.f_back_reason) {
|
|
513
967
|
temp['back_reason'] = this.selectdata.f_back_reason
|
|
514
968
|
}
|
|
515
969
|
this.show_data = temp
|
|
516
|
-
|
|
970
|
+
// 显示组件
|
|
971
|
+
// this.showview = false
|
|
972
|
+
this.$nextTick(() => {
|
|
973
|
+
this.showview = true
|
|
974
|
+
})
|
|
975
|
+
// console.log("fields",this.data.fields)
|
|
976
|
+
console.log("测试一----------")
|
|
977
|
+
if (this.selectdata.defname === '现场勘察') {
|
|
978
|
+
let http = new HttpResetClass()
|
|
979
|
+
// let condition = "f_filialeid = " + this.$login.f.orgid
|
|
980
|
+
let condition = "1 = 1"
|
|
981
|
+
let res = await http.load('POST','rs/sql/singleTable',{data:{tablename:'t_area',condition:condition}}, {resolveMsg: null, rejectMsg: null})
|
|
982
|
+
for (let i = 0; i < this.show_data.fields.length; i++) {
|
|
983
|
+
if (this.show_data.fields[i].label == '县/区') {
|
|
984
|
+
let data = []
|
|
985
|
+
let array = []
|
|
986
|
+
data = res.data.map(item => {
|
|
987
|
+
return item.f_area;
|
|
988
|
+
})
|
|
989
|
+
for (let q = 0; q < data.length; q++) {
|
|
990
|
+
let arraydata = {
|
|
991
|
+
'label': data[q],
|
|
992
|
+
'value': data[q]
|
|
993
|
+
}
|
|
994
|
+
if (array.length != 0) {
|
|
995
|
+
for (let w = 0; w < array.length; w++) {
|
|
996
|
+
if (array[w].label == data[q]) {
|
|
997
|
+
break
|
|
998
|
+
}
|
|
999
|
+
while (w == array.length - 1) {
|
|
1000
|
+
array.push(arraydata)
|
|
1001
|
+
break
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
} else {
|
|
1005
|
+
array.push(arraydata)
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
this.show_data.fields[i].options = array
|
|
1009
|
+
console.log("选择框数据:" + JSON.stringify(this.show_data.fields[i].options))
|
|
1010
|
+
}
|
|
1011
|
+
// if (this.$refs.service_show.data.fields[i].label == '街道') {
|
|
1012
|
+
// let data = []
|
|
1013
|
+
// let array = []
|
|
1014
|
+
// data = res.data.map(item => {
|
|
1015
|
+
// return item.f_street;
|
|
1016
|
+
// })
|
|
1017
|
+
// for (let q = 0; q < data.length; q++) {
|
|
1018
|
+
// let arraydata = {
|
|
1019
|
+
// 'label': data[q],
|
|
1020
|
+
// 'value': data[q]
|
|
1021
|
+
// }
|
|
1022
|
+
// if (array.length != 0) {
|
|
1023
|
+
// for (let w = 0; w < array.length; w++) {
|
|
1024
|
+
// if (array[w].label == data[q]) {
|
|
1025
|
+
// break
|
|
1026
|
+
// }
|
|
1027
|
+
// while (w == array.length - 1) {
|
|
1028
|
+
// array.push(arraydata)
|
|
1029
|
+
// break
|
|
1030
|
+
// }
|
|
1031
|
+
// }
|
|
1032
|
+
// } else {
|
|
1033
|
+
// array.push(arraydata)
|
|
1034
|
+
// }
|
|
1035
|
+
// }
|
|
1036
|
+
// this.$refs.service_show.data.fields[i].options = array
|
|
1037
|
+
// console.log("选择框数据:" + JSON.stringify(this.$refs.service_show.data.fields[i].options))
|
|
1038
|
+
// }
|
|
1039
|
+
// if (this.$refs.service_show.data.fields[i].label == '小区') {
|
|
1040
|
+
// let data = []
|
|
1041
|
+
// let array = []
|
|
1042
|
+
// data = res.data.map(item => {
|
|
1043
|
+
// return item.f_residential_area;
|
|
1044
|
+
// })
|
|
1045
|
+
// for (let q = 0; q < data.length; q++) {
|
|
1046
|
+
// let arraydata = {
|
|
1047
|
+
// 'label': data[q],
|
|
1048
|
+
// 'value': data[q]
|
|
1049
|
+
// }
|
|
1050
|
+
// if (array.length != 0) {
|
|
1051
|
+
// for (let w = 0; w < array.length; w++) {
|
|
1052
|
+
// if (array[w].label == data[q]) {
|
|
1053
|
+
// break
|
|
1054
|
+
// }
|
|
1055
|
+
// while (w == array.length - 1) {
|
|
1056
|
+
// array.push(arraydata)
|
|
1057
|
+
// break
|
|
1058
|
+
// }
|
|
1059
|
+
// }
|
|
1060
|
+
// } else {
|
|
1061
|
+
// array.push(arraydata)
|
|
1062
|
+
// }
|
|
1063
|
+
// }
|
|
1064
|
+
// this.$refs.service_show.data.fields[i].options = array
|
|
1065
|
+
// console.log("选择框数据:" + JSON.stringify(this.$refs.service_show.data.fields[i].options))
|
|
1066
|
+
// }
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
},
|
|
1070
|
+
|
|
1071
|
+
dataChange(button_name) {
|
|
1072
|
+
let beforeData = this.data.fields
|
|
1073
|
+
let submitData = this.$refs.service_show.data.fields
|
|
1074
|
+
// 比较
|
|
1075
|
+
let f_before_change = []
|
|
1076
|
+
let f_change = []
|
|
1077
|
+
for (let i = 0; i < beforeData.length; i++) {
|
|
1078
|
+
if (beforeData[i].value != submitData[i].value) {
|
|
1079
|
+
f_before_change.push(beforeData[i])
|
|
1080
|
+
f_change.push(submitData[i])
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
if (f_before_change.length == 0 && f_change.length == 0) {
|
|
1084
|
+
return
|
|
1085
|
+
}
|
|
1086
|
+
// 构建数据结构
|
|
1087
|
+
let data = {}
|
|
1088
|
+
data.f_before_change = f_before_change
|
|
1089
|
+
data.f_change = f_change
|
|
1090
|
+
data.f_process_id = this.data.f_process_id
|
|
1091
|
+
data.f_apply_num = this.data.f_apply_num
|
|
1092
|
+
data.actdefid = this.data.actdefid
|
|
1093
|
+
data.defname = this.data.defname
|
|
1094
|
+
data.f_filiale = this.$refs.service_show.model.f_filiale
|
|
1095
|
+
data.f_parentname = this.$refs.service_show.model.f_parentname
|
|
1096
|
+
data.f_operator = this.$refs.service_show.model.f_operator
|
|
1097
|
+
data.f_date = this.$refs.service_show.model.f_operate_date
|
|
1098
|
+
data.f_button_name = button_name
|
|
1099
|
+
delete data.id
|
|
1100
|
+
// let http = new HttpResetClass()
|
|
1101
|
+
// http.load('POST', 'rs/logic/saveChageData', {
|
|
1102
|
+
// data: data
|
|
1103
|
+
// }, {resolveMsg: null, rejectMsg: null})
|
|
1104
|
+
// if(false){
|
|
1105
|
+
//
|
|
1106
|
+
// }
|
|
517
1107
|
}
|
|
518
|
-
}
|
|
1108
|
+
}
|
|
1109
|
+
,
|
|
519
1110
|
events: {
|
|
520
|
-
|
|
1111
|
+
refreshSum(number, cost, tujiansum, anzhuangsum) {
|
|
1112
|
+
this.number = number
|
|
1113
|
+
this.cost = cost
|
|
1114
|
+
this.tujiansum = tujiansum
|
|
1115
|
+
this.anzhuangsum = anzhuangsum
|
|
1116
|
+
this.initializtion()
|
|
1117
|
+
},
|
|
1118
|
+
'get-cost'(val) {
|
|
521
1119
|
this.cost = val
|
|
522
1120
|
|
|
523
1121
|
this.initializtion()
|
|
524
1122
|
},
|
|
525
|
-
'
|
|
1123
|
+
'anzhuang-sum'(val) {
|
|
1124
|
+
this.anzhuangsum = val
|
|
1125
|
+
this.initializtion()
|
|
1126
|
+
},
|
|
1127
|
+
'tujian-sum'(val) {
|
|
1128
|
+
this.tujiansum = val
|
|
1129
|
+
this.initializtion()
|
|
1130
|
+
},
|
|
1131
|
+
'get-number'(val) {
|
|
526
1132
|
this.number = val
|
|
527
1133
|
|
|
528
1134
|
this.initializtion()
|
|
529
|
-
}
|
|
530
|
-
|
|
1135
|
+
}
|
|
1136
|
+
,
|
|
1137
|
+
'get-pgd'(val) {
|
|
531
1138
|
this.pgd = val
|
|
532
1139
|
this.initializtion()
|
|
533
|
-
}
|
|
1140
|
+
}
|
|
1141
|
+
,
|
|
534
1142
|
// 任意select选中时触发事件,关联性操作
|
|
535
1143
|
async 'select_cascade'(index) {
|
|
536
1144
|
// this.$refs.service_show.data // 子业务显示组件
|
|
@@ -548,6 +1156,319 @@
|
|
|
548
1156
|
}
|
|
549
1157
|
}
|
|
550
1158
|
*/
|
|
1159
|
+
/*
|
|
1160
|
+
{
|
|
1161
|
+
"label": "用气性质",
|
|
1162
|
+
"type": "select",
|
|
1163
|
+
"bootstraped": "col-sm-4",
|
|
1164
|
+
"field": "f_gasproperties",
|
|
1165
|
+
"readonly": true,
|
|
1166
|
+
"disabled": false,
|
|
1167
|
+
"required": false,
|
|
1168
|
+
"hidden": true,
|
|
1169
|
+
"options": []
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
"label": "气价类型",
|
|
1173
|
+
"type": "select",
|
|
1174
|
+
"bootstraped": "col-sm-4",
|
|
1175
|
+
"field": "f_price_type",
|
|
1176
|
+
"readonly": true,
|
|
1177
|
+
"disabled": false,
|
|
1178
|
+
"required": false,
|
|
1179
|
+
"hidden": true,
|
|
1180
|
+
"options": []
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
"label": "气价名称",
|
|
1184
|
+
"type": "select",
|
|
1185
|
+
"bootstraped": "col-sm-4",
|
|
1186
|
+
"field": "f_price_name",
|
|
1187
|
+
"readonly": true,
|
|
1188
|
+
"disabled": false,
|
|
1189
|
+
"required": false,
|
|
1190
|
+
"hidden": true,
|
|
1191
|
+
"options": []
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
"label": "气价id",
|
|
1195
|
+
"type": "number",
|
|
1196
|
+
"bootstraped": "col-sm-4",
|
|
1197
|
+
"field": "f_price_id",
|
|
1198
|
+
"readonly": true,
|
|
1199
|
+
"disabled": false,
|
|
1200
|
+
"required": false,
|
|
1201
|
+
"hidden": true
|
|
1202
|
+
},
|
|
1203
|
+
*/
|
|
1204
|
+
if(this.$refs.service_show.data.fields[index].label === '是否装新表'){
|
|
1205
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
1206
|
+
if(this.$refs.service_show.data.fields[index].value == '是'){
|
|
1207
|
+
if(this.$refs.service_show.data.fields[i].label=='用气性质'||
|
|
1208
|
+
this.$refs.service_show.data.fields[i].label=='气价类型'||
|
|
1209
|
+
this.$refs.service_show.data.fields[i].label=='气价名称'
|
|
1210
|
+
){
|
|
1211
|
+
this.$refs.service_show.data.fields[i].required=true,
|
|
1212
|
+
this.$refs.service_show.data.fields[i].hidden=false
|
|
1213
|
+
}
|
|
1214
|
+
}else{
|
|
1215
|
+
if(this.$refs.service_show.data.fields[i].label=='用气性质'||
|
|
1216
|
+
this.$refs.service_show.data.fields[i].label=='气价类型'||
|
|
1217
|
+
this.$refs.service_show.data.fields[i].label=='气价名称'){
|
|
1218
|
+
this.$refs.service_show.data.fields[i].required=false,
|
|
1219
|
+
this.$refs.service_show.data.fields[i].hidden=true
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
if(this.$refs.service_show.data.fields[index].label === '是否装新表'&&this.$refs.service_show.data.fields[index].value=='是'){
|
|
1225
|
+
let usertype = ''
|
|
1226
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
1227
|
+
if(this.$refs.service_show.data.fields[i].label=='用户类型'){
|
|
1228
|
+
usertype = this.$refs.service_show.data.fields[i].value
|
|
1229
|
+
}
|
|
1230
|
+
if(this.$refs.service_show.data.fields[i].label=='用气性质'&&this.$refs.service_show.data.fields[index].value){
|
|
1231
|
+
this.$refs.service_show.data.fields[i].options=[]
|
|
1232
|
+
this.$refs.service_show.data.fields[i].value = ''
|
|
1233
|
+
this.$refs.service_show.data.fields[i].options= this.$appdata.getParam(usertype)
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
if (this.$refs.service_show.data.fields[index].label === '用户类型') { //用气性质
|
|
1239
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
1240
|
+
if(this.$refs.service_show.data.fields[i].label=='用气性质'&&this.$refs.service_show.data.fields[index].value){
|
|
1241
|
+
this.$refs.service_show.data.fields[i].options=[]
|
|
1242
|
+
this.$refs.service_show.data.fields[i].value = ''
|
|
1243
|
+
this.$refs.service_show.data.fields[i].options= this.$appdata.getParam(this.$refs.service_show.data.fields[index].value.trim())
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
if (this.$refs.service_show.data.fields[index].label === '技术人员') { //气价类型
|
|
1249
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
1250
|
+
if(this.$refs.service_show.data.fields[i].label=='技术人员id'&&this.$refs.service_show.data.fields[index].value){
|
|
1251
|
+
if(typeof this.$refs.service_show.data.fields[index].value=='object'){
|
|
1252
|
+
this.$refs.service_show.data.fields[i].value=this.$refs.service_show.data.fields[index].value.id
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
if (this.$refs.service_show.data.fields[index].label === '用气性质') { //气价类型
|
|
1260
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
1261
|
+
if(this.$refs.service_show.data.fields[i].label=='气价类型'&&this.$refs.service_show.data.fields[index].value){
|
|
1262
|
+
this.$refs.service_show.data.fields[i].options=[]
|
|
1263
|
+
this.$refs.service_show.data.fields[i].value = ''
|
|
1264
|
+
this.$refs.service_show.data.fields[i].options= this.$appdata.getParam(this.$refs.service_show.data.fields[i].label)
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
if (this.$refs.service_show.data.fields[index].label === '气价类型') {
|
|
1270
|
+
let gasproperties = ''
|
|
1271
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
1272
|
+
if(this.$refs.service_show.data.fields[i].label=='用气性质'){
|
|
1273
|
+
gasproperties= this.$refs.service_show.data.fields[i].value
|
|
1274
|
+
}
|
|
1275
|
+
if(this.$refs.service_show.data.fields[i].label=='气价名称'){
|
|
1276
|
+
this.$refs.service_show.data.fields[i].value=''
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
let pricetype=this.$refs.service_show.data.fields[index].value
|
|
1282
|
+
let http = new HttpResetClass()
|
|
1283
|
+
let condition =`f_user_type = '${this.selectdata.f_user_type}' and f_filiale = '${this.$login.f.f_fengongsi}'
|
|
1284
|
+
and f_gasproperties = '${gasproperties}' and f_price_type = '${this.$refs.service_show.data.fields[index].value}'`
|
|
1285
|
+
let res = await http.load('POST', 'rs/logic/getRecordItem', {condition}, {resolveMsg: null, rejectMsg: null})
|
|
1286
|
+
console.log('获取的气价类型,',res)
|
|
1287
|
+
let house2 = []
|
|
1288
|
+
if (res.data.pricename) {
|
|
1289
|
+
for (let row of res.data.pricename){
|
|
1290
|
+
house2.push({label: row.f_price_name,value: {id:row.f_price_id,name:row.f_price_name}})
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1295
|
+
if (this.$refs.service_show.data.fields[i].label === '气价名称') {
|
|
1296
|
+
this.$refs.service_show.data.fields[i].options= house2
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
if (this.$refs.service_show.data.fields[index].label === '气价名称') { //用气性质
|
|
1302
|
+
if(this.$refs.service_show.data.fields[index].value&&typeof this.$refs.service_show.data.fields[index].value =='object'){
|
|
1303
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
1304
|
+
if(this.$refs.service_show.data.fields[i].label=='气价id'){
|
|
1305
|
+
this.$refs.service_show.data.fields[i].value= Number(this.$refs.service_show.data.fields[index].value.id)
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
this.$refs.service_show.data.fields[index].value= this.$refs.service_show.data.fields[index].value.name
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
if (this.$refs.service_show.data.fields[index].label === '报建类型') {
|
|
1313
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1314
|
+
if (this.$refs.service_show.data.fields[i].label == '用户类型') {
|
|
1315
|
+
if (this.$refs.service_show.data.fields[index].value.includes('民用')) {
|
|
1316
|
+
this.$refs.service_show.data.fields[i].value = '民用'
|
|
1317
|
+
} else {
|
|
1318
|
+
this.$refs.service_show.data.fields[i].value = '非民用'
|
|
1319
|
+
}
|
|
1320
|
+
this.$refs.service_show.update()
|
|
1321
|
+
return
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
if (this.$refs.service_show.data.fields[index].label === '表号') {
|
|
1327
|
+
if(this.$refs.service_show.data.fields[index].value){
|
|
1328
|
+
let http = new HttpResetClass()
|
|
1329
|
+
let data = {
|
|
1330
|
+
columnname: ` uf.f_meternumber `,
|
|
1331
|
+
tablename: ' t_userfiles uf LEFT JOIN t_userinfo ui on ui.f_userinfo_id = uf.f_userinfo_id ',
|
|
1332
|
+
condition: `(f_user_state = '正常' or f_user_state = '报装') and uf.f_meternumber = '${this.$refs.service_show.data.fields[index].value}' and ui.f_process_id != '${this.selectdata.f_process_id}'`
|
|
1333
|
+
}
|
|
1334
|
+
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {
|
|
1335
|
+
resolveMsg: null,
|
|
1336
|
+
rejectMsg: "表号查询失败"
|
|
1337
|
+
})
|
|
1338
|
+
if(res.data.length>0){
|
|
1339
|
+
this.$showMessage("警告:表号已被使用!请查证")
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
if (this.$refs.service_show.data.fields[index].label === '安装表数'&&this.$refs.service_show.data.fields[index].value==1) {
|
|
1345
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++){
|
|
1346
|
+
if (this.$refs.service_show.data.fields[i].label === '用户类型'){
|
|
1347
|
+
// =this.$refs.service_show.data.fields[i].value
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
if (this.data.f_install_num == 1 && this.$refs.service_show.data.fields[index].label === '是否有表') {
|
|
1353
|
+
if (this.$refs.service_show.data.fields[index].value == "是") {
|
|
1354
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1355
|
+
if (this.$refs.service_show.data.fields[i].label === '气表品牌'
|
|
1356
|
+
|| this.$refs.service_show.data.fields[i].label === '气表型号'
|
|
1357
|
+
|| this.$refs.service_show.data.fields[i].label === '左右表'
|
|
1358
|
+
|| this.$refs.service_show.data.fields[i].label === '表号'
|
|
1359
|
+
|| this.$refs.service_show.data.fields[i].label === '气表厂家') {
|
|
1360
|
+
this.$refs.service_show.data.fields[i].hidden = false
|
|
1361
|
+
this.$refs.service_show.data.fields[i].required = true
|
|
1362
|
+
} else if (this.selectdata.defname == '通气' && this.$refs.service_show.data.fields[i].label === '通气表号') {
|
|
1363
|
+
this.$refs.service_show.data.fields[i].hidden = false
|
|
1364
|
+
this.$refs.service_show.data.fields[i].required = true
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
} else {
|
|
1368
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1369
|
+
if (this.$refs.service_show.data.fields[i].label === '气表品牌'
|
|
1370
|
+
|| this.$refs.service_show.data.fields[i].label === '气表型号'
|
|
1371
|
+
|| this.$refs.service_show.data.fields[i].label === '表号'
|
|
1372
|
+
|| this.$refs.service_show.data.fields[i].label === '左右表'
|
|
1373
|
+
|| this.$refs.service_show.data.fields[i].label === '气表厂家') {
|
|
1374
|
+
this.$refs.service_show.data.fields[i].hidden = true
|
|
1375
|
+
this.$refs.service_show.data.fields[i].required = false
|
|
1376
|
+
} else if (this.selectdata.defname == '通气' && this.$refs.service_show.data.fields[i].label === '通气表号') {
|
|
1377
|
+
this.$refs.service_show.data.fields[i].hidden = true
|
|
1378
|
+
this.$refs.service_show.data.fields[i].required = false
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
if (this.$refs.service_show.data.fields[index].label === '气表品牌') {
|
|
1384
|
+
// console.log("气表品牌>>>>>"+JSON.stringify(this.$refs.service_show.data.fields[index].value))
|
|
1385
|
+
let id = null
|
|
1386
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1387
|
+
if (this.$refs.service_show.data.fields[i].label == '气表型号') {
|
|
1388
|
+
this.$refs.service_show.data.fields[i].value = ''
|
|
1389
|
+
let temp = {}
|
|
1390
|
+
// console.log("this.$refs.service_show.data.fields[index].value",this.$refs.service_show.data.fields[index].value)
|
|
1391
|
+
if(typeof this.$refs.service_show.data.fields[index].value =='string'){
|
|
1392
|
+
for (let x = 0; x < Vue.ApplyGetSaleParam.gasbrands.length; x++) {
|
|
1393
|
+
if (Vue.ApplyGetSaleParam.gasbrands[x].label == this.$refs.service_show.data.fields[index].value) {
|
|
1394
|
+
temp = Vue.ApplyGetSaleParam.gasbrands[x].value.gasmodel
|
|
1395
|
+
id = Vue.ApplyGetSaleParam.gasbrands[x].value.id
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
// let temp = this.$refs.service_show.data.fields[index].value.gasmodel
|
|
1399
|
+
this.$refs.service_show.data.fields[i].options = temp
|
|
1400
|
+
this.$refs.service_show.data.fields[index].value = typeof this.$refs.service_show.data.fields[index].value == 'string' ? this.$refs.service_show.data.fields[index].value : this.$refs.service_show.data.fields[index].value.f_meter_brand
|
|
1401
|
+
}else{
|
|
1402
|
+
id= Number(this.$refs.service_show.data.fields[index].value.id)
|
|
1403
|
+
let http = new HttpResetClass()
|
|
1404
|
+
let data = {
|
|
1405
|
+
columnname: 'f_meter_style,id',
|
|
1406
|
+
tablename: 't_gasmodel ',
|
|
1407
|
+
condition: ` f_gasbrand_id = ${this.$refs.service_show.data.fields[index].value.id} `
|
|
1408
|
+
}
|
|
1409
|
+
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {resolveMsg: null, rejectMsg: '获取气表型号失败'})
|
|
1410
|
+
this.$refs.service_show.data.fields[i].options=[]
|
|
1411
|
+
for(let x=0;x<res.data.length;x++){
|
|
1412
|
+
this.$refs.service_show.data.fields[i].options.push({label:res.data[x].f_meter_style,value:{id:res.data[x].id,name:res.data[x].f_meter_style}})
|
|
1413
|
+
}
|
|
1414
|
+
console.log("气表型号",this.$refs.service_show.data.fields[i].options)
|
|
1415
|
+
// for (let x = 0; x < Vue.ApplyGetSaleParam.gasbrands.length; x++) {
|
|
1416
|
+
// if (Vue.ApplyGetSaleParam.gasbrands[x].label == this.$refs.service_show.data.fields[index].value.f_meter_brand) {
|
|
1417
|
+
// temp = Vue.ApplyGetSaleParam.gasbrands[x].value.gasmodel
|
|
1418
|
+
// id = Vue.ApplyGetSaleParam.gasbrands[x].value.id
|
|
1419
|
+
// }
|
|
1420
|
+
// }
|
|
1421
|
+
// // let temp = this.$refs.service_show.data.fields[index].value.gasmodel
|
|
1422
|
+
// this.$refs.service_show.data.fields[i].options = temp
|
|
1423
|
+
// this.$refs.service_show.data.fields[index].value = typeof this.$refs.service_show.data.fields[index].value == 'string' ? this.$refs.service_show.data.fields[index].value : this.$refs.service_show.data.fields[index].value.f_meter_brand
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
// this.$refs.service_show.update()
|
|
1428
|
+
} else if (this.$refs.service_show.data.fields[i].label == '气表品牌id') {
|
|
1429
|
+
this.$refs.service_show.data.fields[i].value = id
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
for(let i = 0; i < this.$refs.service_show.data.fields.length; i++){
|
|
1433
|
+
if (this.$refs.service_show.data.fields[i].label == '气表品牌id') {
|
|
1434
|
+
this.$refs.service_show.data.fields[i].value = id
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
this.$refs.service_show.update()
|
|
1438
|
+
}
|
|
1439
|
+
if (this.$refs.service_show.data.fields[index].label === '气表型号') {
|
|
1440
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1441
|
+
if (this.$refs.service_show.data.fields[i].label == '气表型号id') {
|
|
1442
|
+
this.$refs.service_show.data.fields[i].value = Number(this.$refs.service_show.data.fields[index].value.id)
|
|
1443
|
+
// console.log("气表型号id:",this.$refs.service_show.data.fields[i].value)
|
|
1444
|
+
}else if(this.$refs.service_show.data.fields[i].label == '气表品牌'&&typeof this.$refs.service_show.data.fields[i].value =='object'){
|
|
1445
|
+
this.$refs.service_show.data.fields[i].value = this.$refs.service_show.data.fields[i].value.name
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
this.$refs.service_show.data.fields[index].value = this.$refs.service_show.data.fields[index].value.name
|
|
1449
|
+
this.$refs.service_show.update()
|
|
1450
|
+
return
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
|
|
1454
|
+
if (this.$refs.service_show.data.fields[index].label == '电话号码') {
|
|
1455
|
+
let phone = this.$refs.service_show.data.fields[index].value
|
|
1456
|
+
// 电话号码效验
|
|
1457
|
+
if (!(/^1[3456789]\d{9}$/.test(phone))) {
|
|
1458
|
+
this.$refs.service_show.data.fields[index].value = ""
|
|
1459
|
+
this.$showAlert('电话号码格式不正确,请重新输入。', 'info', 2000)
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
if (this.$refs.service_show.data.fields[index].label == '施工单位' ||
|
|
1464
|
+
this.$refs.service_show.data.fields[index].label == '检测单位' ||
|
|
1465
|
+
this.$refs.service_show.data.fields[index].label == '监理单位' ||
|
|
1466
|
+
this.$refs.service_show.data.fields[index].label == '土建单位' ||
|
|
1467
|
+
this.$refs.service_show.data.fields[index].label == '设计单位') {
|
|
1468
|
+
console.log(this.$refs.service_show.data.fields[index].label,this.$refs.service_show.data.fields[index].value)
|
|
1469
|
+
this.$refs.service_show.update()
|
|
1470
|
+
return
|
|
1471
|
+
}
|
|
551
1472
|
|
|
552
1473
|
if (
|
|
553
1474
|
this.$refs.service_show.data.fields[index].label === '最终核算成本金额' ||
|
|
@@ -555,22 +1476,22 @@
|
|
|
555
1476
|
this.$refs.service_show.data.fields[index].label === '工程盈利'
|
|
556
1477
|
) {
|
|
557
1478
|
|
|
558
|
-
var a=0
|
|
559
|
-
var b=0
|
|
1479
|
+
var a = 0
|
|
1480
|
+
var b = 0
|
|
560
1481
|
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
561
1482
|
// 控制设置级联
|
|
562
1483
|
// 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
|
|
563
1484
|
// xxx xx xxx
|
|
564
|
-
if (this.$refs.service_show.data.fields[i].label === '最终核算成本金额'
|
|
565
|
-
this.$refs.service_show.data.fields[i].value = (this.number+this.cost)
|
|
566
|
-
a=this.$refs.service_show.data.fields[i].value
|
|
1485
|
+
if (this.$refs.service_show.data.fields[i].label === '最终核算成本金额') {
|
|
1486
|
+
this.$refs.service_show.data.fields[i].value = (this.number + this.cost + this.anzhuangsum + this.tujiansum)
|
|
1487
|
+
a = this.$refs.service_show.data.fields[i].value
|
|
567
1488
|
}
|
|
568
1489
|
|
|
569
1490
|
if (this.$refs.service_show.data.fields[i].label === '合同总金额' && this.$refs.service_show.data.fields[i].value) {
|
|
570
|
-
b =
|
|
1491
|
+
b = this.$refs.service_show.data.fields[i].value
|
|
571
1492
|
}
|
|
572
1493
|
}
|
|
573
|
-
var c =b - a
|
|
1494
|
+
var c = b - a
|
|
574
1495
|
// 数据计算完毕得到工程结余
|
|
575
1496
|
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
576
1497
|
if (this.$refs.service_show.data.fields[i].label === '工程盈利') {
|
|
@@ -596,11 +1517,11 @@
|
|
|
596
1517
|
}
|
|
597
1518
|
|
|
598
1519
|
//根据合同预算金额和累计缴费金额计算未结金额
|
|
599
|
-
if (this.$refs.service_show.data.fields[index]&&this.$refs.service_show.data.fields[index].label === '累计缴费金额') {
|
|
1520
|
+
if (this.$refs.service_show.data.fields[index] && this.$refs.service_show.data.fields[index].label === '累计缴费金额') {
|
|
600
1521
|
let cumulativeMoney = this.$refs.service_show.data.fields[index].value
|
|
601
1522
|
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
602
1523
|
if (this.$refs.service_show.data.fields[i].label === '未结总金额') {
|
|
603
|
-
this.$refs.service_show.data.fields[i].value = Number(this.selectdata.
|
|
1524
|
+
this.$refs.service_show.data.fields[i].value = Number(this.selectdata.f_contract_money) - Number(cumulativeMoney)
|
|
604
1525
|
}
|
|
605
1526
|
}
|
|
606
1527
|
}
|
|
@@ -642,34 +1563,34 @@
|
|
|
642
1563
|
}
|
|
643
1564
|
}
|
|
644
1565
|
}
|
|
645
|
-
|
|
646
|
-
if (this.$refs.service_show.data.fields[index].label === '
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
}
|
|
1566
|
+
//根据总户数和实际安装表数计算未安装表数
|
|
1567
|
+
// if (this.$refs.service_show.data.fields[index].label === '实际安装表数') {
|
|
1568
|
+
// let value = this.$refs.service_show.data.fields[index].value
|
|
1569
|
+
// for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1570
|
+
// if (this.$refs.service_show.data.fields[i].label === '未安装表数') {
|
|
1571
|
+
// this.$refs.service_show.data.fields[i].label === '未安装表数'
|
|
1572
|
+
// this.$refs.service_show.data.fields[i].value = Number(this.selectdata.f_install_num) - Number(value)
|
|
1573
|
+
// }
|
|
1574
|
+
// }
|
|
1575
|
+
// }
|
|
655
1576
|
|
|
656
1577
|
//金额小写得到大写
|
|
657
|
-
if (this.$refs.service_show.showadd_fields && this.$refs.service_show.showadd_fields.
|
|
658
|
-
if(this.$refs.service_show.showadd_fields[index].value||this.$refs.service_show.showadd_fields.fields[index].value){
|
|
1578
|
+
if (this.$refs.service_show.showadd_fields && this.$refs.service_show.showadd_fields.length > 0 && this.$refs.service_show.showadd_fields.fields[index].label === '收费金额') {
|
|
1579
|
+
if (this.$refs.service_show.showadd_fields[index].value || this.$refs.service_show.showadd_fields.fields[index].value) {
|
|
659
1580
|
var re = /^[0-9]+.?[0-9]*/
|
|
660
1581
|
let temp = this.$refs.service_show.showadd_fields[index].value
|
|
661
|
-
if(temp==""|| isNaN(temp)){
|
|
1582
|
+
if (temp == "" || isNaN(temp)) {
|
|
662
1583
|
this.$showMessage("请输入纯数字")
|
|
663
|
-
this.$refs.service_show.showadd_fields[index].value=0
|
|
1584
|
+
this.$refs.service_show.showadd_fields[index].value = 0
|
|
664
1585
|
}
|
|
665
1586
|
}
|
|
666
1587
|
let temp = this.$refs.service_show.showadd_fields[index]
|
|
667
|
-
let value =
|
|
1588
|
+
let value = temp.value
|
|
668
1589
|
// let chargeMoney = this.$refs.service_show.showadd_fields[index].value
|
|
669
1590
|
for (let i = 0; i < this.$refs.service_show.showadd_fields.fields.length; i++) {
|
|
670
1591
|
if (this.$refs.service_show.showadd_fields.fields[i].label === '金额大写') {
|
|
671
1592
|
let te = {
|
|
672
|
-
|
|
1593
|
+
value: this.smalltoBIG(value)
|
|
673
1594
|
}
|
|
674
1595
|
this.$refs.service_show.showadd_fields[i] = te
|
|
675
1596
|
}
|
|
@@ -707,8 +1628,8 @@
|
|
|
707
1628
|
) {
|
|
708
1629
|
console.log('即将计算合同金额')
|
|
709
1630
|
var cash = 0
|
|
710
|
-
var downpayments=0
|
|
711
|
-
var tailmoney=0
|
|
1631
|
+
var downpayments = 0
|
|
1632
|
+
var tailmoney = 0
|
|
712
1633
|
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
713
1634
|
// 控制设置级联
|
|
714
1635
|
// 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
|
|
@@ -717,25 +1638,27 @@
|
|
|
717
1638
|
cash = this.$refs.service_show.data.fields[i].value
|
|
718
1639
|
}
|
|
719
1640
|
if (this.$refs.service_show.data.fields[i].label === '首付' && this.$refs.service_show.data.fields[i].value) {
|
|
720
|
-
downpayments =
|
|
1641
|
+
downpayments = this.$refs.service_show.data.fields[i].value
|
|
721
1642
|
}
|
|
722
1643
|
if (this.$refs.service_show.data.fields[i].label === '进度款' && this.$refs.service_show.data.fields[i].value) {
|
|
723
|
-
tailmoney =
|
|
1644
|
+
tailmoney = this.$refs.service_show.data.fields[i].value
|
|
724
1645
|
}
|
|
725
1646
|
}
|
|
726
|
-
var a =cash - downpayments
|
|
1647
|
+
var a = cash - downpayments
|
|
1648
|
+
a= a.toFixed(2)
|
|
727
1649
|
// 数据计算完毕得到尾款
|
|
728
1650
|
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
729
1651
|
if (this.$refs.service_show.data.fields[i].label === '尾款') {
|
|
730
|
-
if (cash === downpayments
|
|
1652
|
+
if (cash === downpayments) {
|
|
731
1653
|
this.$refs.service_show.data.fields[i].value = 0
|
|
732
|
-
} else{
|
|
1654
|
+
} else {
|
|
733
1655
|
this.$refs.service_show.data.fields[i].value = (cash - downpayments - tailmoney)
|
|
1656
|
+
this.$refs.service_show.data.fields[i].value=this.$refs.service_show.data.fields[i].value.toFixed(2)
|
|
734
1657
|
console.log('修改fields[i].value后的值=>' + this.$refs.service_show.data.fields[i].value)
|
|
735
1658
|
}
|
|
736
1659
|
}
|
|
737
1660
|
if (this.$refs.service_show.data.fields[i].label === '首付') {
|
|
738
|
-
if (a<0){
|
|
1661
|
+
if (a < 0) {
|
|
739
1662
|
this.$showMessage("首付款数额过大")
|
|
740
1663
|
downpayments = 0
|
|
741
1664
|
this.$refs.service_show.data.fields[i].value = 0
|
|
@@ -744,15 +1667,15 @@
|
|
|
744
1667
|
|
|
745
1668
|
if (this.$refs.service_show.data.fields[i].label === '进度款') {
|
|
746
1669
|
|
|
747
|
-
if (cash === downpayments
|
|
1670
|
+
if (cash === downpayments) {
|
|
748
1671
|
tailmoney = 0
|
|
749
1672
|
this.$refs.service_show.data.fields[i].value = 0
|
|
750
|
-
this.$refs.service_show.data.fields[i].readonly=true
|
|
751
|
-
}else {
|
|
752
|
-
this.$refs.service_show.data.fields[i].readonly=false
|
|
753
|
-
tailmoney =
|
|
1673
|
+
this.$refs.service_show.data.fields[i].readonly = true
|
|
1674
|
+
} else {
|
|
1675
|
+
this.$refs.service_show.data.fields[i].readonly = false
|
|
1676
|
+
tailmoney = this.$refs.service_show.data.fields[i].value
|
|
754
1677
|
}
|
|
755
|
-
if (tailmoney>a){
|
|
1678
|
+
if (tailmoney > a) {
|
|
756
1679
|
this.$showMessage("进度款数额过大")
|
|
757
1680
|
tailmoney = 0
|
|
758
1681
|
this.$refs.service_show.data.fields[i].value = 0
|
|
@@ -760,16 +1683,49 @@
|
|
|
760
1683
|
}
|
|
761
1684
|
}
|
|
762
1685
|
}
|
|
1686
|
+
//新增的功能逻辑-------------
|
|
1687
|
+
//报建状态的改变
|
|
1688
|
+
if (this.selectdata.defname != '完工') {
|
|
1689
|
+
this.selectdata.f_sub_state = '正在进行'
|
|
1690
|
+
}
|
|
1691
|
+
//所有选择框/输入框遍历
|
|
1692
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1693
|
+
//任何是否的选择框只要是否都不能提交
|
|
1694
|
+
if (this.selectdata.defname != '客户申请') {
|
|
1695
|
+
if (this.$refs.service_show.data.fields[i].value === '否') {
|
|
1696
|
+
this.$refs.service_show.disable_button = false
|
|
1697
|
+
console.log(this.$refs.service_show.data)
|
|
1698
|
+
this.$refs.service_show.data.buttons[1].button_name = '保存'
|
|
1699
|
+
this.$showMessage("当审核/确认为否时,无法提交")
|
|
1700
|
+
return
|
|
1701
|
+
}else {
|
|
1702
|
+
this.$refs.service_show.data.buttons[1].button_name = '提交'
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
//时间到期提醒
|
|
1706
|
+
if (this.$refs.service_show.data.fields[i].label.includes("时间") || this.$refs.service_show.data.fields[i].label.includes("工期")) {
|
|
1707
|
+
let setTime = this.$refs.service_show.data.fields[i].value
|
|
1708
|
+
let nowTime = new Date().Format("yyyy-MM-dd HH:mm:ss")
|
|
1709
|
+
console.log("到期时间:" + setTime)
|
|
1710
|
+
console.log("现在时间:" + nowTime)
|
|
1711
|
+
if (nowTime >= setTime) {
|
|
1712
|
+
this.$showMessage("请注意,当前节点时间/工期已过期!")
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
if (this.$refs.service_show.data.fields[i].label.includes("验收结果")) {
|
|
763
1716
|
|
|
1717
|
+
if (this.$refs.service_show.data.fields[i].value.length == 0 || this.$refs.service_show.data.fields[i].value == undefined || this.$refs.service_show.data.fields[i].value == null){
|
|
1718
|
+
this.$showMessage("验收结果未填写完毕,无法提交")
|
|
1719
|
+
this.$refs.service_show.data.buttons[1].button_name = '保存'
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
764
1724
|
|
|
765
1725
|
|
|
766
1726
|
// 合成地址
|
|
767
1727
|
if (
|
|
768
|
-
this.$refs.service_show.data.fields[index].label === '
|
|
769
|
-
this.$refs.service_show.data.fields[index].label === '楼号' ||
|
|
770
|
-
this.$refs.service_show.data.fields[index].label === '单元号' ||
|
|
771
|
-
this.$refs.service_show.data.fields[index].label === '楼层' ||
|
|
772
|
-
this.$refs.service_show.data.fields[index].label === '门牌号'
|
|
1728
|
+
this.$refs.service_show.data.fields[index].label === '县/区'
|
|
773
1729
|
) {
|
|
774
1730
|
console.log('即将合成地址')
|
|
775
1731
|
var address = ''
|
|
@@ -777,32 +1733,62 @@
|
|
|
777
1733
|
// 控制设置级联
|
|
778
1734
|
// 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
|
|
779
1735
|
// xxx xx xxx
|
|
780
|
-
if (this.$refs.service_show.data.fields[i].label === '
|
|
1736
|
+
if (this.$refs.service_show.data.fields[i].label === '县/区' && this.$refs.service_show.data.fields[i].value) {
|
|
781
1737
|
address += this.$refs.service_show.data.fields[i].value
|
|
782
1738
|
}
|
|
783
|
-
if (this.$refs.service_show.data.fields[i].label === '
|
|
784
|
-
|
|
785
|
-
}
|
|
786
|
-
if (this.$refs.service_show.data.fields[i].label === '
|
|
787
|
-
|
|
788
|
-
}
|
|
789
|
-
if (this.$refs.service_show.data.fields[i].label === '
|
|
790
|
-
|
|
791
|
-
}
|
|
792
|
-
if (this.$refs.service_show.data.fields[i].label === '
|
|
793
|
-
|
|
794
|
-
}
|
|
1739
|
+
// if (this.$refs.service_show.data.fields[i].label === '乡镇' && this.$refs.service_show.data.fields[i].value) {
|
|
1740
|
+
// address += this.$refs.service_show.data.fields[i].value
|
|
1741
|
+
// }
|
|
1742
|
+
// if (this.$refs.service_show.data.fields[i].label === '街道名称' && this.$refs.service_show.data.fields[i].value) {
|
|
1743
|
+
// address += this.$refs.service_show.data.fields[i].value
|
|
1744
|
+
// }
|
|
1745
|
+
// if (this.$refs.service_show.data.fields[i].label === '小区/单位' && this.$refs.service_show.data.fields[i].value) {
|
|
1746
|
+
// address += this.$refs.service_show.data.fields[i].value
|
|
1747
|
+
// }
|
|
1748
|
+
// if (this.$refs.service_show.data.fields[i].label === '楼号' && this.$refs.service_show.data.fields[i].value) {
|
|
1749
|
+
// address += ' ' + this.$refs.service_show.data.fields[i].value
|
|
1750
|
+
// }
|
|
1751
|
+
// if (this.$refs.service_show.data.fields[i].label === '单元号' && this.$refs.service_show.data.fields[i].value) {
|
|
1752
|
+
// address += '-' + this.$refs.service_show.data.fields[i].value
|
|
1753
|
+
// }
|
|
1754
|
+
// if (this.$refs.service_show.data.fields[i].label === '楼层' && this.$refs.service_show.data.fields[i].value) {
|
|
1755
|
+
// address += '-' + this.$refs.service_show.data.fields[i].value
|
|
1756
|
+
// }
|
|
1757
|
+
// if (this.$refs.service_show.data.fields[i].label === '门牌号' && this.$refs.service_show.data.fields[i].value) {
|
|
1758
|
+
// address += '-' + this.$refs.service_show.data.fields[i].value
|
|
1759
|
+
// }
|
|
795
1760
|
|
|
796
1761
|
}
|
|
797
1762
|
console.log('获取到的address=>' + address)
|
|
798
1763
|
// 数据获取完毕时放入地址text
|
|
1764
|
+
// for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1765
|
+
// if (this.$refs.service_show.data.fields[i].label === '地址') {
|
|
1766
|
+
// this.$refs.service_show.data.fields[i].value = address
|
|
1767
|
+
// console.log('修改fields[i].value后的值=>' + this.$refs.service_show.data.fields[i].value)
|
|
1768
|
+
// }
|
|
1769
|
+
// }
|
|
799
1770
|
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
800
|
-
if (this.$refs.service_show.data.fields[i].label === '
|
|
1771
|
+
if (this.$refs.service_show.data.fields[i].label === '项目地址') {
|
|
801
1772
|
this.$refs.service_show.data.fields[i].value = address
|
|
802
|
-
console.log('修改fields[i].value后的值=>' + this.$refs.service_show.data.fields[i].value)
|
|
1773
|
+
// console.log('修改fields[i].value后的值=>' + this.$refs.service_show.data.fields[i].value)
|
|
803
1774
|
}
|
|
804
1775
|
}
|
|
805
1776
|
}
|
|
1777
|
+
if (this.selectdata.defname = '现场勘察') {
|
|
1778
|
+
let projectAddress = ''
|
|
1779
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1780
|
+
if (this.$refs.service_show.data.fields[i].label === '项目地址') {
|
|
1781
|
+
projectAddress = this.$refs.service_show.data.fields[i].value
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
for (let j = 0; j < this.$refs.service_show.data.fields.length; j++) {
|
|
1785
|
+
if (this.$refs.service_show.data.fields[j].label === '地址') {
|
|
1786
|
+
this.$refs.service_show.data.fields[j].value = projectAddress
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
}
|
|
1791
|
+
|
|
806
1792
|
// 开户费+材料费+人工费+设备安装费=合计
|
|
807
1793
|
if (this.$refs.service_show.data.fields[index].label === '开户费' ||
|
|
808
1794
|
this.$refs.service_show.data.fields[index].label === '材料费' ||
|
|
@@ -822,9 +1808,95 @@
|
|
|
822
1808
|
}
|
|
823
1809
|
|
|
824
1810
|
}
|
|
1811
|
+
},
|
|
1812
|
+
error_check(index) {
|
|
1813
|
+
// 时间格式检测
|
|
1814
|
+
if (this.$refs.service_show.data.fields[index].type == 'datepicker') {
|
|
1815
|
+
let dateRe = new RegExp(/(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)$/)
|
|
1816
|
+
let datetimeRe = new RegExp(/((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29))\s([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/)
|
|
1817
|
+
if (datetimeRe.test(this.$refs.service_show.data.fields[index].value) && this.$refs.service_show.data.fields[index].value.trim().length == 19 && this.$refs.service_show.data.fields[index].fullsize) {
|
|
1818
|
+
this.$refs.service_show.data.fields[index].error.flag = false
|
|
1819
|
+
} else if (dateRe.test(this.$refs.service_show.data.fields[index].value) && this.$refs.service_show.data.fields[index].value.trim().length == 10) {
|
|
1820
|
+
this.$refs.service_show.data.fields[index].error.flag = false
|
|
1821
|
+
} else {
|
|
1822
|
+
if (this.$refs.service_show.data.fields[index].fullsize) {
|
|
1823
|
+
this.$refs.service_show.data.fields[index].error = Object.assign({}, this.$refs.service_show.data.fields[index].error)
|
|
1824
|
+
this.$refs.service_show.data.fields[index].error.msg = this.$refs.service_show.data.fields[index].error.msg ? this.$refs.service_show.data.fields[index].error.msg : '时间格式如:2019-05-02 09:23:21'
|
|
1825
|
+
this.$showAlert(this.$refs.service_show.data.fields[index].label + '格式错误' + this.$refs.service_show.data.fields[index].error.msg, 'warning', 3000)
|
|
1826
|
+
this.$refs.service_show.data.fields[index].error.flag = true
|
|
1827
|
+
this.$refs.service_show.data.fields[index].value = ''
|
|
1828
|
+
} else {
|
|
1829
|
+
this.$refs.service_show.data.fields[index].error = Object.assign({}, this.$refs.service_show.data.fields[index].error)
|
|
1830
|
+
this.$refs.service_show.data.fields[index].error.msg = this.$refs.service_show.data.fields[index].error.msg ? this.$refs.service_show.data.fields[index].error.msg : '时间格式如:2019-05-02'
|
|
1831
|
+
this.$showAlert(this.$refs.service_show.data.fields[index].label + '格式错误' + this.$refs.service_show.data.fields[index].error.msg, 'warning', 3000)
|
|
1832
|
+
this.$refs.service_show.data.fields[index].error.flag = true
|
|
1833
|
+
this.$refs.service_show.data.fields[index].value = ''
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
},
|
|
1839
|
+
|
|
1840
|
+
modal_error_check(i, j) {
|
|
1841
|
+
let err = {flag: false, msg: ''}
|
|
1842
|
+
this.$refs.service_show.showadd_fields.fields[j].error = this.$refs.service_show.showadd_fields.fields[j].error ? this.$refs.service_show.showadd_fields.fields[j].error : err
|
|
1843
|
+
// 时间格式检测
|
|
1844
|
+
if (this.$refs.service_show.showadd_fields.fields[j].type == 'datepicker') {
|
|
1845
|
+
let dateRe = new RegExp(/(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)$/)
|
|
1846
|
+
let datetimeRe = new RegExp(/((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29))\s([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/)
|
|
1847
|
+
if (datetimeRe.test(this.$refs.service_show.showadd_fields.fields[j].value) && this.$refs.service_show.showadd_fields.fields[j].value.trim().length == 19) {
|
|
1848
|
+
this.$refs.service_show.showadd_fields.fields[j].error.flag = false
|
|
1849
|
+
} else if (dateRe.test(this.$refs.service_show.showadd_fields.fields[j].value) && this.$refs.service_show.showadd_fields.fields[j].value.trim().length == 10) {
|
|
1850
|
+
this.$refs.service_show.showadd_fields.fields[j].error.flag = false
|
|
1851
|
+
} else {
|
|
1852
|
+
this.$refs.service_show.showadd_fields.fields[j].error = Object.assign({}, this.$refs.service_show.showadd_fields.fields[j].error)
|
|
1853
|
+
this.$refs.service_show.showadd_fields.fields[j].error.msg = this.$refs.service_show.showadd_fields.fields[j].label + '时间格式如:2019-05-02'
|
|
1854
|
+
this.$showAlert(this.$refs.service_show.showadd_fields.fields[j].error.msg, 'warning', 3000)
|
|
1855
|
+
this.$refs.service_show.showadd_fields.fields[j].error.flag = true
|
|
1856
|
+
this.$refs.service_show.showadd_fields.fields[j].value = ''
|
|
1857
|
+
}
|
|
1858
|
+
if ((this.$refs.service_show.showadd_fields.fields[j].label == '停气碰口开始时间' || this.$refs.service_show.showadd_fields.fields[j].label == '停气碰口结束时间') &&
|
|
1859
|
+
(dateRe.test(this.$refs.service_show.showadd_fields.fields[j].value) && this.$refs.service_show.showadd_fields.fields[j].value.trim().length > 0)) {
|
|
1860
|
+
if (this.$refs.service_show.showadd_fields.fields[j].value > new Date().Format("yyyy-MM-dd HH:mm:ss")) {
|
|
1861
|
+
this.$refs.service_show.showadd_fields.fields[j].error.msg = this.$refs.service_show.showadd_fields.fields[j].label + '不能大于当前时间'
|
|
1862
|
+
this.$showAlert(this.$refs.service_show.showadd_fields.fields[j].label + '不能大于当前时间', 'warning', 3000)
|
|
1863
|
+
this.$refs.service_show.showadd_fields.fields[j].error.flag = true
|
|
1864
|
+
this.$refs.service_show.showadd_fields.fields[j].value = ''
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1868
|
+
},
|
|
1869
|
+
'getmodel'() {
|
|
1870
|
+
return this.$refs.service_show.getmodel()
|
|
1871
|
+
},
|
|
1872
|
+
// onetomany模态框监听事件
|
|
1873
|
+
async 'select_cascade_modal'(i, j) {
|
|
1874
|
+
if (this.data.onetomany[i].tables[0] == 't_apply_construct_balance') {
|
|
1875
|
+
if (this.data.onetomany[i].fields[j].label == '第三施工方') {
|
|
1876
|
+
for (let k = 0; k < this.data.onetomany[i].fields.length; k++) {
|
|
1877
|
+
|
|
1878
|
+
if (this.data.onetomany[i].fields[k].label.includes('当前累计结算比例')) {
|
|
1879
|
+
let sum = 0
|
|
1880
|
+
for (let p = 0; p < this.$refs.service_show.model.rows[i].length; p++) {
|
|
1881
|
+
if (this.$refs.service_show.model.rows[i][p].f_construct_company == this.$refs.service_show.showadd_fields.fields[j].value) {
|
|
1882
|
+
sum += Number(this.$refs.service_show.showadd_fields.fields[k - 2].value)
|
|
1883
|
+
sum += Number(this.$refs.service_show.model.rows[i][p].f_balance_scale)
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
if (this.$refs.service_show.model.rows[i].length == 0) {
|
|
1887
|
+
sum = Number(this.$refs.service_show.showadd_fields.fields[k - 2].value)
|
|
1888
|
+
}
|
|
1889
|
+
// this.$refs.service_show.showadd_fields.fields[k].value = sum
|
|
1890
|
+
this.$refs.service_show.update_showadd_fields_value(k, sum)
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
|
|
825
1897
|
},
|
|
826
1898
|
async 'onetomanyevent'(datas) {
|
|
827
|
-
console.log(`onetomany=======>${JSON.stringify(datas)}`)
|
|
1899
|
+
// console.log(`onetomany=======>${JSON.stringify(datas)}`)
|
|
828
1900
|
|
|
829
1901
|
for (let i = 0; i < datas.rows.length; i++) {
|
|
830
1902
|
datas.rows[i]['f_process_id'] = this.selectdata.f_process_id
|
|
@@ -834,16 +1906,85 @@
|
|
|
834
1906
|
datas.rows[i]['f_operator'] = this.$login.f.name
|
|
835
1907
|
}
|
|
836
1908
|
let http = new HttpResetClass()
|
|
837
|
-
await http.load('POST', 'rs/logic/saveentity', datas, {resolveMsg: null, rejectMsg: '
|
|
838
|
-
}
|
|
1909
|
+
await http.load('POST', 'rs/logic/saveentity', datas, {resolveMsg: null, rejectMsg: '保存onetomany实体失败'})
|
|
1910
|
+
}
|
|
1911
|
+
,
|
|
839
1912
|
// 获取view层button事件/
|
|
840
1913
|
async 'button'(model) {
|
|
841
|
-
console.log("button事件接收参数:", model)
|
|
1914
|
+
// console.log("button事件接收参数:", model)
|
|
842
1915
|
// 点击重置按钮就重置数据
|
|
843
1916
|
if (model.button.button_name === '重置') {
|
|
844
1917
|
this.refurbish()
|
|
845
1918
|
return
|
|
846
1919
|
}
|
|
1920
|
+
|
|
1921
|
+
this.dataChange(model.button.button_name)// 调用修改记录方法
|
|
1922
|
+
|
|
1923
|
+
if (model.button.button_name === '提交' && this.selectdata.defname == '营收数据录入'){
|
|
1924
|
+
if(model.f_meternumber){
|
|
1925
|
+
let http = new HttpResetClass()
|
|
1926
|
+
let data = {
|
|
1927
|
+
columnname: ` uf.f_meternumber `,
|
|
1928
|
+
tablename: ' t_userfiles uf LEFT JOIN t_userinfo ui on ui.f_userinfo_id = uf.f_userinfo_id ',
|
|
1929
|
+
condition: `(f_user_state = '正常' or f_user_state = '报装') and uf.f_meternumber = '${model.f_meternumber}' and ui.f_process_id != '${this.selectdata.f_process_id}'`
|
|
1930
|
+
}
|
|
1931
|
+
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {
|
|
1932
|
+
resolveMsg: null,
|
|
1933
|
+
rejectMsg: "表号查询失败"
|
|
1934
|
+
})
|
|
1935
|
+
if(res.data.length>0){
|
|
1936
|
+
let check = await this.$showMessage(`警告:表号已被使用!点击“确定”将会继续建档`, ['confirm', 'cancel'])
|
|
1937
|
+
if (check == 'confirm') {
|
|
1938
|
+
|
|
1939
|
+
} else {
|
|
1940
|
+
this.$refs.service_show.disable_button = false
|
|
1941
|
+
return
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
|
|
1948
|
+
// 若户数为1则新增档案
|
|
1949
|
+
if (model.button.button_name === '提交' && this.selectdata.defname == '通气' && this.selectdata.f_install_num == 1 && !(this.selectdata.f_apply_type == '管线整改' || this.selectdata.f_apply_type == '商业预埋管线'||this.selectdata.f_apply_type == '商业新建管线')) { //商业新建管线
|
|
1950
|
+
if (model.f_gas_meternumber != model.f_meternumber) {
|
|
1951
|
+
|
|
1952
|
+
let check = await this.$showMessage(`通气表号和施工安装表号不一致,点击"确定"将以通气表号为准建立表档案`, ['confirm', 'cancel'])
|
|
1953
|
+
if (check == 'confirm') {
|
|
1954
|
+
model.f_gas_meternumber_back = model.f_meternumber
|
|
1955
|
+
model.f_meternumber = model.f_gas_meternumber
|
|
1956
|
+
} else {
|
|
1957
|
+
this.$refs.service_show.disable_button = false
|
|
1958
|
+
return
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
// 派工单环节,如果累计领用量为0,则不让提交
|
|
1963
|
+
if (model.button.button_name === '提交' && this.selectdata.defname == '派工单') {
|
|
1964
|
+
let http4 = new HttpResetClass()
|
|
1965
|
+
let model2 = Object.assign({}, this.selectdata, model)
|
|
1966
|
+
let ret = await http4.load('POST', 'rs/logic/getSumForMaterial', model2, {resolveMsg: null, rejectMsg: null})
|
|
1967
|
+
if (ret.data[0].sum == null || ret.data[0].sum == 0) {
|
|
1968
|
+
this.$showAlert('未领取材料,不能提交!', 'warning', 3000)
|
|
1969
|
+
this.$refs.service_show.disable_button = false
|
|
1970
|
+
return
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
// 施工环节 如果为民用集体散户而且没有导入用户资料弹框提并终止提交
|
|
1974
|
+
if (model.button.button_name === '提交' && this.selectdata.defname == '施工' && model.f_install_num > 1&& this.selectdata.f_apply_type == '民用集体散户' && this.$parent.$parent.$parent.$refs.record && this.$parent.$parent.$parent.$refs.record.model.rows.length == 0) {
|
|
1975
|
+
this.$showAlert('请在档案信息管理便签页导入用户档案!', 'warning', 3000)
|
|
1976
|
+
this.$refs.service_show.disable_button = false
|
|
1977
|
+
return
|
|
1978
|
+
}
|
|
1979
|
+
// 如果为内部投建项目点击提交 也为跳过收费
|
|
1980
|
+
if (model.button.button_name === '提交' && this.selectdata.defname == '合同审核' && this.selectdata.f_apply_type == '内部投建') {
|
|
1981
|
+
model.button.button_name === '跳过收费'
|
|
1982
|
+
}
|
|
1983
|
+
// 派工单环节 如果为民用散户 或者 整改 跳过 工程交底
|
|
1984
|
+
// || this.selectdata.f_apply_type.includes('整改') // 11月21日,古蕾姐说整改需要工程交底
|
|
1985
|
+
if (model.button.button_name === '提交' && this.selectdata.defname == '派工单' && (this.selectdata.f_apply_type.includes('民用散户'))) {
|
|
1986
|
+
model.button.button_name = '跳过工程交底'
|
|
1987
|
+
}
|
|
847
1988
|
var operate = ''
|
|
848
1989
|
// 判断当前按钮是否为特殊业务,即子流程提交或者分发
|
|
849
1990
|
if (model.button.button_name === '提交' && model.button.button_event && model.button.button_event === '子流程提交') {
|
|
@@ -861,98 +2002,341 @@
|
|
|
861
2002
|
if (model.button && model.button.button_event === '分发') {
|
|
862
2003
|
operate = '分发'
|
|
863
2004
|
}
|
|
864
|
-
let
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
2005
|
+
let array = this.$login.f.rolesnames.split(',')
|
|
2006
|
+
if (this.selectdata.defname == '任务分配' && array.includes("工程技术部负责人")) {
|
|
2007
|
+
model.f_survey_name = model.button.button_fields.f_apply_kefu_employee
|
|
2008
|
+
let buyerinfos = []
|
|
2009
|
+
let numReg = /^[0-9]+$/
|
|
2010
|
+
let numRe = new RegExp(numReg)
|
|
2011
|
+
let querydata = {
|
|
2012
|
+
tablename: 't_user',
|
|
2013
|
+
condition: ""
|
|
2014
|
+
}
|
|
2015
|
+
if (model.f_survey_name != null && "object" == typeof model.f_survey_name) {
|
|
2016
|
+
// object类型 切不为空
|
|
2017
|
+
querydata.condition = `id = ${model.f_survey_name.id}`
|
|
2018
|
+
} else if (numReg.test(model.f_survey_name)) {
|
|
2019
|
+
// 数字类型
|
|
2020
|
+
querydata.condition = `id = ${model.f_survey_name}`
|
|
2021
|
+
} else {
|
|
2022
|
+
// 字符串类型
|
|
2023
|
+
querydata.condition = `name = '${model.f_survey_name}'`
|
|
2024
|
+
}
|
|
2025
|
+
buyerinfos = await this.$resetpost('rs/sql/singleTable', {data: querydata}, {
|
|
2026
|
+
resolveMsg: null,
|
|
2027
|
+
rejectMsg: '获取人员失败'
|
|
2028
|
+
})
|
|
2029
|
+
model.f_survey_name = {
|
|
2030
|
+
id: buyerinfos.data[0].id,
|
|
2031
|
+
name: buyerinfos.data[0].name
|
|
869
2032
|
}
|
|
870
2033
|
}
|
|
2034
|
+
// model.button.button_fields[this.show_data.buttons[model.button.button_index].button_fields[0].field]
|
|
2035
|
+
// for (let i = 0; i < this.department_search.length; i++) {
|
|
2036
|
+
// 找到人名为person_name 的人,然后把人名换成id
|
|
2037
|
+
// if (this.department_search[i].name === person_name) {
|
|
2038
|
+
// model.button.button_fields[this.show_data.buttons[model.button.button_index].button_fields[0].field] = this.department_search[i].id
|
|
2039
|
+
// }
|
|
2040
|
+
// }
|
|
2041
|
+
}
|
|
2042
|
+
if (model.button.button_name == '跳过收费' && this.selectdata.defname == '合同审核' && this.selectdata.f_apply_type.includes('民用') && this.selectdata.f_apply_type != '民用整改') {
|
|
2043
|
+
model.button.button_name = '提交'
|
|
2044
|
+
model.button.button_person = {
|
|
2045
|
+
button_event: "获取之前被下发人",
|
|
2046
|
+
button_person_field: "f_survey_name"
|
|
2047
|
+
}
|
|
871
2048
|
}
|
|
872
|
-
if (model.button.button_name === '提交') {
|
|
873
|
-
// ===================>青白江特殊流程开始,合并分支时请忽略这段代码 开始
|
|
874
|
-
let http = new HttpResetClass()
|
|
875
|
-
if (this.$refs.service_show.data.defname === '综合验收确认') {
|
|
876
|
-
// http = new HttpResetClass()
|
|
877
|
-
// let data = {
|
|
878
|
-
// tablename: 't_files',
|
|
879
|
-
// condition: `fusetype = '综合验收签字单' and f_blobid='${this.selectdata.f_process_id}'`
|
|
880
|
-
// }
|
|
881
|
-
// let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
|
|
882
|
-
// resolveMsg: null,
|
|
883
|
-
// rejectMsg: "获取附件内容失败"
|
|
884
|
-
// })
|
|
885
|
-
// if (res.data.length <= 0) {
|
|
886
|
-
// this.$showMessage("请先上传综合验收签字单!")
|
|
887
|
-
// return
|
|
888
|
-
// } else {
|
|
889
2049
|
|
|
890
|
-
|
|
2050
|
+
|
|
2051
|
+
if (model.button.button_name == '提交' && model.button.button_person && model.button.button_person.button_event === '获取之前被下发人' && model.button.button_person.button_person_field) {
|
|
2052
|
+
if ((this.selectdata.defname == '收费' || this.selectdata.defname == '合同审核') && this.selectdata.f_apply_type.includes('民用散户')) {
|
|
2053
|
+
model.button.button_person = {
|
|
2054
|
+
button_event: "获取之前被下发人",
|
|
2055
|
+
button_person_field: 'f_apply_kefu_employee'
|
|
2056
|
+
}
|
|
2057
|
+
model.button.button_fields['f_apply_kefu_employee'] = model.f_apply_kefu_employee
|
|
891
2058
|
}
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
let
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
2059
|
+
model.button.button_name = '下发'
|
|
2060
|
+
model.button.button_fields = {}
|
|
2061
|
+
let buyerinfos = []
|
|
2062
|
+
let numReg = /^[0-9]+$/
|
|
2063
|
+
let numRe = new RegExp(numReg)
|
|
2064
|
+
if (this.selectdata[model.button.button_person.button_person_field].startsWith('{')) {
|
|
2065
|
+
let temp = JSON.parse(this.selectdata[model.button.button_person.button_person_field])
|
|
2066
|
+
model.button.button_fields[model.button.button_person.button_person_field] = temp.id
|
|
2067
|
+
} else if (!numRe.test(this.selectdata[model.button.button_person.button_person_field])) {
|
|
2068
|
+
console.log('model.button.button_person.button_person_field========>',model.button.button_person.button_person_field)
|
|
2069
|
+
console.log('this.selectdata[model.button.button_person.button_person_field]========>',this.selectdata[model.button.button_person.button_person_field])
|
|
2070
|
+
let temp = this.selectdata[model.button.button_person.button_person_field]
|
|
2071
|
+
let querydata = {
|
|
2072
|
+
tablename: 't_user',
|
|
2073
|
+
condition: `name = '${temp}'`
|
|
904
2074
|
}
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
2075
|
+
console.log('querydata========>',querydata)
|
|
2076
|
+
let userinfo = await this.$resetpost('rs/sql/singleTable', {data: querydata}, {
|
|
2077
|
+
resolveMsg: null,
|
|
2078
|
+
rejectMsg: '获取人员失败'
|
|
2079
|
+
})
|
|
2080
|
+
console.log('userinfo========>',userinfo)
|
|
2081
|
+
if(userinfo.data&&userinfo.data.length!=0){
|
|
2082
|
+
model.button.button_fields[model.button.button_person.button_person_field] = {
|
|
2083
|
+
id: userinfo.data[0].id,
|
|
2084
|
+
name: userinfo.data[0].name
|
|
909
2085
|
}
|
|
910
2086
|
}
|
|
911
|
-
|
|
2087
|
+
} else {
|
|
2088
|
+
model.button.button_fields[model.button.button_person.button_person_field] = this.selectdata[model.button.button_person.button_person_field]
|
|
912
2089
|
}
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
// if (model.button.button_name!='保存'&&model.button.button_name!='退回'&&(
|
|
2093
|
+
// this.selectdata.defname == '收费'
|
|
2094
|
+
// ) && (
|
|
2095
|
+
// this.selectdata.f_apply_type == '公用整改'
|
|
2096
|
+
// ||this.selectdata.f_apply_type == '工业整改'
|
|
2097
|
+
// ||this.selectdata.f_apply_type == '公用'
|
|
2098
|
+
// ||this.selectdata.f_apply_type == '工业'
|
|
2099
|
+
// ||this.selectdata.f_apply_type == '商业预埋管线'
|
|
2100
|
+
// )) {
|
|
2101
|
+
// model.button.button_name = '下发'
|
|
2102
|
+
// model.button.button_person = {
|
|
2103
|
+
// button_event: "获取之前被下发人",
|
|
2104
|
+
// button_person_field: "f_survey_name"
|
|
2105
|
+
// }
|
|
2106
|
+
// }else if(model.button.button_name!='保存'&&model.button.button_name!='退回'&&(
|
|
2107
|
+
// this.selectdata.defname == '勘察初设'
|
|
2108
|
+
// ) && (
|
|
2109
|
+
// this.selectdata.f_apply_type == '公用整改'
|
|
2110
|
+
// ||this.selectdata.f_apply_type == '工业整改'
|
|
2111
|
+
// ||this.selectdata.f_apply_type == '公用'
|
|
2112
|
+
// ||this.selectdata.f_apply_type == '工业'
|
|
2113
|
+
// ||this.selectdata.f_apply_type == '商业预埋管线'
|
|
2114
|
+
// )){
|
|
2115
|
+
// let act = {
|
|
2116
|
+
// tablename: 'activityins',
|
|
2117
|
+
// condition: `processid = '${this.selectdata.f_process_id}' and defname = '报装申请'`
|
|
2118
|
+
// }
|
|
2119
|
+
// let res = await this.$resetpost('rs/sql/singleTable', {data: act}, {
|
|
2120
|
+
// resolveMsg: null,
|
|
2121
|
+
// rejectMsg: '获取人员失败'
|
|
2122
|
+
// })
|
|
2123
|
+
//
|
|
2124
|
+
// let querydata = {
|
|
2125
|
+
// tablename: 't_user',
|
|
2126
|
+
// condition: `ename = '${res.data[0].userid}'`
|
|
2127
|
+
// }
|
|
2128
|
+
// let buyerinfos = await this.$resetpost('rs/sql/singleTable', {data: querydata}, {
|
|
2129
|
+
// resolveMsg: null,
|
|
2130
|
+
// rejectMsg: '获取人员失败'
|
|
2131
|
+
// })
|
|
2132
|
+
// model.f_apply_kefu_employee = {
|
|
2133
|
+
// id: buyerinfos.data[0].id,
|
|
2134
|
+
// name: buyerinfos.data[0].name
|
|
2135
|
+
// }
|
|
2136
|
+
// model.button.button_name = '下发'
|
|
2137
|
+
// model.button.button_person = {
|
|
2138
|
+
// button_event: "获取之前被下发人",
|
|
2139
|
+
// button_person_field: "f_apply_kefu_employee"
|
|
2140
|
+
// }
|
|
2141
|
+
// model.button.button_fields.f_apply_kefu_employee = model.f_apply_kefu_employee
|
|
2142
|
+
// }else if(model.button.button_name!='保存'&&model.button.button_name!='退回'&&this.checkParetment() == '客户服务部'&&( // 部门个人
|
|
2143
|
+
// this.selectdata.defname=="勘察初设"
|
|
2144
|
+
// )){
|
|
2145
|
+
// model.button.button_name = '下发'
|
|
2146
|
+
// model.button.button_person = {
|
|
2147
|
+
// button_event: "获取之前被下发人",
|
|
2148
|
+
// button_person_field: "f_apply_kefu_employee"
|
|
2149
|
+
// }
|
|
2150
|
+
// let numReg = /^[0-9]+$/
|
|
2151
|
+
// let numRe = new RegExp(numReg)
|
|
2152
|
+
// if (numRe.test(this.selectdata.f_apply_kefu_employee)) {
|
|
2153
|
+
// model.button.button_fields.f_apply_kefu_employee ={
|
|
2154
|
+
// id: this.selectdata.f_apply_kefu_employee,
|
|
2155
|
+
// name: this.selectdata.f_apply_kefu_employee
|
|
2156
|
+
// }
|
|
2157
|
+
// }else{
|
|
2158
|
+
// model.button.button_fields.f_apply_kefu_employee = JSON.parse(this.selectdata.f_apply_kefu_employee)
|
|
2159
|
+
// }
|
|
2160
|
+
// }else if(model.button.button_name!='保存'&&model.button.button_name!='退回'&&this.checkParetment() == '客户服务部'&&( // 技术人员
|
|
2161
|
+
// this.selectdata.defname=="派工单"||
|
|
2162
|
+
// this.selectdata.defname=="收费"||
|
|
2163
|
+
// this.selectdata.defname=="施工"||
|
|
2164
|
+
// this.selectdata.defname=="综合验收确认"
|
|
2165
|
+
// )){
|
|
2166
|
+
// model.button.button_name = '下发'
|
|
2167
|
+
// model.button.button_person = {
|
|
2168
|
+
// button_event: "获取之前被下发人",
|
|
2169
|
+
// button_person_field: "f_survey_name"
|
|
2170
|
+
// }
|
|
2171
|
+
// let numReg = /^[0-9]+$/
|
|
2172
|
+
// let numRe = new RegExp(numReg)
|
|
2173
|
+
// if (numRe.test(this.selectdata.f_survey_name)) {
|
|
2174
|
+
// model.button.button_fields.f_survey_name ={
|
|
2175
|
+
// id: this.selectdata.f_survey_name,
|
|
2176
|
+
// name: this.selectdata.f_survey_name
|
|
2177
|
+
// }
|
|
2178
|
+
// }else{
|
|
2179
|
+
// model.button.button_fields.f_survey_name = this.selectdata.f_survey_name
|
|
2180
|
+
// }
|
|
2181
|
+
// }
|
|
2182
|
+
|
|
2183
|
+
if (model.button.button_name === '提交') {
|
|
2184
|
+
// ===================>青白江特殊流程开始,合并分支时请忽略这段代码 开始
|
|
2185
|
+
// let http = new HttpResetClass()
|
|
2186
|
+
// if (this.$refs.service_show.data.defname === '通气') {
|
|
2187
|
+
// console.log('改变档案状态')
|
|
2188
|
+
// let param = {
|
|
2189
|
+
// f_process_id: model.f_process_id
|
|
2190
|
+
// }
|
|
2191
|
+
// let res = await http.load('POST', 'rs/logic/setUserstate', param, {
|
|
2192
|
+
// resolveMsg: null,
|
|
2193
|
+
// rejectMsg: null
|
|
2194
|
+
// })
|
|
2195
|
+
// }
|
|
2196
|
+
// if (this.$refs.service_show.data.defname === '综合验收确认') {
|
|
2197
|
+
// if (model.f_isdata_check == '否' || !model.f_isdata_check) {
|
|
2198
|
+
// this.$showMessage("资料验收未通过")
|
|
2199
|
+
// this.$refs.service_show.disable_button = false
|
|
2200
|
+
// return
|
|
2201
|
+
// }
|
|
2202
|
+
// if (model.f_isacceptance_pass == '否' || !model.f_isacceptance_pass) {
|
|
2203
|
+
// this.$showMessage("工程验收未通过")
|
|
2204
|
+
// this.$refs.service_show.disable_button = false
|
|
2205
|
+
// return
|
|
2206
|
+
// }
|
|
2207
|
+
// // http = new HttpResetClass()
|
|
2208
|
+
// // let data = {
|
|
2209
|
+
// // tablename: 't_files',
|
|
2210
|
+
// // condition: `fusetype = '综合验收签字单' and f_blobid='${this.selectdata.f_process_id}'`
|
|
2211
|
+
// // }
|
|
2212
|
+
// // let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
|
|
2213
|
+
// // resolveMsg: null,
|
|
2214
|
+
// // rejectMsg: "获取附件内容失败"
|
|
2215
|
+
// // })
|
|
2216
|
+
// // if (res.data.length <= 0) {
|
|
2217
|
+
// // this.$showMessage("请先上传综合验收签字单!")
|
|
2218
|
+
// // return
|
|
2219
|
+
// // } else {
|
|
2220
|
+
//
|
|
2221
|
+
// // }
|
|
2222
|
+
// }
|
|
2223
|
+
// // 判断分流程
|
|
2224
|
+
// if (this.$refs.service_show.data.defname === this.$workflow_vue.start_activity) {
|
|
2225
|
+
// let flag = ''
|
|
2226
|
+
// let str = this.$appdata.getSingleValue("客户服务部")
|
|
2227
|
+
// let str2 = this.$appdata.getSingleValue("工程技术部")
|
|
2228
|
+
// let arr = str.split(",")
|
|
2229
|
+
// let arr2 = str2.split(",")
|
|
2230
|
+
// for (let i = 0; i < arr.length; i++) {
|
|
2231
|
+
// if (arr[i] == model.f_apply_type) {
|
|
2232
|
+
// flag = '客户服务部'
|
|
2233
|
+
// break
|
|
2234
|
+
// }
|
|
2235
|
+
// }
|
|
2236
|
+
// for (let i = 0; i < arr2.length; i++) {
|
|
2237
|
+
// if (arr2[i] == model.f_apply_type) {
|
|
2238
|
+
// flag = '工程技术部'
|
|
2239
|
+
// break
|
|
2240
|
+
// }
|
|
2241
|
+
// }
|
|
2242
|
+
// model.button.button_name = flag
|
|
2243
|
+
// }
|
|
913
2244
|
|
|
914
2245
|
// ===================>青白江特殊流程开始,合并分支时请忽略这段代码 结束
|
|
915
2246
|
// flag 为合同编号更新标志
|
|
916
|
-
var flag = false
|
|
917
|
-
if (
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
}
|
|
2247
|
+
// var flag = false
|
|
2248
|
+
// if (this.data.defname == '合同审核') {
|
|
2249
|
+
// flag = true
|
|
2250
|
+
// http = new HttpResetClass()
|
|
2251
|
+
// let data = {
|
|
2252
|
+
// tablename: 't_singlevalue',
|
|
2253
|
+
// condition: `name = '合同编号' and f_filialeids = '${this.$login.f.f_orgids}'`
|
|
2254
|
+
// }
|
|
2255
|
+
// let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
|
|
2256
|
+
// resolveMsg: null,
|
|
2257
|
+
// rejectMsg: "获取合同编号失败"
|
|
2258
|
+
// })
|
|
2259
|
+
// if (this.contract != res.data[0].value && !this.selectdata.f_contract_number) {
|
|
2260
|
+
// this.$showMessage("合同编号已经被使用,请按F5刷新页面后重新登记")
|
|
2261
|
+
// return
|
|
2262
|
+
// }
|
|
2263
|
+
// }
|
|
933
2264
|
|
|
934
2265
|
}
|
|
935
|
-
|
|
936
|
-
if(model.button.button_name
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
for(let i=0;i<arr.length;i++){
|
|
943
|
-
if(arr[i] == model.f_apply_type){
|
|
944
|
-
flag = '客户服务部'
|
|
945
|
-
break
|
|
946
|
-
}
|
|
2266
|
+
|
|
2267
|
+
if (model.button.button_name === '提交' && this.$refs.service_show.data.defname === '综合验收确认') {
|
|
2268
|
+
if (model.f_isacceptance_pass != '是') {
|
|
2269
|
+
this.$showMessage('验收不通过,请执行退回操作。', 'info', 2000)
|
|
2270
|
+
model.f_isacceptance_pass = ''
|
|
2271
|
+
this.$refs.service_show.disable_button = false
|
|
2272
|
+
return
|
|
947
2273
|
}
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
2274
|
+
}
|
|
2275
|
+
if (model.button.button_name === '提交' && this.$refs.service_show.data.defname === '现场勘查') {
|
|
2276
|
+
if (model.f_install_num < 1) {
|
|
2277
|
+
this.$showAlert('安装表数不能小于1,请重新输入', 'info', 2000)
|
|
2278
|
+
model.f_install_num = ""
|
|
2279
|
+
this.$refs.service_show.disable_button = false
|
|
2280
|
+
return
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2283
|
+
if (model.button.button_name === '提交' && this.$refs.service_show.data.defname === '派工单') {
|
|
2284
|
+
if (model.f_unaccounts_money > 0) {
|
|
2285
|
+
this.$showMessage("未结清工程款。")
|
|
953
2286
|
}
|
|
954
|
-
model.button.button_name = flag
|
|
955
2287
|
}
|
|
2288
|
+
// ===================>青白江特殊流程开始,合并分支时请忽略这段代码 开始
|
|
2289
|
+
// if (model.button.button_name == '退回' && (this.$refs.service_show.data.defname == '勘察初设' || this.$refs.service_show.data.defname == '任务分配')) {
|
|
2290
|
+
// let flag = ''
|
|
2291
|
+
// let str = this.$appdata.getSingleValue("客户服务部")
|
|
2292
|
+
// let str2 = this.$appdata.getSingleValue("工程技术部")
|
|
2293
|
+
// let arr = str.split(",")
|
|
2294
|
+
// let arr2 = str2.split(",")
|
|
2295
|
+
// for (let i = 0; i < arr.length; i++) {
|
|
2296
|
+
// if (arr[i] == model.f_apply_type) {
|
|
2297
|
+
// flag = '客户服务部'
|
|
2298
|
+
// break
|
|
2299
|
+
// }
|
|
2300
|
+
// }
|
|
2301
|
+
// for (let i = 0; i < arr2.length; i++) {
|
|
2302
|
+
// if (arr2[i] == model.f_apply_type) {
|
|
2303
|
+
// flag = '工程技术部'
|
|
2304
|
+
// break
|
|
2305
|
+
// }
|
|
2306
|
+
// }
|
|
2307
|
+
// model.button.button_name = flag
|
|
2308
|
+
// // 如果为任务分配,而且报建类型没有改变,则为正常退回
|
|
2309
|
+
// if (this.$refs.service_show.data.defname == '任务分配') {
|
|
2310
|
+
// // 判断报建类型有没有变化
|
|
2311
|
+
// let beforeData = this.data.fields
|
|
2312
|
+
// let submitData = this.$refs.service_show.data.fields
|
|
2313
|
+
// // 比较
|
|
2314
|
+
// let f_before_change = []
|
|
2315
|
+
// let f_change = []
|
|
2316
|
+
// for (let i = 0; i < beforeData.length; i++) {
|
|
2317
|
+
// if (beforeData[i].field == 'f_apply_type' && beforeData[i].value == submitData[i].value) {
|
|
2318
|
+
// model.button.button_name = '退回'
|
|
2319
|
+
// break
|
|
2320
|
+
// }
|
|
2321
|
+
// }
|
|
2322
|
+
// }
|
|
2323
|
+
// }
|
|
2324
|
+
// if (this.selectdata.defname == '内验') {
|
|
2325
|
+
// // let http2 = new HttpResetClass()
|
|
2326
|
+
// // let data = {
|
|
2327
|
+
// // columnname: 'f_charge_money',
|
|
2328
|
+
// // tablename: 't_charge_record',
|
|
2329
|
+
// // condition: `f_charging_status='有效' and f_process_id = '${this.selectdata.f_process_id}'`
|
|
2330
|
+
// // }
|
|
2331
|
+
// // let res = await http2.load('POST', 'rs/sql/getSum', {data: data}, {
|
|
2332
|
+
// // resolveMsg: null,
|
|
2333
|
+
// // rejectMsg: "获取合同编号失败"
|
|
2334
|
+
// // })
|
|
2335
|
+
// // if ((Number(this.selectdata.f_contract_money) >= Number(res.data[0].f_charge_money))&&Number(res.data[0].f_charge_money)!=0) {
|
|
2336
|
+
// if (model.f_check_ngineering == '否') {
|
|
2337
|
+
// model.button.button_name = '停气碰口'
|
|
2338
|
+
// }
|
|
2339
|
+
// }
|
|
956
2340
|
// ===================>青白江特殊流程开始,合并分支时请忽略这段代码 结束
|
|
957
2341
|
console.log('本次点击button执行的操作是=>' + operate)
|
|
958
2342
|
model = Object.assign({}, this.selectdata, model)
|
|
@@ -970,14 +2354,29 @@
|
|
|
970
2354
|
requestData = {
|
|
971
2355
|
tables: this.data.tables, model: model
|
|
972
2356
|
}
|
|
973
|
-
} else if(model.button.button_name === '提交' && model.button.button_event && model.button.button_event === '分支流程异步合并处理'){
|
|
2357
|
+
} else if (model.button.button_name === '提交' && model.button.button_event && model.button.button_event === '分支流程异步合并处理') {
|
|
974
2358
|
url = 'rs/logic/branchsyncprocess'
|
|
975
2359
|
requestData = {
|
|
976
2360
|
tables: this.data.tables, model: model
|
|
977
2361
|
}
|
|
978
|
-
} else{
|
|
2362
|
+
} else {
|
|
979
2363
|
// 下发,提交,保存,退回通用业务后台处理logic
|
|
2364
|
+
|
|
980
2365
|
url = 'rs/logic/ApplyProductService'
|
|
2366
|
+
// model = Object.assign(model,model.button.button_fields)
|
|
2367
|
+
// let model2 = JSON.parse(JSON.stringify(model))
|
|
2368
|
+
// let str = ''
|
|
2369
|
+
// if(model2.button.button_name == '下发'){
|
|
2370
|
+
// for (let key in model2.button.button_fields) {
|
|
2371
|
+
// if(typeof model2.button.button_fields[key] == 'object'){
|
|
2372
|
+
// str=str+`id*${String(model2.button.button_fields[key].id)}&name*${model2.button.button_fields[key].name}`
|
|
2373
|
+
// model2[key] = ''
|
|
2374
|
+
// model2[key] =str
|
|
2375
|
+
// }
|
|
2376
|
+
// }
|
|
2377
|
+
// }
|
|
2378
|
+
// model2.button=null
|
|
2379
|
+
|
|
981
2380
|
requestData = {
|
|
982
2381
|
tables: this.data.tables, model: model
|
|
983
2382
|
}
|
|
@@ -985,23 +2384,12 @@
|
|
|
985
2384
|
requestData.start_activity = this.$workflow_vue.start_activity
|
|
986
2385
|
requestData.loginUser = this.$login.f
|
|
987
2386
|
requestData.workflow_xmlfilename = this.$workflow_vue.workflow_xmlfilename
|
|
2387
|
+
requestData.employeetemplate = ''
|
|
988
2388
|
console.log('即将发送请求url=>' + url + ',参数=>' + JSON.stringify(requestData))
|
|
989
2389
|
let res = res = await http.load('POST', url, {data: requestData}, {resolveMsg: null, rejectMsg: '数据保存失败'})
|
|
990
2390
|
console.log("service处理完成返回数据:", JSON.stringify(res.data))
|
|
991
2391
|
if (res.data.code == 200) {
|
|
992
|
-
|
|
993
|
-
if (flag) {
|
|
994
|
-
let http = new HttpResetClass()
|
|
995
|
-
let data = {
|
|
996
|
-
tablename: 't_singlevalue',
|
|
997
|
-
condition: `name = '合同编号' and f_filialeids = '${this.$login.f.f_orgids}'`,
|
|
998
|
-
value: (Number(this.contract) + 1) + ''
|
|
999
|
-
}
|
|
1000
|
-
await http.load('POST', 'rs/logic/updatesinglevalue', {data: data}, {
|
|
1001
|
-
resolveMsg: null,
|
|
1002
|
-
rejectMsg: "获取合同编号更新失败"
|
|
1003
|
-
})
|
|
1004
|
-
}
|
|
2392
|
+
model = res.data.model
|
|
1005
2393
|
this.showview = false
|
|
1006
2394
|
// 特殊处理
|
|
1007
2395
|
this.special(model)
|
|
@@ -1012,7 +2400,8 @@
|
|
|
1012
2400
|
this.$showMessage(res.data.msg)
|
|
1013
2401
|
}
|
|
1014
2402
|
}
|
|
1015
|
-
}
|
|
2403
|
+
}
|
|
2404
|
+
,
|
|
1016
2405
|
async 'onetomanydelete'(i, j) {
|
|
1017
2406
|
let http = new HttpResetClass()
|
|
1018
2407
|
let data = {
|
|
@@ -1026,10 +2415,11 @@
|
|
|
1026
2415
|
this.$dispatch('selfsearch')
|
|
1027
2416
|
this.$refs.service_show.model.rows[i].splice(j, 1)
|
|
1028
2417
|
})
|
|
1029
|
-
}
|
|
2418
|
+
}
|
|
2419
|
+
,
|
|
1030
2420
|
//获取view层confirm事件
|
|
1031
|
-
async 'confirm'(tables, row,showadd_index,j) {
|
|
1032
|
-
|
|
2421
|
+
async 'confirm'(tables, row, showadd_index, j) {
|
|
2422
|
+
var _this = this
|
|
1033
2423
|
for (let i = 0; i < tables.length; i++) {
|
|
1034
2424
|
let datas = {
|
|
1035
2425
|
tables: tables,
|
|
@@ -1043,10 +2433,11 @@
|
|
|
1043
2433
|
let billtype = datas.row['f_bill_style']
|
|
1044
2434
|
if (tables[i] == 't_charge_record') {
|
|
1045
2435
|
await this.loadbuyer()
|
|
1046
|
-
if (this.buyerinfo.rows.length < 1 && billtype === '增值税电子发票' && this.$appdata.getSingleValue('默认打印票据') === '是'){
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
2436
|
+
if (this.buyerinfo.rows.length < 1 && billtype === '增值税电子发票' && this.$appdata.getSingleValue('默认打印票据') === '是') {
|
|
2437
|
+
this.$showAlert('未找到购买方信息,请去报建功能"购买方信息"中完善购买方信息后再收费', 'info', 2000)
|
|
2438
|
+
this.$refs.service_show.model.rows[showadd_index].splice(j, 1)
|
|
2439
|
+
this.$refs.service_show.initializtion()
|
|
2440
|
+
return
|
|
1050
2441
|
}
|
|
1051
2442
|
datas.row.f_charging_status = '有效'
|
|
1052
2443
|
datas.row.f_is_correct = '否'
|
|
@@ -1067,20 +2458,20 @@
|
|
|
1067
2458
|
}
|
|
1068
2459
|
}*/
|
|
1069
2460
|
let temp = _this.$refs.service_show.model.rows[showadd_index][j]
|
|
1070
|
-
temp.id =
|
|
2461
|
+
temp.id = sellid
|
|
1071
2462
|
_this.$refs.service_show.model.rows[showadd_index][j] = temp
|
|
1072
2463
|
})
|
|
1073
2464
|
if (this.$appdata.getSingleValue('默认打印票据') && this.$appdata.getSingleValue('默认打印票据') === '是') {
|
|
1074
2465
|
this.$showMessage('是否打票据', ['confirm', 'cancel']).then((res) => {
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
}
|
|
2466
|
+
if (res === 'confirm') {
|
|
2467
|
+
console.log('打印票据')
|
|
2468
|
+
if (billtype === '增值税电子发票') {
|
|
2469
|
+
this.selectsellid = sellid
|
|
2470
|
+
this.showbuyerinfo = true
|
|
2471
|
+
} else {
|
|
2472
|
+
this.printbill(sellid)
|
|
1083
2473
|
}
|
|
2474
|
+
}
|
|
1084
2475
|
})
|
|
1085
2476
|
}
|
|
1086
2477
|
// 刷新列表数据
|