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,635 +1,635 @@
|
|
|
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
|
-
<v-select
|
|
79
|
-
class="select select_list"
|
|
80
|
-
:value.sync="item.material"
|
|
81
|
-
v-model="item.material"
|
|
82
|
-
align="right"
|
|
83
|
-
width="100%"
|
|
84
|
-
:options="meterialOptions"
|
|
85
|
-
:disable="mark === 1"
|
|
86
|
-
@change="modifyOtherValue(i)"
|
|
87
|
-
close-on-select
|
|
88
|
-
:valueSingle="true"></v-select>
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
<div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
|
|
92
|
-
<label class="col-sm-4 control-label">材料名称:</label>
|
|
93
|
-
<div class="col-sm-8">
|
|
94
|
-
<input class="form-control input_view" style="" type="text"
|
|
95
|
-
placeholder="材料名称"
|
|
96
|
-
v-model="item.f_material_name"
|
|
97
|
-
:value="item.f_material_name"
|
|
98
|
-
/>
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
<div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
|
|
102
|
-
<label class="col-sm-4 control-label">材料型号:</label>
|
|
103
|
-
<div class="col-sm-8">
|
|
104
|
-
<input class="form-control input_view" style="" type="text"
|
|
105
|
-
placeholder="材料型号"
|
|
106
|
-
v-model="item.f_material_style"
|
|
107
|
-
:value="item.f_material_style"
|
|
108
|
-
/>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
<div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
|
|
112
|
-
<label class="col-sm-4 control-label">材料单位:</label>
|
|
113
|
-
<div class="col-sm-8">
|
|
114
|
-
<input class="form-control input_view" style="" type="text"
|
|
115
|
-
placeholder="材料单位"
|
|
116
|
-
v-model="item.f_material_unit"
|
|
117
|
-
:value="item.f_material_unit"
|
|
118
|
-
/>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
<div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
|
|
122
|
-
<label class="col-sm-4 control-label">材料数量:</label>
|
|
123
|
-
<div class="col-sm-8">
|
|
124
|
-
<input class="form-control input_view" style="" type="number"
|
|
125
|
-
placeholder="设备数量"
|
|
126
|
-
v-model="item.f_material_number"
|
|
127
|
-
:value="item.f_material_number"
|
|
128
|
-
/>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
<div class="form-group col-sm-6">
|
|
132
|
-
<label class="col-sm-4 control-label">材料编号:</label>
|
|
133
|
-
<div class="col-sm-8">
|
|
134
|
-
<input class="form-control input_view" style="" type="text"
|
|
135
|
-
placeholder="材料编号"
|
|
136
|
-
v-model="item.f_bjq_sid"
|
|
137
|
-
:value="item.f_bjq_sid"
|
|
138
|
-
/>
|
|
139
|
-
</div>
|
|
140
|
-
</div>
|
|
141
|
-
<div class="form-group col-sm-6">
|
|
142
|
-
<label class="col-sm-4 control-label">材料标识:</label>
|
|
143
|
-
<div class="col-sm-8">
|
|
144
|
-
<input class="form-control input_view" style=""
|
|
145
|
-
placeholder="材料标识"
|
|
146
|
-
v-model="item.f_material_code"
|
|
147
|
-
:value.sync="item.f_material_code"
|
|
148
|
-
/>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
<div class="form-group col-sm-6">
|
|
152
|
-
<label class="col-sm-4 control-label">用户编号:</label>
|
|
153
|
-
<div class="col-sm-8">
|
|
154
|
-
<input class="form-control input_view" style=""
|
|
155
|
-
placeholder="用户编号"
|
|
156
|
-
v-model="item.f_userinfo_code"
|
|
157
|
-
:value.sync="item.f_userinfo_code"
|
|
158
|
-
/>
|
|
159
|
-
</div>
|
|
160
|
-
</div>
|
|
161
|
-
<div v-if=" (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建')">
|
|
162
|
-
<app-qrcode-reader :istype = fmaterialname :index = i v-show="isShow[i]"></app-qrcode-reader>
|
|
163
|
-
</div>
|
|
164
|
-
</div>
|
|
165
|
-
</article>
|
|
166
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
167
|
-
<template v-if="mark !== 1">
|
|
168
|
-
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
|
|
169
|
-
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
|
|
170
|
-
:disabled="!$v.valid">确认添加
|
|
171
|
-
</button>
|
|
172
|
-
<button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
|
|
173
|
-
:disabled="!$v.valid">确认修改
|
|
174
|
-
</button>
|
|
175
|
-
</template>
|
|
176
|
-
</footer>
|
|
177
|
-
</modal>
|
|
178
|
-
</div>
|
|
179
|
-
</template>
|
|
180
|
-
|
|
181
|
-
<script>
|
|
182
|
-
import Vue from 'vue'
|
|
183
|
-
import {HttpResetClass} from 'vue-client'
|
|
184
|
-
|
|
185
|
-
export default {
|
|
186
|
-
name: 'addMaterialScience',
|
|
187
|
-
props: {
|
|
188
|
-
selectdata: {
|
|
189
|
-
type: Object
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
data() {
|
|
193
|
-
return {
|
|
194
|
-
onetomany: {
|
|
195
|
-
rows: []
|
|
196
|
-
},
|
|
197
|
-
title: '新增',
|
|
198
|
-
showMaterialModal: false,
|
|
199
|
-
materials: [
|
|
200
|
-
{
|
|
201
|
-
f_material_price: '',
|
|
202
|
-
material: '',
|
|
203
|
-
f_material_name: '',
|
|
204
|
-
f_material_style: '',
|
|
205
|
-
f_material_unit: '',
|
|
206
|
-
f_material_number: '',
|
|
207
|
-
f_bjq_sid: '',
|
|
208
|
-
f_material_code: '',
|
|
209
|
-
f_userinfo_code:'',
|
|
210
|
-
f_logotype:''
|
|
211
|
-
}
|
|
212
|
-
],
|
|
213
|
-
meterialOptions: [],
|
|
214
|
-
row: {},
|
|
215
|
-
bjqChecklag:[],
|
|
216
|
-
fmaterialname:{},
|
|
217
|
-
isShow:[false],
|
|
218
|
-
requestBody: {
|
|
219
|
-
so_saleorder: {
|
|
220
|
-
"pk_group": "H", // 集团【集团】
|
|
221
|
-
"pk_org": "30", // 销售组织【组织_业务单元_销售组织】
|
|
222
|
-
"pk_org_v": "30", // 销售组织版本【组织_业务单元_销售组织版本信息】
|
|
223
|
-
"vtrantypecode": "30-0xx-002", // 订单类型编码【】
|
|
224
|
-
"ctrantypeid": "1001E11000000001KYUT", // 订单类型【单据类型】
|
|
225
|
-
"cdeptid": "07", // 部门最新版本【部门】
|
|
226
|
-
"cdeptvid": "07", // 部门【部门版本】
|
|
227
|
-
"cemployeeid": "0152", // 业务员【人员】
|
|
228
|
-
"cinvoicecustid": "11099", // 开票客户【客户档案】
|
|
229
|
-
"chreceivecustid": "11099", // 收货客户【客户档案】
|
|
230
|
-
"ccustomerid": "11099", // 客户【客户档案】
|
|
231
|
-
"ndiscountrate": "100.00", // 整单折扣【】
|
|
232
|
-
"dbilldate": "2025-04-24 00:00:00", // 单据日期【】
|
|
233
|
-
"dmakedate": "2025-04-24 00:00:00", // 制单日期【】
|
|
234
|
-
"corigcurrencyid": "CNY", // 原币【币种档案】
|
|
235
|
-
"fpfstatusflag": "1", // 审批流状态【】
|
|
236
|
-
"fstatusflag": "1", // 单据状态【1 = 自由,2 = 审批通过,3 = 冻结,4 = 关闭,7 = 审批中,8 = 审批不通过,5 = 失效】
|
|
237
|
-
"iversion": "0", // 修订版本号【】
|
|
238
|
-
"ntotalmny": 254.14, // 冲抵前金额【】
|
|
239
|
-
"ntotalnum": 224.9, // 总数量【】
|
|
240
|
-
"ntotalorigmny": 254.14, // 价税合计【】
|
|
241
|
-
"cbiztypeid": "1001E11000000001KZDF", // 业务流程【业务流程】
|
|
242
|
-
"badvfeeflag": "N", // 代垫运费【】
|
|
243
|
-
"barsettleflag": "N", // 收入结算关闭【】
|
|
244
|
-
"bcooptopoflag": "N", // 已协同生成采购订单【】
|
|
245
|
-
"bcostsettleflag": "N", // 成本结算关闭【】
|
|
246
|
-
"bfreecustflag": "N", // 是否散户【】
|
|
247
|
-
"binvoicendflag": "N", // 开票关闭【】
|
|
248
|
-
"boffsetflag": "N", // 是否冲抵【】
|
|
249
|
-
"boutendflag": "N", // 出库关闭【】
|
|
250
|
-
"bpocooptomeflag": "N", // 由采购订单协同生成【】
|
|
251
|
-
"bpreceiveflag": "N", // 收款限额控制预收【】
|
|
252
|
-
"bsendendflag": "N", // 发货关闭【】
|
|
253
|
-
"vnote": "" // 备注【】
|
|
254
|
-
},
|
|
255
|
-
so_saleorder_b: []
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
ready() {
|
|
260
|
-
this.getOnetoManyData()
|
|
261
|
-
},
|
|
262
|
-
methods: {
|
|
263
|
-
async getOnetoManyData () {
|
|
264
|
-
let http = new HttpResetClass()
|
|
265
|
-
let data = {
|
|
266
|
-
tablename: `t_material_apply`,
|
|
267
|
-
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
268
|
-
}
|
|
269
|
-
let res = await http.load(
|
|
270
|
-
'POST',
|
|
271
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
|
|
272
|
-
{data: data},
|
|
273
|
-
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
274
|
-
)
|
|
275
|
-
this.onetomany.rows = res.data
|
|
276
|
-
},
|
|
277
|
-
async openMaterialModal() {
|
|
278
|
-
this.getMateralNames()
|
|
279
|
-
this.title = '新增'
|
|
280
|
-
this.materials = [
|
|
281
|
-
{
|
|
282
|
-
f_material_price: '',
|
|
283
|
-
material: '',
|
|
284
|
-
f_material_name: '',
|
|
285
|
-
f_material_style: '',
|
|
286
|
-
f_material_unit: '',
|
|
287
|
-
f_material_number: '',
|
|
288
|
-
f_bjq_sid: '',
|
|
289
|
-
f_material_code: '',
|
|
290
|
-
f_userinfo_code: '',
|
|
291
|
-
f_logotype:''
|
|
292
|
-
}
|
|
293
|
-
],
|
|
294
|
-
this.showMaterialModal = true
|
|
295
|
-
this.isShow = [false]
|
|
296
|
-
},
|
|
297
|
-
deleteDevicesinfo(index) {
|
|
298
|
-
this.materials.splice(index, 1)
|
|
299
|
-
this.isShow.splice(index, 1)
|
|
300
|
-
},
|
|
301
|
-
pushMaterial() {
|
|
302
|
-
this.materials.push({
|
|
303
|
-
f_material_price: '',
|
|
304
|
-
material: '',
|
|
305
|
-
f_material_name: '',
|
|
306
|
-
f_material_style: '',
|
|
307
|
-
f_material_unit: '',
|
|
308
|
-
f_material_number: '',
|
|
309
|
-
f_bjq_sid: '',
|
|
310
|
-
f_material_code: '',
|
|
311
|
-
f_userinfo_code: '',
|
|
312
|
-
f_logotype:''
|
|
313
|
-
})
|
|
314
|
-
this.isShow.push(false)
|
|
315
|
-
},
|
|
316
|
-
async getMateralNames () {
|
|
317
|
-
let http1 = new HttpResetClass()
|
|
318
|
-
let res1 = await http1.load(
|
|
319
|
-
'POST',
|
|
320
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/yongyouLogin`,
|
|
321
|
-
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
322
|
-
)
|
|
323
|
-
if (res1.data=== 200){
|
|
324
|
-
let http = new HttpResetClass()
|
|
325
|
-
let res2 = await http.load(
|
|
326
|
-
'POST',
|
|
327
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/yongyouMaterial`,
|
|
328
|
-
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
329
|
-
)
|
|
330
|
-
this.meterialOptions = res2.data.filter(item => item.tongqi && item.tongqi === '开通维修').map(item => {
|
|
331
|
-
return {
|
|
332
|
-
'label': `${item.name}--${item.spec}--${item.smallnumname}`,
|
|
333
|
-
'value': item.code,
|
|
334
|
-
'materials': item
|
|
335
|
-
}
|
|
336
|
-
})
|
|
337
|
-
}
|
|
338
|
-
},
|
|
339
|
-
// 获取模态框材料
|
|
340
|
-
// async getMateralNames() {
|
|
341
|
-
// let data = {
|
|
342
|
-
// condition: `1=1`
|
|
343
|
-
// }
|
|
344
|
-
// let http = new HttpResetClass()
|
|
345
|
-
// let res = await http.load(
|
|
346
|
-
// 'POST',
|
|
347
|
-
// `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
|
|
348
|
-
// {data: data},
|
|
349
|
-
// {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
350
|
-
// )
|
|
351
|
-
//
|
|
352
|
-
// this.meterialOptions = res.data.map(item => {
|
|
353
|
-
// return {
|
|
354
|
-
// 'label': `${item.f_material_name}--${item.f_material_style}`,
|
|
355
|
-
// 'value': item
|
|
356
|
-
// }
|
|
357
|
-
// })
|
|
358
|
-
// },
|
|
359
|
-
modifyOtherValue (index){
|
|
360
|
-
console.log("进来了",index)
|
|
361
|
-
console.log("dddd",this.materials[index].material)
|
|
362
|
-
let material ={}
|
|
363
|
-
if(this.materials[index].material[0]){
|
|
364
|
-
for(let i=0;i<this.meterialOptions.length;i++){
|
|
365
|
-
if(this.materials[index].material[0]==this.meterialOptions[i].value){
|
|
366
|
-
material = this.meterialOptions[i].materials
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
this.materials[index].f_material_price=0
|
|
370
|
-
this.materials[index].f_material_name = material.name
|
|
371
|
-
this.materials[index].f_material_style = material.spec
|
|
372
|
-
this.materials[index].f_material_unit = material.smallnumname
|
|
373
|
-
this.materials[index].f_material_number = material.f_material_number
|
|
374
|
-
this.materials[index].f_material_code = material.code
|
|
375
|
-
this.materials[index].f_bjq_sid=material.pk
|
|
376
|
-
this.materials[index].f_userinfo_code = material.f_userinfo_code
|
|
377
|
-
}else {
|
|
378
|
-
this.materials[index].f_material_price=''
|
|
379
|
-
this.materials[index].f_material_name =''
|
|
380
|
-
this.materials[index].f_material_style =''
|
|
381
|
-
this.materials[index].f_material_unit =''
|
|
382
|
-
this.materials[index].f_material_number = ''
|
|
383
|
-
this.materials[index].f_material_code =''
|
|
384
|
-
this.materials[index].f_bjq_sid=''
|
|
385
|
-
this.materials[index].f_userinfo_code = ''
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
},
|
|
389
|
-
// 新增材料
|
|
390
|
-
async addMaterial() {
|
|
391
|
-
//调用用友保存材料接口
|
|
392
|
-
for (let i = 0; i < this.materials.length; i++) {
|
|
393
|
-
let obj={
|
|
394
|
-
"pk_group": "H", // 集团【集团】
|
|
395
|
-
"pk_org": "30", // 销售组织【组织_业务单元_销售组织】
|
|
396
|
-
"pk_org_v": "30", // 销售组织【组织_业务单元_销售组织】
|
|
397
|
-
"carorgid": "30", // 应收组织最新版本【财务组织】
|
|
398
|
-
"carorgvid": "30", // 应收组织【财务组织版本】
|
|
399
|
-
"csendstockorgid": "30", // 发货库存组织最新版本【库存组织】
|
|
400
|
-
"csendstockorgvid": "30", // 发货库存组织【库存组织版本】
|
|
401
|
-
"csettleorgid": "30", // 结算财务组织最新版本【财务组织】
|
|
402
|
-
"csettleorgvid": "30", // 结算财务组织【财务组织版本】
|
|
403
|
-
"creceivecustid": "11099", // 收货客户【客户档案】
|
|
404
|
-
"ctaxcountryid": "0001Z010000000079UJJ", // 报税国家 / 地区【国家地区】
|
|
405
|
-
"crececountryid": "0001Z010000000079UJJ", // 收货国家 / 地区【国家地区】
|
|
406
|
-
"csendcountryid": "0001Z010000000079UJJ", // 发货国家 / 地区【国家地区】
|
|
407
|
-
"cmaterialid": this.materials[i].f_material_code, // 物料最新版本【物料】
|
|
408
|
-
"cmaterialvid": this.materials[i].f_material_code, // 物料编码【物料(多版本)】
|
|
409
|
-
"cqtunitid":this.materials[i].f_material_unit==='米'?"MTR":"EA", // 报价单位【计量单位】
|
|
410
|
-
"cunitid": this.materials[i].f_material_unit==='米'?"MTR":"EA", // 主单位【计量单位】MTR=米 EA=个
|
|
411
|
-
"castunitid": this.materials[i].f_material_unit==='米'?"MTR":"EA", // 单位【计量单位】MTR=米 EA=个
|
|
412
|
-
"vqtunitrate": "1.00/1.00", // 报价换算率【】数量转主数量的换算比例
|
|
413
|
-
"vchangerate": "1.00/1.00", // 换算率【】数量转主数量的换算比例
|
|
414
|
-
"nvolume": "0", // 体积【】
|
|
415
|
-
"nweight": "0", // 重量【】
|
|
416
|
-
"nastnum": this.materials[i].f_material_number, // 数量【】pk_group, pk_org, ,
|
|
417
|
-
"nnum": this.materials[i].f_material_number, // 主数量【】
|
|
418
|
-
"nqtunitnum": this.materials[i].f_material_number, // 报价单位数量【】
|
|
419
|
-
"ndiscountrate": "100.00", // 整单折扣【】
|
|
420
|
-
"nitemdiscountrate": "100.00", // 单品折扣【】
|
|
421
|
-
"norigdiscount": "0.00", // 折扣额【】
|
|
422
|
-
"nexchangerate": 1.00, // 折本汇率【】
|
|
423
|
-
"ccurrencyid": "CNY", // 本位币【币种档案】
|
|
424
|
-
"nqtprice": "1.000000", // 本币无税单价【】
|
|
425
|
-
"nqtorigprice": "1.000000", // 无税单价【】
|
|
426
|
-
"norigprice": "1.000000", // 主无税单价【】
|
|
427
|
-
"nprice": "1.000000", // 主本币无税单价【】
|
|
428
|
-
"nqtorigtaxprice": "1.130000", // 含税单价【】
|
|
429
|
-
"nqttaxprice": "1.130000", // 本币含税单价【】
|
|
430
|
-
"norigtaxprice": "1.130000", // 主含税单价【】
|
|
431
|
-
"ctaxcodeid": "1001Z01000000003W0WZ", // 税码【】
|
|
432
|
-
"ntaxrate": "13.00", // 税率【】
|
|
433
|
-
"ntax": "14.56", // 税额【】
|
|
434
|
-
"nqtorignetprice": "1.000000", // 无税净价【】
|
|
435
|
-
"norignetprice": "1.000000", // 主无税净价【】
|
|
436
|
-
"nnetprice": "1.000000", // 主本币无税净价【】
|
|
437
|
-
"nqtnetprice": "1.000000", // 本币无税净价【】
|
|
438
|
-
"nqtorigtaxnetprc": "1.130000", // 含税净价【】
|
|
439
|
-
"norigtaxnetprice": "1.130000", // 主含税净价【】
|
|
440
|
-
"nqttaxnetprice": "1.130000", // 本币含税净价【】
|
|
441
|
-
"ntaxnetprice": "1.130000", // 主本币含税净价【】
|
|
442
|
-
"norigmny": "112.00", // 无税金额【】
|
|
443
|
-
"ncaltaxmny": "112.00", // 计税金额【】
|
|
444
|
-
"nmny": "126.56", // 本币价税合计【】
|
|
445
|
-
"norigtaxmny": "126.56", // 价税合计【】
|
|
446
|
-
"ntaxmny": "126.56", // 本币价税合计【】
|
|
447
|
-
"dplandate": "2025-04-24 00:00:00", // 到货日期【】
|
|
448
|
-
"dreceivedate": "2025-04-24 00:00:00", // 到货日期【】
|
|
449
|
-
"dsenddate": "2025-04-24 00:00:00", // 发货日期【】
|
|
450
|
-
"vbatchcode": "", // 批次号【】
|
|
451
|
-
"blargessflag": "N", // 赠品【】
|
|
452
|
-
"vrownote": "11月", // 行备注【】
|
|
453
|
-
//"cprojectid": "", // 项目【项目】
|
|
454
|
-
"csendstordocid": "02", // 发货仓库【仓库】 02=客服仓
|
|
455
|
-
"barrangedflag": "N", // 是否货源安排完毕【】
|
|
456
|
-
"bbarsettleflag": "N", // 收入结算关闭【】
|
|
457
|
-
"bbcostsettleflag": "N", // 成本结算关闭【】
|
|
458
|
-
"bbindflag": "N", // 捆绑存货【】
|
|
459
|
-
"bbinvoicendflag": "N", // 开票关闭【】
|
|
460
|
-
"bboutendflag": "N", // 出库关闭【】
|
|
461
|
-
"bbsendendflag": "N", // 发货关闭【】
|
|
462
|
-
"bbsettleendflag": "N", // 结算关闭【】
|
|
463
|
-
"bdiscountflag": "N", // 折扣类【】
|
|
464
|
-
"bjczxsflag": "N", // 借出转销售【】
|
|
465
|
-
"blaborflag": "N", // 服务类【】
|
|
466
|
-
"blrgcashflag": "N", // 赠品兑付【】
|
|
467
|
-
"bprerowcloseflag": "N", // 预订单行关闭【】
|
|
468
|
-
"btriatradeflag": "N", // 三角贸易【】
|
|
469
|
-
"fbuysellflag": "1", // 购销类型【1 = 国内销售,2 = 国内采购,3 = 出口,4 = 进口,5 = 不区分】
|
|
470
|
-
"flargesstypeflag": "1", // 赠品价格分摊方式【1 = 未分摊,2 = 被分摊物料,3 = 分摊赠品】
|
|
471
|
-
"fretexchange": "0", // 退换货标记【0 = 非退换货,1 = 退货,2 = 换货】
|
|
472
|
-
"frowstatus": "1", // 行状态【1 = 自由,2 = 审批通过,3 = 冻结,4 = 关闭,7 = 审批中,8 = 审批不通过,5 = 失效】
|
|
473
|
-
"ftaxtypeflag": "1", // 扣税类别【1 = 应税外加,0 = 应税内含】
|
|
474
|
-
"ndiscount": "1" // 本币折扣额【】
|
|
475
|
-
}
|
|
476
|
-
this.requestBody.so_saleorder_b.push(obj)
|
|
477
|
-
}
|
|
478
|
-
let http2 = new HttpResetClass()
|
|
479
|
-
let res2 = await http2.load(
|
|
480
|
-
'POST',
|
|
481
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/yongyouSaveMaterial`,
|
|
482
|
-
{data: {
|
|
483
|
-
body:this.requestBody
|
|
484
|
-
}
|
|
485
|
-
},
|
|
486
|
-
{resolveMsg: null, rejectMsg: '材料推送失败!!!'}
|
|
487
|
-
)
|
|
488
|
-
if (res2.data.status == 200) {
|
|
489
|
-
let pk=res2.data.pk
|
|
490
|
-
for (let i = 0; i < this.materials.length; i++) {
|
|
491
|
-
this.materials[i].f_logotype=pk
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
this.title = '新增'
|
|
495
|
-
let data = {
|
|
496
|
-
f_process_id: this.selectdata.f_process_id,
|
|
497
|
-
f_operator_id: Vue.user.id,
|
|
498
|
-
f_operator: Vue.user.name,
|
|
499
|
-
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
500
|
-
f_orgid: Vue.user.orgid,
|
|
501
|
-
f_orgname: Vue.user.orgs,
|
|
502
|
-
materials: this.materials
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
//报警器流程 设备编号检验
|
|
506
|
-
await this.bjqCheck()
|
|
507
|
-
if (this.bjqChecklag.length > 0) {
|
|
508
|
-
return
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
let http = new HttpResetClass()
|
|
512
|
-
let res = await http.load(
|
|
513
|
-
'POST',
|
|
514
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/applysaveMaterials`,
|
|
515
|
-
data
|
|
516
|
-
)
|
|
517
|
-
|
|
518
|
-
this.closeMaterials()
|
|
519
|
-
},
|
|
520
|
-
async deleteMaterial(row) {
|
|
521
|
-
var show1 = window.confirm('您确定要删除这条记录吗?')
|
|
522
|
-
if(show1 != true){
|
|
523
|
-
this.closeMaterials()
|
|
524
|
-
}else{
|
|
525
|
-
let http = new HttpResetClass()
|
|
526
|
-
let sql = `delete from t_material_apply where f_logotype='${row.f_logotype}'`
|
|
527
|
-
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/runSQL`, {data: {sql: sql}}, {
|
|
528
|
-
resolveMsg: null,
|
|
529
|
-
rejectMsg: '作废失败!!!'
|
|
530
|
-
})
|
|
531
|
-
let http2 = new HttpResetClass()
|
|
532
|
-
let res2 = await http2.load(
|
|
533
|
-
'POST',
|
|
534
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/yongyouDelMaterial`,
|
|
535
|
-
{data: {
|
|
536
|
-
body:{
|
|
537
|
-
pk:row.f_logotype
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
},
|
|
541
|
-
{resolveMsg: null, rejectMsg: '材料推送失败!!!'}
|
|
542
|
-
)
|
|
543
|
-
this.closeMaterials()
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
,
|
|
547
|
-
async updateMaterial(index, row) {
|
|
548
|
-
this.title = '修改'
|
|
549
|
-
this.row = row
|
|
550
|
-
this.getMateralNames()
|
|
551
|
-
this.materials = [
|
|
552
|
-
{
|
|
553
|
-
material: '',
|
|
554
|
-
f_material_price: row.f_material_price,
|
|
555
|
-
f_material_name: row.f_material_name,
|
|
556
|
-
f_material_style: row.f_material_style,
|
|
557
|
-
f_material_unit: row.f_material_unit,
|
|
558
|
-
f_material_number: row.f_material_number,
|
|
559
|
-
f_material_code: row.f_material_code,
|
|
560
|
-
f_bjq_sid: row.f_bjq_sid,
|
|
561
|
-
f_userinfo_code: row.f_userinfo_code
|
|
562
|
-
}
|
|
563
|
-
]
|
|
564
|
-
this.showMaterialModal = true
|
|
565
|
-
},
|
|
566
|
-
async updateConfirm() {
|
|
567
|
-
let data = this.row
|
|
568
|
-
data.f_material_price = this.materials[0].f_material_price
|
|
569
|
-
data.f_material_name = this.materials[0].f_material_name
|
|
570
|
-
data.f_material_style = this.materials[0].f_material_style
|
|
571
|
-
data.f_material_unit = this.materials[0].f_material_unit
|
|
572
|
-
data.f_material_number = this.materials[0].f_material_number
|
|
573
|
-
data.f_material_code = this.materials[0].f_material_code
|
|
574
|
-
data.f_bjq_sid = this.materials[0].f_bjq_sid
|
|
575
|
-
data.f_userinfo_code=this.materials[0].f_userinfo_code
|
|
576
|
-
|
|
577
|
-
//报警器流程 设备编号检验
|
|
578
|
-
await this.bjqCheck()
|
|
579
|
-
if (this.bjqChecklag.length > 0){
|
|
580
|
-
return
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
let http = new HttpResetClass()
|
|
584
|
-
let res = await http.load(
|
|
585
|
-
'POST',
|
|
586
|
-
`${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_apply`,
|
|
587
|
-
data
|
|
588
|
-
)
|
|
589
|
-
this.closeMaterials()
|
|
590
|
-
},
|
|
591
|
-
sycronizedCode(index,val){
|
|
592
|
-
console.log("看看:",index,val)
|
|
593
|
-
this.materials[index].f_material_code = val
|
|
594
|
-
},
|
|
595
|
-
closeMaterials() {
|
|
596
|
-
this.getOnetoManyData()
|
|
597
|
-
this.showMaterialModal = false
|
|
598
|
-
},
|
|
599
|
-
async bjqCheck(){
|
|
600
|
-
//报警器设备型号校验
|
|
601
|
-
this.bjqChecklag = [] //初始化
|
|
602
|
-
if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
|
|
603
|
-
let bjqinfo = {
|
|
604
|
-
f_material_name : "",
|
|
605
|
-
f_bjq_sid: ""
|
|
606
|
-
}
|
|
607
|
-
for (const bjqinfoElement of this.materials) {
|
|
608
|
-
bjqinfo.f_bjq_sid = bjqinfoElement.f_bjq_sid
|
|
609
|
-
bjqinfo.f_material_name = bjqinfoElement.f_material_name
|
|
610
|
-
if (bjqinfo.f_material_name.substr(0,3) === '报警器'){
|
|
611
|
-
let http = new HttpResetClass()
|
|
612
|
-
let res = await http.load(
|
|
613
|
-
'POST',
|
|
614
|
-
// `/rs/logic/bjqcheck`,
|
|
615
|
-
`${this.$androidUtil.getProxyUrl()}/ncc/rs/logic/bjqcheck`,
|
|
616
|
-
bjqinfo
|
|
617
|
-
)
|
|
618
|
-
if (res.data.code != 200){
|
|
619
|
-
this.bjqChecklag.push(res.data.code)
|
|
620
|
-
//this.$showMessage(res.data.msg)
|
|
621
|
-
Vue.showAlert(res.data.msg, 'danger', 6000)
|
|
622
|
-
return
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
</script>
|
|
632
|
-
|
|
633
|
-
<style scoped>
|
|
634
|
-
|
|
635
|
-
</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
|
+
<v-select
|
|
79
|
+
class="select select_list"
|
|
80
|
+
:value.sync="item.material"
|
|
81
|
+
v-model="item.material"
|
|
82
|
+
align="right"
|
|
83
|
+
width="100%"
|
|
84
|
+
:options="meterialOptions"
|
|
85
|
+
:disable="mark === 1"
|
|
86
|
+
@change="modifyOtherValue(i)"
|
|
87
|
+
close-on-select
|
|
88
|
+
:valueSingle="true"></v-select>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
|
|
92
|
+
<label class="col-sm-4 control-label">材料名称:</label>
|
|
93
|
+
<div class="col-sm-8">
|
|
94
|
+
<input class="form-control input_view" style="" type="text"
|
|
95
|
+
placeholder="材料名称"
|
|
96
|
+
v-model="item.f_material_name"
|
|
97
|
+
:value="item.f_material_name"
|
|
98
|
+
/>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
<div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
|
|
102
|
+
<label class="col-sm-4 control-label">材料型号:</label>
|
|
103
|
+
<div class="col-sm-8">
|
|
104
|
+
<input class="form-control input_view" style="" type="text"
|
|
105
|
+
placeholder="材料型号"
|
|
106
|
+
v-model="item.f_material_style"
|
|
107
|
+
:value="item.f_material_style"
|
|
108
|
+
/>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
<div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
|
|
112
|
+
<label class="col-sm-4 control-label">材料单位:</label>
|
|
113
|
+
<div class="col-sm-8">
|
|
114
|
+
<input class="form-control input_view" style="" type="text"
|
|
115
|
+
placeholder="材料单位"
|
|
116
|
+
v-model="item.f_material_unit"
|
|
117
|
+
:value="item.f_material_unit"
|
|
118
|
+
/>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
<div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
|
|
122
|
+
<label class="col-sm-4 control-label">材料数量:</label>
|
|
123
|
+
<div class="col-sm-8">
|
|
124
|
+
<input class="form-control input_view" style="" type="number"
|
|
125
|
+
placeholder="设备数量"
|
|
126
|
+
v-model="item.f_material_number"
|
|
127
|
+
:value="item.f_material_number"
|
|
128
|
+
/>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
<div class="form-group col-sm-6">
|
|
132
|
+
<label class="col-sm-4 control-label">材料编号:</label>
|
|
133
|
+
<div class="col-sm-8">
|
|
134
|
+
<input class="form-control input_view" style="" type="text"
|
|
135
|
+
placeholder="材料编号"
|
|
136
|
+
v-model="item.f_bjq_sid"
|
|
137
|
+
:value="item.f_bjq_sid"
|
|
138
|
+
/>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
<div class="form-group col-sm-6">
|
|
142
|
+
<label class="col-sm-4 control-label">材料标识:</label>
|
|
143
|
+
<div class="col-sm-8">
|
|
144
|
+
<input class="form-control input_view" style=""
|
|
145
|
+
placeholder="材料标识"
|
|
146
|
+
v-model="item.f_material_code"
|
|
147
|
+
:value.sync="item.f_material_code"
|
|
148
|
+
/>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="form-group col-sm-6">
|
|
152
|
+
<label class="col-sm-4 control-label">用户编号:</label>
|
|
153
|
+
<div class="col-sm-8">
|
|
154
|
+
<input class="form-control input_view" style=""
|
|
155
|
+
placeholder="用户编号"
|
|
156
|
+
v-model="item.f_userinfo_code"
|
|
157
|
+
:value.sync="item.f_userinfo_code"
|
|
158
|
+
/>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
<div v-if=" (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建')">
|
|
162
|
+
<app-qrcode-reader :istype = fmaterialname :index = i v-show="isShow[i]"></app-qrcode-reader>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</article>
|
|
166
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
167
|
+
<template v-if="mark !== 1">
|
|
168
|
+
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
|
|
169
|
+
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
|
|
170
|
+
:disabled="!$v.valid">确认添加
|
|
171
|
+
</button>
|
|
172
|
+
<button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
|
|
173
|
+
:disabled="!$v.valid">确认修改
|
|
174
|
+
</button>
|
|
175
|
+
</template>
|
|
176
|
+
</footer>
|
|
177
|
+
</modal>
|
|
178
|
+
</div>
|
|
179
|
+
</template>
|
|
180
|
+
|
|
181
|
+
<script>
|
|
182
|
+
import Vue from 'vue'
|
|
183
|
+
import {HttpResetClass} from 'vue-client'
|
|
184
|
+
|
|
185
|
+
export default {
|
|
186
|
+
name: 'addMaterialScience',
|
|
187
|
+
props: {
|
|
188
|
+
selectdata: {
|
|
189
|
+
type: Object
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
data() {
|
|
193
|
+
return {
|
|
194
|
+
onetomany: {
|
|
195
|
+
rows: []
|
|
196
|
+
},
|
|
197
|
+
title: '新增',
|
|
198
|
+
showMaterialModal: false,
|
|
199
|
+
materials: [
|
|
200
|
+
{
|
|
201
|
+
f_material_price: '',
|
|
202
|
+
material: '',
|
|
203
|
+
f_material_name: '',
|
|
204
|
+
f_material_style: '',
|
|
205
|
+
f_material_unit: '',
|
|
206
|
+
f_material_number: '',
|
|
207
|
+
f_bjq_sid: '',
|
|
208
|
+
f_material_code: '',
|
|
209
|
+
f_userinfo_code:'',
|
|
210
|
+
f_logotype:''
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
meterialOptions: [],
|
|
214
|
+
row: {},
|
|
215
|
+
bjqChecklag:[],
|
|
216
|
+
fmaterialname:{},
|
|
217
|
+
isShow:[false],
|
|
218
|
+
requestBody: {
|
|
219
|
+
so_saleorder: {
|
|
220
|
+
"pk_group": "H", // 集团【集团】
|
|
221
|
+
"pk_org": "30", // 销售组织【组织_业务单元_销售组织】
|
|
222
|
+
"pk_org_v": "30", // 销售组织版本【组织_业务单元_销售组织版本信息】
|
|
223
|
+
"vtrantypecode": "30-0xx-002", // 订单类型编码【】
|
|
224
|
+
"ctrantypeid": "1001E11000000001KYUT", // 订单类型【单据类型】
|
|
225
|
+
"cdeptid": "07", // 部门最新版本【部门】
|
|
226
|
+
"cdeptvid": "07", // 部门【部门版本】
|
|
227
|
+
"cemployeeid": "0152", // 业务员【人员】
|
|
228
|
+
"cinvoicecustid": "11099", // 开票客户【客户档案】
|
|
229
|
+
"chreceivecustid": "11099", // 收货客户【客户档案】
|
|
230
|
+
"ccustomerid": "11099", // 客户【客户档案】
|
|
231
|
+
"ndiscountrate": "100.00", // 整单折扣【】
|
|
232
|
+
"dbilldate": "2025-04-24 00:00:00", // 单据日期【】
|
|
233
|
+
"dmakedate": "2025-04-24 00:00:00", // 制单日期【】
|
|
234
|
+
"corigcurrencyid": "CNY", // 原币【币种档案】
|
|
235
|
+
"fpfstatusflag": "1", // 审批流状态【】
|
|
236
|
+
"fstatusflag": "1", // 单据状态【1 = 自由,2 = 审批通过,3 = 冻结,4 = 关闭,7 = 审批中,8 = 审批不通过,5 = 失效】
|
|
237
|
+
"iversion": "0", // 修订版本号【】
|
|
238
|
+
"ntotalmny": 254.14, // 冲抵前金额【】
|
|
239
|
+
"ntotalnum": 224.9, // 总数量【】
|
|
240
|
+
"ntotalorigmny": 254.14, // 价税合计【】
|
|
241
|
+
"cbiztypeid": "1001E11000000001KZDF", // 业务流程【业务流程】
|
|
242
|
+
"badvfeeflag": "N", // 代垫运费【】
|
|
243
|
+
"barsettleflag": "N", // 收入结算关闭【】
|
|
244
|
+
"bcooptopoflag": "N", // 已协同生成采购订单【】
|
|
245
|
+
"bcostsettleflag": "N", // 成本结算关闭【】
|
|
246
|
+
"bfreecustflag": "N", // 是否散户【】
|
|
247
|
+
"binvoicendflag": "N", // 开票关闭【】
|
|
248
|
+
"boffsetflag": "N", // 是否冲抵【】
|
|
249
|
+
"boutendflag": "N", // 出库关闭【】
|
|
250
|
+
"bpocooptomeflag": "N", // 由采购订单协同生成【】
|
|
251
|
+
"bpreceiveflag": "N", // 收款限额控制预收【】
|
|
252
|
+
"bsendendflag": "N", // 发货关闭【】
|
|
253
|
+
"vnote": "" // 备注【】
|
|
254
|
+
},
|
|
255
|
+
so_saleorder_b: []
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
ready() {
|
|
260
|
+
this.getOnetoManyData()
|
|
261
|
+
},
|
|
262
|
+
methods: {
|
|
263
|
+
async getOnetoManyData () {
|
|
264
|
+
let http = new HttpResetClass()
|
|
265
|
+
let data = {
|
|
266
|
+
tablename: `t_material_apply`,
|
|
267
|
+
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
268
|
+
}
|
|
269
|
+
let res = await http.load(
|
|
270
|
+
'POST',
|
|
271
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
|
|
272
|
+
{data: data},
|
|
273
|
+
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
274
|
+
)
|
|
275
|
+
this.onetomany.rows = res.data
|
|
276
|
+
},
|
|
277
|
+
async openMaterialModal() {
|
|
278
|
+
this.getMateralNames()
|
|
279
|
+
this.title = '新增'
|
|
280
|
+
this.materials = [
|
|
281
|
+
{
|
|
282
|
+
f_material_price: '',
|
|
283
|
+
material: '',
|
|
284
|
+
f_material_name: '',
|
|
285
|
+
f_material_style: '',
|
|
286
|
+
f_material_unit: '',
|
|
287
|
+
f_material_number: '',
|
|
288
|
+
f_bjq_sid: '',
|
|
289
|
+
f_material_code: '',
|
|
290
|
+
f_userinfo_code: '',
|
|
291
|
+
f_logotype:''
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
this.showMaterialModal = true
|
|
295
|
+
this.isShow = [false]
|
|
296
|
+
},
|
|
297
|
+
deleteDevicesinfo(index) {
|
|
298
|
+
this.materials.splice(index, 1)
|
|
299
|
+
this.isShow.splice(index, 1)
|
|
300
|
+
},
|
|
301
|
+
pushMaterial() {
|
|
302
|
+
this.materials.push({
|
|
303
|
+
f_material_price: '',
|
|
304
|
+
material: '',
|
|
305
|
+
f_material_name: '',
|
|
306
|
+
f_material_style: '',
|
|
307
|
+
f_material_unit: '',
|
|
308
|
+
f_material_number: '',
|
|
309
|
+
f_bjq_sid: '',
|
|
310
|
+
f_material_code: '',
|
|
311
|
+
f_userinfo_code: '',
|
|
312
|
+
f_logotype:''
|
|
313
|
+
})
|
|
314
|
+
this.isShow.push(false)
|
|
315
|
+
},
|
|
316
|
+
async getMateralNames () {
|
|
317
|
+
let http1 = new HttpResetClass()
|
|
318
|
+
let res1 = await http1.load(
|
|
319
|
+
'POST',
|
|
320
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/yongyouLogin`,
|
|
321
|
+
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
322
|
+
)
|
|
323
|
+
if (res1.data=== 200){
|
|
324
|
+
let http = new HttpResetClass()
|
|
325
|
+
let res2 = await http.load(
|
|
326
|
+
'POST',
|
|
327
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/yongyouMaterial`,
|
|
328
|
+
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
329
|
+
)
|
|
330
|
+
this.meterialOptions = res2.data.filter(item => item.tongqi && item.tongqi === '开通维修').map(item => {
|
|
331
|
+
return {
|
|
332
|
+
'label': `${item.name}--${item.spec}--${item.smallnumname}`,
|
|
333
|
+
'value': item.code,
|
|
334
|
+
'materials': item
|
|
335
|
+
}
|
|
336
|
+
})
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
// 获取模态框材料
|
|
340
|
+
// async getMateralNames() {
|
|
341
|
+
// let data = {
|
|
342
|
+
// condition: `1=1`
|
|
343
|
+
// }
|
|
344
|
+
// let http = new HttpResetClass()
|
|
345
|
+
// let res = await http.load(
|
|
346
|
+
// 'POST',
|
|
347
|
+
// `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
|
|
348
|
+
// {data: data},
|
|
349
|
+
// {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
350
|
+
// )
|
|
351
|
+
//
|
|
352
|
+
// this.meterialOptions = res.data.map(item => {
|
|
353
|
+
// return {
|
|
354
|
+
// 'label': `${item.f_material_name}--${item.f_material_style}`,
|
|
355
|
+
// 'value': item
|
|
356
|
+
// }
|
|
357
|
+
// })
|
|
358
|
+
// },
|
|
359
|
+
modifyOtherValue (index){
|
|
360
|
+
console.log("进来了",index)
|
|
361
|
+
console.log("dddd",this.materials[index].material)
|
|
362
|
+
let material ={}
|
|
363
|
+
if(this.materials[index].material[0]){
|
|
364
|
+
for(let i=0;i<this.meterialOptions.length;i++){
|
|
365
|
+
if(this.materials[index].material[0]==this.meterialOptions[i].value){
|
|
366
|
+
material = this.meterialOptions[i].materials
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
this.materials[index].f_material_price=0
|
|
370
|
+
this.materials[index].f_material_name = material.name
|
|
371
|
+
this.materials[index].f_material_style = material.spec
|
|
372
|
+
this.materials[index].f_material_unit = material.smallnumname
|
|
373
|
+
this.materials[index].f_material_number = material.f_material_number
|
|
374
|
+
this.materials[index].f_material_code = material.code
|
|
375
|
+
this.materials[index].f_bjq_sid=material.pk
|
|
376
|
+
this.materials[index].f_userinfo_code = material.f_userinfo_code
|
|
377
|
+
}else {
|
|
378
|
+
this.materials[index].f_material_price=''
|
|
379
|
+
this.materials[index].f_material_name =''
|
|
380
|
+
this.materials[index].f_material_style =''
|
|
381
|
+
this.materials[index].f_material_unit =''
|
|
382
|
+
this.materials[index].f_material_number = ''
|
|
383
|
+
this.materials[index].f_material_code =''
|
|
384
|
+
this.materials[index].f_bjq_sid=''
|
|
385
|
+
this.materials[index].f_userinfo_code = ''
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
},
|
|
389
|
+
// 新增材料
|
|
390
|
+
async addMaterial() {
|
|
391
|
+
//调用用友保存材料接口
|
|
392
|
+
for (let i = 0; i < this.materials.length; i++) {
|
|
393
|
+
let obj={
|
|
394
|
+
"pk_group": "H", // 集团【集团】
|
|
395
|
+
"pk_org": "30", // 销售组织【组织_业务单元_销售组织】
|
|
396
|
+
"pk_org_v": "30", // 销售组织【组织_业务单元_销售组织】
|
|
397
|
+
"carorgid": "30", // 应收组织最新版本【财务组织】
|
|
398
|
+
"carorgvid": "30", // 应收组织【财务组织版本】
|
|
399
|
+
"csendstockorgid": "30", // 发货库存组织最新版本【库存组织】
|
|
400
|
+
"csendstockorgvid": "30", // 发货库存组织【库存组织版本】
|
|
401
|
+
"csettleorgid": "30", // 结算财务组织最新版本【财务组织】
|
|
402
|
+
"csettleorgvid": "30", // 结算财务组织【财务组织版本】
|
|
403
|
+
"creceivecustid": "11099", // 收货客户【客户档案】
|
|
404
|
+
"ctaxcountryid": "0001Z010000000079UJJ", // 报税国家 / 地区【国家地区】
|
|
405
|
+
"crececountryid": "0001Z010000000079UJJ", // 收货国家 / 地区【国家地区】
|
|
406
|
+
"csendcountryid": "0001Z010000000079UJJ", // 发货国家 / 地区【国家地区】
|
|
407
|
+
"cmaterialid": this.materials[i].f_material_code, // 物料最新版本【物料】
|
|
408
|
+
"cmaterialvid": this.materials[i].f_material_code, // 物料编码【物料(多版本)】
|
|
409
|
+
"cqtunitid":this.materials[i].f_material_unit==='米'?"MTR":"EA", // 报价单位【计量单位】
|
|
410
|
+
"cunitid": this.materials[i].f_material_unit==='米'?"MTR":"EA", // 主单位【计量单位】MTR=米 EA=个
|
|
411
|
+
"castunitid": this.materials[i].f_material_unit==='米'?"MTR":"EA", // 单位【计量单位】MTR=米 EA=个
|
|
412
|
+
"vqtunitrate": "1.00/1.00", // 报价换算率【】数量转主数量的换算比例
|
|
413
|
+
"vchangerate": "1.00/1.00", // 换算率【】数量转主数量的换算比例
|
|
414
|
+
"nvolume": "0", // 体积【】
|
|
415
|
+
"nweight": "0", // 重量【】
|
|
416
|
+
"nastnum": this.materials[i].f_material_number, // 数量【】pk_group, pk_org, ,
|
|
417
|
+
"nnum": this.materials[i].f_material_number, // 主数量【】
|
|
418
|
+
"nqtunitnum": this.materials[i].f_material_number, // 报价单位数量【】
|
|
419
|
+
"ndiscountrate": "100.00", // 整单折扣【】
|
|
420
|
+
"nitemdiscountrate": "100.00", // 单品折扣【】
|
|
421
|
+
"norigdiscount": "0.00", // 折扣额【】
|
|
422
|
+
"nexchangerate": 1.00, // 折本汇率【】
|
|
423
|
+
"ccurrencyid": "CNY", // 本位币【币种档案】
|
|
424
|
+
"nqtprice": "1.000000", // 本币无税单价【】
|
|
425
|
+
"nqtorigprice": "1.000000", // 无税单价【】
|
|
426
|
+
"norigprice": "1.000000", // 主无税单价【】
|
|
427
|
+
"nprice": "1.000000", // 主本币无税单价【】
|
|
428
|
+
"nqtorigtaxprice": "1.130000", // 含税单价【】
|
|
429
|
+
"nqttaxprice": "1.130000", // 本币含税单价【】
|
|
430
|
+
"norigtaxprice": "1.130000", // 主含税单价【】
|
|
431
|
+
"ctaxcodeid": "1001Z01000000003W0WZ", // 税码【】
|
|
432
|
+
"ntaxrate": "13.00", // 税率【】
|
|
433
|
+
"ntax": "14.56", // 税额【】
|
|
434
|
+
"nqtorignetprice": "1.000000", // 无税净价【】
|
|
435
|
+
"norignetprice": "1.000000", // 主无税净价【】
|
|
436
|
+
"nnetprice": "1.000000", // 主本币无税净价【】
|
|
437
|
+
"nqtnetprice": "1.000000", // 本币无税净价【】
|
|
438
|
+
"nqtorigtaxnetprc": "1.130000", // 含税净价【】
|
|
439
|
+
"norigtaxnetprice": "1.130000", // 主含税净价【】
|
|
440
|
+
"nqttaxnetprice": "1.130000", // 本币含税净价【】
|
|
441
|
+
"ntaxnetprice": "1.130000", // 主本币含税净价【】
|
|
442
|
+
"norigmny": "112.00", // 无税金额【】
|
|
443
|
+
"ncaltaxmny": "112.00", // 计税金额【】
|
|
444
|
+
"nmny": "126.56", // 本币价税合计【】
|
|
445
|
+
"norigtaxmny": "126.56", // 价税合计【】
|
|
446
|
+
"ntaxmny": "126.56", // 本币价税合计【】
|
|
447
|
+
"dplandate": "2025-04-24 00:00:00", // 到货日期【】
|
|
448
|
+
"dreceivedate": "2025-04-24 00:00:00", // 到货日期【】
|
|
449
|
+
"dsenddate": "2025-04-24 00:00:00", // 发货日期【】
|
|
450
|
+
"vbatchcode": "", // 批次号【】
|
|
451
|
+
"blargessflag": "N", // 赠品【】
|
|
452
|
+
"vrownote": "11月", // 行备注【】
|
|
453
|
+
//"cprojectid": "", // 项目【项目】
|
|
454
|
+
"csendstordocid": "02", // 发货仓库【仓库】 02=客服仓
|
|
455
|
+
"barrangedflag": "N", // 是否货源安排完毕【】
|
|
456
|
+
"bbarsettleflag": "N", // 收入结算关闭【】
|
|
457
|
+
"bbcostsettleflag": "N", // 成本结算关闭【】
|
|
458
|
+
"bbindflag": "N", // 捆绑存货【】
|
|
459
|
+
"bbinvoicendflag": "N", // 开票关闭【】
|
|
460
|
+
"bboutendflag": "N", // 出库关闭【】
|
|
461
|
+
"bbsendendflag": "N", // 发货关闭【】
|
|
462
|
+
"bbsettleendflag": "N", // 结算关闭【】
|
|
463
|
+
"bdiscountflag": "N", // 折扣类【】
|
|
464
|
+
"bjczxsflag": "N", // 借出转销售【】
|
|
465
|
+
"blaborflag": "N", // 服务类【】
|
|
466
|
+
"blrgcashflag": "N", // 赠品兑付【】
|
|
467
|
+
"bprerowcloseflag": "N", // 预订单行关闭【】
|
|
468
|
+
"btriatradeflag": "N", // 三角贸易【】
|
|
469
|
+
"fbuysellflag": "1", // 购销类型【1 = 国内销售,2 = 国内采购,3 = 出口,4 = 进口,5 = 不区分】
|
|
470
|
+
"flargesstypeflag": "1", // 赠品价格分摊方式【1 = 未分摊,2 = 被分摊物料,3 = 分摊赠品】
|
|
471
|
+
"fretexchange": "0", // 退换货标记【0 = 非退换货,1 = 退货,2 = 换货】
|
|
472
|
+
"frowstatus": "1", // 行状态【1 = 自由,2 = 审批通过,3 = 冻结,4 = 关闭,7 = 审批中,8 = 审批不通过,5 = 失效】
|
|
473
|
+
"ftaxtypeflag": "1", // 扣税类别【1 = 应税外加,0 = 应税内含】
|
|
474
|
+
"ndiscount": "1" // 本币折扣额【】
|
|
475
|
+
}
|
|
476
|
+
this.requestBody.so_saleorder_b.push(obj)
|
|
477
|
+
}
|
|
478
|
+
let http2 = new HttpResetClass()
|
|
479
|
+
let res2 = await http2.load(
|
|
480
|
+
'POST',
|
|
481
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/yongyouSaveMaterial`,
|
|
482
|
+
{data: {
|
|
483
|
+
body:this.requestBody
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
{resolveMsg: null, rejectMsg: '材料推送失败!!!'}
|
|
487
|
+
)
|
|
488
|
+
if (res2.data.status == 200) {
|
|
489
|
+
let pk=res2.data.pk
|
|
490
|
+
for (let i = 0; i < this.materials.length; i++) {
|
|
491
|
+
this.materials[i].f_logotype=pk
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
this.title = '新增'
|
|
495
|
+
let data = {
|
|
496
|
+
f_process_id: this.selectdata.f_process_id,
|
|
497
|
+
f_operator_id: Vue.user.id,
|
|
498
|
+
f_operator: Vue.user.name,
|
|
499
|
+
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
500
|
+
f_orgid: Vue.user.orgid,
|
|
501
|
+
f_orgname: Vue.user.orgs,
|
|
502
|
+
materials: this.materials
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
//报警器流程 设备编号检验
|
|
506
|
+
await this.bjqCheck()
|
|
507
|
+
if (this.bjqChecklag.length > 0) {
|
|
508
|
+
return
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
let http = new HttpResetClass()
|
|
512
|
+
let res = await http.load(
|
|
513
|
+
'POST',
|
|
514
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/applysaveMaterials`,
|
|
515
|
+
data
|
|
516
|
+
)
|
|
517
|
+
|
|
518
|
+
this.closeMaterials()
|
|
519
|
+
},
|
|
520
|
+
async deleteMaterial(row) {
|
|
521
|
+
var show1 = window.confirm('您确定要删除这条记录吗?')
|
|
522
|
+
if(show1 != true){
|
|
523
|
+
this.closeMaterials()
|
|
524
|
+
}else{
|
|
525
|
+
let http = new HttpResetClass()
|
|
526
|
+
let sql = `delete from t_material_apply where f_logotype='${row.f_logotype}'`
|
|
527
|
+
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/runSQL`, {data: {sql: sql}}, {
|
|
528
|
+
resolveMsg: null,
|
|
529
|
+
rejectMsg: '作废失败!!!'
|
|
530
|
+
})
|
|
531
|
+
let http2 = new HttpResetClass()
|
|
532
|
+
let res2 = await http2.load(
|
|
533
|
+
'POST',
|
|
534
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/yongyouDelMaterial`,
|
|
535
|
+
{data: {
|
|
536
|
+
body:{
|
|
537
|
+
pk:row.f_logotype
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
{resolveMsg: null, rejectMsg: '材料推送失败!!!'}
|
|
542
|
+
)
|
|
543
|
+
this.closeMaterials()
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
,
|
|
547
|
+
async updateMaterial(index, row) {
|
|
548
|
+
this.title = '修改'
|
|
549
|
+
this.row = row
|
|
550
|
+
this.getMateralNames()
|
|
551
|
+
this.materials = [
|
|
552
|
+
{
|
|
553
|
+
material: '',
|
|
554
|
+
f_material_price: row.f_material_price,
|
|
555
|
+
f_material_name: row.f_material_name,
|
|
556
|
+
f_material_style: row.f_material_style,
|
|
557
|
+
f_material_unit: row.f_material_unit,
|
|
558
|
+
f_material_number: row.f_material_number,
|
|
559
|
+
f_material_code: row.f_material_code,
|
|
560
|
+
f_bjq_sid: row.f_bjq_sid,
|
|
561
|
+
f_userinfo_code: row.f_userinfo_code
|
|
562
|
+
}
|
|
563
|
+
]
|
|
564
|
+
this.showMaterialModal = true
|
|
565
|
+
},
|
|
566
|
+
async updateConfirm() {
|
|
567
|
+
let data = this.row
|
|
568
|
+
data.f_material_price = this.materials[0].f_material_price
|
|
569
|
+
data.f_material_name = this.materials[0].f_material_name
|
|
570
|
+
data.f_material_style = this.materials[0].f_material_style
|
|
571
|
+
data.f_material_unit = this.materials[0].f_material_unit
|
|
572
|
+
data.f_material_number = this.materials[0].f_material_number
|
|
573
|
+
data.f_material_code = this.materials[0].f_material_code
|
|
574
|
+
data.f_bjq_sid = this.materials[0].f_bjq_sid
|
|
575
|
+
data.f_userinfo_code=this.materials[0].f_userinfo_code
|
|
576
|
+
|
|
577
|
+
//报警器流程 设备编号检验
|
|
578
|
+
await this.bjqCheck()
|
|
579
|
+
if (this.bjqChecklag.length > 0){
|
|
580
|
+
return
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
let http = new HttpResetClass()
|
|
584
|
+
let res = await http.load(
|
|
585
|
+
'POST',
|
|
586
|
+
`${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_apply`,
|
|
587
|
+
data
|
|
588
|
+
)
|
|
589
|
+
this.closeMaterials()
|
|
590
|
+
},
|
|
591
|
+
sycronizedCode(index,val){
|
|
592
|
+
console.log("看看:",index,val)
|
|
593
|
+
this.materials[index].f_material_code = val
|
|
594
|
+
},
|
|
595
|
+
closeMaterials() {
|
|
596
|
+
this.getOnetoManyData()
|
|
597
|
+
this.showMaterialModal = false
|
|
598
|
+
},
|
|
599
|
+
async bjqCheck(){
|
|
600
|
+
//报警器设备型号校验
|
|
601
|
+
this.bjqChecklag = [] //初始化
|
|
602
|
+
if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
|
|
603
|
+
let bjqinfo = {
|
|
604
|
+
f_material_name : "",
|
|
605
|
+
f_bjq_sid: ""
|
|
606
|
+
}
|
|
607
|
+
for (const bjqinfoElement of this.materials) {
|
|
608
|
+
bjqinfo.f_bjq_sid = bjqinfoElement.f_bjq_sid
|
|
609
|
+
bjqinfo.f_material_name = bjqinfoElement.f_material_name
|
|
610
|
+
if (bjqinfo.f_material_name.substr(0,3) === '报警器'){
|
|
611
|
+
let http = new HttpResetClass()
|
|
612
|
+
let res = await http.load(
|
|
613
|
+
'POST',
|
|
614
|
+
// `/rs/logic/bjqcheck`,
|
|
615
|
+
`${this.$androidUtil.getProxyUrl()}/ncc/rs/logic/bjqcheck`,
|
|
616
|
+
bjqinfo
|
|
617
|
+
)
|
|
618
|
+
if (res.data.code != 200){
|
|
619
|
+
this.bjqChecklag.push(res.data.code)
|
|
620
|
+
//this.$showMessage(res.data.msg)
|
|
621
|
+
Vue.showAlert(res.data.msg, 'danger', 6000)
|
|
622
|
+
return
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
</script>
|
|
632
|
+
|
|
633
|
+
<style scoped>
|
|
634
|
+
|
|
635
|
+
</style>
|