apply-clients 3.5.1 → 3.5.2

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 (44) hide show
  1. package/build/dev-server.js +142 -133
  2. package/package.json +118 -118
  3. package/src/App.vue +26 -21
  4. package/src/applyAndroid.js +58 -58
  5. package/src/components/android/AppSign.vue +152 -152
  6. package/src/components/android/AppTakePic.vue +181 -181
  7. package/src/components/android/Process/AppChargeList.vue +224 -224
  8. package/src/components/android/Process/AppExplorationUser.vue +508 -508
  9. package/src/components/product/Install/ContractCharge.vue +210 -210
  10. package/src/filiale/fugou/android/AppChargeManagement.vue +625 -625
  11. package/src/filiale/hongda/pc/FunctionServiceControl.vue +526 -525
  12. package/src/filiale/qianneng/android/AppExplorationUser.vue +441 -441
  13. package/src/filiale/qianneng/android/AppServiceControl.vue +1608 -1608
  14. package/src/filiale/qianneng/pc/Applybatchdispatch.vue +685 -685
  15. package/src/filiale/qianneng/pc/ExplorationSelect.vue +492 -492
  16. package/src/filiale/qianneng/pc/FunctionServiceControl.vue +521 -521
  17. package/src/filiale/qianneng/pc/InstallInfoSelect.vue +392 -392
  18. package/src/filiale/qianneng/pc/InstallationDetails.vue +561 -561
  19. package/src/filiale/qianneng/pc/ServiceControl.vue +1351 -1340
  20. package/src/filiale/qianneng/pc/SupervisoryList.vue +344 -344
  21. package/src/filiale/qianneng/pc/SupervisoryServiceControl.vue +871 -871
  22. package/src/filiale/qianneng/pc/chargeManagement.vue +656 -656
  23. package/src/filiale/qianneng/pc/printactivatecard.vue +295 -295
  24. package/src/filiale/qianneng/pc/supplementalAgreement.vue +344 -344
  25. package/src/filiale/yangchunboneng/android/AppAddMaterialScience.vue +390 -390
  26. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +120 -120
  27. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +552 -552
  28. package/src/filiale/yangchunboneng/android/AppExplorationUser.vue +507 -507
  29. package/src/filiale/yangchunboneng/android/AppInstallationDetails.vue +492 -492
  30. package/src/filiale/yangchunboneng/android/AppOtherChargeManagement.vue +116 -116
  31. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1552 -1552
  32. package/src/filiale/yangchunboneng/android/AppTakePic.vue +181 -181
  33. package/src/filiale/yangchunboneng/android/chargesList.vue +170 -170
  34. package/src/filiale/yangchunboneng/android.js +16 -16
  35. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +496 -496
  36. package/src/filiale/yangchunboneng/pc/InstallationDetails.vue +609 -609
  37. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +1782 -1782
  38. package/src/filiale/yangchunboneng/pc/ServiceView.vue +1005 -1005
  39. package/src/filiale/yangchunboneng/pc/addMaterialScience.vue +374 -374
  40. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +960 -960
  41. package/src/filiale/yangchunboneng/pc/devicesManagement.vue +511 -511
  42. package/src/filiale/yangchunboneng/pc/otherchargeManagement.vue +214 -214
  43. package/src/filiale/yangchunboneng/pc.js +17 -17
  44. package/src/main.js +23 -23
@@ -1,374 +1,374 @@
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">
12
- <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加</button>
13
- </th>
14
- </tr>
15
- </template>
16
- <template partial='body'>
17
- <tr>
18
- <td style="text-align: center;">
19
- <nobr>{{$index+1}}</nobr>
20
- </td>
21
- <td style="text-align: center;">
22
- <nobr>{{row.f_material_name}}</nobr>
23
- </td>
24
- <td style="text-align: center;">
25
- <nobr>{{row.f_material_style}}</nobr>
26
- </td>
27
- <td style="text-align: center;">
28
- <nobr>{{row.f_material_unit}}</nobr>
29
- </td>
30
- <td style="text-align: center;">
31
- <nobr>{{row.f_material_number}}</nobr>
32
- </td>
33
- <td style="text-align: center;">
34
- <button type="button" class="button_search button_spacing" @click="$parent.$parent.updateMaterial($index,row)">修改</button>
35
- <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除</button>
36
- </td>
37
- </tr>
38
- </template>
39
- </data-grid>
40
- <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
41
- <header slot="modal-header" class="modal-header">
42
- <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
43
- <h4 class="modal-title">选择文件</h4>
44
- </header>
45
- <article slot="modal-body" class="modal-body">
46
- <div class="form-group">
47
- <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
48
- </div>
49
- </article>
50
- <footer slot="modal-footer" class="modal-footer"></footer>
51
- </modal>
52
- <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
53
- :backdrop="false" :title="title">
54
- <header slot="modal-header" class="modal-header">
55
- <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
56
- <h4 class="modal-title">{{title}}</h4>
57
- </header>
58
- <article slot="modal-body" class="modal-body clearfix">
59
- <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
60
- <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
61
- <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
62
- <div class="col-sm-6 text-right"><button
63
- class="button_delete button_spacing"
64
- @click.prevent="deleteDevicesinfo(i)"
65
- v-if="title === '新增'"
66
- >删除</button></div>
67
- </div>
68
- <div class="form-group col-sm-6">
69
- <label class="col-sm-4 control-label">选择材料:</label>
70
- <div class="col-sm-8">
71
- <input-select
72
- class="select select_list"
73
- :value.sync="item.material"
74
- v-model="item.material"
75
- :options="meterialOptions"
76
- :disable="mark === 1"
77
- @change="modifyOtherValue(i)"
78
- :valueSingle="true"></input-select>
79
- </div>
80
- </div>
81
- <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
82
- <label class="col-sm-4 control-label">材料名称:</label>
83
- <div class="col-sm-8">
84
- <input class="form-control input_view" style="" type="text"
85
- placeholder="材料名称"
86
- v-model="item.f_material_name"
87
- :value="item.f_material_name"
88
- />
89
- </div>
90
- </div>
91
- <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
92
- <label class="col-sm-4 control-label">材料单位:</label>
93
- <div class="col-sm-8">
94
- <input class="form-control input_view" style="" type="text"
95
- placeholder="材料单位"
96
- v-model="item.f_material_unit"
97
- :value="item.f_material_unit"
98
- />
99
- </div>
100
- </div>
101
- <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
102
- <label class="col-sm-4 control-label">材料型号:</label>
103
- <div class="col-sm-8">
104
- <input class="form-control input_view" style="" type="text"
105
- placeholder="材料型号"
106
- v-model="item.f_material_style"
107
- :value="item.f_material_style"
108
- />
109
- </div>
110
- </div>
111
-
112
- <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
113
- <label class="col-sm-4 control-label">材料数量:</label>
114
- <div class="col-sm-8">
115
- <input class="form-control input_view" style="" type="number"
116
- placeholder="设备数量"
117
- v-model="item.f_material_number"
118
- :value="item.f_material_number"
119
- />
120
- </div>
121
- </div>
122
- </div>
123
-
124
- </article>
125
- <footer slot="modal-footer" class="modal-footer">
126
- <template v-if="mark !== 1">
127
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
128
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()" :disabled="!$v.valid">确认添加</button>
129
- <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()" :disabled="!$v.valid">确认修改</button>
130
- </template>
131
- </footer>
132
- </modal>
133
- </div>
134
- </template>
135
-
136
- <script>
137
- import {HttpResetClass} from 'vue-client'
138
- import Vue from "vue";
139
- export default {
140
- name: 'addMaterialScience',
141
- props: {
142
- selectdata: {
143
- type: Object
144
- },
145
- mark: {
146
- type: Number,
147
- default: 0
148
- }
149
- },
150
- data () {
151
- return {
152
- showFile: false,
153
- onetomany: {
154
- rows: []
155
- },
156
- title:'新增',
157
- showMaterialModal:false,
158
- materials:[
159
- {
160
- material:'',
161
- f_material_name:'',
162
- f_material_style:'',
163
- f_material_unit:'',
164
- f_material_number:'',
165
- f_bjq_sid:'',
166
- f_material_code:'',
167
- f_userinfo_code:''
168
- }
169
- ],
170
- meterialOptions:[],
171
- row:{},
172
- bjqChecklag:[]
173
- }
174
- },
175
- ready(){
176
- this.getOnetoManyData()
177
- },
178
- methods: {
179
- async getOnetoManyData () {
180
- let data = {
181
- tablename: `t_material_apply`,
182
- condition: `f_process_id='${this.selectdata.f_process_id}'`
183
- }
184
- let res = await this.$resetpost(
185
- 'rs/sql/apply_singleTable',
186
- {data: data},
187
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
188
- )
189
- this.onetomany.rows = res.data
190
- },
191
- async openMaterialModal () {
192
- this.getMateralNames()
193
- this.title = '新增'
194
- this.materials = [
195
- {
196
- material:'',
197
- f_material_name:'',
198
- f_material_style:'',
199
- f_material_unit:'',
200
- f_material_number:'',
201
- f_bjq_sid:'',
202
- f_material_code:'',
203
- f_userinfo_code:''
204
- }
205
- ],
206
- this.showMaterialModal = true
207
- },
208
- closeFile() {
209
- this.showWork = false
210
- this.showFile = false
211
- // 将选的文件清空
212
- this.$refs.file.$el.querySelector('input').value = ''
213
- this.search()
214
- },
215
- deleteDevicesinfo (index) {
216
- this.materials.splice(index, 1)
217
- },
218
- pushMaterial () {
219
- this.materials.push({
220
- material:'',
221
- f_material_name:'',
222
- f_material_style:'',
223
- f_material_unit:'',
224
- f_material_number:'',
225
- f_bjq_sid:'',
226
- f_material_code:'',
227
- f_userinfo_code:''
228
- })
229
- },
230
- // 获取模态框材料
231
- async getMateralNames () {
232
- let data = {
233
- condition: `1=1`
234
- }
235
- let http = new HttpResetClass()
236
- let res = await http.load(
237
- 'POST',
238
- `rs/sql/getStockMaterial`,
239
- {data: data},
240
- {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
241
- )
242
-
243
- this.meterialOptions = res.data.map(item => {
244
- return {
245
- 'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}--${item.f_material_code}`,
246
- 'value': item
247
- }
248
- })
249
- },
250
- modifyOtherValue (index){
251
- console.log("进来了",index)
252
- console.log("dddd",this.materials[index].material)
253
- let material = this.materials[index].material
254
- this.materials[index].f_material_name = material.f_material_name
255
- this.materials[index].f_material_style = material.f_material_style
256
- this.materials[index].f_material_unit = material.f_material_unit
257
- this.materials[index].f_material_number = material.f_material_number
258
- this.materials[index].f_material_code = material.f_material_code?material.f_material_code:''
259
- this.materials[index].f_userinfo_code = material.f_userinfo_code?material.f_userinfo_code:''
260
- },
261
- // 新增材料
262
- async addMaterial () {
263
- console.log("登录信息:",this.$login.f)
264
- this.title = '新增'
265
- let data = {
266
- f_process_id : this.selectdata.f_process_id,
267
- f_operator_id: this.$login.f.id,
268
- f_operator: this.$login.f.name,
269
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
270
- f_orgid: this.$login.f.orgid,
271
- f_orgname: this.$login.f.orgs,
272
- materials:this.materials
273
- }
274
-
275
- if (this.bjqChecklag.length > 0){
276
- return
277
- }
278
- let res = await this.$resetpost(
279
- `apply/rs/logic/saveMaterials`,
280
- data
281
- )
282
- this.closeMaterials()
283
- },
284
- async deleteMaterial (row) {
285
- var show1 = window.confirm('您确定要删除这条记录吗?')
286
- if(show1 != true){
287
- this.closeMaterials()
288
- }else{
289
- debugger
290
- let http = new HttpResetClass()
291
- let res = await http.load(
292
- 'POST',
293
- `rs/logic/deleteMaterial`,
294
- {data: row},
295
- {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
296
- )
297
- this.closeMaterials()
298
- }
299
-
300
- },
301
- async updateMaterial (index,row) {
302
- this.title = '修改'
303
- this.row = row
304
- this.getMateralNames()
305
- this.materials = [
306
- {
307
- material:'',
308
- f_material_name:row.f_material_name,
309
- f_material_style:row.f_material_style,
310
- f_material_unit:row.f_material_unit,
311
- f_material_number:row.f_material_number,
312
- f_material_code:row.f_material_code,
313
- f_userinfo_code:row.f_userinfo_code,
314
- f_bjq_sid: row.f_bjq_sid
315
- }
316
- ]
317
- this.showMaterialModal = true
318
- },
319
- async updateConfirm () {
320
- let data = this.row
321
- data.f_material_name = this.materials[0].f_material_name
322
- data.f_material_style = this.materials[0].f_material_style
323
- data.f_material_unit = this.materials[0].f_material_unit
324
- data.f_material_number = this.materials[0].f_material_number
325
- data.f_material_code = this.materials[0].f_material_code
326
- data.f_bjq_sid = this.materials[0].f_bjq_sid
327
- data.f_userinfo_code = this.materials[0].f_userinfo_code
328
- if (this.bjqChecklag.length > 0){
329
- return
330
- }
331
- let res = await this.$resetpost(
332
- `rs/entity/t_material_apply`,
333
- data
334
- )
335
- this.closeMaterials()
336
- },
337
- sycronizedCode(index,val){
338
- console.log("看看:",index,val)
339
- this.materials[index].f_material_code = val
340
- },
341
- closeMaterials () {
342
- this.getOnetoManyData()
343
- this.showMaterialModal = false
344
- }
345
- },
346
- events: {
347
- 'beforeFileUpload' (file) {
348
- this.showWork = true
349
- },
350
- async 'onFileUpload'(file, result) {
351
- let data = {
352
- selectdata: this.selectdata,
353
- filepath: result.f_downloadpath,
354
- user: this.$login.f
355
- }
356
- try {
357
- let res = await this.$resetpost(`rs/logic/importMaterial`, {data: data}, {
358
- resolveMsg: null,
359
- rejectMsg: '导入失败!!!',
360
- silent: true
361
- }, 0)
362
- } catch (e) {
363
- this.closeFile()
364
- }
365
- this.$dispatch('breakControl', this.selectdata)
366
- }
367
- },
368
- }
369
-
370
- </script>
371
-
372
- <style scoped>
373
-
374
- </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">
12
+ <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加</button>
13
+ </th>
14
+ </tr>
15
+ </template>
16
+ <template partial='body'>
17
+ <tr>
18
+ <td style="text-align: center;">
19
+ <nobr>{{$index+1}}</nobr>
20
+ </td>
21
+ <td style="text-align: center;">
22
+ <nobr>{{row.f_material_name}}</nobr>
23
+ </td>
24
+ <td style="text-align: center;">
25
+ <nobr>{{row.f_material_style}}</nobr>
26
+ </td>
27
+ <td style="text-align: center;">
28
+ <nobr>{{row.f_material_unit}}</nobr>
29
+ </td>
30
+ <td style="text-align: center;">
31
+ <nobr>{{row.f_material_number}}</nobr>
32
+ </td>
33
+ <td style="text-align: center;">
34
+ <button type="button" class="button_search button_spacing" @click="$parent.$parent.updateMaterial($index,row)">修改</button>
35
+ <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除</button>
36
+ </td>
37
+ </tr>
38
+ </template>
39
+ </data-grid>
40
+ <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
41
+ <header slot="modal-header" class="modal-header">
42
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
43
+ <h4 class="modal-title">选择文件</h4>
44
+ </header>
45
+ <article slot="modal-body" class="modal-body">
46
+ <div class="form-group">
47
+ <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
48
+ </div>
49
+ </article>
50
+ <footer slot="modal-footer" class="modal-footer"></footer>
51
+ </modal>
52
+ <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
53
+ :backdrop="false" :title="title">
54
+ <header slot="modal-header" class="modal-header">
55
+ <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
56
+ <h4 class="modal-title">{{title}}</h4>
57
+ </header>
58
+ <article slot="modal-body" class="modal-body clearfix">
59
+ <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
60
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
61
+ <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
62
+ <div class="col-sm-6 text-right"><button
63
+ class="button_delete button_spacing"
64
+ @click.prevent="deleteDevicesinfo(i)"
65
+ v-if="title === '新增'"
66
+ >删除</button></div>
67
+ </div>
68
+ <div class="form-group col-sm-6">
69
+ <label class="col-sm-4 control-label">选择材料:</label>
70
+ <div class="col-sm-8">
71
+ <input-select
72
+ class="select select_list"
73
+ :value.sync="item.material"
74
+ v-model="item.material"
75
+ :options="meterialOptions"
76
+ :disable="mark === 1"
77
+ @change="modifyOtherValue(i)"
78
+ :valueSingle="true"></input-select>
79
+ </div>
80
+ </div>
81
+ <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
82
+ <label class="col-sm-4 control-label">材料名称:</label>
83
+ <div class="col-sm-8">
84
+ <input class="form-control input_view" style="" type="text"
85
+ placeholder="材料名称"
86
+ v-model="item.f_material_name"
87
+ :value="item.f_material_name"
88
+ />
89
+ </div>
90
+ </div>
91
+ <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
92
+ <label class="col-sm-4 control-label">材料单位:</label>
93
+ <div class="col-sm-8">
94
+ <input class="form-control input_view" style="" type="text"
95
+ placeholder="材料单位"
96
+ v-model="item.f_material_unit"
97
+ :value="item.f_material_unit"
98
+ />
99
+ </div>
100
+ </div>
101
+ <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
102
+ <label class="col-sm-4 control-label">材料型号:</label>
103
+ <div class="col-sm-8">
104
+ <input class="form-control input_view" style="" type="text"
105
+ placeholder="材料型号"
106
+ v-model="item.f_material_style"
107
+ :value="item.f_material_style"
108
+ />
109
+ </div>
110
+ </div>
111
+
112
+ <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
113
+ <label class="col-sm-4 control-label">材料数量:</label>
114
+ <div class="col-sm-8">
115
+ <input class="form-control input_view" style="" type="number"
116
+ placeholder="设备数量"
117
+ v-model="item.f_material_number"
118
+ :value="item.f_material_number"
119
+ />
120
+ </div>
121
+ </div>
122
+ </div>
123
+
124
+ </article>
125
+ <footer slot="modal-footer" class="modal-footer">
126
+ <template v-if="mark !== 1">
127
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
128
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()" :disabled="!$v.valid">确认添加</button>
129
+ <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()" :disabled="!$v.valid">确认修改</button>
130
+ </template>
131
+ </footer>
132
+ </modal>
133
+ </div>
134
+ </template>
135
+
136
+ <script>
137
+ import {HttpResetClass} from 'vue-client'
138
+ import Vue from "vue";
139
+ export default {
140
+ name: 'addMaterialScience',
141
+ props: {
142
+ selectdata: {
143
+ type: Object
144
+ },
145
+ mark: {
146
+ type: Number,
147
+ default: 0
148
+ }
149
+ },
150
+ data () {
151
+ return {
152
+ showFile: false,
153
+ onetomany: {
154
+ rows: []
155
+ },
156
+ title:'新增',
157
+ showMaterialModal:false,
158
+ materials:[
159
+ {
160
+ material:'',
161
+ f_material_name:'',
162
+ f_material_style:'',
163
+ f_material_unit:'',
164
+ f_material_number:'',
165
+ f_bjq_sid:'',
166
+ f_material_code:'',
167
+ f_userinfo_code:''
168
+ }
169
+ ],
170
+ meterialOptions:[],
171
+ row:{},
172
+ bjqChecklag:[]
173
+ }
174
+ },
175
+ ready(){
176
+ this.getOnetoManyData()
177
+ },
178
+ methods: {
179
+ async getOnetoManyData () {
180
+ let data = {
181
+ tablename: `t_material_apply`,
182
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
183
+ }
184
+ let res = await this.$resetpost(
185
+ 'rs/sql/apply_singleTable',
186
+ {data: data},
187
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
188
+ )
189
+ this.onetomany.rows = res.data
190
+ },
191
+ async openMaterialModal () {
192
+ this.getMateralNames()
193
+ this.title = '新增'
194
+ this.materials = [
195
+ {
196
+ material:'',
197
+ f_material_name:'',
198
+ f_material_style:'',
199
+ f_material_unit:'',
200
+ f_material_number:'',
201
+ f_bjq_sid:'',
202
+ f_material_code:'',
203
+ f_userinfo_code:''
204
+ }
205
+ ],
206
+ this.showMaterialModal = true
207
+ },
208
+ closeFile() {
209
+ this.showWork = false
210
+ this.showFile = false
211
+ // 将选的文件清空
212
+ this.$refs.file.$el.querySelector('input').value = ''
213
+ this.search()
214
+ },
215
+ deleteDevicesinfo (index) {
216
+ this.materials.splice(index, 1)
217
+ },
218
+ pushMaterial () {
219
+ this.materials.push({
220
+ material:'',
221
+ f_material_name:'',
222
+ f_material_style:'',
223
+ f_material_unit:'',
224
+ f_material_number:'',
225
+ f_bjq_sid:'',
226
+ f_material_code:'',
227
+ f_userinfo_code:''
228
+ })
229
+ },
230
+ // 获取模态框材料
231
+ async getMateralNames () {
232
+ let data = {
233
+ condition: `1=1`
234
+ }
235
+ let http = new HttpResetClass()
236
+ let res = await http.load(
237
+ 'POST',
238
+ `rs/sql/getStockMaterial`,
239
+ {data: data},
240
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
241
+ )
242
+
243
+ this.meterialOptions = res.data.map(item => {
244
+ return {
245
+ 'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}--${item.f_material_code}`,
246
+ 'value': item
247
+ }
248
+ })
249
+ },
250
+ modifyOtherValue (index){
251
+ console.log("进来了",index)
252
+ console.log("dddd",this.materials[index].material)
253
+ let material = this.materials[index].material
254
+ this.materials[index].f_material_name = material.f_material_name
255
+ this.materials[index].f_material_style = material.f_material_style
256
+ this.materials[index].f_material_unit = material.f_material_unit
257
+ this.materials[index].f_material_number = material.f_material_number
258
+ this.materials[index].f_material_code = material.f_material_code?material.f_material_code:''
259
+ this.materials[index].f_userinfo_code = material.f_userinfo_code?material.f_userinfo_code:''
260
+ },
261
+ // 新增材料
262
+ async addMaterial () {
263
+ console.log("登录信息:",this.$login.f)
264
+ this.title = '新增'
265
+ let data = {
266
+ f_process_id : this.selectdata.f_process_id,
267
+ f_operator_id: this.$login.f.id,
268
+ f_operator: this.$login.f.name,
269
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
270
+ f_orgid: this.$login.f.orgid,
271
+ f_orgname: this.$login.f.orgs,
272
+ materials:this.materials
273
+ }
274
+
275
+ if (this.bjqChecklag.length > 0){
276
+ return
277
+ }
278
+ let res = await this.$resetpost(
279
+ `apply/rs/logic/saveMaterials`,
280
+ data
281
+ )
282
+ this.closeMaterials()
283
+ },
284
+ async deleteMaterial (row) {
285
+ var show1 = window.confirm('您确定要删除这条记录吗?')
286
+ if(show1 != true){
287
+ this.closeMaterials()
288
+ }else{
289
+ debugger
290
+ let http = new HttpResetClass()
291
+ let res = await http.load(
292
+ 'POST',
293
+ `rs/logic/deleteMaterial`,
294
+ {data: row},
295
+ {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
296
+ )
297
+ this.closeMaterials()
298
+ }
299
+
300
+ },
301
+ async updateMaterial (index,row) {
302
+ this.title = '修改'
303
+ this.row = row
304
+ this.getMateralNames()
305
+ this.materials = [
306
+ {
307
+ material:'',
308
+ f_material_name:row.f_material_name,
309
+ f_material_style:row.f_material_style,
310
+ f_material_unit:row.f_material_unit,
311
+ f_material_number:row.f_material_number,
312
+ f_material_code:row.f_material_code,
313
+ f_userinfo_code:row.f_userinfo_code,
314
+ f_bjq_sid: row.f_bjq_sid
315
+ }
316
+ ]
317
+ this.showMaterialModal = true
318
+ },
319
+ async updateConfirm () {
320
+ let data = this.row
321
+ data.f_material_name = this.materials[0].f_material_name
322
+ data.f_material_style = this.materials[0].f_material_style
323
+ data.f_material_unit = this.materials[0].f_material_unit
324
+ data.f_material_number = this.materials[0].f_material_number
325
+ data.f_material_code = this.materials[0].f_material_code
326
+ data.f_bjq_sid = this.materials[0].f_bjq_sid
327
+ data.f_userinfo_code = this.materials[0].f_userinfo_code
328
+ if (this.bjqChecklag.length > 0){
329
+ return
330
+ }
331
+ let res = await this.$resetpost(
332
+ `rs/entity/t_material_apply`,
333
+ data
334
+ )
335
+ this.closeMaterials()
336
+ },
337
+ sycronizedCode(index,val){
338
+ console.log("看看:",index,val)
339
+ this.materials[index].f_material_code = val
340
+ },
341
+ closeMaterials () {
342
+ this.getOnetoManyData()
343
+ this.showMaterialModal = false
344
+ }
345
+ },
346
+ events: {
347
+ 'beforeFileUpload' (file) {
348
+ this.showWork = true
349
+ },
350
+ async 'onFileUpload'(file, result) {
351
+ let data = {
352
+ selectdata: this.selectdata,
353
+ filepath: result.f_downloadpath,
354
+ user: this.$login.f
355
+ }
356
+ try {
357
+ let res = await this.$resetpost(`rs/logic/importMaterial`, {data: data}, {
358
+ resolveMsg: null,
359
+ rejectMsg: '导入失败!!!',
360
+ silent: true
361
+ }, 0)
362
+ } catch (e) {
363
+ this.closeFile()
364
+ }
365
+ this.$dispatch('breakControl', this.selectdata)
366
+ }
367
+ },
368
+ }
369
+
370
+ </script>
371
+
372
+ <style scoped>
373
+
374
+ </style>