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) { ...@@ -52,7 +52,7 @@ export function printProductionQrCode(id: number, orderFrom: string) {
return axios.get<never, BaseRespData<PodProductList>>( return axios.get<never, BaseRespData<PodProductList>>(
'factory/podJomallOrderProductCnUs/printProductionQrCode', 'factory/podJomallOrderProductCnUs/printProductionQrCode',
{ {
params:{ params: {
orderFrom, orderFrom,
id id
} }
...@@ -65,6 +65,18 @@ export function refreshJMProductInfo(data: number[]) { ...@@ -65,6 +65,18 @@ export function refreshJMProductInfo(data: number[]) {
data, data,
) )
} }
// 状态推送
export function statusPushApi(ids: string) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrder/statusPush',
null,
{
params: {
ids,
},
},
)
}
export function getOrderList( export function getOrderList(
data: SearchForm, data: SearchForm,
currentPage: number, currentPage: number,
......
...@@ -248,6 +248,9 @@ ...@@ -248,6 +248,9 @@
<ElFormItem v-if="['TO_BE_RECEIPT', 'COMPLETE'].includes(status)"> <ElFormItem v-if="['TO_BE_RECEIPT', 'COMPLETE'].includes(status)">
<ElButton type="success" @click="toExport"> 导出对账单</ElButton> <ElButton type="success" @click="toExport"> 导出对账单</ElButton>
</ElFormItem> </ElFormItem>
<ElFormItem v-if="['TO_BE_RECEIPT'].includes(status)">
<ElButton type="warning" @click="statusPush"> 状态推送</ElButton>
</ElFormItem>
<ElFormItem <ElFormItem
v-if="['TO_BE_CONFIRMED', 'IN_PRODUCTION'].includes(status)" v-if="['TO_BE_CONFIRMED', 'IN_PRODUCTION'].includes(status)"
> >
...@@ -1279,6 +1282,7 @@ import { ...@@ -1279,6 +1282,7 @@ import {
getInProductionCount, getInProductionCount,
getWaitShipmentCount, getWaitShipmentCount,
refreshJMProductInfo, refreshJMProductInfo,
statusPushApi,
reasonInvalidationApi, reasonInvalidationApi,
syncSubOrderDesignImages, syncSubOrderDesignImages,
applyForReplenishmentApi, applyForReplenishmentApi,
...@@ -1577,6 +1581,39 @@ const toExport = () => { ...@@ -1577,6 +1581,39 @@ const toExport = () => {
exportVisible.value = true exportVisible.value = true
exportTime.value = [] 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 () => { const exportData = async () => {
if (!exportTime.value || exportTime.value.length === 0) { if (!exportTime.value || exportTime.value.length === 0) {
return ElMessage.warning('请选择时间') return ElMessage.warning('请选择时间')
...@@ -2323,7 +2360,9 @@ const printManuscript = async () => { ...@@ -2323,7 +2360,9 @@ const printManuscript = async () => {
}) })
} }
const ids = [] 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( ids.push(
...selection.value.map((item: CardOrderData | PodProductList) => item.id), ...selection.value.map((item: CardOrderData | PodProductList) => item.id),
) )
......
...@@ -842,4 +842,8 @@ defineExpose({ getExamineInfo, reset, getPriceDetail }) ...@@ -842,4 +842,8 @@ defineExpose({ getExamineInfo, reset, getPriceDetail })
font-size: 12px; font-size: 12px;
} }
} }
.color-images-list{
overflow-y: auto;
overflow-x: hidden;
}
</style> </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