Commit cb618011 by qinjianhui

feat: POD订单加导出生产单功能

parent 67ae3d39
......@@ -82,6 +82,12 @@ export function printOrder(ids: number[]) {
ids,
)
}
export function exportOrder(ids: number[], status: string | number) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrder/exportData',
{ ids: ids, status },
)
}
// 发货单
export function getDeliveryNoteList(
data: PodDeliveryNoteSearchForm,
......@@ -119,7 +125,7 @@ export function updateRemarkApi(id: number, remark: string) {
'factory/podJomallOrder/setRemark',
{
params: {
productId:id,
productId: id,
remark,
},
},
......
......@@ -39,14 +39,14 @@
style="width: 130px"
></ElInput>
</ElFormItem>
<ElFormItem label="发货单号">
<!-- <ElFormItem label="发货单号">
<ElInput
v-model="searchForm.shipmentNumber"
placeholder="发货单号"
clearable
style="width: 130px"
/>
</ElFormItem>
</ElFormItem> -->
<ElFormItem label="定制生产单号">
<ElInput
v-model="searchForm.factorySubOrderNumber"
......@@ -129,6 +129,14 @@
>打印生产单</ElButton
>
</span>
<span
v-if="status === 'TO_BE_CONFIRMED' || status === 'IN_PRODUCTION'"
class="item"
>
<ElButton type="success" dark @click="exportManuscript"
>导出生产单</ElButton
>
</span>
<span class="item">
<ElButton type="warning" @click="addInternalTag"
>添加内部标签</ElButton
......@@ -146,7 +154,10 @@
下载素材</ElButton
>
</span>
<span v-if="status === 'IN_PRODUCTION' || status === 'PART_SHIPPING'" class="item">
<span
v-if="status === 'IN_PRODUCTION' || status === 'PART_SHIPPING'"
class="item"
>
<ElButton type="success" @click="confirmDelivery">发货</ElButton>
</span>
</div>
......@@ -249,6 +260,14 @@
}}</span>
</div>
<div class="order-list-expand_item_info_title">
<span class="order-list-expand_item_label"
>期望交货时间:</span
>
<span class="order-list-expand_item_value">{{
row.expectDeliveryTime || '--'
}}</span>
</div>
<div class="order-list-expand_item_info_title">
<span class="order-list-expand_item_label">确认时间:</span>
<span class="order-list-expand_item_value">{{
row.startStockingTime || '--'
......@@ -473,6 +492,7 @@ import {
downloadMaterialApi,
addInternalTagApi,
printOrder,
exportOrder,
getLogList,
updateRemarkApi,
} from '@/api/podOrder'
......@@ -630,7 +650,7 @@ const tableColumns = computed<CustomColumn<OrderData[]>>(() => {
{
label: '时间',
key: 'status',
width: 280,
width: 300,
align: 'center',
},
{
......@@ -877,6 +897,39 @@ const printManuscript = async () => {
loading.close()
}
}
const exportManuscript = async () => {
if (selection.value.length === 0) {
return ElMessage({
message: '请选择订单',
type: 'warning',
offset: window.innerHeight / 2,
})
}
const loading = ElLoading.service({
lock: true,
text: '加载中...',
background: 'rgba(0, 0, 0, 0.7)',
})
const ids = selection.value.map((item) => item.id)
try {
await showConfirm('是否导出生产单', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
} catch {
return
}
try {
const res = await exportOrder(ids, status.value)
window.open(filePath + res.message)
} catch (e) {
// showError(e)
console.error(e)
} finally {
loading.close()
}
}
const logVisible = ref(false)
const logList = ref<LogListData[]>([])
// 操作日志
......@@ -1044,7 +1097,7 @@ onMounted(() => {
margin-right: 6px;
}
.order-time {
width: 280px;
width: 300px;
border-right: 1px solid #eee;
}
.order-operate {
......
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