apply-clients 3.4.84 → 3.4.88

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.
@@ -12,7 +12,6 @@ var ldap = 'http://221.193.244.147:8400'
12
12
  var applyinstall = 'http://221.193.244.147:8400'
13
13
 
14
14
  var proxyTable = {
15
-
16
15
  '/rs/logic/getSaleInitData': {
17
16
  target: ldap
18
17
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "3.4.84",
3
+ "version": "3.4.88",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -0,0 +1,405 @@
1
+ <template>
2
+ <div>
3
+ <data-grid :model="onetomany" class="list_area table_sy">
4
+ <template partial='head'>
5
+ <tr>
6
+ <th class="textNoLineBreak">序号</th>
7
+ <th class="textNoLineBreak">材料名称</th>
8
+ <th class="textNoLineBreak">材料型号</th>
9
+ <th class="textNoLineBreak">材料单位</th>
10
+ <th class="textNoLineBreak">材料数量</th>
11
+ <th class="textNoLineBreak">应免数量</th>
12
+ <th class="textNoLineBreak">材料价格</th>
13
+ <th class="textNoLineBreak">材料状态</th>
14
+ <th class="textNoLineBreak">
15
+ <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加
16
+ </button>
17
+ </th>
18
+ </tr>
19
+ </template>
20
+ <template partial='body'>
21
+ <tr>
22
+ <td style="text-align: center;">
23
+ <nobr>{{$index+1}}</nobr>
24
+ </td>
25
+ <td style="text-align: center;">
26
+ <nobr>{{row.f_material_name}}</nobr>
27
+ </td>
28
+ <td style="text-align: center;">
29
+ <nobr>{{row.f_material_style}}</nobr>
30
+ </td>
31
+ <td style="text-align: center;">
32
+ <nobr>{{row.f_material_unit}}</nobr>
33
+ </td>
34
+ <td style="text-align: center;">
35
+ <nobr>{{row.f_material_number}}</nobr>
36
+ </td>
37
+ <td style="text-align: center;">
38
+ <nobr>{{row.f_quantity_payable}}</nobr>
39
+ </td>
40
+ <td style="text-align: center;">
41
+ <nobr>{{row.f_material_price}}</nobr>
42
+ </td>
43
+ <td style="text-align: center;">
44
+ <nobr>{{row.f_material_type}}</nobr>
45
+ </td>
46
+ <td style="text-align: center;">
47
+ <button type="button" class="button_search button_spacing"
48
+ @click="$parent.$parent.updateMaterial($index,row)">修改
49
+ </button>
50
+ <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除
51
+ </button>
52
+ </td>
53
+ </tr>
54
+ </template>
55
+ </data-grid>
56
+ <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
57
+ :backdrop="false" :title="title">
58
+ <header slot="modal-header" class="modal-header">
59
+ <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
60
+ <h4 class="modal-title">{{title}}</h4>
61
+ </header>
62
+ <article slot="modal-body" class="modal-body clearfix">
63
+ <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
64
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
65
+ <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
66
+ <div class="col-sm-6 text-right">
67
+ <button
68
+ class="button_delete button_spacing"
69
+ @click.prevent="deleteDevicesinfo(i)"
70
+ v-if="title === '新增'"
71
+ >删除
72
+ </button>
73
+ </div>
74
+ </div>
75
+ <div class="form-group col-sm-6">
76
+ <label class="col-sm-4 control-label">选择材料:</label>
77
+ <div class="col-sm-8">
78
+ <input-select
79
+ class="select select_list"
80
+ :value.sync="item.material"
81
+ v-model="item.material"
82
+ :options="meterialOptions"
83
+ :disable="mark === 1"
84
+ @change="modifyOtherValue(i)"
85
+ :valueSingle="true"></input-select>
86
+ </div>
87
+ </div>
88
+ <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
89
+ <label class="col-sm-4 control-label">材料名称:</label>
90
+ <div class="col-sm-8">
91
+ <input class="form-control input_view" style="" type="text"
92
+ placeholder="材料名称"
93
+ v-model="item.f_material_name"
94
+ :value="item.f_material_name"
95
+ />
96
+ </div>
97
+ </div>
98
+ <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
99
+ <label class="col-sm-4 control-label">材料型号:</label>
100
+ <div class="col-sm-8">
101
+ <input class="form-control input_view" style="" type="text"
102
+ placeholder="材料型号"
103
+ v-model="item.f_material_style"
104
+ :value="item.f_material_style"
105
+ />
106
+ </div>
107
+ </div>
108
+ <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
109
+ <label class="col-sm-4 control-label">材料单位:</label>
110
+ <div class="col-sm-8">
111
+ <input class="form-control input_view" style="" type="text"
112
+ placeholder="材料单位"
113
+ v-model="item.f_material_unit"
114
+ :value="item.f_material_unit"
115
+ />
116
+ </div>
117
+ </div>
118
+ <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
119
+ <label class="col-sm-4 control-label">材料数量:</label>
120
+ <div class="col-sm-8">
121
+ <input class="form-control input_view" style="" type="number"
122
+ placeholder="设备数量"
123
+ v-model="item.f_material_number"
124
+ :value="item.f_material_number"
125
+ />
126
+ </div>
127
+ </div>
128
+ <div class="form-group col-sm-6" :class="[item.f_quantity_payable ? '' : 'has-error']">
129
+ <label class="col-sm-4 control-label">应免数量:</label>
130
+ <div class="col-sm-8">
131
+ <input class="form-control input_view" style="" type="number"
132
+ placeholder="应免数量"
133
+ v-model="item.f_quantity_payable"
134
+ :value="item.f_quantity_payable"
135
+ />
136
+ </div>
137
+ </div>
138
+ <div class="form-group col-sm-6">
139
+ <label class="col-sm-4 control-label">材料价格:</label>
140
+ <div class="col-sm-8">
141
+ <input class="form-control input_view" style="" type="text"
142
+ placeholder="材料价格"
143
+ v-model="item.f_material_price"
144
+ :value="item.f_material_price"
145
+ />
146
+ </div>
147
+ </div>
148
+ <div class="form-group col-sm-6">
149
+ <label class="col-sm-4 control-label"></label>
150
+ <div class="col-sm-8">
151
+
152
+ </div>
153
+ </div>
154
+ <div class="form-group col-sm-6">
155
+ <label class="col-sm-4 control-label"></label>
156
+ <div class="col-sm-8">
157
+
158
+ </div>
159
+ </div>
160
+ <div class="form-group col-sm-6">
161
+ <label class="col-sm-4 control-label"></label>
162
+ <div class="col-sm-8">
163
+
164
+ </div>
165
+ </div>
166
+ <div class="form-group col-sm-6">
167
+ <label class="col-sm-4 control-label"></label>
168
+ <div class="col-sm-8">
169
+
170
+ </div>
171
+ </div>
172
+ <div class="form-group col-sm-6">
173
+ <label class="col-sm-4 control-label"></label>
174
+ <div class="col-sm-8">
175
+
176
+ </div>
177
+ </div>
178
+ <div class="form-group col-sm-6">
179
+ <label class="col-sm-4 control-label"></label>
180
+ <div class="col-sm-8">
181
+
182
+ </div>
183
+ </div>
184
+ <div class="form-group col-sm-6">
185
+ <label class="col-sm-4 control-label"></label>
186
+ <div class="col-sm-8">
187
+
188
+ </div>
189
+ </div>
190
+ </div>
191
+ </article>
192
+ <footer slot="modal-footer" class="modal-footer">
193
+ <template v-if="mark !== 1">
194
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
195
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
196
+ :disabled="!$v.valid">确认添加
197
+ </button>
198
+ <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
199
+ :disabled="!$v.valid">确认修改
200
+ </button>
201
+ </template>
202
+ </footer>
203
+ </modal>
204
+ </div>
205
+ </template>
206
+
207
+ <script>
208
+ import Vue from 'vue'
209
+ import {HttpResetClass} from 'vue-client'
210
+
211
+ export default {
212
+ name: 'addMaterialScience',
213
+ props: {
214
+ selectdata: {
215
+ type: Object
216
+ }
217
+ },
218
+ data() {
219
+ return {
220
+ onetomany: {
221
+ rows: []
222
+ },
223
+ title: '新增',
224
+ showMaterialModal: false,
225
+ materials: [
226
+ {
227
+ material: '',
228
+ f_material_name: '',
229
+ f_material_style: '',
230
+ f_material_unit: '',
231
+ f_material_number: '',
232
+ f_material_price:'',
233
+ f_quantity_payable:0
234
+ }
235
+ ],
236
+ meterialOptions: [],
237
+ row: {},
238
+ bjqChecklag:[],
239
+ fmaterialname:{},
240
+ isShow:[false]
241
+ }
242
+ },
243
+ ready() {
244
+ this.getOnetoManyData()
245
+ },
246
+ methods: {
247
+ async getOnetoManyData () {
248
+ let http = new HttpResetClass()
249
+ let data = {
250
+ tablename: `t_material_apply`,
251
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
252
+ }
253
+ let res = await http.load(
254
+ 'POST',
255
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
256
+ {data: data},
257
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
258
+ )
259
+ this.onetomany.rows = res.data
260
+ },
261
+ async openMaterialModal() {
262
+ this.getMateralNames()
263
+ this.title = '新增'
264
+ this.materials = [
265
+ {
266
+ material: '',
267
+ f_material_name: '',
268
+ f_material_style: '',
269
+ f_material_unit: '',
270
+ f_material_number: '',
271
+ f_material_price:'',
272
+ f_quantity_payable:0
273
+ }
274
+ ],
275
+ this.showMaterialModal = true
276
+ this.isShow = [false]
277
+ },
278
+ deleteDevicesinfo(index) {
279
+ this.materials.splice(index, 1)
280
+ this.isShow.splice(index, 1)
281
+ },
282
+ pushMaterial() {
283
+ this.materials.push({
284
+ material: '',
285
+ f_material_name: '',
286
+ f_material_style: '',
287
+ f_material_unit: '',
288
+ f_material_number: '',
289
+ f_material_price:'',
290
+ f_quantity_payable:0
291
+ })
292
+ this.isShow.push(false)
293
+ },
294
+ // 获取模态框材料
295
+ async getMateralNames() {
296
+ let data = {
297
+ condition: `1=1`
298
+ }
299
+ let http = new HttpResetClass()
300
+ let res = await http.load(
301
+ 'POST',
302
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
303
+ {data: data},
304
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
305
+ )
306
+
307
+ this.meterialOptions = res.data.map(item => {
308
+ return {
309
+ 'label': `${item.f_material_name}--${item.f_material_style}`,
310
+ 'value': item
311
+ }
312
+ })
313
+ },
314
+ modifyOtherValue(index) {
315
+ console.log("进来了", index)
316
+ console.log("dddd", this.materials[index].material)
317
+ let material = this.materials[index].material
318
+ this.materials[index].f_material_name = material.f_material_name
319
+ this.materials[index].f_material_style = material.f_material_style
320
+ this.materials[index].f_material_unit = material.f_material_unit
321
+ this.materials[index].f_material_price = material.f_material_price
322
+
323
+ },
324
+ // 新增材料
325
+ async addMaterial() {
326
+ this.title = '新增'
327
+ let data = {
328
+ f_process_id: this.selectdata.f_process_id,
329
+ f_operator_id: Vue.user.id,
330
+ f_operator: Vue.user.name,
331
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
332
+ f_orgid: Vue.user.orgid,
333
+ f_orgname: Vue.user.orgs,
334
+ materials: this.materials
335
+ }
336
+ let http = new HttpResetClass()
337
+ let res = await http.load(
338
+ 'POST',
339
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/saveMaterials`,
340
+ data
341
+ )
342
+ this.closeMaterials()
343
+ },
344
+ async deleteMaterial(row) {
345
+ debugger
346
+ var show1 = window.confirm('您确定要删除这条记录吗?')
347
+ if(show1 != true){
348
+ this.closeMaterials()
349
+ }else{
350
+ let http = new HttpResetClass()
351
+ let res = await http.load(
352
+ 'POST',
353
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
354
+ {data: row},
355
+ {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
356
+ )
357
+ this.closeMaterials()
358
+ }
359
+ }
360
+ ,
361
+ async updateMaterial(index, row) {
362
+ this.title = '修改'
363
+ this.row = row
364
+ this.getMateralNames()
365
+ this.materials = [
366
+ {
367
+ material: '',
368
+ f_material_name: row.f_material_name,
369
+ f_material_style: row.f_material_style,
370
+ f_material_unit: row.f_material_unit,
371
+ f_material_number: row.f_material_number,
372
+ f_material_price:row.f_material_price,
373
+ f_quantity_payable:row.f_quantity_payable
374
+ }
375
+ ]
376
+ this.showMaterialModal = true
377
+ },
378
+ async updateConfirm() {
379
+ let data = this.row
380
+ data.f_material_name = this.materials[0].f_material_name
381
+ data.f_material_style = this.materials[0].f_material_style
382
+ data.f_material_unit = this.materials[0].f_material_unit
383
+ data.f_material_number = this.materials[0].f_material_number
384
+ data.f_material_price = this.materials[0].f_material_price
385
+ data.f_quantity_payable = this.materials[0].f_quantity_payable
386
+ let http = new HttpResetClass()
387
+ let res = await http.load(
388
+ 'POST',
389
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_apply`,
390
+ data
391
+ )
392
+ this.closeMaterials()
393
+ },
394
+ closeMaterials() {
395
+ this.getOnetoManyData()
396
+ this.showMaterialModal = false
397
+ }
398
+ }
399
+ }
400
+
401
+ </script>
402
+
403
+ <style scoped>
404
+
405
+ </style>