diff --git a/pages.json b/pages.json
index ae49017..b141439 100644
--- a/pages.json
+++ b/pages.json
@@ -194,6 +194,13 @@
"titleNView": false
}
},
+ {
+ "path" : "pages/work/product/itemMaint",
+ "style" :
+ {
+ "titleNView": false
+ }
+ },
{
"path" : "pages/work/order/picking",
"style" :
diff --git a/pages/home/edit-quick-actions.vue b/pages/home/edit-quick-actions.vue
index 8345e15..967684a 100644
--- a/pages/home/edit-quick-actions.vue
+++ b/pages/home/edit-quick-actions.vue
@@ -327,6 +327,7 @@
const normalizedPath = rawPath ? (rawPath.startsWith('/') ? rawPath : `/${rawPath}`) : '';
const isRandomStorage = menuName === '随机入库' || (menuName.includes('随机') && menuName.includes('入库'));
const isRelocation = menuName === '移库作业' || normalizedPath === '/pages/work/storage/relocation';
+ const isItemMaint = menuName === '商品信息维护' || normalizedPath === '/pages/work/product/itemMaint';
if (isRelocation) {
uni.showToast({
title: '该功能只支持在商品查询页面使用!',
@@ -335,6 +336,14 @@
});
return;
}
+ if (isItemMaint) {
+ uni.showToast({
+ title: '该功能只支持在商品查询页面使用!',
+ icon: 'none',
+ duration: 2500
+ });
+ return;
+ }
if (isRandomStorage) {
this.$tools.routerTo('/pages/work/storage/random-storage');
return;
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 510a034..a04a0b0 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1367,6 +1367,7 @@
const normalizedPath = rawPath ? (rawPath.startsWith('/') ? rawPath : `/${rawPath}`) : '';
const isRandomStorage = menuName === '随机入库' || (menuName.includes('随机') && menuName.includes('入库'));
const isRelocation = menuName === '移库作业' || normalizedPath === '/pages/work/storage/relocation';
+ const isItemMaint = menuName === '商品信息维护' || normalizedPath === '/pages/work/product/itemMaint';
if (isRelocation) {
uni.showToast({
title: '该功能只支持在商品查询页面使用!',
@@ -1375,6 +1376,14 @@
});
return;
}
+ if (isItemMaint) {
+ uni.showToast({
+ title: '该功能只支持在商品查询页面使用!',
+ icon: 'none',
+ duration: 2500
+ });
+ return;
+ }
if (isRandomStorage) {
this.$tools.routerTo('/pages/work/storage/random-storage');
return;
diff --git a/pages/work/product/detail.vue b/pages/work/product/detail.vue
index 8feb614..86b6f2e 100644
--- a/pages/work/product/detail.vue
+++ b/pages/work/product/detail.vue
@@ -235,11 +235,20 @@
-
+
+ 作业要求
打包要求:
{{ getValue(item, ['packing_requirements', 'package_requirement', 'packing_requirement', 'package_requirements']) }}
+
+ 拣货要求:
+ {{ getValue(item, ['pick_requirements', 'pick_requirement']) }}
+
+
+ 复核要求:
+ {{ getValue(item, ['recheck_requirements', 'recheck_requirement']) }}
+
创建时间:
{{ item.create_at_display || '--' }}
diff --git a/pages/work/product/edit.vue b/pages/work/product/edit.vue
index c4e4c0e..8284bbc 100644
--- a/pages/work/product/edit.vue
+++ b/pages/work/product/edit.vue
@@ -116,9 +116,25 @@
-
-
-
+
+
+ 作业要求
+
+ 要求合并
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -190,6 +206,7 @@ export default {
latestImagesLoadPromise: null,
showProhibitedPicker: false,
showStockUnitPicker: false,
+ mergeRequirements: true,
prohibitedTypeList: [],
stockUnitList: [],
formData: {
@@ -222,6 +239,8 @@ export default {
box_width: '',
box_height: '',
box_volume: '',
+ pick_requirements: '',
+ recheck_requirements: '',
packing_requirements: '',
images: [],
stock_unit_value: '',
@@ -288,7 +307,10 @@ export default {
this.formData.box_width = this.normalizeInputValue(cached.box_width);
this.formData.box_height = this.normalizeInputValue(cached.box_height);
this.formData.box_volume = this.normalizeInputValue(cached.box_volume);
+ this.formData.pick_requirements = String(cached.pick_requirements || cached.pick_requirement || '');
+ this.formData.recheck_requirements = String(cached.recheck_requirements || cached.recheck_requirement || '');
this.formData.packing_requirements = String(cached.packing_requirements || '');
+ this.mergeRequirements = this.loadMergeRequirementsPreference();
this.formData.images = this.normalizeImageListForUpload(cached);
this.formData.stock_unit = String(cached.stock_unit || '');
this.formData.stock_unit_value = String(cached.stock_unit || '');
@@ -525,6 +547,27 @@ export default {
this.speakProductEditMessage(options.speakText || message, options.voiceOptions || {});
}
},
+ loadMergeRequirementsPreference() {
+ try {
+ const saved = uni.getStorageSync('product_edit_merge_requirements');
+ if (saved === '' || saved === null || saved === undefined) {
+ return true;
+ }
+ if (typeof saved === 'boolean') {
+ return saved;
+ }
+ return String(saved) === 'true' || String(saved) === '1';
+ } catch (error) {
+ return true;
+ }
+ },
+ handleMergeRequirementsChange(value) {
+ try {
+ uni.setStorageSync('product_edit_merge_requirements', !!value);
+ } catch (error) {
+ console.warn('[ProductEdit] 保存要求合并偏好失败:', error);
+ }
+ },
resolveStoreId(item) {
if (!item || typeof item !== 'object') {
return null;
@@ -1338,6 +1381,8 @@ export default {
sku_property: String(this.formData.sku_property || '').trim(),
stock_unit: stockUnit,
packing_requirements: String(this.formData.packing_requirements || '').trim(),
+ pick_requirements: String(this.formData.pick_requirements || '').trim(),
+ recheck_requirements: String(this.formData.recheck_requirements || '').trim(),
length: Number(this.formData.length) || 0,
width: Number(this.formData.width) || 0,
height: Number(this.formData.height) || 0,
@@ -1446,6 +1491,8 @@ export default {
box_height: String(this.formData.box_height || ''),
box_volume: String(this.formData.box_volume || ''),
packing_requirements: String(this.formData.packing_requirements || '').trim(),
+ pick_requirements: String(this.formData.pick_requirements || '').trim(),
+ recheck_requirements: String(this.formData.recheck_requirements || '').trim(),
images: normalizedImages,
image: normalizedImageUrls[0] || '',
stock_unit: stockUnit,
@@ -1522,6 +1569,29 @@ export default {
color: #303133;
}
+.form-section-title--row {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.merge-toggle {
+ display: flex;
+ align-items: center;
+}
+
+.merge-toggle__text {
+ margin-right: 12rpx;
+ font-size: 26rpx;
+ font-weight: normal;
+ color: #606266;
+}
+
+/* 作业要求(打包/拣货/复核)文本域内容颜色改为黑色 */
+::v-deep .u-textarea__field {
+ color: #000000;
+}
+
.shelf-life-block {
margin: 12rpx 0 16rpx;
padding: 8rpx 20rpx 20rpx;
diff --git a/pages/work/product/itemMaint.vue b/pages/work/product/itemMaint.vue
new file mode 100644
index 0000000..d378afb
--- /dev/null
+++ b/pages/work/product/itemMaint.vue
@@ -0,0 +1,792 @@
+
+
+
+
+
+
+ 保存
+
+
+
+
+
+
+
+ 请扫描商品条码
+ 扫描后自动带出商品信息
+
+
+
+
+
+ {{ formData.NAME || '--' }}
+
+
+
+
+ 商品图片
+
+ 最多上传6张,支持多选、删除
+
+
+
+
+
+ 商品重量(g)
+
+
+
+
+
+
+
+
+
+ 商品有效天数(天)
+
+
+
+
+
+
+ {{ option.label }}
+
+
+
+
+
+
+ 箱规
+
+ 每箱数量
+
+
+
+
+
+ 箱毛重(g)
+
+
+
+
+
+ 箱净重(g)
+
+
+
+
+
+ 箱长(cm)
+
+
+
+
+
+ 箱宽(cm)
+
+
+
+
+
+ 箱高(cm)
+
+
+
+
+
+ 箱体积(m³)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/work/product/query.vue b/pages/work/product/query.vue
index 1cb78f7..a537265 100644
--- a/pages/work/product/query.vue
+++ b/pages/work/product/query.vue
@@ -236,6 +236,14 @@
+
+
+ 维护信息
+
+
+ 移库记录
+
+
@@ -2225,6 +2233,28 @@
url: `/pages/warehouse/inventoryTransfer${query}`
});
},
+ goItemMaint(item) {
+ if (!item || typeof item !== 'object') {
+ return;
+ }
+
+ // 优先条码,其次编码,跳转到商品信息维护页并自动带出商品
+ const barcodeList = Array.isArray(item.barcodes) ? item.barcodes.filter(code => code) : [];
+ const keyword = String(
+ barcodeList[0]
+ || item.barcode
+ || item.bar_code
+ || item.item_barcode
+ || item.code
+ || item.item_code
+ || item.goods_code
+ || ''
+ ).trim();
+ const query = keyword ? `?barcode=${encodeURIComponent(keyword)}` : '';
+ uni.navigateTo({
+ url: `/pages/work/product/itemMaint${query}`
+ });
+ },
async goProductDetail(item) {
if (!item || typeof item !== 'object') {
return;
@@ -3322,6 +3352,45 @@
padding-bottom: 4rpx;
}
+ .storage-action-bar {
+ display: flex;
+ align-items: center;
+ margin-top: 20rpx;
+ }
+
+ .storage-action-btn {
+ flex: 1;
+ height: 72rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border: 1rpx solid #d9e4f5;
+ border-radius: 10rpx;
+ background: #f5f8ff;
+ font-size: 32rpx;
+ color: #606266;
+
+ // 老机型 WebView 不支持 flex gap,改用外边距实现按钮间隔
+ & + & {
+ margin-left: 20rpx;
+ }
+
+ &:active {
+ opacity: 0.7;
+ }
+ }
+
+ .storage-action-btn--primary {
+ background: #2979ff;
+ border-color: #2979ff;
+ color: #ffffff;
+ font-weight: 600;
+ }
+
+ .storage-action-btn__text {
+ line-height: 1;
+ }
+
.label {
width: auto;
margin-right: 6rpx;