apply-clients 3.2.41 → 3.2.50

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 (43) hide show
  1. package/package.json +1 -1
  2. package/src/App.vue +20 -20
  3. package/src/apply.js +185 -175
  4. package/src/components/app_apply/Process/AppExplorationUser.vue +1 -1
  5. package/src/components/app_apply/ProgressReport/ProgressReportList.vue +209 -208
  6. package/src/components/app_apply/Supervisory/AppProcessSupervisory.vue +183 -183
  7. package/src/components/image/tubiao.png +0 -0
  8. package/src/components/product/Ledger/ContractManagement/OtherContract/OtherContractInformation.vue +429 -429
  9. package/src/components/product/Ledger/ContractManagement/OtherContract/OtherContractList.vue +267 -267
  10. package/src/components/product/Ledger/ContractManagement/PurchaseContract/PurchaseContractInformation.vue +715 -682
  11. package/src/components/product/Ledger/ContractManagement/PurchaseContract/PurchaseContractList.vue +304 -304
  12. package/src/components/product/Ledger/ContractManagement/RepairContract/RepairContractInformation.vue +286 -286
  13. package/src/components/product/Ledger/ContractManagement/RepairContract/RepairContractList.vue +258 -258
  14. package/src/components/product/Ledger/FacilityManagement/FacilityInventory/FacilityInventory.vue +31 -0
  15. package/src/components/product/Ledger/FacilityManagement/FacilityInventory/FacilityInventoryList.vue +5 -0
  16. package/src/components/product/Ledger/FacilityManagement/FacilityInventory/addoldFacilityInformation.vue +326 -0
  17. package/src/components/product/Ledger/FileDownload/FileDownload.vue +42 -0
  18. package/src/components/product/Ledger/Function/InstallInfoSelect.vue +4 -1
  19. package/src/components/product/Ledger/ImportApply/ImportApply.vue +68 -0
  20. package/src/components/product/Ledger/MaterialManagement/DeliveryRecord/DeliveryRecordList.vue +39 -3
  21. package/src/components/product/Ledger/MaterialManagement/InventoryInformation/InventoryInformationList.vue +32 -2
  22. package/src/components/product/Ledger/MaterialManagement/InventoryInformation/MaterialInformation.vue +1 -1
  23. package/src/components/product/Ledger/MaterialManagement/InventoryInformation/MaterialOutStock.vue +438 -430
  24. package/src/components/product/Ledger/MaterialManagement/InventoryInformation/MaterialOutboundOrder.vue +457 -449
  25. package/src/components/product/Ledger/MaterialManagement/InventoryInformation/PurchaseMaterial.vue +10 -2
  26. package/src/components/product/Ledger/MaterialManagement/InventoryInformation/PurchaseOrder.vue +10 -2
  27. package/src/components/product/Ledger/MaterialManagement/InventoryInformation/ReturnMaterial.vue +10 -2
  28. package/src/components/product/Ledger/MaterialManagement/OutboundOrder/OutboundOrderInformation.vue +3 -1
  29. package/src/components/product/Ledger/MaterialManagement/OutboundOrder/OutboundOrderList.vue +31 -2
  30. package/src/components/product/Ledger/MaterialManagement/OutboundOrder/PrintMaterialBill.vue +2 -2
  31. package/src/components/product/Ledger/MaterialManagement/PurchaseRecords/PrintPurchaseOrder.vue +5 -4
  32. package/src/components/product/Ledger/MaterialManagement/PurchaseRecords/PurchaseRecordsInformation.vue +5 -1
  33. package/src/components/product/Ledger/MaterialManagement/PurchaseRecords/PurchaseRecordsList.vue +33 -7
  34. package/src/components/product/Ledger/MaterialManagement/WarehousingRecord/WarehousingRecordList.vue +45 -3
  35. package/src/components/product/Ledger/Process/ProcessSelect.vue +3 -5
  36. package/src/components/product/Ledger/Process/Service/ServiceControl.vue +42 -5
  37. package/src/components/product/Ledger/QinhuaMaterial/PickingRecord/PickingInformation.vue +24 -3
  38. package/src/components/product/Ledger/QinhuaMaterial/SeasoningRecord/SeasoningRecordList.vue +14 -2
  39. package/src/components/product/Ledger/Supervisory/Service/RenWuDan.vue +78 -0
  40. package/src/components/product/Ledger/Supervisory/Service/SupervisoryServiceControl.vue +38 -2
  41. package/src/components/product/Ledger/Supervisory/SupervisoryList.vue +182 -7
  42. package/src/components/product/ServiceView.vue +761 -850
  43. package/static/images/lefticon//346/226/207/344/273/266/346/250/241/345/235/227.png +0 -0
@@ -1,429 +1,429 @@
1
- <template>
2
- <div class="select-overspread" style="background-color: #ffffff;padding: 20px;overflow: scroll">
3
- <validator name="v">
4
- <form class="form-horizontal">
5
- <div class="form-group">
6
- <div class="col-sm-4 form-group item" :class="[$v.f_contract_number.required ? 'has-error' : '']">
7
- <label class="control-label-justify control-label col-sm-6">合同编号</label>
8
- <div class="col-sm-6">
9
- <input class="form-control input_view" style=""
10
- type="text"
11
- :readonly="type !== 'add'"
12
- v-validate:f_contract_number = "['required']"
13
- @change="getContractByNumber()"
14
- v-model="contract.f_contract_number"
15
- :value="contract.f_contract_number"/>
16
- </div>
17
- </div>
18
- <div class="col-sm-4 form-group item" :class="[$v.f_supplier.required ? 'has-error' : '']">
19
- <label class="control-label-justify control-label col-sm-6">对方名称</label>
20
- <div class="col-sm-6">
21
- <input class="form-control input_view" style=""
22
- type="text"
23
- :readonly="type !== 'add'"
24
- v-validate:f_supplier = "['required']"
25
- v-model="contract.f_supplier"
26
- :value="contract.f_supplier"/>
27
- </div>
28
- </div>
29
- <div class="col-sm-4 form-group item" :class="[$v.f_contact_person.required ? 'has-error' : '']">
30
- <label class="control-label-justify control-label col-sm-6">联系人</label>
31
- <div class="col-sm-6">
32
- <input type="text" v-model="contract.f_contact_person" v-validate:f_contact_person = "['required']" v-show="false">
33
- <input-select
34
- class="select select_list"
35
- :disable="type !== 'add'"
36
- :value.sync="contract.f_contact_person"
37
- v-model="contract.f_contact_person"
38
- :options="f_contact_person"
39
- :valueSingle="true">
40
- </input-select>
41
- </div>
42
- </div>
43
- <div class="col-sm-4 form-group item" :class="[$v.f_tel.required ? 'has-error' : '']">
44
- <label class="control-label-justify control-label col-sm-6">电话</label>
45
- <div class="col-sm-6">
46
- <input type="text" v-model="contract.f_tel" v-validate:f_tel = "['required']" v-show="false">
47
- <input-select
48
- class="select select_list"
49
- :disable="type !== 'add'"
50
- :value.sync="contract.f_tel"
51
- v-model="contract.f_tel"
52
- :options="tel"
53
- :valueSingle="true">
54
- </input-select>
55
- </div>
56
- </div>
57
- <div class="col-sm-4 form-group item" :class="[$v.f_contract_nature.required ? 'has-error' : '']">
58
- <label class="control-label-justify control-label col-sm-6">合同性质</label>
59
- <div class="col-sm-6">
60
- <input type="text" v-model="contract.f_contract_nature" v-show="false" v-validate:f_contract_nature = "['required']">
61
- <input-select
62
- class="select select_list"
63
- :disable="type !== 'add'"
64
- :value.sync="contract.f_contract_nature"
65
- v-model="contract.f_contract_nature"
66
- :options="contractNature"
67
- :valueSingle="true"></input-select>
68
- </div>
69
- </div>
70
- <div class="col-sm-4 form-group item" :class="[$v.f_contract_source.required ? 'has-error' : '']">
71
- <label class="control-label-justify control-label col-sm-6">合同来源</label>
72
- <div class="col-sm-6">
73
- <input type="text" v-model="contract.f_contract_source" v-show="false" v-validate:f_contract_source = "['required']">
74
- <input-select
75
- class="select select_list"
76
- :disable="type !== 'add'"
77
- :value.sync="contract.f_contract_source"
78
- v-model="contract.f_contract_source"
79
- :options="contractSource"
80
- :valueSingle="true"></input-select>
81
- </div>
82
- </div>
83
- <div class="col-sm-4 form-group item" :class="[$v.f_amount.required ? 'has-error' : '']">
84
- <label class="control-label-justify control-label col-sm-6">合同份数</label>
85
- <div class="col-sm-6">
86
- <input class="form-control input_view" style=""
87
- type="number"
88
- :readonly="type !== 'add' && type !== 'renew'"
89
- v-validate:f_amount = "['required']"
90
- v-model="contract.f_amount"
91
- :value="contract.f_amount"/>
92
- </div>
93
- </div>
94
- <div class="col-sm-4 form-group item" :class="[$v.f_contract_time.required ? 'has-error' : '']">
95
- <label class="control-label-justify control-label col-sm-6">签订时间</label>
96
- <div class="col-sm-6">
97
- <input type="text" v-model="contract.f_contract_time" v-show="false" v-validate:f_contract_time = "['required']">
98
- <datepicker
99
- :disabled="type !== 'add'"
100
- :value.sync="contract.f_contract_time"
101
- format="yyyy-MM-dd"
102
- v-model="contract.f_contract_time">
103
- </datepicker>
104
- </div>
105
- </div>
106
- <div class="col-sm-4 form-group item" :class="[$v.f_contract_expiration_date.required ? 'has-error' : '']">
107
- <label class="control-label-justify control-label col-sm-6">到期时间</label>
108
- <div class="col-sm-6">
109
- <input type="text" v-model="contract.f_contract_expiration_date" v-show="false" v-validate:f_contract_expiration_date = "['required']">
110
- <datepicker
111
- :disabled="type !== 'add' && type !== 'renew'"
112
- format="yyyy-MM-dd"
113
- @change="changeExpirationDate"
114
- :value.sync="contract.f_contract_expiration_date"
115
- v-model="contract.f_contract_expiration_date">
116
- </datepicker>
117
- </div>
118
- </div>
119
-
120
- <div class="col-sm-4 form-group item" v-if="type !== 'add'">
121
- <label class="control-label-justify control-label col-sm-6">合同总金额</label>
122
- <div class="col-sm-6">
123
- <input class="form-control input_view" style=""
124
- type="number"
125
- readonly
126
- v-model="contract.f_contract_money"
127
- :value="contract.f_contract_money"/>
128
- </div>
129
- </div>
130
- <div class="col-sm-12 form-group item">
131
- <label class="control-label-justify control-label col-sm-3">备注</label>
132
- <div class="col-sm-10">
133
- <textarea
134
- class="form-control input_view"
135
- style="width: 100%;height: 100%"
136
- rows="2"
137
- :readonly="type !== 'add'"
138
- v-model="contract.f_remarks"
139
- :value="contract.f_remarks"
140
- ></textarea>
141
- </div>
142
- </div>
143
-
144
- <div class="col-sm-12 form-group" v-if="type !== 'add'">
145
- <data-grid :model="model" partial='list' v-ref:grid style="overflow: auto" class="list_area table_sy">
146
- <template partial='head'>
147
- <tr>
148
- <th style="white-space: nowrap;">序号</th>
149
- <th style="white-space: nowrap;">事项</th>
150
- <th style="white-space: nowrap;">详情</th>
151
- <th style="white-space: nowrap;">价格</th>
152
- <th style="white-space: nowrap;">操作人</th>
153
- <th style="white-space: nowrap;">操作时间</th>
154
- <th style="white-space: nowrap;">备注</th>
155
- <th style="white-space: nowrap;" v-if="$parent.$parent.type === 'addMatter'">
156
- <button class="button_new button_spacing" @click.prevent="$parent.$parent.showMatter = !$parent.$parent.showMatter">添加事项</button>
157
- </th>
158
- </tr>
159
- </template>
160
- <template partial='body'>
161
- <tr >
162
- <td style="text-align: center;">
163
- <nobr><font>{{$index+1}}</font></nobr>
164
- </td>
165
- <td style="text-align: center;">
166
- <nobr><font>{{row.f_matter}}</font></nobr>
167
- </td>
168
- <td style="text-align: center;">
169
- <nobr><font>{{row.f_detail}}</font></nobr>
170
- </td>
171
- <td style="text-align: center;">
172
- <nobr><font>{{row.f_price}}</font></nobr>
173
- </td>
174
- <td style="text-align: center;">
175
- <nobr><font>{{row.f_operator}}</font></nobr>
176
- </td>
177
- <td style="text-align: center;">
178
- <nobr><font>{{row.f_operation_date}}</font></nobr>
179
- </td>
180
- <td style="text-align: center;">
181
- <nobr><font>{{row.f_remarks}}</font></nobr>
182
- </td>
183
- <td v-if="$parent.$parent.type === 'addMatter'"></td>
184
- </tr>
185
- </template>
186
- </data-grid>
187
- </div>
188
-
189
- <div class="col-sm-12 form-group" style="text-align: center">
190
- <button class="btn btn-primary" v-if="type === 'add'" @click.prevent="addContract()" :disabled='!$v.valid'>保存</button>
191
- <button class="btn btn-primary" v-if="type === 'renew'" @click.prevent="renewContract()" :disabled='!$v.valid'>续签</button>
192
- </div>
193
-
194
- </div>
195
- </form>
196
- </validator>
197
- </div>
198
- <validator name="mv">
199
- <modal v-if="showMatter" :show.sync="showMatter" v-ref:modal :large="true" :backdrop="false" title="添加事项">
200
- <header slot="modal-header" class="modal-header">
201
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
202
- <h4 class="modal-title">添加事项</h4>
203
- </header>
204
- <article slot="modal-body" class="modal-body clearfix">
205
- <div class="form-group col-sm-12" :class="[$mv.f_matter.required ? 'has-error' : '']">
206
- <label class="col-sm-2 control-label">事项 :</label>
207
- <div class="col-sm-10">
208
- <textarea
209
- class="form-control"
210
- style="width: 100%;height: 100%"
211
- v-validate:f_matter = "['required']"
212
- :rows="2"
213
- v-model="matter.f_matter"
214
- :value="matter.f_matter"
215
- ></textarea>
216
- </div>
217
- </div>
218
- <div class="form-group col-sm-12" :class="[$mv.f_detail.required ? 'has-error' : '']">
219
- <label class="col-sm-2 control-label">详情:</label>
220
- <div class="col-sm-10">
221
- <textarea
222
- class="form-control"
223
- style="width: 100%;height: 100%"
224
- :rows="2"
225
- v-validate:f_detail = "['required']"
226
- v-model="matter.f_detail"
227
- :value="matter.f_detail"
228
- ></textarea>
229
- </div>
230
- </div>
231
- <div class="form-group col-sm-12" :class="[$mv.f_price.required ? 'has-error' : '']">
232
- <label class="col-sm-2 control-label">价格:</label>
233
- <div class="col-sm-10">
234
- <input type="number"
235
- class="form-control input_view"
236
- style="width: 100%"
237
- v-validate:f_price = "['required']"
238
- v-model="matter.f_price" />
239
- </div>
240
- </div>
241
- <div class="form-group col-sm-12">
242
- <label class="col-sm-2 control-label">备注:</label>
243
- <div class="col-sm-10">
244
- <textarea
245
- class="form-control input_view"
246
- style="width: 100%;height: 100%"
247
- :rows="2"
248
- v-model="matter.f_remarks"
249
- :value="matter.f_remarks"
250
- ></textarea>
251
- </div>
252
- </div>
253
- </article>
254
- <footer slot="modal-footer" class="modal-footer">
255
- <button type="button" class="btn btn-primary" @click="addMatter()" :disabled='!$mv.valid'>确认</button>
256
- </footer>
257
- </modal>
258
- </validator>
259
- </template>
260
-
261
- <script>
262
- import {isEmpty} from '../../../../Util'
263
- export default {
264
- props: ['contract', 'type'],
265
- title: '合同信息',
266
- data () {
267
- return {
268
- f_contact_person:[{label:'全部', value:''}, ...this.$appdata.getParam('联系人')],
269
- tel:[{label:'全部',value:''}, ...this.$appdata.getParam('电话')],
270
- contractSource: [{label:'全部',value:''},... this.$appdata.getParam('合同来源')],
271
- contractNature: [{label:'全部',value:''},... this.$appdata.getParam('合同性质')],
272
- model: {
273
- data: []
274
- },
275
- matter: {},
276
- showMatter: false
277
- }
278
- },
279
- ready () {
280
- if (this.type !== 'add') {
281
- this.getContractMatter()
282
- }
283
- },
284
- methods: {
285
- renewContract () {
286
- this.$dispatch('renewContract', this.contract)
287
- },
288
- // 关闭
289
- closeModal () {
290
- this.showMatter = false
291
- this.matter = null
292
- },
293
- // 添加事项
294
- async addMatter () {
295
- let data = {
296
- contract: this.contract,
297
- matter: this.matter,
298
- user: this.$login.f
299
- }
300
- let res = await this.$resetpost(
301
- `rs/logic/addMatter`,
302
- {data: data},
303
- {resolveMsg: null,rejectMsg: '事项添加失败!!!'}
304
- )
305
-
306
- this.$dispatch('breakContract', this.contract)
307
- },
308
- // 获取合同事项
309
- async getContractMatter() {
310
- let data = {
311
- tablename: 't_contract_matter',
312
- condition: `f_contract_id = ${this.contract.id}`
313
- }
314
-
315
- let res = await this.$resetpost(
316
- `rs/sql/singleTable`,
317
- {data: data},
318
- {resolveMsg: null,rejectMsg: '合同事项查询失败!!!'}
319
- )
320
-
321
- this.model.data = res.data
322
- },
323
- addContract () {
324
- this.$dispatch('addContract', this.contract)
325
- },
326
- // 时间判断
327
- changeExpirationDate () {
328
- if (!isEmpty(this.contract.f_contract_expiration_date)) {
329
- if (isEmpty(this.contract.f_contract_time)) {
330
- this.contract.f_contract_expiration_date = null
331
- this.$showAlert('先输入合同签订时间!!!', 'warning', 3000)
332
- }
333
- if (new Date(this.contract.f_contract_expiration_date) < new Date(this.contract.f_contract_time)) {
334
- this.contract.f_contract_expiration_date = null
335
- this.$showAlert('到期时间需要大于签订时间!!!', 'warning', 3000)
336
- }
337
- }
338
- },
339
- // 查询合同编号
340
- async getContractByNumber () {
341
- let data = {
342
- tablename: 't_contract',
343
- condition: `f_contract_number = '${this.contract.f_contract_number}' and f_contract_type = '其他合同'`
344
- }
345
-
346
- let res = await this.$resetpost(
347
- `rs/sql/singleTable`,
348
- {data: data},
349
- {resolveMsg: null, rejectMsg: '合同编号查询失败!!!'}
350
- )
351
-
352
- if (res.data.length > 0) {
353
- this.contract.f_contract_number = null
354
- this.$showAlert('合同编号已存在!!!', 'warning', 3000)
355
- }
356
- },
357
- },
358
- events: {
359
- }
360
- }
361
- </script>
362
-
363
- <style scoped>
364
- .item{
365
- height: 40px;
366
- margin-bottom: 20px;
367
- }
368
-
369
- th{
370
- font-size: 15px !important;
371
- text-align: center !important;
372
- background-color: #dfedfb!important;
373
- color: #666666 !important;
374
- font-family: PINGFANG-BOLD !important;
375
- font-weight: normal!important;
376
- }
377
- /*清除model中的浮动*/
378
- .clearfix:after,.clearfix:before{
379
- display: table;
380
- }
381
- .clearfix:after{
382
- clear: both;
383
- }
384
-
385
- .input_view{
386
- padding: 8px;
387
- background-color: #ffffff;
388
- border-radius: 2px;
389
- border: solid 1px #c7c7c7!important;
390
- color: #333333!important;
391
- font-size: 15px!important;
392
- }
393
-
394
- .input_view[readonly]{
395
- border: 1px solid #DDD!important;
396
- /*background-color: #F5F5F5;*/
397
- color:#ACA899!important;
398
- }
399
- .input_view:disabled{
400
- border: 1px solid #DDD!important;
401
- /*background-color: #F5F5F5;*/
402
- color:#ACA899!important;
403
- }
404
-
405
- .control-label-justify {
406
- display: inline-block;
407
- vertical-align: top;
408
- width: 110px;
409
- text-align: justify;
410
- font-family: PingFang-SC-Bold;
411
- }
412
-
413
- .control-label-justify::after {
414
- content: "";
415
- display: inline-block;
416
- width: 70px;
417
- overflow: hidden;
418
- height: 0;
419
- }
420
-
421
- input::-webkit-outer-spin-button,
422
- input::-webkit-inner-spin-button {
423
- -webkit-appearance: none;
424
- }
425
-
426
- input[type="number"] {
427
- -moz-appearance: textfield;
428
- }
429
- </style>
1
+ <template>
2
+ <div class="select-overspread" style="background-color: #ffffff;padding: 20px;overflow: scroll">
3
+ <validator name="v">
4
+ <form class="form-horizontal">
5
+ <div class="form-group">
6
+ <div class="col-sm-4 form-group item" :class="[$v.f_contract_number.required ? 'has-error' : '']">
7
+ <label class="control-label-justify control-label col-sm-6">合同编号</label>
8
+ <div class="col-sm-6">
9
+ <input class="form-control input_view" style=""
10
+ type="text"
11
+ :readonly="type !== 'add'"
12
+ v-validate:f_contract_number = "['required']"
13
+ @change="getContractByNumber()"
14
+ v-model="contract.f_contract_number"
15
+ :value="contract.f_contract_number"/>
16
+ </div>
17
+ </div>
18
+ <div class="col-sm-4 form-group item" :class="[$v.f_supplier.required ? 'has-error' : '']">
19
+ <label class="control-label-justify control-label col-sm-6">对方名称</label>
20
+ <div class="col-sm-6">
21
+ <input class="form-control input_view" style=""
22
+ type="text"
23
+ :readonly="type !== 'add'"
24
+ v-validate:f_supplier = "['required']"
25
+ v-model="contract.f_supplier"
26
+ :value="contract.f_supplier"/>
27
+ </div>
28
+ </div>
29
+ <div class="col-sm-4 form-group item" :class="[$v.f_contact_person.required ? 'has-error' : '']">
30
+ <label class="control-label-justify control-label col-sm-6">联系人</label>
31
+ <div class="col-sm-6">
32
+ <input type="text" v-model="contract.f_contact_person" v-validate:f_contact_person = "['required']" v-show="false">
33
+ <input-select
34
+ class="select select_list"
35
+ :disable="type !== 'add'"
36
+ :value.sync="contract.f_contact_person"
37
+ v-model="contract.f_contact_person"
38
+ :options="f_contact_person"
39
+ :valueSingle="true">
40
+ </input-select>
41
+ </div>
42
+ </div>
43
+ <div class="col-sm-4 form-group item" :class="[$v.f_tel.required ? 'has-error' : '']">
44
+ <label class="control-label-justify control-label col-sm-6">电话</label>
45
+ <div class="col-sm-6">
46
+ <input type="text" v-model="contract.f_tel" v-validate:f_tel = "['required']" v-show="false">
47
+ <input-select
48
+ class="select select_list"
49
+ :disable="type !== 'add'"
50
+ :value.sync="contract.f_tel"
51
+ v-model="contract.f_tel"
52
+ :options="tel"
53
+ :valueSingle="true">
54
+ </input-select>
55
+ </div>
56
+ </div>
57
+ <div class="col-sm-4 form-group item" :class="[$v.f_contract_nature.required ? 'has-error' : '']">
58
+ <label class="control-label-justify control-label col-sm-6">合同性质</label>
59
+ <div class="col-sm-6">
60
+ <input type="text" v-model="contract.f_contract_nature" v-show="false" v-validate:f_contract_nature = "['required']">
61
+ <input-select
62
+ class="select select_list"
63
+ :disable="type !== 'add'"
64
+ :value.sync="contract.f_contract_nature"
65
+ v-model="contract.f_contract_nature"
66
+ :options="contractNature"
67
+ :valueSingle="true"></input-select>
68
+ </div>
69
+ </div>
70
+ <div class="col-sm-4 form-group item" :class="[$v.f_contract_source.required ? 'has-error' : '']">
71
+ <label class="control-label-justify control-label col-sm-6">合同来源</label>
72
+ <div class="col-sm-6">
73
+ <input type="text" v-model="contract.f_contract_source" v-show="false" v-validate:f_contract_source = "['required']">
74
+ <input-select
75
+ class="select select_list"
76
+ :disable="type !== 'add'"
77
+ :value.sync="contract.f_contract_source"
78
+ v-model="contract.f_contract_source"
79
+ :options="contractSource"
80
+ :valueSingle="true"></input-select>
81
+ </div>
82
+ </div>
83
+ <div class="col-sm-4 form-group item" :class="[$v.f_amount.required ? 'has-error' : '']">
84
+ <label class="control-label-justify control-label col-sm-6">合同份数</label>
85
+ <div class="col-sm-6">
86
+ <input class="form-control input_view" style=""
87
+ type="number"
88
+ :readonly="type !== 'add' && type !== 'renew'"
89
+ v-validate:f_amount = "['required']"
90
+ v-model="contract.f_amount"
91
+ :value="contract.f_amount"/>
92
+ </div>
93
+ </div>
94
+ <div class="col-sm-4 form-group item" :class="[$v.f_contract_time.required ? 'has-error' : '']">
95
+ <label class="control-label-justify control-label col-sm-6">签订时间</label>
96
+ <div class="col-sm-6">
97
+ <input type="text" v-model="contract.f_contract_time" v-show="false" v-validate:f_contract_time = "['required']">
98
+ <datepicker
99
+ :disabled="type !== 'add'"
100
+ :value.sync="contract.f_contract_time"
101
+ format="yyyy-MM-dd"
102
+ v-model="contract.f_contract_time">
103
+ </datepicker>
104
+ </div>
105
+ </div>
106
+ <div class="col-sm-4 form-group item" :class="[$v.f_contract_expiration_date.required ? 'has-error' : '']">
107
+ <label class="control-label-justify control-label col-sm-6">到期时间</label>
108
+ <div class="col-sm-6">
109
+ <input type="text" v-model="contract.f_contract_expiration_date" v-show="false" v-validate:f_contract_expiration_date = "['required']">
110
+ <datepicker
111
+ :disabled="type !== 'add' && type !== 'renew'"
112
+ format="yyyy-MM-dd"
113
+ @change="changeExpirationDate"
114
+ :value.sync="contract.f_contract_expiration_date"
115
+ v-model="contract.f_contract_expiration_date">
116
+ </datepicker>
117
+ </div>
118
+ </div>
119
+
120
+ <div class="col-sm-4 form-group item" v-if="type !== 'add'">
121
+ <label class="control-label-justify control-label col-sm-6">合同总金额</label>
122
+ <div class="col-sm-6">
123
+ <input class="form-control input_view" style=""
124
+ type="number"
125
+ readonly
126
+ v-model="contract.f_contract_money"
127
+ :value="contract.f_contract_money"/>
128
+ </div>
129
+ </div>
130
+ <div class="col-sm-12 form-group item">
131
+ <label class="control-label-justify control-label col-sm-3">备注</label>
132
+ <div class="col-sm-10">
133
+ <textarea
134
+ class="form-control input_view"
135
+ style="width: 100%;height: 100%"
136
+ rows="2"
137
+ :readonly="type !== 'add'"
138
+ v-model="contract.f_remarks"
139
+ :value="contract.f_remarks"
140
+ ></textarea>
141
+ </div>
142
+ </div>
143
+
144
+ <div class="col-sm-12 form-group" v-if="type !== 'add'">
145
+ <data-grid :model="model" partial='list' v-ref:grid style="overflow: auto" class="list_area table_sy">
146
+ <template partial='head'>
147
+ <tr>
148
+ <th style="white-space: nowrap;">序号</th>
149
+ <th style="white-space: nowrap;">事项</th>
150
+ <th style="white-space: nowrap;">详情</th>
151
+ <th style="white-space: nowrap;">价格</th>
152
+ <th style="white-space: nowrap;">操作人</th>
153
+ <th style="white-space: nowrap;">操作时间</th>
154
+ <th style="white-space: nowrap;">备注</th>
155
+ <th style="white-space: nowrap;" v-if="$parent.$parent.type === 'addMatter'">
156
+ <button class="button_new button_spacing" @click.prevent="$parent.$parent.showMatter = !$parent.$parent.showMatter">添加事项</button>
157
+ </th>
158
+ </tr>
159
+ </template>
160
+ <template partial='body'>
161
+ <tr >
162
+ <td style="text-align: center;">
163
+ <nobr><font>{{$index+1}}</font></nobr>
164
+ </td>
165
+ <td style="text-align: center;">
166
+ <nobr><font>{{row.f_matter}}</font></nobr>
167
+ </td>
168
+ <td style="text-align: center;">
169
+ <nobr><font>{{row.f_detail}}</font></nobr>
170
+ </td>
171
+ <td style="text-align: center;">
172
+ <nobr><font>{{row.f_price}}</font></nobr>
173
+ </td>
174
+ <td style="text-align: center;">
175
+ <nobr><font>{{row.f_operator}}</font></nobr>
176
+ </td>
177
+ <td style="text-align: center;">
178
+ <nobr><font>{{row.f_operation_date}}</font></nobr>
179
+ </td>
180
+ <td style="text-align: center;">
181
+ <nobr><font>{{row.f_remarks}}</font></nobr>
182
+ </td>
183
+ <td v-if="$parent.$parent.type === 'addMatter'"></td>
184
+ </tr>
185
+ </template>
186
+ </data-grid>
187
+ </div>
188
+
189
+ <div class="col-sm-12 form-group" style="text-align: center">
190
+ <button class="btn btn-primary" v-if="type === 'add'" @click.prevent="addContract()" :disabled='!$v.valid'>保存</button>
191
+ <button class="btn btn-primary" v-if="type === 'renew'" @click.prevent="renewContract()" :disabled='!$v.valid'>续签</button>
192
+ </div>
193
+
194
+ </div>
195
+ </form>
196
+ </validator>
197
+ </div>
198
+ <validator name="mv">
199
+ <modal v-if="showMatter" :show.sync="showMatter" v-ref:modal :large="true" :backdrop="false" title="添加事项">
200
+ <header slot="modal-header" class="modal-header">
201
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
202
+ <h4 class="modal-title">添加事项</h4>
203
+ </header>
204
+ <article slot="modal-body" class="modal-body clearfix">
205
+ <div class="form-group col-sm-12" :class="[$mv.f_matter.required ? 'has-error' : '']">
206
+ <label class="col-sm-2 control-label">事项 :</label>
207
+ <div class="col-sm-10">
208
+ <textarea
209
+ class="form-control"
210
+ style="width: 100%;height: 100%"
211
+ v-validate:f_matter = "['required']"
212
+ :rows="2"
213
+ v-model="matter.f_matter"
214
+ :value="matter.f_matter"
215
+ ></textarea>
216
+ </div>
217
+ </div>
218
+ <div class="form-group col-sm-12" :class="[$mv.f_detail.required ? 'has-error' : '']">
219
+ <label class="col-sm-2 control-label">详情:</label>
220
+ <div class="col-sm-10">
221
+ <textarea
222
+ class="form-control"
223
+ style="width: 100%;height: 100%"
224
+ :rows="2"
225
+ v-validate:f_detail = "['required']"
226
+ v-model="matter.f_detail"
227
+ :value="matter.f_detail"
228
+ ></textarea>
229
+ </div>
230
+ </div>
231
+ <div class="form-group col-sm-12" :class="[$mv.f_price.required ? 'has-error' : '']">
232
+ <label class="col-sm-2 control-label">价格:</label>
233
+ <div class="col-sm-10">
234
+ <input type="number"
235
+ class="form-control input_view"
236
+ style="width: 100%"
237
+ v-validate:f_price = "['required']"
238
+ v-model="matter.f_price" />
239
+ </div>
240
+ </div>
241
+ <div class="form-group col-sm-12">
242
+ <label class="col-sm-2 control-label">备注:</label>
243
+ <div class="col-sm-10">
244
+ <textarea
245
+ class="form-control input_view"
246
+ style="width: 100%;height: 100%"
247
+ :rows="2"
248
+ v-model="matter.f_remarks"
249
+ :value="matter.f_remarks"
250
+ ></textarea>
251
+ </div>
252
+ </div>
253
+ </article>
254
+ <footer slot="modal-footer" class="modal-footer">
255
+ <button type="button" class="btn btn-primary" @click="addMatter()" :disabled='!$mv.valid'>确认</button>
256
+ </footer>
257
+ </modal>
258
+ </validator>
259
+ </template>
260
+
261
+ <script>
262
+ import {isEmpty} from '../../../../Util'
263
+ export default {
264
+ props: ['contract', 'type'],
265
+ title: '合同信息',
266
+ data () {
267
+ return {
268
+ f_contact_person:[{label:'全部', value:''}, ...this.$appdata.getParam('联系人')],
269
+ tel:[{label:'全部',value:''}, ...this.$appdata.getParam('电话')],
270
+ contractSource: [{label:'全部',value:''},... this.$appdata.getParam('合同来源')],
271
+ contractNature: [{label:'全部',value:''},... this.$appdata.getParam('合同性质')],
272
+ model: {
273
+ data: []
274
+ },
275
+ matter: {},
276
+ showMatter: false
277
+ }
278
+ },
279
+ ready () {
280
+ if (this.type !== 'add') {
281
+ this.getContractMatter()
282
+ }
283
+ },
284
+ methods: {
285
+ renewContract () {
286
+ this.$dispatch('renewContract', this.contract)
287
+ },
288
+ // 关闭
289
+ closeModal () {
290
+ this.showMatter = false
291
+ this.matter = null
292
+ },
293
+ // 添加事项
294
+ async addMatter () {
295
+ let data = {
296
+ contract: this.contract,
297
+ matter: this.matter,
298
+ user: this.$login.f
299
+ }
300
+ let res = await this.$resetpost(
301
+ `rs/logic/addMatter`,
302
+ {data: data},
303
+ {resolveMsg: null,rejectMsg: '事项添加失败!!!'}
304
+ )
305
+
306
+ this.$dispatch('breakContract', this.contract)
307
+ },
308
+ // 获取合同事项
309
+ async getContractMatter() {
310
+ let data = {
311
+ tablename: 't_contract_matter',
312
+ condition: `f_contract_id = ${this.contract.id}`
313
+ }
314
+
315
+ let res = await this.$resetpost(
316
+ `rs/sql/singleTable`,
317
+ {data: data},
318
+ {resolveMsg: null,rejectMsg: '合同事项查询失败!!!'}
319
+ )
320
+
321
+ this.model.data = res.data
322
+ },
323
+ addContract () {
324
+ this.$dispatch('addContract', this.contract)
325
+ },
326
+ // 时间判断
327
+ changeExpirationDate () {
328
+ if (!isEmpty(this.contract.f_contract_expiration_date)) {
329
+ if (isEmpty(this.contract.f_contract_time)) {
330
+ this.contract.f_contract_expiration_date = null
331
+ this.$showAlert('先输入合同签订时间!!!', 'warning', 3000)
332
+ }
333
+ if (new Date(this.contract.f_contract_expiration_date) < new Date(this.contract.f_contract_time)) {
334
+ this.contract.f_contract_expiration_date = null
335
+ this.$showAlert('到期时间需要大于签订时间!!!', 'warning', 3000)
336
+ }
337
+ }
338
+ },
339
+ // 查询合同编号
340
+ async getContractByNumber () {
341
+ let data = {
342
+ tablename: 't_contract',
343
+ condition: `f_contract_number = '${this.contract.f_contract_number}' and f_contract_type = '其他合同'`
344
+ }
345
+
346
+ let res = await this.$resetpost(
347
+ `rs/sql/singleTable`,
348
+ {data: data},
349
+ {resolveMsg: null, rejectMsg: '合同编号查询失败!!!'}
350
+ )
351
+
352
+ if (res.data.length > 0) {
353
+ this.contract.f_contract_number = null
354
+ this.$showAlert('合同编号已存在!!!', 'warning', 3000)
355
+ }
356
+ },
357
+ },
358
+ events: {
359
+ }
360
+ }
361
+ </script>
362
+
363
+ <style scoped>
364
+ .item{
365
+ height: 40px;
366
+ margin-bottom: 20px;
367
+ }
368
+
369
+ th{
370
+ font-size: 15px !important;
371
+ text-align: center !important;
372
+ background-color: #dfedfb!important;
373
+ color: #666666 !important;
374
+ font-family: PINGFANG-BOLD !important;
375
+ font-weight: normal!important;
376
+ }
377
+ /*清除model中的浮动*/
378
+ .clearfix:after,.clearfix:before{
379
+ display: table;
380
+ }
381
+ .clearfix:after{
382
+ clear: both;
383
+ }
384
+
385
+ .input_view{
386
+ padding: 8px;
387
+ background-color: #ffffff;
388
+ border-radius: 2px;
389
+ border: solid 1px #c7c7c7!important;
390
+ color: #333333!important;
391
+ font-size: 15px!important;
392
+ }
393
+
394
+ .input_view[readonly]{
395
+ border: 1px solid #DDD!important;
396
+ /*background-color: #F5F5F5;*/
397
+ color:#ACA899!important;
398
+ }
399
+ .input_view:disabled{
400
+ border: 1px solid #DDD!important;
401
+ /*background-color: #F5F5F5;*/
402
+ color:#ACA899!important;
403
+ }
404
+
405
+ .control-label-justify {
406
+ display: inline-block;
407
+ vertical-align: top;
408
+ width: 110px;
409
+ text-align: justify;
410
+ font-family: PingFang-SC-Bold;
411
+ }
412
+
413
+ .control-label-justify::after {
414
+ content: "";
415
+ display: inline-block;
416
+ width: 70px;
417
+ overflow: hidden;
418
+ height: 0;
419
+ }
420
+
421
+ input::-webkit-outer-spin-button,
422
+ input::-webkit-inner-spin-button {
423
+ -webkit-appearance: none;
424
+ }
425
+
426
+ input[type="number"] {
427
+ -moz-appearance: textfield;
428
+ }
429
+ </style>