...
|
...
|
@@ -43,7 +43,10 @@ |
|
|
</view>
|
|
|
<view class="yiqihead">
|
|
|
<view class="yiqiheadleft">复核数量</view>
|
|
|
<view class="yiqiheadright">{{equipment_log.fuhe}}</view>
|
|
|
<view class="yiqiheadright">
|
|
|
<input type="number" placeplaceholder="请输入复核数量" v-model="fuhe" placeholder-class="fuheshuliangname" />
|
|
|
<!-- {{}} -->
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="yewu">
|
...
|
...
|
@@ -98,7 +101,7 @@ |
|
|
<view class="imgbox">
|
|
|
|
|
|
<view v-for="(item,index) in imglist" :key="index" class="imgshang">
|
|
|
<view class="upload" >
|
|
|
<view class="upload">
|
|
|
<image :src="item" @click="viewimgtu(index)"></image>
|
|
|
<view class="chahao" @click="del(index)">
|
|
|
<image src="../../static/img/chahao3.png"></image>
|
...
|
...
|
@@ -122,7 +125,7 @@ |
|
|
<view class="imgbox">
|
|
|
|
|
|
<view v-for="(item,index) in imglist" :key="index" class="imgshang">
|
|
|
<view class="upload" >
|
|
|
<view class="upload">
|
|
|
<image :src="item" @click="viewimgtu(index)"></image>
|
|
|
|
|
|
</view>
|
...
|
...
|
@@ -132,7 +135,12 @@ |
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="subshuju" @click="edifenxiangor?set_number:''" v-if="edifenxiangor">提交数据</view>
|
|
|
<!-- <view class="subshuju" >提交数据</view> -->
|
|
|
|
|
|
<!-- <view @click="tijiao">提交数据</view> -->
|
|
|
<!-- <view class="subshuju" @click="edifenxiangor?tijiao:''" v-if="edifenxiangor">提交数据{{edifenxiangor}}</view> -->
|
|
|
<view class="subshuju" @click="tijiao" v-if="edifenxiangor">提交数据</view>
|
|
|
<view class="subshuju" v-else>提交数据</view>
|
|
|
<!-- <view class="subshuju" v-else>提交数据</view> -->
|
|
|
<view class="tupianshangchuan" v-if="picshangchuan">图片上传中</view>
|
|
|
|
...
|
...
|
@@ -158,19 +166,20 @@ |
|
|
ziduan5: "",
|
|
|
image: [],
|
|
|
chuanimg: '/static/img/upload.png',
|
|
|
imglist:[],
|
|
|
number:'',
|
|
|
id:'',
|
|
|
is_share:0,
|
|
|
fenxiangor:true,
|
|
|
edifenxiangor:true,
|
|
|
picshangchuan:false
|
|
|
imglist: [],
|
|
|
number: '',
|
|
|
id: '',
|
|
|
is_share: 0,
|
|
|
fenxiangor: true,
|
|
|
edifenxiangor: true,
|
|
|
picshangchuan: false,
|
|
|
fuhe:''
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
//选择照片
|
|
|
shoseimg() {
|
|
|
let baseurl=uni.getStorageSync("baseurl")
|
|
|
let baseurl = uni.getStorageSync("baseurl")
|
|
|
|
|
|
uni.chooseImage({
|
|
|
count: 1,
|
...
|
...
|
@@ -179,7 +188,7 @@ |
|
|
// sourceType: ['camera'],//拍摄照片
|
|
|
// sourceType: '',
|
|
|
success: (chooseImageRes) => {
|
|
|
this.picshangchuan=true
|
|
|
this.picshangchuan = true
|
|
|
const tempFilePaths = chooseImageRes.tempFilePaths;
|
|
|
|
|
|
let images = tempFilePaths[0]
|
...
|
...
|
@@ -190,7 +199,7 @@ |
|
|
}
|
|
|
|
|
|
uni.uploadFile({
|
|
|
url: baseurl+'/api/person/upload',
|
|
|
url: baseurl + '/api/person/upload',
|
|
|
filePath: tempFilePaths[0],
|
|
|
name: 'images',
|
|
|
token: uni.getStorageSync('token'),
|
...
|
...
|
@@ -198,7 +207,7 @@ |
|
|
header: head,
|
|
|
// images:images
|
|
|
success: (uploadFileRes) => {
|
|
|
this.picshangchuan=false
|
|
|
this.picshangchuan = false
|
|
|
|
|
|
let data = JSON.parse(uploadFileRes.data)
|
|
|
this.imglist.push(data.data.src)
|
...
|
...
|
@@ -217,15 +226,15 @@ |
|
|
//拍摄照片上传
|
|
|
|
|
|
camera() {
|
|
|
let baseurl=uni.getStorageSync("baseurl")
|
|
|
let baseurl = uni.getStorageSync("baseurl")
|
|
|
uni.chooseImage({
|
|
|
count:1,
|
|
|
count: 1,
|
|
|
sizeType: ['original', 'compressed'],
|
|
|
//sourceType: ['album'], //从相册选择
|
|
|
sourceType: ['camera'],//拍摄照片
|
|
|
sourceType: ['camera'], //拍摄照片
|
|
|
// sourceType: '',
|
|
|
success: (chooseImageRes) => {
|
|
|
this.picshangchuan=true
|
|
|
this.picshangchuan = true
|
|
|
const tempFilePaths = chooseImageRes.tempFilePaths;
|
|
|
|
|
|
let images = tempFilePaths[0]
|
...
|
...
|
@@ -236,7 +245,7 @@ |
|
|
}
|
|
|
|
|
|
uni.uploadFile({
|
|
|
url: baseurl+'/api/person/upload',
|
|
|
url: baseurl + '/api/person/upload',
|
|
|
filePath: tempFilePaths[0],
|
|
|
name: 'images',
|
|
|
token: uni.getStorageSync('token'),
|
...
|
...
|
@@ -244,7 +253,7 @@ |
|
|
header: head,
|
|
|
// images:images
|
|
|
success: (uploadFileRes) => {
|
|
|
this.picshangchuan=false
|
|
|
this.picshangchuan = false
|
|
|
let data = JSON.parse(uploadFileRes.data)
|
|
|
|
|
|
this.imglist.push(data.data.src)
|
...
|
...
|
@@ -261,43 +270,46 @@ |
|
|
|
|
|
},
|
|
|
//删除图片
|
|
|
del(index){
|
|
|
let newimglist=this.imglist;
|
|
|
for(var i=0;i<newimglist.length;i++){
|
|
|
if(i==index){
|
|
|
newimglist.splice(i,1)
|
|
|
del(index) {
|
|
|
let newimglist = this.imglist;
|
|
|
for (var i = 0; i < newimglist.length; i++) {
|
|
|
if (i == index) {
|
|
|
newimglist.splice(i, 1)
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.imglist=newimglist;
|
|
|
console.log('9999888',this.imglist)
|
|
|
this.imglist = newimglist;
|
|
|
console.log('9999888', this.imglist)
|
|
|
},
|
|
|
|
|
|
// 获取数管剩余时间次数
|
|
|
|
|
|
// 获取数板信息详情
|
|
|
|
|
|
|
|
|
get_shubandetail() {
|
|
|
console.log('666666',this.number)
|
|
|
console.log('666666', this.number)
|
|
|
let t = this;
|
|
|
let url = "api/equipment/getEquipmentDetail";
|
|
|
let param = {
|
|
|
number: this.number,
|
|
|
equipment_log_id: t.id,
|
|
|
is_share:t.is_share
|
|
|
is_share: t.is_share
|
|
|
|
|
|
};
|
|
|
app.post(url, param, 'post').then(r => {
|
|
|
|
|
|
t.equipment_log = r.equipment_log;
|
|
|
t.biaoshi=r.equipment_log.biaoshi;
|
|
|
t.description=r.equipment_log.description;
|
|
|
t.ziduan1=r.equipment_log.ziduan1;
|
|
|
t.ziduan2=r.equipment_log.ziduan2;
|
|
|
t.ziduan3=r.equipment_log.ziduan3;
|
|
|
t.ziduan4=r.equipment_log.ziduan4;
|
|
|
t.ziduan5=r.equipment_log.ziduan5;
|
|
|
t.imglist=r.equipment_log.images
|
|
|
t.fuhe=r.equipment_log.fuhe
|
|
|
t.biaoshi = r.equipment_log.biaoshi;
|
|
|
t.description = r.equipment_log.description;
|
|
|
t.ziduan1 = r.equipment_log.ziduan1;
|
|
|
t.ziduan2 = r.equipment_log.ziduan2;
|
|
|
t.ziduan3 = r.equipment_log.ziduan3;
|
|
|
t.ziduan4 = r.equipment_log.ziduan4;
|
|
|
t.ziduan5 = r.equipment_log.ziduan5;
|
|
|
t.imglist = r.equipment_log.images
|
|
|
|
|
|
|
|
|
}).catch(err => {
|
...
|
...
|
@@ -305,22 +317,22 @@ |
|
|
})
|
|
|
},
|
|
|
// 提交数据
|
|
|
set_number() {
|
|
|
tijiao() {
|
|
|
console.log(123)
|
|
|
let t = this;
|
|
|
|
|
|
if (this.imglist.length == 0) {
|
|
|
uni.showToast({
|
|
|
title: '请上传相关图片',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
// if (this.imglist.length == 0) {
|
|
|
// uni.showToast({
|
|
|
// title: '请上传相关图片',
|
|
|
// icon: 'none'
|
|
|
// })
|
|
|
// return false
|
|
|
// }
|
|
|
let url = "api/equipment/setEquipmentLog";
|
|
|
let param = {
|
|
|
number: t.equipment_log.number,
|
|
|
equipment_log_id: t.equipment_log.id,
|
|
|
fuhe: t.equipment_log.fuhe,
|
|
|
fuhe: t.fuhe,
|
|
|
biaoshi: t.biaoshi,
|
|
|
description: t.description,
|
|
|
ziduan1: t.ziduan1,
|
...
|
...
|
@@ -333,17 +345,21 @@ |
|
|
app.post(url, param, 'post').then(r => {
|
|
|
console.log(r)
|
|
|
uni.showToast({
|
|
|
title:'编辑成功',
|
|
|
icon:'none'
|
|
|
title: '编辑成功',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
t.edifenxiangor=false
|
|
|
t.edifenxiangor = false
|
|
|
}).catch(err => {
|
|
|
console.log(err)
|
|
|
uni.showToast({
|
|
|
title: err.msg,
|
|
|
icon: 'none'
|
|
|
});
|
|
|
})
|
|
|
},
|
|
|
//图片预览
|
|
|
viewimgtu(index) {
|
|
|
console.log('999000',index)
|
|
|
console.log('999000', index)
|
|
|
|
|
|
uni.previewImage({
|
|
|
current: this.imglist[index],
|
...
|
...
|
@@ -358,17 +374,17 @@ |
|
|
onLoad(options) {
|
|
|
|
|
|
|
|
|
console.log('777777',options)
|
|
|
this.number=options.number;
|
|
|
this.id=options.id;
|
|
|
if(options.type==1){
|
|
|
this.is_share=1;
|
|
|
this.fenxiangor=false;
|
|
|
this.edifenxiangor=false
|
|
|
}else{
|
|
|
this.is_share=0;
|
|
|
this.fenxiangor=true;
|
|
|
this.edifenxiangor=true
|
|
|
console.log('777777', options)
|
|
|
this.number = options.number;
|
|
|
this.id = options.id;
|
|
|
if (options.type == 1) {
|
|
|
this.is_share = 1;
|
|
|
this.fenxiangor = false;
|
|
|
this.edifenxiangor = false
|
|
|
} else {
|
|
|
this.is_share = 0;
|
|
|
this.fenxiangor = true;
|
|
|
this.edifenxiangor = true
|
|
|
}
|
|
|
|
|
|
this.get_shubandetail()
|
...
|
...
|
@@ -385,22 +401,24 @@ |
|
|
}
|
|
|
return {
|
|
|
title: "智能点数小程序",
|
|
|
path: 'pages/shubandetail/shubandetail?share=' + 'true'+'&type='+1+'&number='+this.number+'&id='+this.id
|
|
|
path: 'pages/shubandetail/shubandetail?share=' + 'true' + '&type=' + 1 + '&number=' + this.number + '&id=' + this.id
|
|
|
}
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style>
|
|
|
.imgbox{
|
|
|
display:flex;
|
|
|
.imgbox {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
flex-wrap: wrap;
|
|
|
}
|
|
|
.imgshang{
|
|
|
display:flex;
|
|
|
|
|
|
.imgshang {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.infotou {
|
|
|
background: #fff;
|
|
|
padding: 34rpx 32rpx;
|
...
|
...
|
@@ -500,6 +518,15 @@ |
|
|
color: #7F8389;
|
|
|
font-size: 28rpx;
|
|
|
}
|
|
|
.yiqiheadright input{
|
|
|
text-align: right;
|
|
|
}
|
|
|
|
|
|
.fuheshuliangname {
|
|
|
color: #7F8389;
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
.yewu {
|
|
|
background: #FFFFFF;
|
...
|
...
|
@@ -543,15 +570,16 @@ |
|
|
height: 160rpx;
|
|
|
font-size: 0;
|
|
|
margin-top: 30rpx;
|
|
|
margin-left:14rpx;
|
|
|
margin-left: 14rpx;
|
|
|
position: relative;
|
|
|
}
|
|
|
.chahao{
|
|
|
width:40rpx;
|
|
|
height:40rpx;
|
|
|
position:absolute;
|
|
|
top:-10rpx;
|
|
|
right:-10rpx;
|
|
|
|
|
|
.chahao {
|
|
|
width: 40rpx;
|
|
|
height: 40rpx;
|
|
|
position: absolute;
|
|
|
top: -10rpx;
|
|
|
right: -10rpx;
|
|
|
}
|
|
|
|
|
|
.subshuju {
|
...
|
...
|
@@ -567,19 +595,20 @@ |
|
|
line-height: 100rpx;
|
|
|
margin: 42rpx auto;
|
|
|
}
|
|
|
.tupianshangchuan{
|
|
|
width:200rpx;
|
|
|
height:50rpx;
|
|
|
|
|
|
.tupianshangchuan {
|
|
|
width: 200rpx;
|
|
|
height: 50rpx;
|
|
|
background: #3E3A39;
|
|
|
color:#fff;
|
|
|
color: #fff;
|
|
|
font-size: 24rpx;
|
|
|
text-align: center;
|
|
|
line-height: 50rpx;
|
|
|
opacity: 0.5;
|
|
|
position: absolute;
|
|
|
border-radius: 20rpx;
|
|
|
top:45%;
|
|
|
left:50%;
|
|
|
transform: translate(-50%,-50%)
|
|
|
top: 45%;
|
|
|
left: 50%;
|
|
|
transform: translate(-50%, -50%)
|
|
|
}
|
|
|
</style> |
...
|
...
|
|