diff --git a/src/components/UseCouponAddEdit/index.jsx b/src/components/UseCouponAddEdit/index.jsx
index 5822034d..cd993ad0 100644
--- a/src/components/UseCouponAddEdit/index.jsx
+++ b/src/components/UseCouponAddEdit/index.jsx
@@ -49,7 +49,7 @@ const tableColumn = [
title: "商品编号",
name: "product_id",
prop: "product_id",
- type: "normal",
+ type: "slot",
width: "auto",
},
{
@@ -372,11 +372,11 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
// 如果是复制 删除id !!!!!!!!
if (state.KeyPcType === "2") {
delete item.id;
+ delete item.goods_id;
}
let table_obj = knockGoldFun(item);
return table_obj;
});
-
let scope_data = goods_arr.concat(lj_arr);
scope_data = _.map(scope_data, (o) => {
if (o.type === 2) {
@@ -1415,6 +1415,16 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
);
}
+ if (com === "product_id") {
+ return (
+
+ {state.KeyPcType === "2" && rowData.type === 2
+ ? "-"
+ : rowData.product_id}
+
+ );
+ }
+
if (com === "type") {
return {rowData.type === 1 ? "商品" : "立减金"};
}
diff --git a/src/tools/index.js b/src/tools/index.js
index 8d1207f2..d267d8fc 100644
--- a/src/tools/index.js
+++ b/src/tools/index.js
@@ -22,7 +22,7 @@ export const knockGoldFun = (item) => {
table_obj.upstream = String(item.channel) === "1" ? "支付宝" : "微信"; // 上游平台
table_obj.only = item; // 存储就数据 编辑好用
- table_obj.product_id = item.goods_id; // 商品编号
+ table_obj.product_id = item.goods_id ? item.goods_id : item.batch_goods_name; // 商品编号
table_obj.product_name = item.batch_goods_name; // 商品名
table_obj.official_price = item.reduce_amount; // 官方价
table_obj.contract_price = item.price; // 合同价格