|
@@ -25,9 +25,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="boxLine" v-for="(item,index) in categoryList[index1].sectionList[index2].itemList">
|
|
|
- <view class="boxLineTop">
|
|
|
+ <view class="boxLineTop xzstoreBox">
|
|
|
<view class="itemName">{{item.itemName}}</view>
|
|
|
- <view class="store" v-if="item.keyType==4" @click="pickerClick(item)">
|
|
|
+ <view class="store xzstore" v-if="item.keyType==4" @click="pickerClick(item)">
|
|
|
<picker @change="bindPickerChange($event)" :value="item.storeIndex" :item="item" :range="item.array">
|
|
|
<view class="pickerView" v-if="item.itemValue!==''">{{item.itemValue}} 分</view>
|
|
|
<view class="pickerView" v-else>请选择</view>
|
|
@@ -36,12 +36,18 @@
|
|
|
<image src="../../static/img/jiantou.png" mode="" class="storeJtimg"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
</view>
|
|
|
<view class="boxlinedescribe" v-if="item.describe">{{item.describe}}</view>
|
|
|
<view class="itemCklineBox" v-if="item.keyType==1">
|
|
|
<view class="itemCkline" :class="{itemckActive:name.check}" @click="itemXx(name,item.array)" v-for="(name,nameIndex) in item.array">{{name.name}}</view>
|
|
|
<!-- <view class="itemCkline itemckActive">张杰</view> -->
|
|
|
</view>
|
|
|
+ <view v-if="item.keyType==5" class="textareaBox">
|
|
|
+ <input placeholder-style="color:#CCCCCC" class="numbershuru" placeholder="请输入~" type="digit" pattern="number" v-model="item.itemValue"
|
|
|
+ @oninput="numberxz"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
<view class="textareaBox" v-if="item.keyType==2">
|
|
|
<textarea placeholder-style="color:#CCCCCC" placeholder="请输入~" v-model="item.itemValue" class="textareaCont"/>
|
|
|
</view>
|
|
@@ -49,8 +55,9 @@
|
|
|
<view class="imgLine" v-for="(img,imgindex) in item.imgArr">
|
|
|
<image @click="previewImage(img,item.imgArr)" :class="{img4:(imgindex+1)%4==0}" :src="img" mode="" class="itemImg"></image>
|
|
|
<image src="../../static/img/icon_delpic@2x.png" mode="" class="delImg" @click="delimg(item,imgindex)"></image>
|
|
|
+ <!-- <textarea placeholder-style="color:#CCCCCC" placeholder="请输入备注" class="imgtextarea"/> -->
|
|
|
</view>
|
|
|
- <view class="imgLine" @click="uploadImg(item)">
|
|
|
+ <view class="imgLine2" @click="uploadImg(item)">
|
|
|
<image src="../../static/img/icon_addpic@2x.png" mode="" class="itemImg" style="margin-right: 0;"></image>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -156,6 +163,27 @@
|
|
|
console.log(this.categoryList);
|
|
|
},
|
|
|
methods: {
|
|
|
+ numberxz(event){
|
|
|
+ console.log(event)
|
|
|
+ /* this.categoryList[this.index1].sectionList[this.index2].itemList[index].itemValue=2
|
|
|
+ console.log(this.categoryList[this.index1].sectionList[this.index2].itemList[index].itemValue)
|
|
|
+ this.categoryList.slice(0,1) */
|
|
|
+ /* this.$nextTick(() => {
|
|
|
+ this.categoryList[this.index1].sectionList[this.index2].itemList[index].itemValue=2
|
|
|
+ })
|
|
|
+ */
|
|
|
+ let i = event.target.value
|
|
|
+ return i.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')
|
|
|
+ /* let i = event.target.value
|
|
|
+ let num = i.charAt(i.length-1)
|
|
|
+ var reg=new RegExp("^[0-9]*$")
|
|
|
+ if(!reg.test(num)) {
|
|
|
+ return i.slice(0,-1)
|
|
|
+ } else {
|
|
|
+ return i
|
|
|
+ } */
|
|
|
+
|
|
|
+ },
|
|
|
previewImage(img,arr){
|
|
|
//var arr=[];
|
|
|
//arr.push(img)
|
|
@@ -242,6 +270,8 @@
|
|
|
sub(){
|
|
|
console.log(this.categoryList);
|
|
|
var go=true;
|
|
|
+ var gonum=true;
|
|
|
+ var gonumTxt=''
|
|
|
this.categoryList[this.index1].sectionList[this.index2].itemList.forEach(item=>{
|
|
|
if(item.keyType==3){
|
|
|
item.itemValue=item.imgArr.join(',');
|
|
@@ -255,7 +285,21 @@
|
|
|
}
|
|
|
})
|
|
|
item.itemValue=arr.join(',');
|
|
|
+ }else if(item.keyType==5){
|
|
|
+ var num5=Number(item.itemValue)
|
|
|
+ if(num5){
|
|
|
+ console.log(typeof(num5))
|
|
|
+ if(typeof(num5)!='number'){
|
|
|
+ gonum=false;
|
|
|
+ gonumTxt=item.itemName
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ gonum=false;
|
|
|
+ gonumTxt=item.itemName
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
if(item.itemValue===0){
|
|
|
|
|
|
}else if(item.itemValue===''){
|
|
@@ -273,6 +317,14 @@
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
+ if(!gonum){
|
|
|
+ uni.showToast({
|
|
|
+ title:gonumTxt+'必须为数字',
|
|
|
+ icon:'none',
|
|
|
+ duration: 3000,
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
//return false;
|
|
|
this.categoryList[this.index1].sectionList[this.index2].check=true;
|
|
|
if(this.yuedu){
|
|
@@ -300,6 +352,11 @@
|
|
|
this.yueduData=res.data
|
|
|
})
|
|
|
}
|
|
|
+ },
|
|
|
+ filters:{
|
|
|
+ numInput(value){
|
|
|
+ console.log(value)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -310,6 +367,15 @@
|
|
|
min-height: 100vh;
|
|
|
|
|
|
}
|
|
|
+ .numbershuru{
|
|
|
+ background: #F4F5F7;
|
|
|
+ padding: 0rpx 20rpx;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #3C3C3C;
|
|
|
+ line-height: 88rpx;
|
|
|
+ height: 88rpx;
|
|
|
+ }
|
|
|
/* #ifdef H5 */
|
|
|
.content{
|
|
|
background: #F4F5F7;
|
|
@@ -377,9 +443,9 @@
|
|
|
padding-top: 20rpx;
|
|
|
}
|
|
|
.imgBox{
|
|
|
- /* padding-top: 10rpx; */
|
|
|
- display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
+ padding-top: 10rpx;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
|
|
|
}
|
|
|
.itemImg{
|
|
@@ -395,11 +461,28 @@
|
|
|
width: 32rpx;
|
|
|
height: 32rpx;
|
|
|
position: absolute;
|
|
|
- left: 135rpx;
|
|
|
+ /* right:20rpx; */
|
|
|
top: 10rpx;
|
|
|
+ z-index: 11;
|
|
|
+ left: 135rpx;
|
|
|
}
|
|
|
.imgLine{
|
|
|
position: relative;
|
|
|
+ /* width: 662rpx;
|
|
|
+ height: 150rpx;
|
|
|
+ background: #F4F5F7;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ padding: 20rpx;
|
|
|
+ margin-top: 20rpx;
|
|
|
+ display: flex; */
|
|
|
+ }
|
|
|
+ .imgtextarea{
|
|
|
+ height: 120rpx;font-size: 28rpx;padding-left: 20rpx;
|
|
|
+ width:520rpx ;
|
|
|
+ }
|
|
|
+ .imgLine2{
|
|
|
+ /* padding-top: 20rpx; */
|
|
|
+ position: relative;
|
|
|
}
|
|
|
.bottom{
|
|
|
width: 750rpx;
|
|
@@ -455,4 +538,11 @@
|
|
|
width: 500rpx;
|
|
|
text-align: right;
|
|
|
}
|
|
|
+ .xzstore{
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ }
|
|
|
+ .xzstoreBox{
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
</style>
|