Browse Source

feat: 添加商品快速更新功能

- 新增 /api/products/quick-update 接口,只更新价格、联系人和电话
- 修改 goods-update.js 使用新接口进行保存
- 联系人改为下拉选择器选择销售人员
pull/9/head
徐飞洋 2 months ago
parent
commit
dd28ce4e6a
  1. 155
      pages/goods-update/goods-update.js
  2. 116
      pages/goods-update/goods-update.wxml
  3. 83
      server-example/server-mysql.js
  4. 24
      utils/api.js

155
pages/goods-update/goods-update.js

@ -233,6 +233,12 @@ Page({
showYolkSelectModal: false, // 控制蛋黄选择弹窗显示 showYolkSelectModal: false, // 控制蛋黄选择弹窗显示
selectedNameIndex: -1, // 商品名称弹窗中选中的索引 selectedNameIndex: -1, // 商品名称弹窗中选中的索引
selectedYolkIndex: -1,//蛋黄弹窗中选中的索引, selectedYolkIndex: -1,//蛋黄弹窗中选中的索引,
// 销售员列表
salesPersonnelOptions: [],
filteredSalesPersonnelOptions: [],
selectedSalesPersonIndex: -1,
showSalesPersonSelectModal: false,
modalSalesPersonSearchKeyword: '',
// 商品名称选项列表 // 商品名称选项列表
productNameOptions: ['罗曼粉', '伊莎粉', '罗曼灰', '海蓝灰', '海蓝褐', '绿壳', '粉一', '粉二', '粉八', '京粉1号', '京红', '京粉6号', '京粉3号', '农大系列', '黑鸡土蛋', '双黄蛋', '大午金凤', '黑凤'], productNameOptions: ['罗曼粉', '伊莎粉', '罗曼灰', '海蓝灰', '海蓝褐', '绿壳', '粉一', '粉二', '粉八', '京粉1号', '京红', '京粉6号', '京粉3号', '农大系列', '黑鸡土蛋', '双黄蛋', '大午金凤', '黑凤'],
// 蛋黄选项 // 蛋黄选项
@ -307,10 +313,35 @@ Page({
console.log('最终使用的商品ID:', productId); console.log('最终使用的商品ID:', productId);
// 加载销售员列表
this.loadSalesPersonnel();
// 加载商品详情(即使已有goodsData,也调用API获取最新数据) // 加载商品详情(即使已有goodsData,也调用API获取最新数据)
this.loadGoodsDetail(productId, goodsData); this.loadGoodsDetail(productId, goodsData);
}, },
// 加载销售员列表
loadSalesPersonnel: function () {
console.log('加载销售员列表');
API.getSalesPersonnel()
.then(res => {
console.log('获取销售员列表成功:', res);
const salesOptions = res.map(item => ({
id: item.id,
name: item.name || '未知',
phoneNumber: item.phoneNumber || ''
}));
this.setData({
salesPersonnelOptions: salesOptions,
filteredSalesPersonnelOptions: salesOptions
});
console.log('销售员列表数据:', this.data.salesPersonnelOptions);
})
.catch(err => {
console.error('获取销售员列表失败:', err);
});
},
loadGoodsDetail: function (productId, preloadedData = null) { loadGoodsDetail: function (productId, preloadedData = null) {
// 首先显示预加载的数据,确保UI快速响应 // 首先显示预加载的数据,确保UI快速响应
if (preloadedData) { if (preloadedData) {
@ -569,7 +600,9 @@ Page({
yolk: goodsDetail.yolk || '', yolk: goodsDetail.yolk || '',
spec: goodsDetail.spec || '', spec: goodsDetail.spec || '',
region: goodsDetail.region || '', region: goodsDetail.region || '',
grossWeight: goodsDetail.grossWeight || '' grossWeight: goodsDetail.grossWeight || '',
product_contact: goodsDetail.product_contact || '',
contact_phone: goodsDetail.contact_phone || ''
}, },
showEditModal: true showEditModal: true
}); });
@ -588,18 +621,20 @@ Page({
const editSupply = this.data.editSupply; const editSupply = this.data.editSupply;
// 验证必填字段 // 验证必填字段
if (!editSupply.name) { if (!editSupply.price) {
wx.showToast({ wx.showToast({
title: '请填写商品名称', title: '请填写销售价格',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
return; return;
} }
if (!editSupply.price) { // 验证价格是否为有效数字
const priceNum = parseFloat(editSupply.price);
if (isNaN(priceNum) || priceNum < 0) {
wx.showToast({ wx.showToast({
title: '请填写价格', title: '请填写有效的价格',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
@ -611,18 +646,25 @@ Page({
mask: true mask: true
}); });
// 调用API更新商品 // 调试日志:查看editSupply的完整数据
console.log('【saveEdit】editSupply完整数据:', JSON.stringify(editSupply, null, 2));
// 调试日志:查看productId的值
const productId = editSupply.productId || editSupply.id; const productId = editSupply.productId || editSupply.id;
API.editProduct(productId, { console.log('【saveEdit】editSupply.productId:', editSupply.productId);
productName: editSupply.name, console.log('【saveEdit】editSupply.id:', editSupply.id);
console.log('【saveEdit】最终使用的productId:', productId);
// 使用新的快速更新接口,只更新价格、联系人和电话
const updateData = {
productId: productId,
price: editSupply.price, price: editSupply.price,
quantity: Number(editSupply.minOrder), product_contact: editSupply.product_contact || '',
grossWeight: editSupply.grossWeight !== undefined && editSupply.grossWeight !== null && editSupply.grossWeight !== '' ? editSupply.grossWeight : "", contact_phone: editSupply.contact_phone || '',
yolk: editSupply.yolk, };
specification: editSupply.spec || '', console.log('【saveEdit】快速更新数据:', updateData);
region: editSupply.region || '',
imageUrls: editSupply.imageUrls || [], API.request('/api/products/quick-update', 'POST', updateData)
})
.then(res => { .then(res => {
wx.hideLoading(); wx.hideLoading();
console.log('更新商品成功:', res); console.log('更新商品成功:', res);
@ -955,6 +997,89 @@ Page({
} }
}, },
// 打开销售员选择弹窗
openSalesPersonModal: function() {
console.log('打开销售员选择弹窗');
const editSupply = this.data.editSupply;
const salesPersonnelOptions = this.data.salesPersonnelOptions;
// 查找当前联系人在选项中的索引
let currentSalesPersonIndex = -1;
if (editSupply.product_contact) {
currentSalesPersonIndex = salesPersonnelOptions.findIndex(
item => item.name === editSupply.product_contact
);
}
this.setData({
showSalesPersonSelectModal: true,
selectedSalesPersonIndex: currentSalesPersonIndex >= 0 ? currentSalesPersonIndex : -1,
modalSalesPersonSearchKeyword: '',
filteredSalesPersonnelOptions: salesPersonnelOptions
});
},
// 关闭销售员选择弹窗
closeSalesPersonSelectModal: function() {
this.setData({
showSalesPersonSelectModal: false
});
},
// 销售员弹窗搜索输入
onModalSalesPersonSearchInput: function(e) {
const keyword = e.detail.value;
const salesPersonnelOptions = this.data.salesPersonnelOptions;
// 过滤销售员选项
const filteredOptions = salesPersonnelOptions.filter(option => {
return option.name.includes(keyword) ||
(option.phoneNumber && option.phoneNumber.includes(keyword));
});
this.setData({
modalSalesPersonSearchKeyword: keyword,
filteredSalesPersonnelOptions: filteredOptions,
selectedSalesPersonIndex: -1
});
},
// 清除销售员弹窗搜索关键词
clearModalSalesPersonSearch: function() {
this.setData({
modalSalesPersonSearchKeyword: '',
filteredSalesPersonnelOptions: this.data.salesPersonnelOptions,
selectedSalesPersonIndex: -1
});
},
// 选择销售员
onSalesPersonSelect: function(e) {
const index = e.currentTarget.dataset.index;
this.setData({
selectedSalesPersonIndex: index
});
},
// 确认销售员选择
confirmSalesPersonSelection: function() {
const selectedIndex = this.data.selectedSalesPersonIndex;
const filteredOptions = this.data.filteredSalesPersonnelOptions;
if (selectedIndex >= 0 && selectedIndex < filteredOptions.length) {
const selectedSalesPerson = filteredOptions[selectedIndex];
// 更新联系人和联系电话
this.setData({
['editSupply.product_contact']: selectedSalesPerson.name,
['editSupply.contact_phone']: selectedSalesPerson.phoneNumber || this.data.editSupply.contact_phone,
showSalesPersonSelectModal: false
});
console.log('选择销售员后更新editSupply:', this.data.editSupply);
}
},
// 选择图片 // 选择图片
chooseImage: function(e) { chooseImage: function(e) {
const type = e.currentTarget.dataset.type; const type = e.currentTarget.dataset.type;

116
pages/goods-update/goods-update.wxml

@ -209,66 +209,17 @@
<scroll-view scroll-y="true" style="height: calc(100vh - 90rpx); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 40rpx 60rpx; box-sizing: border-box;"> <scroll-view scroll-y="true" style="height: calc(100vh - 90rpx); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 40rpx 60rpx; box-sizing: border-box;">
<view> <view>
<!-- 照片上传区域 --> <view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">销售价格</view>
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-top: 10rpx;">商品图片</view> <input class="input" type="text" placeholder="请输入销售价格" bindinput="onEditInput" data-field="price" value="{{editSupply.price}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;"></input>
<view class="upload-area" style="width: 100%; margin: 0 auto; margin-bottom: 30rpx; border: 1rpx dashed #ddd; border-radius: 12rpx; padding: 24rpx;">
<view style="display: flex; flex-wrap: wrap;">
<!-- 已上传的图片 -->
<view wx:for="{{editSupply.imageUrls}}" wx:key="index" style="position: relative; width: 160rpx; height: 160rpx; margin: 10rpx; border-radius: 12rpx; overflow: hidden; box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.1);">
<image src="{{item}}" mode="aspectFill" style="width: 100%; height: 100%;" bindtap="previewImage" data-urls="{{editSupply.imageUrls}}" data-index="{{index}}"></image>
<view class="delete-icon" style="position: absolute; top: 8rpx; right: 8rpx; background-color: rgba(0,0,0,0.6); color: white; width: 44rpx; height: 44rpx; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28rpx;" bindtap="deleteImage" data-index="{{index}}" data-type="edit">×</view>
</view>
<!-- 上传按钮 -->
<view wx:if="{{editSupply.imageUrls.length < 5}}" style="width: 160rpx; height: 160rpx; margin: 10rpx; border: 2rpx dashed #1677ff; border-radius: 12rpx; display: flex; align-items: center; justify-content: center; background-color: #f0f8ff;" bindtap="chooseImage" data-type="edit">
<text style="font-size: 60rpx; color: #1677ff;">+</text>
</view>
</view>
<view style="font-size: 22rpx; color: #999; margin-top: 16rpx; text-align: center;">最多上传5张图片</view>
</view>
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">商品名称</view> <view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">联系人</view>
<view <view bindtap="openSalesPersonModal" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: flex; align-items: center; justify-content: space-between; background: white;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;">
bindtap="openNameSelectModal" <text style="{{editSupply.product_contact ? 'color: #333;' : 'color: #999;'}}">{{editSupply.product_contact || '请选择联系人'}}</text>
style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block; background: white; position: relative;"> <text style="color: #999; font-size: 24rpx;">▼</text>
<view style="display: flex; justify-content: space-between; align-items: center;">
<text style="text-align: left;">{{editSupply.productName || editSupply.name || '请选择商品名称'}}</text>
<text style="color: #999;">▼</text>
</view>
</view> </view>
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">蛋黄</view>
<view bindtap="openYolkSelectModal" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block; background: white; position: relative;">
<view style="display: flex; justify-content: space-between; align-items: center;">
<text style="text-align: left;">{{editSupply.yolk || '请选择蛋黄类型'}}</text>
<text style="color: #999;">▼</text>
</view>
</view>
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">规格</view>
<!-- 修改为可点击的视图,点击后打开自定义弹窗 -->
<view bindtap="onEditSpecChange" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block; background: white; position: relative; z-index: 1;">
<view style="display: flex; justify-content: space-between; align-items: center;">
<text style="text-align: left;">{{editSupply.spec || '请选择规格'}}</text>
<text style="color: #999;">▼</text>
</view>
</view>
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">地区</view>
<view
class="region-picker input"
bindtap="openEditRegionModal"
style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;"
>
<text style="text-align: left;">{{editSupply.region || '请选择省市区'}}</text>
</view>
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">价格</view>
<input class="input" type="text" placeholder="请输入价格" bindinput="onEditInput" data-field="price" value="{{editSupply.price}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;"></input>
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">件数</view>
<input class="input" type="number" placeholder="请输入件数" bindinput="onEditInput" data-field="minOrder" value="{{editSupply.minOrder}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;"></input>
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">斤重</view>
<input class="input" type="text" placeholder="请输入斤重" bindinput="onEditInput" data-field="grossWeight" value="{{editSupply.grossWeight || ''}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;"></input>
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">联系电话</view>
<input class="input" type="number" placeholder="请输入联系电话" bindinput="onEditInput" data-field="contact_phone" value="{{editSupply.contact_phone}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;"></input>
<!-- 添加底部空白区域 --> <!-- 添加底部空白区域 -->
<view style="height: 20vh; background: transparent;"></view> <view style="height: 20vh; background: transparent;"></view>
@ -414,4 +365,55 @@
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<!-- 销售员选择弹窗 - 白色样式 -->
<view class="custom-select-modal" wx:if="{{showSalesPersonSelectModal}}" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; justify-content: center; z-index: 9999;" catchtouchmove="true">
<view style="position: fixed; bottom: 0; left: 0; right: 0; background: white; border-radius: 20rpx 20rpx 0 0; max-height: 80vh;">
<!-- 顶部操作栏:取消和确定按钮 -->
<view style="padding: 20rpx; display: flex; justify-content: space-between; align-items: center; border-bottom: 1rpx solid #eee;">
<view bindtap="closeSalesPersonSelectModal" style="font-size: 32rpx; color: #333; padding: 10rpx 20rpx;">取消</view>
<view bindtap="confirmSalesPersonSelection" style="font-size: 32rpx; color: #07c160; padding: 10rpx 20rpx;">确定</view>
</view>
<!-- 搜索框区域 -->
<view style="padding: 20rpx;">
<view style="position: relative; background: #f5f5f5; border-radius: 40rpx; padding: 0 30rpx;">
<input
type="text"
placeholder="搜索销售员"
value="{{modalSalesPersonSearchKeyword}}"
bindinput="onModalSalesPersonSearchInput"
confirm-type="search"
style="width: 100%; height: 70rpx; line-height: 70rpx; font-size: 28rpx; background: transparent;"
/>
<view
wx:if="{{modalSalesPersonSearchKeyword}}"
bindtap="clearModalSalesPersonSearch"
style="position: absolute; right: 30rpx; top: 50%; transform: translateY(-50%); color: #999;"
>
</view>
</view>
</view>
<!-- 销售员列表 -->
<scroll-view
scroll-y="true"
style="max-height: 60vh; padding: 0; -webkit-overflow-scrolling: touch; -webkit-scrollbar: none; scrollbar-width: none;"
enable-back-to-top="false"
>
<view
wx:for="{{filteredSalesPersonnelOptions}}"
wx:key="index"
class="select-item {{selectedSalesPersonIndex === index ? 'selected' : ''}}"
bindtap="onSalesPersonSelect"
data-index="{{index}}"
style="padding: 32rpx 40rpx; border-bottom: 1rpx solid #f0f0f0; text-align: left;"
>
<view style="font-size: 32rpx; color: {{selectedSalesPersonIndex === index ? '#07c160' : '#131413'}}; font-weight: 500;">{{item.name}}</view>
<view style="font-size: 24rpx; color: #999; margin-top: 8rpx;">{{item.phoneNumber || '暂无电话'}}</view>
</view>
</scroll-view>
</view>
</view>
</view> </view>

83
server-example/server-mysql.js

@ -5613,6 +5613,11 @@ app.post('/api/product/edit', async (req, res) => {
productKeys: product ? Object.keys(product) : '无product' productKeys: product ? Object.keys(product) : '无product'
}); });
// ========== 【新增】调试:打印productId的类型和值 ==========
console.log('【调试】productId类型:', typeof productId, '值:', productId);
console.log('【调试】openid类型:', typeof openid, '值:', openid);
// ========== 调试结束 ==========
// ========== 【新增】编辑商品时的地区字段调试 ========== // ========== 【新增】编辑商品时的地区字段调试 ==========
console.log('【地区字段调试】编辑商品 - 开始处理'); console.log('【地区字段调试】编辑商品 - 开始处理');
console.log('【地区字段调试】请求体中的region字段:', req.body.region); console.log('【地区字段调试】请求体中的region字段:', req.body.region);
@ -6796,6 +6801,84 @@ app.post('/api/products/update-contacts', async (req, res) => {
} }
}); });
// 添加API接口:快速更新商品价格和联系人信息(不验证sellerId)
app.post('/api/products/quick-update', async (req, res) => {
console.log('【快速更新】收到请求:', req.body);
try {
const { productId, price, product_contact, contact_phone } = req.body;
if (!productId) {
return res.status(400).json({
success: false,
code: 400,
message: '缺少productId参数'
});
}
// 查找商品
const product = await Product.findOne({
where: { productId }
});
if (!product) {
console.error('【快速更新】商品不存在:', productId);
return res.status(404).json({
success: false,
code: 404,
message: '商品不存在'
});
}
console.log('【快速更新】找到商品:', product.productName);
// 只更新指定的字段
const updateFields = {
updated_at: getBeijingTime()
};
if (price !== undefined) {
updateFields.price = price;
console.log('【快速更新】更新价格:', price);
}
if (product_contact !== undefined) {
updateFields.product_contact = product_contact;
console.log('【快速更新】更新联系人:', product_contact);
}
if (contact_phone !== undefined) {
updateFields.contact_phone = contact_phone;
console.log('【快速更新】更新联系电话:', contact_phone);
}
// 执行更新
await Product.update(updateFields, {
where: { productId }
});
console.log('【快速更新】商品更新成功:', productId);
res.json({
success: true,
code: 200,
message: '更新成功',
data: {
productId,
price: updateFields.price,
product_contact: updateFields.product_contact,
contact_phone: updateFields.contact_phone
}
});
} catch (error) {
console.error('【快速更新】更新商品失败:', error);
res.status(500).json({
success: false,
code: 500,
message: '更新商品失败: ' + error.message
});
}
});
// REST API接口 - 获取用户会话列表 // REST API接口 - 获取用户会话列表
app.get('/api/conversations/user/:userId', async (req, res) => { app.get('/api/conversations/user/:userId', async (req, res) => {
try { try {

24
utils/api.js

@ -1641,6 +1641,25 @@ module.exports = {
}); });
}, },
// 获取销售员列表 - projectName='销售员'的人员
getSalesPersonnel: function () {
console.log('获取销售员列表...');
return new Promise((resolve) => {
request('/api/managers', 'GET', { type: 'seller' }) // type=seller查询销售员
.then(res => {
console.log('获取销售员列表成功:', res);
// 适配不同的数据返回格式
const data = res && res.data && Array.isArray(res.data) ? res.data :
res && Array.isArray(res) ? res : [];
resolve(data);
})
.catch(err => {
console.error('获取销售员列表失败:', err);
resolve([]);
});
});
},
// 根据手机号获取客服的managerId - 优化版 // 根据手机号获取客服的managerId - 优化版
getManagerIdByPhone: function (phoneNumber) { getManagerIdByPhone: function (phoneNumber) {
console.log('根据手机号获取managerId:', phoneNumber); console.log('根据手机号获取managerId:', phoneNumber);
@ -3322,7 +3341,10 @@ module.exports = {
specification: processedProductData.specification || '', specification: processedProductData.specification || '',
region: productData.region || '', // 【重要】确保地区字段在product对象中 region: productData.region || '', // 【重要】确保地区字段在product对象中
imageUrls: processedProductData.imageUrls || [], // 【重要】包含处理后的图片URL imageUrls: processedProductData.imageUrls || [], // 【重要】包含处理后的图片URL
status: processedProductData.status || '' status: processedProductData.status || '',
// 新增:联系人和联系电话
product_contact: processedProductData.product_contact || '',
contact_phone: processedProductData.contact_phone || '',
}, },
// 同时在顶层也传递status参数,确保服务器端能正确接收 // 同时在顶层也传递status参数,确保服务器端能正确接收
status: processedProductData.status || '' status: processedProductData.status || ''

Loading…
Cancel
Save