Commit 0b0ca16b by zhuzhequan

Merge branch 'dev' into 'master'

Dev

See merge request !102
parents 2d4870d1 0eabaffd
......@@ -52,7 +52,7 @@ export function printProductionQrCode(id: number, orderFrom: string) {
return axios.get<never, BaseRespData<PodProductList>>(
'factory/podJomallOrderProductCnUs/printProductionQrCode',
{
params:{
params: {
orderFrom,
id
}
......@@ -65,6 +65,18 @@ export function refreshJMProductInfo(data: number[]) {
data,
)
}
// 状态推送
export function statusPushApi(ids: string) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrder/statusPush',
null,
{
params: {
ids,
},
},
)
}
export function getOrderList(
data: SearchForm,
currentPage: number,
......
......@@ -248,6 +248,9 @@
<ElFormItem v-if="['TO_BE_RECEIPT', 'COMPLETE'].includes(status)">
<ElButton type="success" @click="toExport"> 导出对账单</ElButton>
</ElFormItem>
<ElFormItem v-if="['TO_BE_RECEIPT'].includes(status)">
<ElButton type="warning" @click="statusPush"> 状态推送</ElButton>
</ElFormItem>
<ElFormItem
v-if="['TO_BE_CONFIRMED', 'IN_PRODUCTION'].includes(status)"
>
......@@ -1279,6 +1282,7 @@ import {
getInProductionCount,
getWaitShipmentCount,
refreshJMProductInfo,
statusPushApi,
reasonInvalidationApi,
syncSubOrderDesignImages,
applyForReplenishmentApi,
......@@ -1577,6 +1581,39 @@ const toExport = () => {
exportVisible.value = true
exportTime.value = []
}
const statusPush = async () => {
if (selection.value.length === 0) {
return ElMessage({
message: '请选择订单',
type: 'warning',
offset: window.innerHeight / 2,
})
}
try {
await showConfirm('是否进行状态推送', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
} catch {
return
}
const ids = selection.value
.map((item: CardOrderData | PodProductList) => item.id as number)
.join(',')
try {
const res = await statusPushApi(ids)
ElMessage({
message: res.message,
type: 'success',
offset: window.innerHeight / 2,
})
loadTabData()
loadDiffList()
} catch (e) {
console.error(e)
}
}
const exportData = async () => {
if (!exportTime.value || exportTime.value.length === 0) {
return ElMessage.warning('请选择时间')
......@@ -2323,7 +2360,9 @@ const printManuscript = async () => {
})
}
const ids = []
if (['IN_PRODUCTION','TO_BE_CONFIRMED', 'WAIT_SHIPMENT'].includes(status.value)) {
if (
['IN_PRODUCTION', 'TO_BE_CONFIRMED', 'WAIT_SHIPMENT'].includes(status.value)
) {
ids.push(
...selection.value.map((item: CardOrderData | PodProductList) => item.id),
)
......
......@@ -842,4 +842,8 @@ defineExpose({ getExamineInfo, reset, getPriceDetail })
font-size: 12px;
}
}
.color-images-list{
overflow-y: auto;
overflow-x: hidden;
}
</style>
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