apply-clients 3.5.4-7 → 3.5.4-72

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
@@ -0,0 +1,823 @@
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>备注</th>
16
+ <th >操作</th>
17
+ <th class="textNoLineBreak">
18
+ <button class="button_new button_spacing" type="button" @click="$parent.$parent.$parent.addDetailed()">添加
19
+ </button>
20
+ </th>
21
+ </tr>
22
+ </template>
23
+ <template partial='body'>
24
+ <td >{{$index+1}}</td>
25
+ <td >{{row.f_material_install}}</td>
26
+ <td>{{row.f_material_name}}</td>
27
+ <td >{{row.f_material_model}}</td>
28
+ <td >{{row.f_unit}}</td>
29
+ <td>{{row.f_amount}}</td>
30
+ <td>{{row.f_material_remarks}}</td>
31
+ <td class="" v-show="$parent.$parent.$parent.showprint">
32
+ <button type="button" name="button" class="btn btn-link" :disabled="row.f_effective_state == '无效'"
33
+ @click.stop="$parent.$parent.$parent.tovoid(row)">作废
34
+ </button>
35
+ <button type="button" name="button" class="btn btn-link"
36
+ @click.stop="$parent.$parent.$parent.modifyParam(row)">修改
37
+ </button>
38
+ </td>
39
+ </template>
40
+ </data-grid>
41
+ </partial-view>
42
+ </div>
43
+ </div>
44
+ <modal :show.sync="addshow" v-ref:modal backdrop="false">
45
+ <header slot="modal-header" class="modal-header">
46
+ <button type="button" class="close" @click="addclose"><span>&times;</span></button>
47
+ <h4 class="modal-title">添加材料</h4>
48
+ </header>
49
+ <article slot="modal-body" class="modal-body">
50
+ <div class="from-group">
51
+ <label>安装</label>
52
+ <input type="text" class="form-control" v-model="selectItem.f_material_install">
53
+ </div>
54
+ <div class="from-group">
55
+ <label>材料名称</label>
56
+ <input-select
57
+ :value.sync="selectItem.f_material_name"
58
+ v-model="selectItem.f_material_name"
59
+ :options="materialNname"
60
+ @change="materialNameChange"
61
+ ></input-select>
62
+ </div>
63
+ <div class="from-group">
64
+ <label>规格、型号</label>
65
+ <input-select
66
+ v-model="selectItem.f_material_model"
67
+ :options="materialModel"
68
+ ></input-select>
69
+ </div>
70
+ <div class="from-group">
71
+ <label>单位</label>
72
+ <input type="text" class="form-control" v-model="selectItem.f_unit">
73
+ </div>
74
+ <div class="from-group">
75
+ <label>数量</label>
76
+ <input type="number" class="form-control" v-model="selectItem.f_amount">
77
+ </div>
78
+ <div class="from-group">
79
+ <label>备注</label>
80
+ <input type="text" class="form-control" v-model="selectItem.f_material_remarks">
81
+ </div>
82
+ </article>
83
+ <footer slot="modal-footer" class="modal-footer">
84
+ <div class="from-group" style="width: 100%;float: left">
85
+ <button v-show="addshow" type="button" class="btn btn-default" @click='close'>取消</button>
86
+ <button v-show="addshow" type="button" class="btn btn-success" @click='confirm'>确认</button>
87
+ </div>
88
+ </footer>
89
+ </modal>
90
+ <modal :show.sync="show" v-ref:modal backdrop="false">
91
+ <header slot="modal-header" class="modal-header">
92
+ <button type="button" class="close" @click="close"><span>&times;</span></button>
93
+ <h4 class="modal-title">修改明细</h4>
94
+ </header>
95
+ <article slot="modal-body" class="modal-body">
96
+ <div class="from-group">
97
+ <label>材料名称</label>
98
+ <input-select
99
+ :value.sync="selectItem.f_material_name"
100
+ v-model="selectItem.f_material_name"
101
+ :options="materialNname"
102
+ @change="materialNameChange"
103
+ ></input-select>
104
+ </div>
105
+ <div class="from-group">
106
+ <label>规格、型号</label>
107
+ <input-select
108
+ v-model="selectItem.f_material_model"
109
+ :options="materialModel"
110
+ ></input-select>
111
+ </div>
112
+ <div class="from-group">
113
+ <label>安装</label>
114
+ <input type="text" class="form-control" v-model="selectItem.f_material_install">
115
+ </div>
116
+ <div class="from-group">
117
+ <label>单位</label>
118
+ <input type="text" class="form-control" v-model="selectItem.f_unit">
119
+ </div>
120
+ <div class="from-group">
121
+ <label>材料数量</label>
122
+ <input type="number" class="form-control" v-model="selectItem.f_amount">
123
+ </div>
124
+ </article>
125
+ <footer slot="modal-footer" class="modal-footer">
126
+ <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
127
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm'>确认</button>
128
+ </footer>
129
+ </modal>
130
+ </div>
131
+ </template>
132
+
133
+ <script>
134
+ import { PagedList } from 'vue-client'
135
+ import {HttpResetClass} from 'vue-client'
136
+ import Vue from 'vue'
137
+ import co from 'co'
138
+ let insert = async function (self) {
139
+ let param = {
140
+ processid: self.selectdata.f_process_id,
141
+ f_apply_num: self.selectdata.f_apply_num,
142
+ f_filiale: self.selectdata.f_filiale,
143
+ f_parentname: Vue.user.f_parentname,
144
+ f_material_operator: Vue.user.name,
145
+ f_effective_state: '有效',
146
+ f_picking_state: '未领完'
147
+ }
148
+ console.log('新增批次', param)
149
+ self.$resetpost(`${self.$androidUtil.getProxyUrl()}/rs/entity/t_material_batch`, param).then(() => {
150
+ // this.params.rows.splice(index, 1)
151
+ console.log('更新成功!')
152
+ self.getaaa()
153
+ })
154
+ }
155
+ let insertdetail = async function (self) {
156
+ let data = {
157
+ f_batch_name: self.model.f_batch_name[0],
158
+ f_batch_code: self.model.f_batch_code[0],
159
+ f_apply_num: self.selectdata.f_apply_num,
160
+ f_batch_id: self.batch_id,
161
+ }
162
+ console.log('判断数据:', data)
163
+ return await self.$resetpost(`${self.$androidUtil.getProxyUrl()}/rs/logic/insertdetail`, data, {resolveMsg: null, rejectMsg: null}).then((res) => {
164
+ // this.params.rows.splice(index, 1)
165
+ console.log('更新成功!', res)
166
+ if (res.data.batch.length > 0) {
167
+ self.$showMessage("已添加过此材料,请勿重复添加,若要修改数量请点击修改!")
168
+ return false
169
+ } else {
170
+ if (res.data.array.length > 0) {
171
+ let param = {
172
+ f_batch_id: self.batch_id,
173
+ f_apply_num: self.selectdata.f_apply_num,
174
+ f_filiale: self.selectdata.f_filiale,
175
+ f_parentname: Vue.user.f_parentname,
176
+ f_material_operator: Vue.user.name,
177
+ f_batch_name: self.model.f_batch_name[0],
178
+ f_budget_num: self.model.f_budget_num,
179
+ f_surplus_num: self.model.f_budget_num,
180
+ f_add_receive: 0,
181
+ f_receive_num: 0,
182
+ f_revenue_id: res.data.array[0].id,
183
+ f_batch_type: res.data.array[0].f_type,
184
+ f_batch_code: res.data.array[0].f_code,
185
+ f_batch_version: res.data.array[0].f_num,
186
+ f_batch_norms: res.data.array[0].f_format,
187
+ f_batch_company: res.data.array[0].f_unit,
188
+ f_batch_price: res.data.array[0].f_price
189
+ }
190
+ console.log('添加明细:', param)
191
+ self.$resetpost(`${self.$androidUtil.getProxyUrl()}/rs/entity/t_material_list`, param).then(() => {
192
+ // this.params.rows.splice(index, 1)
193
+ console.log('更新成功!')
194
+ self.showdetail(self.batch_id, '有效')
195
+ self.model.f_batch_name = []
196
+ self.model.f_batch_code = []
197
+ self.model.f_batch_version = []
198
+ self.model.f_batch_norms = []
199
+ self.model.f_budget_num = ''
200
+ self.addshow = false
201
+ })
202
+ } else {
203
+ self.$showMessage('此种材料系统中不存在!请检查材料名称')
204
+ }
205
+ }
206
+
207
+
208
+ })
209
+
210
+
211
+ }
212
+ let getInfo = async function (self, isbatchdetail, batchid, istoVoidBatch) {
213
+ if (!self.selectdata)
214
+ return
215
+
216
+ if (isbatchdetail == 1) {
217
+ let data = {
218
+ tablename: 't_materials_detailed',
219
+ condition: ` id ='${batchid}' `
220
+ }
221
+ let reset = new HttpResetClass()
222
+ await reset.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {resolveMsg: null, rejectMsg: '获取材料信息失败'})
223
+ .then((res) => {
224
+ console.log('查询完毕,返回res.data=>' + JSON.stringify(res.data))
225
+ self.batchmodel.rows = []
226
+ self.batchmodel.rows = res.data
227
+ if (istoVoidBatch) {
228
+ console.log('进入istovoidBatch')
229
+ let num = 0
230
+ for (var i = 0; i < self.batchmodel.rows.length; i++) {
231
+ num += self.batchmodel.rows[i].f_add_receive
232
+ console.log(i + 'f_add_receive' + self.batchmodel.rows[i].f_add_receive)
233
+ }
234
+ if (num > 0) {
235
+ self.$showMessage('累计领取数量大于0,不能作废!')
236
+ } else {
237
+ self.$showMessage('作废后不可恢复,确认作废吗?', ['confirm', 'cancel']).then((res) => {
238
+ if (res === 'confirm') {
239
+ self.$resetpost(`${self.$androidUtil.getProxyUrl()}/rs/logic/tovoidbatch`, {id: batchid}).then((res) => {
240
+ getInfo(self, 0, 0, false)
241
+ })
242
+ }
243
+ })
244
+ }
245
+ }
246
+ })
247
+
248
+ } else {
249
+ let data = {
250
+ tablename: 't_materials_detailed',
251
+ condition: `f_apply_num = '${self.selectdata.f_apply_num}' `
252
+ }
253
+ let reset = new HttpResetClass()
254
+ await reset.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {resolveMsg: null, rejectMsg: '获取材料信息失败'})
255
+ .then((res) => {
256
+ self.model.rows = []
257
+ self.model.rows = res.data
258
+ self.params = res.data
259
+ })
260
+ }
261
+ }
262
+ let gen = function* (self, val) {
263
+ let data = {
264
+ model: {
265
+ f_processid: self.selectdata.f_process_id,
266
+ },
267
+ loginUser: {
268
+ id: Vue.user.id,
269
+ name: Vue.user.name,
270
+ ename: Vue.user.ename
271
+ },
272
+ employeetemplate: self.employeetemplate,// 指派勘察人员
273
+ subdep: '提交'
274
+ }
275
+ console.log('提交前')
276
+ self.$resetpost(`${self.$androidUtil.getProxyUrl()}/rs/logic/grantnext`,
277
+ {data: data})
278
+ .then(() => {
279
+ self.reset()
280
+ })
281
+ }
282
+ export default {
283
+ title: '材料信息',
284
+ props: {
285
+ flag:{
286
+ type: String,
287
+ default: 'cl'
288
+ },
289
+ selectdata: {
290
+ type: Object
291
+ },
292
+ edit: {
293
+ type: Boolean,
294
+ default: true
295
+ },
296
+ state: {
297
+ type: Number
298
+ },
299
+ showprint: {
300
+ type: Boolean,
301
+ default: true
302
+ }
303
+ },
304
+ data() {
305
+ return {
306
+ scrollTop:0, // 添加材料模态框的高度
307
+ searchName:null,
308
+ addshowm:true,
309
+ menulist: null,
310
+ refreshed: true,
311
+ guigeoptions: [],
312
+ xinhaooptions: [],
313
+ materialItem: [],
314
+ codeOptions: [],
315
+ fmaterialtype: [],
316
+ fmaterialname: [],
317
+ fmaterialspec: [],
318
+ fmaterialprice: [],
319
+ params: null,
320
+ record: {},
321
+ selectItem: {},
322
+ isbuttonshow: true,
323
+ model: {
324
+ rows: []
325
+ },
326
+ f_effective_state: [
327
+ {label: '有效', value: '有效'},
328
+ {label: '无效', value: '无效'},
329
+ {label: '全部', value: ''}
330
+ ],
331
+ batchmodel: {
332
+ rows: []
333
+ },
334
+ show: false,
335
+ isShow: false,
336
+ isShowdetail: false,
337
+ isSelected: {
338
+ type:Boolean,
339
+ default:false
340
+ },
341
+ addshow: false,
342
+ batch_id: 0,
343
+ material: [],
344
+ optionsx: [],
345
+ f_user_name: [],
346
+ all: true,
347
+ modelval: [],
348
+ printshow: false,
349
+ fields: {},
350
+ thead: '',
351
+ tfoot: '22222',
352
+ printName: '材料',
353
+ headData: ["安装","材料名称","规格、型号","单位","数量","备注"],
354
+ bodyData: ["f_material_install", "f_material_name", "f_material_model","f_unit","f_amount","f_material_remarks"],
355
+ footinfo: ["主管领导","领料人"],
356
+ materialNname:this.$appdata.getParam('报建材料'),
357
+ materialModel:[]
358
+ }
359
+ },
360
+ async ready() {
361
+ this.isShowdetail = false
362
+ getInfo(this, 0, 0, false)
363
+ },
364
+ watch: {
365
+ },
366
+ computed: {
367
+
368
+ },
369
+ methods: {
370
+ materialNameChange(){
371
+ this.materialModel = []
372
+ this.materialModel=this.$appdata.getParam(`${this.selectItem.f_material_name}规格型号`)
373
+ },
374
+ async searchByName(){
375
+ console.log('搜索材料名车')
376
+ let http = new HttpResetClass()
377
+ let data2 = {
378
+ columnname: `f_type`,
379
+ tablename: 't_material_class',
380
+ condition: ` f_name like '%${this.searchName}%'`
381
+ }
382
+ let resTypes = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getdistinct`, {data: data2}, {
383
+ resolveMsg: null,
384
+ rejectMsg: "获取f_material_name失败"
385
+ }, {silent: true})
386
+ let data = {
387
+ columnname: `f_name,f_type`,
388
+ tablename: 't_material_class',
389
+ condition: ` f_name like '%${this.searchName}%'`
390
+ }
391
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/getdistinct`, {data: data}, {
392
+ resolveMsg: null,
393
+ rejectMsg: '搜索材料名称失败'
394
+ })
395
+ this.menulist = []
396
+ for(let i=0;i<resTypes.data.length;i++){
397
+ this.menulist.push({catename:resTypes.data[i].f_type,expanded: true,type:'材料类型'})
398
+ }
399
+ for(let i=0;i<this.menulist.length;i++){
400
+ let _child = []
401
+ for(let j=0;j<res.data.length;j++){
402
+ if(this.menulist[i].catename == res.data[j].f_type){
403
+ _child.push({catename:res.data[j].f_name,expanded: false,type:'材料名称'})
404
+ }
405
+ }
406
+ this.menulist[i]._child=_child
407
+ }
408
+ this.addshowm = false
409
+ this.$nextTick(()=> {
410
+ this.addshowm = true
411
+ })
412
+ console.log('menulist',this.menulist)
413
+ },
414
+ async deleteItem(row) {
415
+ let res = await this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel'])
416
+ if (res === 'confirm') {
417
+ let http = new HttpResetClass()
418
+ http.load('DELETE', `${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_list/${row.id}`).then((res)=>{
419
+ for(let i=0;i<this.batchmodel.rows.length;i++){
420
+ if(this.batchmodel.rows[i].id == row.id){
421
+ this.batchmodel.rows.splice(i,1)
422
+ }
423
+ }
424
+ })
425
+ }
426
+ },
427
+ async xinhao() {
428
+ if (!this.model.f_batch_norms[0]) {
429
+ return
430
+ }
431
+ let temp = []
432
+ for (let row of this.optionsx) {
433
+ if (this.model.f_batch_norms[0] == row.f_format) {
434
+ temp.push({label: row.f_num, value: row.f_num})
435
+ }
436
+ }
437
+ this.xinhaooptions = temp
438
+ },
439
+ async bianma() {
440
+ let temp = []
441
+ for (let row of this.optionsx) {
442
+ 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) {
443
+ temp.push({label: row.f_code, value: row.f_code})
444
+ } else if (this.model.f_batch_norms[0] && this.model.f_batch_norms[0] == row.f_format) {
445
+ temp.push({label: row.f_code, value: row.f_code})
446
+ }
447
+ }
448
+ this.codeOptions = temp
449
+ },
450
+ async guige() {
451
+ // let http = new HttpResetClass()
452
+ let data = {
453
+ columnname: `f_type`,
454
+ tablename: 't_material_class',
455
+ condition: `1=1`
456
+ }
457
+ let http = new HttpResetClass()
458
+
459
+ let res = await http.load('POST',$`{this.$androidUtil.getProxyUrl()}/rs/sql/getdistinct`, {data: data}, {
460
+ resolveMsg: null,
461
+ rejectMsg: '获取材料类型失败'
462
+ })
463
+ this.menulist = []
464
+ for(let i=0;i<res.data.length;i++){
465
+ this.menulist.push({catename:res.data[i].f_type,expanded: false,type:'材料类型'})
466
+ }
467
+ console.log('menulist',this.menulist)
468
+ },
469
+ addDetailed() {
470
+ this.addshow = true
471
+ },
472
+ addclose() {
473
+ this.addshow = false
474
+ },
475
+ async addconfirm() {
476
+ if (!this.model.f_batch_name) {
477
+ this.$showAlert("请输入材料名称", "warning", 1500)
478
+ return
479
+ }
480
+ if (!this.model.f_batch_code) {
481
+ this.$showAlert("请选择材料编码", "warning", 1500)
482
+ return
483
+ }
484
+ if (!this.model.f_budget_num) {
485
+ this.$showAlert("请输入材料数量", "warning", 1500)
486
+ return
487
+ }
488
+ return await insertdetail(this)
489
+
490
+ },
491
+ addmaterial() {
492
+ },
493
+ async load() {
494
+ let http = new HttpResetClass()
495
+ let data = {
496
+ columnname: 'f_material_name',
497
+ tablename: 't_materials_detailed',
498
+ condition: `1=1`
499
+ }
500
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getdistinct`, {data: data}, {
501
+ resolveMsg: null,
502
+ rejectMsg: null
503
+ }, {silent: true})
504
+ res.data.forEach((row) => {
505
+ let temp = {
506
+ label: row.f_material_name,
507
+ value: row.f_material_name
508
+ }
509
+ this.fmaterialtype.push(temp)
510
+ })
511
+ },
512
+
513
+ commit() {
514
+ console.log("edit>>>>>",)
515
+ var entryName = this.model.f_entry_name //项目名称
516
+ var ename = this.selectdata.f_entry_name
517
+ let http = new HttpResetClass()
518
+ http.load('POST',` ${this.$androidUtil.getProxyUrl()}/rs/sql/findProcessState`, {data: {actid: this.selectdata.actid}}, {
519
+ resolveMsg: null,
520
+ rejectMsg: '提交错误!'
521
+ }).then((res) => {
522
+ if (res.data[0].state != '开始活动') {
523
+ this.$showMessage("该节点信息已在别处提交,请刷新!")
524
+ this.reset()
525
+ } else {
526
+ //通过数据校验再进行下一步判断
527
+ if (this.verification()) {
528
+ if (name == null) {
529
+ //项目名称唯一性判断
530
+ let http2 = new HttpResetClass()
531
+ http2.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/findByEntryName`, {data: {entryName: entryName}}, {
532
+ resolveMsg: null,
533
+ rejectMsg: '提交错误!'
534
+ }).then((res) => {
535
+ if (res.data.length > 0) {
536
+ console.log('length>0')
537
+ this.$showMessage("项目名称不能重复!")
538
+ } else {
539
+ console.log('length<=0')
540
+ let getGen = gen(this, this.model)
541
+ console.log('getgen')
542
+ co(getGen)
543
+ console.log('co(getgen)')
544
+ }
545
+ })
546
+ } else {
547
+ let getGen = gen(this, this.model)
548
+ co(getGen)
549
+ }
550
+ }
551
+ }
552
+ })
553
+ },
554
+ reset() {
555
+ this.$dispatch('close')
556
+ this.$dispatch('selfsearch')
557
+ },
558
+
559
+ //数据校验
560
+ verification() {
561
+ /* var isNum = /^(([+]?\d*$)|(^[+]?\d+(\.\d+)?$))/ //非负纯数字
562
+ var regex = /.*?[\u4e00-\u9fa5].*?[\u4e00-\u9fa5].*!/ //至少两个汉字
563
+ var phoneReg = /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/ //手机号码正则
564
+ var telReg = /0\d{2,3}-\d{7,8}/ //座机正则
565
+ if (!this.model.f_entry_name) {
566
+ this.$showMessage("项目名称不能为空!")
567
+ return false
568
+ }*/
569
+ return true
570
+ },
571
+ impexcel() {
572
+ this.isShow = true
573
+ },
574
+ closeFile() {
575
+ this.isShow = false
576
+ // 将选的文件清空
577
+ this.$refs.file.$el.querySelector('input').value = ''
578
+ },
579
+ tovoid(row) {
580
+ console.log('作废')
581
+ getInfo(this, 1, row.id, true)
582
+ },
583
+ async filterParams() {
584
+ this.isShowdetail = false
585
+ let data = {
586
+ tablename: 't_materials_detailed',
587
+ condition: `f_apply_num = '${this.selectdata.f_apply_num}' `
588
+ }
589
+ console.log('condition:', data.condition)
590
+ let reset = new HttpResetClass()
591
+ await reset.load('POST',`${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {resolveMsg: null, rejectMsg: '获取材料信息失败'})
592
+ .then((res) => {
593
+ console.log('查询结果:', res)
594
+
595
+ this.model.rows = []
596
+ this.model.rows = res.data
597
+ this.params = res.data
598
+ })
599
+ },
600
+ add() {
601
+ this.show = true
602
+ },
603
+ // 修改按钮
604
+ modifyParam(row) {
605
+ this.$set('selectItem.id', row.id)
606
+
607
+ this.$set('selectItem.f_apply_num', row.f_apply_num)
608
+ this.$set('selectItem.f_process_id', row.f_process_id)
609
+
610
+ this.$set('selectItem.f_material_install', row.f_material_install)
611
+ this.$set('selectItem.f_material_name', row.f_material_name)
612
+ this.$set('selectItem.f_material_model', row.f_material_model)
613
+ this.$set('selectItem.f_unit', row.f_unit)
614
+ this.$set('selectItem.f_amount', row.f_amount)
615
+ this.$set('selectItem.f_material_remarks', row.f_material_remarks)
616
+
617
+ this.show = true
618
+ },
619
+ // 缴费情况修改
620
+ paychange(row) {
621
+ let http = new HttpResetClass()
622
+ row.f_pay = !row.f_pay
623
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/saveentity`, {data: {tablename: 't_material', parameters: row}}, {
624
+ resolveMsg: null,
625
+ rejectMsg: "缴费状态更新失败"
626
+ }, {silent: true})
627
+ },
628
+ confirm() {
629
+ /* this.selectItem.f_amount = this.selectItem.f_amount*/
630
+ this.selectItem.f_apply_num=this.selectdata.f_apply_num
631
+ this.selectItem.f_process_id=this.selectdata.f_process_id
632
+ let data = {
633
+ tablename: 't_materials_detailed',
634
+ parameters: this.selectItem
635
+ }
636
+ let this1 = this
637
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/saveentity`, {data: data}).then((res) => {
638
+ this.show = false
639
+ // 如果没有id,需要在数组中添加
640
+ /* getInfo(this, 1, this.selectItem.f_batch_id, false)
641
+ this.selectItem = {}*/
642
+ this.addshow = false
643
+ getInfo(this, 0, 0, false)
644
+
645
+ })
646
+ },
647
+ print () {
648
+ this.$refs.print.PrintAsFile()
649
+ this.printshow = false
650
+ },
651
+ close () {
652
+ this.printshow = false
653
+ this.all = false
654
+ this.show = false
655
+ this.addshow = false
656
+ this.selectItem = {}
657
+ },
658
+ async getaaa() {
659
+ console.log('进来了')
660
+ let data = {
661
+ tablename: 't_material_batch',
662
+ condition: `f_apply_num = '${this.selectdata.f_apply_num}' `
663
+ }
664
+ let reset = new HttpResetClass()
665
+ await reset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/saveentityrs/sql/singleTable`, {data: data}, {resolveMsg: null, rejectMsg: '获取材料信息失败'})
666
+ .then((res) => {
667
+ this.model.rows = []
668
+ this.model.rows = res.data
669
+ this.params = res.data
670
+ })
671
+ }
672
+ }
673
+ ,
674
+ events: {
675
+ updateTree(){
676
+ this.scrollTop = document.getElementById("treemx").scrollTop
677
+ this.addshowm = false
678
+ this.$nextTick(()=> {
679
+ this.addshowm = true
680
+ })
681
+ },
682
+ async menulistSelected(item,root,parent){
683
+ this.scrollTop = document.getElementById("treemx").scrollTop
684
+ console.log("scrollTop",this.scrollTop)
685
+ if(item.type=='材料类型'){
686
+ console.log('选了材料类型')
687
+ let data = {
688
+ columnname: `f_name`,
689
+ tablename: 't_material_class',
690
+ condition: `f_type = '${item.catename}'`
691
+ }
692
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/getdistinct`, {data: data}, {
693
+ resolveMsg: null,
694
+ rejectMsg: '获取材料名称失败'
695
+ })
696
+ // this.menulist = []
697
+ let _child = []
698
+ for(let i=0;i<res.data.length;i++){
699
+ _child.push({catename:res.data[i].f_name,expanded: false,type:'材料名称'})
700
+ }
701
+ for(let i=0;i<this.menulist.length;i++){
702
+ if(this.menulist[i].catename==item.catename){
703
+ this.menulist[i]._child= []
704
+ this.menulist[i].expanded = true
705
+ this.menulist[i]._child= _child
706
+ }
707
+ }
708
+ this.addshowm = false
709
+ this.$nextTick(()=> {
710
+ this.addshowm = true
711
+ })
712
+ console.log('menulist',this.menulist)
713
+ }else if(item.type=='材料名称'){
714
+ console.log('选了材料名称')
715
+ let data = {
716
+ columnname: `f_format,f_code`,
717
+ tablename: 't_material_class',
718
+ condition: ` f_name = '${item.catename}' and f_type = '${this.menulist[root].catename}'`
719
+ }
720
+ let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/getdistinct`, {data: data}, {
721
+ resolveMsg: null,
722
+ rejectMsg: '获取材料规格失败'
723
+ })
724
+ // this.menulist = []
725
+ let _child = []
726
+ for(let i=0;i<res.data.length;i++){
727
+ _child.push({catename:res.data[i].f_format,expanded: false,type:'材料规格',f_code:res.data[i].f_code})
728
+ }
729
+ for(let i=0;i<this.menulist.length;i++){
730
+ if(this.menulist[i].catename==this.menulist[root].catename){
731
+ for(let j=0;j<this.menulist[i]._child.length;j++){
732
+ if(this.menulist[i]._child[j].catename==item.catename){
733
+ this.$refs.tree2.menulist[i]._child[j]._child= []
734
+ this.$refs.tree2.menulist[i]._child[j].expanded = true
735
+ this.$refs.tree2.menulist[i]._child[j]._child= _child
736
+ break
737
+ }
738
+ }
739
+ }
740
+ }
741
+ this.addshowm = false
742
+ this.$nextTick(()=> {
743
+ this.addshowm = true
744
+ })
745
+ console.log('menulist',this.menulist)
746
+ }else if(item.type=='材料规格'){
747
+ console.log('选了材料规格')
748
+ this.model.f_batch_name = [this.menulist[root]._child[parent].catename]
749
+ this.model.f_batch_code = [item.f_code]
750
+ this.model.f_budget_num = item.count
751
+ let flag = await this.addconfirm()
752
+ if(flag == false){
753
+ for(let i =0;i<this.menulist[root]._child[parent]._child.length;i++){
754
+ if(this.menulist[root]._child[parent]._child[i].f_code = item.f_code){
755
+ this.menulist[root]._child[parent]._child[i].count = null
756
+ }
757
+ }
758
+ }
759
+ this.addshowm = false
760
+ this.$nextTick(()=> {
761
+ this.addshowm = true
762
+ })
763
+ console.log('menulist',this.menulist)
764
+ }
765
+ this.addshowm = false
766
+ this.$nextTick(()=> {
767
+ this.addshowm = true
768
+ })
769
+ },
770
+ onFileUpload: function (file, res) {
771
+ if (!this.selectdata.f_process_id) {
772
+ this.$showMessage("数据异常,导入失败")
773
+ return
774
+ }
775
+ let data = {
776
+ tablename: ' t_materials_detailed',
777
+ filepath: res.f_downloadpath,
778
+ processid: this.selectdata.f_process_id,
779
+ f_apply_num: this.selectdata.f_apply_num,
780
+ f_filiale: this.selectdata.f_filiale,
781
+ f_parentname: this.$login.f.f_parentname,
782
+ f_material_operator: this.$login.f.name
783
+ /* processid:this.selectdata.f_processid*/
784
+ }
785
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/materialImport`, data, {resolveMsg: '导入成功', rejectMsg: '导入失败'}).then((res) => {
786
+ if(res.data){
787
+ this.iswork=false;
788
+ this.load();
789
+ this.closeFile();
790
+ getInfo(this, 0, 0, false)
791
+ let mm = '';
792
+ for(var i=0;i<res.data.msg.length;i++){
793
+ mm+= `${res.data.msg[i].msg}`
794
+ }
795
+ let msg = `共导入${res.data.alllength}条,失败${res.data.errorlen}条,失败信息:${mm}`
796
+ // this.$showMessage(msg)
797
+
798
+ }
799
+ })
800
+ }
801
+ }
802
+ }
803
+ </script>
804
+ <style scoped>
805
+ .recordTable table tr th {
806
+ font-weight: bold;
807
+ }
808
+
809
+ .recordTable table tr:hover {
810
+ background-color: rgb(230, 230, 230);
811
+ }
812
+
813
+ td {
814
+ text-align: center !important
815
+ }
816
+
817
+ .input-select {
818
+ width: 100%;
819
+ height: 34px;
820
+ align-content: center;
821
+ margin-top: 10px;
822
+ }
823
+ </style>