|
@@ -43,7 +43,10 @@ |
|
@@ -43,7 +43,10 @@ |
43
|
</view>
|
43
|
</view>
|
44
|
<view class="yiqihead">
|
44
|
<view class="yiqihead">
|
45
|
<view class="yiqiheadleft">复核数量</view>
|
45
|
<view class="yiqiheadleft">复核数量</view>
|
46
|
- <view class="yiqiheadright">{{equipment_log.fuhe}}</view>
|
46
|
+ <view class="yiqiheadright">
|
|
|
47
|
+ <input type="number" placeplaceholder="请输入复核数量" v-model="fuhe" placeholder-class="fuheshuliangname" />
|
|
|
48
|
+ <!-- {{}} -->
|
|
|
49
|
+ </view>
|
47
|
</view>
|
50
|
</view>
|
48
|
</view>
|
51
|
</view>
|
49
|
<view class="yewu">
|
52
|
<view class="yewu">
|
|
@@ -98,7 +101,7 @@ |
|
@@ -98,7 +101,7 @@ |
98
|
<view class="imgbox">
|
101
|
<view class="imgbox">
|
99
|
|
102
|
|
100
|
<view v-for="(item,index) in imglist" :key="index" class="imgshang">
|
103
|
<view v-for="(item,index) in imglist" :key="index" class="imgshang">
|
101
|
- <view class="upload" >
|
104
|
+ <view class="upload">
|
102
|
<image :src="item" @click="viewimgtu(index)"></image>
|
105
|
<image :src="item" @click="viewimgtu(index)"></image>
|
103
|
<view class="chahao" @click="del(index)">
|
106
|
<view class="chahao" @click="del(index)">
|
104
|
<image src="../../static/img/chahao3.png"></image>
|
107
|
<image src="../../static/img/chahao3.png"></image>
|
|
@@ -122,7 +125,7 @@ |
|
@@ -122,7 +125,7 @@ |
122
|
<view class="imgbox">
|
125
|
<view class="imgbox">
|
123
|
|
126
|
|
124
|
<view v-for="(item,index) in imglist" :key="index" class="imgshang">
|
127
|
<view v-for="(item,index) in imglist" :key="index" class="imgshang">
|
125
|
- <view class="upload" >
|
128
|
+ <view class="upload">
|
126
|
<image :src="item" @click="viewimgtu(index)"></image>
|
129
|
<image :src="item" @click="viewimgtu(index)"></image>
|
127
|
|
130
|
|
128
|
</view>
|
131
|
</view>
|
|
@@ -132,7 +135,12 @@ |
|
@@ -132,7 +135,12 @@ |
132
|
</view>
|
135
|
</view>
|
133
|
</view>
|
136
|
</view>
|
134
|
|
137
|
|
135
|
- <view class="subshuju" @click="edifenxiangor?set_number:''" v-if="edifenxiangor">提交数据</view>
|
138
|
+ <!-- <view class="subshuju" >提交数据</view> -->
|
|
|
139
|
+
|
|
|
140
|
+ <!-- <view @click="tijiao">提交数据</view> -->
|
|
|
141
|
+ <!-- <view class="subshuju" @click="edifenxiangor?tijiao:''" v-if="edifenxiangor">提交数据{{edifenxiangor}}</view> -->
|
|
|
142
|
+ <view class="subshuju" @click="tijiao" v-if="edifenxiangor">提交数据</view>
|
|
|
143
|
+ <view class="subshuju" v-else>提交数据</view>
|
136
|
<!-- <view class="subshuju" v-else>提交数据</view> -->
|
144
|
<!-- <view class="subshuju" v-else>提交数据</view> -->
|
137
|
<view class="tupianshangchuan" v-if="picshangchuan">图片上传中</view>
|
145
|
<view class="tupianshangchuan" v-if="picshangchuan">图片上传中</view>
|
138
|
|
146
|
|
|
@@ -158,19 +166,20 @@ |
|
@@ -158,19 +166,20 @@ |
158
|
ziduan5: "",
|
166
|
ziduan5: "",
|
159
|
image: [],
|
167
|
image: [],
|
160
|
chuanimg: '/static/img/upload.png',
|
168
|
chuanimg: '/static/img/upload.png',
|
161
|
- imglist:[],
|
|
|
162
|
- number:'',
|
|
|
163
|
- id:'',
|
|
|
164
|
- is_share:0,
|
|
|
165
|
- fenxiangor:true,
|
|
|
166
|
- edifenxiangor:true,
|
|
|
167
|
- picshangchuan:false
|
169
|
+ imglist: [],
|
|
|
170
|
+ number: '',
|
|
|
171
|
+ id: '',
|
|
|
172
|
+ is_share: 0,
|
|
|
173
|
+ fenxiangor: true,
|
|
|
174
|
+ edifenxiangor: true,
|
|
|
175
|
+ picshangchuan: false,
|
|
|
176
|
+ fuhe:''
|
168
|
}
|
177
|
}
|
169
|
},
|
178
|
},
|
170
|
methods: {
|
179
|
methods: {
|
171
|
//选择照片
|
180
|
//选择照片
|
172
|
shoseimg() {
|
181
|
shoseimg() {
|
173
|
- let baseurl=uni.getStorageSync("baseurl")
|
182
|
+ let baseurl = uni.getStorageSync("baseurl")
|
174
|
|
183
|
|
175
|
uni.chooseImage({
|
184
|
uni.chooseImage({
|
176
|
count: 1,
|
185
|
count: 1,
|
|
@@ -179,7 +188,7 @@ |
|
@@ -179,7 +188,7 @@ |
179
|
// sourceType: ['camera'],//拍摄照片
|
188
|
// sourceType: ['camera'],//拍摄照片
|
180
|
// sourceType: '',
|
189
|
// sourceType: '',
|
181
|
success: (chooseImageRes) => {
|
190
|
success: (chooseImageRes) => {
|
182
|
- this.picshangchuan=true
|
191
|
+ this.picshangchuan = true
|
183
|
const tempFilePaths = chooseImageRes.tempFilePaths;
|
192
|
const tempFilePaths = chooseImageRes.tempFilePaths;
|
184
|
|
193
|
|
185
|
let images = tempFilePaths[0]
|
194
|
let images = tempFilePaths[0]
|
|
@@ -190,7 +199,7 @@ |
|
@@ -190,7 +199,7 @@ |
190
|
}
|
199
|
}
|
191
|
|
200
|
|
192
|
uni.uploadFile({
|
201
|
uni.uploadFile({
|
193
|
- url: baseurl+'/api/person/upload',
|
202
|
+ url: baseurl + '/api/person/upload',
|
194
|
filePath: tempFilePaths[0],
|
203
|
filePath: tempFilePaths[0],
|
195
|
name: 'images',
|
204
|
name: 'images',
|
196
|
token: uni.getStorageSync('token'),
|
205
|
token: uni.getStorageSync('token'),
|
|
@@ -198,7 +207,7 @@ |
|
@@ -198,7 +207,7 @@ |
198
|
header: head,
|
207
|
header: head,
|
199
|
// images:images
|
208
|
// images:images
|
200
|
success: (uploadFileRes) => {
|
209
|
success: (uploadFileRes) => {
|
201
|
- this.picshangchuan=false
|
210
|
+ this.picshangchuan = false
|
202
|
|
211
|
|
203
|
let data = JSON.parse(uploadFileRes.data)
|
212
|
let data = JSON.parse(uploadFileRes.data)
|
204
|
this.imglist.push(data.data.src)
|
213
|
this.imglist.push(data.data.src)
|
|
@@ -217,15 +226,15 @@ |
|
@@ -217,15 +226,15 @@ |
217
|
//拍摄照片上传
|
226
|
//拍摄照片上传
|
218
|
|
227
|
|
219
|
camera() {
|
228
|
camera() {
|
220
|
- let baseurl=uni.getStorageSync("baseurl")
|
229
|
+ let baseurl = uni.getStorageSync("baseurl")
|
221
|
uni.chooseImage({
|
230
|
uni.chooseImage({
|
222
|
- count:1,
|
231
|
+ count: 1,
|
223
|
sizeType: ['original', 'compressed'],
|
232
|
sizeType: ['original', 'compressed'],
|
224
|
//sourceType: ['album'], //从相册选择
|
233
|
//sourceType: ['album'], //从相册选择
|
225
|
- sourceType: ['camera'],//拍摄照片
|
234
|
+ sourceType: ['camera'], //拍摄照片
|
226
|
// sourceType: '',
|
235
|
// sourceType: '',
|
227
|
success: (chooseImageRes) => {
|
236
|
success: (chooseImageRes) => {
|
228
|
- this.picshangchuan=true
|
237
|
+ this.picshangchuan = true
|
229
|
const tempFilePaths = chooseImageRes.tempFilePaths;
|
238
|
const tempFilePaths = chooseImageRes.tempFilePaths;
|
230
|
|
239
|
|
231
|
let images = tempFilePaths[0]
|
240
|
let images = tempFilePaths[0]
|
|
@@ -236,7 +245,7 @@ |
|
@@ -236,7 +245,7 @@ |
236
|
}
|
245
|
}
|
237
|
|
246
|
|
238
|
uni.uploadFile({
|
247
|
uni.uploadFile({
|
239
|
- url: baseurl+'/api/person/upload',
|
248
|
+ url: baseurl + '/api/person/upload',
|
240
|
filePath: tempFilePaths[0],
|
249
|
filePath: tempFilePaths[0],
|
241
|
name: 'images',
|
250
|
name: 'images',
|
242
|
token: uni.getStorageSync('token'),
|
251
|
token: uni.getStorageSync('token'),
|
|
@@ -244,7 +253,7 @@ |
|
@@ -244,7 +253,7 @@ |
244
|
header: head,
|
253
|
header: head,
|
245
|
// images:images
|
254
|
// images:images
|
246
|
success: (uploadFileRes) => {
|
255
|
success: (uploadFileRes) => {
|
247
|
- this.picshangchuan=false
|
256
|
+ this.picshangchuan = false
|
248
|
let data = JSON.parse(uploadFileRes.data)
|
257
|
let data = JSON.parse(uploadFileRes.data)
|
249
|
|
258
|
|
250
|
this.imglist.push(data.data.src)
|
259
|
this.imglist.push(data.data.src)
|
|
@@ -261,43 +270,46 @@ |
|
@@ -261,43 +270,46 @@ |
261
|
|
270
|
|
262
|
},
|
271
|
},
|
263
|
//删除图片
|
272
|
//删除图片
|
264
|
- del(index){
|
|
|
265
|
- let newimglist=this.imglist;
|
|
|
266
|
- for(var i=0;i<newimglist.length;i++){
|
|
|
267
|
- if(i==index){
|
|
|
268
|
- newimglist.splice(i,1)
|
273
|
+ del(index) {
|
|
|
274
|
+ let newimglist = this.imglist;
|
|
|
275
|
+ for (var i = 0; i < newimglist.length; i++) {
|
|
|
276
|
+ if (i == index) {
|
|
|
277
|
+ newimglist.splice(i, 1)
|
269
|
}
|
278
|
}
|
270
|
|
279
|
|
271
|
}
|
280
|
}
|
272
|
|
281
|
|
273
|
- this.imglist=newimglist;
|
|
|
274
|
- console.log('9999888',this.imglist)
|
282
|
+ this.imglist = newimglist;
|
|
|
283
|
+ console.log('9999888', this.imglist)
|
275
|
},
|
284
|
},
|
276
|
|
285
|
|
277
|
// 获取数管剩余时间次数
|
286
|
// 获取数管剩余时间次数
|
278
|
|
287
|
|
279
|
// 获取数板信息详情
|
288
|
// 获取数板信息详情
|
|
|
289
|
+
|
|
|
290
|
+
|
280
|
get_shubandetail() {
|
291
|
get_shubandetail() {
|
281
|
- console.log('666666',this.number)
|
292
|
+ console.log('666666', this.number)
|
282
|
let t = this;
|
293
|
let t = this;
|
283
|
let url = "api/equipment/getEquipmentDetail";
|
294
|
let url = "api/equipment/getEquipmentDetail";
|
284
|
let param = {
|
295
|
let param = {
|
285
|
number: this.number,
|
296
|
number: this.number,
|
286
|
equipment_log_id: t.id,
|
297
|
equipment_log_id: t.id,
|
287
|
- is_share:t.is_share
|
298
|
+ is_share: t.is_share
|
288
|
|
299
|
|
289
|
};
|
300
|
};
|
290
|
app.post(url, param, 'post').then(r => {
|
301
|
app.post(url, param, 'post').then(r => {
|
291
|
|
302
|
|
292
|
t.equipment_log = r.equipment_log;
|
303
|
t.equipment_log = r.equipment_log;
|
293
|
- t.biaoshi=r.equipment_log.biaoshi;
|
|
|
294
|
- t.description=r.equipment_log.description;
|
|
|
295
|
- t.ziduan1=r.equipment_log.ziduan1;
|
|
|
296
|
- t.ziduan2=r.equipment_log.ziduan2;
|
|
|
297
|
- t.ziduan3=r.equipment_log.ziduan3;
|
|
|
298
|
- t.ziduan4=r.equipment_log.ziduan4;
|
|
|
299
|
- t.ziduan5=r.equipment_log.ziduan5;
|
|
|
300
|
- t.imglist=r.equipment_log.images
|
304
|
+ t.fuhe=r.equipment_log.fuhe
|
|
|
305
|
+ t.biaoshi = r.equipment_log.biaoshi;
|
|
|
306
|
+ t.description = r.equipment_log.description;
|
|
|
307
|
+ t.ziduan1 = r.equipment_log.ziduan1;
|
|
|
308
|
+ t.ziduan2 = r.equipment_log.ziduan2;
|
|
|
309
|
+ t.ziduan3 = r.equipment_log.ziduan3;
|
|
|
310
|
+ t.ziduan4 = r.equipment_log.ziduan4;
|
|
|
311
|
+ t.ziduan5 = r.equipment_log.ziduan5;
|
|
|
312
|
+ t.imglist = r.equipment_log.images
|
301
|
|
313
|
|
302
|
|
314
|
|
303
|
}).catch(err => {
|
315
|
}).catch(err => {
|
|
@@ -305,22 +317,22 @@ |
|
@@ -305,22 +317,22 @@ |
305
|
})
|
317
|
})
|
306
|
},
|
318
|
},
|
307
|
// 提交数据
|
319
|
// 提交数据
|
308
|
- set_number() {
|
320
|
+ tijiao() {
|
309
|
console.log(123)
|
321
|
console.log(123)
|
310
|
let t = this;
|
322
|
let t = this;
|
311
|
|
323
|
|
312
|
- if (this.imglist.length == 0) {
|
|
|
313
|
- uni.showToast({
|
|
|
314
|
- title: '请上传相关图片',
|
|
|
315
|
- icon: 'none'
|
|
|
316
|
- })
|
|
|
317
|
- return false
|
|
|
318
|
- }
|
324
|
+ // if (this.imglist.length == 0) {
|
|
|
325
|
+ // uni.showToast({
|
|
|
326
|
+ // title: '请上传相关图片',
|
|
|
327
|
+ // icon: 'none'
|
|
|
328
|
+ // })
|
|
|
329
|
+ // return false
|
|
|
330
|
+ // }
|
319
|
let url = "api/equipment/setEquipmentLog";
|
331
|
let url = "api/equipment/setEquipmentLog";
|
320
|
let param = {
|
332
|
let param = {
|
321
|
number: t.equipment_log.number,
|
333
|
number: t.equipment_log.number,
|
322
|
equipment_log_id: t.equipment_log.id,
|
334
|
equipment_log_id: t.equipment_log.id,
|
323
|
- fuhe: t.equipment_log.fuhe,
|
335
|
+ fuhe: t.fuhe,
|
324
|
biaoshi: t.biaoshi,
|
336
|
biaoshi: t.biaoshi,
|
325
|
description: t.description,
|
337
|
description: t.description,
|
326
|
ziduan1: t.ziduan1,
|
338
|
ziduan1: t.ziduan1,
|
|
@@ -333,17 +345,21 @@ |
|
@@ -333,17 +345,21 @@ |
333
|
app.post(url, param, 'post').then(r => {
|
345
|
app.post(url, param, 'post').then(r => {
|
334
|
console.log(r)
|
346
|
console.log(r)
|
335
|
uni.showToast({
|
347
|
uni.showToast({
|
336
|
- title:'编辑成功',
|
|
|
337
|
- icon:'none'
|
348
|
+ title: '编辑成功',
|
|
|
349
|
+ icon: 'none'
|
338
|
})
|
350
|
})
|
339
|
- t.edifenxiangor=false
|
351
|
+ t.edifenxiangor = false
|
340
|
}).catch(err => {
|
352
|
}).catch(err => {
|
341
|
console.log(err)
|
353
|
console.log(err)
|
|
|
354
|
+ uni.showToast({
|
|
|
355
|
+ title: err.msg,
|
|
|
356
|
+ icon: 'none'
|
|
|
357
|
+ });
|
342
|
})
|
358
|
})
|
343
|
},
|
359
|
},
|
344
|
//图片预览
|
360
|
//图片预览
|
345
|
viewimgtu(index) {
|
361
|
viewimgtu(index) {
|
346
|
- console.log('999000',index)
|
362
|
+ console.log('999000', index)
|
347
|
|
363
|
|
348
|
uni.previewImage({
|
364
|
uni.previewImage({
|
349
|
current: this.imglist[index],
|
365
|
current: this.imglist[index],
|
|
@@ -358,17 +374,17 @@ |
|
@@ -358,17 +374,17 @@ |
358
|
onLoad(options) {
|
374
|
onLoad(options) {
|
359
|
|
375
|
|
360
|
|
376
|
|
361
|
- console.log('777777',options)
|
|
|
362
|
- this.number=options.number;
|
|
|
363
|
- this.id=options.id;
|
|
|
364
|
- if(options.type==1){
|
|
|
365
|
- this.is_share=1;
|
|
|
366
|
- this.fenxiangor=false;
|
|
|
367
|
- this.edifenxiangor=false
|
|
|
368
|
- }else{
|
|
|
369
|
- this.is_share=0;
|
|
|
370
|
- this.fenxiangor=true;
|
|
|
371
|
- this.edifenxiangor=true
|
377
|
+ console.log('777777', options)
|
|
|
378
|
+ this.number = options.number;
|
|
|
379
|
+ this.id = options.id;
|
|
|
380
|
+ if (options.type == 1) {
|
|
|
381
|
+ this.is_share = 1;
|
|
|
382
|
+ this.fenxiangor = false;
|
|
|
383
|
+ this.edifenxiangor = false
|
|
|
384
|
+ } else {
|
|
|
385
|
+ this.is_share = 0;
|
|
|
386
|
+ this.fenxiangor = true;
|
|
|
387
|
+ this.edifenxiangor = true
|
372
|
}
|
388
|
}
|
373
|
|
389
|
|
374
|
this.get_shubandetail()
|
390
|
this.get_shubandetail()
|
|
@@ -385,22 +401,24 @@ |
|
@@ -385,22 +401,24 @@ |
385
|
}
|
401
|
}
|
386
|
return {
|
402
|
return {
|
387
|
title: "智能点数小程序",
|
403
|
title: "智能点数小程序",
|
388
|
- path: 'pages/shubandetail/shubandetail?share=' + 'true'+'&type='+1+'&number='+this.number+'&id='+this.id
|
404
|
+ path: 'pages/shubandetail/shubandetail?share=' + 'true' + '&type=' + 1 + '&number=' + this.number + '&id=' + this.id
|
389
|
}
|
405
|
}
|
390
|
},
|
406
|
},
|
391
|
}
|
407
|
}
|
392
|
</script>
|
408
|
</script>
|
393
|
|
409
|
|
394
|
<style>
|
410
|
<style>
|
395
|
- .imgbox{
|
|
|
396
|
- display:flex;
|
411
|
+ .imgbox {
|
|
|
412
|
+ display: flex;
|
397
|
align-items: center;
|
413
|
align-items: center;
|
398
|
flex-wrap: wrap;
|
414
|
flex-wrap: wrap;
|
399
|
}
|
415
|
}
|
400
|
- .imgshang{
|
|
|
401
|
- display:flex;
|
416
|
+
|
|
|
417
|
+ .imgshang {
|
|
|
418
|
+ display: flex;
|
402
|
align-items: center;
|
419
|
align-items: center;
|
403
|
}
|
420
|
}
|
|
|
421
|
+
|
404
|
.infotou {
|
422
|
.infotou {
|
405
|
background: #fff;
|
423
|
background: #fff;
|
406
|
padding: 34rpx 32rpx;
|
424
|
padding: 34rpx 32rpx;
|
|
@@ -500,6 +518,15 @@ |
|
@@ -500,6 +518,15 @@ |
500
|
color: #7F8389;
|
518
|
color: #7F8389;
|
501
|
font-size: 28rpx;
|
519
|
font-size: 28rpx;
|
502
|
}
|
520
|
}
|
|
|
521
|
+ .yiqiheadright input{
|
|
|
522
|
+ text-align: right;
|
|
|
523
|
+ }
|
|
|
524
|
+
|
|
|
525
|
+ .fuheshuliangname {
|
|
|
526
|
+ color: #7F8389;
|
|
|
527
|
+ font-size: 28rpx;
|
|
|
528
|
+
|
|
|
529
|
+ }
|
503
|
|
530
|
|
504
|
.yewu {
|
531
|
.yewu {
|
505
|
background: #FFFFFF;
|
532
|
background: #FFFFFF;
|
|
@@ -543,15 +570,16 @@ |
|
@@ -543,15 +570,16 @@ |
543
|
height: 160rpx;
|
570
|
height: 160rpx;
|
544
|
font-size: 0;
|
571
|
font-size: 0;
|
545
|
margin-top: 30rpx;
|
572
|
margin-top: 30rpx;
|
546
|
- margin-left:14rpx;
|
573
|
+ margin-left: 14rpx;
|
547
|
position: relative;
|
574
|
position: relative;
|
548
|
}
|
575
|
}
|
549
|
- .chahao{
|
|
|
550
|
- width:40rpx;
|
|
|
551
|
- height:40rpx;
|
|
|
552
|
- position:absolute;
|
|
|
553
|
- top:-10rpx;
|
|
|
554
|
- right:-10rpx;
|
576
|
+
|
|
|
577
|
+ .chahao {
|
|
|
578
|
+ width: 40rpx;
|
|
|
579
|
+ height: 40rpx;
|
|
|
580
|
+ position: absolute;
|
|
|
581
|
+ top: -10rpx;
|
|
|
582
|
+ right: -10rpx;
|
555
|
}
|
583
|
}
|
556
|
|
584
|
|
557
|
.subshuju {
|
585
|
.subshuju {
|
|
@@ -567,19 +595,20 @@ |
|
@@ -567,19 +595,20 @@ |
567
|
line-height: 100rpx;
|
595
|
line-height: 100rpx;
|
568
|
margin: 42rpx auto;
|
596
|
margin: 42rpx auto;
|
569
|
}
|
597
|
}
|
570
|
- .tupianshangchuan{
|
|
|
571
|
- width:200rpx;
|
|
|
572
|
- height:50rpx;
|
598
|
+
|
|
|
599
|
+ .tupianshangchuan {
|
|
|
600
|
+ width: 200rpx;
|
|
|
601
|
+ height: 50rpx;
|
573
|
background: #3E3A39;
|
602
|
background: #3E3A39;
|
574
|
- color:#fff;
|
603
|
+ color: #fff;
|
575
|
font-size: 24rpx;
|
604
|
font-size: 24rpx;
|
576
|
text-align: center;
|
605
|
text-align: center;
|
577
|
line-height: 50rpx;
|
606
|
line-height: 50rpx;
|
578
|
opacity: 0.5;
|
607
|
opacity: 0.5;
|
579
|
position: absolute;
|
608
|
position: absolute;
|
580
|
border-radius: 20rpx;
|
609
|
border-radius: 20rpx;
|
581
|
- top:45%;
|
|
|
582
|
- left:50%;
|
|
|
583
|
- transform: translate(-50%,-50%)
|
610
|
+ top: 45%;
|
|
|
611
|
+ left: 50%;
|
|
|
612
|
+ transform: translate(-50%, -50%)
|
584
|
}
|
613
|
}
|
585
|
</style> |
614
|
</style> |