apply-clients 3.5.4-95 → 3.5.4-96
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 +11 -6
- package/package.json +1 -1
- package/src/apply.js +139 -139
- package/src/components/android/AppCheckTakePic.vue +168 -168
- package/src/components/android/AppTakePic.vue +182 -182
- package/src/components/android/Process/AppServiceControl.vue +1755 -1755
- package/src/components/product/Material/MaterialDetailed.vue +268 -268
- package/src/components/product/PcZhihuanManagement.vue +160 -160
- package/src/components/product/Print/BuildOrder/buildOrderList.vue +339 -339
- package/src/components/product/Process/Processes/selectApply.vue +251 -251
- package/src/components/product/Process/Processes/selectBcakApply.vue +250 -250
- package/src/filiale/fugou/android/AppAddMaterialScience.vue +440 -440
- package/src/filiale/fugou/android/AppAddReplacement.vue +341 -341
- package/src/filiale/fugou/android/AppChargeManagement.vue +739 -739
- package/src/filiale/fugou/android/AppDevicesManagement.vue +519 -519
- package/src/filiale/fugou/android/AppInstallationDetails.vue +541 -541
- package/src/filiale/fugou/android/AppServiceControl.vue +1845 -1845
- package/src/filiale/fugou/android/AppZhihuanManagement.vue +230 -230
- package/src/filiale/fugou/android/printCharge.vue +162 -162
- package/src/filiale/fugou/android.js +16 -16
- package/src/filiale/fugou/pc/AddReplacement.vue +340 -340
- package/src/filiale/fugou/pc/ApplyChargeList.vue +480 -480
- package/src/filiale/fugou/pc/ExplorationSelect.vue +525 -525
- package/src/filiale/fugou/pc/ServiceControl.vue +1705 -1705
- package/src/filiale/fugou/pc/ServiceView.vue +941 -941
- package/src/filiale/fugou/pc/addMaterialScience.vue +481 -481
- package/src/filiale/fugou/pc/addressAndUserinfoManagement.vue +216 -216
- package/src/filiale/fugou/pc/chargeReport.vue +143 -143
- package/src/filiale/fugou/pc/devicesManagement.vue +483 -483
- package/src/filiale/fugou/pc/printChargepc.vue +148 -148
- package/src/filiale/fugou/pc.js +16 -16
- package/src/filiale/gongyi/android/AppAddMaterialScience.vue +493 -493
- package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -686
- package/src/filiale/qianneng/android/AppServiceView.vue +795 -795
- package/src/filiale/qianneng/android.js +15 -15
- package/src/filiale/qianneng/pc/ApplyMaterialDetailed.vue +261 -261
- package/src/filiale/qianneng/pc/Applydetail.vue +378 -378
- package/src/filiale/qianneng/pc/InstallFunction.vue +188 -188
- package/src/filiale/qianneng/pc.js +29 -29
- package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +520 -520
- package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +645 -645
- package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1703 -1703
- package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +547 -547
- package/src/filiale/yangchunboneng/pc/ServiceControl.vue +2112 -2112
- package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +605 -605
- package/src/filiale/yangchunboneng/pc/SupervisoryListNew.vue +683 -683
- package/src/filiale/yangchunboneng/pc/chargeManagement.vue +1052 -1052
- package/src/filiale/yangchunboneng/pc/devicesManagement.vue +574 -574
- package/src/main.js +4 -3
- package/src/test/SessionTestServlet.java +0 -69
- package/webapp/WEB-INF/web.xml +0 -52
- package/webapp/session-test.jsp +0 -59
|
@@ -1,341 +1,341 @@
|
|
|
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" >
|
|
11
|
-
<button v-if="$parent.$parent.mark === 0" type="button" class="btn btn-primary" @click="$parent.$parent.openMaterialModal()">添加
|
|
12
|
-
</button>
|
|
13
|
-
</th>
|
|
14
|
-
</tr>
|
|
15
|
-
</template>
|
|
16
|
-
<template partial='body'>
|
|
17
|
-
<tr>
|
|
18
|
-
<td style="text-align: center;">
|
|
19
|
-
<nobr>{{row.f_operator}}</nobr>
|
|
20
|
-
</td>
|
|
21
|
-
<td style="text-align: center;">
|
|
22
|
-
<nobr>{{row.f_operation_date}}</nobr>
|
|
23
|
-
</td>
|
|
24
|
-
<td style="text-align: center;">
|
|
25
|
-
<nobr>{{row.f_content}}</nobr>
|
|
26
|
-
</td>
|
|
27
|
-
<td style="text-align: center;">
|
|
28
|
-
<nobr>
|
|
29
|
-
{{$parent.$parent.toArry(row.f_content_value)}}
|
|
30
|
-
</nobr>
|
|
31
|
-
</td>
|
|
32
|
-
<td style="text-align: center;">
|
|
33
|
-
<button v-if="$parent.$parent.mark === 0" type="button" class="button_delete button_spacing" @click="$parent.$parent.deletelogs(row)">删除
|
|
34
|
-
</button>
|
|
35
|
-
</td>
|
|
36
|
-
</tr>
|
|
37
|
-
</template>
|
|
38
|
-
</data-grid>
|
|
39
|
-
<modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
|
|
40
|
-
:backdrop="false" :title="title">
|
|
41
|
-
<header slot="modal-header" class="modal-header">
|
|
42
|
-
<button type="button" class="close" @click="closeMaterials"><span>×</span></button>
|
|
43
|
-
<h4 class="modal-title">{{title}}</h4>
|
|
44
|
-
</header>
|
|
45
|
-
<article slot="modal-body" class="modal-body clearfix">
|
|
46
|
-
<div class="form-group col-sm-6">
|
|
47
|
-
<label class="col-sm-4 control-label">设备:</label>
|
|
48
|
-
<div class="col-sm-8">
|
|
49
|
-
<input-select
|
|
50
|
-
class="select select_list"
|
|
51
|
-
:value.sync="device"
|
|
52
|
-
v-model="device"
|
|
53
|
-
:options="logOptions"
|
|
54
|
-
:disable="mark === 1"
|
|
55
|
-
:valueSingle="true"></input-select>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
<div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
|
|
59
|
-
<div class="panel-body">
|
|
60
|
-
<div class="row">
|
|
61
|
-
<div class="form-group col-sm-6">
|
|
62
|
-
<label class="col-sm-4 control-label">内容:</label>
|
|
63
|
-
<div class="col-sm-8">
|
|
64
|
-
<input-select
|
|
65
|
-
class="select select_list"
|
|
66
|
-
:value.sync="item.f_content"
|
|
67
|
-
v-model="item.f_content"
|
|
68
|
-
:options="Options"
|
|
69
|
-
:disable="mark === 1"
|
|
70
|
-
:valueSingle="true"></input-select>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
<div class="form-group col-sm-6">
|
|
74
|
-
<label class="col-sm-4 control-label">值:</label>
|
|
75
|
-
<div class="col-sm-8">
|
|
76
|
-
<input
|
|
77
|
-
class="form-control"
|
|
78
|
-
v-model="item.f_content_value"
|
|
79
|
-
:value.sync="item.f_content_value"
|
|
80
|
-
rows="3"
|
|
81
|
-
:readonly="mark === 1"
|
|
82
|
-
></input>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
<div v-if="mark !== 1 && materials.length > 1" class="form-group col-sm-12 text-center">
|
|
86
|
-
<button type="button" class="btn btn-danger" @click="removeMaterial(i)">
|
|
87
|
-
<i class="fa fa-minus"></i> 移除
|
|
88
|
-
</button>
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
<div v-if="mark !== 1" class="form-group col-sm-12 text-center">
|
|
94
|
-
<button type="button" class="btn btn-success" @click="addMaterial()">
|
|
95
|
-
<i class="fa fa-plus"></i> 添加
|
|
96
|
-
</button>
|
|
97
|
-
</div>
|
|
98
|
-
</article>
|
|
99
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
100
|
-
<template v-if="mark!== 1">
|
|
101
|
-
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addlogs()"
|
|
102
|
-
:disabled="!$v.valid">确认
|
|
103
|
-
</button>
|
|
104
|
-
</template>
|
|
105
|
-
</footer>
|
|
106
|
-
</modal>
|
|
107
|
-
</div>
|
|
108
|
-
</template>
|
|
109
|
-
|
|
110
|
-
<script>
|
|
111
|
-
import {HttpResetClass} from 'vue-client'
|
|
112
|
-
import Vue from "vue";
|
|
113
|
-
export default {
|
|
114
|
-
name: 'replacement',
|
|
115
|
-
props: {
|
|
116
|
-
selectdata: {
|
|
117
|
-
type: Object
|
|
118
|
-
},
|
|
119
|
-
mark: {
|
|
120
|
-
type: Number,
|
|
121
|
-
default: 0
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
data() {
|
|
125
|
-
return {
|
|
126
|
-
onetomany: {
|
|
127
|
-
rows: []
|
|
128
|
-
},
|
|
129
|
-
logOptions: this.$appdata.getParam('置换设备'),
|
|
130
|
-
Options: this.$appdata.getParam('置换内容'),
|
|
131
|
-
device:'',
|
|
132
|
-
title: '新增',
|
|
133
|
-
deviceArry:[],
|
|
134
|
-
showMaterialModal: false,
|
|
135
|
-
materials: [
|
|
136
|
-
{
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
],
|
|
140
|
-
meterialOptions: [],
|
|
141
|
-
row: {},
|
|
142
|
-
bjqChecklag:[],
|
|
143
|
-
fmaterialname:{}
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
ready() {
|
|
147
|
-
this.getOnetoManyData()
|
|
148
|
-
},
|
|
149
|
-
methods: {
|
|
150
|
-
toArry(row){
|
|
151
|
-
//将row放进数组中
|
|
152
|
-
if (!row) return "无";
|
|
153
|
-
try {
|
|
154
|
-
// 添加方括号使其成为有效的JSON数组
|
|
155
|
-
const jsonStr = '[' + row + ']';
|
|
156
|
-
// 尝试解析字符串为JSON数组
|
|
157
|
-
const jsonArray = JSON.parse(jsonStr);
|
|
158
|
-
// 将解析后的数据保存到deviceArry中
|
|
159
|
-
this.deviceArry = jsonArray;
|
|
160
|
-
|
|
161
|
-
// 格式化显示数据
|
|
162
|
-
let result = '';
|
|
163
|
-
for (let i = 0; i < this.deviceArry.length; i++) {
|
|
164
|
-
const item = this.deviceArry[i];
|
|
165
|
-
result += `${item.f_content}:${item.f_content_value}`;
|
|
166
|
-
if (i < this.deviceArry.length - 1) {
|
|
167
|
-
result += ',';
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
return result;
|
|
171
|
-
} catch (err) {
|
|
172
|
-
console.error('解析JSON数据失败:', err);
|
|
173
|
-
return "无";
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
look(row){
|
|
177
|
-
this.title = '查看'
|
|
178
|
-
this.materials = [
|
|
179
|
-
{
|
|
180
|
-
id: row.id,
|
|
181
|
-
f_log_type:row.f_log_type,
|
|
182
|
-
f_log_content:row.f_log_content
|
|
183
|
-
}
|
|
184
|
-
],
|
|
185
|
-
this.showMaterialModal = true
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
changelogs(){
|
|
189
|
-
let http = new HttpResetClass()
|
|
190
|
-
let data = {
|
|
191
|
-
data: {
|
|
192
|
-
id: this.materials[0].id,
|
|
193
|
-
f_process_id:this.selectdata.f_process_id,
|
|
194
|
-
f_log_type:this.materials[0].f_log_type,
|
|
195
|
-
f_log_content:this.materials[0].f_log_content,
|
|
196
|
-
user:this.$login.f
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
http.load(
|
|
200
|
-
'POST',
|
|
201
|
-
`/rs/logic/addLogs`,
|
|
202
|
-
data,
|
|
203
|
-
{resolveMsg: '修改成功', rejectMsg: '添加失败'}
|
|
204
|
-
).then(res => {
|
|
205
|
-
this.closeMaterials()
|
|
206
|
-
})
|
|
207
|
-
},
|
|
208
|
-
addlogs(){
|
|
209
|
-
let value=[]
|
|
210
|
-
let http = new HttpResetClass()
|
|
211
|
-
this.materials.forEach(material => {
|
|
212
|
-
let obj={}
|
|
213
|
-
obj.f_content=material.f_content
|
|
214
|
-
obj.f_content_value=material.f_content_value
|
|
215
|
-
//obj转为字符串
|
|
216
|
-
obj = JSON.stringify(obj)
|
|
217
|
-
value.push(obj)
|
|
218
|
-
});
|
|
219
|
-
let s = {
|
|
220
|
-
f_process_id: this.selectdata.f_process_id,
|
|
221
|
-
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
222
|
-
f_content_value:`${value}` ,
|
|
223
|
-
f_content: this.device,
|
|
224
|
-
f_operator: Vue.user.name,
|
|
225
|
-
f_operator_id: Vue.user.id
|
|
226
|
-
}
|
|
227
|
-
let data = {
|
|
228
|
-
tableName: 't_replacement',
|
|
229
|
-
model: s
|
|
230
|
-
}
|
|
231
|
-
http.load(
|
|
232
|
-
'POST',
|
|
233
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/entitySingleTable`,
|
|
234
|
-
data,
|
|
235
|
-
{resolveMsg: null, rejectMsg: '添加失败'}
|
|
236
|
-
).then(res => {
|
|
237
|
-
this.getOnetoManyData()
|
|
238
|
-
this.showMaterialModal=false
|
|
239
|
-
})
|
|
240
|
-
},
|
|
241
|
-
deletelogs(row){
|
|
242
|
-
let http = new HttpResetClass()
|
|
243
|
-
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
|
244
|
-
if (res === 'confirm') {
|
|
245
|
-
let data = {
|
|
246
|
-
tableName:'t_replacement',
|
|
247
|
-
id:row.id
|
|
248
|
-
}
|
|
249
|
-
http.load(
|
|
250
|
-
'POST',
|
|
251
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/delentitySingleTable`,
|
|
252
|
-
data,
|
|
253
|
-
{resolveMsg: '删除成功', rejectMsg: '删除失败'}
|
|
254
|
-
).then(res => {
|
|
255
|
-
this.getOnetoManyData()
|
|
256
|
-
})
|
|
257
|
-
}
|
|
258
|
-
})
|
|
259
|
-
},
|
|
260
|
-
async getOnetoManyData () {
|
|
261
|
-
let http = new HttpResetClass()
|
|
262
|
-
let data = {
|
|
263
|
-
tablename: `t_replacement`,
|
|
264
|
-
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
265
|
-
}
|
|
266
|
-
let res = await http.load(
|
|
267
|
-
'POST',
|
|
268
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
|
|
269
|
-
{data: data},
|
|
270
|
-
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
271
|
-
)
|
|
272
|
-
this.onetomany.rows = res.data
|
|
273
|
-
},
|
|
274
|
-
async openMaterialModal() {
|
|
275
|
-
this.title = '新增'
|
|
276
|
-
this.materials = [
|
|
277
|
-
{
|
|
278
|
-
f_devices: '',
|
|
279
|
-
f_content: '',
|
|
280
|
-
f_content_value: ''
|
|
281
|
-
}
|
|
282
|
-
];
|
|
283
|
-
this.showMaterialModal = true
|
|
284
|
-
},
|
|
285
|
-
|
|
286
|
-
closeMaterials() {
|
|
287
|
-
this.getOnetoManyData()
|
|
288
|
-
this.showMaterialModal = false
|
|
289
|
-
},
|
|
290
|
-
removeMaterial(index) {
|
|
291
|
-
if (this.materials.length > 1) {
|
|
292
|
-
this.materials.splice(index, 1);
|
|
293
|
-
} else {
|
|
294
|
-
this.$showMessage('至少需要保留一组数据');
|
|
295
|
-
}
|
|
296
|
-
},
|
|
297
|
-
addMaterial() {
|
|
298
|
-
// 获取最后一个材料的设备值,如果存在的话
|
|
299
|
-
const lastDevice = this.materials.length > 0 ? this.materials[this.materials.length - 1].f_devices : '';
|
|
300
|
-
|
|
301
|
-
this.materials.push({
|
|
302
|
-
f_devices: lastDevice, // 复制上一个设备的值
|
|
303
|
-
f_content: '',
|
|
304
|
-
f_content_value: ''
|
|
305
|
-
});
|
|
306
|
-
},
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
</script>
|
|
311
|
-
|
|
312
|
-
<style scoped>
|
|
313
|
-
.panel-info {
|
|
314
|
-
border: 1px solid #bce8f1;
|
|
315
|
-
margin-bottom: 15px;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.panel-heading {
|
|
319
|
-
background-color: #d9edf7;
|
|
320
|
-
border-bottom: 1px solid #bce8f1;
|
|
321
|
-
color: #31708f;
|
|
322
|
-
padding: 10px 15px;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
.panel-body {
|
|
326
|
-
padding: 15px;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
.form-group {
|
|
330
|
-
margin-bottom: 15px;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
.btn-success {
|
|
334
|
-
margin-top: 10px;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.modal-body {
|
|
338
|
-
max-height: 500px;
|
|
339
|
-
overflow-y: auto;
|
|
340
|
-
}
|
|
341
|
-
</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" >
|
|
11
|
+
<button v-if="$parent.$parent.mark === 0" type="button" class="btn btn-primary" @click="$parent.$parent.openMaterialModal()">添加
|
|
12
|
+
</button>
|
|
13
|
+
</th>
|
|
14
|
+
</tr>
|
|
15
|
+
</template>
|
|
16
|
+
<template partial='body'>
|
|
17
|
+
<tr>
|
|
18
|
+
<td style="text-align: center;">
|
|
19
|
+
<nobr>{{row.f_operator}}</nobr>
|
|
20
|
+
</td>
|
|
21
|
+
<td style="text-align: center;">
|
|
22
|
+
<nobr>{{row.f_operation_date}}</nobr>
|
|
23
|
+
</td>
|
|
24
|
+
<td style="text-align: center;">
|
|
25
|
+
<nobr>{{row.f_content}}</nobr>
|
|
26
|
+
</td>
|
|
27
|
+
<td style="text-align: center;">
|
|
28
|
+
<nobr>
|
|
29
|
+
{{$parent.$parent.toArry(row.f_content_value)}}
|
|
30
|
+
</nobr>
|
|
31
|
+
</td>
|
|
32
|
+
<td style="text-align: center;">
|
|
33
|
+
<button v-if="$parent.$parent.mark === 0" type="button" class="button_delete button_spacing" @click="$parent.$parent.deletelogs(row)">删除
|
|
34
|
+
</button>
|
|
35
|
+
</td>
|
|
36
|
+
</tr>
|
|
37
|
+
</template>
|
|
38
|
+
</data-grid>
|
|
39
|
+
<modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
|
|
40
|
+
:backdrop="false" :title="title">
|
|
41
|
+
<header slot="modal-header" class="modal-header">
|
|
42
|
+
<button type="button" class="close" @click="closeMaterials"><span>×</span></button>
|
|
43
|
+
<h4 class="modal-title">{{title}}</h4>
|
|
44
|
+
</header>
|
|
45
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
46
|
+
<div class="form-group col-sm-6">
|
|
47
|
+
<label class="col-sm-4 control-label">设备:</label>
|
|
48
|
+
<div class="col-sm-8">
|
|
49
|
+
<input-select
|
|
50
|
+
class="select select_list"
|
|
51
|
+
:value.sync="device"
|
|
52
|
+
v-model="device"
|
|
53
|
+
:options="logOptions"
|
|
54
|
+
:disable="mark === 1"
|
|
55
|
+
:valueSingle="true"></input-select>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
<div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
|
|
59
|
+
<div class="panel-body">
|
|
60
|
+
<div class="row">
|
|
61
|
+
<div class="form-group col-sm-6">
|
|
62
|
+
<label class="col-sm-4 control-label">内容:</label>
|
|
63
|
+
<div class="col-sm-8">
|
|
64
|
+
<input-select
|
|
65
|
+
class="select select_list"
|
|
66
|
+
:value.sync="item.f_content"
|
|
67
|
+
v-model="item.f_content"
|
|
68
|
+
:options="Options"
|
|
69
|
+
:disable="mark === 1"
|
|
70
|
+
:valueSingle="true"></input-select>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="form-group col-sm-6">
|
|
74
|
+
<label class="col-sm-4 control-label">值:</label>
|
|
75
|
+
<div class="col-sm-8">
|
|
76
|
+
<input
|
|
77
|
+
class="form-control"
|
|
78
|
+
v-model="item.f_content_value"
|
|
79
|
+
:value.sync="item.f_content_value"
|
|
80
|
+
rows="3"
|
|
81
|
+
:readonly="mark === 1"
|
|
82
|
+
></input>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
<div v-if="mark !== 1 && materials.length > 1" class="form-group col-sm-12 text-center">
|
|
86
|
+
<button type="button" class="btn btn-danger" @click="removeMaterial(i)">
|
|
87
|
+
<i class="fa fa-minus"></i> 移除
|
|
88
|
+
</button>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
<div v-if="mark !== 1" class="form-group col-sm-12 text-center">
|
|
94
|
+
<button type="button" class="btn btn-success" @click="addMaterial()">
|
|
95
|
+
<i class="fa fa-plus"></i> 添加
|
|
96
|
+
</button>
|
|
97
|
+
</div>
|
|
98
|
+
</article>
|
|
99
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
100
|
+
<template v-if="mark!== 1">
|
|
101
|
+
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addlogs()"
|
|
102
|
+
:disabled="!$v.valid">确认
|
|
103
|
+
</button>
|
|
104
|
+
</template>
|
|
105
|
+
</footer>
|
|
106
|
+
</modal>
|
|
107
|
+
</div>
|
|
108
|
+
</template>
|
|
109
|
+
|
|
110
|
+
<script>
|
|
111
|
+
import {HttpResetClass} from 'vue-client'
|
|
112
|
+
import Vue from "vue";
|
|
113
|
+
export default {
|
|
114
|
+
name: 'replacement',
|
|
115
|
+
props: {
|
|
116
|
+
selectdata: {
|
|
117
|
+
type: Object
|
|
118
|
+
},
|
|
119
|
+
mark: {
|
|
120
|
+
type: Number,
|
|
121
|
+
default: 0
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
data() {
|
|
125
|
+
return {
|
|
126
|
+
onetomany: {
|
|
127
|
+
rows: []
|
|
128
|
+
},
|
|
129
|
+
logOptions: this.$appdata.getParam('置换设备'),
|
|
130
|
+
Options: this.$appdata.getParam('置换内容'),
|
|
131
|
+
device:'',
|
|
132
|
+
title: '新增',
|
|
133
|
+
deviceArry:[],
|
|
134
|
+
showMaterialModal: false,
|
|
135
|
+
materials: [
|
|
136
|
+
{
|
|
137
|
+
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
meterialOptions: [],
|
|
141
|
+
row: {},
|
|
142
|
+
bjqChecklag:[],
|
|
143
|
+
fmaterialname:{}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
ready() {
|
|
147
|
+
this.getOnetoManyData()
|
|
148
|
+
},
|
|
149
|
+
methods: {
|
|
150
|
+
toArry(row){
|
|
151
|
+
//将row放进数组中
|
|
152
|
+
if (!row) return "无";
|
|
153
|
+
try {
|
|
154
|
+
// 添加方括号使其成为有效的JSON数组
|
|
155
|
+
const jsonStr = '[' + row + ']';
|
|
156
|
+
// 尝试解析字符串为JSON数组
|
|
157
|
+
const jsonArray = JSON.parse(jsonStr);
|
|
158
|
+
// 将解析后的数据保存到deviceArry中
|
|
159
|
+
this.deviceArry = jsonArray;
|
|
160
|
+
|
|
161
|
+
// 格式化显示数据
|
|
162
|
+
let result = '';
|
|
163
|
+
for (let i = 0; i < this.deviceArry.length; i++) {
|
|
164
|
+
const item = this.deviceArry[i];
|
|
165
|
+
result += `${item.f_content}:${item.f_content_value}`;
|
|
166
|
+
if (i < this.deviceArry.length - 1) {
|
|
167
|
+
result += ',';
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return result;
|
|
171
|
+
} catch (err) {
|
|
172
|
+
console.error('解析JSON数据失败:', err);
|
|
173
|
+
return "无";
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
look(row){
|
|
177
|
+
this.title = '查看'
|
|
178
|
+
this.materials = [
|
|
179
|
+
{
|
|
180
|
+
id: row.id,
|
|
181
|
+
f_log_type:row.f_log_type,
|
|
182
|
+
f_log_content:row.f_log_content
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
this.showMaterialModal = true
|
|
186
|
+
},
|
|
187
|
+
|
|
188
|
+
changelogs(){
|
|
189
|
+
let http = new HttpResetClass()
|
|
190
|
+
let data = {
|
|
191
|
+
data: {
|
|
192
|
+
id: this.materials[0].id,
|
|
193
|
+
f_process_id:this.selectdata.f_process_id,
|
|
194
|
+
f_log_type:this.materials[0].f_log_type,
|
|
195
|
+
f_log_content:this.materials[0].f_log_content,
|
|
196
|
+
user:this.$login.f
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
http.load(
|
|
200
|
+
'POST',
|
|
201
|
+
`/rs/logic/addLogs`,
|
|
202
|
+
data,
|
|
203
|
+
{resolveMsg: '修改成功', rejectMsg: '添加失败'}
|
|
204
|
+
).then(res => {
|
|
205
|
+
this.closeMaterials()
|
|
206
|
+
})
|
|
207
|
+
},
|
|
208
|
+
addlogs(){
|
|
209
|
+
let value=[]
|
|
210
|
+
let http = new HttpResetClass()
|
|
211
|
+
this.materials.forEach(material => {
|
|
212
|
+
let obj={}
|
|
213
|
+
obj.f_content=material.f_content
|
|
214
|
+
obj.f_content_value=material.f_content_value
|
|
215
|
+
//obj转为字符串
|
|
216
|
+
obj = JSON.stringify(obj)
|
|
217
|
+
value.push(obj)
|
|
218
|
+
});
|
|
219
|
+
let s = {
|
|
220
|
+
f_process_id: this.selectdata.f_process_id,
|
|
221
|
+
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
222
|
+
f_content_value:`${value}` ,
|
|
223
|
+
f_content: this.device,
|
|
224
|
+
f_operator: Vue.user.name,
|
|
225
|
+
f_operator_id: Vue.user.id
|
|
226
|
+
}
|
|
227
|
+
let data = {
|
|
228
|
+
tableName: 't_replacement',
|
|
229
|
+
model: s
|
|
230
|
+
}
|
|
231
|
+
http.load(
|
|
232
|
+
'POST',
|
|
233
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/entitySingleTable`,
|
|
234
|
+
data,
|
|
235
|
+
{resolveMsg: null, rejectMsg: '添加失败'}
|
|
236
|
+
).then(res => {
|
|
237
|
+
this.getOnetoManyData()
|
|
238
|
+
this.showMaterialModal=false
|
|
239
|
+
})
|
|
240
|
+
},
|
|
241
|
+
deletelogs(row){
|
|
242
|
+
let http = new HttpResetClass()
|
|
243
|
+
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
|
244
|
+
if (res === 'confirm') {
|
|
245
|
+
let data = {
|
|
246
|
+
tableName:'t_replacement',
|
|
247
|
+
id:row.id
|
|
248
|
+
}
|
|
249
|
+
http.load(
|
|
250
|
+
'POST',
|
|
251
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/delentitySingleTable`,
|
|
252
|
+
data,
|
|
253
|
+
{resolveMsg: '删除成功', rejectMsg: '删除失败'}
|
|
254
|
+
).then(res => {
|
|
255
|
+
this.getOnetoManyData()
|
|
256
|
+
})
|
|
257
|
+
}
|
|
258
|
+
})
|
|
259
|
+
},
|
|
260
|
+
async getOnetoManyData () {
|
|
261
|
+
let http = new HttpResetClass()
|
|
262
|
+
let data = {
|
|
263
|
+
tablename: `t_replacement`,
|
|
264
|
+
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
265
|
+
}
|
|
266
|
+
let res = await http.load(
|
|
267
|
+
'POST',
|
|
268
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
|
|
269
|
+
{data: data},
|
|
270
|
+
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
271
|
+
)
|
|
272
|
+
this.onetomany.rows = res.data
|
|
273
|
+
},
|
|
274
|
+
async openMaterialModal() {
|
|
275
|
+
this.title = '新增'
|
|
276
|
+
this.materials = [
|
|
277
|
+
{
|
|
278
|
+
f_devices: '',
|
|
279
|
+
f_content: '',
|
|
280
|
+
f_content_value: ''
|
|
281
|
+
}
|
|
282
|
+
];
|
|
283
|
+
this.showMaterialModal = true
|
|
284
|
+
},
|
|
285
|
+
|
|
286
|
+
closeMaterials() {
|
|
287
|
+
this.getOnetoManyData()
|
|
288
|
+
this.showMaterialModal = false
|
|
289
|
+
},
|
|
290
|
+
removeMaterial(index) {
|
|
291
|
+
if (this.materials.length > 1) {
|
|
292
|
+
this.materials.splice(index, 1);
|
|
293
|
+
} else {
|
|
294
|
+
this.$showMessage('至少需要保留一组数据');
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
addMaterial() {
|
|
298
|
+
// 获取最后一个材料的设备值,如果存在的话
|
|
299
|
+
const lastDevice = this.materials.length > 0 ? this.materials[this.materials.length - 1].f_devices : '';
|
|
300
|
+
|
|
301
|
+
this.materials.push({
|
|
302
|
+
f_devices: lastDevice, // 复制上一个设备的值
|
|
303
|
+
f_content: '',
|
|
304
|
+
f_content_value: ''
|
|
305
|
+
});
|
|
306
|
+
},
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
</script>
|
|
311
|
+
|
|
312
|
+
<style scoped>
|
|
313
|
+
.panel-info {
|
|
314
|
+
border: 1px solid #bce8f1;
|
|
315
|
+
margin-bottom: 15px;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.panel-heading {
|
|
319
|
+
background-color: #d9edf7;
|
|
320
|
+
border-bottom: 1px solid #bce8f1;
|
|
321
|
+
color: #31708f;
|
|
322
|
+
padding: 10px 15px;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.panel-body {
|
|
326
|
+
padding: 15px;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.form-group {
|
|
330
|
+
margin-bottom: 15px;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.btn-success {
|
|
334
|
+
margin-top: 10px;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.modal-body {
|
|
338
|
+
max-height: 500px;
|
|
339
|
+
overflow-y: auto;
|
|
340
|
+
}
|
|
341
|
+
</style>
|