修改bug
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<uni-data-select v-model="index" :placeholder="$t('uni.dataSelect.placeholder')" :emptyTips="$t('uni.dataSelect.emptyTips')" :localdata="options"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_item is-required">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">{{$t('grid.point-code')}}</span>
|
||||
</view>
|
||||
@@ -18,7 +18,7 @@
|
||||
<search-box v-model="val1" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_item is-required">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">{{$t('grid.mother-roll-number')}}</span>
|
||||
</view>
|
||||
@@ -53,8 +53,8 @@
|
||||
</view>
|
||||
<view class="zd-row submitbar">
|
||||
<button class="zd-col-7 btn-submit btn-success" @tap="searchList">{{$t('button.search')}}</button>
|
||||
<button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !pkId}" :disabled="disabled1" @tap="_inCoolIvt">{{$t('button.quality-approved')}}</button>
|
||||
<button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !pkId}" :disabled="disabled2" @tap="_inCoolOrOven">质检不合格</button>
|
||||
<button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !val1 || !val2}" :disabled="disabled1" @tap="handleConfirm1">{{$t('button.quality-approved')}}</button>
|
||||
<button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !val1 || !val2}" @tap="_inCoolOrOven">质检不合格</button>
|
||||
</view>
|
||||
<view class="msg_wrapper" :class="active ? 'popshow' : 'pophide'" style="height: auto">
|
||||
<view class="pop-line"></view>
|
||||
@@ -91,7 +91,7 @@
|
||||
</view>
|
||||
<view class="zd-row submitbar">
|
||||
<button class="zd-col-11 btn-submit btn-default letter-30" @tap="cancleModal">{{$t('button.cancel')}}</button>
|
||||
<button class="zd-col-11 btn-submit btn-success letter-30" @tap="modalToSure">{{$t('button.confirm')}}</button>
|
||||
<button class="zd-col-11 btn-submit btn-success letter-30" :disabled="disabled2" @tap="handleConfirm2">{{$t('button.confirm')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="active" class="msg_mask"></view>
|
||||
@@ -104,6 +104,7 @@
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import NumberInput from '@/components/NumberInput.vue'
|
||||
import UpTop from '@/components/upTop.vue'
|
||||
import { confirmAction } from '@/utils/utils.js'
|
||||
import {queryProductArea, inCoolIvt, inCoolOrOven} from '@/utils/getData1.js'
|
||||
import {queryHotPoints} from '@/utils/getData3.js'
|
||||
export default {
|
||||
@@ -196,14 +197,19 @@
|
||||
this.pkId = this.pkId === e.container_name ? '' : e.container_name
|
||||
this.pkObj = this.pkId === e.container_name ? e : {}
|
||||
},
|
||||
async _inCoolIvt () {
|
||||
this.disabled1 = true
|
||||
if (!this.pkId) {
|
||||
this.disabled1 = false
|
||||
async handleConfirm1 () {
|
||||
if (!this.val1 || !this.val2) {
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._inCoolIvt()
|
||||
}
|
||||
},
|
||||
async _inCoolIvt () {
|
||||
this.disabled1 = true
|
||||
try {
|
||||
let res = await inCoolIvt(this.pkObj.point_code, this.pkObj.container_name)
|
||||
let res = await inCoolIvt(this.val1, this.val2)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
@@ -215,9 +221,8 @@
|
||||
}
|
||||
},
|
||||
_inCoolOrOven () {
|
||||
if (this.pkId) {
|
||||
if (this.val1 && this.val2) {
|
||||
this.active = true
|
||||
this.disabled2 = true
|
||||
}
|
||||
},
|
||||
cancleModal () {
|
||||
@@ -227,15 +232,23 @@
|
||||
this.active = false
|
||||
this.disabled2 = false
|
||||
},
|
||||
async handleConfirm2 () {
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this.modalToSure()
|
||||
}
|
||||
},
|
||||
async modalToSure () {
|
||||
this.disabled2 = true
|
||||
try {
|
||||
let res = await inCoolOrOven(this.pkObj.point_code, this.pkObj.container_name, this.val3, this.val4, this.index1)
|
||||
let res = await inCoolOrOven(this.val1, this.val2, this.val3, this.val4, this.index1)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.cancleModal()
|
||||
this.searchList()
|
||||
this.disabled2 = false
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
@@ -243,6 +256,3 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
</style>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<view class="zd-row submitbar">
|
||||
<button class="zd-col-4 btn-submit btn-default" @tap="clearUp">{{$t('button.clear')}}</button>
|
||||
<button class="zd-col-6 btn-submit btn-success" :class="{'btn-info': !val1 || !val2 || !val3 || !val4}" :disabled="disabled" @tap="handleConfirm('1')">{{$t('button.enter-box')}}</button>
|
||||
<button class="zd-col-6 btn-submit btn-success" :class="{'btn-info': !val1}" :disabled="disabled" @tap="handleConfirm('2')">{{$t('button.out-box')}}</button>
|
||||
<button class="zd-col-6 btn-submit btn-success" :class="{'btn-info': !val1 || !val2}" :disabled="disabled" @tap="handleConfirm('2')">{{$t('button.out-box')}}</button>
|
||||
<button class="zd-col-6 btn-submit btn-success" :disabled="disabled" @click="_inHotByPoint">定点入箱</button>
|
||||
</view>
|
||||
<view class="msg_wrapper" :class="active ? 'popshow' : 'pophide'" style="height: auto">
|
||||
@@ -156,19 +156,18 @@
|
||||
},
|
||||
async handleConfirm(type) {
|
||||
if ((!this.val1 || !this.val2 ||!this.val3 || !this.val4) && type === '1') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.val1 && type === '2') {
|
||||
if ((!this.val1 || !this.val2) && type === '2') {
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
if (type === '1') {
|
||||
this._ovenInAndOut1()
|
||||
this._ovenInAndOut1(type)
|
||||
}
|
||||
if (type === '2') {
|
||||
this._ovenInAndOut2()
|
||||
this._ovenInAndOut2(type)
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -188,7 +187,7 @@
|
||||
async _ovenInAndOut2 (type) {
|
||||
this.disabled = true
|
||||
try {
|
||||
let res = await ovenInAndOut(this.val1, '','', '', type)
|
||||
let res = await ovenInAndOut(this.val1, this.val2,'', '', type)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
|
||||
Reference in New Issue
Block a user