apply-clients 3.5.5-2 → 3.5.5-4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "3.5.5-2",
3
+ "version": "3.5.5-4",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
package/src/apply.js CHANGED
@@ -130,6 +130,8 @@ export default function (filiale) {
130
130
  Vue.component('apply-material-manage', (resolve) => { require(['./components/product/MaterialsManage/MaterialsManage'], resolve) })
131
131
  Vue.component('apply-materials-base', (resolve) => { require(['./components/product/MaterialsManage/MaterialsBase'], resolve) })
132
132
  Vue.component('apply-map-location', (resolve) => { require(['./components/product/ApplyMap/AMapLocation'], resolve) })
133
+ // 选择报建项目
134
+ Vue.component('apply-contract-single', (resolve) => { require(['./components/product/Process/Processes/contractModel'], resolve) })
133
135
  if (filiale) {
134
136
  let filialeComp = require(`./filiale/${filiale}/pc`).specialComp
135
137
  for (let key in filialeComp) {
@@ -0,0 +1,458 @@
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>
@@ -1296,9 +1296,6 @@ export default {
1296
1296
  if (res.data.length == 0){
1297
1297
  http.load('post',`${this.$androidUtil.getProxyUrl()}/rs/sql/checkuser`,{data: {condition:` f_process_id= '${this.show_data.f_parent_process_id}'`, data: {id: Vue.user.id,orgid: Vue.user.orgid}}},{resolveMsg:null,rejectMsg:null}).then(row=>{
1298
1298
  const show_data = row.data[0]
1299
- if(this.show_data.f_apply_type === '工程施工' && this.show_data.f_budget_people == '博德蚁穴阳春公司' && !isEmpty(this.show_data.f_construction_remarks)){
1300
- show_data.f_construction_remarks = show_data.f_construction_remarks +''+this.show_data.f_construction_remarks
1301
- }
1302
1299
  show_data.user = Vue.user
1303
1300
  show_data.start_activity ='报装申请'
1304
1301
  show_data.xmlfilename = show_data.f_apply_type
@@ -1944,9 +1944,6 @@
1944
1944
  if (res.data.length == 0){
1945
1945
  http.load('post',`rs/sql/checkuser`,{data: {condition:` f_process_id= '${this.show_data.f_parent_process_id}'`, data: {id: this.$login.f.id,orgid: this.$login.f.orgid}}},{resolveMsg:null,rejectMsg:null}).then(row=>{
1946
1946
  const show_data = row.data[0]
1947
- if(this.show_data.f_apply_type === '工程施工' && this.show_data.f_budget_people == '博德蚁穴阳春公司' && !isEmpty(this.show_data.f_construction_remarks)){
1948
- show_data.f_construction_remarks = show_data.f_construction_remarks +''+this.show_data.f_construction_remarks
1949
- }
1950
1947
  show_data.user = this.$login.f
1951
1948
  show_data.start_activity ='报装申请'
1952
1949
  show_data.xmlfilename = show_data.f_apply_type