Commit f1499cf6 by wusiyi

fix: 打印生产单bug修复

parent 11b50b9b
...@@ -382,7 +382,7 @@ ...@@ -382,7 +382,7 @@
</ElButton> </ElButton>
</span> --> </span> -->
<span class="item"> <span class="item">
<ElButton type="primary" @click="printProductionOrder(null)"> <ElButton type="primary" @click="printProductionOrder(2, null)">
打印生产单 打印生产单
</ElButton> </ElButton>
</span> </span>
...@@ -1291,7 +1291,7 @@ ...@@ -1291,7 +1291,7 @@
size="small" size="small"
type="success" type="success"
style="height: 23px" style="height: 23px"
@click="printProductionOrder(item)" @click="printProductionOrder(1, item)"
>打印生产单 >打印生产单
</el-button> </el-button>
</div> </div>
...@@ -4127,11 +4127,16 @@ const assignOrder = async () => { ...@@ -4127,11 +4127,16 @@ const assignOrder = async () => {
// loading.close() // loading.close()
// } // }
// } // }
const printProductionOrder = async (item?: PodUsOrderListData | null) => { const printProductionOrder = async (
if (status.value !== 'WAIT_SHIPMENT' && cardSelection.value.length === 0) { type: 1 | 2,
item: PodUsOrderListData | null,
) => {
if (type === 2 && cardSelection.value.length === 0) {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
} }
const orderIds = item ? [item.id] : cardSelection.value.map((item) => item.id)
const orderIds =
type === 1 ? [item!.id] : cardSelection.value.map((item) => item.id)
const loading = ElLoading.service({ const loading = ElLoading.service({
fullscreen: true, fullscreen: true,
text: '操作中...', text: '操作中...',
......
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