Commit 175c8ae8 by qinjianhui

Merge branch 'fix_warehouseId' into 'dev'

Fix warehouse

See merge request !206
parents 6a0ecb04 09b0149e
...@@ -192,11 +192,7 @@ ...@@ -192,11 +192,7 @@
<span v-else>验货中。。。</span> <span v-else>验货中。。。</span>
</div> </div>
<div class="box-top-item-btn"> <div class="box-top-item-btn">
<ElButton <ElButton type="primary" @click="manualPrint">手动打印 </ElButton>
type="primary"
@click="manualPrint"
>手动打印
</ElButton>
<ElButton type="primary" @click="printNormal">普货拣货 </ElButton> <ElButton type="primary" @click="printNormal">普货拣货 </ElButton>
<ElButton type="success" @click="handlePrintFinish" <ElButton type="success" @click="handlePrintFinish"
>打单完成 >打单完成
...@@ -605,9 +601,9 @@ const messageChange = (data: WebSocketMessage) => { ...@@ -605,9 +601,9 @@ const messageChange = (data: WebSocketMessage) => {
} }
} }
const manualPrint = ()=>{ const manualPrint = () => {
if(podOrderDetailsData.value){ if (podOrderDetailsData.value) {
print(podOrderDetailsData.value, true ) print(podOrderDetailsData.value, true)
productionOrderRef.value.focus() productionOrderRef.value.focus()
} }
} }
...@@ -645,7 +641,6 @@ const printNormal = async () => { ...@@ -645,7 +641,6 @@ const printNormal = async () => {
ElMessage.success('操作成功') ElMessage.success('操作成功')
productionOrderRef.value.focus() productionOrderRef.value.focus()
window.open(filePath + res.message) window.open(filePath + res.message)
} }
const initPrintDevice = () => { const initPrintDevice = () => {
const lodop = getCLodop(null, null) const lodop = getCLodop(null, null)
...@@ -795,6 +790,9 @@ const initOrderDetailBox = async () => { ...@@ -795,6 +790,9 @@ const initOrderDetailBox = async () => {
if (!factoryNo) { if (!factoryNo) {
return return
} }
if (!warehouseId.value) {
return ElMessage.warning('请选择仓库')
}
const loading = ElLoading.service({ const loading = ElLoading.service({
fullscreen: true, fullscreen: true,
text: '加载中...', text: '加载中...',
...@@ -1056,6 +1054,9 @@ const print = (data: OrderData, forcePrint = false, callback?: () => void) => { ...@@ -1056,6 +1054,9 @@ const print = (data: OrderData, forcePrint = false, callback?: () => void) => {
} }
const factoryNo = userStore.user?.factory.id const factoryNo = userStore.user?.factory.id
if (!factoryNo) return if (!factoryNo) return
if (!warehouseId.value) {
return ElMessage.warning('请选择仓库')
}
orderStore.setPodBoxList({ orderStore.setPodBoxList({
boxList: item ? item.data : null, boxList: item ? item.data : null,
factoryNo, factoryNo,
......
...@@ -406,7 +406,11 @@ const podOrderDetailsColumns = computed(() => [ ...@@ -406,7 +406,11 @@ const podOrderDetailsColumns = computed(() => [
<div> <div>
{operationNo} {operationNo}
{statusText && ( {statusText && (
<ElTag size="small" type={type} style={{ marginLeft: '6px', ...style }}> <ElTag
size="small"
type={type}
style={{ marginLeft: '6px', ...style }}
>
{statusText} {statusText}
</ElTag> </ElTag>
)} )}
...@@ -879,6 +883,9 @@ const initOrderDetailBox = async () => { ...@@ -879,6 +883,9 @@ const initOrderDetailBox = async () => {
if (!factoryNo) { if (!factoryNo) {
return return
} }
if (!warehouseId.value) {
return ElMessage.warning('请选择仓库')
}
const loading = ElLoading.service({ const loading = ElLoading.service({
fullscreen: true, fullscreen: true,
text: '加载中...', text: '加载中...',
...@@ -1159,6 +1166,9 @@ const print = (data: OrderData, forcePrint = false, callback?: () => void) => { ...@@ -1159,6 +1166,9 @@ const print = (data: OrderData, forcePrint = false, callback?: () => void) => {
} }
const factoryNo = userStore.user?.factory.id const factoryNo = userStore.user?.factory.id
if (!factoryNo) return if (!factoryNo) return
if (!warehouseId.value) {
return ElMessage.warning('请选择仓库')
}
orderStore.setPodBoxList({ orderStore.setPodBoxList({
url: props.initUrl, url: props.initUrl,
fromUser: userStore.user ? userStore.user.id : 0, fromUser: userStore.user ? userStore.user.id : 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment