Commit 7f9a1976 by zhuzhequan

添加排版功能

parent 5cb420f2
...@@ -64,7 +64,7 @@ declare module 'vue' { ...@@ -64,7 +64,7 @@ declare module 'vue' {
ShipmentOrderDetail: typeof import('./src/components/ShipmentOrderDetail.vue')['default'] ShipmentOrderDetail: typeof import('./src/components/ShipmentOrderDetail.vue')['default']
SplitDiv: typeof import('./src/components/splitDiv/splitDiv.vue')['default'] SplitDiv: typeof import('./src/components/splitDiv/splitDiv.vue')['default']
'Switch ': typeof import('./src/components/Form.vue/Switch .vue')['default'] 'Switch ': typeof import('./src/components/Form.vue/Switch .vue')['default']
TableRightClickMenu: typeof import('./src/components/TableRightClickMenu.vue')['default'] TableRightMenu: typeof import('./src/components/TableRightMenu.vue')['default']
TableView: typeof import('./src/components/TableView.vue')['default'] TableView: typeof import('./src/components/TableView.vue')['default']
UploadExcel: typeof import('./src/components/UploadExcel.vue')['default'] UploadExcel: typeof import('./src/components/UploadExcel.vue')['default']
UploadImage: typeof import('./src/components/UploadImage.vue')['default'] UploadImage: typeof import('./src/components/UploadImage.vue')['default']
......
...@@ -4,7 +4,7 @@ import { showError } from '@/utils/ui.ts' ...@@ -4,7 +4,7 @@ import { showError } from '@/utils/ui.ts'
const axios = Axios.create({ const axios = Axios.create({
baseURL: import.meta.env.VITE_API_BASE, baseURL: import.meta.env.VITE_API_BASE,
timeout: 30000, timeout: 300000, //凯哥让改的超时时间
}) })
const TOKEN_KEY = 'token' const TOKEN_KEY = 'token'
......
...@@ -306,6 +306,16 @@ export function createLogisticsOrderApi(params: { ...@@ -306,6 +306,16 @@ export function createLogisticsOrderApi(params: {
params, params,
) )
} }
// 更改物流
export function composingDesignImages(data:number[]) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/composingDesignImages',
data,{
responseType: 'blob', // 设置响应类型为 Blob(处理二进制流)
}
)
}
// 转至待拣胚 // 转至待拣胚
export function updateLogisticsToPickingApi(params: { ids: string }) { export function updateLogisticsToPickingApi(params: { ids: string }) {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
......
...@@ -230,6 +230,9 @@ ...@@ -230,6 +230,9 @@
</div> </div>
</div> </div>
<div class="operation-box mb-10"> <div class="operation-box mb-10">
<span v-if="status === 'PICKING'" class="item">
<ElButton :loading="downloadLoading" type="primary" @click="downloadTif"> 排版 </ElButton>
</span>
<span v-if="status === 'TO_BE_CONFIRMED'" class="item"> <span v-if="status === 'TO_BE_CONFIRMED'" class="item">
<ElButton type="success" @click="confirmOrder"> 确认 </ElButton> <ElButton type="success" @click="confirmOrder"> 确认 </ElButton>
</span> </span>
...@@ -1218,6 +1221,7 @@ import { ...@@ -1218,6 +1221,7 @@ import {
getTrackingNumberApi, getTrackingNumberApi,
getfaceSimplexFileApi, getfaceSimplexFileApi,
cancelLogisticsOrderApi, cancelLogisticsOrderApi,
composingDesignImages,
changeLogisticsApi, changeLogisticsApi,
createLogisticsOrderApi, createLogisticsOrderApi,
updateLogisticsToPickingApi, updateLogisticsToPickingApi,
...@@ -1270,6 +1274,7 @@ declare global { ...@@ -1270,6 +1274,7 @@ declare global {
const tabsNav = ref<Tab[]>() const tabsNav = ref<Tab[]>()
const resultRefs = ref<InstanceType<typeof ResultInfo> | null>(null) const resultRefs = ref<InstanceType<typeof ResultInfo> | null>(null)
const confirmDialogShow = ref(false) const confirmDialogShow = ref(false)
const downloadLoading = ref(false)
const isChangeWay = ref(false) const isChangeWay = ref(false)
const confirmData = ref([]) const confirmData = ref([])
const logisticsWayData = ref([]) const logisticsWayData = ref([])
...@@ -1598,6 +1603,22 @@ const confirmOrder = async () => { ...@@ -1598,6 +1603,22 @@ const confirmOrder = async () => {
productionClientValue.value = '' productionClientValue.value = ''
productionClientVisible.value = true productionClientVisible.value = true
} }
const downloadTif = async () => {
if(!selection.value.length) {
return ElMessage.warning('请选择数据')
}
downloadLoading.value = true
try {
const res= await composingDesignImages(selection.value.map(el=>el.id))
window.open(filePath+res.message, '_blank')
downloadLoading.value = false
}catch (e){
downloadLoading.value = false
}
}
const loadProductionClient = async () => { const loadProductionClient = async () => {
try { try {
const res = await getProductionClientApi() const res = await getProductionClientApi()
......
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