入冷却

This commit is contained in:
2022-10-17 10:13:52 +08:00
parent b2a505ed78
commit ba66f9f0c9
2 changed files with 29 additions and 2 deletions

View File

@@ -36,6 +36,7 @@
<view class="submit-bar"> <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('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="disabled" @tap="_ovenInAndOut('2')">出箱</button>
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled3" @tap="_inCoolIvt">入冷却</button>
</view> </view>
</view> </view>
</template> </template>
@@ -43,7 +44,7 @@
<script> <script>
import NavBar from '@/components/NavBar.vue' import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue' import SearchBox from '@/components/SearchBox.vue'
import {ovenInAndOut} from '@/utils/getData1.js' import {ovenInAndOut, inCoolIvt} from '@/utils/getData1.js'
export default { export default {
components: { components: {
NavBar, NavBar,
@@ -55,7 +56,8 @@
val2: '', val2: '',
val3: '', val3: '',
val4: '', val4: '',
disabled: false disabled: false,
disabled3: false
}; };
}, },
methods: { methods: {
@@ -78,6 +80,23 @@
} catch (e) { } catch (e) {
this.disabled = false 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
}
} }
} }
} }

View File

@@ -66,6 +66,14 @@ export const ovenInAndOut = (pcode, cname, temp, hours, option) => request({
option: option, option: option,
} }
}) })
// 1.2入冷却
export const inCoolIvt = (pcode, cname) => request({
url: 'api/pda/baking/inCoolIvt',
data: {
point_code: pcode,
container_name: cname
}
})
// 点位管理 // 点位管理
// 1.1点位解绑绑定 // 1.1点位解绑绑定