apply-clients 6.0.4 → 6.0.7
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/build/dev-server.js +2 -2
- package/package.json +1 -1
- package/src/components/apply/base/rightview/InstallCardList2.vue +3 -2
- package/src/components/apply/base/rightview/carddetail/BuildFeeDetail2.vue +1 -1
- package/src/components/apply/base/rightview/carddetail/ChangeFeeDetail2.vue +1 -1
- package/src/components/apply/base/rightview/carddetail/ReduceFeeDetail2.vue +2 -2
- package/src/components/apply/base/rightview/carddetail/StopApplyDetail2.vue +70 -70
- package/src/components/build/Install/InstallFee/AddContract.vue +257 -257
- package/src/components/build/Install/InstallFee/InstallFee.vue +929 -929
- package/src/components/build/Install/InstallFee/PreparationFee.vue +223 -223
- package/src/components/build/Install/InstallFee/PrestoreFee.vue +630 -630
- package/src/components/build/Install/Process/CustomerBuildingMessage.vue +251 -251
- package/src/components/build/Install/Process/CustomerEquipmentMessage.vue +172 -172
- package/src/components/build/Install/Process/CustomerFile.vue +423 -423
- package/src/components/build/Install/Process/CustomerMaterialMessage.vue +414 -414
- package/src/components/build/Install/Process/CustomerRecordMessage.vue +749 -749
- package/src/components/build/Install/Process/FeeNormeAndContratSigne.vue +376 -376
- package/src/components/build/Install/Process/MeterType.vue +379 -379
- package/src/components/build/Install/Process/PlaceControler.vue +304 -304
- package/src/components/build/Install/Process/zhongran/ZR_Construction.vue +388 -388
- package/src/components/build/Install/Process/zhongran/ZR_CustomerEssentialInfo.vue +416 -415
- package/src/components/build/Install/Process/zhongran/ZR_MaterialPlan.vue +259 -259
- package/src/components/build/Install/Process/zhongran/ZR_MaterialPlanExamine.vue +243 -243
- package/src/components/build/Install/Process/zhongran/ZR_PlaceControler.vue +426 -426
- package/src/components/build/Install/Process/zhongran/ZR_TestDesign.vue +441 -441
- package/src/components/build/Install/ProcessInfo/ApplyRecordCancel.vue +135 -135
- package/src/components/build/Install/bill/BillGZKMakeInfo.vue +58 -58
- package/src/components/build/Install/bill/BillQRKMakeInfo.vue +79 -79
- package/src/components/build/Install/bill/BillXSDMakeInfo.vue +206 -206
- package/src/main.js +25 -25
|
@@ -1,376 +1,376 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="auto select-overspread">
|
|
3
|
-
<div class="panel panel-info">
|
|
4
|
-
<div class="panel-heading">
|
|
5
|
-
<h3 class="panel-title">项目报价并录入合同价格</h3>
|
|
6
|
-
</div>
|
|
7
|
-
<div class="panel-body">
|
|
8
|
-
<validator name="v">
|
|
9
|
-
<form class="form-horizontal">
|
|
10
|
-
<div class="col-sm-11 form-group">
|
|
11
|
-
<div class="form-group col-sm-4 form-input-group" :class="[$v.f_contract_number.required ? 'has-error': '']">
|
|
12
|
-
<label class="control-label col-sm-6">合同编号:</label>
|
|
13
|
-
<div class="col-sm-6">
|
|
14
|
-
<input type="text" class="form-control" v-model="model.f_contract_number"
|
|
15
|
-
v-validate:f_contract_number='{required: true }' readonly/>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
<div class="form-group col-sm-4 form-input-group">
|
|
19
|
-
<label class="control-label col-sm-4">合同签订日期:</label>
|
|
20
|
-
<div class="col-sm-6">
|
|
21
|
-
<datepicker width="600.76px;"
|
|
22
|
-
:value.sync="model.f_contract_time"
|
|
23
|
-
:format="'yyyy-MM-dd'"
|
|
24
|
-
v-model="model.f_contract_time" readonly="readonly"
|
|
25
|
-
:show-reset-button="reset">
|
|
26
|
-
</datepicker>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
<div class="form-group col-sm-4 form-input-group" :class="[$v.f_salesman.required ? 'has-error': '']">
|
|
30
|
-
<label class="control-label col-sm-6">合同业务办理人:</label>
|
|
31
|
-
<div class="col-sm-6">
|
|
32
|
-
<input type="text" class="form-control" v-model="model.f_salesman"
|
|
33
|
-
v-validate:f_salesman='{required: true }'/>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="col-sm-11 form-group">
|
|
38
|
-
<div class="form-group col-sm-4 form-input-group" :class="[$v.f_contract_money.required ? 'has-error': '']">
|
|
39
|
-
<label class="control-label col-sm-3">合同金额:</label>
|
|
40
|
-
<div class="col-sm-8">
|
|
41
|
-
<input type="text" class="form-control" v-model="model.f_contract_money"
|
|
42
|
-
v-validate:f_gtren_unit='{required: true }'/>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
<div class="form-group col-sm-4 form-input-group">
|
|
46
|
-
<label class="control-label">合同性质:</label>
|
|
47
|
-
<div class="col-sm-5">
|
|
48
|
-
<v-select :is-all-line="true" :value.sync="model.f_contract_nature" v-model="model.f_contract_nature" v-ref:contract_type
|
|
49
|
-
:options='fcontracttype'
|
|
50
|
-
placeholder='请选择' close-on-select></v-select>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
<div class="form-group col-sm-4 form-input-group">
|
|
54
|
-
<label class="control-label">缴费类型:</label>
|
|
55
|
-
<div class="col-sm-5">
|
|
56
|
-
<v-select :is-all-line="true" :value.sync="model.f_pay_type" v-model="model.f_pay_type" v-ref:contract_type
|
|
57
|
-
:options='fcontract'
|
|
58
|
-
placeholder='请选择' close-on-select></v-select>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="form-group col-sm-11 form-input-group">
|
|
63
|
-
<label class="col-sm-2" for="f_survey_remarks">合同签订备注:</label>
|
|
64
|
-
<div class="col-sm-10" id="f_survey_remarks">
|
|
65
|
-
<textarea class="form-control" v-model="model.f_contract_remarks" rows="3"></textarea>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
<div class="col-sm-11 form-group">
|
|
69
|
-
<div class="form-group col-sm-6">
|
|
70
|
-
<label class=" col-sm-4 control-label" for="f_filiale">分公司:</label>
|
|
71
|
-
<div class="col-sm-5" id="f_filiale">
|
|
72
|
-
<input class="form-control" type="text" v-model="model.f_filiale" disabled>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
<div class="col-sm-6 form-group">
|
|
76
|
-
<label class="control-label col-sm-6">操作日期:</label>
|
|
77
|
-
<div class="col-sm-5">
|
|
78
|
-
<input type="text" class="form-control" disabled v-model="model.f_contract_date"/>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
<div class="col-sm-11 form-group">
|
|
83
|
-
<div class="col-sm-6 form-group">
|
|
84
|
-
<label class="control-label col-sm-4">部门:</label>
|
|
85
|
-
<div class="col-sm-5">
|
|
86
|
-
<input type="text" class="form-control" disabled v-model="model.f_contract_department"/>
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
<div class="col-sm-6 form-group">
|
|
90
|
-
<label class="control-label col-sm-6">操作人:</label>
|
|
91
|
-
<div class="col-sm-5">
|
|
92
|
-
<input type="text" class="form-control" disabled v-model="model.f_contract_operator"/>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
</form>
|
|
97
|
-
</validator>
|
|
98
|
-
<div class="from-group col-sm-12">
|
|
99
|
-
<center>
|
|
100
|
-
<button type="button" @click="confirm()" class="btn btn-primary" style="width:80px; margin-left:50px;">
|
|
101
|
-
保存
|
|
102
|
-
</button>
|
|
103
|
-
<button type="button" @click="commit()" class="btn btn-primary" style="width:80px; margin-left:50px;">
|
|
104
|
-
提交
|
|
105
|
-
</button>
|
|
106
|
-
<button v-if="selectdata.defname==='项目报价并录入合同价格'&&selectdata.actdefid === '6'" type="button" @click="again()"
|
|
107
|
-
class="btn btn-warning" style="width:80px; margin-left:50px;">
|
|
108
|
-
重设
|
|
109
|
-
</button>
|
|
110
|
-
<button type="button" @click="back()" class="btn btn-warning" style="width:80px; margin-left:50px;">
|
|
111
|
-
退回
|
|
112
|
-
</button>
|
|
113
|
-
</center>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
</template>
|
|
119
|
-
<script>
|
|
120
|
-
import co from 'co'
|
|
121
|
-
import {HttpResetClass} from 'vue-client'
|
|
122
|
-
import * as Util from '../../../Util'
|
|
123
|
-
|
|
124
|
-
let gen = function* (self, val) {
|
|
125
|
-
val.f_sub_state = ''
|
|
126
|
-
val.f_temp_date = self.$login.toStandardTimeString()
|
|
127
|
-
// val.f_gasproperties = val.f_gasproperties[0] ? val.f_gasproperties[0] : ''
|
|
128
|
-
// val.f_stair_price = val.f_stair_price[0] ? val.f_stair_price[0] : ''
|
|
129
|
-
val.f_contract_nature =val.f_contract_nature===null?'':typeof val.f_contract_nature==='object'?(val.f_contract_nature[0]?val.f_contract_nature[0]:''):val.f_contract_nature?val.f_contract_nature:''
|
|
130
|
-
let data ={
|
|
131
|
-
tablename:'t_apply',
|
|
132
|
-
parameters:val
|
|
133
|
-
}
|
|
134
|
-
yield self.$resetpost('rs/logic/save', {data:data})
|
|
135
|
-
if ((self.selectdata.defname === '合同签订' && self.selectdata.actdefid === '8') || (self.selectdata.defname === '材料申购' && self.selectdata.actdefid === '12')) {
|
|
136
|
-
let data = {
|
|
137
|
-
model: {
|
|
138
|
-
f_processid: self.selectdata.f_process_id,
|
|
139
|
-
},
|
|
140
|
-
loginUser: {
|
|
141
|
-
id: self.$login.f.id,
|
|
142
|
-
name: self.$login.f.name,
|
|
143
|
-
ename: self.$login.f.ename
|
|
144
|
-
},
|
|
145
|
-
employeetemplate: self.selectdata.f_survey_name,
|
|
146
|
-
subdep: '提交'
|
|
147
|
-
}
|
|
148
|
-
self.$resetpost(`rs/logic/grantnext`,
|
|
149
|
-
{data: data})
|
|
150
|
-
.then(() => {
|
|
151
|
-
self.reset()
|
|
152
|
-
})
|
|
153
|
-
} else {
|
|
154
|
-
let data = {
|
|
155
|
-
model: {
|
|
156
|
-
f_processid: self.selectdata.f_process_id,
|
|
157
|
-
},
|
|
158
|
-
loginUser: {
|
|
159
|
-
id: self.$login.f.id,
|
|
160
|
-
name: self.$login.f.name,
|
|
161
|
-
ename: self.$login.f.ename
|
|
162
|
-
},
|
|
163
|
-
subdep: '提交'
|
|
164
|
-
}
|
|
165
|
-
self.$resetpost(`rs/logic/contractnext`,
|
|
166
|
-
{data: data})
|
|
167
|
-
.then(() => {
|
|
168
|
-
self.reset()
|
|
169
|
-
})
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
export default {
|
|
174
|
-
title: '合同签订',
|
|
175
|
-
data() {
|
|
176
|
-
return {
|
|
177
|
-
contractid: null, // 单值表合同编号
|
|
178
|
-
fgasproperties: this.$appdata.getParam('用气性质'),
|
|
179
|
-
fcontract: this.$appdata.getParam('缴费类型'),
|
|
180
|
-
fcontracttype: this.$appdata.getParam('合同性质'),
|
|
181
|
-
model: {
|
|
182
|
-
actid: ''
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
props: ['selectdata'],
|
|
187
|
-
ready() {
|
|
188
|
-
// this.selectdata.f_gasproperties = this.selectdata.f_gasproperties ? [this.selectdata.f_gasproperties] : this.model.f_gasproperties
|
|
189
|
-
// this.selectdata.f_stair_price = this.selectdata.f_stair_price ? [this.selectdata.f_stair_price] : this.model.f_stair_price
|
|
190
|
-
// 生成合同编号
|
|
191
|
-
this.makeNumner()
|
|
192
|
-
this.$nextTick(() => {
|
|
193
|
-
this.model = Object.assign({}, this.model, this.selectdata)
|
|
194
|
-
this.model.f_usegasren = this.selectdata.f_user_name
|
|
195
|
-
this.model.f_usegasren_phone = this.selectdata.f_phone
|
|
196
|
-
this.model.f_usegasren_address = this.selectdata.f_address
|
|
197
|
-
this.model.f_givegasfund = 'GD-120天然气'
|
|
198
|
-
this.model.f_contract_date = this.$login.toStandardDateString()
|
|
199
|
-
this.model.f_contract_department = this.$login.f.f_parentname
|
|
200
|
-
this.model.f_contract_operator = this.$login.f.name
|
|
201
|
-
})
|
|
202
|
-
},
|
|
203
|
-
methods: {
|
|
204
|
-
// 更新编号
|
|
205
|
-
async updateContractNumber(){
|
|
206
|
-
let http = new HttpResetClass()
|
|
207
|
-
this.contractid.value = Number(this.contractid.value) + 1
|
|
208
|
-
http.load('POST', 'rs/logic/updatesinglevalue', {data: this.contractid}, {resolveMsg: null, rejectMsg: "合同编号保存失败"})
|
|
209
|
-
},
|
|
210
|
-
// 检测并发
|
|
211
|
-
async check(){
|
|
212
|
-
let http = new HttpResetClass()
|
|
213
|
-
let data = {
|
|
214
|
-
tablename: 't_singlevalue',
|
|
215
|
-
condition: `name = '报建合同编号'`
|
|
216
|
-
}
|
|
217
|
-
let res = await http.load('POST', 'rs/sql/
|
|
218
|
-
return res.data[0].value === this.contractid.value
|
|
219
|
-
},
|
|
220
|
-
// 生成合同编号
|
|
221
|
-
async makeNumner(){
|
|
222
|
-
let http = new HttpResetClass()
|
|
223
|
-
let data = {
|
|
224
|
-
tablename: 't_singlevalue',
|
|
225
|
-
condition: `name = '报建合同编号'`
|
|
226
|
-
}
|
|
227
|
-
let res = await http.load('POST', 'rs/sql/
|
|
228
|
-
this.contractid = res.data[0]
|
|
229
|
-
this.handle()
|
|
230
|
-
this.model.f_contract_number = Util.toStandardDateString2()+this.contractid.value
|
|
231
|
-
},
|
|
232
|
-
// 处理数字,例如: 1 转换成 001
|
|
233
|
-
handle() {
|
|
234
|
-
while (this.contractid.value.length < 4) {
|
|
235
|
-
this.contractid.value = '0' + this.contractid.value
|
|
236
|
-
}
|
|
237
|
-
},
|
|
238
|
-
again() {
|
|
239
|
-
this.model.f_sub_state = '重设'
|
|
240
|
-
this.confirm()
|
|
241
|
-
let data = {
|
|
242
|
-
model: {
|
|
243
|
-
f_processid: this.selectdata.f_process_id,
|
|
244
|
-
},
|
|
245
|
-
loginUser: {
|
|
246
|
-
id: this.$login.f.id,
|
|
247
|
-
name: this.$login.f.name,
|
|
248
|
-
ename: this.$login.f.ename
|
|
249
|
-
},
|
|
250
|
-
subdep: '重设'
|
|
251
|
-
}
|
|
252
|
-
this.$resetpost(`rs/logic/contractnext`,
|
|
253
|
-
{data: data})
|
|
254
|
-
.then(() => {
|
|
255
|
-
this.reset()
|
|
256
|
-
})
|
|
257
|
-
},
|
|
258
|
-
back() {
|
|
259
|
-
this.model.f_sub_state = '退回'
|
|
260
|
-
this.confirm()
|
|
261
|
-
let data = {
|
|
262
|
-
model: {
|
|
263
|
-
f_processid: this.selectdata.f_process_id,
|
|
264
|
-
},
|
|
265
|
-
loginUser: {
|
|
266
|
-
id: this.$login.f.id,
|
|
267
|
-
name: this.$login.f.name,
|
|
268
|
-
ename: this.$login.f.ename
|
|
269
|
-
},
|
|
270
|
-
subdep: '退回'
|
|
271
|
-
}
|
|
272
|
-
this.$resetpost(`rs/logic/contractnext`,
|
|
273
|
-
{data: data})
|
|
274
|
-
.then(() => {
|
|
275
|
-
this.reset()
|
|
276
|
-
})
|
|
277
|
-
},
|
|
278
|
-
async confirm() {
|
|
279
|
-
this.model.f_contract_nature = typeof this.model.f_contract_nature==='object'?this.model.f_contract_nature[0]:this.model.f_contract_nature?this.model.f_contract_nature:''
|
|
280
|
-
// this.model.f_gasproperties = this.model.f_gasproperties[0] ? this.model.f_gasproperties[0] : ''
|
|
281
|
-
// this.model.f_stair_price = this.model.f_stair_price[0] ? this.model.f_stair_price[0] : ''
|
|
282
|
-
this.model.f_total_cost = this.totalcost
|
|
283
|
-
let http = new HttpResetClass()
|
|
284
|
-
let data ={
|
|
285
|
-
tablename:'t_apply',
|
|
286
|
-
parameters:this.model
|
|
287
|
-
}
|
|
288
|
-
await http.load('POST', 'rs/logic/save', {data:data})
|
|
289
|
-
.then(() => {
|
|
290
|
-
this.reset()
|
|
291
|
-
})
|
|
292
|
-
},
|
|
293
|
-
// 小写转换大写
|
|
294
|
-
smalltoBIG(n) {
|
|
295
|
-
let fraction = ['角', '分'];
|
|
296
|
-
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
297
|
-
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
298
|
-
let head = n < 0 ? '欠' : '';
|
|
299
|
-
n = Math.abs(n);
|
|
300
|
-
|
|
301
|
-
let s = '';
|
|
302
|
-
|
|
303
|
-
for (var i = 0; i < fraction.length; i++) {
|
|
304
|
-
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
305
|
-
}
|
|
306
|
-
s = s || '整';
|
|
307
|
-
n = Math.floor(n);
|
|
308
|
-
|
|
309
|
-
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
310
|
-
let p = '';
|
|
311
|
-
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
312
|
-
p = digit[n % 10] + unit[1][j] + p;
|
|
313
|
-
n = Math.floor(n / 10);
|
|
314
|
-
}
|
|
315
|
-
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
316
|
-
}
|
|
317
|
-
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
318
|
-
},
|
|
319
|
-
async commit() {
|
|
320
|
-
// 检测合同编号是否被使用&&更新合同编号
|
|
321
|
-
if(this.check()&&this.updateContractNumber()){
|
|
322
|
-
// 添加到合同表
|
|
323
|
-
let http = new HttpResetClass()
|
|
324
|
-
let data ={
|
|
325
|
-
tablename:'t_contract',
|
|
326
|
-
parameters:this.model
|
|
327
|
-
}
|
|
328
|
-
delete data.parameters.id
|
|
329
|
-
data.parameters.processid = this.selectdata.f_process_id
|
|
330
|
-
data.parameters.f_pay_type = this.model.f_pay_type
|
|
331
|
-
data.parameters.f_contract_type = '主合同'
|
|
332
|
-
data.parameters.f_capital = this.smalltoBIG(this.model.f_contract_money)
|
|
333
|
-
data.parameters.applyid = this.selectdata.f_apply_num
|
|
334
|
-
data.parameters.t_remarks = this.model.f_contract_remarks
|
|
335
|
-
data.parameters.f_operator = this.$login.f.name
|
|
336
|
-
data.parameters.f_department = this.$login.f.f_parentname
|
|
337
|
-
let res = await http.load('POST','rs/logic/saveentity', {data:data})
|
|
338
|
-
if(res.data.status != 200){
|
|
339
|
-
return
|
|
340
|
-
}
|
|
341
|
-
let getGen = gen(this, this.model)
|
|
342
|
-
co(getGen)
|
|
343
|
-
}else{
|
|
344
|
-
this.$showMessage("在此期间合同编号被使用,请刷新网页重新录入")
|
|
345
|
-
return
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
},
|
|
349
|
-
reset() {
|
|
350
|
-
this.$dispatch('close')
|
|
351
|
-
this.$dispatch('selfsearch')
|
|
352
|
-
}
|
|
353
|
-
},
|
|
354
|
-
watch: {
|
|
355
|
-
'selectdata'() {
|
|
356
|
-
this.$nextTick(() => {
|
|
357
|
-
this.model = Object.assign({}, this.model, this.selectdata)
|
|
358
|
-
this.model.f_usegasren = this.selectdata.f_user_name
|
|
359
|
-
this.model.f_usegasren_phone = this.selectdata.f_phone
|
|
360
|
-
this.model.f_usegasren_address = this.selectdata.f_address
|
|
361
|
-
this.model.f_givegasfund = 'GD-120天然气'
|
|
362
|
-
this.model.f_contract_date = this.$login.toStandardDateString()
|
|
363
|
-
this.model.f_contract_department = this.$login.f.f_parentname
|
|
364
|
-
this.model.f_contract_operator = this.$login.f.name
|
|
365
|
-
})
|
|
366
|
-
}
|
|
367
|
-
},
|
|
368
|
-
computed: {
|
|
369
|
-
totalcost() {
|
|
370
|
-
this.model.f_total_cost = Number(this.model.f_construction_cost) + Number(this.model.f_material_cost) +
|
|
371
|
-
Number(this.model.f_labor_cost) + Number(this.model.f_change_pipeline_cost) + Number(this.model.f_sbaz_cost) - Number(this.model.f_jmhj_cost)
|
|
372
|
-
return this.model.f_total_cost
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="auto select-overspread">
|
|
3
|
+
<div class="panel panel-info">
|
|
4
|
+
<div class="panel-heading">
|
|
5
|
+
<h3 class="panel-title">项目报价并录入合同价格</h3>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="panel-body">
|
|
8
|
+
<validator name="v">
|
|
9
|
+
<form class="form-horizontal">
|
|
10
|
+
<div class="col-sm-11 form-group">
|
|
11
|
+
<div class="form-group col-sm-4 form-input-group" :class="[$v.f_contract_number.required ? 'has-error': '']">
|
|
12
|
+
<label class="control-label col-sm-6">合同编号:</label>
|
|
13
|
+
<div class="col-sm-6">
|
|
14
|
+
<input type="text" class="form-control" v-model="model.f_contract_number"
|
|
15
|
+
v-validate:f_contract_number='{required: true }' readonly/>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="form-group col-sm-4 form-input-group">
|
|
19
|
+
<label class="control-label col-sm-4">合同签订日期:</label>
|
|
20
|
+
<div class="col-sm-6">
|
|
21
|
+
<datepicker width="600.76px;"
|
|
22
|
+
:value.sync="model.f_contract_time"
|
|
23
|
+
:format="'yyyy-MM-dd'"
|
|
24
|
+
v-model="model.f_contract_time" readonly="readonly"
|
|
25
|
+
:show-reset-button="reset">
|
|
26
|
+
</datepicker>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="form-group col-sm-4 form-input-group" :class="[$v.f_salesman.required ? 'has-error': '']">
|
|
30
|
+
<label class="control-label col-sm-6">合同业务办理人:</label>
|
|
31
|
+
<div class="col-sm-6">
|
|
32
|
+
<input type="text" class="form-control" v-model="model.f_salesman"
|
|
33
|
+
v-validate:f_salesman='{required: true }'/>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="col-sm-11 form-group">
|
|
38
|
+
<div class="form-group col-sm-4 form-input-group" :class="[$v.f_contract_money.required ? 'has-error': '']">
|
|
39
|
+
<label class="control-label col-sm-3">合同金额:</label>
|
|
40
|
+
<div class="col-sm-8">
|
|
41
|
+
<input type="text" class="form-control" v-model="model.f_contract_money"
|
|
42
|
+
v-validate:f_gtren_unit='{required: true }'/>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="form-group col-sm-4 form-input-group">
|
|
46
|
+
<label class="control-label">合同性质:</label>
|
|
47
|
+
<div class="col-sm-5">
|
|
48
|
+
<v-select :is-all-line="true" :value.sync="model.f_contract_nature" v-model="model.f_contract_nature" v-ref:contract_type
|
|
49
|
+
:options='fcontracttype'
|
|
50
|
+
placeholder='请选择' close-on-select></v-select>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="form-group col-sm-4 form-input-group">
|
|
54
|
+
<label class="control-label">缴费类型:</label>
|
|
55
|
+
<div class="col-sm-5">
|
|
56
|
+
<v-select :is-all-line="true" :value.sync="model.f_pay_type" v-model="model.f_pay_type" v-ref:contract_type
|
|
57
|
+
:options='fcontract'
|
|
58
|
+
placeholder='请选择' close-on-select></v-select>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="form-group col-sm-11 form-input-group">
|
|
63
|
+
<label class="col-sm-2" for="f_survey_remarks">合同签订备注:</label>
|
|
64
|
+
<div class="col-sm-10" id="f_survey_remarks">
|
|
65
|
+
<textarea class="form-control" v-model="model.f_contract_remarks" rows="3"></textarea>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="col-sm-11 form-group">
|
|
69
|
+
<div class="form-group col-sm-6">
|
|
70
|
+
<label class=" col-sm-4 control-label" for="f_filiale">分公司:</label>
|
|
71
|
+
<div class="col-sm-5" id="f_filiale">
|
|
72
|
+
<input class="form-control" type="text" v-model="model.f_filiale" disabled>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="col-sm-6 form-group">
|
|
76
|
+
<label class="control-label col-sm-6">操作日期:</label>
|
|
77
|
+
<div class="col-sm-5">
|
|
78
|
+
<input type="text" class="form-control" disabled v-model="model.f_contract_date"/>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="col-sm-11 form-group">
|
|
83
|
+
<div class="col-sm-6 form-group">
|
|
84
|
+
<label class="control-label col-sm-4">部门:</label>
|
|
85
|
+
<div class="col-sm-5">
|
|
86
|
+
<input type="text" class="form-control" disabled v-model="model.f_contract_department"/>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
<div class="col-sm-6 form-group">
|
|
90
|
+
<label class="control-label col-sm-6">操作人:</label>
|
|
91
|
+
<div class="col-sm-5">
|
|
92
|
+
<input type="text" class="form-control" disabled v-model="model.f_contract_operator"/>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</form>
|
|
97
|
+
</validator>
|
|
98
|
+
<div class="from-group col-sm-12">
|
|
99
|
+
<center>
|
|
100
|
+
<button type="button" @click="confirm()" class="btn btn-primary" style="width:80px; margin-left:50px;">
|
|
101
|
+
保存
|
|
102
|
+
</button>
|
|
103
|
+
<button type="button" @click="commit()" class="btn btn-primary" style="width:80px; margin-left:50px;">
|
|
104
|
+
提交
|
|
105
|
+
</button>
|
|
106
|
+
<button v-if="selectdata.defname==='项目报价并录入合同价格'&&selectdata.actdefid === '6'" type="button" @click="again()"
|
|
107
|
+
class="btn btn-warning" style="width:80px; margin-left:50px;">
|
|
108
|
+
重设
|
|
109
|
+
</button>
|
|
110
|
+
<button type="button" @click="back()" class="btn btn-warning" style="width:80px; margin-left:50px;">
|
|
111
|
+
退回
|
|
112
|
+
</button>
|
|
113
|
+
</center>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</template>
|
|
119
|
+
<script>
|
|
120
|
+
import co from 'co'
|
|
121
|
+
import {HttpResetClass} from 'vue-client'
|
|
122
|
+
import * as Util from '../../../Util'
|
|
123
|
+
|
|
124
|
+
let gen = function* (self, val) {
|
|
125
|
+
val.f_sub_state = ''
|
|
126
|
+
val.f_temp_date = self.$login.toStandardTimeString()
|
|
127
|
+
// val.f_gasproperties = val.f_gasproperties[0] ? val.f_gasproperties[0] : ''
|
|
128
|
+
// val.f_stair_price = val.f_stair_price[0] ? val.f_stair_price[0] : ''
|
|
129
|
+
val.f_contract_nature =val.f_contract_nature===null?'':typeof val.f_contract_nature==='object'?(val.f_contract_nature[0]?val.f_contract_nature[0]:''):val.f_contract_nature?val.f_contract_nature:''
|
|
130
|
+
let data ={
|
|
131
|
+
tablename:'t_apply',
|
|
132
|
+
parameters:val
|
|
133
|
+
}
|
|
134
|
+
yield self.$resetpost('rs/logic/save', {data:data})
|
|
135
|
+
if ((self.selectdata.defname === '合同签订' && self.selectdata.actdefid === '8') || (self.selectdata.defname === '材料申购' && self.selectdata.actdefid === '12')) {
|
|
136
|
+
let data = {
|
|
137
|
+
model: {
|
|
138
|
+
f_processid: self.selectdata.f_process_id,
|
|
139
|
+
},
|
|
140
|
+
loginUser: {
|
|
141
|
+
id: self.$login.f.id,
|
|
142
|
+
name: self.$login.f.name,
|
|
143
|
+
ename: self.$login.f.ename
|
|
144
|
+
},
|
|
145
|
+
employeetemplate: self.selectdata.f_survey_name,
|
|
146
|
+
subdep: '提交'
|
|
147
|
+
}
|
|
148
|
+
self.$resetpost(`rs/logic/grantnext`,
|
|
149
|
+
{data: data})
|
|
150
|
+
.then(() => {
|
|
151
|
+
self.reset()
|
|
152
|
+
})
|
|
153
|
+
} else {
|
|
154
|
+
let data = {
|
|
155
|
+
model: {
|
|
156
|
+
f_processid: self.selectdata.f_process_id,
|
|
157
|
+
},
|
|
158
|
+
loginUser: {
|
|
159
|
+
id: self.$login.f.id,
|
|
160
|
+
name: self.$login.f.name,
|
|
161
|
+
ename: self.$login.f.ename
|
|
162
|
+
},
|
|
163
|
+
subdep: '提交'
|
|
164
|
+
}
|
|
165
|
+
self.$resetpost(`rs/logic/contractnext`,
|
|
166
|
+
{data: data})
|
|
167
|
+
.then(() => {
|
|
168
|
+
self.reset()
|
|
169
|
+
})
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
}
|
|
173
|
+
export default {
|
|
174
|
+
title: '合同签订',
|
|
175
|
+
data() {
|
|
176
|
+
return {
|
|
177
|
+
contractid: null, // 单值表合同编号
|
|
178
|
+
fgasproperties: this.$appdata.getParam('用气性质'),
|
|
179
|
+
fcontract: this.$appdata.getParam('缴费类型'),
|
|
180
|
+
fcontracttype: this.$appdata.getParam('合同性质'),
|
|
181
|
+
model: {
|
|
182
|
+
actid: ''
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
props: ['selectdata'],
|
|
187
|
+
ready() {
|
|
188
|
+
// this.selectdata.f_gasproperties = this.selectdata.f_gasproperties ? [this.selectdata.f_gasproperties] : this.model.f_gasproperties
|
|
189
|
+
// this.selectdata.f_stair_price = this.selectdata.f_stair_price ? [this.selectdata.f_stair_price] : this.model.f_stair_price
|
|
190
|
+
// 生成合同编号
|
|
191
|
+
this.makeNumner()
|
|
192
|
+
this.$nextTick(() => {
|
|
193
|
+
this.model = Object.assign({}, this.model, this.selectdata)
|
|
194
|
+
this.model.f_usegasren = this.selectdata.f_user_name
|
|
195
|
+
this.model.f_usegasren_phone = this.selectdata.f_phone
|
|
196
|
+
this.model.f_usegasren_address = this.selectdata.f_address
|
|
197
|
+
this.model.f_givegasfund = 'GD-120天然气'
|
|
198
|
+
this.model.f_contract_date = this.$login.toStandardDateString()
|
|
199
|
+
this.model.f_contract_department = this.$login.f.f_parentname
|
|
200
|
+
this.model.f_contract_operator = this.$login.f.name
|
|
201
|
+
})
|
|
202
|
+
},
|
|
203
|
+
methods: {
|
|
204
|
+
// 更新编号
|
|
205
|
+
async updateContractNumber(){
|
|
206
|
+
let http = new HttpResetClass()
|
|
207
|
+
this.contractid.value = Number(this.contractid.value) + 1
|
|
208
|
+
http.load('POST', 'rs/logic/updatesinglevalue', {data: this.contractid}, {resolveMsg: null, rejectMsg: "合同编号保存失败"})
|
|
209
|
+
},
|
|
210
|
+
// 检测并发
|
|
211
|
+
async check(){
|
|
212
|
+
let http = new HttpResetClass()
|
|
213
|
+
let data = {
|
|
214
|
+
tablename: 't_singlevalue',
|
|
215
|
+
condition: `name = '报建合同编号'`
|
|
216
|
+
}
|
|
217
|
+
let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取合同编号失败'})
|
|
218
|
+
return res.data[0].value === this.contractid.value
|
|
219
|
+
},
|
|
220
|
+
// 生成合同编号
|
|
221
|
+
async makeNumner(){
|
|
222
|
+
let http = new HttpResetClass()
|
|
223
|
+
let data = {
|
|
224
|
+
tablename: 't_singlevalue',
|
|
225
|
+
condition: `name = '报建合同编号'`
|
|
226
|
+
}
|
|
227
|
+
let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取合同编号失败'})
|
|
228
|
+
this.contractid = res.data[0]
|
|
229
|
+
this.handle()
|
|
230
|
+
this.model.f_contract_number = Util.toStandardDateString2()+this.contractid.value
|
|
231
|
+
},
|
|
232
|
+
// 处理数字,例如: 1 转换成 001
|
|
233
|
+
handle() {
|
|
234
|
+
while (this.contractid.value.length < 4) {
|
|
235
|
+
this.contractid.value = '0' + this.contractid.value
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
again() {
|
|
239
|
+
this.model.f_sub_state = '重设'
|
|
240
|
+
this.confirm()
|
|
241
|
+
let data = {
|
|
242
|
+
model: {
|
|
243
|
+
f_processid: this.selectdata.f_process_id,
|
|
244
|
+
},
|
|
245
|
+
loginUser: {
|
|
246
|
+
id: this.$login.f.id,
|
|
247
|
+
name: this.$login.f.name,
|
|
248
|
+
ename: this.$login.f.ename
|
|
249
|
+
},
|
|
250
|
+
subdep: '重设'
|
|
251
|
+
}
|
|
252
|
+
this.$resetpost(`rs/logic/contractnext`,
|
|
253
|
+
{data: data})
|
|
254
|
+
.then(() => {
|
|
255
|
+
this.reset()
|
|
256
|
+
})
|
|
257
|
+
},
|
|
258
|
+
back() {
|
|
259
|
+
this.model.f_sub_state = '退回'
|
|
260
|
+
this.confirm()
|
|
261
|
+
let data = {
|
|
262
|
+
model: {
|
|
263
|
+
f_processid: this.selectdata.f_process_id,
|
|
264
|
+
},
|
|
265
|
+
loginUser: {
|
|
266
|
+
id: this.$login.f.id,
|
|
267
|
+
name: this.$login.f.name,
|
|
268
|
+
ename: this.$login.f.ename
|
|
269
|
+
},
|
|
270
|
+
subdep: '退回'
|
|
271
|
+
}
|
|
272
|
+
this.$resetpost(`rs/logic/contractnext`,
|
|
273
|
+
{data: data})
|
|
274
|
+
.then(() => {
|
|
275
|
+
this.reset()
|
|
276
|
+
})
|
|
277
|
+
},
|
|
278
|
+
async confirm() {
|
|
279
|
+
this.model.f_contract_nature = typeof this.model.f_contract_nature==='object'?this.model.f_contract_nature[0]:this.model.f_contract_nature?this.model.f_contract_nature:''
|
|
280
|
+
// this.model.f_gasproperties = this.model.f_gasproperties[0] ? this.model.f_gasproperties[0] : ''
|
|
281
|
+
// this.model.f_stair_price = this.model.f_stair_price[0] ? this.model.f_stair_price[0] : ''
|
|
282
|
+
this.model.f_total_cost = this.totalcost
|
|
283
|
+
let http = new HttpResetClass()
|
|
284
|
+
let data ={
|
|
285
|
+
tablename:'t_apply',
|
|
286
|
+
parameters:this.model
|
|
287
|
+
}
|
|
288
|
+
await http.load('POST', 'rs/logic/save', {data:data})
|
|
289
|
+
.then(() => {
|
|
290
|
+
this.reset()
|
|
291
|
+
})
|
|
292
|
+
},
|
|
293
|
+
// 小写转换大写
|
|
294
|
+
smalltoBIG(n) {
|
|
295
|
+
let fraction = ['角', '分'];
|
|
296
|
+
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
297
|
+
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
298
|
+
let head = n < 0 ? '欠' : '';
|
|
299
|
+
n = Math.abs(n);
|
|
300
|
+
|
|
301
|
+
let s = '';
|
|
302
|
+
|
|
303
|
+
for (var i = 0; i < fraction.length; i++) {
|
|
304
|
+
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
305
|
+
}
|
|
306
|
+
s = s || '整';
|
|
307
|
+
n = Math.floor(n);
|
|
308
|
+
|
|
309
|
+
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
310
|
+
let p = '';
|
|
311
|
+
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
312
|
+
p = digit[n % 10] + unit[1][j] + p;
|
|
313
|
+
n = Math.floor(n / 10);
|
|
314
|
+
}
|
|
315
|
+
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
316
|
+
}
|
|
317
|
+
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
318
|
+
},
|
|
319
|
+
async commit() {
|
|
320
|
+
// 检测合同编号是否被使用&&更新合同编号
|
|
321
|
+
if(this.check()&&this.updateContractNumber()){
|
|
322
|
+
// 添加到合同表
|
|
323
|
+
let http = new HttpResetClass()
|
|
324
|
+
let data ={
|
|
325
|
+
tablename:'t_contract',
|
|
326
|
+
parameters:this.model
|
|
327
|
+
}
|
|
328
|
+
delete data.parameters.id
|
|
329
|
+
data.parameters.processid = this.selectdata.f_process_id
|
|
330
|
+
data.parameters.f_pay_type = this.model.f_pay_type
|
|
331
|
+
data.parameters.f_contract_type = '主合同'
|
|
332
|
+
data.parameters.f_capital = this.smalltoBIG(this.model.f_contract_money)
|
|
333
|
+
data.parameters.applyid = this.selectdata.f_apply_num
|
|
334
|
+
data.parameters.t_remarks = this.model.f_contract_remarks
|
|
335
|
+
data.parameters.f_operator = this.$login.f.name
|
|
336
|
+
data.parameters.f_department = this.$login.f.f_parentname
|
|
337
|
+
let res = await http.load('POST','rs/logic/saveentity', {data:data})
|
|
338
|
+
if(res.data.status != 200){
|
|
339
|
+
return
|
|
340
|
+
}
|
|
341
|
+
let getGen = gen(this, this.model)
|
|
342
|
+
co(getGen)
|
|
343
|
+
}else{
|
|
344
|
+
this.$showMessage("在此期间合同编号被使用,请刷新网页重新录入")
|
|
345
|
+
return
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
},
|
|
349
|
+
reset() {
|
|
350
|
+
this.$dispatch('close')
|
|
351
|
+
this.$dispatch('selfsearch')
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
watch: {
|
|
355
|
+
'selectdata'() {
|
|
356
|
+
this.$nextTick(() => {
|
|
357
|
+
this.model = Object.assign({}, this.model, this.selectdata)
|
|
358
|
+
this.model.f_usegasren = this.selectdata.f_user_name
|
|
359
|
+
this.model.f_usegasren_phone = this.selectdata.f_phone
|
|
360
|
+
this.model.f_usegasren_address = this.selectdata.f_address
|
|
361
|
+
this.model.f_givegasfund = 'GD-120天然气'
|
|
362
|
+
this.model.f_contract_date = this.$login.toStandardDateString()
|
|
363
|
+
this.model.f_contract_department = this.$login.f.f_parentname
|
|
364
|
+
this.model.f_contract_operator = this.$login.f.name
|
|
365
|
+
})
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
computed: {
|
|
369
|
+
totalcost() {
|
|
370
|
+
this.model.f_total_cost = Number(this.model.f_construction_cost) + Number(this.model.f_material_cost) +
|
|
371
|
+
Number(this.model.f_labor_cost) + Number(this.model.f_change_pipeline_cost) + Number(this.model.f_sbaz_cost) - Number(this.model.f_jmhj_cost)
|
|
372
|
+
return this.model.f_total_cost
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
</script>
|