添加功能
This commit is contained in:
@@ -42,6 +42,17 @@
|
||||
</view>
|
||||
<uni-icons type="right" size="14" color="#999"></uni-icons>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">幅宽</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_picker">
|
||||
<picker @change="pickerChange2" :value="index2" :range="options2" range-key="text">
|
||||
<view class="uni-input">{{index2 !== '' ? options2[index2].text : ''}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<uni-icons type="right" size="14" color="#999"></uni-icons>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">是否烘烤</span>
|
||||
@@ -93,7 +104,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-4 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-6 button-primary" :class="{'button-info': !val1 || !val5 || index1 === '' || !val3 || !val4 || !val2}" :disabled="disabled" @tap="_doModifyRawInfos">修改信息</button>
|
||||
<button class="zd-col-6 button-primary" :class="{'button-info': !val1 || !val5 || index1 === '' || index2 === '' || !val3 || !val4 || !val2}" :disabled="disabled" @tap="_doModifyRawInfos">修改信息</button>
|
||||
<button class="zd-col-6 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_bakingQuality('1')">质检合格</button>
|
||||
<button class="zd-col-6 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_bakingQuality('0')">再次烘烤</button>
|
||||
</view>
|
||||
@@ -116,6 +127,8 @@
|
||||
val2: '',
|
||||
options1: [{value: '1', text: '大卷'}, {value: '2', text: '小卷'}],
|
||||
index1: '',
|
||||
options2: [{value: '1', text: '幅宽大于1550'}, {value: '0', text: '幅宽小于1550'}],
|
||||
index2: '',
|
||||
isChecked: false,
|
||||
val3: '',
|
||||
val4: '',
|
||||
@@ -148,6 +161,9 @@
|
||||
pickerChange (e) {
|
||||
this.index1 = e.detail.value
|
||||
},
|
||||
pickerChange2 (e) {
|
||||
this.index2 = e.detail.value
|
||||
},
|
||||
setWStatus () {
|
||||
this.isChecked = !this.isChecked
|
||||
},
|
||||
@@ -155,6 +171,7 @@
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.index1 = ''
|
||||
this.index2 = ''
|
||||
this.isChecked = false
|
||||
this.val3 = ''
|
||||
this.val4 = ''
|
||||
@@ -181,13 +198,13 @@
|
||||
},
|
||||
async _doModifyRawInfos () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val5 || this.index1 === '' || !this.val3 || !this.val4 || !this.val2) {
|
||||
if (!this.val1 || !this.val5 || this.index1 === '' || this.index2 === '' || !this.val3 || !this.val4 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let checked = this.isChecked ? '1' : '0'
|
||||
let res = await doModifyRawInfos(this.val1, this.val2, this.options1[this.index1].value, checked, this.val3, this.val4, this.val5)
|
||||
let res = await doModifyRawInfos(this.val1, this.val2, this.options1[this.index1].value, checked, this.val3, this.val4, this.val5, this.options2[this.index2].value)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
||||
Reference in New Issue
Block a user