apply-clients 3.5.4-8 → 3.5.4-81

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/app/src/main/java/com/example/phonechatbot/MainActivity.java +50 -0
  2. package/build/dev-server.js +12 -4
  3. package/package.json +2 -2
  4. package/src/App.vue +5 -5
  5. package/src/apply.js +2 -3
  6. package/src/applyAndroid.js +2 -0
  7. package/src/assets//344/270/213/350/275/275.png +0 -0
  8. package/src/components/android/AppCheckTakePic.vue +168 -0
  9. package/src/components/android/Process/AppServiceControl.vue +4 -0
  10. package/src/components/android/Process/Processes/AppChargeManagementNew.vue +637 -0
  11. package/src/components/image/dxf.png +0 -0
  12. package/src/components/product/Function/Service/FunctionServiceControl.vue +497 -497
  13. package/src/components/product/Material/MaterialDetailed.vue +1 -1
  14. package/src/components/product/MaterialsManage/MaterialsBase.vue +181 -177
  15. package/src/components/product/MaterialsManage/MaterialsManage.vue +60 -60
  16. package/src/components/product/PcZhihuanManagement.vue +160 -0
  17. package/src/components/product/Process/ExplorationSelect.vue +4 -1
  18. package/src/components/product/Process/ExplorationUser.vue +1 -0
  19. package/src/components/product/Process/Processes/chargeManagement.vue +656 -656
  20. package/src/components/product/ServiceView.vue +1026 -1005
  21. package/src/components/product/Supervisory/SupervisoryControl.vue +1 -0
  22. package/src/filiale/baiyin/android/AppServiceControl.vue +1762 -0
  23. package/src/filiale/baiyin/android/ByAddMaterialScience.vue +824 -0
  24. package/src/filiale/baiyin/android/ByDeviceManagement.vue +916 -0
  25. package/src/filiale/baiyin/android.js +8 -0
  26. package/src/filiale/fugou/android/AppAddMaterialScience.vue +448 -0
  27. package/src/filiale/fugou/android/AppAddReplacement.vue +341 -0
  28. package/src/filiale/fugou/android/AppChargeManagement.vue +126 -12
  29. package/src/filiale/fugou/android/AppDevicesManagement.vue +519 -0
  30. package/src/filiale/fugou/android/AppInstallationDetails.vue +541 -0
  31. package/src/filiale/fugou/android/AppServiceControl.vue +38 -5
  32. package/src/filiale/fugou/android/AppZhihuanManagement.vue +191 -0
  33. package/src/filiale/fugou/android.js +7 -1
  34. package/src/filiale/fugou/pc/AddReplacement.vue +340 -0
  35. package/src/filiale/fugou/pc/ExplorationSelect.vue +525 -0
  36. package/src/filiale/fugou/pc/InstallationDetails.vue +54 -43
  37. package/src/filiale/fugou/pc/ServiceControl.vue +125 -379
  38. package/src/filiale/fugou/pc/ServiceView.vue +941 -0
  39. package/src/filiale/fugou/pc/addMaterialScience.vue +481 -0
  40. package/src/filiale/fugou/pc/addressAndUserinfoManagement.vue +216 -0
  41. package/src/filiale/fugou/pc/devicesManagement.vue +483 -0
  42. package/src/filiale/fugou/pc.js +7 -1
  43. package/src/filiale/gongyi/android/AppAddMaterialScience.vue +20 -8
  44. package/src/filiale/gongyi/android/AppDisclosurerecord.vue +214 -0
  45. package/src/filiale/gongyi/android/AppInstallationDetails.vue +500 -495
  46. package/src/filiale/gongyi/android/AppLegacyIssues.vue +309 -0
  47. package/src/filiale/gongyi/android/AppSign.vue +170 -157
  48. package/src/filiale/gongyi/android/AppSupplementalAgreement.vue +298 -0
  49. package/src/filiale/gongyi/android.js +18 -15
  50. package/src/filiale/gongyi/pc/ApplyUpload.vue +371 -379
  51. package/src/filiale/gongyi/pc/PcAddLogs.vue +221 -213
  52. package/src/filiale/gongyi/pc/PcDisclosurerecord.vue +218 -0
  53. package/src/filiale/gongyi/pc/PcLegacyIssues.vue +309 -0
  54. package/src/filiale/gongyi/pc/SupervisoryServiceControl.vue +894 -894
  55. package/src/filiale/gongyi/pc/SupervisoryServiceView.vue +1005 -0
  56. package/src/filiale/gongyi/pc/addMaterialScience.vue +575 -539
  57. package/src/filiale/gongyi/pc/chargeManagement.vue +765 -0
  58. package/src/filiale/gongyi/pc/supplementalAgreement.vue +277 -0
  59. package/src/filiale/gongyi/pc.js +24 -19
  60. package/src/filiale/hongda/pc/SupervisoryList.vue +422 -409
  61. package/src/filiale/jinhuang/pc/ServiceControl.vue +1925 -0
  62. package/src/filiale/jinhuang/pc/chargeManagementNew.vue +589 -0
  63. package/src/filiale/jinhuang/pc.js +7 -0
  64. package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -0
  65. package/src/filiale/qianneng/android/AppExplorationUser.vue +490 -490
  66. package/src/filiale/qianneng/android/AppInstallationDetails.vue +541 -541
  67. package/src/filiale/qianneng/android.js +2 -1
  68. package/src/filiale/qianneng/pc/ApplyUpload.vue +5 -4
  69. package/src/filiale/qianneng/pc/Applybatchdispatch.vue +704 -704
  70. package/src/filiale/qianneng/pc/Applydetail.vue +0 -5
  71. package/src/filiale/qianneng/pc/InstallFunction.vue +2 -2
  72. package/src/filiale/qianneng/pc/InstallationDetails.vue +614 -587
  73. package/src/filiale/qianneng/pc/ServiceControl.vue +1384 -1384
  74. package/src/filiale/qianneng/pc/printactivatecard.vue +311 -311
  75. package/src/filiale/ruihua/pc/ServiceControl.vue +20 -0
  76. package/src/filiale/ruihua/pc/printVentilation.vue +21 -6
  77. package/src/filiale/shexian/android/AppServiceControl.vue +12 -2
  78. package/src/filiale/shexian/android/AppTakePic.vue +15 -55
  79. package/src/filiale/siyangRH/android/AppAddMaterialScience.vue +0 -2
  80. package/src/filiale/siyangRH/pc/ApplyUpload.vue +324 -324
  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 +17 -1
  84. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +32 -2
  85. package/src/filiale/yangchunboneng/android/AppExplorationUser.vue +12 -0
  86. package/src/filiale/yangchunboneng/android/AppInstallationMaterial.vue +956 -961
  87. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +34 -1
  88. package/src/filiale/yangchunboneng/android/AppSuperServiceControl.vue +1 -1
  89. package/src/filiale/yangchunboneng/android/AppUpload.vue +78 -9
  90. package/src/filiale/yangchunboneng/android/MaterIialOne.vue +31 -19
  91. package/src/filiale/yangchunboneng/android.js +1 -1
  92. package/src/filiale/yangchunboneng/pc/ApplyUpload.vue +235 -218
  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/ServiceControl.vue +207 -3
  96. package/src/filiale/yangchunboneng/pc/SupervisoryControlNew.vue +142 -0
  97. package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +69 -14
  98. package/src/filiale/yangchunboneng/pc/SupervisoryListNew.vue +628 -0
  99. package/src/filiale/yangchunboneng/pc/SupervisoryServiceControl.vue +902 -0
  100. package/src/filiale/yangchunboneng/pc/SupervisoryServiceControlNew.vue +901 -0
  101. package/src/filiale/yangchunboneng/pc/SupervisoryServiceView.vue +1117 -0
  102. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +112 -13
  103. package/src/filiale/yangchunboneng/pc.js +7 -1
  104. package/src/main.js +3 -3
  105. package/~/chatbot/main.py +57 -0
@@ -0,0 +1,916 @@
1
+ <template>
2
+ <div class="auto">
3
+ <div class="form-inline auto" style="margin-bottom: 5px;width: 100%">
4
+ <div class="col-sm-12 span recordTable" style="margin-top: 10px;height:auto;">
5
+ <partial-view v-ref:single-load>
6
+ <data-grid :model="model" v-ref:grid>
7
+ <template partial='head'>
8
+ <tr>
9
+ <th>序号</th>
10
+ <th>设备类型</th>
11
+ <th>设备编码</th>
12
+ <th>设备品牌</th>
13
+ <th>设备数量</th>
14
+ <th>操作</th>
15
+ <th class="textNoLineBreak">
16
+ <button class="button_new button_spacing" type="button" @click="$parent.$parent.$parent.addDetailed()">添加
17
+ </button>
18
+ </th>
19
+ </tr>
20
+ </template>
21
+ <template partial='body'>
22
+ <td >{{$index+1}}</td>
23
+ <td >{{row.f_devices_type}}</td>
24
+ <td >{{row.f_devices_no}}</td>
25
+ <td >{{row.f_brand}}</td>
26
+ <td >{{row.f_devices_model}}</td>
27
+ <td class="" v-show="$parent.$parent.$parent.showprint">
28
+ <button type="button" name="button" class="btn btn-link" :disabled="row.f_effective_state == '无效'"
29
+ @click.stop="$parent.$parent.$parent.tovoid(row)">作废
30
+ </button>
31
+ <button type="button" name="button" class="btn btn-link"
32
+ @click.stop="$parent.$parent.$parent.modifyParam(row)">修改
33
+ </button>
34
+ </td>
35
+ </template>
36
+ </data-grid>
37
+
38
+ </partial-view>
39
+ </div>
40
+ </div>
41
+ <modal :show.sync="addshow" v-ref:modal backdrop="false">
42
+ <header slot="modal-header" class="modal-header">
43
+ <button type="button" class="close" @click="addclose"><span>&times;</span></button>
44
+ <h4 class="modal-title">添加设备</h4>
45
+ </header>
46
+ <article slot="modal-body" class="modal-body">
47
+ <div class="from-group">
48
+ <label>设备类型</label>
49
+ <select class="form-control" v-model="selectItem.f_devices_type" >
50
+ <option value='热水器'>热水器</option>
51
+ <option value='家用灶具'>家用灶具</option>
52
+ <option value='壁挂炉'>壁挂炉</option>
53
+ <option value='其他'>其他</option>
54
+ </select>
55
+ </div>
56
+ <div class="from-group">
57
+ <label>设备编码</label>
58
+ <input type="text" class="form-control" v-model="selectItem.f_devices_no">
59
+ </div>
60
+ <div class="from-group">
61
+ <label>设备品牌</label>
62
+ <input type="text" class="form-control" v-model="selectItem.f_brand">
63
+ </div>
64
+ <div class="from-group">
65
+ <label>设备数量</label>
66
+ <input type="number" class="form-control" v-model="selectItem.f_devices_model">
67
+ </div>
68
+ </article>
69
+ <footer slot="modal-footer" class="modal-footer">
70
+ <div class="from-group" style="width: 100%;height: 50px" >
71
+ <button v-show="addshow" type="button" class="btn btn-default" @click='close'>取消</button>
72
+ <button v-show="addshow" type="button" class="btn btn-success" @click='confirm'>确认</button>
73
+ </div>
74
+ </footer>
75
+ </modal>
76
+ <modal :show.sync="show" v-ref:modal backdrop="false">
77
+ <header slot="modal-header" class="modal-header">
78
+ <button type="button" class="close" @click="close"><span>&times;</span></button>
79
+ <h4 class="modal-title">修改明细</h4>
80
+ </header>
81
+ <article slot="modal-body" class="modal-body">
82
+ <div class="from-group">
83
+ <label>设备类型</label>
84
+ <input type="select" class="form-control" v-model="selectItem.f_devices_type" readonly>
85
+ </div>
86
+ <div class="from-group">
87
+ <label>设备品牌</label>
88
+ <input type="text" class="form-control" v-model="selectItem.f_devices_no" readonly>
89
+ </div>
90
+ <div class="from-group">
91
+ <label>设备品牌</label>
92
+ <input type="text" class="form-control" v-model="selectItem.f_brand" readonly>
93
+ </div>
94
+ <div class="from-group">
95
+ <label>设备数量</label>
96
+ <input type="number" class="form-control" v-model="selectItem.f_devices_model">
97
+ </div>
98
+ </article>
99
+ <footer slot="modal-footer" class="modal-footer">
100
+ <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
101
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm'>确认</button>
102
+ </footer>
103
+ </modal>
104
+ </div>
105
+ </template>
106
+
107
+ <script>
108
+ import {HttpResetClass} from 'vue-client'
109
+ import co from 'co'
110
+ import Vue from 'vue'
111
+ let insert = async function (self) {
112
+ let param = {
113
+ processid: self.selectdata.f_process_id,
114
+ f_apply_num: self.selectdata.f_apply_num,
115
+ f_filiale: self.selectdata.f_filiale,
116
+ f_parentname: Vue.user.f_parentname,
117
+ f_input_person: Vue.user.name,
118
+ f_user_id:Vue.user.f_user_id,
119
+ f_state: '有效'
120
+ }
121
+ console.log('新增批次', param)
122
+ self.$resetpost(`${self.$androidUtil.getProxyUrl()}/rs/entity/t_devices`, param).then(() => {
123
+ // this.params.rows.splice(index, 1)
124
+ console.log('更新成功!')
125
+ self.getaaa()
126
+ })
127
+ }
128
+ let insertdetail = async function (self) {
129
+ let data = {
130
+ f_batch_name: self.model.f_batch_name[0],
131
+ f_batch_code: self.model.f_batch_code[0],
132
+ f_apply_num: self.selectdata.f_apply_num,
133
+ f_batch_id: self.batch_id,
134
+ }
135
+ console.log('判断数据:', data)
136
+ return await self.$resetpost(`${self.$androidUtil.getProxyUrl()}/rs/logic/insertdetail`, data, {resolveMsg: null, rejectMsg: null}).then((res) => {
137
+ // this.params.rows.splice(index, 1)
138
+ console.log('更新成功!', res)
139
+ if (res.data.batch.length > 0) {
140
+ self.$showMessage("已添加过此设备,请勿重复添加,若要修改数量请点击修改!")
141
+ return false
142
+ } else {
143
+ if (res.data.array.length > 0) {
144
+ let param = {
145
+ f_batch_id: self.batch_id,
146
+ f_apply_num: self.selectdata.f_apply_num,
147
+ f_filiale: self.selectdata.f_filiale,
148
+ f_parentname: Vue.user.f_parentname,
149
+ f_material_operator: Vue.user.name,
150
+ f_batch_name: self.model.f_batch_name[0],
151
+ f_budget_num: self.model.f_budget_num,
152
+ f_surplus_num: self.model.f_budget_num,
153
+ f_add_receive: 0,
154
+ f_receive_num: 0,
155
+ f_revenue_id: res.data.array[0].id,
156
+ f_batch_type: res.data.array[0].f_type,
157
+ f_batch_code: res.data.array[0].f_code,
158
+ f_batch_version: res.data.array[0].f_num,
159
+ f_batch_norms: res.data.array[0].f_format,
160
+ f_batch_company: res.data.array[0].f_unit,
161
+ f_batch_price: res.data.array[0].f_price
162
+ }
163
+ console.log('添加明细:', param)
164
+ self.$resetpost(`${self.$androidUtil.getProxyUrl()}/rs/entity/t_material_list`, param).then(() => {
165
+ // this.params.rows.splice(index, 1)
166
+ console.log('更新成功!')
167
+ self.showdetail(self.batch_id, '有效')
168
+ self.model.f_batch_name = []
169
+ self.model.f_batch_code = []
170
+ self.model.f_batch_version = []
171
+ self.model.f_batch_norms = []
172
+ self.model.f_budget_num = ''
173
+ self.addshow = false
174
+ })
175
+ } else {
176
+ self.$showMessage('此种材料系统中不存在!请检查材料名称')
177
+ }
178
+ }
179
+ })
180
+ }
181
+ let getInfo = async function (self, isbatchdetail, batchid, istoVoidBatch) {
182
+ if (!self.selectdata)
183
+ return
184
+
185
+ if (isbatchdetail == 1) {
186
+ let data = {
187
+ tablename: 't_devices',
188
+ condition: ` id ='${batchid}' `
189
+ }
190
+ let reset = new HttpResetClass()
191
+ await reset.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {resolveMsg: null, rejectMsg: '获取材料信息失败'})
192
+ .then((res) => {
193
+ console.log('查询完毕,返回res.data=>' + JSON.stringify(res.data))
194
+ self.batchmodel.rows = []
195
+ self.batchmodel.rows = res.data
196
+ // 备份用于查询
197
+ /* self.params = res.data*/
198
+ if (istoVoidBatch) {
199
+ console.log('进入istovoidBatch')
200
+ let num = 0
201
+ for (var i = 0; i < self.batchmodel.rows.length; i++) {
202
+ num += self.batchmodel.rows[i].f_add_receive
203
+ console.log(i + 'f_add_receive' + self.batchmodel.rows[i].f_add_receive)
204
+ }
205
+ if (num > 0) {
206
+ self.$showMessage('累计领取数量大于0,不能作废!')
207
+ } else {
208
+ self.$showMessage('作废后不可恢复,确认作废吗?', ['confirm', 'cancel']).then((res) => {
209
+ if (res === 'confirm') {
210
+ self.$resetpost(`${self.$androidUtil.getProxyUrl()}/rs/logic/todevices`, {id: batchid}).then((res) => {
211
+ getInfo(self, 0, 0, false)
212
+ })
213
+ }
214
+ })
215
+ }
216
+ // this.istoVoidBatch=false
217
+ }
218
+
219
+ })
220
+
221
+ } else {
222
+
223
+ let data = {
224
+ tablename: 't_devices',
225
+ condition: `f_process_id = '${self.selectdata.f_process_id}' `
226
+ }
227
+ let reset = new HttpResetClass()
228
+ await reset.load('POST',` ${self.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {resolveMsg: null, rejectMsg: '获取设备信息失败'})
229
+ .then((res) => {
230
+ self.model.rows = []
231
+ self.model.rows = res.data
232
+ self.params = res.data
233
+ })
234
+ }
235
+ }
236
+
237
+
238
+ let gen = function* (self, val) {
239
+ let data = {
240
+ model: {
241
+ f_processid: self.selectdata.f_process_id,
242
+ },
243
+ loginUser: {
244
+ id: Vue.user.id,
245
+ name: Vue.user.name,
246
+ ename: Vue.user.ename
247
+ },
248
+ employeetemplate: self.employeetemplate,// 指派勘察人员
249
+ subdep: '提交'
250
+ }
251
+ console.log('提交前')
252
+ self.$resetpost(`${self.$androidUtil.getProxyUrl()}/rs/logic/grantnext`,
253
+ {data: data})
254
+ .then(() => {
255
+ self.reset()
256
+ })
257
+ }
258
+ export default {
259
+ title: '材料信息',
260
+ props: {
261
+ flag:{
262
+ type: String,
263
+ default: 'cl'
264
+ },
265
+ selectdata: {
266
+ type: Object
267
+ },
268
+ edit: {
269
+ type: Boolean,
270
+ default: true
271
+ },
272
+ state: {
273
+ type: Number
274
+ },
275
+ showprint: {
276
+ type: Boolean,
277
+ default: true
278
+ }
279
+ },
280
+ data() {
281
+ return {
282
+ scrollTop:0, // 添加材料模态框的高度
283
+ searchName:null,
284
+ addshowm:true,
285
+ menulist: null,
286
+ refreshed: true,
287
+ guigeoptions: [],
288
+ xinhaooptions: [],
289
+ materialItem: [],
290
+ codeOptions: [],
291
+ fmaterialtype: [],
292
+ fmaterialname: [],
293
+ fmaterialspec: [],
294
+ fmaterialprice: [],
295
+ params: null,
296
+ record: {},
297
+ selectItem: {},
298
+ isbuttonshow: true,
299
+ model: {
300
+ rows: []
301
+ },
302
+ f_effective_state: [
303
+ {label: '有效', value: '有效'},
304
+ {label: '无效', value: '无效'},
305
+ {label: '全部', value: ''}
306
+ ],
307
+
308
+
309
+ batchmodel: {
310
+ rows: []
311
+ },
312
+ show: false,
313
+ isShow: false,
314
+ isShowdetail: false,
315
+ addshow: false,
316
+ batch_id: 0,
317
+ material: [],
318
+ optionsx: [],
319
+ f_user_name: []
320
+ }
321
+ },
322
+ async ready() {
323
+ this.isShowdetail = false
324
+ getInfo(this, 0, 0, false)
325
+ },
326
+ watch: {
327
+ 'state'() {
328
+ this.f_material_operator = ''
329
+ this.f_picking_stated = ''
330
+ this.f_effective_stated = ''
331
+ },
332
+ deep: true
333
+ },
334
+ computed: {
335
+ async fprice() {
336
+ if (this.selectItem.f_material_type && this.selectItem.f_material_name && this.selectItem.f_material_spec) {
337
+ this.fmaterialprice = []
338
+ let http = new HttpResetClass()
339
+ let data = {
340
+ columnname: 'f_price',
341
+ tablename: 't_material',
342
+ condition: `f_material_type = '${this.selectItem.f_material_type}' and f_material_name = '${this.selectItem.f_material_name}' and f_material_spec = '${this.selectItem.f_material_spec}' ORDER BY f_price desc`
343
+ }
344
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getdistinct`, {data: data}, {
345
+ resolveMsg: null,
346
+ rejectMsg: "获取f_material_type失败"
347
+ }, {silent: true})
348
+ res.data.forEach((row) => {
349
+ let temp = {
350
+ label: row.f_price,
351
+ value: row.f_price
352
+ }
353
+ this.fmaterialprice.push(temp)
354
+ })
355
+ }
356
+ },
357
+ async fmaterialnames() {
358
+ if (this.selectItem.f_material_type) {
359
+ this.fmaterialname = []
360
+ let f_material_type = this.selectItem.f_material_type
361
+ let http = new HttpResetClass()
362
+ let data = {
363
+ columnname: 'f_material_name',
364
+ tablename: 't_material',
365
+ condition: `f_material_type = '${f_material_type}'`
366
+ }
367
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getdistinct`, {data: data}, {
368
+ resolveMsg: null,
369
+ rejectMsg: "获取f_material_name失败"
370
+ }, {silent: true})
371
+ res.data.forEach((row) => {
372
+ let temp = {
373
+ label: row.f_material_name,
374
+ value: row.f_material_name
375
+ }
376
+ this.fmaterialname.push(temp)
377
+ })
378
+ }
379
+ },
380
+ async fmaterialspecs() {
381
+ if (this.selectItem.f_material_name) {
382
+ this.fmaterialspec = []
383
+ let f_material_name = this.selectItem.f_material_name
384
+ let http = new HttpResetClass()
385
+ let data = {
386
+ columnname: 'f_material_spec',
387
+ tablename: 't_material',
388
+ condition: `f_material_name = '${f_material_name}'`
389
+ }
390
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getdistinct`, {data: data}, {
391
+ resolveMsg: null,
392
+ rejectMsg: "获取f_material_spec失败"
393
+ }, {silent: true})
394
+ res.data.forEach((row) => {
395
+ let temp = {
396
+ label: row.f_material_spec,
397
+ value: row.f_material_spec
398
+ }
399
+ this.fmaterialspec.push(temp)
400
+ })
401
+ }
402
+ }
403
+ },
404
+ methods: {
405
+ //使用a标签下载--推荐使用
406
+ commDownload(url) {
407
+ // url += "?";
408
+ // for(let key in params) {
409
+ // url += key + "=" + params[key] + "&";
410
+ // }
411
+ // url = url.substr(0, url.length - 1);
412
+ $("<a href=" + url + " />")[0].click();
413
+ },
414
+ async searchByName(){
415
+
416
+ console.log('搜索材料名车')
417
+ let http = new HttpResetClass()
418
+ let data2 = {
419
+ columnname: `f_type`,
420
+ tablename: 't_material_class',
421
+ condition: ` f_name like '%${this.searchName}%'`
422
+ }
423
+ let resTypes = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getdistinct`, {data: data2}, {
424
+ resolveMsg: null,
425
+ rejectMsg: "获取f_material_name失败"
426
+ }, {silent: true})
427
+
428
+
429
+ let data = {
430
+ columnname: `f_name,f_type`,
431
+ tablename: 't_material_class',
432
+ condition: ` f_name like '%${this.searchName}%'`
433
+ }
434
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/getdistinct`, {data: data}, {
435
+ resolveMsg: null,
436
+ rejectMsg: '搜索材料名称失败'
437
+ })
438
+ this.menulist = []
439
+ for(let i=0;i<resTypes.data.length;i++){
440
+ this.menulist.push({catename:resTypes.data[i].f_type,expanded: true,type:'材料类型'})
441
+ }
442
+ for(let i=0;i<this.menulist.length;i++){
443
+ let _child = []
444
+ for(let j=0;j<res.data.length;j++){
445
+ if(this.menulist[i].catename == res.data[j].f_type){
446
+ _child.push({catename:res.data[j].f_name,expanded: false,type:'材料名称'})
447
+ }
448
+ }
449
+ this.menulist[i]._child=_child
450
+ }
451
+ this.addshowm = false
452
+ this.$nextTick(()=> {
453
+ this.addshowm = true
454
+ })
455
+ console.log('menulist',this.menulist)
456
+ },
457
+ async export(row) {
458
+ console.log("导出",row)
459
+ let exportdata = {
460
+ body:{
461
+ data:{
462
+ condition:`f_apply_num = '${this.selectdata.f_apply_num}' `, // 查询条件and id ='${row.id}'
463
+ items:"f_material_install,f_material_name,f_material_model,f_unit,f_amount"
464
+ },
465
+ field:["f_material_install:安装","f_material_name:材料名称","f_material_model:规格、型号","f_unit:单位","f_amount:数量"],
466
+ sqlName:"materialExport",
467
+ templateName:"材料导出"
468
+ }
469
+ }
470
+ let httpExport = new HttpResetClass()
471
+ let res = await httpExport.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/exportfile`, {data: exportdata}, {
472
+ resolveMsg: null,
473
+ rejectMsg: "材料导出失败"
474
+ }, {silent: true})
475
+ //res :[{"filename":"/D:/服务文件/apache-5002/webapps/manage/excel/流程监控全部导出.xlsx"}]
476
+ let downloadPath = res.data[0].filename
477
+ let downloadURL = "http://" + location.host + "/excel" + downloadPath.split('excel')[1]
478
+ // js 下载
479
+ let aTag = document.createElement('a')
480
+ aTag.download = "材料导出.xlsx"
481
+ aTag.href = downloadURL
482
+ aTag.click()
483
+ URL.revokeObjectURL(aTag.href)
484
+ // $("<a href=" + downloadURL + " />")[0].click()
485
+ },
486
+ async deleteItem(row) {
487
+ let res = await this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel'])
488
+ if (res === 'confirm') {
489
+ let http = new HttpResetClass()
490
+ http.load('DELETE', `${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_list/${row.id}`).then((res)=>{
491
+ for(let i=0;i<this.batchmodel.rows.length;i++){
492
+ if(this.batchmodel.rows[i].id == row.id){
493
+ this.batchmodel.rows.splice(i,1)
494
+ }
495
+ }
496
+ })
497
+ }
498
+
499
+ },
500
+ async xinhao() {
501
+ if (!this.model.f_batch_norms[0]) {
502
+ return
503
+ }
504
+ let temp = []
505
+ for (let row of this.optionsx) {
506
+ if (this.model.f_batch_norms[0] == row.f_format) {
507
+ temp.push({label: row.f_num, value: row.f_num})
508
+ }
509
+ }
510
+ this.xinhaooptions = temp
511
+ },
512
+ async bianma() {
513
+ let temp = []
514
+ for (let row of this.optionsx) {
515
+ if (this.model.f_batch_norms[0] && this.model.f_batch_norms[0] == row.f_format && this.model.f_batch_version[0] && this.model.f_batch_version[0] == row.f_num) {
516
+ temp.push({label: row.f_code, value: row.f_code})
517
+ } else if (this.model.f_batch_norms[0] && this.model.f_batch_norms[0] == row.f_format) {
518
+ temp.push({label: row.f_code, value: row.f_code})
519
+ }
520
+ }
521
+ this.codeOptions = temp
522
+ },
523
+ async guige() {
524
+ // let http = new HttpResetClass()
525
+ let data = {
526
+ columnname: `f_type`,
527
+ tablename: 't_material_class',
528
+ condition: `1=1`
529
+ }
530
+ let http = new HttpResetClass()
531
+
532
+ let res = await http.load('POST',`${this.$androidUtil.getProxyUrl()}/rs/sql/getdistinct`, {data: data}, {
533
+ resolveMsg: null,
534
+ rejectMsg: '获取材料类型失败'
535
+ })
536
+ this.menulist = []
537
+ for(let i=0;i<res.data.length;i++){
538
+ this.menulist.push({catename:res.data[i].f_type,expanded: false,type:'材料类型'})
539
+ }
540
+ console.log('menulist',this.menulist)
541
+ },
542
+ /* async getname() {
543
+ let http = new HttpResetClass()
544
+ let data = await http.load('POST', '${this.$androidUtil.getProxyUrl()}/rs/logic/getMaterialAddItem', {data: {condition: `f_apply_num = '${this.selectdata.f_apply_num}' `}}, {
545
+ resolveMsg: null,
546
+ rejectMsg: null
547
+ })
548
+ console.log('查询到的选项', data)
549
+ let house = []
550
+ let codeOptionstemp = []
551
+ for (let row of data.data.f_name) {
552
+ // codeOptionstemp.push({label: row.f_code,value: row.f_code})
553
+ house.push({label: row.f_name, value: row.f_name})
554
+ }
555
+ // this.codeOptions = codeOptionstemp
556
+ this.material = []
557
+ this.material = house
558
+ let house2 = [{label: '全部', value: ''}]
559
+ for (let row of data.data.f_user_name) {
560
+ house2.push({label: row.f_material_operator, value: row.f_material_operator})
561
+ }
562
+ this.f_user_name = []
563
+ this.f_user_name = house2
564
+ },*/
565
+ addDetailed() {
566
+ this.addshow = true
567
+ /* this.show = true*/
568
+ },
569
+ addclose() {
570
+ this.addshow = false
571
+ // this.model = {}
572
+ },
573
+ // async addconfirm() {
574
+ // if (!this.model.f_batch_name) {
575
+ // this.$showAlert("请输入材料名称", "warning", 1500)
576
+ // return
577
+ // }
578
+ // if (!this.model.f_batch_code) {
579
+ // this.$showAlert("请选择材料编码", "warning", 1500)
580
+ // return
581
+ // }
582
+ // if (!this.model.f_budget_num) {
583
+ // this.$showAlert("请输入材料数量", "warning", 1500)
584
+ // return
585
+ // }
586
+ // return await insertdetail(this)
587
+ //
588
+ // },
589
+ // 父组件更新子组件属性
590
+ updateData(val) {
591
+ this.headers.blodid = val.f_process_id
592
+ this.selectdata = val
593
+ },
594
+ addmaterial() {
595
+ // this.$showMessage(`是否确认添加批次`, ['confirm', 'cancel']).then((res) => {
596
+ // if (res === 'confirm') {
597
+ // insert(this)
598
+ // }
599
+ // })
600
+
601
+
602
+ },
603
+ /*async load() {
604
+ let http = new HttpResetClass()
605
+ let data = {
606
+ columnname: 'f_material_name',
607
+ tablename: 't_materials_detailed',
608
+ condition: `1=1`
609
+ }
610
+ let res = await http.load('POST', '${this.$androidUtil.getProxyUrl()}/rs/sql/getdistinct', {data: data}, {
611
+ resolveMsg: null,
612
+ rejectMsg: null
613
+ }, {silent: true})
614
+ res.data.forEach((row) => {
615
+ let temp = {
616
+ label: row.f_material_name,
617
+ value: row.f_material_name
618
+ }
619
+ this.fmaterialtype.push(temp)
620
+ })
621
+ },*/
622
+
623
+ commit() {
624
+ console.log("edit>>>>>",)
625
+ //判断当前节点的状态(开始活动/完工)
626
+ var entryName = this.model.f_entry_name //项目名称
627
+ var ename = this.selectdata.f_entry_name
628
+ let http = new HttpResetClass()
629
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/findProcessState`, {data: {actid: this.selectdata.actid}}, {
630
+ resolveMsg: null,
631
+ rejectMsg: '提交错误!'
632
+ }).then((res) => {
633
+ if (res.data[0].state != '开始活动') {
634
+ this.$showMessage("该节点信息已在别处提交,请刷新!")
635
+ this.reset()
636
+ } else {
637
+ //通过数据校验再进行下一步判断
638
+ if (this.verification()) {
639
+ if (name == null) {
640
+ //项目名称唯一性判断
641
+ let http2 = new HttpResetClass()
642
+ http2.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/findByEntryName`, {data: {entryName: entryName}}, {
643
+ resolveMsg: null,
644
+ rejectMsg: '提交错误!'
645
+ }).then((res) => {
646
+ if (res.data.length > 0) {
647
+ console.log('length>0')
648
+ this.$showMessage("项目名称不能重复!")
649
+ } else {
650
+ console.log('length<=0')
651
+ let getGen = gen(this, this.model)
652
+ console.log('getgen')
653
+ co(getGen)
654
+ console.log('co(getgen)')
655
+ }
656
+ })
657
+ } else {
658
+ let getGen = gen(this, this.model)
659
+ co(getGen)
660
+ }
661
+ }
662
+ }
663
+ })
664
+ },
665
+ reset() {
666
+ this.$dispatch('close')
667
+ this.$dispatch('selfsearch')
668
+ },
669
+
670
+ //数据校验
671
+ verification() {
672
+ /* var isNum = /^(([+]?\d*$)|(^[+]?\d+(\.\d+)?$))/ //非负纯数字
673
+ var regex = /.*?[\u4e00-\u9fa5].*?[\u4e00-\u9fa5].*!/ //至少两个汉字
674
+ var phoneReg = /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/ //手机号码正则
675
+ var telReg = /0\d{2,3}-\d{7,8}/ //座机正则
676
+ if (!this.model.f_entry_name) {
677
+ this.$showMessage("项目名称不能为空!")
678
+ return false
679
+ }*/
680
+ return true
681
+ },
682
+ impexcel() {
683
+ this.isShow = true
684
+ },
685
+ closeFile() {
686
+ this.isShow = false
687
+ // 将选的文件清空
688
+ this.$refs.file.$el.querySelector('input').value = ''
689
+ },
690
+ tovoid(row) {
691
+ console.log('作废')
692
+ getInfo(this, 1, row.id, true)
693
+ },
694
+ async filterParams() {
695
+ this.isShowdetail = false
696
+ let data = {
697
+ tablename: 't_devices',
698
+ condition: `f_process_id = '${this.selectdata.f_process_id}' `
699
+ }
700
+ console.log('condition:', data.condition)
701
+ let reset = new HttpResetClass()
702
+ await reset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {resolveMsg: null, rejectMsg: '获取材料信息失败'})
703
+ .then((res) => {
704
+ console.log('查询结果:', res)
705
+
706
+ this.model.rows = []
707
+ this.model.rows = res.data
708
+ this.params = res.data
709
+ })
710
+ },
711
+ add() {
712
+ this.show = true
713
+ },
714
+ // 修改按钮
715
+ modifyParam(row) {
716
+ this.$set('selectItem.id', row.id)
717
+ this.$set('selectItem.f_devices_type', row.f_devices_type)
718
+ this.$set('selectItem.f_devices_no', row.f_devices_no)
719
+ this.$set('selectItem.f_brand', row.f_brand)
720
+ this.$set('selectItem.f_devices_model', row.f_devices_model)
721
+ this.show = true
722
+ },
723
+ confirm() {
724
+ this.selectItem.f_devices_model=this.selectItem.f_devices_model
725
+ this.selectItem.f_apply_num=this.selectdata.f_apply_num
726
+ this.selectItem.f_process_id=this.selectdata.f_process_id
727
+ this.selectItem.f_input_person=Vue.user.name
728
+ this.selectItem.f_devices_state='有效'
729
+ this.selectItem.f_input_date=this.$login.toStandardTimeString()
730
+ this.selectItem.f_user_id=this.selectdata.f_userid
731
+ let data = {
732
+ tablename: 't_devices',
733
+ parameters: this.selectItem,
734
+ selectdata: this.selectdata,
735
+ }
736
+ let this1 = this
737
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/saveentity`, {data: data}).then((res) => {
738
+ this.show = false
739
+ this.addshow = false
740
+ getInfo(this, 0, 0, false)
741
+ })
742
+ },
743
+
744
+ // 关闭模态框
745
+ close() {
746
+ this.addshow = false
747
+ this.show = false
748
+ this.selectItem = {}
749
+ },
750
+
751
+ async getaaa() {
752
+ console.log('进来了')
753
+ let data = {
754
+ tablename: 't_material_batch',
755
+ condition: `f_apply_num = '${this.selectdata.f_apply_num}' `
756
+ }
757
+ let reset = new HttpResetClass()
758
+ await reset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {resolveMsg: null, rejectMsg: '获取材料信息失败'})
759
+ .then((res) => {
760
+ this.model.rows = []
761
+ this.model.rows = res.data
762
+ this.params = res.data
763
+ })
764
+ }
765
+ }
766
+ ,
767
+ events: {
768
+ updateTree(){
769
+ this.scrollTop = document.getElementById("treemx").scrollTop
770
+ this.addshowm = false
771
+ this.$nextTick(()=> {
772
+ this.addshowm = true
773
+ })
774
+ },
775
+ async menulistSelected(item,root,parent){
776
+ this.scrollTop = document.getElementById("treemx").scrollTop
777
+ console.log("scrollTop",this.scrollTop)
778
+ if(item.type=='材料类型'){
779
+ console.log('选了材料类型')
780
+ let data = {
781
+ columnname: `f_name`,
782
+ tablename: 't_material_class',
783
+ condition: `f_type = '${item.catename}'`
784
+ }
785
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/getdistinct`, {data: data}, {
786
+ resolveMsg: null,
787
+ rejectMsg: '获取材料名称失败'
788
+ })
789
+ // this.menulist = []
790
+ let _child = []
791
+ for(let i=0;i<res.data.length;i++){
792
+ _child.push({catename:res.data[i].f_name,expanded: false,type:'材料名称'})
793
+ }
794
+ for(let i=0;i<this.menulist.length;i++){
795
+ if(this.menulist[i].catename==item.catename){
796
+ this.menulist[i]._child= []
797
+ this.menulist[i].expanded = true
798
+ this.menulist[i]._child= _child
799
+ }
800
+ }
801
+ this.addshowm = false
802
+ this.$nextTick(()=> {
803
+ this.addshowm = true
804
+ })
805
+ console.log('menulist',this.menulist)
806
+ }else if(item.type=='材料名称'){
807
+ console.log('选了材料名称')
808
+ let data = {
809
+ columnname: `f_format,f_code`,
810
+ tablename: 't_material_class',
811
+ condition: ` f_name = '${item.catename}' and f_type = '${this.menulist[root].catename}'`
812
+ }
813
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/getdistinct`, {data: data}, {
814
+ resolveMsg: null,
815
+ rejectMsg: '获取材料规格失败'
816
+ })
817
+ // this.menulist = []
818
+ let _child = []
819
+ for(let i=0;i<res.data.length;i++){
820
+ _child.push({catename:res.data[i].f_format,expanded: false,type:'材料规格',f_code:res.data[i].f_code})
821
+ }
822
+ for(let i=0;i<this.menulist.length;i++){
823
+ if(this.menulist[i].catename==this.menulist[root].catename){
824
+ for(let j=0;j<this.menulist[i]._child.length;j++){
825
+ if(this.menulist[i]._child[j].catename==item.catename){
826
+ this.$refs.tree2.menulist[i]._child[j]._child= []
827
+ this.$refs.tree2.menulist[i]._child[j].expanded = true
828
+ this.$refs.tree2.menulist[i]._child[j]._child= _child
829
+ break
830
+ }
831
+ }
832
+ }
833
+ }
834
+ this.addshowm = false
835
+ this.$nextTick(()=> {
836
+ this.addshowm = true
837
+ })
838
+ console.log('menulist',this.menulist)
839
+ }else if(item.type=='材料规格'){
840
+ console.log('选了材料规格')
841
+ this.model.f_batch_name = [this.menulist[root]._child[parent].catename]
842
+ this.model.f_batch_code = [item.f_code]
843
+ this.model.f_budget_num = item.count
844
+ let flag = await this.addconfirm()
845
+ if(flag == false){
846
+ for(let i =0;i<this.menulist[root]._child[parent]._child.length;i++){
847
+ if(this.menulist[root]._child[parent]._child[i].f_code = item.f_code){
848
+ this.menulist[root]._child[parent]._child[i].count = null
849
+ }
850
+ }
851
+ }
852
+ this.addshowm = false
853
+ this.$nextTick(()=> {
854
+ this.addshowm = true
855
+ })
856
+ console.log('menulist',this.menulist)
857
+ }
858
+ this.addshowm = false
859
+ this.$nextTick(()=> {
860
+ this.addshowm = true
861
+ })
862
+ },
863
+ onFileUpload: function (file, res) {
864
+ if (!this.selectdata.f_process_id) {
865
+ this.$showMessage("数据异常,导入失败")
866
+ return
867
+ }
868
+ let data = {
869
+ tablename: ' t_materials_detailed',
870
+ filepath: res.f_downloadpath,
871
+ processid: this.selectdata.f_process_id,
872
+ f_apply_num: this.selectdata.f_apply_num,
873
+ f_filiale: this.selectdata.f_filiale,
874
+ f_parentname: Vue.user.f_parentname,
875
+ f_material_operator: Vue.user.name
876
+ /* processid:this.selectdata.f_processid*/
877
+ }
878
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/materialImport`, data, {resolveMsg: '导入成功', rejectMsg: '导入失败'}).then((res) => {
879
+ if(res.data){
880
+ this.iswork=false;
881
+ this.load();
882
+ this.closeFile();
883
+ this.getInfo(self, 0, 0, false);
884
+ let mm = '';
885
+ for(var i=0;i<res.data.msg.length;i++){
886
+ mm+= `${res.data.msg[i].msg}`
887
+ }
888
+ let msg = `共导入${res.data.alllength}条,失败${res.data.errorlen}条,失败信息:${mm}`
889
+ // this.$showMessage(msg)
890
+
891
+ }
892
+ })
893
+ }
894
+ }
895
+ }
896
+ </script>
897
+ <style scoped>
898
+ .recordTable table tr th {
899
+ font-weight: bold;
900
+ }
901
+
902
+ .recordTable table tr:hover {
903
+ background-color: rgb(230, 230, 230);
904
+ }
905
+
906
+ td {
907
+ text-align: center !important
908
+ }
909
+
910
+ .input-select {
911
+ width: 100%;
912
+ height: 34px;
913
+ align-content: center;
914
+ margin-top: 10px;
915
+ }
916
+ </style>