入冷却
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled" @tap="_ovenInAndOut('1')">入箱</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled" @tap="_ovenInAndOut('2')">出箱</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled3" @tap="_inCoolIvt">入冷却</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -43,7 +44,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {ovenInAndOut} from '@/utils/getData1.js'
|
||||
import {ovenInAndOut, inCoolIvt} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -55,7 +56,8 @@
|
||||
val2: '',
|
||||
val3: '',
|
||||
val4: '',
|
||||
disabled: false
|
||||
disabled: false,
|
||||
disabled3: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -78,6 +80,23 @@
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _inCoolIvt () {
|
||||
this.disabled3 = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled3 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await inCoolIvt(this.val1, this.val2)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled3 = false
|
||||
} catch (e) {
|
||||
this.disabled3 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,6 +66,14 @@ export const ovenInAndOut = (pcode, cname, temp, hours, option) => request({
|
||||
option: option,
|
||||
}
|
||||
})
|
||||
// 1.2入冷却
|
||||
export const inCoolIvt = (pcode, cname) => request({
|
||||
url: 'api/pda/baking/inCoolIvt',
|
||||
data: {
|
||||
point_code: pcode,
|
||||
container_name: cname
|
||||
}
|
||||
})
|
||||
|
||||
// 点位管理
|
||||
// 1.1点位解绑绑定
|
||||
|
||||
Reference in New Issue
Block a user