apply-clients 3.5.5-6 → 3.5.5-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.
Files changed (63) hide show
  1. package/build/dev-server.js +9 -5
  2. package/package.json +1 -1
  3. package/src/App.vue +25 -25
  4. package/src/apply.js +141 -141
  5. package/src/components/android/AppTakePic.vue +182 -182
  6. package/src/components/product/Function/Service/FunctionServiceControl.vue +497 -497
  7. package/src/components/product/Material/MaterialDetailed.vue +268 -268
  8. package/src/components/product/MaterialsManage/MaterialsBase.vue +181 -181
  9. package/src/components/product/MaterialsManage/MaterialsManage.vue +60 -60
  10. package/src/components/product/Process/Processes/contractModel.vue +454 -458
  11. package/src/components/product/ServiceView.vue +1028 -1028
  12. package/src/components/product/Supervisory/SupervisoryList.vue +452 -452
  13. package/src/filiale/dingcheng/pc/SupervisoryList.vue +441 -441
  14. package/src/filiale/fugou/android/AppAddMaterialScience.vue +440 -440
  15. package/src/filiale/fugou/android/AppDevicesManagement.vue +519 -519
  16. package/src/filiale/fugou/android/AppInstallationDetails.vue +541 -541
  17. package/src/filiale/fugou/android/AppServiceControl.vue +1836 -1836
  18. package/src/filiale/fugou/android/printCharge.vue +162 -162
  19. package/src/filiale/fugou/android.js +16 -16
  20. package/src/filiale/fugou/pc/ExplorationSelect.vue +525 -525
  21. package/src/filiale/fugou/pc/ServiceControl.vue +1705 -1705
  22. package/src/filiale/fugou/pc/ServiceView.vue +941 -941
  23. package/src/filiale/fugou/pc/devicesManagement.vue +483 -483
  24. package/src/filiale/fugou/pc/printChargepc.vue +148 -148
  25. package/src/filiale/fugou/pc.js +16 -17
  26. package/src/filiale/gongyi/android/AppAddMaterialScience.vue +493 -493
  27. package/src/filiale/gongyi/android/AppDisclosurerecord.vue +214 -214
  28. package/src/filiale/gongyi/android/AppInstallationDetails.vue +500 -500
  29. package/src/filiale/gongyi/android/AppLegacyIssues.vue +309 -309
  30. package/src/filiale/gongyi/android/AppSign.vue +170 -170
  31. package/src/filiale/gongyi/android/AppSupplementalAgreement.vue +298 -298
  32. package/src/filiale/gongyi/android.js +18 -18
  33. package/src/filiale/gongyi/pc/ApplyUpload.vue +371 -371
  34. package/src/filiale/gongyi/pc/PcAddLogs.vue +221 -221
  35. package/src/filiale/gongyi/pc/PcDisclosurerecord.vue +218 -218
  36. package/src/filiale/gongyi/pc/PcLegacyIssues.vue +309 -309
  37. package/src/filiale/gongyi/pc/SupervisoryServiceControl.vue +894 -894
  38. package/src/filiale/gongyi/pc/SupervisoryServiceView.vue +1005 -1005
  39. package/src/filiale/gongyi/pc/addMaterialScience.vue +575 -575
  40. package/src/filiale/gongyi/pc/chargeManagement.vue +765 -765
  41. package/src/filiale/gongyi/pc/supplementalAgreement.vue +277 -277
  42. package/src/filiale/gongyi/pc.js +24 -24
  43. package/src/filiale/hongda/pc/SupervisoryList.vue +422 -422
  44. package/src/filiale/jingyang/pc/SupervisoryList.vue +459 -459
  45. package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -686
  46. package/src/filiale/qianneng/android.js +15 -15
  47. package/src/filiale/qianneng/pc/ApplyMaterialDetailed.vue +261 -261
  48. package/src/filiale/qianneng/pc/InstallFunction.vue +188 -188
  49. package/src/filiale/qianneng/pc.js +29 -29
  50. package/src/filiale/ruihua/pc/ServiceControl.vue +1966 -1966
  51. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +520 -520
  52. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +645 -645
  53. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1703 -1703
  54. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +547 -547
  55. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +2112 -2112
  56. package/src/filiale/yangchunboneng/pc/ServiceView.vue +1007 -1007
  57. package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +605 -605
  58. package/src/filiale/yangchunboneng/pc/SupervisoryListNew.vue +683 -683
  59. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +1053 -1053
  60. package/src/filiale/yangchunboneng/pc/devicesManagement.vue +574 -574
  61. package/src/main.js +3 -3
  62. package/~/chatbot/main.py +57 -0
  63. package/src/filiale/fugou/pc/SupervisoryServiceControl.vue +0 -881
@@ -1,458 +1,454 @@
1
- <template>
2
- <div style="margin-bottom: 20px" class="form-group select-overspread">
3
- <label class="control-label-justify control-label col-sm-3">签订合同</label>
4
- <div class="col-sm-10" >
5
- <button class="button_search button_spacing" type="button" style="width: max-content;position: absolute" @click="openSelect" :disabled="mark === 1">选择</button>
6
- </div>
7
- </div>
8
- <modal v-if="showselect" :show.sync="showselect" title="签订合同" v-ref:modal :large="true" :backdrop="false">
9
- <article slot="modal-header" class="modal-header" >
10
- <div>
11
- <criteria-paged :model="model" v-ref:cp :pager="false" v-if="selectList">
12
- <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy" style="height: 100%">
13
- <template partial='head'>
14
- <tr>
15
- <th style="white-space: nowrap;">序号</th>
16
- <th style="white-space: nowrap;">合同编号</th>
17
- <th style="white-space: nowrap;">合同名称</th>
18
- <th style="white-space: nowrap;">合同类型</th>
19
- <th style="white-space: nowrap;">合同状态</th>
20
- <th style="white-space: nowrap;">选择</th>
21
- </tr>
22
- </template>
23
- <template partial='body'>
24
- <tr >
25
- <td style="text-align: center;">
26
- <nobr><font>{{$index+1}}</font></nobr>
27
- </td>
28
- <td style="text-align: center;">
29
- <nobr><font>{{ row.f_contract_code}}</font></nobr>
30
- </td>
31
- <td style="text-align: center;">
32
- <nobr><font>{{ row.f_contract_name }}</font></nobr>
33
- </td>
34
- <td style="text-align: center;">
35
- <nobr><font>{{ row.f_contract_type }}</font></nobr>
36
- </td>
37
- <td style="text-align: center;">
38
- <nobr><font>{{ row.f_contract_state }}</font></nobr>
39
- </td>
40
- <td style="text-align: center;">
41
- <nobr><font>
42
- <button type="button" name="button" class="button_export" @click.prevent="$parent.$parent.$parent.$parent.select(row)">确认选择</button>
43
- </font></nobr>
44
- </td>
45
- </tr>
46
- </template>
47
- </data-grid>
48
- </criteria-paged>
49
- </div>
50
- <div>
51
- <div class="form-group col-sm-12" >
52
- <label class="col-sm-2 control-label">甲方:</label>
53
- <div class="col-sm-10">
54
- <input type="text"
55
- class="form-control input_view"
56
- style="width: 100%"
57
- v-model="contractInfo.f_lessor"
58
- :value.sync="contractInfo.f_lessor"
59
- />
60
- </div>
61
- </div>
62
- <div class="form-group col-sm-12" >
63
- <label class="col-sm-2 control-label">项目地点及名称:</label>
64
- <div class="col-sm-10">
65
- <input type="text"
66
- class="form-control input_view"
67
- style="width: 100%"
68
- v-model="contractInfo.f_project_address"
69
- :value.sync="contractInfo.f_project_address"
70
- />
71
- </div>
72
- </div>
73
- <div class="form-group col-sm-12" >
74
- <label class="col-sm-2 control-label">户数:</label>
75
- <div class="col-sm-10">
76
- <input type="text"
77
- class="form-control input_view"
78
- style="width: 100%"
79
- v-model="contractInfo.f_households"
80
- :value.sync="contractInfo.f_households"
81
- />
82
- </div>
83
- </div>
84
- <div class="form-group col-sm-12" >
85
- <label class="col-sm-2 control-label">金额:</label>
86
- <div class="col-sm-10">
87
- <input type="text"
88
- class="form-control input_view"
89
- style="width: 100%"
90
- placeholder="0.00"
91
- @keyup="handleInput"
92
- v-model="contractInfo.f_cost" />
93
- </div>
94
- </div>
95
- <div class="form-group col-sm-12">
96
- <label class="col-sm-2 control-label">金额大写:</label>
97
- <div class="col-sm-10">
98
- <input type="text"
99
- class="form-control input_view"
100
- style="width: 100%"
101
- :value="smalltoBIG(0)"
102
- readonly
103
- v-model.sync="contractInfo.f_amount_capital" />
104
- </div>
105
- </div>
106
- <div class="form-group col-sm-12" >
107
- <label class="col-sm-2 control-label">付款方式:</label>
108
- <div class="col-sm-10">
109
- <input-select
110
- placeholder='请选择' width="100%"
111
- v-model="contractInfo.f_payment_method"
112
- :value.sync="contractInfo.f_payment_method"
113
- :options='paymentMethod'
114
- class="select select_list"
115
- :value-single="true"
116
- close-on-select ></input-select>
117
- </div>
118
- </div>
119
- <div class="form-group col-sm-12">
120
- <label class="col-sm-2 control-label">工期:</label>
121
- <div class="col-sm-10">
122
- <input type="text"
123
- class="form-control input_view"
124
- style="width: 100%"
125
- placeholder="请输入"
126
- :value.sync="contractInfo.f_duration"
127
- v-model.sync="contractInfo.f_duration" />
128
- </div>
129
- </div>
130
- <div class="form-group col-sm-12">
131
- <label class="col-sm-2 control-label">指定人员:</label>
132
- <div class="col-sm-10">
133
- <input type="text"
134
- class="form-control input_view"
135
- style="width: 100%"
136
- placeholder="请输入"
137
- :value.sync="contractInfo.f_personnel"
138
- v-model.sync="contractInfo.f_personnel" />
139
- </div>
140
- </div>
141
- <div class="form-group col-sm-12">
142
- <label class="col-sm-2 control-label">联系电话:</label>
143
- <div class="col-sm-10">
144
- <input type="text"
145
- class="form-control input_view"
146
- style="width: 100%"
147
- placeholder="请输入"
148
- :value.sync="contractInfo.f_contact_phone"
149
- v-model.sync="contractInfo.f_contact_phone" />
150
- </div>
151
- </div>
152
- <div class="form-group col-sm-12">
153
- <label class="col-sm-2 control-label">甲方单位(盖章):</label>
154
- <div class="col-sm-10">
155
- <input type="text"
156
- class="form-control input_view"
157
- style="width: 100%"
158
- placeholder="请输入"
159
- :value.sync="contractInfo.f_unit"
160
- v-model.sync="contractInfo.f_unit" />
161
- </div>
162
- </div>
163
- <div class="form-group col-sm-12">
164
- <label class="col-sm-2 control-label">甲方法定代表人或授权代表:</label>
165
- <div class="col-sm-10">
166
- <input type="text"
167
- class="form-control input_view"
168
- style="width: 100%"
169
- placeholder="请输入"
170
- :value.sync="contractInfo.f_representative"
171
- v-model.sync="contractInfo.f_representative" />
172
- </div>
173
- </div>
174
- </div>
175
- </article>
176
- <footer slot="modal-footer" class="modal-footer">
177
- <button type="button" class="btn btn-primary" @click="save()">确认</button>
178
- <button type="button" class="btn btn-primary" @click="NoSelect()">取消</button>
179
- </footer>
180
- </modal>
181
- </template>
182
- <script>
183
- import {HttpResetClass} from "vue-client";
184
- import {isEmpty} from "../../../Util";
185
-
186
- export default {
187
- title: '合同签订',
188
- props: {
189
- selectdata: {
190
- type: Object
191
- },
192
- mark: {
193
- type: Number,
194
- default: 0
195
- }
196
- },
197
- data () {
198
- return {
199
- model:{
200
- rows:[]
201
- },
202
- showselect: false,
203
- selectList:false,
204
- Options:this.$appdata.getParam("合同模板"),
205
- credOptions:this.$appdata.getParam('证件类型'),
206
- templatename:'',
207
- contractInfo: {
208
- f_contract_id: '',
209
- f_contract_signature_id: null,
210
- f_contract_name: '',
211
- f_contract_date: '',
212
- f_contract_type: "",
213
- f_file_id: "",
214
- f_contract_arguments: [],
215
- f_signature_location: "",
216
- f_state: "",
217
- f_contract_url: null,
218
- f_template_url: "",
219
- f_signature_url: null,
220
- //甲方
221
- f_lessor:"",
222
- //项目地点及名称
223
- f_project_address: "",
224
- //户数
225
- f_households: "",
226
- //费用
227
- f_cost: "",
228
- //金额大写
229
- f_amount_capital: "",
230
- //付款方式
231
- f_payment_method: "",
232
- //工期
233
- f_duration: "",
234
- //指定人员
235
- f_personnel: "",
236
- //联系电话
237
- f_contact_phone: "",
238
- //甲方单位(盖章)
239
- f_unit: "",
240
- //甲方法定代表人或授权代表
241
- f_representative: "",
242
- },
243
- userRecord: {
244
- f_userinfo_id: this.selectdata.f_userinfo_id?this.selectdata.f_userinfo_id:this.selectdata.f_process_id,
245
- f_filialeid:this.$login.f.orgid,
246
- f_userinfo_code: this.selectdata.f_userinfo_code?this.selectdata.f_userinfo_code:this.selectdata.f_process_id,
247
- f_user_name:this.selectdata.f_user_name?this.selectdata.f_user_name:"",
248
- f_credentials: this.selectdata.f_credentials?this.selectdata.f_credentials:"",
249
- f_idnumber: this.selectdata.f_idnumber?this.selectdata.f_idnumber:"",
250
- f_address: this.selectdata.f_address?this.selectdata.f_address:"",
251
- f_user_phone:this.selectdata.f_phone?this.selectdata.f_phone:"",
252
- },
253
- loginInfo: {
254
- f_operatorid: this.$login.f.id,
255
- f_operator: this.$login.f.name,
256
- f_orgid: this.$login.f.orgid
257
- }
258
- }
259
- },
260
- ready () {
261
- this.getContractTemplate()
262
- },
263
- methods: {
264
- select(row){
265
- this.$showMessage(`是否选择当前合同`, ['confirm']).then((res) => {
266
- if (res === 'confirm') {
267
- this.contractInfo.f_contract_id=row.f_contract_id
268
- this.contractInfo.f_contract_signature_id=row.f_contract_signature_id
269
- this.contractInfo.f_contract_name=row.f_contract_name
270
- this.contractInfo.f_contract_date=row.f_contract_date
271
- this.contractInfo.f_contract_type=row.f_contract_type
272
- this.contractInfo.f_file_id=row.f_file_id
273
- this.contractInfo.f_contract_arguments=row.f_contract_arguments
274
- this.contractInfo.f_signature_location=row.f_signature_location
275
- this.contractInfo.f_state=row.f_state
276
- this.contractInfo.f_contract_url=row.f_contract_url
277
- this.contractInfo.f_template_url=row.f_template_url
278
- this.contractInfo. f_signature_url=row.f_signature_url
279
- this.selectList=false
280
- }
281
- })
282
- },
283
- async getContractTemplate(){
284
- let data = {
285
- tablename: 't_contract_template',
286
- condition: `f_contract_state='有效' and f_orgid='${this.$login.f.orgid}'`
287
- }
288
- let http = new HttpResetClass()
289
- await http.load('POST', 'rs/sql/apply_singleTable', {data: data}, {resolveMsg: null, rejectMsg: '合同信息查询失败!!!'}).then(res => {
290
- if (res.data.length> 0) {
291
- this.model.rows = res.data
292
- }
293
- })
294
- },
295
- handleInput(e) {
296
- // 通过正则过滤小数点后两位
297
- e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
298
- this.contractInfo.f_amount_capital = this.smalltoBIG(e.target.value)
299
- },
300
- // 金额转大写
301
- smalltoBIG(n) {
302
- let fraction = ['角', '分'];
303
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
304
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
305
- let head = n < 0 ? '欠' : '';
306
- n = Math.abs(n);
307
- let s = '';
308
- for (var i = 0; i < fraction.length; i++) {
309
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
310
- }
311
- s = s || '整';
312
- n = Math.floor(n);
313
- for (var i = 0; i < unit[0].length && n > 0; i++) {
314
- let p = '';
315
- for (var j = 0; j < unit[1].length && n > 0; j++) {
316
- p = digit[n % 10] + unit[1][j] + p;
317
- n = Math.floor(n / 10);
318
- }
319
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
320
- }
321
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
322
- },
323
- async save() {
324
- if(isEmpty(this.contractInfo.f_contract_name)){
325
- this.$showMessage(`请选择需要签订的合同`)
326
- return
327
- }else{
328
- this.$showMessage(`是否确认生成此合同`, ['confirm']).then(async (res) => {
329
- if (res === 'confirm') {
330
- let http = new HttpResetClass()
331
- let data = {
332
- contractInfo:this.contractInfo,
333
- userRecord:this.userRecord,
334
- loginInfo:this.loginInfo
335
- }
336
- await http.load('POST', 'api/af-revenue/logic/generateContract', {data: data}, {
337
- resolveMsg: null,
338
- rejectMsg: '合同信息查询失败!!!'
339
- }).then(async res => {
340
- //保存合同信息
341
- if (res.data.code == 200) {
342
- //保存到t_files表
343
- let param={
344
- f_blobid:this.selectdata.f_process_id,
345
- fusetype:"报装合同",
346
- f_filename:res.data.f_contract_name,
347
- f_uploaddate:res.data.f_create_date,
348
- f_downloadpath:res.data.f_signature_url,
349
- f_realpath:res.data.f_signature_path
350
- }
351
- await this.$resetpost('rs/entity/t_files', param).then(res => {
352
- this.$showMessage(`合同生成成功!!!`),
353
- this.selectList=false
354
- this.showselect = false
355
- })
356
- } else {
357
- this.selectList=false
358
- this.showselect = false
359
- this.$showMessage(`合同生成失败!!!,原因为${res.data.msg}`)
360
- }
361
- })
362
- }
363
- })
364
- }
365
- },
366
- clear () {
367
- },
368
- openSelect () {
369
- this.selectList=true
370
- this.showselect = true
371
- },
372
- NoSelect () {
373
- //清除数据
374
- this. contractInfo= {
375
- f_contract_id: '',
376
- f_contract_signature_id: null,
377
- f_contract_name: '',
378
- f_contract_date: '',
379
- f_contract_type: "",
380
- f_file_id: "",
381
- f_contract_arguments: [],
382
- f_signature_location: "",
383
- f_state: "",
384
- f_contract_url: null,
385
- f_template_url: "",
386
- f_signature_url: null,
387
- //甲方
388
- f_lessor:"",
389
- //项目地点及名称
390
- f_project_address: "",
391
- //户数
392
- f_households: "",
393
- //费用
394
- f_cost: "",
395
- //金额大写
396
- f_amount_capital: "",
397
- //付款方式
398
- f_payment_method: "",
399
- //工期
400
- f_duration: "",
401
- //指定人员
402
- f_personnel: "",
403
- //联系电话
404
- f_contact_phone: "",
405
- //甲方单位(盖章)
406
- f_unit: "",
407
- //甲方法定代表人或授权代表
408
- f_representative: "",
409
- },
410
- this.selectList=false
411
- this.showselect = false
412
- }
413
- },
414
- events: {
415
- },
416
- computed: {
417
- paymentMethod() {
418
- return this.$appdata.getParam("付款方式")
419
- }
420
- },
421
- watch: {
422
- }
423
- }
424
- </script>
425
- <style scoped>
426
- .control-label-justify {
427
- display: inline-block;
428
- vertical-align: top;
429
- width: 110px;
430
- text-align: justify;
431
- font-family: PingFang-SC-Bold;
432
- }
433
-
434
- .control-label-justify::after {
435
- content: "";
436
- display: inline-block;
437
- width: 100%;
438
- overflow: hidden;
439
- height: 0;
440
- }
441
- .input_view{
442
- padding: 8px;
443
- background-color: #ffffff;
444
- border-radius: 2px;
445
- border: solid 1px #c7c7c7!important;
446
- color: #333333!important;
447
- font-size: 15px!important;
448
- }
449
-
450
- .input_view[readonly]{
451
- border: 1px solid #DDD!important;
452
- color:#ACA899!important;
453
- }
454
- .input_view:disabled{
455
- border: 1px solid #DDD!important;
456
- color:#ACA899!important;
457
- }
458
- </style>
1
+ <template>
2
+ <div style="margin-bottom: 20px" class="form-group select-overspread">
3
+ <label class="control-label-justify control-label col-sm-3">签订合同</label>
4
+ <div class="col-sm-10" >
5
+ <button class="button_search button_spacing" type="button" style="width: max-content;position: absolute" @click="openSelect" :disabled="mark === 1">选择</button>
6
+ </div>
7
+ </div>
8
+ <modal v-if="showselect" :show.sync="showselect" title="签订合同" v-ref:modal :large="true" :backdrop="false">
9
+ <article slot="modal-header" class="modal-header" >
10
+ <div>
11
+ <criteria-paged :model="model" v-ref:cp :pager="false" v-if="selectList">
12
+ <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy" style="height: 100%">
13
+ <template partial='head'>
14
+ <tr>
15
+ <th style="white-space: nowrap;">序号</th>
16
+ <th style="white-space: nowrap;">合同编号</th>
17
+ <th style="white-space: nowrap;">合同名称</th>
18
+ <th style="white-space: nowrap;">合同类型</th>
19
+ <th style="white-space: nowrap;">合同状态</th>
20
+ <th style="white-space: nowrap;">选择</th>
21
+ </tr>
22
+ </template>
23
+ <template partial='body'>
24
+ <tr >
25
+ <td style="text-align: center;">
26
+ <nobr><font>{{$index+1}}</font></nobr>
27
+ </td>
28
+ <td style="text-align: center;">
29
+ <nobr><font>{{ row.f_contract_code}}</font></nobr>
30
+ </td>
31
+ <td style="text-align: center;">
32
+ <nobr><font>{{ row.f_contract_name }}</font></nobr>
33
+ </td>
34
+ <td style="text-align: center;">
35
+ <nobr><font>{{ row.f_contract_type }}</font></nobr>
36
+ </td>
37
+ <td style="text-align: center;">
38
+ <nobr><font>{{ row.f_contract_state }}</font></nobr>
39
+ </td>
40
+ <td style="text-align: center;">
41
+ <nobr><font>
42
+ <button type="button" name="button" class="button_export" @click.prevent="$parent.$parent.$parent.$parent.select(row)">确认选择</button>
43
+ </font></nobr>
44
+ </td>
45
+ </tr>
46
+ </template>
47
+ </data-grid>
48
+ </criteria-paged>
49
+ </div>
50
+ <div>
51
+ <div class="form-group col-sm-12" >
52
+ <label class="col-sm-2 control-label">甲方:</label>
53
+ <div class="col-sm-10">
54
+ <input type="text"
55
+ class="form-control input_view"
56
+ style="width: 100%"
57
+ v-model="userRecord.f_lessor"
58
+ :value.sync="userRecord.f_lessor"
59
+ />
60
+ </div>
61
+ </div>
62
+ <div class="form-group col-sm-12" >
63
+ <label class="col-sm-2 control-label">项目地点及名称:</label>
64
+ <div class="col-sm-10">
65
+ <input type="text"
66
+ class="form-control input_view"
67
+ style="width: 100%"
68
+ v-model="userRecord.f_project_address"
69
+ :value.sync="userRecord.f_project_address"
70
+ />
71
+ </div>
72
+ </div>
73
+ <div class="form-group col-sm-12" >
74
+ <label class="col-sm-2 control-label">户数:</label>
75
+ <div class="col-sm-10">
76
+ <input type="text"
77
+ class="form-control input_view"
78
+ style="width: 100%"
79
+ v-model="userRecord.f_households"
80
+ :value.sync="userRecord.f_households"
81
+ />
82
+ </div>
83
+ </div>
84
+ <div class="form-group col-sm-12" >
85
+ <label class="col-sm-2 control-label">金额:</label>
86
+ <div class="col-sm-10">
87
+ <input type="text"
88
+ class="form-control input_view"
89
+ style="width: 100%"
90
+ placeholder="0.00"
91
+ @keyup="handleInput"
92
+ v-model="userRecord.f_cost" />
93
+ </div>
94
+ </div>
95
+ <div class="form-group col-sm-12">
96
+ <label class="col-sm-2 control-label">金额大写:</label>
97
+ <div class="col-sm-10">
98
+ <input type="text"
99
+ class="form-control input_view"
100
+ style="width: 100%"
101
+ :value="smalltoBIG(0)"
102
+ readonly
103
+ v-model.sync="userRecord.f_amount_capital" />
104
+ </div>
105
+ </div>
106
+ <div class="form-group col-sm-12" >
107
+ <label class="col-sm-2 control-label">付款方式:</label>
108
+ <div class="col-sm-10">
109
+ <input-select
110
+ placeholder='请选择' width="100%"
111
+ v-model="userRecord.f_payment_method"
112
+ :value.sync="userRecord.f_payment_method"
113
+ :options='paymentMethod'
114
+ class="select select_list"
115
+ :value-single="true"
116
+ close-on-select ></input-select>
117
+ </div>
118
+ </div>
119
+ <div class="form-group col-sm-12">
120
+ <label class="col-sm-2 control-label">工期:</label>
121
+ <div class="col-sm-10">
122
+ <input type="text"
123
+ class="form-control input_view"
124
+ style="width: 100%"
125
+ placeholder="请输入"
126
+ :value.sync="userRecord.f_duration"
127
+ v-model.sync="userRecord.f_duration" />
128
+ </div>
129
+ </div>
130
+ <div class="form-group col-sm-12">
131
+ <label class="col-sm-2 control-label">指定人员:</label>
132
+ <div class="col-sm-10">
133
+ <input type="text"
134
+ class="form-control input_view"
135
+ style="width: 100%"
136
+ placeholder="请输入"
137
+ :value.sync="userRecord.f_personnel"
138
+ v-model.sync="userRecord.f_personnel" />
139
+ </div>
140
+ </div>
141
+ <div class="form-group col-sm-12">
142
+ <label class="col-sm-2 control-label">联系电话:</label>
143
+ <div class="col-sm-10">
144
+ <input type="text"
145
+ class="form-control input_view"
146
+ style="width: 100%"
147
+ placeholder="请输入"
148
+ :value.sync="userRecord.f_contact_phone"
149
+ v-model.sync="userRecord.f_contact_phone" />
150
+ </div>
151
+ </div>
152
+ <div class="form-group col-sm-12">
153
+ <label class="col-sm-2 control-label">甲方单位(盖章):</label>
154
+ <div class="col-sm-10">
155
+ <input type="text"
156
+ class="form-control input_view"
157
+ style="width: 100%"
158
+ placeholder="请输入"
159
+ :value.sync="userRecord.f_unit"
160
+ v-model.sync="userRecord.f_unit" />
161
+ </div>
162
+ </div>
163
+ <div class="form-group col-sm-12">
164
+ <label class="col-sm-2 control-label">甲方法定代表人或授权代表:</label>
165
+ <div class="col-sm-10">
166
+ <input type="text"
167
+ class="form-control input_view"
168
+ style="width: 100%"
169
+ placeholder="请输入"
170
+ :value.sync="userRecord.f_representative"
171
+ v-model.sync="userRecord.f_representative" />
172
+ </div>
173
+ </div>
174
+ </div>
175
+ </article>
176
+ <footer slot="modal-footer" class="modal-footer">
177
+ <button type="button" class="btn btn-primary" @click="save()">确认</button>
178
+ <button type="button" class="btn btn-primary" @click="NoSelect()">取消</button>
179
+ </footer>
180
+ </modal>
181
+ </template>
182
+ <script>
183
+ import {HttpResetClass} from "vue-client";
184
+ import {isEmpty} from "../../../Util";
185
+
186
+ export default {
187
+ title: '合同签订',
188
+ props: {
189
+ selectdata: {
190
+ type: Object
191
+ },
192
+ mark: {
193
+ type: Number,
194
+ default: 0
195
+ }
196
+ },
197
+ data () {
198
+ return {
199
+ model:{
200
+ rows:[]
201
+ },
202
+ showselect: false,
203
+ selectList:false,
204
+ Options:this.$appdata.getParam("合同模板"),
205
+ credOptions:this.$appdata.getParam('证件类型'),
206
+ templatename:'',
207
+ contractInfo: {
208
+ f_contract_id: '',
209
+ f_contract_signature_id: null,
210
+ f_contract_name: '',
211
+ f_contract_date: '',
212
+ f_contract_type: "",
213
+ f_file_id: "",
214
+ f_contract_arguments: [],
215
+ f_signature_location: "",
216
+ f_state: "",
217
+ f_contract_url: null,
218
+ f_template_url: "",
219
+ f_signature_url: null
220
+ },
221
+ userRecord: {
222
+ f_userinfo_id: this.selectdata.f_userinfo_id?this.selectdata.f_userinfo_id:this.selectdata.f_process_id,
223
+ f_filialeid:this.$login.f.orgid,
224
+ f_userinfo_code: this.selectdata.f_userinfo_code?this.selectdata.f_userinfo_code:this.selectdata.f_process_id,
225
+ f_user_name:this.selectdata.f_user_name?this.selectdata.f_user_name:"",
226
+ f_credentials: this.selectdata.f_credentials?this.selectdata.f_credentials:"",
227
+ f_idnumber: this.selectdata.f_idnumber?this.selectdata.f_idnumber:"",
228
+ f_address: this.selectdata.f_address?this.selectdata.f_address:"",
229
+ f_user_phone:this.selectdata.f_phone?this.selectdata.f_phone:"",
230
+ //甲方
231
+ f_lessor:"",
232
+ //项目地点及名称
233
+ f_project_address: "",
234
+ //户数
235
+ f_households: "",
236
+ //费用
237
+ f_cost: "",
238
+ //金额大写
239
+ f_amount_capital: "",
240
+ //付款方式
241
+ f_payment_method: "",
242
+ //工期
243
+ f_duration: "",
244
+ //指定人员
245
+ f_personnel: "",
246
+ //联系电话
247
+ f_contact_phone: "",
248
+ //甲方单位(盖章)
249
+ f_unit: "",
250
+ //甲方法定代表人或授权代表
251
+ f_representative: ""
252
+ },
253
+ loginInfo: {
254
+ f_operatorid: this.$login.f.id,
255
+ f_operator: this.$login.f.name,
256
+ f_orgid: this.$login.f.orgid
257
+ }
258
+ }
259
+ },
260
+ ready () {
261
+ this.getContractTemplate()
262
+ },
263
+ methods: {
264
+ select(row){
265
+ this.$showMessage(`是否选择当前合同`, ['confirm']).then((res) => {
266
+ if (res === 'confirm') {
267
+ this.contractInfo.f_contract_id=row.f_contract_id
268
+ this.contractInfo.f_contract_signature_id=row.f_contract_signature_id
269
+ this.contractInfo.f_contract_name=row.f_contract_name
270
+ this.contractInfo.f_contract_date=row.f_contract_date
271
+ this.contractInfo.f_contract_type=row.f_contract_type
272
+ this.contractInfo.f_file_id=row.f_file_id
273
+ this.contractInfo.f_contract_arguments=row.f_contract_arguments
274
+ this.contractInfo.f_signature_location=row.f_signature_location
275
+ this.contractInfo.f_state=row.f_state
276
+ this.contractInfo.f_contract_url=row.f_contract_url
277
+ this.contractInfo.f_template_url=row.f_template_url
278
+ this.contractInfo. f_signature_url=row.f_signature_url
279
+ this.selectList=false
280
+ }
281
+ })
282
+ },
283
+ async getContractTemplate(){
284
+ let data = {
285
+ tablename: 't_contract_template',
286
+ condition: `f_contract_state='有效' and f_orgid='${this.$login.f.orgid}'`
287
+ }
288
+ let http = new HttpResetClass()
289
+ await http.load('POST', 'rs/sql/apply_singleTable', {data: data}, {resolveMsg: null, rejectMsg: '合同信息查询失败!!!'}).then(res => {
290
+ if (res.data.length> 0) {
291
+ this.model.rows = res.data
292
+ }
293
+ })
294
+ },
295
+ handleInput(e) {
296
+ // 通过正则过滤小数点后两位
297
+ e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
298
+ this.contractInfo.f_amount_capital = this.smalltoBIG(e.target.value)
299
+ },
300
+ // 金额转大写
301
+ smalltoBIG(n) {
302
+ let fraction = ['角', '分'];
303
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
304
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
305
+ let head = n < 0 ? '欠' : '';
306
+ n = Math.abs(n);
307
+ let s = '';
308
+ for (var i = 0; i < fraction.length; i++) {
309
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
310
+ }
311
+ s = s || '整';
312
+ n = Math.floor(n);
313
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
314
+ let p = '';
315
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
316
+ p = digit[n % 10] + unit[1][j] + p;
317
+ n = Math.floor(n / 10);
318
+ }
319
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
320
+ }
321
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
322
+ },
323
+ async save() {
324
+ if(isEmpty(this.contractInfo.f_contract_name)){
325
+ this.$showMessage(`请选择需要签订的合同`)
326
+ return
327
+ }else{
328
+ this.$showMessage(`是否确认生成此合同`, ['confirm']).then(async (res) => {
329
+ if (res === 'confirm') {
330
+ let http = new HttpResetClass()
331
+ let data = {
332
+ contractInfo:this.contractInfo,
333
+ userRecord:this.userRecord,
334
+ loginInfo:this.loginInfo
335
+ }
336
+ await http.load('POST', 'api/af-revenue/logic/generateContract', {data: data}, {
337
+ resolveMsg: null,
338
+ rejectMsg: '合同信息查询失败!!!'
339
+ }).then(async res => {
340
+ //保存合同信息
341
+ if (res.data.code == 200) {
342
+ //保存到t_files表
343
+ let param={
344
+ f_blobid:this.selectdata.f_process_id,
345
+ fusetype:"报装合同",
346
+ f_filename:res.data.f_contract_name,
347
+ f_uploaddate:res.data.f_create_date,
348
+ f_downloadpath:res.data.f_signature_url,
349
+ f_realpath:res.data.f_signature_path
350
+ }
351
+ await this.$resetpost('rs/entity/t_files', param).then(res => {
352
+ this.$showMessage(`合同生成成功!!!`),
353
+ this.selectList=false
354
+ this.showselect = false
355
+ })
356
+ } else {
357
+ this.selectList=false
358
+ this.showselect = false
359
+ this.$showMessage(`合同生成失败!!!,原因为${res.data.msg}`)
360
+ }
361
+ })
362
+ }
363
+ })
364
+ }
365
+ },
366
+ clear () {
367
+ },
368
+ openSelect () {
369
+ this.selectList=true
370
+ this.showselect = true
371
+ },
372
+ NoSelect () {
373
+ //清除数据
374
+ this.userRecord={
375
+ f_userinfo_id: this.selectdata.f_userinfo_id?this.selectdata.f_userinfo_id:this.selectdata.f_process_id,
376
+ f_filialeid:this.$login.f.orgid,
377
+ f_userinfo_code: this.selectdata.f_userinfo_code?this.selectdata.f_userinfo_code:this.selectdata.f_process_id,
378
+ f_user_name:this.selectdata.f_user_name?this.selectdata.f_user_name:"",
379
+ f_credentials: this.selectdata.f_credentials?this.selectdata.f_credentials:"",
380
+ f_idnumber: this.selectdata.f_idnumber?this.selectdata.f_idnumber:"",
381
+ f_address: this.selectdata.f_address?this.selectdata.f_address:"",
382
+ f_user_phone:this.selectdata.f_phone?this.selectdata.f_phone:"",
383
+ //甲方
384
+ f_lessor:"",
385
+ //项目地点及名称
386
+ f_project_address: "",
387
+ //户数
388
+ f_households: "",
389
+ //费用
390
+ f_cost: "",
391
+ //金额大写
392
+ f_amount_capital: "",
393
+ //付款方式
394
+ f_payment_method: "",
395
+ //工期
396
+ f_duration: "",
397
+ //指定人员
398
+ f_personnel: "",
399
+ //联系电话
400
+ f_contact_phone: "",
401
+ //甲方单位(盖章)
402
+ f_unit: "",
403
+ //甲方法定代表人或授权代表
404
+ f_representative: "",
405
+ },
406
+ this.selectList=false
407
+ this.showselect = false
408
+ }
409
+ },
410
+ events: {
411
+ },
412
+ computed: {
413
+ paymentMethod() {
414
+ return this.$appdata.getParam("付款方式")
415
+ }
416
+ },
417
+ watch: {
418
+ }
419
+ }
420
+ </script>
421
+ <style scoped>
422
+ .control-label-justify {
423
+ display: inline-block;
424
+ vertical-align: top;
425
+ width: 110px;
426
+ text-align: justify;
427
+ font-family: PingFang-SC-Bold;
428
+ }
429
+
430
+ .control-label-justify::after {
431
+ content: "";
432
+ display: inline-block;
433
+ width: 100%;
434
+ overflow: hidden;
435
+ height: 0;
436
+ }
437
+ .input_view{
438
+ padding: 8px;
439
+ background-color: #ffffff;
440
+ border-radius: 2px;
441
+ border: solid 1px #c7c7c7!important;
442
+ color: #333333!important;
443
+ font-size: 15px!important;
444
+ }
445
+
446
+ .input_view[readonly]{
447
+ border: 1px solid #DDD!important;
448
+ color:#ACA899!important;
449
+ }
450
+ .input_view:disabled{
451
+ border: 1px solid #DDD!important;
452
+ color:#ACA899!important;
453
+ }
454
+ </style>