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