apply-clients 3.5.6-21 → 3.5.6-23
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/build/dev-server.js +5 -5
- package/package.json +1 -1
- package/src/components/android/Process/AppServiceControl.vue +1760 -1760
- package/src/components/product/Function/Service/FunctionServiceControl.vue +497 -497
- package/src/components/product/Install/ContractCharge.vue +210 -210
- package/src/filiale/dingcheng/android/AppInstallationDetails.vue +477 -477
- package/src/filiale/dingcheng/pc/InstallationDetails.vue +607 -607
- package/src/filiale/fugou/android/AppAddMaterialScience.vue +444 -444
- package/src/filiale/fugou/android/AppAddReplacement.vue +512 -512
- package/src/filiale/fugou/android/AppDevicesManagement.vue +516 -516
- package/src/filiale/fugou/android/AppInstallationDetails.vue +541 -541
- package/src/filiale/fugou/android/AppZhihuanManagement.vue +242 -242
- package/src/filiale/fugou/pc/AddReplacement.vue +511 -511
- package/src/filiale/fugou/pc/ApplyChargeList.vue +554 -554
- package/src/filiale/fugou/pc/Applybatchdispatch.vue +754 -754
- package/src/filiale/fugou/pc/InstallationDetails.vue +646 -646
- package/src/filiale/fugou/pc/ServiceControl.vue +1741 -1741
- package/src/filiale/fugou/pc/addMaterialScience.vue +481 -481
- package/src/filiale/fugou/pc.js +19 -19
- package/src/filiale/gongyi/pc/addressAndUserinfoManagement.vue +187 -187
- package/src/filiale/gongyi/pc/chargeManagement.vue +765 -765
- package/src/filiale/gongyi/pc.js +25 -25
- package/src/filiale/hongda/pc/addMaterialScience.vue +723 -723
- package/src/filiale/jinhuang/android/AppAddMaterialScience.vue +635 -635
- package/src/filiale/jinhuang/android/AppServiceControl.vue +1842 -1842
- package/src/filiale/jinhuang/android.js +7 -7
- package/src/filiale/jinhuang/pc/Applybatchdispatch.vue +770 -770
- package/src/filiale/jinhuang/pc/ContractList.vue +222 -222
- package/src/filiale/jinhuang/pc/ExplorationSelect.vue +511 -511
- package/src/filiale/jinhuang/pc/ServiceControl.vue +2016 -2016
- package/src/filiale/jinhuang/pc/SupervisoryList.vue +478 -478
- package/src/filiale/jinhuang/pc/addMaterialScience.vue +638 -638
- package/src/filiale/jinhuang/pc.js +13 -13
- package/src/filiale/qianneng/pc/Applybatchdispatch.vue +786 -786
- package/src/filiale/qianneng/pc/ServiceControl.vue +1387 -1387
- package/src/filiale/ruihua/pc/ServiceControl.vue +1973 -1973
- package/src/filiale/shexian/android/AppServiceControl.vue +1786 -1786
- package/src/filiale/shexian/android/AppSign.vue +152 -152
- package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +527 -527
- package/src/filiale/yangchunboneng/android/AppContractCharge.vue +222 -222
- package/src/filiale/yangchunboneng/android/AppInstallationMaterial.vue +1144 -1144
- package/src/filiale/yangchunboneng/android/AppOtherChargeList.vue +281 -281
- package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1883 -1883
- package/src/filiale/yangchunboneng/android/MaterIialOne.vue +179 -176
- package/src/filiale/yangchunboneng/android.js +22 -22
- package/src/filiale/yangchunboneng/pc/ApplyUpload.vue +392 -392
- package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +622 -622
- package/src/filiale/yangchunboneng/pc/InstallInfoSelect.vue +400 -400
- package/src/filiale/yangchunboneng/pc/ServiceControl.vue +2118 -2118
- package/src/filiale/yangchunboneng/pc/SupervisoryControl.vue +141 -141
- package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +652 -644
- package/src/filiale/yangchunboneng/pc/buildOrderList.vue +421 -421
- package/src/filiale/yangchunboneng/pc/chargeManagement.vue +1060 -1060
- package/src/filiale/yangchunboneng/pc/printBuildOrder.vue +175 -175
- package/src/filiale/yangchunboneng/pc.js +29 -29
- package/src/main.js +3 -3
|
@@ -1,444 +1,444 @@
|
|
|
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">
|
|
13
|
-
<button style="color:black" class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal('室内施工')">室内施工
|
|
14
|
-
</button>
|
|
15
|
-
<button style="color:black" 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_logotype}}</nobr>
|
|
39
|
-
</td>
|
|
40
|
-
<td style="text-align: center;">
|
|
41
|
-
<button type="button" class="button_search button_spacing"
|
|
42
|
-
@click="$parent.$parent.updateMaterial($index,row)">修改
|
|
43
|
-
</button>
|
|
44
|
-
<button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除
|
|
45
|
-
</button>
|
|
46
|
-
</td>
|
|
47
|
-
</tr>
|
|
48
|
-
</template>
|
|
49
|
-
</data-grid>
|
|
50
|
-
<modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal style="overflow: auto" :large="true"
|
|
51
|
-
:backdrop="false" :title="title">
|
|
52
|
-
<header slot="modal-header" class="modal-header">
|
|
53
|
-
<button type="button" class="close" @click="closeMaterials"><span>×</span></button>
|
|
54
|
-
<h4 class="modal-title">{{title}}</h4>
|
|
55
|
-
</header>
|
|
56
|
-
<article slot="modal-body" class="modal-body clearfix">
|
|
57
|
-
<data-grid v-if=" title==='新增'&& showtype == '室内施工'&& indoormaterials.rows.length > 0 " :model="indoormaterials" class="list_area table_sy">
|
|
58
|
-
<template partial='head'>
|
|
59
|
-
<tr>
|
|
60
|
-
<th class="textNoLineBreak" colspan="5">室内材料</th>
|
|
61
|
-
</tr>
|
|
62
|
-
<tr>
|
|
63
|
-
<th class="textNoLineBreak" style="width: 15%">材料</th>
|
|
64
|
-
<th class="textNoLineBreak" style="width: 5%">材料单位</th>
|
|
65
|
-
<th class="textNoLineBreak" style="width: 5%">是否选择</th>
|
|
66
|
-
<th class="textNoLineBreak" style="width: 60%">材料数量</th>
|
|
67
|
-
</tr>
|
|
68
|
-
</template>
|
|
69
|
-
<template partial='body' >
|
|
70
|
-
<tr>
|
|
71
|
-
<td style="text-align: center;">
|
|
72
|
-
<nobr>{{row.f_material_name}} {{row.f_material_style}}</nobr>
|
|
73
|
-
</td>
|
|
74
|
-
<td style="text-align: center;">
|
|
75
|
-
<nobr>{{row.f_material_unit}}</nobr>
|
|
76
|
-
</td>
|
|
77
|
-
<td style="text-align: center;">
|
|
78
|
-
<input type="checkbox" v-model="row.f_is_check" :value.sync="row.f_is_check"/>
|
|
79
|
-
</td>
|
|
80
|
-
<td style="text-align: center;">
|
|
81
|
-
<input class="form-control input_view" type="number"
|
|
82
|
-
placeholder="设备数量"
|
|
83
|
-
v-model="row.f_material_number"
|
|
84
|
-
:value.sync="row.f_material_number"
|
|
85
|
-
/>
|
|
86
|
-
</td>
|
|
87
|
-
</tr>
|
|
88
|
-
</template>
|
|
89
|
-
</data-grid>
|
|
90
|
-
<data-grid v-if=" title==='新增'&& showtype == '地埋施工'&& undergroundmaterials.rows.length > 0 " :model="undergroundmaterials" class="list_area table_sy">
|
|
91
|
-
<template partial='head'>
|
|
92
|
-
<tr>
|
|
93
|
-
<th class="textNoLineBreak" colspan="5">地埋材料</th>
|
|
94
|
-
</tr>
|
|
95
|
-
<tr>
|
|
96
|
-
<th class="textNoLineBreak" style="width: 15%">材料</th>
|
|
97
|
-
<th class="textNoLineBreak" style="width: 5%">材料单位</th>
|
|
98
|
-
<th class="textNoLineBreak" style="width: 5%">是否选择</th>
|
|
99
|
-
<th class="textNoLineBreak" style="width: 60%">材料数量</th>
|
|
100
|
-
</tr>
|
|
101
|
-
</template>
|
|
102
|
-
<template partial='body' >
|
|
103
|
-
<tr>
|
|
104
|
-
<td style="text-align: center;">
|
|
105
|
-
<nobr>{{row.f_material_name}} {{row.f_material_style}}</nobr>
|
|
106
|
-
</td>
|
|
107
|
-
<td style="text-align: center;">
|
|
108
|
-
<nobr>{{row.f_material_unit}}</nobr>
|
|
109
|
-
</td>
|
|
110
|
-
<td style="text-align: center;">
|
|
111
|
-
<input type="checkbox" v-model="row.f_is_check" :value.sync="row.f_is_check"/>
|
|
112
|
-
</td>
|
|
113
|
-
<td style="text-align: center;">
|
|
114
|
-
<input class="form-control input_view" type="number"
|
|
115
|
-
placeholder="设备数量"
|
|
116
|
-
v-model="row.f_material_number"
|
|
117
|
-
:value.sync="row.f_material_number"
|
|
118
|
-
/>
|
|
119
|
-
</td>
|
|
120
|
-
</tr>
|
|
121
|
-
</template>
|
|
122
|
-
</data-grid>
|
|
123
|
-
<div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
|
|
124
|
-
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
125
|
-
<div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
|
|
126
|
-
<div class="col-sm-6 text-right">
|
|
127
|
-
<button
|
|
128
|
-
class="button_delete button_spacing"
|
|
129
|
-
@click.prevent="deleteDevicesinfo(i)"
|
|
130
|
-
v-if="title === '新增'"
|
|
131
|
-
>删除
|
|
132
|
-
</button>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
<div class="form-group col-sm-6" v-if="title==='新增'">
|
|
136
|
-
<label class="col-sm-4 control-label">选择材料:</label>
|
|
137
|
-
<div class="col-sm-8">
|
|
138
|
-
<input-select
|
|
139
|
-
class="select select_list"
|
|
140
|
-
v-model="item.material_unique_value"
|
|
141
|
-
:value.sync="item.material_unique_value"
|
|
142
|
-
:options="meterialOptions"
|
|
143
|
-
:disable="mark === 1"
|
|
144
|
-
@change="modifyOtherValue(i)"
|
|
145
|
-
:valueSingle="true">
|
|
146
|
-
</input-select>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
<div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
|
|
150
|
-
<label class="col-sm-4 control-label">材料名称:</label>
|
|
151
|
-
<div class="col-sm-8">
|
|
152
|
-
<input class="form-control input_view" style="" type="text"
|
|
153
|
-
placeholder="材料名称"
|
|
154
|
-
v-model="item.f_material_name"
|
|
155
|
-
:value="item.f_material_name"
|
|
156
|
-
/>
|
|
157
|
-
</div>
|
|
158
|
-
</div>
|
|
159
|
-
<div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
|
|
160
|
-
<label class="col-sm-4 control-label">材料型号:</label>
|
|
161
|
-
<div class="col-sm-8">
|
|
162
|
-
<input class="form-control input_view" style="" type="text"
|
|
163
|
-
placeholder="材料型号"
|
|
164
|
-
v-model="item.f_material_style"
|
|
165
|
-
:value="item.f_material_style"
|
|
166
|
-
/>
|
|
167
|
-
</div>
|
|
168
|
-
</div>
|
|
169
|
-
<div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
|
|
170
|
-
<label class="col-sm-4 control-label">材料单位:</label>
|
|
171
|
-
<div class="col-sm-8">
|
|
172
|
-
<input class="form-control input_view" style="" type="text"
|
|
173
|
-
placeholder="材料单位"
|
|
174
|
-
v-model="item.f_material_unit"
|
|
175
|
-
:value="item.f_material_unit"
|
|
176
|
-
/>
|
|
177
|
-
</div>
|
|
178
|
-
</div>
|
|
179
|
-
<div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
|
|
180
|
-
<label class="col-sm-4 control-label">材料数量:</label>
|
|
181
|
-
<div class="col-sm-8">
|
|
182
|
-
<input class="form-control input_view" style="" type="number"
|
|
183
|
-
placeholder="设备数量"
|
|
184
|
-
v-model="item.f_material_number"
|
|
185
|
-
:value="item.f_material_number"
|
|
186
|
-
/>
|
|
187
|
-
</div>
|
|
188
|
-
</div>
|
|
189
|
-
</div>
|
|
190
|
-
|
|
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
|
-
import {isEmpty} from "../../../components/Util";
|
|
211
|
-
|
|
212
|
-
export default {
|
|
213
|
-
name: 'addMaterialScience',
|
|
214
|
-
props: {
|
|
215
|
-
selectdata: {
|
|
216
|
-
type: Object
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
data() {
|
|
220
|
-
return {
|
|
221
|
-
onetomany: {
|
|
222
|
-
rows: []
|
|
223
|
-
},
|
|
224
|
-
logotype:"",
|
|
225
|
-
title: '新增',
|
|
226
|
-
showMaterialModal: false,
|
|
227
|
-
materials: [
|
|
228
|
-
],
|
|
229
|
-
meterialOptions: [],
|
|
230
|
-
row: {},
|
|
231
|
-
fmaterialname:{},
|
|
232
|
-
isShow:[false],
|
|
233
|
-
indoormaterials: {
|
|
234
|
-
rows: []
|
|
235
|
-
},
|
|
236
|
-
undergroundmaterials: {
|
|
237
|
-
rows: []
|
|
238
|
-
},
|
|
239
|
-
showtype:''
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
ready() {
|
|
243
|
-
this.getOnetoManyData()
|
|
244
|
-
},
|
|
245
|
-
methods: {
|
|
246
|
-
async getOnetoManyData () {
|
|
247
|
-
let http = new HttpResetClass()
|
|
248
|
-
let data = {
|
|
249
|
-
tablename: `t_material_apply`,
|
|
250
|
-
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
251
|
-
}
|
|
252
|
-
let res = await http.load(
|
|
253
|
-
'POST',
|
|
254
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
|
|
255
|
-
{data: data},
|
|
256
|
-
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
257
|
-
)
|
|
258
|
-
this.onetomany.rows = res.data
|
|
259
|
-
},
|
|
260
|
-
async getMateralOptions () {
|
|
261
|
-
this.indoormaterials.rows = []
|
|
262
|
-
this.undergroundmaterials.rows = []
|
|
263
|
-
let datarow = {
|
|
264
|
-
workname: 'materials'
|
|
265
|
-
}
|
|
266
|
-
let http = new HttpResetClass()
|
|
267
|
-
let row = await http.load(
|
|
268
|
-
'POST',
|
|
269
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyGetConfigs`,
|
|
270
|
-
{data: datarow},
|
|
271
|
-
{resolveMsg: null, rejectMsg: '配置数据获取失败!!!'}
|
|
272
|
-
)
|
|
273
|
-
if (this.selectdata.f_apply_type == '散户报建'){
|
|
274
|
-
this.indoormaterials.rows = row.data['散户报建']['室内材料']
|
|
275
|
-
this.undergroundmaterials.rows = row.data['散户报建']['地埋材料']
|
|
276
|
-
}else if (this.selectdata.f_apply_type == '工商户报建' && this.selectdata.f_apply_nature == '商业报建' ){
|
|
277
|
-
this.indoormaterials.rows = row.data['商业报建']['室内材料']
|
|
278
|
-
this.undergroundmaterials.rows = row.data['商业报建']['地埋材料']
|
|
279
|
-
}
|
|
280
|
-
},
|
|
281
|
-
async openMaterialModal(row) {
|
|
282
|
-
await this.getMateralOptions()
|
|
283
|
-
this.materials = []
|
|
284
|
-
await this.getMateralNames()
|
|
285
|
-
this.title = '新增'
|
|
286
|
-
this.showtype = row
|
|
287
|
-
this.logotype=row
|
|
288
|
-
this.showMaterialModal = true
|
|
289
|
-
this.isShow = [false]
|
|
290
|
-
},
|
|
291
|
-
deleteDevicesinfo(index) {
|
|
292
|
-
this.materials.splice(index, 1)
|
|
293
|
-
this.isShow.splice(index, 1)
|
|
294
|
-
},
|
|
295
|
-
pushMaterial() {
|
|
296
|
-
this.materials.push({
|
|
297
|
-
f_material_price: '',
|
|
298
|
-
material: '',
|
|
299
|
-
f_material_name: '',
|
|
300
|
-
f_material_style: '',
|
|
301
|
-
f_material_unit: '',
|
|
302
|
-
f_material_number: '',
|
|
303
|
-
f_bjq_sid: '',
|
|
304
|
-
f_material_code: '',
|
|
305
|
-
f_userinfo_code: ''
|
|
306
|
-
})
|
|
307
|
-
this.isShow.push(false)
|
|
308
|
-
},
|
|
309
|
-
// 获取模态框材料
|
|
310
|
-
async getMateralNames() {
|
|
311
|
-
let data = {
|
|
312
|
-
condition: `1=1`
|
|
313
|
-
}
|
|
314
|
-
let http = new HttpResetClass()
|
|
315
|
-
let res = await http.load(
|
|
316
|
-
'POST',
|
|
317
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
|
|
318
|
-
{data: data},
|
|
319
|
-
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
320
|
-
)
|
|
321
|
-
|
|
322
|
-
this.meterialOptions = res.data.map(item => {
|
|
323
|
-
const uniqueValue = item.f_material_code || `${item.f_material_name}--${item.f_material_style}`;
|
|
324
|
-
return {
|
|
325
|
-
label: `${item.f_material_name}--${item.f_material_style}`,
|
|
326
|
-
value: uniqueValue,
|
|
327
|
-
raw: item
|
|
328
|
-
}
|
|
329
|
-
})
|
|
330
|
-
},
|
|
331
|
-
modifyOtherValue(index) {
|
|
332
|
-
const uniqueValue = this.materials[index].material_unique_value;
|
|
333
|
-
const selected = this.meterialOptions.find(opt => opt.value === uniqueValue);
|
|
334
|
-
if (selected) {
|
|
335
|
-
const material = selected.raw;
|
|
336
|
-
this.materials[index].material = material;
|
|
337
|
-
this.materials[index].f_material_price = material.f_material_price;
|
|
338
|
-
this.materials[index].f_material_name = material.f_material_name;
|
|
339
|
-
this.materials[index].f_material_style = material.f_material_style;
|
|
340
|
-
this.materials[index].f_material_unit = material.f_material_unit;
|
|
341
|
-
this.materials[index].f_material_number = material.f_material_number;
|
|
342
|
-
this.materials[index].f_material_code = material.f_material_code;
|
|
343
|
-
this.materials[index].f_userinfo_code = material.f_userinfo_code;
|
|
344
|
-
}else{
|
|
345
|
-
this.materials[index].f_material_price =''
|
|
346
|
-
this.materials[index].f_material_name = ''
|
|
347
|
-
this.materials[index].f_material_style = ''
|
|
348
|
-
this.materials[index].f_material_unit =''
|
|
349
|
-
this.materials[index].f_material_number = ''
|
|
350
|
-
this.materials[index].f_material_code =''
|
|
351
|
-
this.materials[index].f_userinfo_code =''
|
|
352
|
-
}
|
|
353
|
-
},
|
|
354
|
-
// 新增材料
|
|
355
|
-
async addMaterial() {
|
|
356
|
-
this.title = '新增'
|
|
357
|
-
for (let i = 0; i < this.indoormaterials.rows.length; i++){
|
|
358
|
-
let row = this.indoormaterials.rows[i]
|
|
359
|
-
if (row.f_is_check && !isEmpty(row.f_material_number)){
|
|
360
|
-
this.materials.push(row)
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
for (let i = 0; i < this.undergroundmaterials.rows.length; i++){
|
|
364
|
-
let row = this.undergroundmaterials.rows[i]
|
|
365
|
-
if (row.f_is_check && !isEmpty(row.f_material_number)){
|
|
366
|
-
this.materials.push(row)
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
let data = {
|
|
370
|
-
f_process_id: this.selectdata.f_process_id,
|
|
371
|
-
f_operator_id: Vue.user.id,
|
|
372
|
-
f_operator: Vue.user.name,
|
|
373
|
-
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
374
|
-
f_orgid: Vue.user.orgid,
|
|
375
|
-
f_orgname: Vue.user.orgs,
|
|
376
|
-
materials: this.materials,
|
|
377
|
-
logotype:this.logotype
|
|
378
|
-
}
|
|
379
|
-
let http = new HttpResetClass()
|
|
380
|
-
let res = await http.load(
|
|
381
|
-
'POST',
|
|
382
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/applysaveMaterials`,
|
|
383
|
-
data
|
|
384
|
-
)
|
|
385
|
-
this.closeMaterials()
|
|
386
|
-
},
|
|
387
|
-
async deleteMaterial(row) {
|
|
388
|
-
debugger
|
|
389
|
-
var show1 = window.confirm('您确定要删除这条记录吗?')
|
|
390
|
-
if(show1 != true){
|
|
391
|
-
this.closeMaterials()
|
|
392
|
-
}else{
|
|
393
|
-
let http = new HttpResetClass()
|
|
394
|
-
let res = await http.load(
|
|
395
|
-
'POST',
|
|
396
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
|
|
397
|
-
{data: row},
|
|
398
|
-
{resolveMsg: null, rejectMsg: '材料删除失败!!!'}
|
|
399
|
-
)
|
|
400
|
-
this.closeMaterials()
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
,
|
|
404
|
-
async updateMaterial(index, row) {
|
|
405
|
-
this.title = '修改'
|
|
406
|
-
this.row = row
|
|
407
|
-
this.materials[0] = row
|
|
408
|
-
this.showMaterialModal = true
|
|
409
|
-
},
|
|
410
|
-
async updateConfirm() {
|
|
411
|
-
let data = this.row
|
|
412
|
-
data.f_material_price = this.materials[0].f_material_price
|
|
413
|
-
data.f_material_name = this.materials[0].f_material_name
|
|
414
|
-
data.f_material_style = this.materials[0].f_material_style
|
|
415
|
-
data.f_material_unit = this.materials[0].f_material_unit
|
|
416
|
-
data.f_material_number = this.materials[0].f_material_number
|
|
417
|
-
data.f_material_code = this.materials[0].f_material_code
|
|
418
|
-
data.f_bjq_sid = this.materials[0].f_bjq_sid
|
|
419
|
-
data.f_userinfo_code=this.materials[0].f_userinfo_code
|
|
420
|
-
|
|
421
|
-
let http = new HttpResetClass()
|
|
422
|
-
let res = await http.load(
|
|
423
|
-
'POST',
|
|
424
|
-
`${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_apply`,
|
|
425
|
-
data
|
|
426
|
-
)
|
|
427
|
-
this.closeMaterials()
|
|
428
|
-
},
|
|
429
|
-
sycronizedCode(index,val){
|
|
430
|
-
console.log("看看:",index,val)
|
|
431
|
-
this.materials[index].f_material_code = val
|
|
432
|
-
},
|
|
433
|
-
closeMaterials() {
|
|
434
|
-
this.getOnetoManyData()
|
|
435
|
-
this.showMaterialModal = false
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
</script>
|
|
441
|
-
|
|
442
|
-
<style scoped>
|
|
443
|
-
|
|
444
|
-
</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">材料标识</th>
|
|
12
|
+
<th class="textNoLineBreak">
|
|
13
|
+
<button style="color:black" class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal('室内施工')">室内施工
|
|
14
|
+
</button>
|
|
15
|
+
<button style="color:black" 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_logotype}}</nobr>
|
|
39
|
+
</td>
|
|
40
|
+
<td style="text-align: center;">
|
|
41
|
+
<button type="button" class="button_search button_spacing"
|
|
42
|
+
@click="$parent.$parent.updateMaterial($index,row)">修改
|
|
43
|
+
</button>
|
|
44
|
+
<button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除
|
|
45
|
+
</button>
|
|
46
|
+
</td>
|
|
47
|
+
</tr>
|
|
48
|
+
</template>
|
|
49
|
+
</data-grid>
|
|
50
|
+
<modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal style="overflow: auto" :large="true"
|
|
51
|
+
:backdrop="false" :title="title">
|
|
52
|
+
<header slot="modal-header" class="modal-header">
|
|
53
|
+
<button type="button" class="close" @click="closeMaterials"><span>×</span></button>
|
|
54
|
+
<h4 class="modal-title">{{title}}</h4>
|
|
55
|
+
</header>
|
|
56
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
57
|
+
<data-grid v-if=" title==='新增'&& showtype == '室内施工'&& indoormaterials.rows.length > 0 " :model="indoormaterials" class="list_area table_sy">
|
|
58
|
+
<template partial='head'>
|
|
59
|
+
<tr>
|
|
60
|
+
<th class="textNoLineBreak" colspan="5">室内材料</th>
|
|
61
|
+
</tr>
|
|
62
|
+
<tr>
|
|
63
|
+
<th class="textNoLineBreak" style="width: 15%">材料</th>
|
|
64
|
+
<th class="textNoLineBreak" style="width: 5%">材料单位</th>
|
|
65
|
+
<th class="textNoLineBreak" style="width: 5%">是否选择</th>
|
|
66
|
+
<th class="textNoLineBreak" style="width: 60%">材料数量</th>
|
|
67
|
+
</tr>
|
|
68
|
+
</template>
|
|
69
|
+
<template partial='body' >
|
|
70
|
+
<tr>
|
|
71
|
+
<td style="text-align: center;">
|
|
72
|
+
<nobr>{{row.f_material_name}} {{row.f_material_style}}</nobr>
|
|
73
|
+
</td>
|
|
74
|
+
<td style="text-align: center;">
|
|
75
|
+
<nobr>{{row.f_material_unit}}</nobr>
|
|
76
|
+
</td>
|
|
77
|
+
<td style="text-align: center;">
|
|
78
|
+
<input type="checkbox" v-model="row.f_is_check" :value.sync="row.f_is_check"/>
|
|
79
|
+
</td>
|
|
80
|
+
<td style="text-align: center;">
|
|
81
|
+
<input class="form-control input_view" type="number"
|
|
82
|
+
placeholder="设备数量"
|
|
83
|
+
v-model="row.f_material_number"
|
|
84
|
+
:value.sync="row.f_material_number"
|
|
85
|
+
/>
|
|
86
|
+
</td>
|
|
87
|
+
</tr>
|
|
88
|
+
</template>
|
|
89
|
+
</data-grid>
|
|
90
|
+
<data-grid v-if=" title==='新增'&& showtype == '地埋施工'&& undergroundmaterials.rows.length > 0 " :model="undergroundmaterials" class="list_area table_sy">
|
|
91
|
+
<template partial='head'>
|
|
92
|
+
<tr>
|
|
93
|
+
<th class="textNoLineBreak" colspan="5">地埋材料</th>
|
|
94
|
+
</tr>
|
|
95
|
+
<tr>
|
|
96
|
+
<th class="textNoLineBreak" style="width: 15%">材料</th>
|
|
97
|
+
<th class="textNoLineBreak" style="width: 5%">材料单位</th>
|
|
98
|
+
<th class="textNoLineBreak" style="width: 5%">是否选择</th>
|
|
99
|
+
<th class="textNoLineBreak" style="width: 60%">材料数量</th>
|
|
100
|
+
</tr>
|
|
101
|
+
</template>
|
|
102
|
+
<template partial='body' >
|
|
103
|
+
<tr>
|
|
104
|
+
<td style="text-align: center;">
|
|
105
|
+
<nobr>{{row.f_material_name}} {{row.f_material_style}}</nobr>
|
|
106
|
+
</td>
|
|
107
|
+
<td style="text-align: center;">
|
|
108
|
+
<nobr>{{row.f_material_unit}}</nobr>
|
|
109
|
+
</td>
|
|
110
|
+
<td style="text-align: center;">
|
|
111
|
+
<input type="checkbox" v-model="row.f_is_check" :value.sync="row.f_is_check"/>
|
|
112
|
+
</td>
|
|
113
|
+
<td style="text-align: center;">
|
|
114
|
+
<input class="form-control input_view" type="number"
|
|
115
|
+
placeholder="设备数量"
|
|
116
|
+
v-model="row.f_material_number"
|
|
117
|
+
:value.sync="row.f_material_number"
|
|
118
|
+
/>
|
|
119
|
+
</td>
|
|
120
|
+
</tr>
|
|
121
|
+
</template>
|
|
122
|
+
</data-grid>
|
|
123
|
+
<div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
|
|
124
|
+
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
125
|
+
<div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
|
|
126
|
+
<div class="col-sm-6 text-right">
|
|
127
|
+
<button
|
|
128
|
+
class="button_delete button_spacing"
|
|
129
|
+
@click.prevent="deleteDevicesinfo(i)"
|
|
130
|
+
v-if="title === '新增'"
|
|
131
|
+
>删除
|
|
132
|
+
</button>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
<div class="form-group col-sm-6" v-if="title==='新增'">
|
|
136
|
+
<label class="col-sm-4 control-label">选择材料:</label>
|
|
137
|
+
<div class="col-sm-8">
|
|
138
|
+
<input-select
|
|
139
|
+
class="select select_list"
|
|
140
|
+
v-model="item.material_unique_value"
|
|
141
|
+
:value.sync="item.material_unique_value"
|
|
142
|
+
:options="meterialOptions"
|
|
143
|
+
:disable="mark === 1"
|
|
144
|
+
@change="modifyOtherValue(i)"
|
|
145
|
+
:valueSingle="true">
|
|
146
|
+
</input-select>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
<div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
|
|
150
|
+
<label class="col-sm-4 control-label">材料名称:</label>
|
|
151
|
+
<div class="col-sm-8">
|
|
152
|
+
<input class="form-control input_view" style="" type="text"
|
|
153
|
+
placeholder="材料名称"
|
|
154
|
+
v-model="item.f_material_name"
|
|
155
|
+
:value="item.f_material_name"
|
|
156
|
+
/>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
<div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
|
|
160
|
+
<label class="col-sm-4 control-label">材料型号:</label>
|
|
161
|
+
<div class="col-sm-8">
|
|
162
|
+
<input class="form-control input_view" style="" type="text"
|
|
163
|
+
placeholder="材料型号"
|
|
164
|
+
v-model="item.f_material_style"
|
|
165
|
+
:value="item.f_material_style"
|
|
166
|
+
/>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
<div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
|
|
170
|
+
<label class="col-sm-4 control-label">材料单位:</label>
|
|
171
|
+
<div class="col-sm-8">
|
|
172
|
+
<input class="form-control input_view" style="" type="text"
|
|
173
|
+
placeholder="材料单位"
|
|
174
|
+
v-model="item.f_material_unit"
|
|
175
|
+
:value="item.f_material_unit"
|
|
176
|
+
/>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
<div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
|
|
180
|
+
<label class="col-sm-4 control-label">材料数量:</label>
|
|
181
|
+
<div class="col-sm-8">
|
|
182
|
+
<input class="form-control input_view" style="" type="number"
|
|
183
|
+
placeholder="设备数量"
|
|
184
|
+
v-model="item.f_material_number"
|
|
185
|
+
:value="item.f_material_number"
|
|
186
|
+
/>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
|
|
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
|
+
import {isEmpty} from "../../../components/Util";
|
|
211
|
+
|
|
212
|
+
export default {
|
|
213
|
+
name: 'addMaterialScience',
|
|
214
|
+
props: {
|
|
215
|
+
selectdata: {
|
|
216
|
+
type: Object
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
data() {
|
|
220
|
+
return {
|
|
221
|
+
onetomany: {
|
|
222
|
+
rows: []
|
|
223
|
+
},
|
|
224
|
+
logotype:"",
|
|
225
|
+
title: '新增',
|
|
226
|
+
showMaterialModal: false,
|
|
227
|
+
materials: [
|
|
228
|
+
],
|
|
229
|
+
meterialOptions: [],
|
|
230
|
+
row: {},
|
|
231
|
+
fmaterialname:{},
|
|
232
|
+
isShow:[false],
|
|
233
|
+
indoormaterials: {
|
|
234
|
+
rows: []
|
|
235
|
+
},
|
|
236
|
+
undergroundmaterials: {
|
|
237
|
+
rows: []
|
|
238
|
+
},
|
|
239
|
+
showtype:''
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
ready() {
|
|
243
|
+
this.getOnetoManyData()
|
|
244
|
+
},
|
|
245
|
+
methods: {
|
|
246
|
+
async getOnetoManyData () {
|
|
247
|
+
let http = new HttpResetClass()
|
|
248
|
+
let data = {
|
|
249
|
+
tablename: `t_material_apply`,
|
|
250
|
+
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
251
|
+
}
|
|
252
|
+
let res = await http.load(
|
|
253
|
+
'POST',
|
|
254
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
|
|
255
|
+
{data: data},
|
|
256
|
+
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
257
|
+
)
|
|
258
|
+
this.onetomany.rows = res.data
|
|
259
|
+
},
|
|
260
|
+
async getMateralOptions () {
|
|
261
|
+
this.indoormaterials.rows = []
|
|
262
|
+
this.undergroundmaterials.rows = []
|
|
263
|
+
let datarow = {
|
|
264
|
+
workname: 'materials'
|
|
265
|
+
}
|
|
266
|
+
let http = new HttpResetClass()
|
|
267
|
+
let row = await http.load(
|
|
268
|
+
'POST',
|
|
269
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyGetConfigs`,
|
|
270
|
+
{data: datarow},
|
|
271
|
+
{resolveMsg: null, rejectMsg: '配置数据获取失败!!!'}
|
|
272
|
+
)
|
|
273
|
+
if (this.selectdata.f_apply_type == '散户报建'){
|
|
274
|
+
this.indoormaterials.rows = row.data['散户报建']['室内材料']
|
|
275
|
+
this.undergroundmaterials.rows = row.data['散户报建']['地埋材料']
|
|
276
|
+
}else if (this.selectdata.f_apply_type == '工商户报建' && this.selectdata.f_apply_nature == '商业报建' ){
|
|
277
|
+
this.indoormaterials.rows = row.data['商业报建']['室内材料']
|
|
278
|
+
this.undergroundmaterials.rows = row.data['商业报建']['地埋材料']
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
async openMaterialModal(row) {
|
|
282
|
+
await this.getMateralOptions()
|
|
283
|
+
this.materials = []
|
|
284
|
+
await this.getMateralNames()
|
|
285
|
+
this.title = '新增'
|
|
286
|
+
this.showtype = row
|
|
287
|
+
this.logotype=row
|
|
288
|
+
this.showMaterialModal = true
|
|
289
|
+
this.isShow = [false]
|
|
290
|
+
},
|
|
291
|
+
deleteDevicesinfo(index) {
|
|
292
|
+
this.materials.splice(index, 1)
|
|
293
|
+
this.isShow.splice(index, 1)
|
|
294
|
+
},
|
|
295
|
+
pushMaterial() {
|
|
296
|
+
this.materials.push({
|
|
297
|
+
f_material_price: '',
|
|
298
|
+
material: '',
|
|
299
|
+
f_material_name: '',
|
|
300
|
+
f_material_style: '',
|
|
301
|
+
f_material_unit: '',
|
|
302
|
+
f_material_number: '',
|
|
303
|
+
f_bjq_sid: '',
|
|
304
|
+
f_material_code: '',
|
|
305
|
+
f_userinfo_code: ''
|
|
306
|
+
})
|
|
307
|
+
this.isShow.push(false)
|
|
308
|
+
},
|
|
309
|
+
// 获取模态框材料
|
|
310
|
+
async getMateralNames() {
|
|
311
|
+
let data = {
|
|
312
|
+
condition: `1=1`
|
|
313
|
+
}
|
|
314
|
+
let http = new HttpResetClass()
|
|
315
|
+
let res = await http.load(
|
|
316
|
+
'POST',
|
|
317
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
|
|
318
|
+
{data: data},
|
|
319
|
+
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
320
|
+
)
|
|
321
|
+
|
|
322
|
+
this.meterialOptions = res.data.map(item => {
|
|
323
|
+
const uniqueValue = item.f_material_code || `${item.f_material_name}--${item.f_material_style}`;
|
|
324
|
+
return {
|
|
325
|
+
label: `${item.f_material_name}--${item.f_material_style}`,
|
|
326
|
+
value: uniqueValue,
|
|
327
|
+
raw: item
|
|
328
|
+
}
|
|
329
|
+
})
|
|
330
|
+
},
|
|
331
|
+
modifyOtherValue(index) {
|
|
332
|
+
const uniqueValue = this.materials[index].material_unique_value;
|
|
333
|
+
const selected = this.meterialOptions.find(opt => opt.value === uniqueValue);
|
|
334
|
+
if (selected) {
|
|
335
|
+
const material = selected.raw;
|
|
336
|
+
this.materials[index].material = material;
|
|
337
|
+
this.materials[index].f_material_price = material.f_material_price;
|
|
338
|
+
this.materials[index].f_material_name = material.f_material_name;
|
|
339
|
+
this.materials[index].f_material_style = material.f_material_style;
|
|
340
|
+
this.materials[index].f_material_unit = material.f_material_unit;
|
|
341
|
+
this.materials[index].f_material_number = material.f_material_number;
|
|
342
|
+
this.materials[index].f_material_code = material.f_material_code;
|
|
343
|
+
this.materials[index].f_userinfo_code = material.f_userinfo_code;
|
|
344
|
+
}else{
|
|
345
|
+
this.materials[index].f_material_price =''
|
|
346
|
+
this.materials[index].f_material_name = ''
|
|
347
|
+
this.materials[index].f_material_style = ''
|
|
348
|
+
this.materials[index].f_material_unit =''
|
|
349
|
+
this.materials[index].f_material_number = ''
|
|
350
|
+
this.materials[index].f_material_code =''
|
|
351
|
+
this.materials[index].f_userinfo_code =''
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
// 新增材料
|
|
355
|
+
async addMaterial() {
|
|
356
|
+
this.title = '新增'
|
|
357
|
+
for (let i = 0; i < this.indoormaterials.rows.length; i++){
|
|
358
|
+
let row = this.indoormaterials.rows[i]
|
|
359
|
+
if (row.f_is_check && !isEmpty(row.f_material_number)){
|
|
360
|
+
this.materials.push(row)
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
for (let i = 0; i < this.undergroundmaterials.rows.length; i++){
|
|
364
|
+
let row = this.undergroundmaterials.rows[i]
|
|
365
|
+
if (row.f_is_check && !isEmpty(row.f_material_number)){
|
|
366
|
+
this.materials.push(row)
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
let data = {
|
|
370
|
+
f_process_id: this.selectdata.f_process_id,
|
|
371
|
+
f_operator_id: Vue.user.id,
|
|
372
|
+
f_operator: Vue.user.name,
|
|
373
|
+
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
374
|
+
f_orgid: Vue.user.orgid,
|
|
375
|
+
f_orgname: Vue.user.orgs,
|
|
376
|
+
materials: this.materials,
|
|
377
|
+
logotype:this.logotype
|
|
378
|
+
}
|
|
379
|
+
let http = new HttpResetClass()
|
|
380
|
+
let res = await http.load(
|
|
381
|
+
'POST',
|
|
382
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/applysaveMaterials`,
|
|
383
|
+
data
|
|
384
|
+
)
|
|
385
|
+
this.closeMaterials()
|
|
386
|
+
},
|
|
387
|
+
async deleteMaterial(row) {
|
|
388
|
+
debugger
|
|
389
|
+
var show1 = window.confirm('您确定要删除这条记录吗?')
|
|
390
|
+
if(show1 != true){
|
|
391
|
+
this.closeMaterials()
|
|
392
|
+
}else{
|
|
393
|
+
let http = new HttpResetClass()
|
|
394
|
+
let res = await http.load(
|
|
395
|
+
'POST',
|
|
396
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
|
|
397
|
+
{data: row},
|
|
398
|
+
{resolveMsg: null, rejectMsg: '材料删除失败!!!'}
|
|
399
|
+
)
|
|
400
|
+
this.closeMaterials()
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
,
|
|
404
|
+
async updateMaterial(index, row) {
|
|
405
|
+
this.title = '修改'
|
|
406
|
+
this.row = row
|
|
407
|
+
this.materials[0] = row
|
|
408
|
+
this.showMaterialModal = true
|
|
409
|
+
},
|
|
410
|
+
async updateConfirm() {
|
|
411
|
+
let data = this.row
|
|
412
|
+
data.f_material_price = this.materials[0].f_material_price
|
|
413
|
+
data.f_material_name = this.materials[0].f_material_name
|
|
414
|
+
data.f_material_style = this.materials[0].f_material_style
|
|
415
|
+
data.f_material_unit = this.materials[0].f_material_unit
|
|
416
|
+
data.f_material_number = this.materials[0].f_material_number
|
|
417
|
+
data.f_material_code = this.materials[0].f_material_code
|
|
418
|
+
data.f_bjq_sid = this.materials[0].f_bjq_sid
|
|
419
|
+
data.f_userinfo_code=this.materials[0].f_userinfo_code
|
|
420
|
+
|
|
421
|
+
let http = new HttpResetClass()
|
|
422
|
+
let res = await http.load(
|
|
423
|
+
'POST',
|
|
424
|
+
`${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_apply`,
|
|
425
|
+
data
|
|
426
|
+
)
|
|
427
|
+
this.closeMaterials()
|
|
428
|
+
},
|
|
429
|
+
sycronizedCode(index,val){
|
|
430
|
+
console.log("看看:",index,val)
|
|
431
|
+
this.materials[index].f_material_code = val
|
|
432
|
+
},
|
|
433
|
+
closeMaterials() {
|
|
434
|
+
this.getOnetoManyData()
|
|
435
|
+
this.showMaterialModal = false
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
</script>
|
|
441
|
+
|
|
442
|
+
<style scoped>
|
|
443
|
+
|
|
444
|
+
</style>
|