Commit 640a2a4c authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 订单收发货添加skuId

parent a394831e
......@@ -31,9 +31,9 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
const outOrderCols: any[] = [
{
title: '商品ID',
dataIndex: 'productId',
dataIndex: 'skuId',
align: 'center',
key: 'productId'
key: 'skuId'
},
{
title: '商品名称',
......@@ -114,9 +114,9 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
const sideChildrenCols: any[] = [
{
title: '商品ID',
dataIndex: 'productId',
dataIndex: 'skuId',
align: 'center',
key: 'productId',
key: 'skuId',
},
{
title: '商品名称',
......@@ -278,7 +278,7 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
columns={outOrderCols}
dataSource={deliveries}
pagination={false}
rowKey="productId"
rowKey="skuId"
/>
</Tabs.TabPane>
}
......
......@@ -95,7 +95,7 @@ const schema: ISchema = {
type: 'array',
"x-component": 'MultTable',
"x-component-props": {
rowKey: 'productId',
rowKey: 'skuId',
columns: "{{productColumns}}",
components: "{{productComponents}}",
// expandable: "{{productChildren}}",
......
......@@ -6,9 +6,9 @@ import ProductTableCell, { ProductEditableRow } from '../components/productTable
const productColumns: any = [
{
title: '商品ID',
dataIndex: 'productId',
dataIndex: 'skuId',
align: 'center',
key: 'productId'
key: 'skuId'
},
{
title: '商品名称',
......@@ -109,7 +109,7 @@ export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
const handleSave = row => {
return new Promise((resolve, reject) => {
const newData = [...ctx.getFieldValue('products')];
const index = newData.findIndex(item => row.productId === item.productId);
const index = newData.findIndex(item => row.skuId === item.skuId);
const item = newData[index];
newData.splice(index, 1, {
...item,
......
......@@ -218,9 +218,9 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
const productInfoColumns: any[] = [
{
title: 'ID',
dataIndex: 'productId',
dataIndex: 'skuId',
align: 'center',
key: 'productId',
key: 'skuId',
},
{
title: '商品名称',
......@@ -417,7 +417,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
columns={ contractOrder ? materialInfo : productInfoColumns }
dataSource={product.products}
components={productComponents}
rowKey='id'
rowKey='skuId'
pagination={false}
/>
<MoneyTotalBox dataSource={data} preview={preview}/>
......
......@@ -35,9 +35,9 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
const outOrderCols: any[] = [
{
title: '商品ID',
dataIndex: 'productId',
dataIndex: 'skuId',
align: 'center',
key: 'productId'
key: 'skuId'
},
{
title: '商品名称',
......@@ -118,9 +118,9 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
const sideChildrenCols: any[] = [
{
title: '商品ID',
dataIndex: 'productId',
dataIndex: 'skuId',
align: 'center',
key: 'productId',
key: 'skuId',
},
{
title: '商品名称',
......@@ -343,7 +343,7 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
columns={outOrderCols}
dataSource={deliveries}
pagination={false}
rowKey="productId"
rowKey="skuId"
/>
</Tabs.TabPane>
}
......
......@@ -379,9 +379,9 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
const productInfoColumns: any[] = [
{
title: 'ID',
dataIndex: 'productId',
dataIndex: 'skuId',
align: 'center',
key: 'productId',
key: 'skuId',
},
{
title: '商品名称',
......@@ -588,7 +588,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
columns={ contractOrder ? materialInfo : columns}
dataSource={product.products}
components={productComponents}
rowKey='id'
rowKey='skuId'
pagination={false}
/>
<MoneyTotalBox dataSource={data} isEditData={isEditData}/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment