apply-clients 3.5.4-7 → 3.5.4-72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dev-server.js +7 -11
- package/package.json +2 -2
- package/src/App.vue +25 -25
- package/src/apply.js +2 -3
- package/src/applyAndroid.js +2 -0
- package/src/assets//344/270/213/350/275/275.png +0 -0
- package/src/components/android/AppCheckTakePic.vue +168 -0
- package/src/components/android/Process/AppServiceControl.vue +4 -0
- package/src/components/android/Process/Processes/AppAddMaterialScience.vue +493 -493
- package/src/components/android/Process/Processes/AppChargeManagementNew.vue +637 -0
- package/src/components/android/Process/Processes/AppInstallationDetails.vue +480 -480
- package/src/components/image/dxf.png +0 -0
- package/src/components/product/Function/Service/FunctionServiceControl.vue +1 -1
- package/src/components/product/Material/MaterialDetailed.vue +1 -1
- package/src/components/product/MaterialsManage/MaterialsBase.vue +5 -1
- package/src/components/product/MaterialsManage/MaterialsManage.vue +2 -2
- package/src/components/product/PcZhihuanManagement.vue +160 -0
- package/src/components/product/Process/ExplorationSelect.vue +4 -1
- package/src/components/product/Process/ExplorationUser.vue +1 -0
- package/src/components/product/Process/Processes/addMaterialScience.vue +471 -471
- package/src/components/product/Process/Processes/chargeManagement.vue +1 -1
- package/src/components/product/ServiceView.vue +22 -1
- package/src/components/product/Supervisory/SupervisoryControl.vue +141 -140
- package/src/components/product/Supervisory/SupervisoryList.vue +452 -452
- package/src/filiale/baiyin/android/AppServiceControl.vue +1762 -0
- package/src/filiale/baiyin/android/ByAddMaterialScience.vue +823 -0
- package/src/filiale/baiyin/android/ByDeviceManagement.vue +916 -0
- package/src/filiale/baiyin/android.js +8 -0
- package/src/filiale/fugou/android/AppAddMaterialScience.vue +442 -0
- package/src/filiale/fugou/android/AppChargeManagement.vue +126 -12
- package/src/filiale/fugou/android/AppDevicesManagement.vue +519 -0
- package/src/filiale/fugou/android/AppInstallationDetails.vue +541 -0
- package/src/filiale/fugou/android/AppServiceControl.vue +21 -4
- package/src/filiale/fugou/android/AppZhihuanManagement.vue +191 -0
- package/src/filiale/fugou/android.js +6 -1
- package/src/filiale/fugou/pc/ExplorationSelect.vue +515 -0
- package/src/filiale/fugou/pc/InstallationDetails.vue +44 -32
- package/src/filiale/fugou/pc/ServiceControl.vue +124 -379
- package/src/filiale/fugou/pc/addMaterialScience.vue +482 -0
- package/src/filiale/fugou/pc/devicesManagement.vue +483 -0
- package/src/filiale/fugou/pc.js +4 -1
- package/src/filiale/gongyi/android/AppAddMaterialScience.vue +20 -8
- package/src/filiale/gongyi/android/AppDisclosurerecord.vue +214 -0
- package/src/filiale/gongyi/android/AppInstallationDetails.vue +15 -10
- package/src/filiale/gongyi/android/AppLegacyIssues.vue +309 -0
- package/src/filiale/gongyi/android/AppSign.vue +16 -3
- package/src/filiale/gongyi/android/AppSupplementalAgreement.vue +298 -0
- package/src/filiale/gongyi/android.js +3 -0
- package/src/filiale/gongyi/pc/ApplyUpload.vue +31 -39
- package/src/filiale/gongyi/pc/PcAddLogs.vue +12 -4
- package/src/filiale/gongyi/pc/PcDisclosurerecord.vue +218 -0
- package/src/filiale/gongyi/pc/PcLegacyIssues.vue +309 -0
- package/src/filiale/gongyi/pc/SupervisoryServiceControl.vue +1 -1
- package/src/filiale/gongyi/pc/SupervisoryServiceView.vue +1005 -0
- package/src/filiale/gongyi/pc/addMaterialScience.vue +43 -7
- package/src/filiale/gongyi/pc/chargeManagement.vue +765 -0
- package/src/filiale/gongyi/pc/supplementalAgreement.vue +277 -0
- package/src/filiale/gongyi/pc.js +6 -1
- package/src/filiale/hongda/pc/SupervisoryList.vue +13 -0
- package/src/filiale/jinhuang/pc/ServiceControl.vue +1925 -0
- package/src/filiale/jinhuang/pc/chargeManagementNew.vue +589 -0
- package/src/filiale/jinhuang/pc.js +7 -0
- package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -0
- package/src/filiale/qianneng/android/AppExplorationUser.vue +38 -0
- package/src/filiale/qianneng/android/AppInstallationDetails.vue +20 -11
- package/src/filiale/qianneng/android.js +2 -1
- package/src/filiale/qianneng/pc/ApplyUpload.vue +5 -4
- package/src/filiale/qianneng/pc/Applybatchdispatch.vue +11 -6
- package/src/filiale/qianneng/pc/Applydetail.vue +0 -5
- package/src/filiale/qianneng/pc/InstallFunction.vue +2 -2
- package/src/filiale/qianneng/pc/InstallationDetails.vue +32 -4
- package/src/filiale/qianneng/pc/ServiceControl.vue +1 -0
- package/src/filiale/qianneng/pc/printactivatecard.vue +6 -6
- package/src/filiale/ruihua/pc/InstallationDetails.vue +610 -610
- package/src/filiale/ruihua/pc/ServiceControl.vue +20 -0
- package/src/filiale/ruihua/pc/printVentilation.vue +21 -6
- package/src/filiale/ruihua/pc.js +12 -12
- package/src/filiale/shexian/android/AppServiceControl.vue +12 -2
- package/src/filiale/shexian/android/AppTakePic.vue +15 -55
- package/src/filiale/siyangRH/android/AppAddMaterialScience.vue +0 -2
- package/src/filiale/siyangRH/pc/chargeManagement.vue +810 -0
- package/src/filiale/siyangRH/pc.js +1 -0
- package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +16 -1
- package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +32 -2
- package/src/filiale/yangchunboneng/android/AppExplorationUser.vue +518 -506
- package/src/filiale/yangchunboneng/android/AppInstallationMaterial.vue +1083 -1092
- package/src/filiale/yangchunboneng/android/AppServiceControl.vue +34 -1
- package/src/filiale/yangchunboneng/android/AppSuperServiceControl.vue +1524 -1524
- package/src/filiale/yangchunboneng/android/AppUpload.vue +205 -136
- package/src/filiale/yangchunboneng/android/MaterIialOne.vue +156 -144
- package/src/filiale/yangchunboneng/android.js +20 -20
- package/src/filiale/yangchunboneng/pc/ApplyUpload.vue +392 -375
- package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +59 -19
- package/src/filiale/yangchunboneng/pc/ExplorationUser.vue +191 -0
- package/src/filiale/yangchunboneng/pc/InstallInfoSelect.vue +365 -365
- package/src/filiale/yangchunboneng/pc/ServiceControl.vue +206 -2
- package/src/filiale/yangchunboneng/pc/SupervisoryControlNew.vue +142 -0
- package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +590 -535
- package/src/filiale/yangchunboneng/pc/SupervisoryListNew.vue +628 -0
- package/src/filiale/yangchunboneng/pc/SupervisoryServiceControl.vue +902 -0
- package/src/filiale/yangchunboneng/pc/SupervisoryServiceControlNew.vue +901 -0
- package/src/filiale/yangchunboneng/pc/SupervisoryServiceView.vue +1117 -0
- package/src/filiale/yangchunboneng/pc/chargeManagement.vue +111 -13
- package/src/filiale/yangchunboneng/pc.js +24 -18
- package/src/main.js +1 -1
|
@@ -1,493 +1,493 @@
|
|
|
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_bjq_sid}}</nobr>
|
|
39
|
-
</td>
|
|
40
|
-
<td style="text-align: center;">
|
|
41
|
-
<nobr>{{row.f_material_code}}</nobr>
|
|
42
|
-
</td>
|
|
43
|
-
<td style="text-align: center;">
|
|
44
|
-
<nobr>{{row.f_userinfo_code}}</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>×</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">
|
|
129
|
-
<label class="col-sm-4 control-label">材料编号:</label>
|
|
130
|
-
<div class="col-sm-8">
|
|
131
|
-
<input class="form-control input_view" style="" type="text"
|
|
132
|
-
placeholder="材料编号"
|
|
133
|
-
v-model="item.f_bjq_sid"
|
|
134
|
-
:value="item.f_bjq_sid"
|
|
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=""
|
|
142
|
-
placeholder="材料标识"
|
|
143
|
-
v-model="item.f_material_code"
|
|
144
|
-
:value.sync="item.f_material_code"
|
|
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
|
-
<input class="form-control input_view" style=""
|
|
152
|
-
placeholder="用户编号"
|
|
153
|
-
v-model="item.f_userinfo_code"
|
|
154
|
-
:value.sync="item.f_userinfo_code"
|
|
155
|
-
/>
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
158
|
-
<div class="form-group col-sm-6">
|
|
159
|
-
<label class="col-sm-4 control-label"></label>
|
|
160
|
-
<div class="col-sm-8">
|
|
161
|
-
|
|
162
|
-
</div>
|
|
163
|
-
</div>
|
|
164
|
-
<div class="form-group col-sm-6">
|
|
165
|
-
<label class="col-sm-4 control-label"></label>
|
|
166
|
-
<div class="col-sm-8">
|
|
167
|
-
|
|
168
|
-
</div>
|
|
169
|
-
</div>
|
|
170
|
-
<div class="form-group col-sm-6">
|
|
171
|
-
<label class="col-sm-4 control-label"></label>
|
|
172
|
-
<div class="col-sm-8">
|
|
173
|
-
|
|
174
|
-
</div>
|
|
175
|
-
</div>
|
|
176
|
-
<div class="form-group col-sm-6">
|
|
177
|
-
<label class="col-sm-4 control-label"></label>
|
|
178
|
-
<div class="col-sm-8">
|
|
179
|
-
|
|
180
|
-
</div>
|
|
181
|
-
</div>
|
|
182
|
-
<div class="form-group col-sm-6">
|
|
183
|
-
<label class="col-sm-4 control-label"></label>
|
|
184
|
-
<div class="col-sm-8">
|
|
185
|
-
|
|
186
|
-
</div>
|
|
187
|
-
</div>
|
|
188
|
-
<div class="form-group col-sm-6">
|
|
189
|
-
<label class="col-sm-4 control-label"></label>
|
|
190
|
-
<div class="col-sm-8">
|
|
191
|
-
|
|
192
|
-
</div>
|
|
193
|
-
</div>
|
|
194
|
-
<div class="form-group col-sm-6">
|
|
195
|
-
<label class="col-sm-4 control-label"></label>
|
|
196
|
-
<div class="col-sm-8">
|
|
197
|
-
|
|
198
|
-
</div>
|
|
199
|
-
</div>
|
|
200
|
-
<div v-if=" (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建')">
|
|
201
|
-
<app-qrcode-reader :istype = fmaterialname :index = i v-show="isShow[i]"></app-qrcode-reader>
|
|
202
|
-
</div>
|
|
203
|
-
</div>
|
|
204
|
-
</article>
|
|
205
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
206
|
-
<template v-if="mark !== 1">
|
|
207
|
-
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
|
|
208
|
-
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
|
|
209
|
-
:disabled="!$v.valid">确认添加
|
|
210
|
-
</button>
|
|
211
|
-
<button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
|
|
212
|
-
:disabled="!$v.valid">确认修改
|
|
213
|
-
</button>
|
|
214
|
-
</template>
|
|
215
|
-
</footer>
|
|
216
|
-
</modal>
|
|
217
|
-
</div>
|
|
218
|
-
</template>
|
|
219
|
-
|
|
220
|
-
<script>
|
|
221
|
-
import Vue from 'vue'
|
|
222
|
-
import {HttpResetClass} from 'vue-client'
|
|
223
|
-
|
|
224
|
-
export default {
|
|
225
|
-
name: 'addMaterialScience',
|
|
226
|
-
props: {
|
|
227
|
-
selectdata: {
|
|
228
|
-
type: Object
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
data() {
|
|
232
|
-
return {
|
|
233
|
-
onetomany: {
|
|
234
|
-
rows: []
|
|
235
|
-
},
|
|
236
|
-
title: '新增',
|
|
237
|
-
showMaterialModal: false,
|
|
238
|
-
materials: [
|
|
239
|
-
{
|
|
240
|
-
f_material_price: '',
|
|
241
|
-
material: '',
|
|
242
|
-
f_material_name: '',
|
|
243
|
-
f_material_style: '',
|
|
244
|
-
f_material_unit: '',
|
|
245
|
-
f_material_number: '',
|
|
246
|
-
f_bjq_sid: '',
|
|
247
|
-
f_material_code: '',
|
|
248
|
-
f_userinfo_code:''
|
|
249
|
-
}
|
|
250
|
-
],
|
|
251
|
-
meterialOptions: [],
|
|
252
|
-
row: {},
|
|
253
|
-
bjqChecklag:[],
|
|
254
|
-
fmaterialname:{},
|
|
255
|
-
isShow:[false]
|
|
256
|
-
}
|
|
257
|
-
},
|
|
258
|
-
ready() {
|
|
259
|
-
this.getOnetoManyData()
|
|
260
|
-
},
|
|
261
|
-
methods: {
|
|
262
|
-
async getOnetoManyData () {
|
|
263
|
-
let http = new HttpResetClass()
|
|
264
|
-
let data = {
|
|
265
|
-
tablename: `t_material_apply`,
|
|
266
|
-
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
267
|
-
}
|
|
268
|
-
let res = await http.load(
|
|
269
|
-
'POST',
|
|
270
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
|
|
271
|
-
{data: data},
|
|
272
|
-
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
273
|
-
)
|
|
274
|
-
this.onetomany.rows = res.data
|
|
275
|
-
},
|
|
276
|
-
async openMaterialModal() {
|
|
277
|
-
this.getMateralNames()
|
|
278
|
-
this.title = '新增'
|
|
279
|
-
this.materials = [
|
|
280
|
-
{
|
|
281
|
-
f_material_price: '',
|
|
282
|
-
material: '',
|
|
283
|
-
f_material_name: '',
|
|
284
|
-
f_material_style: '',
|
|
285
|
-
f_material_unit: '',
|
|
286
|
-
f_material_number: '',
|
|
287
|
-
f_bjq_sid: '',
|
|
288
|
-
f_material_code: '',
|
|
289
|
-
f_userinfo_code: ''
|
|
290
|
-
}
|
|
291
|
-
],
|
|
292
|
-
this.showMaterialModal = true
|
|
293
|
-
this.isShow = [false]
|
|
294
|
-
},
|
|
295
|
-
deleteDevicesinfo(index) {
|
|
296
|
-
this.materials.splice(index, 1)
|
|
297
|
-
this.isShow.splice(index, 1)
|
|
298
|
-
},
|
|
299
|
-
pushMaterial() {
|
|
300
|
-
this.materials.push({
|
|
301
|
-
f_material_price: '',
|
|
302
|
-
material: '',
|
|
303
|
-
f_material_name: '',
|
|
304
|
-
f_material_style: '',
|
|
305
|
-
f_material_unit: '',
|
|
306
|
-
f_material_number: '',
|
|
307
|
-
f_bjq_sid: '',
|
|
308
|
-
f_material_code: '',
|
|
309
|
-
f_userinfo_code: ''
|
|
310
|
-
})
|
|
311
|
-
this.isShow.push(false)
|
|
312
|
-
},
|
|
313
|
-
// 获取模态框材料
|
|
314
|
-
async getMateralNames() {
|
|
315
|
-
let data = {
|
|
316
|
-
condition: `1=1`
|
|
317
|
-
}
|
|
318
|
-
let http = new HttpResetClass()
|
|
319
|
-
let res = await http.load(
|
|
320
|
-
'POST',
|
|
321
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
|
|
322
|
-
{data: data},
|
|
323
|
-
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
324
|
-
)
|
|
325
|
-
|
|
326
|
-
this.meterialOptions = res.data.map(item => {
|
|
327
|
-
return {
|
|
328
|
-
'label': `${item.f_material_name}--${item.f_material_style}`,
|
|
329
|
-
'value': item
|
|
330
|
-
}
|
|
331
|
-
})
|
|
332
|
-
},
|
|
333
|
-
modifyOtherValue(index) {
|
|
334
|
-
console.log("进来了", index)
|
|
335
|
-
console.log("dddd", this.materials[index].material)
|
|
336
|
-
if(this.materials[index].material){
|
|
337
|
-
let material = this.materials[index].material
|
|
338
|
-
this.materials[index].f_material_price = material.f_material_price
|
|
339
|
-
this.materials[index].f_material_name = material.f_material_name
|
|
340
|
-
this.materials[index].f_material_style = material.f_material_style
|
|
341
|
-
this.materials[index].f_material_unit = material.f_material_unit
|
|
342
|
-
this.materials[index].f_material_number = material.f_material_number
|
|
343
|
-
this.materials[index].f_material_code = material.f_material_code
|
|
344
|
-
this.materials[index].f_userinfo_code = material.f_userinfo_code
|
|
345
|
-
if (material.f_material_name === "报警器-汉威") {
|
|
346
|
-
this.isShow[index] = true
|
|
347
|
-
} else {
|
|
348
|
-
this.isShow[index] = false
|
|
349
|
-
}
|
|
350
|
-
this.isShow.splice(0, 1, this.isShow[0])
|
|
351
|
-
}else{
|
|
352
|
-
this.materials[index].f_material_price =''
|
|
353
|
-
this.materials[index].f_material_name = ''
|
|
354
|
-
this.materials[index].f_material_style = ''
|
|
355
|
-
this.materials[index].f_material_unit =''
|
|
356
|
-
this.materials[index].f_material_number = ''
|
|
357
|
-
this.materials[index].f_material_code =''
|
|
358
|
-
this.materials[index].f_userinfo_code =''
|
|
359
|
-
}
|
|
360
|
-
},
|
|
361
|
-
// 新增材料
|
|
362
|
-
async addMaterial() {
|
|
363
|
-
this.title = '新增'
|
|
364
|
-
let data = {
|
|
365
|
-
f_process_id: this.selectdata.f_process_id,
|
|
366
|
-
f_operator_id: Vue.user.id,
|
|
367
|
-
f_operator: Vue.user.name,
|
|
368
|
-
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
369
|
-
f_orgid: Vue.user.orgid,
|
|
370
|
-
f_orgname: Vue.user.orgs,
|
|
371
|
-
materials: this.materials
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
//报警器流程 设备编号检验
|
|
375
|
-
await this.bjqCheck()
|
|
376
|
-
if (this.bjqChecklag.length > 0) {
|
|
377
|
-
return
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
let http = new HttpResetClass()
|
|
381
|
-
let res = await http.load(
|
|
382
|
-
'POST',
|
|
383
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/saveMaterials`,
|
|
384
|
-
data
|
|
385
|
-
)
|
|
386
|
-
this.closeMaterials()
|
|
387
|
-
},
|
|
388
|
-
async deleteMaterial(row) {
|
|
389
|
-
debugger
|
|
390
|
-
var show1 = window.confirm('您确定要删除这条记录吗?')
|
|
391
|
-
if(show1 != true){
|
|
392
|
-
this.closeMaterials()
|
|
393
|
-
}else{
|
|
394
|
-
let http = new HttpResetClass()
|
|
395
|
-
let res = await http.load(
|
|
396
|
-
'POST',
|
|
397
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
|
|
398
|
-
{data: row},
|
|
399
|
-
{resolveMsg: null, rejectMsg: '材料删除失败!!!'}
|
|
400
|
-
)
|
|
401
|
-
this.closeMaterials()
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
,
|
|
405
|
-
async updateMaterial(index, row) {
|
|
406
|
-
this.title = '修改'
|
|
407
|
-
this.row = row
|
|
408
|
-
this.getMateralNames()
|
|
409
|
-
this.materials = [
|
|
410
|
-
{
|
|
411
|
-
material: '',
|
|
412
|
-
f_material_price: row.f_material_price,
|
|
413
|
-
f_material_name: row.f_material_name,
|
|
414
|
-
f_material_style: row.f_material_style,
|
|
415
|
-
f_material_unit: row.f_material_unit,
|
|
416
|
-
f_material_number: row.f_material_number,
|
|
417
|
-
f_material_code: row.f_material_code,
|
|
418
|
-
f_bjq_sid: row.f_bjq_sid,
|
|
419
|
-
f_userinfo_code: row.f_userinfo_code
|
|
420
|
-
}
|
|
421
|
-
]
|
|
422
|
-
this.showMaterialModal = true
|
|
423
|
-
},
|
|
424
|
-
async updateConfirm() {
|
|
425
|
-
let data = this.row
|
|
426
|
-
data.f_material_price = this.materials[0].f_material_price
|
|
427
|
-
data.f_material_name = this.materials[0].f_material_name
|
|
428
|
-
data.f_material_style = this.materials[0].f_material_style
|
|
429
|
-
data.f_material_unit = this.materials[0].f_material_unit
|
|
430
|
-
data.f_material_number = this.materials[0].f_material_number
|
|
431
|
-
data.f_material_code = this.materials[0].f_material_code
|
|
432
|
-
data.f_bjq_sid = this.materials[0].f_bjq_sid
|
|
433
|
-
data.f_userinfo_code=this.materials[0].f_userinfo_code
|
|
434
|
-
|
|
435
|
-
//报警器流程 设备编号检验
|
|
436
|
-
await this.bjqCheck()
|
|
437
|
-
if (this.bjqChecklag.length > 0){
|
|
438
|
-
return
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
let http = new HttpResetClass()
|
|
442
|
-
let res = await http.load(
|
|
443
|
-
'POST',
|
|
444
|
-
`${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_apply`,
|
|
445
|
-
data
|
|
446
|
-
)
|
|
447
|
-
this.closeMaterials()
|
|
448
|
-
},
|
|
449
|
-
sycronizedCode(index,val){
|
|
450
|
-
console.log("看看:",index,val)
|
|
451
|
-
this.materials[index].f_material_code = val
|
|
452
|
-
},
|
|
453
|
-
closeMaterials() {
|
|
454
|
-
this.getOnetoManyData()
|
|
455
|
-
this.showMaterialModal = false
|
|
456
|
-
},
|
|
457
|
-
async bjqCheck(){
|
|
458
|
-
//报警器设备型号校验
|
|
459
|
-
this.bjqChecklag = [] //初始化
|
|
460
|
-
if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
|
|
461
|
-
let bjqinfo = {
|
|
462
|
-
f_material_name : "",
|
|
463
|
-
f_bjq_sid: ""
|
|
464
|
-
}
|
|
465
|
-
for (const bjqinfoElement of this.materials) {
|
|
466
|
-
bjqinfo.f_bjq_sid = bjqinfoElement.f_bjq_sid
|
|
467
|
-
bjqinfo.f_material_name = bjqinfoElement.f_material_name
|
|
468
|
-
if (bjqinfo.f_material_name.substr(0,3) === '报警器'){
|
|
469
|
-
let http = new HttpResetClass()
|
|
470
|
-
let res = await http.load(
|
|
471
|
-
'POST',
|
|
472
|
-
// `/rs/logic/bjqcheck`,
|
|
473
|
-
`${this.$androidUtil.getProxyUrl()}/ncc/rs/logic/bjqcheck`,
|
|
474
|
-
bjqinfo
|
|
475
|
-
)
|
|
476
|
-
if (res.data.code != 200){
|
|
477
|
-
this.bjqChecklag.push(res.data.code)
|
|
478
|
-
//this.$showMessage(res.data.msg)
|
|
479
|
-
Vue.showAlert(res.data.msg, 'danger', 6000)
|
|
480
|
-
return
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
</script>
|
|
490
|
-
|
|
491
|
-
<style scoped>
|
|
492
|
-
|
|
493
|
-
</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">材料标识</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_bjq_sid}}</nobr>
|
|
39
|
+
</td>
|
|
40
|
+
<td style="text-align: center;">
|
|
41
|
+
<nobr>{{row.f_material_code}}</nobr>
|
|
42
|
+
</td>
|
|
43
|
+
<td style="text-align: center;">
|
|
44
|
+
<nobr>{{row.f_userinfo_code}}</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>×</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">
|
|
129
|
+
<label class="col-sm-4 control-label">材料编号:</label>
|
|
130
|
+
<div class="col-sm-8">
|
|
131
|
+
<input class="form-control input_view" style="" type="text"
|
|
132
|
+
placeholder="材料编号"
|
|
133
|
+
v-model="item.f_bjq_sid"
|
|
134
|
+
:value="item.f_bjq_sid"
|
|
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=""
|
|
142
|
+
placeholder="材料标识"
|
|
143
|
+
v-model="item.f_material_code"
|
|
144
|
+
:value.sync="item.f_material_code"
|
|
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
|
+
<input class="form-control input_view" style=""
|
|
152
|
+
placeholder="用户编号"
|
|
153
|
+
v-model="item.f_userinfo_code"
|
|
154
|
+
:value.sync="item.f_userinfo_code"
|
|
155
|
+
/>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
<div class="form-group col-sm-6">
|
|
159
|
+
<label class="col-sm-4 control-label"></label>
|
|
160
|
+
<div class="col-sm-8">
|
|
161
|
+
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
<div class="form-group col-sm-6">
|
|
165
|
+
<label class="col-sm-4 control-label"></label>
|
|
166
|
+
<div class="col-sm-8">
|
|
167
|
+
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
<div class="form-group col-sm-6">
|
|
171
|
+
<label class="col-sm-4 control-label"></label>
|
|
172
|
+
<div class="col-sm-8">
|
|
173
|
+
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
<div class="form-group col-sm-6">
|
|
177
|
+
<label class="col-sm-4 control-label"></label>
|
|
178
|
+
<div class="col-sm-8">
|
|
179
|
+
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
<div class="form-group col-sm-6">
|
|
183
|
+
<label class="col-sm-4 control-label"></label>
|
|
184
|
+
<div class="col-sm-8">
|
|
185
|
+
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
<div class="form-group col-sm-6">
|
|
189
|
+
<label class="col-sm-4 control-label"></label>
|
|
190
|
+
<div class="col-sm-8">
|
|
191
|
+
|
|
192
|
+
</div>
|
|
193
|
+
</div>
|
|
194
|
+
<div class="form-group col-sm-6">
|
|
195
|
+
<label class="col-sm-4 control-label"></label>
|
|
196
|
+
<div class="col-sm-8">
|
|
197
|
+
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
<div v-if=" (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建')">
|
|
201
|
+
<app-qrcode-reader :istype = fmaterialname :index = i v-show="isShow[i]"></app-qrcode-reader>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
</article>
|
|
205
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
206
|
+
<template v-if="mark !== 1">
|
|
207
|
+
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
|
|
208
|
+
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
|
|
209
|
+
:disabled="!$v.valid">确认添加
|
|
210
|
+
</button>
|
|
211
|
+
<button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
|
|
212
|
+
:disabled="!$v.valid">确认修改
|
|
213
|
+
</button>
|
|
214
|
+
</template>
|
|
215
|
+
</footer>
|
|
216
|
+
</modal>
|
|
217
|
+
</div>
|
|
218
|
+
</template>
|
|
219
|
+
|
|
220
|
+
<script>
|
|
221
|
+
import Vue from 'vue'
|
|
222
|
+
import {HttpResetClass} from 'vue-client'
|
|
223
|
+
|
|
224
|
+
export default {
|
|
225
|
+
name: 'addMaterialScience',
|
|
226
|
+
props: {
|
|
227
|
+
selectdata: {
|
|
228
|
+
type: Object
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
data() {
|
|
232
|
+
return {
|
|
233
|
+
onetomany: {
|
|
234
|
+
rows: []
|
|
235
|
+
},
|
|
236
|
+
title: '新增',
|
|
237
|
+
showMaterialModal: false,
|
|
238
|
+
materials: [
|
|
239
|
+
{
|
|
240
|
+
f_material_price: '',
|
|
241
|
+
material: '',
|
|
242
|
+
f_material_name: '',
|
|
243
|
+
f_material_style: '',
|
|
244
|
+
f_material_unit: '',
|
|
245
|
+
f_material_number: '',
|
|
246
|
+
f_bjq_sid: '',
|
|
247
|
+
f_material_code: '',
|
|
248
|
+
f_userinfo_code:''
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
meterialOptions: [],
|
|
252
|
+
row: {},
|
|
253
|
+
bjqChecklag:[],
|
|
254
|
+
fmaterialname:{},
|
|
255
|
+
isShow:[false]
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
ready() {
|
|
259
|
+
this.getOnetoManyData()
|
|
260
|
+
},
|
|
261
|
+
methods: {
|
|
262
|
+
async getOnetoManyData () {
|
|
263
|
+
let http = new HttpResetClass()
|
|
264
|
+
let data = {
|
|
265
|
+
tablename: `t_material_apply`,
|
|
266
|
+
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
267
|
+
}
|
|
268
|
+
let res = await http.load(
|
|
269
|
+
'POST',
|
|
270
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
|
|
271
|
+
{data: data},
|
|
272
|
+
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
273
|
+
)
|
|
274
|
+
this.onetomany.rows = res.data
|
|
275
|
+
},
|
|
276
|
+
async openMaterialModal() {
|
|
277
|
+
this.getMateralNames()
|
|
278
|
+
this.title = '新增'
|
|
279
|
+
this.materials = [
|
|
280
|
+
{
|
|
281
|
+
f_material_price: '',
|
|
282
|
+
material: '',
|
|
283
|
+
f_material_name: '',
|
|
284
|
+
f_material_style: '',
|
|
285
|
+
f_material_unit: '',
|
|
286
|
+
f_material_number: '',
|
|
287
|
+
f_bjq_sid: '',
|
|
288
|
+
f_material_code: '',
|
|
289
|
+
f_userinfo_code: ''
|
|
290
|
+
}
|
|
291
|
+
],
|
|
292
|
+
this.showMaterialModal = true
|
|
293
|
+
this.isShow = [false]
|
|
294
|
+
},
|
|
295
|
+
deleteDevicesinfo(index) {
|
|
296
|
+
this.materials.splice(index, 1)
|
|
297
|
+
this.isShow.splice(index, 1)
|
|
298
|
+
},
|
|
299
|
+
pushMaterial() {
|
|
300
|
+
this.materials.push({
|
|
301
|
+
f_material_price: '',
|
|
302
|
+
material: '',
|
|
303
|
+
f_material_name: '',
|
|
304
|
+
f_material_style: '',
|
|
305
|
+
f_material_unit: '',
|
|
306
|
+
f_material_number: '',
|
|
307
|
+
f_bjq_sid: '',
|
|
308
|
+
f_material_code: '',
|
|
309
|
+
f_userinfo_code: ''
|
|
310
|
+
})
|
|
311
|
+
this.isShow.push(false)
|
|
312
|
+
},
|
|
313
|
+
// 获取模态框材料
|
|
314
|
+
async getMateralNames() {
|
|
315
|
+
let data = {
|
|
316
|
+
condition: `1=1`
|
|
317
|
+
}
|
|
318
|
+
let http = new HttpResetClass()
|
|
319
|
+
let res = await http.load(
|
|
320
|
+
'POST',
|
|
321
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
|
|
322
|
+
{data: data},
|
|
323
|
+
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
this.meterialOptions = res.data.map(item => {
|
|
327
|
+
return {
|
|
328
|
+
'label': `${item.f_material_name}--${item.f_material_style}`,
|
|
329
|
+
'value': item
|
|
330
|
+
}
|
|
331
|
+
})
|
|
332
|
+
},
|
|
333
|
+
modifyOtherValue(index) {
|
|
334
|
+
console.log("进来了", index)
|
|
335
|
+
console.log("dddd", this.materials[index].material)
|
|
336
|
+
if(this.materials[index].material){
|
|
337
|
+
let material = this.materials[index].material
|
|
338
|
+
this.materials[index].f_material_price = material.f_material_price
|
|
339
|
+
this.materials[index].f_material_name = material.f_material_name
|
|
340
|
+
this.materials[index].f_material_style = material.f_material_style
|
|
341
|
+
this.materials[index].f_material_unit = material.f_material_unit
|
|
342
|
+
this.materials[index].f_material_number = material.f_material_number
|
|
343
|
+
this.materials[index].f_material_code = material.f_material_code
|
|
344
|
+
this.materials[index].f_userinfo_code = material.f_userinfo_code
|
|
345
|
+
if (material.f_material_name === "报警器-汉威") {
|
|
346
|
+
this.isShow[index] = true
|
|
347
|
+
} else {
|
|
348
|
+
this.isShow[index] = false
|
|
349
|
+
}
|
|
350
|
+
this.isShow.splice(0, 1, this.isShow[0])
|
|
351
|
+
}else{
|
|
352
|
+
this.materials[index].f_material_price =''
|
|
353
|
+
this.materials[index].f_material_name = ''
|
|
354
|
+
this.materials[index].f_material_style = ''
|
|
355
|
+
this.materials[index].f_material_unit =''
|
|
356
|
+
this.materials[index].f_material_number = ''
|
|
357
|
+
this.materials[index].f_material_code =''
|
|
358
|
+
this.materials[index].f_userinfo_code =''
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
// 新增材料
|
|
362
|
+
async addMaterial() {
|
|
363
|
+
this.title = '新增'
|
|
364
|
+
let data = {
|
|
365
|
+
f_process_id: this.selectdata.f_process_id,
|
|
366
|
+
f_operator_id: Vue.user.id,
|
|
367
|
+
f_operator: Vue.user.name,
|
|
368
|
+
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
369
|
+
f_orgid: Vue.user.orgid,
|
|
370
|
+
f_orgname: Vue.user.orgs,
|
|
371
|
+
materials: this.materials
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
//报警器流程 设备编号检验
|
|
375
|
+
await this.bjqCheck()
|
|
376
|
+
if (this.bjqChecklag.length > 0) {
|
|
377
|
+
return
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
let http = new HttpResetClass()
|
|
381
|
+
let res = await http.load(
|
|
382
|
+
'POST',
|
|
383
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/saveMaterials`,
|
|
384
|
+
data
|
|
385
|
+
)
|
|
386
|
+
this.closeMaterials()
|
|
387
|
+
},
|
|
388
|
+
async deleteMaterial(row) {
|
|
389
|
+
debugger
|
|
390
|
+
var show1 = window.confirm('您确定要删除这条记录吗?')
|
|
391
|
+
if(show1 != true){
|
|
392
|
+
this.closeMaterials()
|
|
393
|
+
}else{
|
|
394
|
+
let http = new HttpResetClass()
|
|
395
|
+
let res = await http.load(
|
|
396
|
+
'POST',
|
|
397
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
|
|
398
|
+
{data: row},
|
|
399
|
+
{resolveMsg: null, rejectMsg: '材料删除失败!!!'}
|
|
400
|
+
)
|
|
401
|
+
this.closeMaterials()
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
,
|
|
405
|
+
async updateMaterial(index, row) {
|
|
406
|
+
this.title = '修改'
|
|
407
|
+
this.row = row
|
|
408
|
+
this.getMateralNames()
|
|
409
|
+
this.materials = [
|
|
410
|
+
{
|
|
411
|
+
material: '',
|
|
412
|
+
f_material_price: row.f_material_price,
|
|
413
|
+
f_material_name: row.f_material_name,
|
|
414
|
+
f_material_style: row.f_material_style,
|
|
415
|
+
f_material_unit: row.f_material_unit,
|
|
416
|
+
f_material_number: row.f_material_number,
|
|
417
|
+
f_material_code: row.f_material_code,
|
|
418
|
+
f_bjq_sid: row.f_bjq_sid,
|
|
419
|
+
f_userinfo_code: row.f_userinfo_code
|
|
420
|
+
}
|
|
421
|
+
]
|
|
422
|
+
this.showMaterialModal = true
|
|
423
|
+
},
|
|
424
|
+
async updateConfirm() {
|
|
425
|
+
let data = this.row
|
|
426
|
+
data.f_material_price = this.materials[0].f_material_price
|
|
427
|
+
data.f_material_name = this.materials[0].f_material_name
|
|
428
|
+
data.f_material_style = this.materials[0].f_material_style
|
|
429
|
+
data.f_material_unit = this.materials[0].f_material_unit
|
|
430
|
+
data.f_material_number = this.materials[0].f_material_number
|
|
431
|
+
data.f_material_code = this.materials[0].f_material_code
|
|
432
|
+
data.f_bjq_sid = this.materials[0].f_bjq_sid
|
|
433
|
+
data.f_userinfo_code=this.materials[0].f_userinfo_code
|
|
434
|
+
|
|
435
|
+
//报警器流程 设备编号检验
|
|
436
|
+
await this.bjqCheck()
|
|
437
|
+
if (this.bjqChecklag.length > 0){
|
|
438
|
+
return
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
let http = new HttpResetClass()
|
|
442
|
+
let res = await http.load(
|
|
443
|
+
'POST',
|
|
444
|
+
`${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_apply`,
|
|
445
|
+
data
|
|
446
|
+
)
|
|
447
|
+
this.closeMaterials()
|
|
448
|
+
},
|
|
449
|
+
sycronizedCode(index,val){
|
|
450
|
+
console.log("看看:",index,val)
|
|
451
|
+
this.materials[index].f_material_code = val
|
|
452
|
+
},
|
|
453
|
+
closeMaterials() {
|
|
454
|
+
this.getOnetoManyData()
|
|
455
|
+
this.showMaterialModal = false
|
|
456
|
+
},
|
|
457
|
+
async bjqCheck(){
|
|
458
|
+
//报警器设备型号校验
|
|
459
|
+
this.bjqChecklag = [] //初始化
|
|
460
|
+
if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
|
|
461
|
+
let bjqinfo = {
|
|
462
|
+
f_material_name : "",
|
|
463
|
+
f_bjq_sid: ""
|
|
464
|
+
}
|
|
465
|
+
for (const bjqinfoElement of this.materials) {
|
|
466
|
+
bjqinfo.f_bjq_sid = bjqinfoElement.f_bjq_sid
|
|
467
|
+
bjqinfo.f_material_name = bjqinfoElement.f_material_name
|
|
468
|
+
if (bjqinfo.f_material_name.substr(0,3) === '报警器'){
|
|
469
|
+
let http = new HttpResetClass()
|
|
470
|
+
let res = await http.load(
|
|
471
|
+
'POST',
|
|
472
|
+
// `/rs/logic/bjqcheck`,
|
|
473
|
+
`${this.$androidUtil.getProxyUrl()}/ncc/rs/logic/bjqcheck`,
|
|
474
|
+
bjqinfo
|
|
475
|
+
)
|
|
476
|
+
if (res.data.code != 200){
|
|
477
|
+
this.bjqChecklag.push(res.data.code)
|
|
478
|
+
//this.$showMessage(res.data.msg)
|
|
479
|
+
Vue.showAlert(res.data.msg, 'danger', 6000)
|
|
480
|
+
return
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
</script>
|
|
490
|
+
|
|
491
|
+
<style scoped>
|
|
492
|
+
|
|
493
|
+
</style>
|