diff --git a/dist.tar.gz b/dist.tar.gz index 93fbffe3..fb618187 100644 Binary files a/dist.tar.gz and b/dist.tar.gz differ diff --git a/src/api/storage/receiving.ts b/src/api/storage/receiving.ts index af0e1932..cec39076 100644 --- a/src/api/storage/receiving.ts +++ b/src/api/storage/receiving.ts @@ -29,18 +29,18 @@ export function getReceivingDetail(data: any): Promise { } // 未使用 -export function getReceivingProduct(data: any): Promise { - return request({ - url: '/system', - method: 'post', - params: { - method: 'storage.receiving.getReceivingProduct', - v, - timestamp: new Date().getTime() - }, - data: data - }) -} +// export function getReceivingProduct(data: any): Promise { +// return request({ +// url: '/system', +// method: 'post', +// params: { +// method: 'storage.receiving.getReceivingProduct', +// v, +// timestamp: new Date().getTime() +// }, +// data: data +// }) +// } export function batchCancelReceiving(data: any): Promise { return request({ @@ -55,18 +55,18 @@ export function batchCancelReceiving(data: any): Promise { }) } -export function exportReceiving(data: any): Promise { - return request({ - url: '/system', - method: 'post', - params: { - method: 'storage.receiving.exportReceiving', - v, - timestamp: new Date().getTime() - }, - data: data - }) -} +// export function exportReceiving(data: any): Promise { +// return request({ +// url: '/system', +// method: 'post', +// params: { +// method: 'storage.receiving.exportReceiving', +// v, +// timestamp: new Date().getTime() +// }, +// data: data +// }) +// } // 发送打印任务 // data: { stationId, printerName, templateId, businessType, businessId, printData } @@ -228,4 +228,18 @@ export function completeReceiving(data: any): Promise { }, data: data }) +} + +// 绑定货主到收货单(入参示例: { receiving_id, store_id }) +export function bindReceivingStore(data: any): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'storage.receiving.bindStore', + v, + timestamp: new Date().getTime() + }, + data: data + }) } \ No newline at end of file diff --git a/src/api/store.ts b/src/api/store.ts index 70581e80..b63f6061 100644 --- a/src/api/store.ts +++ b/src/api/store.ts @@ -83,64 +83,3 @@ export function getStoreRoles(data:any) { isSystemApi: true } as any) } - -/** 查询仓货签约列表 */ -export function storeWarehouseList(data: { - counterparty_id?: number - auth_status?: number - use_status?: number - keyword?: string - page?: number - page_size?: number -}) { - return request({ - url: '/system', - method: 'post', - params: { - method: 'storeWarehouse.store.list', - v, - timestamp: new Date().getTime() - }, - data, - isSystemApi: true - } as any) -} - -/** 发起/预览/确认签约 */ -export function storeWarehouseSign(data: { - temp_code?: string - action?: 'preview' | 'confirm' - counterparty_id?: number - remask?: string -}) { - return request({ - url: '/system', - method: 'post', - params: { - method: 'storeWarehouse.store.sign', - v, - timestamp: new Date().getTime() - }, - data, - isSystemApi: true - } as any) -} - -/** 修改签约关系使用状态 */ -export function storeWarehouseUnbind(data: { - id?: number - counterparty_id?: number - use_status?: number -}) { - return request({ - url: '/system', - method: 'post', - params: { - method: 'storeWarehouse.store.unbind', - v, - timestamp: new Date().getTime() - }, - data, - isSystemApi: true - } as any) -} diff --git a/src/api/storeWarehouse.ts b/src/api/storeWarehouse.ts new file mode 100644 index 00000000..11125a39 --- /dev/null +++ b/src/api/storeWarehouse.ts @@ -0,0 +1,151 @@ +import request from '@/utils/request' +const v = "1.0"; + +/** 查询仓货签约列表 */ +export function storeWarehouseList(data: { + counterparty_id?: number + auth_status?: number + use_status?: number + keyword?: string + page?: number + page_size?: number +}) { + return request({ + url: '/system', + method: 'post', + params: { + method: 'storeWarehouse.store.list', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + +/** 发起/预览/确认签约 */ +export function storeWarehouseSign(data: { + temp_code?: string + action?: 'preview' | 'confirm' + counterparty_id?: number + remask?: string +}) { + return request({ + url: '/system', + method: 'post', + params: { + method: 'storeWarehouse.store.sign', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + +/** 修改签约关系使用状态 */ +export function storeWarehouseUnbind(data: { + id?: number + counterparty_id?: number + use_status?: number +}) { + return request({ + url: '/system', + method: 'post', + params: { + method: 'storeWarehouse.store.unbind', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + +/** 修改签约备注 */ +export function storeWarehouseRename(data: { + id?: number + counterparty_id?: number + remask: string +}) { + return request({ + url: '/system', + method: 'post', + params: { + method: 'storeWarehouse.store.rename', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + +/** 查询签约关系下的奇门接口配置列表 */ +export function storeWarehouseListQimenConfig(data: { + id?: number + counterparty_id?: number + interface_type_id?: number +}) { + return request({ + url: '/system', + method: 'post', + params: { + method: 'storeWarehouse.store.listQimenConfig', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + +/** 保存奇门接口配置(新增或更新) */ +export function storeWarehouseSaveQimenConfig(data: { + id?: number + counterparty_id?: number + interface_type_id?: number + app_name?: string + qimen_app_key: string + qimen_customer_id: string + qimen_warehouse_code: string + api_version?: string + sign_method?: string + rate_limit?: number + timeout_seconds?: number + contact_person?: string + contact_phone?: string + email?: string + is_enabled?: number +}) { + return request({ + url: '/system', + method: 'post', + params: { + method: 'storeWarehouse.store.saveQimenConfig', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + +/** 删除签约关系上的奇门接口配置 */ +export function storeWarehouseDeleteQimenConfig(data: { + id?: number + counterparty_id?: number + interface_type_id?: number +}) { + return request({ + url: '/system', + method: 'post', + params: { + method: 'storeWarehouse.store.deleteQimenConfig', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} diff --git a/src/components/ScanBox/index.vue b/src/components/ScanBox/index.vue index cafc291f..d42a69ce 100644 --- a/src/components/ScanBox/index.vue +++ b/src/components/ScanBox/index.vue @@ -659,7 +659,26 @@ function handleReset() { function handleSubmit() { submitting.value = true - buildAndEmitCustomCondition() + + // 对于自定义筛选,先构建当前条件但不依赖 buildAndEmitCustomCondition 的内部 emit + if (activeTab.value === 'custom') { + const currentConditions = buildConditionsObject() + if (currentConditions && Object.keys(currentConditions).length > 0) { + activeCondition.value = currentConditions + emit('condition-change', activeCondition.value) + } else { + // 没有任何自定义条件时,明确发出空条件,父组件应按无筛选(即 loadList)处理 + activeCondition.value = null + emit('condition-change', {}) + } + } else if (activeTab.value === 'preset') { + // 预设直接发送当前选中的预设条件(可能为 null) + emit('condition-change', activeCondition.value) + } else { + // 兜底:仍然调用构建并可能触发自动提交逻辑 + buildAndEmitCustomCondition() + } + emit('submit', activeCondition.value) setTimeout(() => { submitting.value = false diff --git a/src/views/dashboard/components/AppDownload.vue b/src/views/dashboard/components/AppDownload.vue index eb3fa34c..96db2157 100644 --- a/src/views/dashboard/components/AppDownload.vue +++ b/src/views/dashboard/components/AppDownload.vue @@ -125,7 +125,7 @@ const fetchPdaInfo = async () => { try { loadingPda.value = true pdaError.value = false - const response = await axios.get('/dl-api/pda/latest.json') + const response = await axios.get('http://dl.wms.gztbyc.com/pda/latest.json') if (response.data) { pdaData.value = response.data } @@ -141,7 +141,7 @@ const fetchPrintServerInfo = async () => { try { loadingPrint.value = true printError.value = false - const response = await axios.get('/dl-api/printServer/latest.json') + const response = await axios.get('http://dl.wms.gztbyc.com/printServer/latest.json') if (response.data) { printData.value = response.data } diff --git a/src/views/stock/stock/component/add.vue b/src/views/stock/stock/component/add.vue index a2250b9f..2c633705 100644 --- a/src/views/stock/stock/component/add.vue +++ b/src/views/stock/stock/component/add.vue @@ -305,6 +305,15 @@ const props = defineProps({ stores: { type: Array as () => any[], default: () => [] + }, + // 接受父级传入的初始货主信息(用于在收货明细中添加商品时锁定货主) + initialStore: { + type: Object as () => any, + default: null + }, + storeDisabled: { + type: Boolean, + default: false } }) @@ -327,6 +336,15 @@ const newProhibitedLevel = ref(1) const formData = reactive(JSON.parse(JSON.stringify(stockDefaultFormData))) +// 若父组件传入初始货主,则使用并锁定 +watch(() => props.initialStore, (val) => { + if (val) { + formData.store_id = val.id || val.store_id || val.storeId + } +}, { immediate: true }) + +defineExpose({ formData }) + const originalData = reactive({}) // Validators diff --git a/src/views/stock/stock/index.vue b/src/views/stock/stock/index.vue index d7d8de36..d9b233b3 100644 --- a/src/views/stock/stock/index.vue +++ b/src/views/stock/stock/index.vue @@ -317,7 +317,7 @@ const loadData = async () => { const params = buildStockQuery(currentConditions.value) // 调试用:前端打印查看转换结果,确认 operator/value/type 是否符合预期 - console.log('Query Params:', JSON.stringify(params, null, 2)) + // console.log('Query Params:', JSON.stringify(params, null, 2)) const res = await stockApi.stockWarehouse(pagination, params) if (res && res.data) { diff --git a/src/views/storage/receiving/component/DetailsPanel.vue b/src/views/storage/receiving/component/DetailsPanel.vue index d2057b51..b95d01b7 100644 --- a/src/views/storage/receiving/component/DetailsPanel.vue +++ b/src/views/storage/receiving/component/DetailsPanel.vue @@ -10,7 +10,27 @@ :label="field.label" :prop="field.prop" > -