代码更新:
1. 备料界面增加待配料列表 2. 增加打印确认完标签的功能 3. 修复打印标签点击两次的问题
This commit is contained in:
parent
80dc563108
commit
e2ac7a73c6
|
|
@ -73,6 +73,15 @@ const getWorkByStandAndGoods = (params) => {
|
|||
})
|
||||
}
|
||||
|
||||
const getWorkGoodsList = (params) => {
|
||||
return request({
|
||||
url: '/task/getWorkGoodsList',
|
||||
method: 'post',
|
||||
data: params,
|
||||
timeout: 10000
|
||||
})
|
||||
}
|
||||
|
||||
const confirmFinishedWork = (params) => {
|
||||
return request({
|
||||
url: '/task/confirmFinishedWork',
|
||||
|
|
@ -145,6 +154,14 @@ const requestPrintData = (params) => {
|
|||
})
|
||||
}
|
||||
|
||||
const requestOldPrintData = (params) => {
|
||||
return request({
|
||||
url: '/task/requestOldPrintData',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
const requestSortBox = (params) => {
|
||||
return request({
|
||||
url: '/task/requestSortBox',
|
||||
|
|
@ -236,5 +253,7 @@ export {
|
|||
updatePickTasks,
|
||||
clcNoPlan,
|
||||
clcNoPlanConfirmBack,
|
||||
finishSortBox
|
||||
finishSortBox,
|
||||
getWorkGoodsList,
|
||||
requestOldPrintData
|
||||
}
|
||||
|
|
@ -132,6 +132,17 @@
|
|||
</div>
|
||||
</el-form>
|
||||
</fieldset>
|
||||
<fieldset class="goods-list-area" v-if="pickingGoodsList.length > 0">
|
||||
<legend>
|
||||
待拣选物料列表
|
||||
</legend>
|
||||
<el-table :data="pickingGoodsList" stripe border max-height="200px"
|
||||
:header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }">
|
||||
<el-table-column prop="vehicleId" label="箱号" min-width="120px" />
|
||||
<el-table-column prop="goodsId" label="料号" min-width="120px" />
|
||||
<el-table-column prop="goodsName" label="料名" min-width="120px" show-overflow-tooltip />
|
||||
</el-table>
|
||||
</fieldset>
|
||||
<el-dialog v-model="dialogVisible" title="异常箱料处理" width="40%" draggable :show-close="false">
|
||||
<div style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
|
||||
<el-form ref="exceptionHandleFormRef" :model="exceptionHandleFormEntity" :label-position="labelPosition"
|
||||
|
|
@ -166,7 +177,7 @@
|
|||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { getWorkByStandAndGoods, confirmFinishWork, queryFinishByStandAndGoods } from '@/api/task'
|
||||
import { getWorkByStandAndGoods, confirmFinishWork, queryFinishByStandAndGoods, getWorkGoodsList } from '@/api/task'
|
||||
import { handleExceptionStock } from '@/api/stock'
|
||||
import { errorBox, warningBox } from '@/utils/myMessageBox.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
|
@ -202,13 +213,15 @@ export default {
|
|||
}),
|
||||
exceptionHandleFormEntity: reactive({}),
|
||||
exceptionHandleFormRef: ref(),
|
||||
dialogVisible: false
|
||||
dialogVisible: false,
|
||||
pickingGoodsList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.goodsId.focus()
|
||||
this.timer = setInterval(() => {
|
||||
this.queryFinish()
|
||||
// this.getWorkList()
|
||||
}, 1500)
|
||||
},
|
||||
beforeUnmount() {
|
||||
|
|
@ -279,6 +292,23 @@ export default {
|
|||
console.log(err)
|
||||
})
|
||||
},
|
||||
getWorkList() {
|
||||
const request = {
|
||||
standId: this.standId,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
getWorkGoodsList(request).then(res => {
|
||||
const response = res.data
|
||||
if (response.code == 0) {
|
||||
this.pickingGoodsList = response.returnData
|
||||
} else {
|
||||
this.pickingGoodsList = []
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
this.pickingGoodsList = []
|
||||
})
|
||||
},
|
||||
// 重置参数
|
||||
resetForms() {
|
||||
this.workFormEntity.goodsId = ''
|
||||
|
|
@ -521,4 +551,16 @@ export default {
|
|||
font-weight: bold;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.goods-list-area {
|
||||
margin: auto;
|
||||
min-height: fit-content;
|
||||
max-height: 90%;
|
||||
margin-bottom: 10px;
|
||||
min-width: inherit;
|
||||
border: solid 1px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 15px 10px -15px #000;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -13,7 +13,15 @@
|
|||
<span class="station-text">工作站:</span>
|
||||
</div>
|
||||
<div class="station-no-div">
|
||||
<span class="station-no-text">{{ standId }}</span>
|
||||
<el-popover placement="top-start" title="提示" :width="250" trigger="hover"
|
||||
content="点击此处打印上次确认过的标签" popper-style="background-color: #F0FFFF;">
|
||||
<template #reference>
|
||||
<span class="station-no-text" @click="requestPrintOld()">
|
||||
<Printer style="display: none;" />
|
||||
{{ standId }}
|
||||
</span>
|
||||
</template>
|
||||
</el-popover>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="main-area">
|
||||
|
|
@ -95,7 +103,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div style="margin: 10px;">
|
||||
<div class="arrow" @click="requestPrint()" v-print="'#printArea'">
|
||||
<div class="arrow" @click="requestPrint()">
|
||||
<Printer style="display: none;" />
|
||||
<span
|
||||
style="margin-left: 25px; align-self: center; font-weight: bold;font-size: 45px; writing-mode: vertical-lr;">打印标签</span>
|
||||
|
|
@ -111,6 +119,7 @@
|
|||
</el-form>
|
||||
</fieldset>
|
||||
<div style="width: 0;height: 0;overflow: hidden">
|
||||
<button ref="printBtn" style="display: none;" v-print="printObj"></button>
|
||||
<!-- <div> -->
|
||||
<div id="printArea" class="objectDialogFlowPrint">
|
||||
<!-- <div class="myPrint"> -->
|
||||
|
|
@ -139,10 +148,11 @@
|
|||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { getFinishedWorkInfo, confirmFinishedWork, requestPrintData } from '@/api/task'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { getFinishedWorkInfo, confirmFinishedWork, requestPrintData, requestOldPrintData } from '@/api/task'
|
||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||
import { errorBox } from '@/utils/myMessageBox.js'
|
||||
import { reactive, ref } from 'vue'
|
||||
import loading from '@/utils/loading.js'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
</script>
|
||||
|
||||
|
|
@ -150,6 +160,7 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
|||
export default {
|
||||
name: 'finishKitting',
|
||||
data() {
|
||||
let self = this
|
||||
return {
|
||||
standId: store.getters.getStandId,
|
||||
// timer: '',
|
||||
|
|
@ -168,7 +179,34 @@ export default {
|
|||
{ required: true, message: '请输入料号' }
|
||||
]
|
||||
}),
|
||||
printTabs: []
|
||||
printTabs: [],
|
||||
printObj: {
|
||||
id: "printArea", // 这里是要打印元素的ID
|
||||
popTitle: " ", // 打印的标题
|
||||
extraCss: "", // 打印可引入外部的一个 css 文件
|
||||
extraHead: "", // 打印头部文字
|
||||
preview: false, // 是否启动预览模式,默认是false
|
||||
previewTitle: '打印客户账单', // 打印预览的标题
|
||||
previewPrintBtnLabel: '预览结束,开始打印', // 打印预览的标题下方的按钮文本,点击可进入打印
|
||||
zIndex: 10002, // 预览窗口的z-index,默认是20002,最好比默认值更高
|
||||
previewBeforeOpenCallback() {
|
||||
// console.log('正在加载预览窗口!');
|
||||
}, // 预览窗口打开之前的callback
|
||||
previewOpenCallback() { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback
|
||||
beforeOpenCallback() {
|
||||
// console.log('开始打印之前!')
|
||||
}, // 开始打印之前的callback
|
||||
openCallback() {
|
||||
// console.log('执行打印了!')
|
||||
}, // 调用打印时的callback
|
||||
closeCallback() {
|
||||
// console.log('关闭了打印工具!')
|
||||
}, // 关闭打印的callback(无法区分确认or取消)
|
||||
clickMounted() {
|
||||
// console.log('点击v-print绑定的按钮了!')
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -238,21 +276,50 @@ export default {
|
|||
})
|
||||
},
|
||||
requestPrint() {
|
||||
loading.open('请求数据中,请稍等...')
|
||||
// 获取打印标签的数据
|
||||
const printParams = {
|
||||
standId: this.standId,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
requestPrintData(printParams).then(res => {
|
||||
loading.close()
|
||||
if (res.data.code == 0) {
|
||||
this.printTabs = res.data.returnData
|
||||
this.$nextTick(() => {
|
||||
this.$refs.printBtn.click()
|
||||
});
|
||||
} else {
|
||||
errorBox(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
loading.close()
|
||||
console.log(err)
|
||||
errorBox('获取标签数据时异常')
|
||||
})
|
||||
},
|
||||
requestPrintOld() {
|
||||
loading.open('请求数据中,请稍等...')
|
||||
// 获取打印标签的数据
|
||||
const printParams = {
|
||||
standId: this.standId,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
requestOldPrintData(printParams).then(res => {
|
||||
loading.close()
|
||||
if (res.data.code == 0) {
|
||||
this.printTabs = res.data.returnData
|
||||
this.$nextTick(() => {
|
||||
this.$refs.printBtn.click()
|
||||
});
|
||||
} else {
|
||||
errorBox(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
loading.close()
|
||||
console.log(err)
|
||||
errorBox('获取标签数据(确认过)时异常')
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -362,6 +429,9 @@ export default {
|
|||
align-self: center;
|
||||
font-weight: bold;
|
||||
font-size: 25px;
|
||||
cursor: pointer;
|
||||
background-color: white;
|
||||
border: white;
|
||||
}
|
||||
|
||||
.display-title-div {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user