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,449 +1,457 @@
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_ticket_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
- @change="getTicketNumber()"
12
- v-validate:f_ticket_number = "['required']"
13
- v-model="model.f_ticket_number"
14
- :value="model.f_ticket_number"/>
15
- </div>
16
- </div>
17
- <div class="col-sm-4 form-group item" :class="[$v.f_entry_type.required ? 'has-error' : '']">
18
- <label class="control-label-justify control-label col-sm-6">项目类型</label>
19
- <div class="col-sm-6">
20
- <input-select
21
- class="select select_list"
22
- :value.sync="model.outboundOrder"
23
- v-model="model.outboundOrder"
24
- :options="cailiaotype"
25
- :valueSingle="true"></input-select>
26
- </div>
27
- </div>
28
- <div class="col-sm-4 form-group item" :class="[$v.f_warehouse.required ? 'has-error' : '']">
29
- <label class="control-label-justify control-label col-sm-6">发料仓库</label>
30
- <div class="col-sm-6">
31
- <input class="form-control input_view" style=""
32
- type="text"
33
- v-validate:f_warehouse = "['required']"
34
- v-model="model.f_warehouse"
35
- :value="model.f_warehouse"/>
36
- </div>
37
- </div>
38
- <div class="col-sm-4 form-group item" :class="[$v.f_picking_unit.required ? 'has-error' : '']">
39
- <label class="control-label-justify control-label col-sm-6">施工单位</label>
40
- <div class="col-sm-6">
41
- <input-select class="select select_list"
42
- :value.sync="model.outboundOrder"
43
- v-model="model.outboundOrder"
44
- :options="shigongdanwei"
45
- :valueSingle="true">
46
- </input-select>
47
- </div>
48
- </div>
49
- <div class="col-sm-4 form-group item">
50
- <label class="control-label-justify control-label col-sm-6">CEA号</label>
51
- <div class="col-sm-6">
52
- <input-select
53
- class="select select_list"
54
- :value.sync="cea"
55
- v-model="cea"
56
- :options="ceaList"
57
- :valueSingle="true"></input-select>
58
- <input class="form-control input_view" type="text"
59
- v-show="false"
60
- v-model="model.f_cea_number"
61
- :value="cea.f_cea_number"/>
62
- </div>
63
- </div>
64
- <div class="col-sm-4 form-group item" :class="[$v.f_picking_site.required ? 'has-error' : '']">
65
- <label class="control-label-justify control-label col-sm-6">工地名称</label>
66
- <div class="col-sm-6">
67
- <input class="form-control input_view" style=""
68
- type="text"
69
- v-validate:f_picking_site = "['required']"
70
- v-model="model.f_picking_site"
71
- :value="cea.f_entry_name"/>
72
- </div>
73
- </div>
74
- <div class="col-sm-12">
75
- <data-grid :model="model" partial='list' v-ref:grid style="overflow: auto" class="list_area table_sy">
76
- <template partial='head'>
77
- <tr>
78
- <th style="white-space: nowrap;">序号</th>
79
- <th style="white-space: nowrap;">材料名称</th>
80
- <th style="white-space: nowrap;">材料型号</th>
81
- <th style="white-space: nowrap;">材料规格</th>
82
- <th style="white-space: nowrap;">单位</th>
83
- <th style="white-space: nowrap;">单价</th>
84
- <th style="white-space: nowrap;">预出库数量</th>
85
- <th style="white-space: nowrap;">金额</th>
86
- <th style="white-space: nowrap;">备注</th>
87
- <th style="white-space: nowrap;">
88
- <button @click="$parent.$parent.openShowMaterial()" type="button" class="btn btn-info">
89
- <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
90
- </button>
91
- </th>
92
- </tr>
93
- </template>
94
- <template partial='body'>
95
- <tr>
96
- <td style="text-align: center;">{{$index+1}}</td>
97
- <td style="text-align: center;">{{row.f_material_name}}</td>
98
- <td style="text-align: center;">{{row.f_material_model}}</td>
99
- <td style="text-align: center;">{{row.f_material_norm}}</td>
100
- <td style="text-align: center;">{{row.f_unit}}</td>
101
- <td style="text-align: center;">{{row.f_price}}</td>
102
- <td style="text-align: center;">{{row.f_prepare_quantity}}</td>
103
- <td style="text-align: center;">{{row.f_price * row.f_prepare_quantity}}</td>
104
- <td style="text-align: center;">{{row.f_remarks}}</td>
105
- <td style="text-align: center;">
106
- <button type="button" name="button" class="btn btn-link" @click="$parent.$parent.openUpdateMaterial($index,row)">修改</button>
107
- <button type="button" name="button" class="btn btn-link" @click="$parent.$parent.deleteMaterial($index)">删除</button>
108
- </td>
109
- </tr>
110
- </template>
111
- </data-grid>
112
- </div>
113
-
114
- <div class="col-sm-12 form-group" style="text-align: center">
115
- <button class="btn btn-primary" @click.prevent="addOutboundOrder()" :disabled="!($v.valid && model.data.length > 0)">保存</button>
116
- </div>
117
- </div>
118
- </form>
119
- </validator>
120
- <validator name="mv">
121
- <modal v-if="showMaterial" :show.sync="showMaterial" backdrop="false" large>
122
- <header slot="modal-header" class="modal-header">
123
- <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
124
- <span class="modal-title"><font size="3">添加材料</font></span>
125
- </header>
126
- <article slot="modal-body" class="form-horizontal modal-body clearfix">
127
- <div class="col-sm-12 form-group" :class="[$mv.material.required ? 'has-error' : '']">
128
- <label class="control-label col-sm-2">选择材料</label>
129
- <div class="col-sm-9">
130
- <input type="text" v-show="false" v-model="material.id" v-validate:material = "['required']" >
131
- <input-select
132
- class="select select_list"
133
- :value.sync="material"
134
- v-model="material"
135
- :options="materialList"
136
- @change="changePickMaterial()"
137
- :valueSingle="true"></input-select>
138
- </div>
139
- </div>
140
- <div class="col-sm-12 form-group" :class="[$mv.material.required ? 'has-error' : '']">
141
- <label class="control-label col-sm-2">材料名称</label>
142
- <div class="col-sm-9">
143
- <input class="form-control" type="text" :value="material.f_material_name" readonly />
144
- </div>
145
- </div>
146
- <div class="col-sm-12 form-group" :class="[$mv.material.required ? 'has-error' : '']">
147
- <label class="control-label col-sm-2">材料型号</label>
148
- <div class="col-sm-9">
149
- <input class="form-control" type="text" :value="material.f_material_model" readonly/>
150
- </div>
151
- </div>
152
- <div class="col-sm-12 form-group" :class="[$mv.material.required ? 'has-error' : '']">
153
- <label class="control-label col-sm-2">材料规格</label>
154
- <div class="col-sm-9">
155
- <input class="form-control" type="text" :value="material.f_material_norm" readonly/>
156
- </div>
157
- </div>
158
- <div class="col-sm-12 form-group" :class="[$mv.material.required ? 'has-error' : '']">
159
- <label class="control-label col-sm-2">单&emsp;&emsp;位</label>
160
- <div class="col-sm-9">
161
- <input class="form-control" type="text" :value="material.f_unit" readonly/>
162
- </div>
163
- </div>
164
- <div class="col-sm-12 form-group" :class="[$mv.material.required ? 'has-error' : '']">
165
- <label class="control-label col-sm-2">单&emsp;&emsp;价</label>
166
- <div class="col-sm-9">
167
- <input class="form-control" type="number" :value="material.f_price" readonly/>
168
- </div>
169
- </div>
170
- <div class="col-sm-12 form-group" :class="[$mv.material.required ? 'has-error' : '']">
171
- <label class="control-label col-sm-2">可出数量</label>
172
- <div class="col-sm-9">
173
- <input class="form-control" type="number" :value="material.f_prepare_surplus" readonly/>
174
- </div>
175
- </div>
176
-
177
- <div class="col-sm-12 form-group" :class="[$mv.f_prepare_quantity.required ? 'has-error' : '']">
178
- <label class="control-label col-sm-2">数&emsp;&emsp;量</label>
179
- <div class="col-sm-9">
180
- <input class="form-control"
181
- type="number"
182
- @change="changePrepareQuantity()"
183
- v-validate:f_prepare_quantity = "{required: true}"
184
- v-model="material.f_prepare_quantity"
185
- :value="material.f_prepare_quantity"/>
186
- </div>
187
- </div>
188
- <div class="col-sm-12 form-group">
189
- <label class="control-label col-sm-2">备&emsp;&emsp;注</label>
190
- <div class="col-sm-9">
191
- <textarea
192
- class="form-control input_view"
193
- style="width: 100%;height: 100%"
194
- rows="2"
195
- @change="changeRemarks()"
196
- v-model="material.f_remarks"
197
- :value="material.f_remarks"
198
- >
199
- </textarea>
200
- </div>
201
- </div>
202
-
203
- </article>
204
- <footer slot="modal-footer" class="modal-footer">
205
- <button class="btn btn-primary" type="button" @click.prevent="saveOrUpdateMaterial()" :disabled='!$mv.valid'>确认</button>
206
- </footer>
207
- </modal>
208
- </validator>
209
-
210
- </div>
211
- </template>
212
-
213
- <script>
214
- import {HttpResetClass} from 'vue-client'
215
- import {isEmpty} from '../../../../Util'
216
- export default {
217
- title: '材料出库单',
218
- data () {
219
- return {
220
- cailiaotype: [{label: '全部', value: ''}, ...this.$appdata.getParam('材料项目类型')],
221
- shigongdanwei:[{label:'全部',value:''},...this.$appdata.getParam('施工单位')],
222
- model: {
223
- data: []
224
- },
225
- cea: {},
226
- material: {},
227
- ceaList: [],
228
- materialList: [],
229
- showMaterial: false,
230
- index: null
231
- }
232
- },
233
- ready () {
234
- this.getCEAList()
235
- },
236
- methods: {
237
- addOutboundOrder () {
238
- this.$dispatch('addOutboundOrder', this.model)
239
- },
240
- changePickMaterial () {
241
- if (!isEmpty(this.material.id)) {
242
- for (const item of this.model.data) {
243
- if (item.id === this.material.id) {
244
- this.$showAlert('该物料已经存在,如需再次添加,请进行修改操作!!!', 'warning', 3000)
245
- this.closeModal()
246
- break
247
- }
248
- }
249
- }
250
- },
251
- async openUpdateMaterial (index, material) {
252
- await this.getMaterialByType()
253
-
254
- this.index = index
255
- this.material = material
256
-
257
- this.showMaterial = true
258
- },
259
- async deleteMaterial (index) {
260
- this.index = index
261
- await this.$showMessage('您确定要删除这条记录吗?').then((res) => {
262
- if (res === 'confirm') {
263
- this.model.data.splice(this.index, 1)
264
- }
265
- })
266
- this.closeModal()
267
- },
268
- saveOrUpdateMaterial () {
269
- if (isEmpty(this.index)) {
270
- this.model.data.push(this.material)
271
- } else {
272
- this.model.data.splice(this.index, 1, this.material)
273
- }
274
-
275
- this.closeModal()
276
- },
277
- closeModal () {
278
- this.showMaterial = false
279
- this.index = null
280
- this.material = null
281
- this.materialList = []
282
- },
283
- changeRemarks () {
284
- if (!this.material.id || isEmpty(this.material.id)) {
285
- this.$showAlert('请先选择物料!!!', 'warning', 3000)
286
- this.material = null
287
- return
288
- }
289
- },
290
- changePrepareQuantity () {
291
- if (!this.material.id || isEmpty(this.material.id)) {
292
- this.$showAlert('请先选择物料!!!', 'warning', 3000)
293
- this.material = null
294
- return
295
- }
296
- if (this.material.f_prepare_quantity > this.material.f_prepare_surplus) {
297
- this.$showAlert('超出可出库数量了!!!', 'warning', 3000)
298
- this.material.f_prepare_quantity = null
299
- return
300
- }
301
- },
302
- // 获取有效可出库物料
303
- async getMaterialByType () {
304
- let data = {
305
- condition: '1=1'
306
- }
307
-
308
- let res = await this.$resetpost(
309
- `rs/sql/getMaterialByType`,
310
- {data: data},
311
- {resolveMsg: null, rejectMsg: '物料查询失败!!!'}
312
- )
313
-
314
- res.data.forEach(item => {
315
- this.materialList.push({
316
- 'label': `${item.f_material_name}--${item.f_material_model}--${item.f_material_norm}--${item.f_unit}--${item.f_price}`,
317
- 'value': item
318
- })
319
- })
320
- },
321
- // 选择物料
322
- async openShowMaterial () {
323
- await this.getMaterialByType()
324
-
325
- this.material = null
326
-
327
- this.showMaterial = true
328
- },
329
- // 查询编号
330
- async getTicketNumber () {
331
- let data = {
332
- tablename: 't_outbound_order',
333
- condition: `f_ticket_number = '${this.model.f_ticket_number}'`
334
- }
335
-
336
- let res = await this.$resetpost(
337
- `rs/sql/singleTable`,
338
- {data: data},
339
- {resolveMsg: null,rejectMsg: '票号查询失败!!!'}
340
- )
341
-
342
- if (res.data.length > 0) {
343
- this.$showAlert('票号已经存在!!!', 'warning', 3000)
344
- this.model.f_ticket_number = null
345
- return
346
- }
347
- },
348
- // 获取CEA
349
- async getCEAList () {
350
- let data = {
351
- tablename: 't_apply',
352
- condition: `f_cea_number is not null and f_sub_state != '完工'`
353
- }
354
-
355
- let res = await this.$resetpost(
356
- `rs/sql/singleTable`,
357
- {data: data},
358
- {resolveMsg: null, rejectMsg: 'CEA号查询失败!!!'}
359
- )
360
-
361
- if (res.data.length <= 0) {
362
- this.$showAlert('暂无工程!!!', 'warning', 3000)
363
- return
364
- }
365
-
366
- res.data.forEach(item => {
367
- this.ceaList.push({
368
- 'label': item.f_cea_number,
369
- 'value': {
370
- id: item.id,
371
- f_cea_number: item.f_cea_number,
372
- f_entry_name: item.f_entry_name
373
- }
374
- })
375
- })
376
- }
377
- },
378
- events: {
379
- }
380
- }
381
- </script>
382
-
383
- <style scoped>
384
- .item{
385
- height: 40px;
386
- margin-bottom: 20px;
387
- }
388
-
389
- th{
390
- font-size: 15px !important;
391
- text-align: center !important;
392
- background-color: #dfedfb!important;
393
- color: #666666 !important;
394
- font-family: PINGFANG-BOLD !important;
395
- font-weight: normal!important;
396
- }
397
- /*清除model中的浮动*/
398
- .clearfix:after,.clearfix:before{
399
- display: table;
400
- }
401
- .clearfix:after{
402
- clear: both;
403
- }
404
-
405
- .input_view{
406
- padding: 8px;
407
- background-color: #ffffff;
408
- border-radius: 2px;
409
- border: solid 1px #c7c7c7!important;
410
- color: #333333!important;
411
- font-size: 15px!important;
412
- }
413
-
414
- .input_view[readonly]{
415
- border: 1px solid #DDD!important;
416
- /*background-color: #F5F5F5;*/
417
- color:#ACA899!important;
418
- }
419
- .input_view:disabled{
420
- border: 1px solid #DDD!important;
421
- /*background-color: #F5F5F5;*/
422
- color:#ACA899!important;
423
- }
424
-
425
- .control-label-justify {
426
- display: inline-block;
427
- vertical-align: top;
428
- width: 110px;
429
- text-align: justify;
430
- font-family: PingFang-SC-Bold;
431
- }
432
-
433
- .control-label-justify::after {
434
- content: "";
435
- display: inline-block;
436
- width: 70px;
437
- overflow: hidden;
438
- height: 0;
439
- }
440
-
441
- input::-webkit-outer-spin-button,
442
- input::-webkit-inner-spin-button {
443
- -webkit-appearance: none;
444
- }
445
-
446
- input[type="number"] {
447
- -moz-appearance: textfield;
448
- }
449
- </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_ticket_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
+ @change="getTicketNumber()"
12
+ v-validate:f_ticket_number = "['required']"
13
+ v-model="model.f_ticket_number"
14
+ :value="model.f_ticket_number"/>
15
+ </div>
16
+ </div>
17
+ <div class="col-sm-4 form-group item" :class="[$v.f_entry_type.required ? 'has-error' : '']">
18
+ <label class="control-label-justify control-label col-sm-6">项目类型</label>
19
+ <div class="col-sm-6">
20
+ <input-select
21
+ class="select select_list"
22
+ :value.sync="model.outboundOrder"
23
+ v-model="model.outboundOrder"
24
+ :options="cailiaotype"
25
+ :valueSingle="true"></input-select>
26
+ </div>
27
+ </div>
28
+ <div class="col-sm-4 form-group item" :class="[$v.f_warehouse.required ? 'has-error' : '']">
29
+ <label class="control-label-justify control-label col-sm-6">发料仓库</label>
30
+ <div class="col-sm-6">
31
+ <input class="form-control input_view" style=""
32
+ type="text"
33
+ v-validate:f_warehouse = "['required']"
34
+ v-model="model.f_warehouse"
35
+ :value="model.f_warehouse"/>
36
+ </div>
37
+ </div>
38
+ <div class="col-sm-4 form-group item" :class="[$v.f_picking_unit.required ? 'has-error' : '']">
39
+ <label class="control-label-justify control-label col-sm-6">施工单位</label>
40
+ <div class="col-sm-6">
41
+ <input-select class="select select_list"
42
+ :value.sync="model.outboundOrder"
43
+ v-model="model.outboundOrder"
44
+ :options="shigongdanwei"
45
+ :valueSingle="true">
46
+ </input-select>
47
+ </div>
48
+ </div>
49
+ <div class="col-sm-4 form-group item">
50
+ <label class="control-label-justify control-label col-sm-6">CEA号</label>
51
+ <div class="col-sm-6">
52
+ <input-select
53
+ class="select select_list"
54
+ :value.sync="cea"
55
+ v-model="cea"
56
+ :options="ceaList"
57
+ :valueSingle="true"></input-select>
58
+ <input class="form-control input_view" type="text"
59
+ v-show="false"
60
+ v-model="model.f_cea_number"
61
+ :value="cea.f_cea_number"/>
62
+ </div>
63
+ </div>
64
+ <div class="col-sm-4 form-group item" :class="[$v.f_picking_site.required ? 'has-error' : '']">
65
+ <label class="control-label-justify control-label col-sm-6">工地名称</label>
66
+ <div class="col-sm-6">
67
+ <input class="form-control input_view" style=""
68
+ type="text"
69
+ v-validate:f_picking_site = "['required']"
70
+ v-model="model.f_picking_site"
71
+ :value="cea.f_entry_name"/>
72
+ </div>
73
+ </div>
74
+ <div class="col-sm-12">
75
+ <data-grid :model="model" partial='list' v-ref:grid style="overflow: auto" class="list_area table_sy">
76
+ <template partial='head'>
77
+ <tr>
78
+ <th style="white-space: nowrap;">序号</th>
79
+ <th style="white-space: nowrap;">材料名称</th>
80
+ <th style="white-space: nowrap;">材料型号</th>
81
+ <th style="white-space: nowrap;">材料规格</th>
82
+ <th style="white-space: nowrap;">单位</th>
83
+ <th style="white-space: nowrap;">含税单价</th>
84
+ <th style="white-space: nowrap;">不含税单价</th>
85
+ <th style="white-space: nowrap;">预出库数量</th>
86
+ <th style="white-space: nowrap;">金额</th>
87
+ <th style="white-space: nowrap;">备注</th>
88
+ <th style="white-space: nowrap;">
89
+ <button @click="$parent.$parent.openShowMaterial()" type="button" class="btn btn-info">
90
+ <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
91
+ </button>
92
+ </th>
93
+ </tr>
94
+ </template>
95
+ <template partial='body'>
96
+ <tr>
97
+ <td style="text-align: center;">{{$index+1}}</td>
98
+ <td style="text-align: center;">{{row.f_material_name}}</td>
99
+ <td style="text-align: center;">{{row.f_material_model}}</td>
100
+ <td style="text-align: center;">{{row.f_material_norm}}</td>
101
+ <td style="text-align: center;">{{row.f_unit}}</td>
102
+ <td style="text-align: center;">{{row.f_price}}</td>
103
+ <td style="text-align: center;">{{row.f_noprice}}</td>
104
+ <td style="text-align: center;">{{row.f_prepare_quantity}}</td>
105
+ <td style="text-align: center;">{{row.f_price * row.f_prepare_quantity}}</td>
106
+ <td style="text-align: center;">{{row.f_remarks}}</td>
107
+ <td style="text-align: center;">
108
+ <button type="button" name="button" class="btn btn-link" @click="$parent.$parent.openUpdateMaterial($index,row)">修改</button>
109
+ <button type="button" name="button" class="btn btn-link" @click="$parent.$parent.deleteMaterial($index)">删除</button>
110
+ </td>
111
+ </tr>
112
+ </template>
113
+ </data-grid>
114
+ </div>
115
+
116
+ <div class="col-sm-12 form-group" style="text-align: center">
117
+ <button class="btn btn-primary" @click.prevent="addOutboundOrder()" :disabled="!($v.valid && model.data.length > 0)">保存</button>
118
+ </div>
119
+ </div>
120
+ </form>
121
+ </validator>
122
+ <validator name="mv">
123
+ <modal v-if="showMaterial" :show.sync="showMaterial" backdrop="false" large>
124
+ <header slot="modal-header" class="modal-header">
125
+ <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
126
+ <span class="modal-title"><font size="3">添加材料</font></span>
127
+ </header>
128
+ <article slot="modal-body" class="form-horizontal modal-body clearfix">
129
+ <div class="col-sm-12 form-group" :class="[$mv.material.required ? 'has-error' : '']">
130
+ <label class="control-label col-sm-2">选择材料</label>
131
+ <div class="col-sm-9">
132
+ <input type="text" v-show="false" v-model="material.id" v-validate:material = "['required']" >
133
+ <input-select
134
+ class="select select_list"
135
+ :value.sync="material"
136
+ v-model="material"
137
+ :options="materialList"
138
+ @change="changePickMaterial()"
139
+ :valueSingle="true"></input-select>
140
+ </div>
141
+ </div>
142
+ <div class="col-sm-12 form-group" :class="[$mv.material.required ? 'has-error' : '']">
143
+ <label class="control-label col-sm-2">材料名称</label>
144
+ <div class="col-sm-9">
145
+ <input class="form-control" type="text" :value="material.f_material_name" readonly />
146
+ </div>
147
+ </div>
148
+ <div class="col-sm-12 form-group" :class="[$mv.material.required ? 'has-error' : '']">
149
+ <label class="control-label col-sm-2">材料型号</label>
150
+ <div class="col-sm-9">
151
+ <input class="form-control" type="text" :value="material.f_material_model" readonly/>
152
+ </div>
153
+ </div>
154
+ <div class="col-sm-12 form-group" :class="[$mv.material.required ? 'has-error' : '']">
155
+ <label class="control-label col-sm-2">材料规格</label>
156
+ <div class="col-sm-9">
157
+ <input class="form-control" type="text" :value="material.f_material_norm" readonly/>
158
+ </div>
159
+ </div>
160
+ <div class="col-sm-12 form-group" :class="[$mv.material.required ? 'has-error' : '']">
161
+ <label class="control-label col-sm-2">单&emsp;&emsp;位</label>
162
+ <div class="col-sm-9">
163
+ <input class="form-control" type="text" :value="material.f_unit" readonly/>
164
+ </div>
165
+ </div>
166
+ <div class="col-sm-12 form-group" :class="[$mv.f_price.required ? 'has-error' : '']">
167
+ <label class="control-label col-sm-2">含税单价</label>
168
+ <div class="col-sm-9">
169
+ <input class="form-control" type="number" readonly v-validate:f_price = "['required']" v-model="material.f_price" :value="material.f_price"/>
170
+ </div>
171
+ </div>
172
+ <div class="col-sm-12 form-group" :class="[$mv.f_noprice.required ? 'has-error' : '']">
173
+ <label class="control-label col-sm-2">不含税单价</label>
174
+ <div class="col-sm-9">
175
+ <input class="form-control" type="number" readonly v-validate:f_noprice = "['required']" v-model="material.f_noprice" :value="material.f_noprice"/>
176
+ </div>
177
+ </div>
178
+ <div class="col-sm-12 form-group" :class="[$mv.material.required ? 'has-error' : '']">
179
+ <label class="control-label col-sm-2">可出数量</label>
180
+ <div class="col-sm-9">
181
+ <input class="form-control" type="number" :value="material.f_prepare_surplus" readonly/>
182
+ </div>
183
+ </div>
184
+
185
+ <div class="col-sm-12 form-group" :class="[$mv.f_prepare_quantity.required ? 'has-error' : '']">
186
+ <label class="control-label col-sm-2">数&emsp;&emsp;量</label>
187
+ <div class="col-sm-9">
188
+ <input class="form-control"
189
+ type="number"
190
+ @change="changePrepareQuantity()"
191
+ v-validate:f_prepare_quantity = "{required: true}"
192
+ v-model="material.f_prepare_quantity"
193
+ :value="material.f_prepare_quantity"/>
194
+ </div>
195
+ </div>
196
+ <div class="col-sm-12 form-group">
197
+ <label class="control-label col-sm-2">备&emsp;&emsp;注</label>
198
+ <div class="col-sm-9">
199
+ <textarea
200
+ class="form-control input_view"
201
+ style="width: 100%;height: 100%"
202
+ rows="2"
203
+ @change="changeRemarks()"
204
+ v-model="material.f_remarks"
205
+ :value="material.f_remarks"
206
+ >
207
+ </textarea>
208
+ </div>
209
+ </div>
210
+
211
+ </article>
212
+ <footer slot="modal-footer" class="modal-footer">
213
+ <button class="btn btn-primary" type="button" @click.prevent="saveOrUpdateMaterial()" :disabled='!$mv.valid'>确认</button>
214
+ </footer>
215
+ </modal>
216
+ </validator>
217
+
218
+ </div>
219
+ </template>
220
+
221
+ <script>
222
+ import {HttpResetClass} from 'vue-client'
223
+ import {isEmpty} from '../../../../Util'
224
+ export default {
225
+ title: '材料出库单',
226
+ data () {
227
+ return {
228
+ cailiaotype: [{label: '全部', value: ''}, ...this.$appdata.getParam('材料项目类型')],
229
+ shigongdanwei:[{label:'全部',value:''},...this.$appdata.getParam('施工单位')],
230
+ model: {
231
+ data: []
232
+ },
233
+ cea: {},
234
+ material: {},
235
+ ceaList: [],
236
+ materialList: [],
237
+ showMaterial: false,
238
+ index: null
239
+ }
240
+ },
241
+ ready () {
242
+ this.getCEAList()
243
+ },
244
+ methods: {
245
+ addOutboundOrder () {
246
+ this.$dispatch('addOutboundOrder', this.model)
247
+ },
248
+ changePickMaterial () {
249
+ if (!isEmpty(this.material.id)) {
250
+ for (const item of this.model.data) {
251
+ if (item.id === this.material.id) {
252
+ this.$showAlert('该物料已经存在,如需再次添加,请进行修改操作!!!', 'warning', 3000)
253
+ this.closeModal()
254
+ break
255
+ }
256
+ }
257
+ }
258
+ },
259
+ async openUpdateMaterial (index, material) {
260
+ await this.getMaterialByType()
261
+
262
+ this.index = index
263
+ this.material = material
264
+
265
+ this.showMaterial = true
266
+ },
267
+ async deleteMaterial (index) {
268
+ this.index = index
269
+ await this.$showMessage('您确定要删除这条记录吗?').then((res) => {
270
+ if (res === 'confirm') {
271
+ this.model.data.splice(this.index, 1)
272
+ }
273
+ })
274
+ this.closeModal()
275
+ },
276
+ saveOrUpdateMaterial () {
277
+ if (isEmpty(this.index)) {
278
+ this.model.data.push(this.material)
279
+ } else {
280
+ this.model.data.splice(this.index, 1, this.material)
281
+ }
282
+
283
+ this.closeModal()
284
+ },
285
+ closeModal () {
286
+ this.showMaterial = false
287
+ this.index = null
288
+ this.material = null
289
+ this.materialList = []
290
+ },
291
+ changeRemarks () {
292
+ if (!this.material.id || isEmpty(this.material.id)) {
293
+ this.$showAlert('请先选择物料!!!', 'warning', 3000)
294
+ this.material = null
295
+ return
296
+ }
297
+ },
298
+ changePrepareQuantity () {
299
+ if (!this.material.id || isEmpty(this.material.id)) {
300
+ this.$showAlert('请先选择物料!!!', 'warning', 3000)
301
+ this.material = null
302
+ return
303
+ }
304
+ if (this.material.f_prepare_quantity > this.material.f_prepare_surplus) {
305
+ this.$showAlert('超出可出库数量了!!!', 'warning', 3000)
306
+ this.material.f_prepare_quantity = null
307
+ return
308
+ }
309
+ },
310
+ // 获取有效可出库物料
311
+ async getMaterialByType () {
312
+ let data = {
313
+ condition: '1=1'
314
+ }
315
+
316
+ let res = await this.$resetpost(
317
+ `rs/sql/getMaterialByType`,
318
+ {data: data},
319
+ {resolveMsg: null, rejectMsg: '物料查询失败!!!'}
320
+ )
321
+
322
+ res.data.forEach(item => {
323
+ this.materialList.push({
324
+ 'label': `${item.f_material_name}--${item.f_material_model}--${item.f_material_norm}--${item.f_unit}--${item.f_price}`,
325
+ 'value': item
326
+ })
327
+ })
328
+ },
329
+ // 选择物料
330
+ async openShowMaterial () {
331
+ await this.getMaterialByType()
332
+
333
+ this.material = null
334
+
335
+ this.showMaterial = true
336
+ },
337
+ // 查询编号
338
+ async getTicketNumber () {
339
+ let data = {
340
+ tablename: 't_outbound_order',
341
+ condition: `f_ticket_number = '${this.model.f_ticket_number}'`
342
+ }
343
+
344
+ let res = await this.$resetpost(
345
+ `rs/sql/singleTable`,
346
+ {data: data},
347
+ {resolveMsg: null,rejectMsg: '票号查询失败!!!'}
348
+ )
349
+
350
+ if (res.data.length > 0) {
351
+ this.$showAlert('票号已经存在!!!', 'warning', 3000)
352
+ this.model.f_ticket_number = null
353
+ return
354
+ }
355
+ },
356
+ // 获取CEA
357
+ async getCEAList () {
358
+ let data = {
359
+ tablename: 't_apply',
360
+ condition: `f_cea_number is not null and f_sub_state != '完工'`
361
+ }
362
+
363
+ let res = await this.$resetpost(
364
+ `rs/sql/singleTable`,
365
+ {data: data},
366
+ {resolveMsg: null, rejectMsg: 'CEA号查询失败!!!'}
367
+ )
368
+
369
+ if (res.data.length <= 0) {
370
+ this.$showAlert('暂无工程!!!', 'warning', 3000)
371
+ return
372
+ }
373
+
374
+ res.data.forEach(item => {
375
+ this.ceaList.push({
376
+ 'label': item.f_cea_number,
377
+ 'value': {
378
+ id: item.id,
379
+ f_cea_number: item.f_cea_number,
380
+ f_entry_name: item.f_entry_name
381
+ }
382
+ })
383
+ })
384
+ }
385
+ },
386
+ events: {
387
+ }
388
+ }
389
+ </script>
390
+
391
+ <style scoped>
392
+ .item{
393
+ height: 40px;
394
+ margin-bottom: 20px;
395
+ }
396
+
397
+ th{
398
+ font-size: 15px !important;
399
+ text-align: center !important;
400
+ background-color: #dfedfb!important;
401
+ color: #666666 !important;
402
+ font-family: PINGFANG-BOLD !important;
403
+ font-weight: normal!important;
404
+ }
405
+ /*清除model中的浮动*/
406
+ .clearfix:after,.clearfix:before{
407
+ display: table;
408
+ }
409
+ .clearfix:after{
410
+ clear: both;
411
+ }
412
+
413
+ .input_view{
414
+ padding: 8px;
415
+ background-color: #ffffff;
416
+ border-radius: 2px;
417
+ border: solid 1px #c7c7c7!important;
418
+ color: #333333!important;
419
+ font-size: 15px!important;
420
+ }
421
+
422
+ .input_view[readonly]{
423
+ border: 1px solid #DDD!important;
424
+ /*background-color: #F5F5F5;*/
425
+ color:#ACA899!important;
426
+ }
427
+ .input_view:disabled{
428
+ border: 1px solid #DDD!important;
429
+ /*background-color: #F5F5F5;*/
430
+ color:#ACA899!important;
431
+ }
432
+
433
+ .control-label-justify {
434
+ display: inline-block;
435
+ vertical-align: top;
436
+ width: 110px;
437
+ text-align: justify;
438
+ font-family: PingFang-SC-Bold;
439
+ }
440
+
441
+ .control-label-justify::after {
442
+ content: "";
443
+ display: inline-block;
444
+ width: 70px;
445
+ overflow: hidden;
446
+ height: 0;
447
+ }
448
+
449
+ input::-webkit-outer-spin-button,
450
+ input::-webkit-inner-spin-button {
451
+ -webkit-appearance: none;
452
+ }
453
+
454
+ input[type="number"] {
455
+ -moz-appearance: textfield;
456
+ }
457
+ </style>