分切暂存下料需求修改

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> </view>
<view class="zd-row submitbar"> <view class="zd-row submitbar">
<button class="zd-col-6 btn-submit btn-default letter-30" @tap="clearUp">清空</button> <button class="zd-col-5 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-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> </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> </view>
</template> </template>
<script> <script>
import NavBar from '@/components/NavBar.vue' import NavBar from '@/components/NavBar.vue'
import {queryProductArea} from '@/utils/getData2.js' 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 { export default {
components: { components: {
NavBar NavBar
@@ -48,7 +46,8 @@
newoptions: [], newoptions: [],
options2: [], options2: [],
index2: '', index2: '',
obj: {a_point: '-', b_point: '-', status: '-'} obj: {a_point: '-', b_point: '-', status: '-'},
disabled: false
}; };
}, },
onLoad (options) { onLoad (options) {
@@ -105,14 +104,33 @@
this.options = [...res] this.options = [...res]
this.newoptions = [...res] this.newoptions = [...res]
}, },
toSure () { toSure (type) {
if (!this.index) { this.disabled = true
if (!this.index && type === 1) {
this.disabled = false
return return
} }
this.$refs.alertDialog.open() if ((!this.index || this.index2 === 'B2') && type === 2) {
}, this.disabled = false
dialogConfirm () { return
this._sendSubVolumeToNBJ() }
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 () { async _sendSubVolumeToNBJ () {
try { try {
@@ -121,8 +139,21 @@
title: res.message, title: res.message,
icon: 'none' icon: 'none'
}) })
this.disabled = false
} catch (e) { } 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 () { clearUp () {

View File

@@ -178,6 +178,10 @@ export const sendSubVolumeToNBJ = (code) => request({
url:'api/pda/slitter/sendSubVolumeToNBJ', url:'api/pda/slitter/sendSubVolumeToNBJ',
data: {point_code: code} data: {point_code: code}
}) })
export const markingFoilSlittingToCache = (code) => request({
url:'api/pda/slitter/markingFoilSlittingToCache',
data: {point_code: code}
})
export const queryCacheDownSubVolumeInfos = (code) => request({ export const queryCacheDownSubVolumeInfos = (code) => request({
url:'api/pda/slitter/queryCacheDownSubVolumeInfos', url:'api/pda/slitter/queryCacheDownSubVolumeInfos',
data: {point_code: code} data: {point_code: code}