分切暂存下料需求修改

This commit is contained in:
2024-08-15 13:44:51 +08:00
parent 17651c5c9d
commit 6023362db2
2 changed files with 49 additions and 14 deletions

View File

@@ -23,19 +23,17 @@
</view>
</view>
<view class="zd-row submitbar">
<button class="zd-col-6 btn-submit btn-default letter-30" @tap="clearUp">清空</button>
<button class="zd-col-15 btn-submit btn-success letter-30" :class="{'btn-info': !index}" @tap="toSure">确认</button>
<button class="zd-col-5 btn-submit btn-default letter-30" @tap="clearUp">清空</button>
<button class="zd-col-8 btn-submit btn-success letter-30" :class="{'btn-info': !index || index2 === 'B2'}" :disabled="disabled" @tap="toSure(2)">暂存区</button>
<button class="zd-col-8 btn-submit btn-success letter-30" :class="{'btn-info': !index}" :disabled="disabled" @tap="toSure(1)">内包间</button>
</view>
<uni-popup ref="alertDialog" type="dialog">
<uni-popup-dialog type="info" cancelText="关闭" confirmText="确定" title="提示" content="确认是否创建送到内包间AGV任务" @confirm="dialogConfirm"></uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import {queryProductArea} from '@/utils/getData2.js'
import {getCutCacheAgvPoints, sendSubVolumeToNBJ, queryCacheDownSubVolumeInfos} from '@/utils/getData3.js'
import {getCutCacheAgvPoints, sendSubVolumeToNBJ, queryCacheDownSubVolumeInfos, markingFoilSlittingToCache} from '@/utils/getData3.js'
export default {
components: {
NavBar
@@ -48,7 +46,8 @@
newoptions: [],
options2: [],
index2: '',
obj: {a_point: '-', b_point: '-', status: '-'}
obj: {a_point: '-', b_point: '-', status: '-'},
disabled: false
};
},
onLoad (options) {
@@ -105,14 +104,33 @@
this.options = [...res]
this.newoptions = [...res]
},
toSure () {
if (!this.index) {
toSure (type) {
this.disabled = true
if (!this.index && type === 1) {
this.disabled = false
return
}
this.$refs.alertDialog.open()
},
dialogConfirm () {
this._sendSubVolumeToNBJ()
if ((!this.index || this.index2 === 'B2') && type === 2) {
this.disabled = false
return
}
uni.showModal({
title: '提示',
content: '确认是否创建送到内包间AGV任务',
confirmColor: '#ff6a00',
success: (res) => {
if (res.confirm) {
if (type === 1) {
this._sendSubVolumeToNBJ()
}
if (type === 2) {
this._markingFoilSlittingToCache()
}
} else if (res.cancel) {
this.disabled = false
}
}
})
},
async _sendSubVolumeToNBJ () {
try {
@@ -121,8 +139,21 @@
title: res.message,
icon: 'none'
})
this.disabled = false
} catch (e) {
console.log(e)
this.disabled = false
}
},
async _markingFoilSlittingToCache () {
try {
let res = await markingFoilSlittingToCache(this.index)
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled = false
} catch (e) {
this.disabled = false
}
},
clearUp () {