diff --git a/core/request/apis.js b/core/request/apis.js
index 91b215d..3f725d9 100644
--- a/core/request/apis.js
+++ b/core/request/apis.js
@@ -203,6 +203,12 @@ export default {
method: "POST",
isSystemApi: true
},
+ getBarcodes: {
+ path: "stock.warehouse.getBarcodes",
+ auth: true,
+ method: "POST",
+ isSystemApi: true
+ },
saveWarehouseStock: {
path: "stock.warehouse.saveWarehouseStock",
auth: true,
@@ -218,6 +224,12 @@ export default {
method: "POST",
isSystemApi: true
},
+ wavePickTaskDetail: {
+ path: "pick.wavePickTaskDetail",
+ auth: true,
+ method: "POST",
+ isSystemApi: true
+ },
items: {
path: "pick.items",
auth: true,
@@ -238,6 +250,12 @@ export default {
auth: true,
method: "POST",
isSystemApi: true
+ },
+ waveStrategyFetchPda: {
+ path: "order.wave.waveStrategyFetchPda",
+ auth: true,
+ method: "POST",
+ isSystemApi: true
}
}
},
diff --git a/pages.json b/pages.json
index 2d9e591..dd4bb51 100644
--- a/pages.json
+++ b/pages.json
@@ -163,6 +163,13 @@
"titleNView": false
}
},
+ {
+ "path" : "pages/work/storage/gBWaveStrategy",
+ "style" :
+ {
+ "titleNView": false
+ }
+ },
{
"path" : "pages/work/order/scatter-picking-detail",
"style" :
diff --git a/pages/work/order/picking.vue b/pages/work/order/picking.vue
index 6d99965..acc0832 100644
--- a/pages/work/order/picking.vue
+++ b/pages/work/order/picking.vue
@@ -1,21 +1,34 @@
-
+
@@ -78,203 +109,299 @@
data() {
return {
title: '订单拣货',
+ taskId: '',
keyword: '',
- fullDisplay: true,
- headerSummary: {
- waveNo: '--',
- pendingReviewCount: 0,
- reviewedCount: 0,
- quantityTotal: 0
+ selectedIndex: 0,
+ loadingTaskDetail: false,
+ selectedItemImageLoading: false,
+ selectedItemImageUrl: '',
+ selectedItemImageUrls: [],
+ itemImageCache: {},
+ itemImageListCache: {},
+ selectedItemBarcodeLoading: false,
+ selectedItemBarcode: '',
+ itemBarcodeCache: {},
+ taskInfo: {
+ taskId: '',
+ taskNo: '',
+ batchNo: '',
+ status: 0
},
- loading: false,
- status: 'all',
- pageSize: 10,
- currentPage: 1,
- totalItems: 0,
- onOrderPickingUpdated: null,
- fullList: [],
- filteredList: [],
- displayList: []
- }
+ boxList: [],
+ pickingSummary: {
+ totalLines: 0,
+ totalQty: 0,
+ distinctSpaces: 0,
+ distinctItems: 0
+ },
+ pickingView: {
+ modeCode: '',
+ modeName: '--',
+ items: []
+ }
+ };
},
computed: {
- statusTabs() {
- return [
- { label: '全部', value: 'all' },
- { label: '待拣货', value: 'pending' },
- { label: '拣货中', value: 'picking' },
- { label: '已完成', value: 'done' }
- ]
+ modeName() {
+ return this.pickingView.modeName || '--';
+ },
+ filteredPickItems() {
+ const list = Array.isArray(this.pickingView.items) ? this.pickingView.items : [];
+ const key = String(this.keyword || '').trim().toLowerCase();
+ if (!key) {
+ return list;
+ }
+ return list.filter(item => {
+ const fields = [
+ item.itemCode,
+ item.itemName,
+ item.spaceName,
+ item.spaceBarcode
+ ]
+ .map(value => String(value || '').toLowerCase());
+ const allocText = (Array.isArray(item.boxAllocations) ? item.boxAllocations : [])
+ .map(alloc => `${alloc.boxNo}`)
+ .join(',')
+ .toLowerCase();
+ return fields.some(text => text.includes(key)) || allocText.includes(key);
+ });
+ },
+ selectedPickItem() {
+ if (!this.filteredPickItems.length) {
+ return null;
+ }
+ return this.filteredPickItems[this.selectedIndex] || this.filteredPickItems[0];
+ }
+ },
+ watch: {
+ filteredPickItems(newList) {
+ if (!Array.isArray(newList) || newList.length === 0) {
+ this.selectedIndex = 0;
+ return;
+ }
+ if (this.selectedIndex > newList.length - 1) {
+ this.selectedIndex = 0;
+ }
+ },
+ selectedPickItem: {
+ handler(item) {
+ this.loadSelectedItemImage(item);
+ this.loadSelectedItemBarcode(item);
+ },
+ immediate: true
}
},
onLoad(options) {
- this.safeDispatchBroadcast('setCallbacks', {
- onResult: this.handleBroadcastResult
- });
- this.safeDispatchBroadcast('start');
-
- this.onOrderPickingUpdated = payload => {
- this.applyOrderUpdate(payload);
- };
- uni.$on('order:picking:updated', this.onOrderPickingUpdated);
-
- if (options && options.status) {
- this.status = options.status;
- }
- if (options && options.waybill_code) {
- this.keyword = String(options.waybill_code || '').trim();
- this.handleSearch({
- silentTip: true
- });
- }
- },
- onShow() {
- this.safeDispatchBroadcast('setCallbacks', {
- onResult: this.handleBroadcastResult
- });
- this.safeDispatchBroadcast('resume');
- },
- onHide() {
- this.safeDispatchBroadcast('pause');
- },
- onUnload() {
- this.safeDispatchBroadcast('stop');
- if (this.onOrderPickingUpdated) {
- uni.$off('order:picking:updated', this.onOrderPickingUpdated);
- this.onOrderPickingUpdated = null;
+ const incomingTaskId = options?.taskId || options?.task_id || '';
+ if (incomingTaskId !== '') {
+ this.taskId = String(incomingTaskId || '').trim();
+ this.requestWavePickTaskDetail();
}
},
methods: {
- safeDispatchBroadcast(action, payload) {
- try {
- const task = this.$store.dispatch(`broadcast/${action}`, payload);
- if (task && typeof task.catch === 'function') {
- task.catch(error => {
- console.warn(`[OrderPicking] broadcast/${action} 调用失败:`, error);
- });
- }
- } catch (error) {
- console.warn(`[OrderPicking] broadcast/${action} 调用异常:`, error);
- }
- },
- normalizeKeyword(value) {
- return String(value || '').replace(/\s+/g, '');
- },
- normalizeScanResult(scanResult) {
- if (!scanResult) {
- return '';
- }
-
- if (typeof scanResult === 'string') {
- return this.normalizeKeyword(scanResult);
- }
-
- if (typeof scanResult.result === 'string') {
- return this.normalizeKeyword(scanResult.result);
- }
-
- if (Array.isArray(scanResult.result)) {
- const firstResult = scanResult.result.find(item => item);
- if (typeof firstResult === 'string') {
- return this.normalizeKeyword(firstResult);
- }
- if (firstResult && typeof firstResult.data === 'string') {
- return this.normalizeKeyword(firstResult.data);
- }
- }
-
- if (typeof scanResult.data === 'string') {
- return this.normalizeKeyword(scanResult.data);
- }
-
- return '';
- },
- handleBroadcastResult(result) {
- const scanResult = this.normalizeScanResult(result);
- if (!scanResult) {
- return;
- }
-
- this.keyword = scanResult;
- this.handleSearch();
- },
- handleScanTrigger() {
- this.safeDispatchBroadcast('resume');
- uni.showToast({
- title: '请使用扫描枪扫码',
- icon: 'none'
- });
- },
getApiErrorMessage(error, fallback = '请求失败') {
const message = error?.message || error?.msg || error?.errMsg || error?.data?.message;
return String(message || fallback);
},
- resetHeaderSummary() {
- this.headerSummary = {
- waveNo: '--',
- pendingReviewCount: 0,
- reviewedCount: 0,
- quantityTotal: 0
- };
+ extractTaskDetailPayload(response) {
+ return response?.data?.data || response?.data || response?.result || response || {};
},
- extractHeaderSummary(response) {
- const dataSource = (response?.data?.data && typeof response.data.data === 'object' && !Array.isArray(response.data.data))
- ? response.data.data
- : ((response?.data && typeof response.data === 'object' && !Array.isArray(response.data))
- ? response.data
- : ((response?.result && typeof response.result === 'object' && !Array.isArray(response.result))
- ? response.result
- : ((response && typeof response === 'object' && !Array.isArray(response)) ? response : null)));
+ normalizeTaskDetailPayload(payload = {}) {
+ const task = payload?.task || {};
+ const summary = payload?.picking_summary || {};
+ const view = payload?.picking_view || {};
+ const viewItems = Array.isArray(view?.items) ? view.items : [];
- if (!dataSource) {
- this.resetHeaderSummary();
+ this.taskInfo = {
+ taskId: task?.task_id ?? this.taskId,
+ taskNo: task?.task_no || '',
+ batchNo: task?.batch_no || '',
+ status: Number(task?.status || 0)
+ };
+ this.boxList = Array.isArray(payload?.boxes) ? payload.boxes : [];
+ this.pickingSummary = {
+ totalLines: Number(summary?.total_lines || 0),
+ totalQty: Number(summary?.total_qty || 0),
+ distinctSpaces: Number(summary?.distinct_spaces || 0),
+ distinctItems: Number(summary?.distinct_items || 0)
+ };
+ this.pickingView = {
+ modeCode: view?.mode_code ?? '',
+ modeName: view?.mode_name || '--',
+ items: viewItems.map(item => ({
+ spaceId: item?.space_id ?? '',
+ spaceName: item?.space_name || item?.location_space?.custom_name || '--',
+ spaceBarcode: item?.location_space?.custom_barcode || '--',
+ itemCode: item?.item_code || '--',
+ itemName: item?.item_name || '--',
+ stockId: Number(item?.stock_id || item?.item_snapshot?.stock_id || 0),
+ totalQty: Number(item?.total_qty || 0),
+ boxAllocations: (Array.isArray(item?.box_allocations) ? item.box_allocations : []).map(alloc => ({
+ boxId: alloc?.box_id ?? '',
+ boxNo: alloc?.box_no ?? '--',
+ allocatedQty: Number(alloc?.allocated_qty || 0)
+ }))
+ }))
+ };
+ this.selectedIndex = 0;
+ },
+ async requestWavePickTaskDetail() {
+ const taskIdNumber = Number(this.taskId || 0);
+ if (!taskIdNumber) {
return;
}
-
- const summary = dataSource.summary && typeof dataSource.summary === 'object' && !Array.isArray(dataSource.summary)
- ? dataSource.summary
- : {};
-
- const toNumber = value => {
- const num = Number(value);
- return Number.isNaN(num) ? 0 : num;
- };
-
- this.headerSummary = {
- waveNo: dataSource.wave_no || dataSource.waveNo || summary.wave_no || summary.waveNo || '--',
- pendingReviewCount: toNumber(summary.pending_review_count ?? summary.pendingReviewCount ?? dataSource.pending_review_count ?? dataSource.pendingReviewCount),
- reviewedCount: toNumber(summary.reviewed_count ?? summary.reviewedCount ?? dataSource.reviewed_count ?? dataSource.reviewedCount),
- quantityTotal: toNumber(summary.quantity_total ?? summary.quantityTotal ?? dataSource.quantity_total ?? dataSource.quantityTotal)
- };
+ this.loadingTaskDetail = true;
+ try {
+ const response = await this.$http('pick.wavePickTaskDetail', {
+ task_id: taskIdNumber
+ });
+ const payload = this.extractTaskDetailPayload(response);
+ this.normalizeTaskDetailPayload(payload);
+ } catch (error) {
+ this.pickingView.items = [];
+ uni.showToast({
+ title: this.getApiErrorMessage(error, '任务详情获取失败'),
+ icon: 'none'
+ });
+ } finally {
+ this.loadingTaskDetail = false;
+ }
},
- normalizeStatus(value) {
- const text = String(value || '').toLowerCase();
- if (!text) {
- return 'pending';
- }
- if (['fin', 'finished', 'done', 'completed', 'complete', 'success'].includes(text)) {
- return 'done';
- }
- if (['picking', 'pick', 'doing', 'processing', 'progress', 'part'].includes(text)) {
- return 'picking';
- }
- return 'pending';
+ clearSearch() {
+ this.keyword = '';
},
- extractOrderList(response) {
- if (Array.isArray(response)) {
- return response;
+ getSelectedItemImageKey(item) {
+ if (!item || typeof item !== 'object') {
+ return '';
}
+ return String(item.stockId || item.itemCode || '').trim();
+ },
+ extractImageListFromGetImagesResponse(response) {
+ if (!response || typeof response !== 'object') {
+ return [];
+ }
+ const candidates = [
+ response.data,
+ response.data && response.data.data,
+ response.data && response.data.images,
+ response.data && response.data.list,
+ response.data && response.data.rows,
+ response.data && response.data.records,
+ response.data && response.data.result,
+ response.data && response.data.result && response.data.result.images,
+ response.data && response.data.result && response.data.result.list,
+ response.images,
+ response.list,
+ response.rows,
+ response.records
+ ];
+ for (let i = 0; i < candidates.length; i += 1) {
+ const current = candidates[i];
+ if (!current) {
+ continue;
+ }
+ if (Array.isArray(current)) {
+ return current;
+ }
+ if (typeof current === 'object') {
+ const objectCandidates = [current.images, current.list, current.rows, current.records, current.data];
+ for (let j = 0; j < objectCandidates.length; j += 1) {
+ if (Array.isArray(objectCandidates[j])) {
+ return objectCandidates[j];
+ }
+ }
+ }
+ }
+ return [];
+ },
+ resolveImageUrlFromEntry(entry) {
+ if (!entry) {
+ return '';
+ }
+ if (typeof entry === 'string') {
+ return entry;
+ }
+ if (typeof entry !== 'object') {
+ return '';
+ }
+ return String(
+ entry.url ||
+ entry.path ||
+ entry.fileUrl ||
+ entry.file_url ||
+ (entry.file && (entry.file.file_url || entry.file.fileUrl)) ||
+ entry.image_url ||
+ entry.img_url ||
+ entry.src ||
+ ''
+ ).trim();
+ },
+ async loadSelectedItemImage(item) {
+ if (!item) {
+ this.selectedItemImageUrl = '';
+ this.selectedItemImageUrls = [];
+ this.selectedItemImageLoading = false;
+ return;
+ }
+ const imageKey = this.getSelectedItemImageKey(item);
+ if (!imageKey) {
+ this.selectedItemImageUrl = '';
+ this.selectedItemImageUrls = [];
+ this.selectedItemImageLoading = false;
+ return;
+ }
+ if (Object.prototype.hasOwnProperty.call(this.itemImageCache, imageKey)) {
+ this.selectedItemImageUrl = this.itemImageCache[imageKey] || '';
+ this.selectedItemImageUrls = Array.isArray(this.itemImageListCache[imageKey]) ? this.itemImageListCache[imageKey] : [];
+ this.selectedItemImageLoading = false;
+ return;
+ }
+ this.selectedItemImageLoading = true;
+ this.selectedItemImageUrl = '';
+ this.selectedItemImageUrls = [];
+ try {
+ const stockId = Number(item.stockId || 0);
+ const response = await this.$http('common.getImages', {
+ id: stockId,
+ business_id: stockId,
+ stock_id: stockId,
+ type: 'stock',
+ business_type: 'stock'
+ });
+ const list = this.extractImageListFromGetImagesResponse(response);
+ const urls = list.map(entry => this.resolveImageUrlFromEntry(entry)).filter(Boolean);
+ const firstUrl = urls[0] || '';
+ this.$set(this.itemImageCache, imageKey, firstUrl || '');
+ this.$set(this.itemImageListCache, imageKey, urls);
+ if (this.getSelectedItemImageKey(this.selectedPickItem) === imageKey) {
+ this.selectedItemImageUrl = firstUrl || '';
+ this.selectedItemImageUrls = urls;
+ }
+ } catch (error) {
+ this.$set(this.itemImageCache, imageKey, '');
+ this.$set(this.itemImageListCache, imageKey, []);
+ if (this.getSelectedItemImageKey(this.selectedPickItem) === imageKey) {
+ this.selectedItemImageUrl = '';
+ this.selectedItemImageUrls = [];
+ }
+ } finally {
+ if (this.getSelectedItemImageKey(this.selectedPickItem) === imageKey) {
+ this.selectedItemImageLoading = false;
+ }
+ }
+ },
+ getSelectedItemBarcodeKey(item) {
+ if (!item || typeof item !== 'object') {
+ return '';
+ }
+ return String(item.stockId || '').trim();
+ },
+ extractBarcodeListFromResponse(response) {
const candidates = [
response?.data,
response?.data?.data,
- response?.data?.list,
- response?.data?.rows,
- response?.data?.items,
- response?.data?.result,
response?.list,
- response?.rows,
- response?.items,
- response?.result
+ response
];
for (let i = 0; i < candidates.length; i += 1) {
if (Array.isArray(candidates[i])) {
@@ -283,210 +410,107 @@
}
return [];
},
- normalizeOrderItem(item, index) {
- const source = item && typeof item === 'object' ? item : {};
- const summary = source.summary && typeof source.summary === 'object' ? source.summary : {};
- const locationSpace = source.location_space && typeof source.location_space === 'object' ? source.location_space : {};
- const storeWarehouse = source.store_warehouse && typeof source.store_warehouse === 'object' ? source.store_warehouse : {};
- const detailList = Array.isArray(source.details)
- ? source.details
- : (Array.isArray(summary.details) ? summary.details : []);
- const pickingStatus = source.picking_status || source.pick_status || source.status || summary.picking_status;
- const inspectionStatus = source.inspection_status || summary.inspection_status;
- return {
- id: source.id || source.order_id || source.pick_id || source.waybill_code || `pick_${index}`,
- orderId: Number(source.order_id || source.orderId || 0),
- orderItemId: Number(source.order_item_id || source.orderItemId || 0),
- orderNo: source.order_no || source.order_code || source.waybill_code || source.waybillCode || '--',
- customerName: source.customer_name || source.consignee || source.receiver_name || '--',
- waveNo: source.wave_no || summary.wave_no || source.wave_code || source.batch_no || '--',
- ownerName: storeWarehouse.store_remask || storeWarehouse.store_name || source.owner_name || source.ownerName || '--',
- quantity: Number(source.quantity || summary.quantity || source.need_qty || summary.need_qty || 0),
- spaceName: source.space_name || locationSpace.space_code || locationSpace.custom_name || summary.space_name || '--',
- spaceStatus: locationSpace.space_status || source.space_status || '',
- pickingStatus: pickingStatus || 'pending',
- inspectionStatus: inspectionStatus || '',
- reviewed: Boolean(source.reviewed),
- skuCount: Number(summary.sku_count || source.sku_count || summary.item_count || source.item_count || source.goods_count || source.detail_count || 0),
- needQty: Number(summary.need_qty || source.need_qty || summary.pick_qty || source.pick_qty || summary.total_qty || source.total_qty || source.total_quantity || 0),
- pickedQty: Number(summary.picked_qty || source.picked_qty || summary.done_qty || source.done_qty || source.finish_qty || source.finished_qty || 0),
- status: this.normalizeStatus(pickingStatus),
- createTime: source.created_at || source.create_time || source.createdAt || '--',
- detailList
- };
- },
- applyFilteredList(resetPage = true) {
- this.filteredList = this.fullList.filter(item => this.status === 'all' || item.status === this.status);
- this.totalItems = this.filteredList.length;
- if (resetPage) {
- this.currentPage = 1;
+ resolveBarcodeFromEntry(entry) {
+ if (!entry) {
+ return '';
}
- this.refreshDisplayList();
+ if (typeof entry === 'string') {
+ return entry.trim();
+ }
+ if (typeof entry !== 'object') {
+ return '';
+ }
+ return String(entry.barcode || entry.code || '').trim();
},
- async handleSearch(options = {}) {
- const resetPage = options.resetPage !== false;
- const silentTip = options.silentTip === true;
- const waybillCode = String(this.keyword || '').trim();
- if (!waybillCode) {
- this.fullList = [];
- this.resetHeaderSummary();
- this.applyFilteredList(true);
- if (!silentTip) {
+ async loadSelectedItemBarcode(item) {
+ if (!item) {
+ this.selectedItemBarcode = '';
+ this.selectedItemBarcodeLoading = false;
+ return;
+ }
+ const barcodeKey = this.getSelectedItemBarcodeKey(item);
+ if (!barcodeKey) {
+ this.selectedItemBarcode = '';
+ this.selectedItemBarcodeLoading = false;
+ return;
+ }
+ if (Object.prototype.hasOwnProperty.call(this.itemBarcodeCache, barcodeKey)) {
+ this.selectedItemBarcode = this.itemBarcodeCache[barcodeKey] || '';
+ this.selectedItemBarcodeLoading = false;
+ return;
+ }
+ this.selectedItemBarcodeLoading = true;
+ this.selectedItemBarcode = '';
+ try {
+ const stockId = Number(item.stockId || 0);
+ const response = await this.$http('stock.warehouse.getBarcodes', {
+ id: stockId
+ });
+ const list = this.extractBarcodeListFromResponse(response);
+ const firstBarcode = this.resolveBarcodeFromEntry(list[0]);
+ this.$set(this.itemBarcodeCache, barcodeKey, firstBarcode || '');
+ if (this.getSelectedItemBarcodeKey(this.selectedPickItem) === barcodeKey) {
+ this.selectedItemBarcode = firstBarcode || '';
+ }
+ } catch (error) {
+ this.$set(this.itemBarcodeCache, barcodeKey, '');
+ if (this.getSelectedItemBarcodeKey(this.selectedPickItem) === barcodeKey) {
+ this.selectedItemBarcode = '';
+ }
+ } finally {
+ if (this.getSelectedItemBarcodeKey(this.selectedPickItem) === barcodeKey) {
+ this.selectedItemBarcodeLoading = false;
+ }
+ }
+ },
+ handleSearch() {
+ this.keyword = String(this.keyword || '').trim();
+ },
+ selectPickItem(index) {
+ this.selectedIndex = Number(index || 0);
+ },
+ previewSelectedItemImage() {
+ const urls = Array.isArray(this.selectedItemImageUrls) && this.selectedItemImageUrls.length
+ ? this.selectedItemImageUrls
+ : (this.selectedItemImageUrl ? [this.selectedItemImageUrl] : []);
+ if (!urls.length) {
+ return;
+ }
+ const currentIndex = this.selectedItemImageUrl ? Math.max(urls.indexOf(this.selectedItemImageUrl), 0) : 0;
+ this.$tools.previewImage(urls, currentIndex);
+ },
+ handleCameraScan() {
+ uni.scanCode({
+ onlyFromCamera: true,
+ scanType: ['barCode', 'qrCode'],
+ success: res => {
+ const scanText = String(res?.result || '').trim();
+ if (!scanText) {
+ uni.showToast({
+ title: '未识别到有效条码',
+ icon: 'none'
+ });
+ return;
+ }
+ this.keyword = scanText;
+ this.handleSearch();
+ },
+ fail: () => {
uni.showToast({
- title: '请输入快递号/运单号',
+ title: '扫码失败,请重试',
icon: 'none'
});
}
- return;
- }
-
- this.loading = true;
- try {
- const response = await this.$http('pick.query', {
- waybill_code: waybillCode,
- full_display: Boolean(this.fullDisplay)
- });
- this.extractHeaderSummary(response);
- const orderList = this.extractOrderList(response)
- .map((item, index) => this.normalizeOrderItem(item, index));
- this.fullList = orderList;
- this.applyFilteredList(resetPage);
- } catch (error) {
- this.fullList = [];
- this.resetHeaderSummary();
- this.applyFilteredList(true);
- uni.showToast({
- title: this.getApiErrorMessage(error, '查询失败'),
- icon: 'none'
- });
- } finally {
- this.loading = false;
- }
- },
- refreshDisplayList() {
- const source = Array.isArray(this.filteredList) ? this.filteredList : [];
- const totalPage = Math.max(Math.ceil(source.length / this.pageSize), 1);
- if (this.currentPage > totalPage) {
- this.currentPage = totalPage;
- }
- const start = (this.currentPage - 1) * this.pageSize;
- this.displayList = source.slice(start, start + this.pageSize);
- },
- handlePageChange(page) {
- this.currentPage = Number(page || 1);
- this.refreshDisplayList();
- },
- switchStatus(nextStatus) {
- this.status = nextStatus;
- this.applyFilteredList(true);
- },
-
- getStatusText(status) {
- const map = {
- pending: '待拣货',
- picking: '拣货中',
- done: '已完成'
- };
- return map[status] || '未知状态';
- },
- getPickingStatusText(status) {
- return this.getStatusText(this.normalizeStatus(status));
- },
- getReviewStatusText(reviewed, inspectionStatus) {
- if (reviewed === true) {
- return '已复核';
- }
- const text = String(inspectionStatus || '').toLowerCase();
- if (!text || ['pending', 'padding', 'wait', 'waiting', 'todo'].includes(text)) {
- return '待复核';
- }
- if (['reviewed', 'done', 'completed', 'finish', 'finished', 'success'].includes(text)) {
- return '已复核';
- }
- return text;
- },
- getSpaceStatusText(status) {
- const text = String(status || '').toUpperCase();
- const map = {
- AVAILABLE: '可用',
- DISABLED: '禁用',
- LOCKED: '锁定'
- };
- return map[text] || (status || '--');
- },
- goPicking(item) {
- const orderId = Number(item?.orderId || 0);
- const orderItemId = Number(item?.orderItemId || 0);
- if (!orderId || !orderItemId) {
- uni.showToast({
- title: '缺少订单参数',
- icon: 'none'
- });
- return;
- }
- const params = [
- `id=${encodeURIComponent(String(item.id || ''))}`,
- `orderId=${encodeURIComponent(String(orderId))}`,
- `orderItemId=${encodeURIComponent(String(orderItemId))}`,
- `orderNo=${encodeURIComponent(String(item.orderNo || ''))}`,
- `customerName=${encodeURIComponent(String(item.customerName || ''))}`,
- `waveNo=${encodeURIComponent(String(item.waveNo || ''))}`,
- `spaceName=${encodeURIComponent(String(item.spaceName || ''))}`,
- `status=${encodeURIComponent(String(item.status || 'pending'))}`,
- `needQty=${encodeURIComponent(String(item.needQty || 0))}`,
- `pickedQty=${encodeURIComponent(String(item.pickedQty || 0))}`
- ];
- this.$tools.routerTo(`/pages/work/order/detail?${params.join('&')}`);
- },
- applyOrderUpdate(payload) {
- if (!payload || typeof payload !== 'object') {
- return;
- }
-
- const targetId = String(payload.id || '');
- const targetOrderNo = String(payload.orderNo || '');
- const nextStatus = String(payload.status || '').trim();
- const nextPickedQty = Number(payload.pickedQty);
-
- const index = this.fullList.findIndex(item => {
- if (!item || typeof item !== 'object') {
- return false;
- }
- const matchId = targetId && String(item.id || '') === targetId;
- const matchOrderNo = targetOrderNo && String(item.orderNo || '') === targetOrderNo;
- return matchId || matchOrderNo;
});
-
- if (index < 0) {
- return;
- }
-
- const source = this.fullList[index];
- const merged = {
- ...source
- };
-
- if (nextStatus) {
- merged.status = nextStatus;
- }
- if (!Number.isNaN(nextPickedQty)) {
- merged.pickedQty = Math.max(0, Math.min(nextPickedQty, Number(merged.needQty || 0)));
- }
-
- this.$set(this.fullList, index, merged);
- this.applyFilteredList(false);
- },
-
+ }
}
- }
+ };
\ No newline at end of file
+
diff --git a/pages/work/order/scatter-wave-strategy.vue b/pages/work/order/scatter-wave-strategy.vue
index 8edfa3d..5c34dca 100644
--- a/pages/work/order/scatter-wave-strategy.vue
+++ b/pages/work/order/scatter-wave-strategy.vue
@@ -2,9 +2,6 @@
-
- 待处理{{ pendingCount }}
-
@@ -18,18 +15,46 @@
{{ currentStrategy.strategyName }}
- 申通E
- 货主:{{ currentStrategy.ownerText }}
- 订单小于SKU数:{{ currentStrategy.orderMaxSku }}个
- 订单最小SKU数:{{ currentStrategy.orderMinSku }}个
- 订单最大商品数:{{ currentStrategy.orderMaxQty }}个
- 订单最小商品数:{{ currentStrategy.orderMinQty }}个
- 拣货类型:{{ currentStrategy.pickTypeText }}
-
- 订单快递限制:{{ currentStrategy.expressLimitText }}
- 订单平台限制:{{ currentStrategy.platformLimitText }}
+ 创建人:{{ currentStrategy.creatorName }}
+ 匹配订单:{{ currentStrategy.matchedOrderCountFiltered }}
+ SKU区间:{{ currentStrategy.orderMinSku }} - {{ currentStrategy.orderMaxSku }}
+ 件数区间:{{ currentStrategy.orderMinQty }} - {{ currentStrategy.orderMaxQty }}
+ 同结构区间:{{ currentStrategy.minSameStructure }} - {{ currentStrategy.maxSameStructure }}
+ 策略类型:{{ currentStrategy.strategyTypeText }}
+
+ 分批模式:
+ {{ currentStrategy.batchModeText }}
+ {{ currentStrategy.batchMode }}
-
+
+
+ 货主限制:
+
+ {{ getLimitFirst(currentStrategy.ownerLimitList) }}
+ +
+
+
+
+ 订单快递限制:
+
+ {{ getLimitFirst(currentStrategy.expressLimitList) }}
+ +
+
+
+
+ 省份限制:
+
+ {{ getLimitFirst(currentStrategy.provinceLimitList) }}
+ +
+
+
+
+ 订单平台限制:
+
+ {{ getLimitFirst(currentStrategy.platformLimitList) }}
+ +
+
+
按货主分组:{{ currentStrategy.groupByOwnerText }}
按快递分组:{{ currentStrategy.groupByExpressText }}
@@ -37,34 +62,77 @@
-
-
-
-
- 申通E
- {{ item.ownerText }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ slot.item.matchedOrderCountFiltered }}
+
+ 抓:{{ slot.item.nextFetchOrderCount }}
+
+
-
- {{ item.orderMaxQty }}
-
- {{ item.pickTypeText }}
-
-
+
+
+
刷新
- 抓取散单({{ grabCount }})个
+ 抓取散单
+
+
+
@@ -74,10 +142,24 @@
export default {
data() {
return {
- title: '散单待拣货列表',
- pendingCount: 50,
- grabCount: 5,
+ title: '散单拣货策略',
+ paginationTotal: null,
loading: false,
+ creatingTask: false,
+ currentPage: 1,
+ pageJumpInput: '',
+ pageSize: 8,
+ gridGesture: {
+ startX: 0,
+ startY: 0,
+ deltaX: 0,
+ deltaY: 0
+ },
+ limitPopup: {
+ visible: false,
+ title: '',
+ items: []
+ },
currentStrategyId: '',
strategyList: []
};
@@ -85,19 +167,208 @@
computed: {
currentStrategy() {
return this.strategyList.find(item => String(item.id) === String(this.currentStrategyId)) || this.strategyList[0] || {};
+ },
+ totalPages() {
+ const total = Number(this.paginationTotal || 0);
+ const pageSize = Number(this.pageSize || 8);
+ return Math.max(1, Math.ceil(total / pageSize));
+ },
+ currentPageSlots() {
+ return Array.from({ length: this.pageSize }, (_, index) => {
+ const item = this.strategyList[index] || null;
+ return {
+ index,
+ item,
+ key: item ? `strategy-${item.id}` : `empty-${this.currentPage}-${index}`
+ };
+ });
}
},
onLoad() {
this.loadStrategyList();
},
methods: {
+ normalizeLimitList(value) {
+ if (Array.isArray(value)) {
+ return value
+ .map(item => String(item || '').trim())
+ .filter(Boolean);
+ }
+ if (value == null || value === '') {
+ return [];
+ }
+ if (typeof value === 'string') {
+ const text = value.trim();
+ if (!text || text === '--') {
+ return [];
+ }
+ if (text.includes('、')) {
+ return text.split('、').map(item => item.trim()).filter(Boolean);
+ }
+ return [text];
+ }
+ return [String(value)];
+ },
+ hasLimitList(value) {
+ return this.normalizeLimitList(value).length > 0;
+ },
+ getLimitFirst(value) {
+ const list = this.normalizeLimitList(value);
+ return list.length ? list[0] : '--';
+ },
+ openLimitPopup(title, value) {
+ const list = this.normalizeLimitList(value);
+ if (!list.length) {
+ return;
+ }
+ this.limitPopup = {
+ visible: true,
+ title,
+ items: list
+ };
+ },
+ closeLimitPopup() {
+ this.limitPopup.visible = false;
+ },
+ syncPageJumpInput() {
+ this.pageJumpInput = String(this.currentPage || 1);
+ },
+ ensureCurrentPageInRange() {
+ if (this.currentPage > this.totalPages) {
+ this.currentPage = this.totalPages;
+ }
+ if (this.currentPage < 1) {
+ this.currentPage = 1;
+ }
+ this.syncPageJumpInput();
+ },
+ prevPage() {
+ if (this.currentPage > 1) {
+ this.currentPage -= 1;
+ this.loadStrategyList();
+ }
+ this.syncPageJumpInput();
+ },
+ nextPage() {
+ if (this.currentPage < this.totalPages) {
+ this.currentPage += 1;
+ this.loadStrategyList();
+ }
+ this.syncPageJumpInput();
+ },
+ jumpToPage() {
+ const targetPage = Number(this.pageJumpInput);
+ if (!Number.isInteger(targetPage) || targetPage < 1) {
+ this.syncPageJumpInput();
+ return;
+ }
+ this.currentPage = Math.min(targetPage, this.totalPages);
+ this.loadStrategyList();
+ this.syncPageJumpInput();
+ },
+ handleGridTouchStart(event) {
+ const touch = event?.changedTouches?.[0] || event?.touches?.[0];
+ if (!touch) {
+ return;
+ }
+ this.gridGesture.startX = touch.clientX;
+ this.gridGesture.startY = touch.clientY;
+ this.gridGesture.deltaX = 0;
+ this.gridGesture.deltaY = 0;
+ },
+ handleGridTouchMove(event) {
+ const touch = event?.changedTouches?.[0] || event?.touches?.[0];
+ if (!touch) {
+ return;
+ }
+ this.gridGesture.deltaX = touch.clientX - this.gridGesture.startX;
+ this.gridGesture.deltaY = touch.clientY - this.gridGesture.startY;
+ },
+ handleGridTouchEnd() {
+ const absX = Math.abs(this.gridGesture.deltaX);
+ const absY = Math.abs(this.gridGesture.deltaY);
+ if (absX > 60 && absX > absY) {
+ if (this.gridGesture.deltaX > 0) {
+ this.prevPage();
+ } else {
+ this.nextPage();
+ }
+ }
+ this.gridGesture.deltaX = 0;
+ this.gridGesture.deltaY = 0;
+ },
getApiErrorMessage(error, fallback = '请求失败') {
const message = error?.message || error?.msg || error?.errMsg || error?.data?.message;
return String(message || fallback);
},
- buildWaveStrategyListParams() {
+ extractFetchTaskPayload(response) {
+ const candidates = [
+ response?.data?.data,
+ response?.data,
+ response?.result,
+ response
+ ];
+ for (let i = 0; i < candidates.length; i += 1) {
+ const current = candidates[i];
+ if (current && typeof current === 'object' && !Array.isArray(current)) {
+ return current;
+ }
+ }
return {};
},
+ buildFetchTaskErrorMessage(payload, fallback = '创建抓取任务失败') {
+ const validationErrors = Array.isArray(payload?.validation_errors) ? payload.validation_errors : [];
+ if (validationErrors.length) {
+ const firstError = validationErrors[0] || {};
+ const field = String(firstError.field || '').trim();
+ const message = String(firstError.message || '').trim();
+ if (field && message) {
+ return `${field}: ${message}`;
+ }
+ if (message) {
+ return message;
+ }
+ }
+ const rawMessage = payload?.message || payload?.msg || payload?.error_message || payload?.error;
+ return String(rawMessage || fallback);
+ },
+ buildFetchTaskParams() {
+ const strategyId = Number(this.currentStrategy?.id || 0);
+ return {
+ strategy_id: strategyId,
+ strategyId,
+ source: 'pda',
+ operation_source: 'pda'
+ };
+ },
+ buildPickingRouteParams(payload) {
+ const taskId = payload?.task_id ?? payload?.taskId;
+ const params = [];
+ if (taskId != null && taskId !== '') {
+ params.push(`taskId=${encodeURIComponent(String(taskId))}`);
+ }
+ return params;
+ },
+ routeToPickingPage(payload) {
+ const params = this.buildPickingRouteParams(payload);
+ const query = params.length ? `?${params.join('&')}` : '';
+ this.$tools.routerTo(`/pages/work/order/picking${query}`);
+ },
+ buildWaveStrategyListParams() {
+ return {
+ calculate_next_fetch_order_count: 1,
+ where: {
+ strategy_type: 1
+ },
+ pagination: {
+ page: Number(this.currentPage || 1),
+ pageSize: Number(this.pageSize || 8)
+ }
+ };
+ },
+ extractPagination(payload, response) {
+ return payload?.pagination || payload?.page || response?.data?.pagination || response?.pagination || null;
+ },
extractWaveStrategyPayload(response) {
const candidates = [
response?.data?.data,
@@ -134,45 +405,75 @@
const normalized = Number(value) === 1 || value === true;
return normalized ? '是' : '否';
},
+ normalizeStrategyTypeText(value) {
+ const type = Number(value);
+ if (type === 1) {
+ return '散单';
+ }
+ if (type === 2) {
+ return '团购';
+ }
+ return '--';
+ },
+ normalizeBatchModeText(value) {
+ const map = {
+ 0: '团购',
+ 1: '单品单件',
+ 2: '先拣后分',
+ 3: '边拣边分',
+ 4: '边拣边分H型',
+ 5: '播种墙',
+ 6: '流利架'
+ };
+ if (value == null || value === '') {
+ return '--';
+ }
+ return map[Number(value)] ?? String(value);
+ },
normalizeLimitText(value) {
if (Array.isArray(value)) {
- return value.length ? value.join('、') : '不限';
+ return value.length ? value.join('、') : '--';
}
if (value == null || value === '') {
- return '不限';
+ return '--';
}
if (typeof value === 'string') {
- return value.trim() ? value : '不限';
+ return value.trim() ? value : '--';
}
return String(value);
},
- normalizePickTypeText(item) {
- const type = Number(item?.strategy_type || 0);
- const mode = Number(item?.batch_mode || 0);
- if (mode === 1) {
- return 'E型';
- }
- if (type === 1) {
- return 'F型';
- }
- return '未知';
- },
normalizeWaveStrategyItem(item) {
const source = item && typeof item === 'object' ? item : {};
- const ownerText = this.normalizeLimitText(source.allowed_owners);
+ const ownerLimitList = this.normalizeLimitList(source.allowed_owners);
+ const expressLimitList = this.normalizeLimitList(source.allowed_expresses);
+ const provinceLimitList = this.normalizeLimitList(source.allowed_provinces);
+ const platformLimitList = this.normalizeLimitList(source.allowed_platforms);
return {
- id: source.id || Math.random().toString(36).slice(2),
- strategyName: source.strategy_name || '--',
- ownerText,
+ id: source.id ?? '',
+ strategyName: source.strategy_name || '',
+ strategyType: source.strategy_type ?? '--',
+ strategyTypeText: this.normalizeStrategyTypeText(source.strategy_type),
+ batchMode: source.batch_mode ?? '--',
+ batchModeText: this.normalizeBatchModeText(source.batch_mode),
+ creatorName: source.creator_name || '--',
+ ownerLimitList,
+ expressLimitList,
+ provinceLimitList,
+ platformLimitList,
+ ownerText: ownerLimitList.length ? ownerLimitList.join('、') : '--',
orderMaxSku: Number(source.order_max_sku || 0),
orderMinSku: Number(source.order_min_sku || 0),
orderMaxQty: Number(source.order_max_qty || 0),
orderMinQty: Number(source.order_min_qty || 0),
- expressLimitText: this.normalizeLimitText(source.allowed_expresses),
- platformLimitText: this.normalizeLimitText(source.allowed_platforms),
- groupByOwnerText: this.normalizeBooleanText(source.allow_cross_owner),
- groupByExpressText: this.normalizeBooleanText(source.require_same_express),
- pickTypeText: this.normalizePickTypeText(source)
+ minSameStructure: Number(source.min_same_structure || 0),
+ maxSameStructure: Number(source.max_same_structure || 0),
+ matchedOrderCountFiltered: Number(source.matched_order_count_filtered || 0),
+ nextFetchOrderCount: Number(source.next_fetch_order_count || 0),
+ expressLimitText: expressLimitList.length ? expressLimitList.join('、') : '--',
+ provinceLimitText: provinceLimitList.length ? provinceLimitList.join('、') : '--',
+ platformLimitText: platformLimitList.length ? platformLimitList.join('、') : '--',
+ groupByOwnerText: this.normalizeBooleanText(source.allow_cross_owner),
+ groupByExpressText: this.normalizeBooleanText(source.require_same_express)
};
},
parseWaveStrategyResponse(response) {
@@ -189,7 +490,7 @@
handleRefresh() {
this.loadStrategyList();
},
- handleGrabScatter() {
+ async handleGrabScatter() {
if (!this.currentStrategy || !this.currentStrategy.id) {
uni.showToast({
title: '请先选择策略',
@@ -197,15 +498,45 @@
});
return;
}
+ if (this.creatingTask) {
+ return;
+ }
- const params = [
- `strategyId=${encodeURIComponent(String(this.currentStrategy.id || ''))}`,
- `strategyName=${encodeURIComponent(String(this.currentStrategy.strategyName || '--'))}`,
- `ownerText=${encodeURIComponent(String(this.currentStrategy.ownerText || '--'))}`,
- `pickTypeText=${encodeURIComponent(String(this.currentStrategy.pickTypeText || '--'))}`,
- `grabCount=${encodeURIComponent(String(this.grabCount || 0))}`
- ];
- this.$tools.routerTo(`/pages/work/order/scatter-picking-detail?${params.join('&')}`);
+ this.creatingTask = true;
+ try {
+ const fetchParams = this.buildFetchTaskParams();
+ const response = await this.$http('order.wave.waveStrategyFetchPda', fetchParams);
+ const payload = this.extractFetchTaskPayload(response);
+ const taskId = payload?.task_id ?? payload?.taskId;
+ const state = String(payload?.state || '').toLowerCase();
+ if (taskId != null && taskId !== '') {
+ this.routeToPickingPage(payload);
+ return;
+ }
+ if (state === 'created') {
+ this.routeToPickingPage(payload);
+ return;
+ }
+ if (payload?.can_enter_pick_flow === true || payload?.canEnterPickFlow === true) {
+ this.routeToPickingPage(payload);
+ return;
+ }
+ if (state !== 'created') {
+ uni.showToast({
+ title: this.buildFetchTaskErrorMessage(payload, '创建抓取任务失败'),
+ icon: 'none'
+ });
+ return;
+ }
+ this.routeToPickingPage(payload);
+ } catch (error) {
+ uni.showToast({
+ title: this.getApiErrorMessage(error, '创建抓取任务失败'),
+ icon: 'none'
+ });
+ } finally {
+ this.creatingTask = false;
+ }
},
async loadStrategyList() {
this.loading = true;
@@ -213,13 +544,21 @@
const params = this.buildWaveStrategyListParams();
const response = await this.$http('order.wave.waveStrategyList', params);
const payload = this.extractWaveStrategyPayload(response);
- this.pendingCount = Number(payload?.pending_count ?? payload?.pendingCount ?? 50);
- this.strategyList = this.parseWaveStrategyResponse(response);
+ const pagination = this.extractPagination(payload, response);
+ const parsedList = this.parseWaveStrategyResponse(response);
+ this.paginationTotal = Number(pagination?.total ?? parsedList.length ?? 0);
+ this.currentPage = Number((pagination?.page ?? this.currentPage) || 1);
+ this.pageSize = Number((pagination?.pageSize ?? this.pageSize) || 8);
+ this.strategyList = parsedList;
this.currentStrategyId = this.strategyList[0]?.id || '';
+ this.ensureCurrentPageInRange();
+ this.syncPageJumpInput();
} catch (error) {
- this.pendingCount = 50;
+ this.paginationTotal = null;
this.currentStrategyId = '';
this.strategyList = [];
+ this.currentPage = 1;
+ this.syncPageJumpInput();
uni.showToast({
title: this.getApiErrorMessage(error, '策略加载失败'),
icon: 'none'
@@ -259,19 +598,44 @@
background: #2979ff;
}
- .list-content {
- height: 100%;
- }
-
.content-layout {
height: calc(100vh - 170rpx - env(safe-area-inset-bottom));
display: flex;
flex-direction: column;
- padding: 20rpx 24rpx 120rpx;
+ padding: 20rpx 24rpx 124rpx;
background: #f3f4f6;
box-sizing: border-box;
}
+ .summary-strip {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ column-gap: 12rpx;
+ margin-bottom: 12rpx;
+ }
+
+ .summary-item {
+ background: #ffffff;
+ border-radius: 12rpx;
+ padding: 10rpx 12rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 4rpx;
+ }
+
+ .summary-item__label {
+ font-size: 22rpx;
+ color: #909399;
+ line-height: 1.2;
+ }
+
+ .summary-item__value {
+ font-size: 34rpx;
+ line-height: 1.1;
+ font-weight: 600;
+ color: #1f2d3d;
+ }
+
.top-module,
.bottom-module {
flex: 1;
@@ -279,24 +643,45 @@
}
.top-module {
- padding-bottom: 10rpx;
+ padding-bottom: 8rpx;
+ flex: 0 0 50%;
}
.bottom-module {
- padding-top: 10rpx;
+ padding-top: 8rpx;
+ flex: 0 0 50%;
+ display: flex;
+ flex-direction: column;
}
- .grid-scroll {
+ .strategy-grid-container {
+ flex: 1;
+ min-height: 0;
+ display: flex;
+ align-items: center;
+ }
+
+ .strategy-grid-wrapper {
+ flex: 1;
height: 100%;
+ background: #ffffff;
+ border-radius: 14rpx;
+ padding: 10rpx;
+ box-sizing: border-box;
}
.grid-wrap {
display: flex;
flex-wrap: wrap;
- row-gap: 8rpx;
- column-gap: 16rpx;
+ height: 100%;
align-content: flex-start;
- padding-bottom: 20rpx;
+ }
+
+ .pick-slot {
+ width: 25%;
+ height: 50%;
+ padding: 4rpx;
+ box-sizing: border-box;
}
.content-card {
@@ -327,22 +712,65 @@
line-height: 48rpx;
}
+ .card-row--inline-tag {
+ align-items: center;
+ }
+
.card-row--inline-group {
justify-content: space-between;
}
.group-item {
- flex: 1;
+ min-width: 0;
display: flex;
align-items: flex-start;
+ background: #f7f8fa;
+ border-radius: 10rpx;
+ padding: 8rpx 10rpx;
}
- .group-item + .group-item {
- margin-left: 6rpx;
+ .limit-brief {
+ flex: 1;
+ min-width: 0;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 2rpx 0;
+ }
+
+ .limit-brief--disabled {
+ opacity: 0.7;
+ }
+
+ .limit-brief__text {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ padding-right: 8rpx;
+ }
+
+ .limit-brief__plus {
+ flex: 0 0 auto;
+ width: 28rpx;
+ height: 28rpx;
+ line-height: 28rpx;
+ text-align: center;
+ border-radius: 50%;
+ background: #2979ff;
+ color: #ffffff;
+ font-size: 24rpx;
+ font-weight: 600;
+ }
+
+ .card-grid {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 8rpx;
+ margin-top: 8rpx;
}
.group-item .label {
- width: auto;
+ flex: 0 0 auto;
white-space: nowrap;
margin-right: 6rpx;
}
@@ -360,17 +788,26 @@
color: #303133;
}
- .shentong-e-value {
- font-size: 32rpx;
- line-height: 46rpx;
+ .batch-mode-tag {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ padding: 0 14rpx;
+ height: 40rpx;
+ border-radius: 20rpx;
+ background: #f0f2f5;
+ color: #606266;
+ font-size: 24rpx;
+ line-height: 1;
+ flex: 0 0 auto;
}
.pick-card {
- width: calc(25% - 12rpx);
- height: 180rpx;
+ width: 100%;
+ height: 100%;
background: #fff;
border-radius: 14rpx;
- padding: 10rpx;
+ padding: 8rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
@@ -385,6 +822,12 @@
box-shadow: inset 0 0 0 6rpx #2979ff, 0 10rpx 24rpx rgba(41, 121, 255, 0.2);
}
+ .pick-card--empty {
+ background: #f8f9fb;
+ border: 1rpx dashed #e7eaf0;
+ box-shadow: none;
+ }
+
.pick-card__top {
display: flex;
justify-content: space-between;
@@ -392,29 +835,31 @@
min-height: 34rpx;
}
- .pick-card__tag-left,
- .pick-card__tag-right {
+ .pick-card__title-marquee {
position: absolute;
top: 0;
- font-size: 22rpx;
- line-height: 30rpx;
- padding: 4rpx 14rpx 6rpx;
- background: #19be6b;
- color: #fff;
- max-width: 48%;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
-
- .pick-card__tag-left {
left: 0;
- clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
+ width: 100%;
+ height: 40rpx;
+ padding: 0 8rpx;
+ box-sizing: border-box;
+ background: #19be6b;
+ border-bottom-right-radius: 12rpx;
}
- .pick-card__tag-right {
- right: 0;
- clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
+ ::v-deep .pick-card__title-marquee .u-notice-bar {
+ height: 40rpx;
+ line-height: 40rpx;
+ padding: 0;
+ }
+
+ ::v-deep .pick-card__title-marquee .u-notice__content__text {
+ font-size: 22rpx;
+ }
+
+ ::v-deep .pick-card__title-marquee .u-notice__left-icon,
+ ::v-deep .pick-card__title-marquee .u-notice__right-icon {
+ display: none !important;
}
.pick-card__main {
@@ -425,7 +870,7 @@
}
.pick-card__num {
- font-size: 40rpx;
+ font-size: 36rpx;
line-height: 1;
font-weight: 700;
color: #303133;
@@ -456,11 +901,64 @@
padding: 2rpx 6rpx;
}
- .empty-wrap {
- min-height: 400rpx;
+ .pagination-bar {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ column-gap: 10rpx;
+ margin-top: 10rpx;
+ padding-top: 12rpx;
+ }
+
+ .pagination-btn {
+ min-width: 104rpx;
+ height: 56rpx;
+ padding: 0 16rpx;
+ border-radius: 28rpx;
+ background: #eef2f7;
+ color: #3b4a5a;
display: flex;
align-items: center;
justify-content: center;
+ font-size: 24rpx;
+ box-sizing: border-box;
+ }
+
+ .pagination-btn--primary {
+ background: #2979ff;
+ color: #ffffff;
+ }
+
+ .pagination-btn--disabled {
+ opacity: 0.45;
+ }
+
+ .pagination-current {
+ min-width: 92rpx;
+ text-align: center;
+ font-size: 26rpx;
+ color: #606266;
+ }
+
+ .pagination-input {
+ width: 96rpx;
+ height: 56rpx;
+ background: #ffffff;
+ border: 1rpx solid #dcdfe6;
+ border-radius: 28rpx;
+ text-align: center;
+ font-size: 24rpx;
+ color: #303133;
+ box-sizing: border-box;
+ }
+
+ .empty-wrap {
+ min-height: 460rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: #fff;
+ border-radius: 14rpx;
}
.empty-text {
@@ -468,10 +966,6 @@
color: #909399;
}
- .safe-area-bottom {
- height: calc(20rpx + env(safe-area-inset-bottom));
- }
-
.bottom-action-bar {
position: fixed;
left: 0;
@@ -485,4 +979,76 @@
border-top: 1rpx solid #f0f0f0;
box-sizing: border-box;
}
+
+ .limit-popup-mask {
+ position: fixed;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ background: rgba(0, 0, 0, 0.45);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ z-index: 999;
+ padding: 32rpx;
+ box-sizing: border-box;
+ }
+
+ .limit-popup-panel {
+ width: 100%;
+ max-width: 640rpx;
+ max-height: 70vh;
+ background: #ffffff;
+ border-radius: 16rpx;
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+ }
+
+ .limit-popup-title {
+ padding: 22rpx 24rpx;
+ font-size: 30rpx;
+ font-weight: 600;
+ color: #303133;
+ border-bottom: 1rpx solid #f0f2f5;
+ }
+
+ .limit-popup-list {
+ max-height: 52vh;
+ padding: 8rpx 0;
+ box-sizing: border-box;
+ }
+
+ .limit-popup-item {
+ padding: 16rpx 24rpx;
+ font-size: 28rpx;
+ line-height: 40rpx;
+ color: #303133;
+ border-bottom: 1rpx solid #f7f7f8;
+ }
+
+ .limit-popup-empty {
+ padding: 36rpx 24rpx;
+ text-align: center;
+ font-size: 26rpx;
+ color: #909399;
+ }
+
+ .limit-popup-footer {
+ padding: 16rpx 24rpx 20rpx;
+ border-top: 1rpx solid #f0f2f5;
+ display: flex;
+ justify-content: flex-end;
+ }
+
+ @media (min-width: 960px) {
+ .top-module {
+ flex-basis: 42%;
+ }
+
+ .bottom-module {
+ flex-basis: 48%;
+ }
+ }
diff --git a/pages/work/storage/gBWaveStrategy.vue b/pages/work/storage/gBWaveStrategy.vue
new file mode 100644
index 0000000..eadc2c0
--- /dev/null
+++ b/pages/work/storage/gBWaveStrategy.vue
@@ -0,0 +1,1054 @@
+
+
+
+
+
+
+
+
+ 加载中...
+
+
+ 暂无策略
+
+
+
+
+ {{ currentStrategy.strategyName }}
+ 创建人:{{ currentStrategy.creatorName }}
+ 匹配订单:{{ currentStrategy.matchedOrderCountFiltered }}
+ SKU区间:{{ currentStrategy.orderMinSku }} - {{ currentStrategy.orderMaxSku }}
+ 件数区间:{{ currentStrategy.orderMinQty }} - {{ currentStrategy.orderMaxQty }}
+ 同结构区间:{{ currentStrategy.minSameStructure }} - {{ currentStrategy.maxSameStructure }}
+ 策略类型:{{ currentStrategy.strategyTypeText }}
+
+ 分批模式:
+ {{ currentStrategy.batchModeText }}
+ {{ currentStrategy.batchMode }}
+
+
+
+ 货主限制:
+
+ {{ getLimitFirst(currentStrategy.ownerLimitList) }}
+ +
+
+
+
+ 订单快递限制:
+
+ {{ getLimitFirst(currentStrategy.expressLimitList) }}
+ +
+
+
+
+ 省份限制:
+
+ {{ getLimitFirst(currentStrategy.provinceLimitList) }}
+ +
+
+
+
+ 订单平台限制:
+
+ {{ getLimitFirst(currentStrategy.platformLimitList) }}
+ +
+
+
+ 按货主分组:{{ currentStrategy.groupByOwnerText }}
+ 按快递分组:{{ currentStrategy.groupByExpressText }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ slot.item.matchedOrderCountFiltered }}
+
+ 抓:{{ slot.item.nextFetchOrderCount }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 刷新
+ 抓取团购
+
+
+
+
+
+
+
+
+
+