apply-clients 3.5.4-7 → 3.5.4-71

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 (105) hide show
  1. package/build/dev-server.js +7 -11
  2. package/package.json +2 -2
  3. package/src/App.vue +25 -25
  4. package/src/apply.js +2 -3
  5. package/src/applyAndroid.js +2 -0
  6. package/src/assets//344/270/213/350/275/275.png +0 -0
  7. package/src/components/android/AppCheckTakePic.vue +168 -0
  8. package/src/components/android/Process/AppServiceControl.vue +4 -0
  9. package/src/components/android/Process/Processes/AppAddMaterialScience.vue +493 -493
  10. package/src/components/android/Process/Processes/AppChargeManagementNew.vue +637 -0
  11. package/src/components/android/Process/Processes/AppInstallationDetails.vue +480 -480
  12. package/src/components/image/dxf.png +0 -0
  13. package/src/components/product/Function/Service/FunctionServiceControl.vue +1 -1
  14. package/src/components/product/Material/MaterialDetailed.vue +1 -1
  15. package/src/components/product/MaterialsManage/MaterialsBase.vue +5 -1
  16. package/src/components/product/MaterialsManage/MaterialsManage.vue +2 -2
  17. package/src/components/product/PcZhihuanManagement.vue +160 -0
  18. package/src/components/product/Process/ExplorationSelect.vue +4 -1
  19. package/src/components/product/Process/ExplorationUser.vue +1 -0
  20. package/src/components/product/Process/Processes/addMaterialScience.vue +471 -471
  21. package/src/components/product/Process/Processes/chargeManagement.vue +1 -1
  22. package/src/components/product/ServiceView.vue +22 -1
  23. package/src/components/product/Supervisory/SupervisoryControl.vue +141 -140
  24. package/src/components/product/Supervisory/SupervisoryList.vue +452 -452
  25. package/src/filiale/baiyin/android/AppServiceControl.vue +1762 -0
  26. package/src/filiale/baiyin/android/ByAddMaterialScience.vue +823 -0
  27. package/src/filiale/baiyin/android/ByDeviceManagement.vue +916 -0
  28. package/src/filiale/baiyin/android.js +8 -0
  29. package/src/filiale/fugou/android/AppAddMaterialScience.vue +442 -0
  30. package/src/filiale/fugou/android/AppChargeManagement.vue +126 -12
  31. package/src/filiale/fugou/android/AppDevicesManagement.vue +519 -0
  32. package/src/filiale/fugou/android/AppInstallationDetails.vue +541 -0
  33. package/src/filiale/fugou/android/AppServiceControl.vue +21 -4
  34. package/src/filiale/fugou/android/AppZhihuanManagement.vue +191 -0
  35. package/src/filiale/fugou/android.js +6 -1
  36. package/src/filiale/fugou/pc/ExplorationSelect.vue +515 -0
  37. package/src/filiale/fugou/pc/InstallationDetails.vue +44 -32
  38. package/src/filiale/fugou/pc/ServiceControl.vue +124 -379
  39. package/src/filiale/fugou/pc/addMaterialScience.vue +482 -0
  40. package/src/filiale/fugou/pc/devicesManagement.vue +483 -0
  41. package/src/filiale/fugou/pc.js +4 -1
  42. package/src/filiale/gongyi/android/AppAddMaterialScience.vue +20 -8
  43. package/src/filiale/gongyi/android/AppDisclosurerecord.vue +214 -0
  44. package/src/filiale/gongyi/android/AppInstallationDetails.vue +15 -10
  45. package/src/filiale/gongyi/android/AppLegacyIssues.vue +309 -0
  46. package/src/filiale/gongyi/android/AppSign.vue +16 -3
  47. package/src/filiale/gongyi/android/AppSupplementalAgreement.vue +298 -0
  48. package/src/filiale/gongyi/android.js +3 -0
  49. package/src/filiale/gongyi/pc/ApplyUpload.vue +31 -39
  50. package/src/filiale/gongyi/pc/PcAddLogs.vue +12 -4
  51. package/src/filiale/gongyi/pc/PcDisclosurerecord.vue +218 -0
  52. package/src/filiale/gongyi/pc/PcLegacyIssues.vue +309 -0
  53. package/src/filiale/gongyi/pc/SupervisoryServiceControl.vue +1 -1
  54. package/src/filiale/gongyi/pc/SupervisoryServiceView.vue +1005 -0
  55. package/src/filiale/gongyi/pc/addMaterialScience.vue +43 -7
  56. package/src/filiale/gongyi/pc/chargeManagement.vue +765 -0
  57. package/src/filiale/gongyi/pc/supplementalAgreement.vue +277 -0
  58. package/src/filiale/gongyi/pc.js +6 -1
  59. package/src/filiale/hongda/pc/SupervisoryList.vue +13 -0
  60. package/src/filiale/jinhuang/pc/ServiceControl.vue +1925 -0
  61. package/src/filiale/jinhuang/pc/chargeManagementNew.vue +589 -0
  62. package/src/filiale/jinhuang/pc.js +7 -0
  63. package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -0
  64. package/src/filiale/qianneng/android/AppExplorationUser.vue +38 -0
  65. package/src/filiale/qianneng/android/AppInstallationDetails.vue +20 -11
  66. package/src/filiale/qianneng/android.js +2 -1
  67. package/src/filiale/qianneng/pc/ApplyUpload.vue +5 -4
  68. package/src/filiale/qianneng/pc/Applybatchdispatch.vue +11 -6
  69. package/src/filiale/qianneng/pc/Applydetail.vue +0 -5
  70. package/src/filiale/qianneng/pc/InstallFunction.vue +2 -2
  71. package/src/filiale/qianneng/pc/InstallationDetails.vue +32 -4
  72. package/src/filiale/qianneng/pc/ServiceControl.vue +1 -0
  73. package/src/filiale/qianneng/pc/printactivatecard.vue +6 -6
  74. package/src/filiale/ruihua/pc/InstallationDetails.vue +610 -610
  75. package/src/filiale/ruihua/pc/ServiceControl.vue +20 -0
  76. package/src/filiale/ruihua/pc/printVentilation.vue +21 -6
  77. package/src/filiale/ruihua/pc.js +12 -12
  78. package/src/filiale/shexian/android/AppServiceControl.vue +12 -2
  79. package/src/filiale/shexian/android/AppTakePic.vue +15 -55
  80. package/src/filiale/siyangRH/android/AppAddMaterialScience.vue +0 -2
  81. package/src/filiale/siyangRH/pc/chargeManagement.vue +810 -0
  82. package/src/filiale/siyangRH/pc.js +1 -0
  83. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +16 -1
  84. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +32 -2
  85. package/src/filiale/yangchunboneng/android/AppExplorationUser.vue +518 -506
  86. package/src/filiale/yangchunboneng/android/AppInstallationMaterial.vue +1083 -1092
  87. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +34 -1
  88. package/src/filiale/yangchunboneng/android/AppSuperServiceControl.vue +1524 -1524
  89. package/src/filiale/yangchunboneng/android/AppUpload.vue +205 -136
  90. package/src/filiale/yangchunboneng/android/MaterIialOne.vue +156 -144
  91. package/src/filiale/yangchunboneng/android.js +20 -20
  92. package/src/filiale/yangchunboneng/pc/ApplyUpload.vue +392 -375
  93. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +59 -19
  94. package/src/filiale/yangchunboneng/pc/ExplorationUser.vue +191 -0
  95. package/src/filiale/yangchunboneng/pc/InstallInfoSelect.vue +365 -365
  96. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +206 -2
  97. package/src/filiale/yangchunboneng/pc/SupervisoryControlNew.vue +142 -0
  98. package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +590 -535
  99. package/src/filiale/yangchunboneng/pc/SupervisoryListNew.vue +628 -0
  100. package/src/filiale/yangchunboneng/pc/SupervisoryServiceControl.vue +902 -0
  101. package/src/filiale/yangchunboneng/pc/SupervisoryServiceControlNew.vue +901 -0
  102. package/src/filiale/yangchunboneng/pc/SupervisoryServiceView.vue +1117 -0
  103. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +111 -13
  104. package/src/filiale/yangchunboneng/pc.js +24 -18
  105. package/src/main.js +1 -1
@@ -1,471 +1,471 @@
1
- <template>
2
- <div>
3
- <data-grid :model="onetomany" class="list_area table_sy">
4
- <template partial='head'>
5
- <tr>
6
- <th class="textNoLineBreak">序号</th>
7
- <th class="textNoLineBreak">材料名称</th>
8
- <th class="textNoLineBreak">材料型号</th>
9
- <th class="textNoLineBreak">材料单位</th>
10
- <th class="textNoLineBreak">材料数量</th>
11
- <th class="textNoLineBreak">材料编号</th>
12
- <th class="textNoLineBreak">材料标识</th>
13
- <th class="textNoLineBreak">用户编号</th>
14
- <th class="textNoLineBreak">
15
- <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加</button>
16
- <button type="button" class="btn btn-info head-but" v-if="$parent.$parent.mark === 0"
17
- @click="$parent.$parent.showFile = !$parent.$parent.showFile">导入</button>
18
- <a type="button" class="btn btn-info head-but" v-if="$parent.$parent.mark === 0"
19
- href="/apply/download/excel/材料明细.xlsx" download>模板下载</a>
20
- </th>
21
- </tr>
22
- </template>
23
- <template partial='body'>
24
- <tr>
25
- <td style="text-align: center;">
26
- <nobr>{{$index+1}}</nobr>
27
- </td>
28
- <td style="text-align: center;">
29
- <nobr>{{row.f_material_name}}</nobr>
30
- </td>
31
- <td style="text-align: center;">
32
- <nobr>{{row.f_material_style}}</nobr>
33
- </td>
34
- <td style="text-align: center;">
35
- <nobr>{{row.f_material_unit}}</nobr>
36
- </td>
37
- <td style="text-align: center;">
38
- <nobr>{{row.f_material_number}}</nobr>
39
- </td>
40
- <td style="text-align: center;">
41
- <nobr>{{row.f_bjq_sid}}</nobr>
42
- </td>
43
- <td style="text-align: center;">
44
- <nobr>{{row.f_material_code}}</nobr>
45
- </td>
46
- <td style="text-align: center;">
47
- <nobr>{{row.f_userinfo_code}}</nobr>
48
- </td>
49
- <td style="text-align: center;">
50
- <button type="button" class="button_search button_spacing" @click="$parent.$parent.updateMaterial($index,row)">修改</button>
51
- <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除</button>
52
- </td>
53
- </tr>
54
- </template>
55
- </data-grid>
56
- <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
57
- <header slot="modal-header" class="modal-header">
58
- <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
59
- <h4 class="modal-title">选择文件</h4>
60
- </header>
61
- <article slot="modal-body" class="modal-body">
62
- <div class="form-group">
63
- <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
64
- </div>
65
- </article>
66
- <footer slot="modal-footer" class="modal-footer"></footer>
67
- </modal>
68
- <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
69
- :backdrop="false" :title="title">
70
- <header slot="modal-header" class="modal-header">
71
- <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
72
- <h4 class="modal-title">{{title}}</h4>
73
- </header>
74
- <article slot="modal-body" class="modal-body clearfix">
75
- <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
76
- <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
77
- <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
78
- <div class="col-sm-6 text-right"><button
79
- class="button_delete button_spacing"
80
- @click.prevent="deleteDevicesinfo(i)"
81
- v-if="title === '新增'"
82
- >删除</button></div>
83
- </div>
84
- <div class="form-group col-sm-6">
85
- <label class="col-sm-4 control-label">选择材料:</label>
86
- <div class="col-sm-8">
87
- <input-select
88
- class="select select_list"
89
- :value.sync="item.material"
90
- v-model="item.material"
91
- :options="meterialOptions"
92
- :disable="mark === 1"
93
- @change="modifyOtherValue(i)"
94
- :valueSingle="true"></input-select>
95
- </div>
96
- </div>
97
- <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
98
- <label class="col-sm-4 control-label">材料名称:</label>
99
- <div class="col-sm-8">
100
- <input class="form-control input_view" style="" type="text"
101
- placeholder="材料名称"
102
- v-model="item.f_material_name"
103
- :value="item.f_material_name"
104
- />
105
- </div>
106
- </div>
107
- <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
108
- <label class="col-sm-4 control-label">材料型号:</label>
109
- <div class="col-sm-8">
110
- <input class="form-control input_view" style="" type="text"
111
- placeholder="材料型号"
112
- v-model="item.f_material_style"
113
- :value="item.f_material_style"
114
- />
115
- </div>
116
- </div>
117
- <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
118
- <label class="col-sm-4 control-label">材料单位:</label>
119
- <div class="col-sm-8">
120
- <input class="form-control input_view" style="" type="text"
121
- placeholder="材料单位"
122
- v-model="item.f_material_unit"
123
- :value="item.f_material_unit"
124
- />
125
- </div>
126
- </div>
127
- <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
128
- <label class="col-sm-4 control-label">材料数量:</label>
129
- <div class="col-sm-8">
130
- <input class="form-control input_view" style="" type="number"
131
- placeholder="设备数量"
132
- v-model="item.f_material_number"
133
- :value="item.f_material_number"
134
- />
135
- </div>
136
- </div>
137
- <div class="form-group col-sm-6">
138
- <label class="col-sm-4 control-label">材料编号:</label>
139
- <div class="col-sm-8">
140
- <input class="form-control input_view" style="" type="text"
141
- placeholder="材料编号"
142
- v-model="item.f_bjq_sid"
143
- :value="item.f_bjq_sid"
144
- />
145
- </div>
146
- </div>
147
- <div class="form-group col-sm-6">
148
- <label class="col-sm-4 control-label">材料标识:</label>
149
- <div class="col-sm-8">
150
- <input class="form-control input_view" style=""
151
- placeholder="材料标识"
152
- v-model="item.f_material_code"
153
- :value.sync="item.f_material_code"
154
- />
155
- </div>
156
- </div>
157
-
158
- <div class="form-group col-sm-6">
159
- <label class="col-sm-4 control-label">用户编号:</label>
160
- <div class="col-sm-8">
161
- <input class="form-control input_view" style=""
162
- placeholder="用户编号"
163
- v-model="item.f_userinfo_code"
164
- :value.sync="item.f_userinfo_code"
165
- />
166
- </div>
167
- </div>
168
-
169
- </div>
170
-
171
- </article>
172
- <footer slot="modal-footer" class="modal-footer">
173
- <template v-if="mark !== 1">
174
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
175
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()" :disabled="!$v.valid">确认添加</button>
176
- <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()" :disabled="!$v.valid">确认修改</button>
177
- </template>
178
- </footer>
179
- </modal>
180
- </div>
181
- </template>
182
-
183
- <script>
184
- import {HttpResetClass} from 'vue-client'
185
- import Vue from "vue";
186
- export default {
187
- name: 'addMaterialScience',
188
- props: {
189
- selectdata: {
190
- type: Object
191
- },
192
- mark: {
193
- type: Number,
194
- default: 0
195
- }
196
- },
197
- data () {
198
- return {
199
- showFile: false,
200
- onetomany: {
201
- rows: []
202
- },
203
- title:'新增',
204
- showMaterialModal:false,
205
- materials:[
206
- {
207
- f_material_price:'',
208
- material:'',
209
- f_material_name:'',
210
- f_material_style:'',
211
- f_material_unit:'',
212
- f_material_number:'',
213
- f_bjq_sid:'',
214
- f_material_code:'',
215
- f_userinfo_code:''
216
- }
217
- ],
218
- meterialOptions:[],
219
- row:{},
220
- bjqChecklag:[]
221
- }
222
- },
223
- ready(){
224
- this.getOnetoManyData()
225
- },
226
- methods: {
227
- async getOnetoManyData () {
228
- let data = {
229
- tablename: `t_material_apply`,
230
- condition: `f_process_id='${this.selectdata.f_process_id}'`
231
- }
232
- let res = await this.$resetpost(
233
- 'rs/sql/apply_singleTable',
234
- {data: data},
235
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
236
- )
237
- this.onetomany.rows = res.data
238
- },
239
- async openMaterialModal () {
240
- this.getMateralNames()
241
- this.title = '新增'
242
- this.materials = [
243
- {
244
- f_material_price:'',
245
- material:'',
246
- f_material_name:'',
247
- f_material_style:'',
248
- f_material_unit:'',
249
- f_material_number:'',
250
- f_bjq_sid:'',
251
- f_material_code:'',
252
- f_userinfo_code:''
253
- }
254
- ],
255
- this.showMaterialModal = true
256
- },
257
- closeFile() {
258
- this.showWork = false
259
- this.showFile = false
260
- // 将选的文件清空
261
- this.$refs.file.$el.querySelector('input').value = ''
262
- this.search()
263
- },
264
- deleteDevicesinfo (index) {
265
- this.materials.splice(index, 1)
266
- },
267
- pushMaterial () {
268
- this.materials.push({
269
- f_material_price:'',
270
- material:'',
271
- f_material_name:'',
272
- f_material_style:'',
273
- f_material_unit:'',
274
- f_material_number:'',
275
- f_bjq_sid:'',
276
- f_material_code:'',
277
- f_userinfo_code:''
278
- })
279
- },
280
- // 获取模态框材料
281
- async getMateralNames () {
282
- let data = {
283
- condition: `1=1`
284
- }
285
- let http = new HttpResetClass()
286
- let res = await http.load(
287
- 'POST',
288
- `rs/sql/getStockMaterial`,
289
- {data: data},
290
- {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
291
- )
292
-
293
- this.meterialOptions = res.data.map(item => {
294
- return {
295
- 'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}--${item.f_material_code}`,
296
- 'value': item
297
- }
298
- })
299
- },
300
- modifyOtherValue (index){
301
- console.log("进来了",index)
302
- console.log("dddd",this.materials[index].material)
303
- if(this.materials[index].material){
304
- let material = this.materials[index].material
305
- this.materials[index].f_material_price= material.f_material_price
306
- this.materials[index].f_material_name = material.f_material_name
307
- this.materials[index].f_material_style = material.f_material_style
308
- this.materials[index].f_material_unit = material.f_material_unit
309
- this.materials[index].f_material_number = material.f_material_number
310
- this.materials[index].f_material_code = material.f_material_code
311
- this.materials[index].f_userinfo_code = material.f_userinfo_code
312
- }else {
313
- this.materials[index].f_material_price=''
314
- this.materials[index].f_material_name =''
315
- this.materials[index].f_material_style =''
316
- this.materials[index].f_material_unit =''
317
- this.materials[index].f_material_number = ''
318
- this.materials[index].f_material_code =''
319
- this.materials[index].f_userinfo_code = ''
320
- }
321
-
322
- },
323
- // 新增材料
324
- async addMaterial () {
325
- console.log("登录信息:",this.$login.f)
326
- this.title = '新增'
327
- let data = {
328
- f_process_id : this.selectdata.f_process_id,
329
- f_operator_id: this.$login.f.id,
330
- f_operator: this.$login.f.name,
331
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
332
- f_orgid: this.$login.f.orgid,
333
- f_orgname: this.$login.f.orgs,
334
- materials:this.materials
335
- }
336
- //报警器流程 设备编号检验
337
- await this.bjqCheck()
338
- console.log("这是bjqChecklag数据:",this.bjqChecklag)
339
- if (this.bjqChecklag.length > 0){
340
- return
341
- }
342
- let res = await this.$resetpost(
343
- `rs/logic/saveMaterials`,
344
- data
345
- )
346
- this.closeMaterials()
347
- },
348
- async deleteMaterial (row) {
349
- var show1 = window.confirm('您确定要删除这条记录吗?')
350
- if(show1 != true){
351
- this.closeMaterials()
352
- }else{
353
- debugger
354
- let http = new HttpResetClass()
355
- let res = await http.load(
356
- 'POST',
357
- `rs/logic/deleteMaterial`,
358
- {data: row},
359
- {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
360
- )
361
- this.closeMaterials()
362
- }
363
-
364
- },
365
- async updateMaterial (index,row) {
366
- this.title = '修改'
367
- this.row = row
368
- this.getMateralNames()
369
- this.materials = [
370
- {
371
- material:'',
372
- f_material_price:row.f_material_price,
373
- f_material_name:row.f_material_name,
374
- f_material_style:row.f_material_style,
375
- f_material_unit:row.f_material_unit,
376
- f_material_number:row.f_material_number,
377
- f_material_code:row.f_material_code,
378
- f_userinfo_code:row.f_userinfo_code,
379
- f_bjq_sid: row.f_bjq_sid
380
- }
381
- ]
382
- this.showMaterialModal = true
383
- },
384
- async updateConfirm () {
385
- let data = this.row
386
- data.f_material_price = this.materials[0].f_material_price
387
- data.f_material_name = this.materials[0].f_material_name
388
- data.f_material_style = this.materials[0].f_material_style
389
- data.f_material_unit = this.materials[0].f_material_unit
390
- data.f_material_number = this.materials[0].f_material_number
391
- data.f_material_code = this.materials[0].f_material_code
392
- data.f_bjq_sid = this.materials[0].f_bjq_sid
393
- data.f_userinfo_code = this.materials[0].f_userinfo_code
394
- //报警器流程 设备编号检验
395
- await this.bjqCheck()
396
- if (this.bjqChecklag.length > 0){
397
- return
398
- }
399
- let res = await this.$resetpost(
400
- `rs/entity/t_material_apply`,
401
- data
402
- )
403
- this.closeMaterials()
404
- },
405
- sycronizedCode(index,val){
406
- console.log("看看:",index,val)
407
- this.materials[index].f_material_code = val
408
- },
409
- closeMaterials () {
410
- this.getOnetoManyData()
411
- this.showMaterialModal = false
412
- },
413
- async bjqCheck(){
414
- //报警器设备型号校验
415
- this.bjqChecklag = [] //初始化
416
- if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
417
- let bjqinfo = {
418
- f_material_name : "",
419
- f_bjq_sid: ""
420
- }
421
- for (const bjqinfoElement of this.materials) {
422
- bjqinfo.f_bjq_sid = bjqinfoElement.f_bjq_sid
423
- bjqinfo.f_material_name = bjqinfoElement.f_material_name
424
- if (bjqinfo.f_material_name.substr(0,3) === '报警器'){
425
- let http = new HttpResetClass()
426
- let res = await http.load(
427
- 'POST',
428
- // `/rs/logic/bjqcheck`,
429
- `ncc/rs/logic/bjqcheck`,
430
- bjqinfo
431
- )
432
- if (res.data.code != 200){
433
- this.bjqChecklag.push(res.data.code)
434
- // this.$showMessage(res.data.msg)
435
- Vue.showAlert(res.data.msg, 'danger', 6000)
436
- return
437
- }
438
- }
439
- }
440
- }
441
- }
442
- },
443
- events: {
444
- 'beforeFileUpload' (file) {
445
- this.showWork = true
446
- },
447
- async 'onFileUpload'(file, result) {
448
- let data = {
449
- selectdata: this.selectdata,
450
- filepath: result.f_downloadpath,
451
- user: this.$login.f
452
- }
453
- try {
454
- let res = await this.$resetpost(`rs/logic/importMaterial`, {data: data}, {
455
- resolveMsg: null,
456
- rejectMsg: '导入失败!!!',
457
- silent: true
458
- }, 0)
459
- } catch (e) {
460
- this.closeFile()
461
- }
462
- this.$dispatch('breakControl', this.selectdata)
463
- }
464
- },
465
- }
466
-
467
- </script>
468
-
469
- <style scoped>
470
-
471
- </style>
1
+ <template>
2
+ <div>
3
+ <data-grid :model="onetomany" class="list_area table_sy">
4
+ <template partial='head'>
5
+ <tr>
6
+ <th class="textNoLineBreak">序号</th>
7
+ <th class="textNoLineBreak">材料名称</th>
8
+ <th class="textNoLineBreak">材料型号</th>
9
+ <th class="textNoLineBreak">材料单位</th>
10
+ <th class="textNoLineBreak">材料数量</th>
11
+ <th class="textNoLineBreak">材料编号</th>
12
+ <th class="textNoLineBreak">材料标识</th>
13
+ <th class="textNoLineBreak">用户编号</th>
14
+ <th class="textNoLineBreak">
15
+ <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加</button>
16
+ <button type="button" class="btn btn-info head-but" v-if="$parent.$parent.mark === 0"
17
+ @click="$parent.$parent.showFile = !$parent.$parent.showFile">导入</button>
18
+ <a type="button" class="btn btn-info head-but" v-if="$parent.$parent.mark === 0"
19
+ href="/apply/download/excel/材料明细.xlsx" download>模板下载</a>
20
+ </th>
21
+ </tr>
22
+ </template>
23
+ <template partial='body'>
24
+ <tr>
25
+ <td style="text-align: center;">
26
+ <nobr>{{$index+1}}</nobr>
27
+ </td>
28
+ <td style="text-align: center;">
29
+ <nobr>{{row.f_material_name}}</nobr>
30
+ </td>
31
+ <td style="text-align: center;">
32
+ <nobr>{{row.f_material_style}}</nobr>
33
+ </td>
34
+ <td style="text-align: center;">
35
+ <nobr>{{row.f_material_unit}}</nobr>
36
+ </td>
37
+ <td style="text-align: center;">
38
+ <nobr>{{row.f_material_number}}</nobr>
39
+ </td>
40
+ <td style="text-align: center;">
41
+ <nobr>{{row.f_bjq_sid}}</nobr>
42
+ </td>
43
+ <td style="text-align: center;">
44
+ <nobr>{{row.f_material_code}}</nobr>
45
+ </td>
46
+ <td style="text-align: center;">
47
+ <nobr>{{row.f_userinfo_code}}</nobr>
48
+ </td>
49
+ <td style="text-align: center;">
50
+ <button type="button" class="button_search button_spacing" @click="$parent.$parent.updateMaterial($index,row)">修改</button>
51
+ <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除</button>
52
+ </td>
53
+ </tr>
54
+ </template>
55
+ </data-grid>
56
+ <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
57
+ <header slot="modal-header" class="modal-header">
58
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
59
+ <h4 class="modal-title">选择文件</h4>
60
+ </header>
61
+ <article slot="modal-body" class="modal-body">
62
+ <div class="form-group">
63
+ <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
64
+ </div>
65
+ </article>
66
+ <footer slot="modal-footer" class="modal-footer"></footer>
67
+ </modal>
68
+ <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
69
+ :backdrop="false" :title="title">
70
+ <header slot="modal-header" class="modal-header">
71
+ <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
72
+ <h4 class="modal-title">{{title}}</h4>
73
+ </header>
74
+ <article slot="modal-body" class="modal-body clearfix">
75
+ <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
76
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
77
+ <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
78
+ <div class="col-sm-6 text-right"><button
79
+ class="button_delete button_spacing"
80
+ @click.prevent="deleteDevicesinfo(i)"
81
+ v-if="title === '新增'"
82
+ >删除</button></div>
83
+ </div>
84
+ <div class="form-group col-sm-6">
85
+ <label class="col-sm-4 control-label">选择材料:</label>
86
+ <div class="col-sm-8">
87
+ <input-select
88
+ class="select select_list"
89
+ :value.sync="item.material"
90
+ v-model="item.material"
91
+ :options="meterialOptions"
92
+ :disable="mark === 1"
93
+ @change="modifyOtherValue(i)"
94
+ :valueSingle="true"></input-select>
95
+ </div>
96
+ </div>
97
+ <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
98
+ <label class="col-sm-4 control-label">材料名称:</label>
99
+ <div class="col-sm-8">
100
+ <input class="form-control input_view" style="" type="text"
101
+ placeholder="材料名称"
102
+ v-model="item.f_material_name"
103
+ :value="item.f_material_name"
104
+ />
105
+ </div>
106
+ </div>
107
+ <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
108
+ <label class="col-sm-4 control-label">材料型号:</label>
109
+ <div class="col-sm-8">
110
+ <input class="form-control input_view" style="" type="text"
111
+ placeholder="材料型号"
112
+ v-model="item.f_material_style"
113
+ :value="item.f_material_style"
114
+ />
115
+ </div>
116
+ </div>
117
+ <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
118
+ <label class="col-sm-4 control-label">材料单位:</label>
119
+ <div class="col-sm-8">
120
+ <input class="form-control input_view" style="" type="text"
121
+ placeholder="材料单位"
122
+ v-model="item.f_material_unit"
123
+ :value="item.f_material_unit"
124
+ />
125
+ </div>
126
+ </div>
127
+ <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
128
+ <label class="col-sm-4 control-label">材料数量:</label>
129
+ <div class="col-sm-8">
130
+ <input class="form-control input_view" style="" type="number"
131
+ placeholder="设备数量"
132
+ v-model="item.f_material_number"
133
+ :value="item.f_material_number"
134
+ />
135
+ </div>
136
+ </div>
137
+ <div class="form-group col-sm-6">
138
+ <label class="col-sm-4 control-label">材料编号:</label>
139
+ <div class="col-sm-8">
140
+ <input class="form-control input_view" style="" type="text"
141
+ placeholder="材料编号"
142
+ v-model="item.f_bjq_sid"
143
+ :value="item.f_bjq_sid"
144
+ />
145
+ </div>
146
+ </div>
147
+ <div class="form-group col-sm-6">
148
+ <label class="col-sm-4 control-label">材料标识:</label>
149
+ <div class="col-sm-8">
150
+ <input class="form-control input_view" style=""
151
+ placeholder="材料标识"
152
+ v-model="item.f_material_code"
153
+ :value.sync="item.f_material_code"
154
+ />
155
+ </div>
156
+ </div>
157
+
158
+ <div class="form-group col-sm-6">
159
+ <label class="col-sm-4 control-label">用户编号:</label>
160
+ <div class="col-sm-8">
161
+ <input class="form-control input_view" style=""
162
+ placeholder="用户编号"
163
+ v-model="item.f_userinfo_code"
164
+ :value.sync="item.f_userinfo_code"
165
+ />
166
+ </div>
167
+ </div>
168
+
169
+ </div>
170
+
171
+ </article>
172
+ <footer slot="modal-footer" class="modal-footer">
173
+ <template v-if="mark !== 1">
174
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
175
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()" :disabled="!$v.valid">确认添加</button>
176
+ <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()" :disabled="!$v.valid">确认修改</button>
177
+ </template>
178
+ </footer>
179
+ </modal>
180
+ </div>
181
+ </template>
182
+
183
+ <script>
184
+ import {HttpResetClass} from 'vue-client'
185
+ import Vue from "vue";
186
+ export default {
187
+ name: 'addMaterialScience',
188
+ props: {
189
+ selectdata: {
190
+ type: Object
191
+ },
192
+ mark: {
193
+ type: Number,
194
+ default: 0
195
+ }
196
+ },
197
+ data () {
198
+ return {
199
+ showFile: false,
200
+ onetomany: {
201
+ rows: []
202
+ },
203
+ title:'新增',
204
+ showMaterialModal:false,
205
+ materials:[
206
+ {
207
+ f_material_price:'',
208
+ material:'',
209
+ f_material_name:'',
210
+ f_material_style:'',
211
+ f_material_unit:'',
212
+ f_material_number:'',
213
+ f_bjq_sid:'',
214
+ f_material_code:'',
215
+ f_userinfo_code:''
216
+ }
217
+ ],
218
+ meterialOptions:[],
219
+ row:{},
220
+ bjqChecklag:[]
221
+ }
222
+ },
223
+ ready(){
224
+ this.getOnetoManyData()
225
+ },
226
+ methods: {
227
+ async getOnetoManyData () {
228
+ let data = {
229
+ tablename: `t_material_apply`,
230
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
231
+ }
232
+ let res = await this.$resetpost(
233
+ 'rs/sql/apply_singleTable',
234
+ {data: data},
235
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
236
+ )
237
+ this.onetomany.rows = res.data
238
+ },
239
+ async openMaterialModal () {
240
+ this.getMateralNames()
241
+ this.title = '新增'
242
+ this.materials = [
243
+ {
244
+ f_material_price:'',
245
+ material:'',
246
+ f_material_name:'',
247
+ f_material_style:'',
248
+ f_material_unit:'',
249
+ f_material_number:'',
250
+ f_bjq_sid:'',
251
+ f_material_code:'',
252
+ f_userinfo_code:''
253
+ }
254
+ ],
255
+ this.showMaterialModal = true
256
+ },
257
+ closeFile() {
258
+ this.showWork = false
259
+ this.showFile = false
260
+ // 将选的文件清空
261
+ this.$refs.file.$el.querySelector('input').value = ''
262
+ this.search()
263
+ },
264
+ deleteDevicesinfo (index) {
265
+ this.materials.splice(index, 1)
266
+ },
267
+ pushMaterial () {
268
+ this.materials.push({
269
+ f_material_price:'',
270
+ material:'',
271
+ f_material_name:'',
272
+ f_material_style:'',
273
+ f_material_unit:'',
274
+ f_material_number:'',
275
+ f_bjq_sid:'',
276
+ f_material_code:'',
277
+ f_userinfo_code:''
278
+ })
279
+ },
280
+ // 获取模态框材料
281
+ async getMateralNames () {
282
+ let data = {
283
+ condition: `1=1`
284
+ }
285
+ let http = new HttpResetClass()
286
+ let res = await http.load(
287
+ 'POST',
288
+ `rs/sql/getStockMaterial`,
289
+ {data: data},
290
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
291
+ )
292
+
293
+ this.meterialOptions = res.data.map(item => {
294
+ return {
295
+ 'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}--${item.f_material_code}`,
296
+ 'value': item
297
+ }
298
+ })
299
+ },
300
+ modifyOtherValue (index){
301
+ console.log("进来了",index)
302
+ console.log("dddd",this.materials[index].material)
303
+ if(this.materials[index].material){
304
+ let material = this.materials[index].material
305
+ this.materials[index].f_material_price= material.f_material_price
306
+ this.materials[index].f_material_name = material.f_material_name
307
+ this.materials[index].f_material_style = material.f_material_style
308
+ this.materials[index].f_material_unit = material.f_material_unit
309
+ this.materials[index].f_material_number = material.f_material_number
310
+ this.materials[index].f_material_code = material.f_material_code
311
+ this.materials[index].f_userinfo_code = material.f_userinfo_code
312
+ }else {
313
+ this.materials[index].f_material_price=''
314
+ this.materials[index].f_material_name =''
315
+ this.materials[index].f_material_style =''
316
+ this.materials[index].f_material_unit =''
317
+ this.materials[index].f_material_number = ''
318
+ this.materials[index].f_material_code =''
319
+ this.materials[index].f_userinfo_code = ''
320
+ }
321
+
322
+ },
323
+ // 新增材料
324
+ async addMaterial () {
325
+ console.log("登录信息:",this.$login.f)
326
+ this.title = '新增'
327
+ let data = {
328
+ f_process_id : this.selectdata.f_process_id,
329
+ f_operator_id: this.$login.f.id,
330
+ f_operator: this.$login.f.name,
331
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
332
+ f_orgid: this.$login.f.orgid,
333
+ f_orgname: this.$login.f.orgs,
334
+ materials:this.materials
335
+ }
336
+ //报警器流程 设备编号检验
337
+ await this.bjqCheck()
338
+ console.log("这是bjqChecklag数据:",this.bjqChecklag)
339
+ if (this.bjqChecklag.length > 0){
340
+ return
341
+ }
342
+ let res = await this.$resetpost(
343
+ `rs/logic/saveMaterials`,
344
+ data
345
+ )
346
+ this.closeMaterials()
347
+ },
348
+ async deleteMaterial (row) {
349
+ var show1 = window.confirm('您确定要删除这条记录吗?')
350
+ if(show1 != true){
351
+ this.closeMaterials()
352
+ }else{
353
+ debugger
354
+ let http = new HttpResetClass()
355
+ let res = await http.load(
356
+ 'POST',
357
+ `rs/logic/deleteMaterial`,
358
+ {data: row},
359
+ {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
360
+ )
361
+ this.closeMaterials()
362
+ }
363
+
364
+ },
365
+ async updateMaterial (index,row) {
366
+ this.title = '修改'
367
+ this.row = row
368
+ this.getMateralNames()
369
+ this.materials = [
370
+ {
371
+ material:'',
372
+ f_material_price:row.f_material_price,
373
+ f_material_name:row.f_material_name,
374
+ f_material_style:row.f_material_style,
375
+ f_material_unit:row.f_material_unit,
376
+ f_material_number:row.f_material_number,
377
+ f_material_code:row.f_material_code,
378
+ f_userinfo_code:row.f_userinfo_code,
379
+ f_bjq_sid: row.f_bjq_sid
380
+ }
381
+ ]
382
+ this.showMaterialModal = true
383
+ },
384
+ async updateConfirm () {
385
+ let data = this.row
386
+ data.f_material_price = this.materials[0].f_material_price
387
+ data.f_material_name = this.materials[0].f_material_name
388
+ data.f_material_style = this.materials[0].f_material_style
389
+ data.f_material_unit = this.materials[0].f_material_unit
390
+ data.f_material_number = this.materials[0].f_material_number
391
+ data.f_material_code = this.materials[0].f_material_code
392
+ data.f_bjq_sid = this.materials[0].f_bjq_sid
393
+ data.f_userinfo_code = this.materials[0].f_userinfo_code
394
+ //报警器流程 设备编号检验
395
+ await this.bjqCheck()
396
+ if (this.bjqChecklag.length > 0){
397
+ return
398
+ }
399
+ let res = await this.$resetpost(
400
+ `rs/entity/t_material_apply`,
401
+ data
402
+ )
403
+ this.closeMaterials()
404
+ },
405
+ sycronizedCode(index,val){
406
+ console.log("看看:",index,val)
407
+ this.materials[index].f_material_code = val
408
+ },
409
+ closeMaterials () {
410
+ this.getOnetoManyData()
411
+ this.showMaterialModal = false
412
+ },
413
+ async bjqCheck(){
414
+ //报警器设备型号校验
415
+ this.bjqChecklag = [] //初始化
416
+ if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
417
+ let bjqinfo = {
418
+ f_material_name : "",
419
+ f_bjq_sid: ""
420
+ }
421
+ for (const bjqinfoElement of this.materials) {
422
+ bjqinfo.f_bjq_sid = bjqinfoElement.f_bjq_sid
423
+ bjqinfo.f_material_name = bjqinfoElement.f_material_name
424
+ if (bjqinfo.f_material_name.substr(0,3) === '报警器'){
425
+ let http = new HttpResetClass()
426
+ let res = await http.load(
427
+ 'POST',
428
+ // `/rs/logic/bjqcheck`,
429
+ `ncc/rs/logic/bjqcheck`,
430
+ bjqinfo
431
+ )
432
+ if (res.data.code != 200){
433
+ this.bjqChecklag.push(res.data.code)
434
+ // this.$showMessage(res.data.msg)
435
+ Vue.showAlert(res.data.msg, 'danger', 6000)
436
+ return
437
+ }
438
+ }
439
+ }
440
+ }
441
+ }
442
+ },
443
+ events: {
444
+ 'beforeFileUpload' (file) {
445
+ this.showWork = true
446
+ },
447
+ async 'onFileUpload'(file, result) {
448
+ let data = {
449
+ selectdata: this.selectdata,
450
+ filepath: result.f_downloadpath,
451
+ user: this.$login.f
452
+ }
453
+ try {
454
+ let res = await this.$resetpost(`rs/logic/importMaterial`, {data: data}, {
455
+ resolveMsg: null,
456
+ rejectMsg: '导入失败!!!',
457
+ silent: true
458
+ }, 0)
459
+ } catch (e) {
460
+ this.closeFile()
461
+ }
462
+ this.$dispatch('breakControl', this.selectdata)
463
+ }
464
+ },
465
+ }
466
+
467
+ </script>
468
+
469
+ <style scoped>
470
+
471
+ </style>