联调修改
This commit is contained in:
@@ -15,10 +15,32 @@
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">流转单号</span>
|
||||
<span class="filter_label">母卷号</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input v-model="val2" type="text" class="filter_input" @blur="handleConfirm" @confirm="handleConfirm">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</view>
|
||||
</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="pickerChange" :value="index1" :range="options1" range-key="text">
|
||||
<view class="uni-input">{{index1 !== '' ? options1[index1].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-7">
|
||||
<span class="filter_label">是否烘烤</span>
|
||||
</view>
|
||||
<view class="relative zd-col-17">
|
||||
<switch :checked="isChecked" color="#6798ef" style="transform:scale(0.8)"/>
|
||||
<text @tap="setWStatus" style="position: absolute;display: inline-block;width: 52px; height: 32px;left: 0;"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -35,12 +57,9 @@
|
||||
<span class="filter_label">时间</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<uni-datetime-picker
|
||||
type="datetime"
|
||||
:value="time"
|
||||
@change="dateChange"
|
||||
/>
|
||||
<input v-model="val4" type="number" class="filter_input">
|
||||
</view>
|
||||
<view class="zd-col-2 filter_label">分</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper">
|
||||
@@ -48,7 +67,7 @@
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">母卷号</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_msg">{{obj.roll_type}}</view>
|
||||
<view class="zd-col-17 filter_msg">{{obj.order_code}}</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
@@ -66,9 +85,9 @@
|
||||
</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 || !val2 || !val3}" :disabled="disabled" @tap="_doModifyRawInfos">修改信息</button>
|
||||
<button class="zd-col-6 button-primary" :class="{'button-info': !val1 || !val2 || index1 === '' || !val3 || !val4}" :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 || !val2}" :disabled="disabled" @tap="_bakingQuality('2')">再次烘烤</button>
|
||||
<button class="zd-col-6 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_bakingQuality('0')">再次烘烤</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -87,33 +106,52 @@
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
options1: [{value: '1', text: '大卷'}, {value: '2', text: '小卷'}],
|
||||
index1: '',
|
||||
isChecked: false,
|
||||
val3: '',
|
||||
time: '',
|
||||
obj: {roll_type: '-', is_baking: '-', msg: '-'},
|
||||
val4: '',
|
||||
obj: {order_code: '-', is_baking: '-', msg: '-'},
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
val1(value) {
|
||||
this.checkInputs(value, this.val2);
|
||||
},
|
||||
val2(value) {
|
||||
this.checkInputs(this.val1, value);
|
||||
}
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.val3 = ''
|
||||
this.time = ''
|
||||
this.obj = {roll_type: '-', is_baking: '-', msg: '-'}
|
||||
this.disabled = false
|
||||
},
|
||||
handleConfirm () {
|
||||
if (this.val2) {
|
||||
this._getHotTempPointInfo()
|
||||
}
|
||||
},
|
||||
async _getHotTempPointInfo () {
|
||||
let res = await getHotTempPointInfo(this.val1, this.val2)
|
||||
this.obj = res
|
||||
},
|
||||
checkInputs(val1, val2) {
|
||||
if (val1 && val2) {
|
||||
this._getHotTempPointInfo()
|
||||
}
|
||||
},
|
||||
pickerChange (e) {
|
||||
this.index1 = e.detail.value
|
||||
},
|
||||
setWStatus () {
|
||||
this.isChecked = !this.isChecked
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.index1 = ''
|
||||
this.isChecked = false
|
||||
this.val3 = ''
|
||||
this.val4 = ''
|
||||
this.obj = {order_code: '-', is_baking: '-', msg: '-'}
|
||||
this.disabled = false
|
||||
},
|
||||
async _bakingQuality (type) {
|
||||
this.disabled = true
|
||||
if (!this.val1) {
|
||||
@@ -131,17 +169,15 @@
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
dateChange (e) {
|
||||
this.time = e
|
||||
},
|
||||
async _doModifyRawInfos () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2 || !this.val3) {
|
||||
if (!this.val1 || !this.val2 || this.index1 === '' || !this.val3 || !this.val4) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await doModifyRawInfos(this.val1, this.val2, this.val3, this.time)
|
||||
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.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
||||
Reference in New Issue
Block a user