apply-clients 3.3.110-206 → 3.3.110-207

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "3.3.110-206",
3
+ "version": "3.3.110-207",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
package/src/apply.js CHANGED
@@ -64,6 +64,8 @@ export default function () {
64
64
  Vue.component('select-apply', (resolve) => { require(['./components/product/Process/Processes/selectApply'], resolve) })
65
65
  // 设备管理
66
66
  Vue.component('apply-devices-management', (resolve) => { require(['./components/product/Process/Processes/devicesManagement'], resolve) })
67
+ // 添加多个材料合并
68
+ Vue.component('add-material-science', (resolve) => { require(['./components/product/Process/Processes/addMaterialScience'], resolve) })
67
69
  Vue.component('test', (resolve) => { require(['./components/product/Test'], resolve) })
68
70
 
69
71
  /** VueUtils **/
@@ -22,6 +22,8 @@ export default function () {
22
22
  Vue.component('app-service-view', (resolve) => { require(['./components/android/AppServiceView'], resolve) })
23
23
  Vue.component('app-onetomany', (resolve) => { require(['./components/android/AppOnetomany'], resolve) })
24
24
 
25
+ Vue.component('app-add-material-science', (resolve) => { require(['./components/android/Process/Processes/AppAddMaterialScience'], resolve) })
26
+
25
27
  Vue.component('app-installation-details', (resolve) => { require(['./components/android/Process/Processes/AppInstallationDetails'], resolve) })
26
28
  Vue.component('app-apply-devices-management', (resolve) => { require(['./components/android/Process/Processes/AppDevicesManagement'], resolve) })
27
29
  Vue.component('app-charge-management', (resolve) => { require(['./components/android/Process/Processes/AppChargeManagement'], resolve) })
@@ -0,0 +1,331 @@
1
+ <template>
2
+ <div>
3
+ <data-grid :model="onetomany" class="list_area table_sy">
4
+ <template partial='head'>
5
+ <tr>
6
+ <th class="textNoLineBreak">序号</th>
7
+ <th class="textNoLineBreak">材料名称</th>
8
+ <th class="textNoLineBreak">材料型号</th>
9
+ <th class="textNoLineBreak">材料单位</th>
10
+ <th class="textNoLineBreak">材料数量</th>
11
+ <th class="textNoLineBreak">材料编号</th>
12
+ <th class="textNoLineBreak">材料标识</th>
13
+ <th class="textNoLineBreak">
14
+ <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加</button>
15
+ </th>
16
+ </tr>
17
+ </template>
18
+ <template partial='body'>
19
+ <tr>
20
+ <td style="text-align: center;">
21
+ <nobr>{{$index+1}}</nobr>
22
+ </td>
23
+ <td style="text-align: center;">
24
+ <nobr>{{row.f_material_name}}</nobr>
25
+ </td>
26
+ <td style="text-align: center;">
27
+ <nobr>{{row.f_material_style}}</nobr>
28
+ </td>
29
+ <td style="text-align: center;">
30
+ <nobr>{{row.f_material_unit}}</nobr>
31
+ </td>
32
+ <td style="text-align: center;">
33
+ <nobr>{{row.f_material_number}}</nobr>
34
+ </td>
35
+ <td style="text-align: center;">
36
+ <nobr>{{row.f_bjq_sid}}</nobr>
37
+ </td>
38
+ <td style="text-align: center;">
39
+ <nobr>{{row.f_material_code}}</nobr>
40
+ </td>
41
+ <td style="text-align: center;">
42
+ <button type="button" class="button_search button_spacing" @click="$parent.$parent.updateMaterial($index,row)">修改</button>
43
+ <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除</button>
44
+ </td>
45
+ </tr>
46
+ </template>
47
+ </data-grid>
48
+ <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
49
+ :backdrop="false" :title="title">
50
+ <header slot="modal-header" class="modal-header">
51
+ <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
52
+ <h4 class="modal-title">{{title}}</h4>
53
+ </header>
54
+ <article slot="modal-body" class="modal-body clearfix">
55
+ <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
56
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
57
+ <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
58
+ <div class="col-sm-6 text-right"><button
59
+ class="button_delete button_spacing"
60
+ @click.prevent="deleteDevicesinfo(i)"
61
+ v-if="title === '新增'"
62
+ >删除</button></div>
63
+ </div>
64
+ <div class="form-group col-sm-6">
65
+ <label class="col-sm-4 control-label">选择材料:</label>
66
+ <div class="col-sm-8">
67
+ <input-select
68
+ class="select select_list"
69
+ :value.sync="item.material"
70
+ v-model="item.material"
71
+ :options="meterialOptions"
72
+ :disable="mark === 1"
73
+ @change="modifyOtherValue(i)"
74
+ :valueSingle="true"></input-select>
75
+ </div>
76
+ </div>
77
+ <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
78
+ <label class="col-sm-4 control-label">材料名称:</label>
79
+ <div class="col-sm-8">
80
+ <input class="form-control input_view" style="" type="text"
81
+ placeholder="材料名称"
82
+ v-model="item.f_material_name"
83
+ :value="item.f_material_name"
84
+ />
85
+ </div>
86
+ </div>
87
+ <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
88
+ <label class="col-sm-4 control-label">材料型号:</label>
89
+ <div class="col-sm-8">
90
+ <input class="form-control input_view" style="" type="text"
91
+ placeholder="材料型号"
92
+ v-model="item.f_material_style"
93
+ :value="item.f_material_style"
94
+ />
95
+ </div>
96
+ </div>
97
+ <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
98
+ <label class="col-sm-4 control-label">材料单位:</label>
99
+ <div class="col-sm-8">
100
+ <input class="form-control input_view" style="" type="text"
101
+ placeholder="材料单位"
102
+ v-model="item.f_material_unit"
103
+ :value="item.f_material_unit"
104
+ />
105
+ </div>
106
+ </div>
107
+ <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
108
+ <label class="col-sm-4 control-label">材料数量:</label>
109
+ <div class="col-sm-8">
110
+ <input class="form-control input_view" style="" type="number"
111
+ placeholder="设备数量"
112
+ v-model="item.f_material_number"
113
+ :value="item.f_material_number"
114
+ />
115
+ </div>
116
+ </div>
117
+ <div class="form-group col-sm-6">
118
+ <label class="col-sm-4 control-label">材料编号:</label>
119
+ <div class="col-sm-8">
120
+ <input class="form-control input_view" style="" type="text"
121
+ placeholder="材料编号"
122
+ v-model="item.f_bjq_sid"
123
+ :value="item.f_bjq_sid"
124
+ />
125
+ </div>
126
+ </div>
127
+ <div class="form-group col-sm-6">
128
+ <label class="col-sm-4 control-label">材料标识:</label>
129
+ <div class="col-sm-8">
130
+ <input class="form-control input_view" style=""
131
+ placeholder="材料标识"
132
+ v-model="item.f_material_code"
133
+ :value.sync="item.f_material_code"
134
+ />
135
+ </div>
136
+ </div>
137
+
138
+ </div>
139
+
140
+ </article>
141
+ <footer slot="modal-footer" class="modal-footer">
142
+ <template v-if="mark !== 1">
143
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
144
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()" :disabled="!$v.valid">确认添加</button>
145
+ <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()" :disabled="!$v.valid">确认修改</button>
146
+ </template>
147
+ </footer>
148
+ </modal>
149
+ </div>
150
+ </template>
151
+
152
+ <script>
153
+ import {HttpResetClass} from 'vue-client'
154
+ export default {
155
+ name: 'addMaterialScience',
156
+ props: {
157
+ selectdata: {
158
+ type: Object
159
+ }
160
+ },
161
+ data () {
162
+ return {
163
+ onetomany: {
164
+ rows: []
165
+ },
166
+ title:'新增',
167
+ showMaterialModal:false,
168
+ materials:[
169
+ {
170
+ material:'',
171
+ f_material_name:'',
172
+ f_material_style:'',
173
+ f_material_unit:'',
174
+ f_material_number:'',
175
+ f_bjq_sid:'',
176
+ f_material_code:''
177
+ }
178
+ ],
179
+ meterialOptions:[],
180
+ row:{}
181
+ }
182
+ },
183
+ ready(){
184
+ this.getOnetoManyData()
185
+ },
186
+ methods: {
187
+ async getOnetoManyData () {
188
+ let data = {
189
+ tablename: `t_material_apply`,
190
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
191
+ }
192
+ let res = await this.$resetpost(
193
+ 'rs/sql/singleTable',
194
+ {data: data},
195
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
196
+ )
197
+ this.onetomany.rows = res.data
198
+ },
199
+ async openMaterialModal () {
200
+ this.getMateralNames()
201
+ this.title = '新增'
202
+ this.materials = [
203
+ {
204
+ material:'',
205
+ f_material_name:'',
206
+ f_material_style:'',
207
+ f_material_unit:'',
208
+ f_material_number:'',
209
+ f_bjq_sid:'',
210
+ f_material_code:''
211
+ }
212
+ ],
213
+ this.showMaterialModal = true
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
+ })
228
+ },
229
+ // 获取模态框材料
230
+ async getMateralNames () {
231
+ let data = {
232
+ condition: `1=1`
233
+ }
234
+ let http = new HttpResetClass()
235
+ let res = await http.load(
236
+ 'POST',
237
+ `rs/sql/getStockMaterial`,
238
+ {data: data},
239
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
240
+ )
241
+
242
+ this.meterialOptions = res.data.map(item => {
243
+ return {
244
+ 'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}--${item.f_material_price}`,
245
+ 'value': item
246
+ }
247
+ })
248
+ },
249
+ modifyOtherValue (index){
250
+ console.log("进来了",index)
251
+ console.log("dddd",this.materials[index].material)
252
+ let material = this.materials[index].material
253
+ this.materials[index].f_material_name = material.f_material_name
254
+ this.materials[index].f_material_style = material.f_material_style
255
+ this.materials[index].f_material_unit = material.f_material_unit
256
+ this.materials[index].f_material_number = material.f_material_number
257
+ },
258
+ // 新增材料
259
+ async addMaterial () {
260
+ this.title = '新增'
261
+ let data = {
262
+ f_process_id : this.selectdata.f_process_id,
263
+ f_operator_id: this.$login.f.id,
264
+ f_operator: this.$login.f.name,
265
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
266
+ f_orgid: this.$login.f.f_orgids,
267
+ f_orgname: this.$login.f.f_fengongsi,
268
+ materials:this.materials
269
+ }
270
+ let res = await this.$resetpost(
271
+ `rs/logic/saveMaterials`,
272
+ data
273
+ )
274
+ this.closeMaterials()
275
+ },
276
+ deleteMaterial (row) {
277
+ this.$showMessage('您确定要删除这条记录吗?',['confirm']).then(res =>{
278
+ if (res === 'confirm'){
279
+ let http = new HttpResetClass()
280
+
281
+ let res = http.load(
282
+ 'DELETE',
283
+ `rs/entity/t_material_apply/${row.id}`,
284
+ null,
285
+ {resolveMsg: null, rejectMsg: '删除失败!!!'}
286
+ )
287
+ this.closeMaterials()
288
+ }
289
+ })
290
+ },
291
+ async updateMaterial (index,row) {
292
+ this.title = '修改'
293
+ this.row = row
294
+ this.getMateralNames()
295
+ this.materials = [
296
+ {
297
+ material:'',
298
+ f_material_name:row.f_material_name,
299
+ f_material_style:row.f_material_style,
300
+ f_material_unit:row.f_material_unit,
301
+ f_material_number:row.f_material_number,
302
+ f_material_code:row.f_material_code
303
+ }
304
+ ]
305
+ this.showMaterialModal = true
306
+ },
307
+ async updateConfirm () {
308
+ let data = this.row
309
+ data.f_material_name = this.materials[0].f_material_name
310
+ data.f_material_style = this.materials[0].f_material_style
311
+ data.f_material_unit = this.materials[0].f_material_unit
312
+ data.f_material_number = this.materials[0].f_material_number
313
+ data.f_material_code = this.materials[0].f_material_code
314
+ let res = await this.$resetpost(
315
+ `rs/entity/t_material_apply`,
316
+ data
317
+ )
318
+ this.closeMaterials()
319
+ },
320
+ closeMaterials () {
321
+ this.getOnetoManyData()
322
+ this.showMaterialModal = false
323
+ }
324
+ }
325
+ }
326
+
327
+ </script>
328
+
329
+ <style scoped>
330
+
331
+ </style>
@@ -221,9 +221,9 @@
221
221
  </button>
222
222
  <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
223
223
  <li>
224
- <!-- <a href="#" v-if="this.$login.f.rolesnames.indexOf('工程部派工') !== -1 || this.$login.f.rolesnames.indexOf('运营部派工') !== -1 || (this.$login.f.rolesnames.indexOf('营业厅报装') !== -1 && row.f_sub_state === '待点火')" @click="$parent.$parent.$parent.click(row)">{{row.f_sub_state}}</a>-->
225
- <!-- <a href="#" v-if="this.$login.f.rolesnames.indexOf('营业厅报装') !== -1 || this.$login.f.rolesnames.indexOf('运营部派工') !== -1" @click="$parent.$parent.$parent.stopApply(row)">异常终止</a>-->
226
- <a href="#" v-if="this.$login.f.rolesnames.indexOf('营业厅报装') !== -1 || this.$login.f.rolesnames.indexOf('运营部派工') !== -1" @click="$parent.$parent.$parent.reviseApply(row)">修改真实流程状态</a>
224
+ <a href="#" v-if="row.f_sub_state !== '完工' && (this.$login.f.rolesnames.indexOf('工程部派工') !== -1 || this.$login.f.rolesnames.indexOf('运营部派工') !== -1 || (this.$login.f.rolesnames.indexOf('营业厅报装') !== -1 && row.f_sub_state === '待点火'))" @click="$parent.$parent.$parent.click(row)">{{row.f_sub_state}}</a>
225
+ <a href="#" v-if="row.f_sub_state !== '完工' && (this.$login.f.rolesnames.indexOf('营业厅报装') !== -1 || this.$login.f.rolesnames.indexOf('运营部派工') !== -1)" @click="$parent.$parent.$parent.stopApply(row)">异常终止</a>
226
+ <a href="#" v-if="row.f_sub_state === '完工' && (this.$login.f.rolesnames.indexOf('营业厅报装') !== -1 || this.$login.f.rolesnames.indexOf('运营部派工') !== -1)" @click="$parent.$parent.$parent.reviseApply(row)">修改真实流程状态</a>
227
227
  </li>
228
228
  </ul>
229
229
  </dropdown>
@@ -289,13 +289,13 @@ export default {
289
289
  args.condition = args.condition + ` and f_orgid = '${this.curorgid[0]}'`
290
290
 
291
291
  if (this.$login.f.rolesnames.indexOf('工程部派工') !== -1 && this.$login.f.rolesnames.indexOf('运营部派工') !== -1) {
292
- args.condition = args.condition + ` and (f_sub_state = '待安装' or f_sub_state = '待点火')`
292
+ args.condition = args.condition + ` and (f_sub_state = '待安装' or f_sub_state = '待点火' or f_sub_state = '完工')`
293
293
  } else if (this.$login.f.rolesnames.indexOf('工程部派工') !== -1) {
294
- args.condition = args.condition + ` and f_sub_state = '待安装'`
294
+ args.condition = args.condition + ` and (f_sub_state = '待安装' or f_sub_state = '完工')`
295
295
  } else if (this.$login.f.rolesnames.indexOf('运营部派工') !== -1) {
296
- args.condition = args.condition + ` and f_sub_state = '待点火'`
296
+ args.condition = args.condition + ` and (f_sub_state = '待点火' or f_sub_state = '完工')`
297
297
  } else {
298
- args.condition = args.condition + ` and (f_sub_state = '待安装' or f_sub_state = '待点火')`
298
+ args.condition = args.condition + ` and (f_sub_state = '待安装' or f_sub_state = '待点火' or f_sub_state = '完工')`
299
299
  }
300
300
 
301
301
  this.model.search(args.condition, args.model)
@@ -80,6 +80,17 @@
80
80
  close-on-select ></v-select>
81
81
  </div>
82
82
  </div>
83
+ <div class="col-sm-12 form-group" v-if="apply.f_reality_sub_state === '其他'">
84
+ <label class="control-label-justify control-label col-sm-2" style="line-height: 35px">备注</label>
85
+ <div class="col-sm-10">
86
+ <textarea
87
+ class="form-control input_view"
88
+ style="width: 100%;height: 100%" rows="2"
89
+ v-model="apply.f_reality_sub_remark"
90
+ :value="apply.f_reality_sub_remark"
91
+ ></textarea>
92
+ </div>
93
+ </div>
83
94
  </article>
84
95
  <footer slot="modal-footer" class="modal-footer">
85
96
  <button :class="apply.f_reality_sub_state ? 'btn btn-primary' : 'btn btn-default'"
@@ -285,6 +285,15 @@
285
285
  :value="selectdata.f_price_name"/>
286
286
  </div>
287
287
  </div>
288
+ <div class="col-sm-12 form-group">
289
+ <label class="control-label-justify control-label col-sm-6">真实流程状态备注:</label>
290
+ <div class="col-sm-10">
291
+ <input class="form-control input_view" type="input"
292
+ readonly
293
+ v-model="selectdata.f_reality_sub_remark"
294
+ :value="selectdata.f_reality_sub_remark"/>
295
+ </div>
296
+ </div>
288
297
  </template>
289
298
  <template v-if="selectdata.f_sub_state === '终止'">
290
299
  <div class="col-sm-4 form-group">
@@ -0,0 +1,331 @@
1
+ <template>
2
+ <div>
3
+ <data-grid :model="onetomany" class="list_area table_sy">
4
+ <template partial='head'>
5
+ <tr>
6
+ <th class="textNoLineBreak">序号</th>
7
+ <th class="textNoLineBreak">材料名称</th>
8
+ <th class="textNoLineBreak">材料型号</th>
9
+ <th class="textNoLineBreak">材料单位</th>
10
+ <th class="textNoLineBreak">材料数量</th>
11
+ <th class="textNoLineBreak">材料编号</th>
12
+ <th class="textNoLineBreak">材料标识</th>
13
+ <th class="textNoLineBreak">
14
+ <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加</button>
15
+ </th>
16
+ </tr>
17
+ </template>
18
+ <template partial='body'>
19
+ <tr>
20
+ <td style="text-align: center;">
21
+ <nobr>{{$index+1}}</nobr>
22
+ </td>
23
+ <td style="text-align: center;">
24
+ <nobr>{{row.f_material_name}}</nobr>
25
+ </td>
26
+ <td style="text-align: center;">
27
+ <nobr>{{row.f_material_style}}</nobr>
28
+ </td>
29
+ <td style="text-align: center;">
30
+ <nobr>{{row.f_material_unit}}</nobr>
31
+ </td>
32
+ <td style="text-align: center;">
33
+ <nobr>{{row.f_material_number}}</nobr>
34
+ </td>
35
+ <td style="text-align: center;">
36
+ <nobr>{{row.f_bjq_sid}}</nobr>
37
+ </td>
38
+ <td style="text-align: center;">
39
+ <nobr>{{row.f_material_code}}</nobr>
40
+ </td>
41
+ <td style="text-align: center;">
42
+ <button type="button" class="button_search button_spacing" @click="$parent.$parent.updateMaterial($index,row)">修改</button>
43
+ <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除</button>
44
+ </td>
45
+ </tr>
46
+ </template>
47
+ </data-grid>
48
+ <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
49
+ :backdrop="false" :title="title">
50
+ <header slot="modal-header" class="modal-header">
51
+ <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
52
+ <h4 class="modal-title">{{title}}</h4>
53
+ </header>
54
+ <article slot="modal-body" class="modal-body clearfix">
55
+ <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
56
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
57
+ <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
58
+ <div class="col-sm-6 text-right"><button
59
+ class="button_delete button_spacing"
60
+ @click.prevent="deleteDevicesinfo(i)"
61
+ v-if="title === '新增'"
62
+ >删除</button></div>
63
+ </div>
64
+ <div class="form-group col-sm-6">
65
+ <label class="col-sm-4 control-label">选择材料:</label>
66
+ <div class="col-sm-8">
67
+ <input-select
68
+ class="select select_list"
69
+ :value.sync="item.material"
70
+ v-model="item.material"
71
+ :options="meterialOptions"
72
+ :disable="mark === 1"
73
+ @change="modifyOtherValue(i)"
74
+ :valueSingle="true"></input-select>
75
+ </div>
76
+ </div>
77
+ <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
78
+ <label class="col-sm-4 control-label">材料名称:</label>
79
+ <div class="col-sm-8">
80
+ <input class="form-control input_view" style="" type="text"
81
+ placeholder="材料名称"
82
+ v-model="item.f_material_name"
83
+ :value="item.f_material_name"
84
+ />
85
+ </div>
86
+ </div>
87
+ <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
88
+ <label class="col-sm-4 control-label">材料型号:</label>
89
+ <div class="col-sm-8">
90
+ <input class="form-control input_view" style="" type="text"
91
+ placeholder="材料型号"
92
+ v-model="item.f_material_style"
93
+ :value="item.f_material_style"
94
+ />
95
+ </div>
96
+ </div>
97
+ <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
98
+ <label class="col-sm-4 control-label">材料单位:</label>
99
+ <div class="col-sm-8">
100
+ <input class="form-control input_view" style="" type="text"
101
+ placeholder="材料单位"
102
+ v-model="item.f_material_unit"
103
+ :value="item.f_material_unit"
104
+ />
105
+ </div>
106
+ </div>
107
+ <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
108
+ <label class="col-sm-4 control-label">材料数量:</label>
109
+ <div class="col-sm-8">
110
+ <input class="form-control input_view" style="" type="number"
111
+ placeholder="设备数量"
112
+ v-model="item.f_material_number"
113
+ :value="item.f_material_number"
114
+ />
115
+ </div>
116
+ </div>
117
+ <div class="form-group col-sm-6">
118
+ <label class="col-sm-4 control-label">材料编号:</label>
119
+ <div class="col-sm-8">
120
+ <input class="form-control input_view" style="" type="text"
121
+ placeholder="材料编号"
122
+ v-model="item.f_bjq_sid"
123
+ :value="item.f_bjq_sid"
124
+ />
125
+ </div>
126
+ </div>
127
+ <div class="form-group col-sm-6">
128
+ <label class="col-sm-4 control-label">材料标识:</label>
129
+ <div class="col-sm-8">
130
+ <input class="form-control input_view" style=""
131
+ placeholder="材料标识"
132
+ v-model="item.f_material_code"
133
+ :value.sync="item.f_material_code"
134
+ />
135
+ </div>
136
+ </div>
137
+
138
+ </div>
139
+
140
+ </article>
141
+ <footer slot="modal-footer" class="modal-footer">
142
+ <template v-if="mark !== 1">
143
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
144
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()" :disabled="!$v.valid">确认添加</button>
145
+ <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()" :disabled="!$v.valid">确认修改</button>
146
+ </template>
147
+ </footer>
148
+ </modal>
149
+ </div>
150
+ </template>
151
+
152
+ <script>
153
+ import {HttpResetClass} from 'vue-client'
154
+ export default {
155
+ name: 'addMaterialScience',
156
+ props: {
157
+ selectdata: {
158
+ type: Object
159
+ }
160
+ },
161
+ data () {
162
+ return {
163
+ onetomany: {
164
+ rows: []
165
+ },
166
+ title:'新增',
167
+ showMaterialModal:false,
168
+ materials:[
169
+ {
170
+ material:'',
171
+ f_material_name:'',
172
+ f_material_style:'',
173
+ f_material_unit:'',
174
+ f_material_number:'',
175
+ f_bjq_sid:'',
176
+ f_material_code:''
177
+ }
178
+ ],
179
+ meterialOptions:[],
180
+ row:{}
181
+ }
182
+ },
183
+ ready(){
184
+ this.getOnetoManyData()
185
+ },
186
+ methods: {
187
+ async getOnetoManyData () {
188
+ let data = {
189
+ tablename: `t_material_apply`,
190
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
191
+ }
192
+ let res = await this.$resetpost(
193
+ 'rs/sql/singleTable',
194
+ {data: data},
195
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
196
+ )
197
+ this.onetomany.rows = res.data
198
+ },
199
+ async openMaterialModal () {
200
+ this.getMateralNames()
201
+ this.title = '新增'
202
+ this.materials = [
203
+ {
204
+ material:'',
205
+ f_material_name:'',
206
+ f_material_style:'',
207
+ f_material_unit:'',
208
+ f_material_number:'',
209
+ f_bjq_sid:'',
210
+ f_material_code:''
211
+ }
212
+ ],
213
+ this.showMaterialModal = true
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
+ })
228
+ },
229
+ // 获取模态框材料
230
+ async getMateralNames () {
231
+ let data = {
232
+ condition: `1=1`
233
+ }
234
+ let http = new HttpResetClass()
235
+ let res = await http.load(
236
+ 'POST',
237
+ `rs/sql/getStockMaterial`,
238
+ {data: data},
239
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
240
+ )
241
+
242
+ this.meterialOptions = res.data.map(item => {
243
+ return {
244
+ 'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}--${item.f_material_price}`,
245
+ 'value': item
246
+ }
247
+ })
248
+ },
249
+ modifyOtherValue (index){
250
+ console.log("进来了",index)
251
+ console.log("dddd",this.materials[index].material)
252
+ let material = this.materials[index].material
253
+ this.materials[index].f_material_name = material.f_material_name
254
+ this.materials[index].f_material_style = material.f_material_style
255
+ this.materials[index].f_material_unit = material.f_material_unit
256
+ this.materials[index].f_material_number = material.f_material_number
257
+ },
258
+ // 新增材料
259
+ async addMaterial () {
260
+ this.title = '新增'
261
+ let data = {
262
+ f_process_id : this.selectdata.f_process_id,
263
+ f_operator_id: this.$login.f.id,
264
+ f_operator: this.$login.f.name,
265
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
266
+ f_orgid: this.$login.f.f_orgids,
267
+ f_orgname: this.$login.f.f_fengongsi,
268
+ materials:this.materials
269
+ }
270
+ let res = await this.$resetpost(
271
+ `rs/logic/saveMaterials`,
272
+ data
273
+ )
274
+ this.closeMaterials()
275
+ },
276
+ deleteMaterial (row) {
277
+ this.$showMessage('您确定要删除这条记录吗?',['confirm']).then(res =>{
278
+ if (res === 'confirm'){
279
+ let http = new HttpResetClass()
280
+
281
+ let res = http.load(
282
+ 'DELETE',
283
+ `rs/entity/t_material_apply/${row.id}`,
284
+ null,
285
+ {resolveMsg: null, rejectMsg: '删除失败!!!'}
286
+ )
287
+ this.closeMaterials()
288
+ }
289
+ })
290
+ },
291
+ async updateMaterial (index,row) {
292
+ this.title = '修改'
293
+ this.row = row
294
+ this.getMateralNames()
295
+ this.materials = [
296
+ {
297
+ material:'',
298
+ f_material_name:row.f_material_name,
299
+ f_material_style:row.f_material_style,
300
+ f_material_unit:row.f_material_unit,
301
+ f_material_number:row.f_material_number,
302
+ f_material_code:row.f_material_code
303
+ }
304
+ ]
305
+ this.showMaterialModal = true
306
+ },
307
+ async updateConfirm () {
308
+ let data = this.row
309
+ data.f_material_name = this.materials[0].f_material_name
310
+ data.f_material_style = this.materials[0].f_material_style
311
+ data.f_material_unit = this.materials[0].f_material_unit
312
+ data.f_material_number = this.materials[0].f_material_number
313
+ data.f_material_code = this.materials[0].f_material_code
314
+ let res = await this.$resetpost(
315
+ `rs/entity/t_material_apply`,
316
+ data
317
+ )
318
+ this.closeMaterials()
319
+ },
320
+ closeMaterials () {
321
+ this.getOnetoManyData()
322
+ this.showMaterialModal = false
323
+ }
324
+ }
325
+ }
326
+
327
+ </script>
328
+
329
+ <style scoped>
330
+
331
+ </style>
@@ -1530,9 +1530,9 @@ export default {
1530
1530
  {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1531
1531
  )
1532
1532
  debugger
1533
- console.log('打印查询的内容',restp1)
1534
- restp1.data[0].processname = '散户报建流程'
1535
- restp1.data[0].defname = '报装缴费'
1533
+ console.log('有没有发请求打印查询的内容restp1',restp1)
1534
+ // restp1.data[0].processname = '散户报建流程'
1535
+ // restp1.data[0].defname = '报装缴费'
1536
1536
  this.$dispatch('apply',restp1.data[0])
1537
1537
  }else if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '报装缴费' && this.show_data.button.button_name === '提交'){
1538
1538
  let data3 = {
@@ -1551,8 +1551,8 @@ export default {
1551
1551
  )
1552
1552
  debugger
1553
1553
  console.log('打印查询的内容',restp2)
1554
- restp2.data[0].processname = '散户报建流程'
1555
- restp2.data[0].defname = '工程派工'
1554
+ // restp2.data[0].processname = '散户报建流程'
1555
+ // restp2.data[0].defname = '工程派工'
1556
1556
  this.$dispatch('apply',restp2.data[0])
1557
1557
  }
1558
1558
  else{
package/src/main.js CHANGED
@@ -7,7 +7,7 @@ import {sale} from 'sale-client'
7
7
  import {material} from 'material-client'
8
8
 
9
9
  import apply from './apply'
10
-
10
+ //
11
11
  // import applyAndroid from './applyAndroid'
12
12
 
13
13
  all()