apply-clients 3.5.5-1 → 3.5.5-10

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.
@@ -8,8 +8,8 @@ var compiler = webpack(config)
8
8
  // var proxy = httpProxy.createProxyServer()
9
9
  // var ldap = 'http://121.36.79.201:8400'
10
10
  // var applyinstall = 'http://121.36.79.201:8400'
11
- var ldap = 'http://192.168.50.93:31986/'
12
- var applyinstall = 'http://192.168.50.93:31986/'
11
+ var ldap = 'http://123.57.92.217:8900/'
12
+ var applyinstall = 'http://123.57.92.217:8900/'
13
13
 
14
14
  var proxyTable = {
15
15
  '/api': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "3.5.5-1",
3
+ "version": "3.5.5-10",
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,424 @@
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>
153
+ </article>
154
+ <footer slot="modal-footer" class="modal-footer">
155
+ <button type="button" class="btn btn-primary" @click="save()">确认</button>
156
+ <button type="button" class="btn btn-primary" @click="NoSelect()">取消</button>
157
+ </footer>
158
+ </modal>
159
+ </template>
160
+ <script>
161
+ import {HttpResetClass} from "vue-client";
162
+ import {isEmpty} from "../../../Util";
163
+
164
+ export default {
165
+ title: '合同签订',
166
+ props: {
167
+ selectdata: {
168
+ type: Object
169
+ },
170
+ mark: {
171
+ type: Number,
172
+ default: 0
173
+ }
174
+ },
175
+ data () {
176
+ return {
177
+ model:{
178
+ rows:[]
179
+ },
180
+ showselect: false,
181
+ selectList:false,
182
+ Options:this.$appdata.getParam("合同模板"),
183
+ credOptions:this.$appdata.getParam('证件类型'),
184
+ templatename:'',
185
+ contractInfo: {
186
+ f_contract_id: '',
187
+ f_contract_signature_id: null,
188
+ f_contract_name: '',
189
+ f_contract_date: '',
190
+ f_contract_type: "",
191
+ f_file_id: "",
192
+ f_contract_arguments: [],
193
+ f_signature_location: "",
194
+ f_state: "",
195
+ f_contract_url: null,
196
+ f_template_url: "",
197
+ f_signature_url: null
198
+ },
199
+ userRecord: {
200
+ f_userinfo_id: this.selectdata.f_userinfo_id?this.selectdata.f_userinfo_id:this.selectdata.f_process_id,
201
+ f_filialeid:this.$login.f.orgid,
202
+ f_userinfo_code: this.selectdata.f_userinfo_code?this.selectdata.f_userinfo_code:this.selectdata.f_process_id,
203
+ f_user_name:this.selectdata.f_user_name?this.selectdata.f_user_name:"",
204
+ f_credentials: this.selectdata.f_credentials?this.selectdata.f_credentials:"",
205
+ f_idnumber: this.selectdata.f_idnumber?this.selectdata.f_idnumber:"",
206
+ f_address: this.selectdata.f_address?this.selectdata.f_address:"",
207
+ f_user_phone:this.selectdata.f_phone?this.selectdata.f_phone:"",
208
+ //甲方
209
+ f_lessor:"",
210
+ //项目地点及名称
211
+ f_project_address: "",
212
+ //户数
213
+ f_households: "",
214
+ //费用
215
+ f_cost: "",
216
+ //金额大写
217
+ f_amount_capital: "",
218
+ //付款方式
219
+ f_payment_method: "",
220
+ //工期
221
+ f_duration: "",
222
+ //指定人员
223
+ f_personnel: "",
224
+ //联系电话
225
+ f_contact_phone: "",
226
+ },
227
+ loginInfo: {
228
+ f_operatorid: this.$login.f.id,
229
+ f_operator: this.$login.f.name,
230
+ f_orgid: this.$login.f.orgid
231
+ }
232
+ }
233
+ },
234
+ ready () {
235
+ this.getContractTemplate()
236
+ },
237
+ methods: {
238
+ select(row){
239
+ this.$showMessage(`是否选择当前合同`, ['confirm']).then((res) => {
240
+ if (res === 'confirm') {
241
+ this.contractInfo.f_contract_id=row.f_contract_id
242
+ this.contractInfo.f_contract_signature_id=row.f_contract_signature_id
243
+ this.contractInfo.f_contract_name=row.f_contract_name
244
+ this.contractInfo.f_contract_date=row.f_contract_date
245
+ this.contractInfo.f_contract_type=row.f_contract_type
246
+ this.contractInfo.f_file_id=row.f_file_id
247
+ this.contractInfo.f_contract_arguments=row.f_contract_arguments
248
+ this.contractInfo.f_signature_location=row.f_signature_location
249
+ this.contractInfo.f_state=row.f_state
250
+ this.contractInfo.f_contract_url=row.f_contract_url
251
+ this.contractInfo.f_template_url=row.f_template_url
252
+ this.contractInfo. f_signature_url=row.f_signature_url
253
+ this.selectList=false
254
+ }
255
+ })
256
+ },
257
+ async getContractTemplate(){
258
+ let data = {
259
+ tablename: 't_contract_template',
260
+ condition: `f_contract_state='有效' and f_orgid='${this.$login.f.orgid}'`
261
+ }
262
+ let http = new HttpResetClass()
263
+ await http.load('POST', 'rs/sql/apply_singleTable', {data: data}, {resolveMsg: null, rejectMsg: '合同信息查询失败!!!'}).then(res => {
264
+ if (res.data.length> 0) {
265
+ this.model.rows = res.data
266
+ }
267
+ })
268
+ },
269
+ handleInput(e) {
270
+ // 通过正则过滤小数点后两位
271
+ e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
272
+ this.contractInfo.f_amount_capital = this.smalltoBIG(e.target.value)
273
+ },
274
+ // 金额转大写
275
+ smalltoBIG(n) {
276
+ let fraction = ['角', '分'];
277
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
278
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
279
+ let head = n < 0 ? '欠' : '';
280
+ n = Math.abs(n);
281
+ let s = '';
282
+ for (var i = 0; i < fraction.length; i++) {
283
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
284
+ }
285
+ s = s || '整';
286
+ n = Math.floor(n);
287
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
288
+ let p = '';
289
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
290
+ p = digit[n % 10] + unit[1][j] + p;
291
+ n = Math.floor(n / 10);
292
+ }
293
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
294
+ }
295
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
296
+ },
297
+ async save() {
298
+ if(isEmpty(this.contractInfo.f_contract_name)){
299
+ this.$showMessage(`请选择需要签订的合同`)
300
+ return
301
+ }else{
302
+ this.$showMessage(`是否确认生成此合同`, ['confirm']).then(async (res) => {
303
+ if (res === 'confirm') {
304
+ let http = new HttpResetClass()
305
+ let data = {
306
+ contractInfo:this.contractInfo,
307
+ userRecord:this.userRecord,
308
+ loginInfo:this.loginInfo
309
+ }
310
+ await http.load('POST', 'api/af-revenue/logic/generateContract', {data: data}, {
311
+ resolveMsg: null,
312
+ rejectMsg: '合同信息查询失败!!!'
313
+ }).then(async res => {
314
+ //保存合同信息
315
+ if (res.data.code == 200) {
316
+ //保存到t_files表
317
+ let param={
318
+ f_blobid:this.selectdata.f_process_id,
319
+ fusetype:"报装合同",
320
+ f_filename:res.data.f_contract_name,
321
+ f_uploaddate:res.data.f_create_date,
322
+ f_downloadpath:res.data.f_signature_url,
323
+ f_realpath:res.data.f_signature_path
324
+ }
325
+ await this.$resetpost('rs/entity/t_files', param).then(res => {
326
+ this.$showMessage(`合同生成成功!!!`),
327
+ this.selectList=false
328
+ this.showselect = false
329
+ })
330
+ } else {
331
+ this.selectList=false
332
+ this.showselect = false
333
+ this.$showMessage(`合同生成失败!!!,原因为${res.data.msg}`)
334
+ }
335
+ })
336
+ }
337
+ })
338
+ }
339
+ },
340
+ clear () {
341
+ },
342
+ openSelect () {
343
+ this.selectList=true
344
+ this.showselect = true
345
+ },
346
+ NoSelect () {
347
+ //清除数据
348
+ this.userRecord={
349
+ f_userinfo_id: this.selectdata.f_userinfo_id?this.selectdata.f_userinfo_id:this.selectdata.f_process_id,
350
+ f_filialeid:this.$login.f.orgid,
351
+ f_userinfo_code: this.selectdata.f_userinfo_code?this.selectdata.f_userinfo_code:this.selectdata.f_process_id,
352
+ f_user_name:this.selectdata.f_user_name?this.selectdata.f_user_name:"",
353
+ f_credentials: this.selectdata.f_credentials?this.selectdata.f_credentials:"",
354
+ f_idnumber: this.selectdata.f_idnumber?this.selectdata.f_idnumber:"",
355
+ f_address: this.selectdata.f_address?this.selectdata.f_address:"",
356
+ f_user_phone:this.selectdata.f_phone?this.selectdata.f_phone:"",
357
+ //甲方
358
+ f_lessor:"",
359
+ //项目地点及名称
360
+ f_project_address: "",
361
+ //户数
362
+ f_households: "",
363
+ //费用
364
+ f_cost: "",
365
+ //金额大写
366
+ f_amount_capital: "",
367
+ //付款方式
368
+ f_payment_method: "",
369
+ //工期
370
+ f_duration: "",
371
+ //指定人员
372
+ f_personnel: "",
373
+ //联系电话
374
+ f_contact_phone: ""
375
+ },
376
+ this.selectList=false
377
+ this.showselect = false
378
+ }
379
+ },
380
+ events: {
381
+ },
382
+ computed: {
383
+ paymentMethod() {
384
+ return this.$appdata.getParam("付款方式")
385
+ }
386
+ },
387
+ watch: {
388
+ }
389
+ }
390
+ </script>
391
+ <style scoped>
392
+ .control-label-justify {
393
+ display: inline-block;
394
+ vertical-align: top;
395
+ width: 110px;
396
+ text-align: justify;
397
+ font-family: PingFang-SC-Bold;
398
+ }
399
+
400
+ .control-label-justify::after {
401
+ content: "";
402
+ display: inline-block;
403
+ width: 100%;
404
+ overflow: hidden;
405
+ height: 0;
406
+ }
407
+ .input_view{
408
+ padding: 8px;
409
+ background-color: #ffffff;
410
+ border-radius: 2px;
411
+ border: solid 1px #c7c7c7!important;
412
+ color: #333333!important;
413
+ font-size: 15px!important;
414
+ }
415
+
416
+ .input_view[readonly]{
417
+ border: 1px solid #DDD!important;
418
+ color:#ACA899!important;
419
+ }
420
+ .input_view:disabled{
421
+ border: 1px solid #DDD!important;
422
+ color:#ACA899!important;
423
+ }
424
+ </style>