Commit f1499cf6 by wusiyi

fix: 打印生产单bug修复

parent 11b50b9b
......@@ -382,7 +382,7 @@
</ElButton>
</span> -->
<span class="item">
<ElButton type="primary" @click="printProductionOrder(null)">
<ElButton type="primary" @click="printProductionOrder(2, null)">
打印生产单
</ElButton>
</span>
......@@ -1291,7 +1291,7 @@
size="small"
type="success"
style="height: 23px"
@click="printProductionOrder(item)"
@click="printProductionOrder(1, item)"
>打印生产单
</el-button>
</div>
......@@ -4127,11 +4127,16 @@ const assignOrder = async () => {
// loading.close()
// }
// }
const printProductionOrder = async (item?: PodUsOrderListData | null) => {
if (status.value !== 'WAIT_SHIPMENT' && cardSelection.value.length === 0) {
const printProductionOrder = async (
type: 1 | 2,
item: PodUsOrderListData | null,
) => {
if (type === 2 && cardSelection.value.length === 0) {
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({
fullscreen: true,
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