|
@@ -33,6 +33,7 @@ export default class CreateOrder extends Component {
|
|
|
state = {
|
|
|
userInfo: {}, //记录终端用户信息
|
|
|
products: [], //记录选择的产品
|
|
|
+ tableDatas: [], //记录选择的商品
|
|
|
};
|
|
|
|
|
|
// 终端选择弹框,显示 -> 加载数据
|
|
@@ -49,18 +50,9 @@ export default class CreateOrder extends Component {
|
|
|
|
|
|
// 选择终端
|
|
|
handleTerminalModalOk = (record) => {
|
|
|
- // this.props.dispatch({
|
|
|
- // type: 'orderDetail/savePickedTerminal',
|
|
|
- // payload: {
|
|
|
- // userCode: record.code,
|
|
|
- // userName: record.name,
|
|
|
- // campusName: record.campusName,
|
|
|
- // merchantName: record.merchantName,
|
|
|
- // merchantId: record.merchantId,
|
|
|
- // }
|
|
|
- // });
|
|
|
this.setState({
|
|
|
userInfo: {
|
|
|
+ uid: record.id,
|
|
|
userCode: record.code,
|
|
|
userName: record.name,
|
|
|
campusName: record.campusName,
|
|
@@ -112,11 +104,11 @@ export default class CreateOrder extends Component {
|
|
|
|
|
|
// 选择产品
|
|
|
handleProductModalOk = (data) => {
|
|
|
- // this.props.dispatch({
|
|
|
- // type: 'orderDetail/savePickedProducts',
|
|
|
- // payload: data,
|
|
|
- // });
|
|
|
- this.setState({ products: data || [] });
|
|
|
+ const formatedData = this.tableDataConventer(data);
|
|
|
+ this.setState({
|
|
|
+ products: data || [],
|
|
|
+ tableDatas: formatedData,
|
|
|
+ });
|
|
|
this.props.dispatch({ type: 'orderDetail/hideProductModal' });
|
|
|
}
|
|
|
|
|
@@ -130,6 +122,63 @@ export default class CreateOrder extends Component {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ PKGPriceCalculator = (item, tableDatas) => {
|
|
|
+ // 根据key找到该课程包内的所有配套
|
|
|
+ const parentId = item.key;
|
|
|
+ const subSupports = tableDatas.filter(row =>
|
|
|
+ row.key.indexOf(`${parentId}[sub]`) !== -1 && row.type == Codes.CODE_SUPPORT
|
|
|
+ );
|
|
|
+ // 计算该课程包的价格
|
|
|
+ let sumSupportsPrice = 0;
|
|
|
+ subSupports.map(one => {
|
|
|
+ sumSupportsPrice += one.price1 * one.quantity;
|
|
|
+ });
|
|
|
+ item.rowSum = item.quantity * item.price3 + sumSupportsPrice;
|
|
|
+ }
|
|
|
+
|
|
|
+ handleInputNumberChange = (record, value) => {
|
|
|
+ const { tableDatas } = this.state;
|
|
|
+ const newTableDatas = [...tableDatas];
|
|
|
+ newTableDatas.map(item => {
|
|
|
+ if (item.key == record.key) {
|
|
|
+ item.quantity = value;
|
|
|
+ if (record.type == Codes.CODE_PACKAGE) {
|
|
|
+ this.PKGPriceCalculator(item, newTableDatas);
|
|
|
+ } else if (record.type == Codes.CODE_SUPPORT && item.parent) {
|
|
|
+ const parentId = item.key.split('[sub]')[0];
|
|
|
+ newTableDatas.map(item => item.key == parentId ? this.PKGPriceCalculator(item, newTableDatas) : null);
|
|
|
+ } else {
|
|
|
+ item.rowSum = item.quantity * item.price3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.setState({ tableDatas: newTableDatas });
|
|
|
+ }
|
|
|
+
|
|
|
+ handleSelectChange = (record, value) => {
|
|
|
+ const { tableDatas } = this.state;
|
|
|
+ const newTableDatas = [...tableDatas];
|
|
|
+ newTableDatas.map(item => {
|
|
|
+ if (item.key == record.key) {
|
|
|
+ const match = item.options.filter(one => one.goodsId == value)[0];
|
|
|
+ item.price1 = match.price1;
|
|
|
+ item.price2 = match.price2;
|
|
|
+ item.price3 = match.price3;
|
|
|
+ item.chargeUnit = match.chargeUnit;
|
|
|
+ item.goodsId = value;
|
|
|
+ if (record.type == Codes.CODE_PACKAGE) {
|
|
|
+ this.PKGPriceCalculator(item, newTableDatas);
|
|
|
+ } else if (record.type == Codes.CODE_SUPPORT && item.parent) {
|
|
|
+ const parentId = item.key.split('[sub]')[0];
|
|
|
+ newTableDatas.map(item => item.key == parentId ? this.PKGPriceCalculator(item, newTableDatas) : null);
|
|
|
+ } else {
|
|
|
+ item.rowSum = item.quantity * item.price3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.setState({ tableDatas: newTableDatas });
|
|
|
+ }
|
|
|
+
|
|
|
handlePageCancel = () => {
|
|
|
const { orderDetail, dispatch } = this.props;
|
|
|
const { filters } = orderDetail;
|
|
@@ -139,109 +188,147 @@ export default class CreateOrder extends Component {
|
|
|
}));
|
|
|
}
|
|
|
|
|
|
+ handlePageSubmit = () => {
|
|
|
+ const { form, dispatch, orderDetail } = this.props;
|
|
|
+ const { userInfo, tableDatas } = this.state;
|
|
|
+ const { getFieldsValue, validateFields } = form;
|
|
|
+ const { filters } = orderDetail;
|
|
|
+ const { uid } = userInfo;
|
|
|
+ validateFields((errors) => {
|
|
|
+ if (errors) return;
|
|
|
+ const postData = getFieldsValue();
|
|
|
+ const detailList = [];
|
|
|
+ tableDatas.map(item => {
|
|
|
+ const { goodsId, quantity } = item;
|
|
|
+ if (!item.parent || item.type == Codes.CODE_SUPPORT) {
|
|
|
+ detailList.push({ goodsId, quantity });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ postData.uid = uid;
|
|
|
+ postData.goods = detailList;
|
|
|
+ postData.adjustPrice = 0;
|
|
|
+ postData.orderStatus = Codes.CODE_UNPAID,
|
|
|
+ dispatch({
|
|
|
+ type: 'orderDetail/create',
|
|
|
+ payload: postData,
|
|
|
+ callback: () => {
|
|
|
+ dispatch(routerRedux.push({
|
|
|
+ pathname: '/order',
|
|
|
+ search: queryString.stringify(filters),
|
|
|
+ }));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @desc 对选择的产品列表进行加工,以适应table的展示样式,并进行数量及价格调整
|
|
|
* @param {[json]} data
|
|
|
* @return {[json]}
|
|
|
*/
|
|
|
tableDataConventer = (data) => {
|
|
|
- const jokeData = [{
|
|
|
- id: '1',
|
|
|
- pid: '1',
|
|
|
- name: '一花一世界',
|
|
|
- code: '001',
|
|
|
- type: 'COURSE',
|
|
|
- status: 'NORMAL',
|
|
|
- goods: [],
|
|
|
- tags: [],
|
|
|
- merchantId: '1234',
|
|
|
- merchantName: '贝尔安亲',
|
|
|
- },{
|
|
|
- id: '2',
|
|
|
- pid: '2',
|
|
|
- name: '看图识物手册',
|
|
|
- code: '001',
|
|
|
- type: 'SUPPORT',
|
|
|
- status: 'NORMAL',
|
|
|
- goods: [],
|
|
|
- tags: [],
|
|
|
- merchantId: '1234',
|
|
|
- merchantName: '贝尔安亲',
|
|
|
- },{
|
|
|
- id: '3',
|
|
|
- pid: '3',
|
|
|
- name: '急用先学',
|
|
|
- code: '001',
|
|
|
- type: 'PACKAGE',
|
|
|
- status: 'NORMAL',
|
|
|
- goods: [],
|
|
|
- tags: [],
|
|
|
- merchantId: '1234',
|
|
|
- merchantName: '贝尔安亲',
|
|
|
- subItemList: [{
|
|
|
- id: '4',
|
|
|
- pid: '4',
|
|
|
- name: '急用先学汉字',
|
|
|
- code: '002',
|
|
|
- type: 'SUPPORT',
|
|
|
- status: '',
|
|
|
- goods: [],
|
|
|
- tags: [],
|
|
|
- merchantId: '',
|
|
|
- merchantName: '',
|
|
|
- },{
|
|
|
- id: '5',
|
|
|
- pid: '5',
|
|
|
- name: '',
|
|
|
- code: '002',
|
|
|
- type: 'COURSE',
|
|
|
- status: '',
|
|
|
- goods: [],
|
|
|
- tags: [],
|
|
|
- merchantId: '',
|
|
|
- merchantName: '',
|
|
|
- }],
|
|
|
- }];
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @desc 对返回的单个订单数据进行加工,方便在table中进行展示及编辑
|
|
|
- * @param {Object}
|
|
|
- * @return {Object}
|
|
|
- */
|
|
|
- formatTableDatas = (data) => {
|
|
|
- const fmtProducts = data.map(item => {
|
|
|
- // 课程包类型的产品加入children字段
|
|
|
- if (item.type == Codes.CODE_PACKAGE) {
|
|
|
- item.children = item.contents;
|
|
|
- item.isChild = true;
|
|
|
- }
|
|
|
- // 把goods列表的第一项设置为默认选中项
|
|
|
- if (item.goods && item.goods.length) {
|
|
|
- item.goods.map((goodsItem, index) => {
|
|
|
- if (index == 0) {
|
|
|
- const defaultQuantity = 1;
|
|
|
- const defaultPrice = item.goods[0].terminalPrice;
|
|
|
- item.goods[0].selected = true;
|
|
|
- item.goods[0].quantity = 1;
|
|
|
- item.goods[0].rowSum = defaultPrice * defaultQuantity;
|
|
|
+ let rowSort = 1;
|
|
|
+ const formatedData = new Array();
|
|
|
+ const rowDataMaker = (item) => {
|
|
|
+ const first = item.goods[0];
|
|
|
+ return {
|
|
|
+ name: item.name,
|
|
|
+ code: item.code,
|
|
|
+ type: item.type,
|
|
|
+ goodsId: first.id,
|
|
|
+ price1: first.cpPrice,
|
|
|
+ price2: first.merchantPrice,
|
|
|
+ price3: first.terminalPrice,
|
|
|
+ rowSum: first.terminalPrice,
|
|
|
+ chargeUnit: first.chargeUnit,
|
|
|
+ };
|
|
|
+ };
|
|
|
+ data.map(item => {
|
|
|
+ if (item.type == Codes.CODE_COURSE) {
|
|
|
+ const newObj = rowDataMaker(item);
|
|
|
+ newObj.sumRows = 1;
|
|
|
+ newObj.quantity = 1;
|
|
|
+ newObj.key = item.id; // table row, type course, key is id
|
|
|
+ newObj.options = item.goods.map(
|
|
|
+ one => ({
|
|
|
+ goodsId: one.id,
|
|
|
+ price1: one.cpPrice,
|
|
|
+ price2: one.merchantPrice,
|
|
|
+ price3: one.terminalPrice,
|
|
|
+ chargeUnit: one.chargeUnit,
|
|
|
+ })
|
|
|
+ );
|
|
|
+ newObj.rowSort = rowSort;
|
|
|
+ rowSort += 1;
|
|
|
+ formatedData.push(newObj);
|
|
|
+ } else if (item.type == Codes.CODE_SUPPORT) {
|
|
|
+ const newObj = rowDataMaker(item);
|
|
|
+ newObj.sumRows = 1;
|
|
|
+ newObj.quantity = 1;
|
|
|
+ newObj.key = item.id; // table row, type support, key is id
|
|
|
+ newObj.rowSort = rowSort;
|
|
|
+ rowSort += 1;
|
|
|
+ formatedData.push(newObj);
|
|
|
+ } else if (item.type == Codes.CODE_PACKAGE) {
|
|
|
+ const products = item.products;
|
|
|
+ const specials = item.specials;
|
|
|
+ // 产品包为一行
|
|
|
+ const newObj = rowDataMaker(item);
|
|
|
+ newObj.sumRows = products ? products.length + 1 : 1;
|
|
|
+ newObj.quantity = 1;
|
|
|
+ newObj.key = item.id; // table row, type package, key is id
|
|
|
+ newObj.options = item.goods.map(
|
|
|
+ one => ({
|
|
|
+ goodsId: one.id,
|
|
|
+ price1: one.cpPrice,
|
|
|
+ price2: one.merchantPrice,
|
|
|
+ price3: one.terminalPrice,
|
|
|
+ chargeUnit: one.chargeUnit,
|
|
|
+ })
|
|
|
+ );
|
|
|
+ newObj.rowSort = rowSort;
|
|
|
+ rowSort += 1;
|
|
|
+ formatedData.push(newObj);
|
|
|
+ // 产品包中products每一项为一行
|
|
|
+ products.map(subItem => {
|
|
|
+ const matchGoods = specials.filter(specialsItem => specialsItem.pid == subItem.pid)[0];
|
|
|
+ const newObj = new Object();
|
|
|
+ newObj.sumRows = 0;
|
|
|
+ newObj.name = subItem.name;
|
|
|
+ newObj.code = subItem.code;
|
|
|
+ newObj.type = subItem.type;
|
|
|
+ newObj.key = `${item.id}[sub]${subItem.id}`; // table row, type package subPro, key is pkgId[sub]pid
|
|
|
+ // 产品包中的配套 - 显示价格及支持数量调整
|
|
|
+ if (subItem.type == Codes.CODE_SUPPORT) {
|
|
|
+ newObj.parent = true;
|
|
|
+ newObj.goodsId = matchGoods.id;
|
|
|
+ newObj.chargeUnit = '件';
|
|
|
+ newObj.price1 = matchGoods.cpPrice;
|
|
|
+ newObj.price2 = '-';
|
|
|
+ newObj.price3 = '-';
|
|
|
+ newObj.quantity = 0;
|
|
|
+ // 产品包中的课程 - 不显示价格并且不支持数量调整
|
|
|
+ } else if (subItem.type == Codes.CODE_COURSE) {
|
|
|
+ newObj.parent = true;
|
|
|
+ newObj.chargeUnit = '-';
|
|
|
+ newObj.price1 = '-';
|
|
|
+ newObj.price2 = '-';
|
|
|
+ newObj.price3 = '-';
|
|
|
+ newObj.quantity = '-';
|
|
|
}
|
|
|
+ formatedData.push(newObj);
|
|
|
});
|
|
|
- } else {
|
|
|
- item.goods = [];
|
|
|
}
|
|
|
- return item;
|
|
|
});
|
|
|
- return fmtProducts;
|
|
|
+ return formatedData;
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
const { orderDetail, terminal, mproduct, form } = this.props;
|
|
|
- const { userInfo, products } = this.state;
|
|
|
+ const { userInfo, products, tableDatas } = this.state;
|
|
|
const { getFieldDecorator } = form;
|
|
|
const { terminalModalShow, productModalShow } = orderDetail;
|
|
|
- console.log(this.state)
|
|
|
- const fmtProducts = this.formatTableDatas(products);
|
|
|
+ const listData = tableDatas;
|
|
|
|
|
|
const formItemLayout = {
|
|
|
labelCol: {
|
|
@@ -255,16 +342,12 @@ export default class CreateOrder extends Component {
|
|
|
},
|
|
|
};
|
|
|
|
|
|
- const newColumns = [{
|
|
|
-
|
|
|
- }];
|
|
|
-
|
|
|
const columns = [{
|
|
|
title: '序号',
|
|
|
- dataIndex: 'sort',
|
|
|
- render: (text, record, index) => index + 1,
|
|
|
+ dataIndex: 'rowSort',
|
|
|
width: '6%',
|
|
|
key: 0,
|
|
|
+ render: (text, row) => ({ children: text, props: { rowSpan: row.sumRows } }),
|
|
|
},{
|
|
|
title: '编号',
|
|
|
dataIndex: 'code',
|
|
@@ -280,99 +363,110 @@ export default class CreateOrder extends Component {
|
|
|
dataIndex: 'type',
|
|
|
key: 3,
|
|
|
render: (text) => productType[text],
|
|
|
- width: '6%',
|
|
|
+ width: '10%',
|
|
|
},{
|
|
|
title: '价格类型',
|
|
|
dataIndex: 'goods',
|
|
|
key: 4,
|
|
|
- render: (text, record) => {
|
|
|
- if (!record.isChild) {
|
|
|
+ render: (text, row) => {
|
|
|
+ // 既不是单独课程也不是课程包里的配套
|
|
|
+ if (!row.options && row.type !== Codes.CODE_SUPPORT) {
|
|
|
+ return '-';
|
|
|
+ // 单独的课程
|
|
|
+ } else if (row.options) {
|
|
|
return (
|
|
|
- <Select
|
|
|
- value={record.goods.filter(item => item.selected)[0].id}
|
|
|
- >
|
|
|
- {record.goods.map(item => <Select.Option key={item.id} value={item.id}>{`¥${item.terminalPrice} / ${item.chargeUnit}`}</Select.Option>)}
|
|
|
+ <Select style={{ width: '100%' }} value={row.goodsId} onChange={(value) => this.handleSelectChange(row, value)}>
|
|
|
+ {row.options.map(item => <Select.Option key={item.goodsId} value={item.goodsId}>{`¥${item.price3} / ${item.chargeUnit}`}</Select.Option>)}
|
|
|
</Select>
|
|
|
);
|
|
|
- } else {
|
|
|
- return '-';
|
|
|
+ // 课程包里的配套(显示价格和数量)
|
|
|
+ } else if (!row.options && row.type == Codes.CODE_SUPPORT) {
|
|
|
+ return `¥${row.price1} / ${row.chargeUnit}`;
|
|
|
}
|
|
|
},
|
|
|
- width: '15%',
|
|
|
+ width: '13%',
|
|
|
},{
|
|
|
- title: '供应商售价',
|
|
|
- dataIndex: 'cpPrice',
|
|
|
+ title: '供应商售价(¥)',
|
|
|
+ dataIndex: 'price1',
|
|
|
key: 5,
|
|
|
- render: (text, record) => {
|
|
|
- if (!record.isChild) {
|
|
|
- return record.goods.filter(item => item.selected)[0].cpPrice;
|
|
|
- } else {
|
|
|
- return '-';
|
|
|
- }
|
|
|
- },
|
|
|
width: '10%',
|
|
|
},{
|
|
|
- title: '领教售价',
|
|
|
- dataIndex: 'merchantPrice',
|
|
|
+ title: '领教售价(¥)',
|
|
|
+ dataIndex: 'price2',
|
|
|
key: 6,
|
|
|
- render: (text, record) => {
|
|
|
- if (!record.isChild) {
|
|
|
- return record.goods.filter(item => item.selected)[0].merchantPrice;
|
|
|
- } else {
|
|
|
- return '-';
|
|
|
- }
|
|
|
- },
|
|
|
width: '10%',
|
|
|
},{
|
|
|
- title: '渠道售价',
|
|
|
- dataIndex: 'terminalPrice',
|
|
|
+ title: '渠道售价(¥)',
|
|
|
+ dataIndex: 'price3',
|
|
|
key: 7,
|
|
|
- render: (text, record) => {
|
|
|
- if (!record.isChild) {
|
|
|
- return record.goods.filter(item => item.selected)[0].terminalPrice;
|
|
|
- } else {
|
|
|
- return '-';
|
|
|
- }
|
|
|
- },
|
|
|
width: '10%',
|
|
|
},{
|
|
|
title: '数量',
|
|
|
dataIndex: 'quantity',
|
|
|
key: 8,
|
|
|
- render: (text, record) => {
|
|
|
- if (!record.isChild) {
|
|
|
+ render: (text, row) => {
|
|
|
+ // 课程
|
|
|
+ if (row.type == Codes.CODE_COURSE && !row.parent) {
|
|
|
return (
|
|
|
<InputNumber
|
|
|
+ value={text}
|
|
|
+ onChange={(value) => this.handleInputNumberChange(row, value)}
|
|
|
min={1}
|
|
|
- value={record.goods.filter(item => item.selected)[0].quantity}
|
|
|
+ placeholder="请填写"
|
|
|
+ />
|
|
|
+ );
|
|
|
+ // 配套
|
|
|
+ } else if (row.type == Codes.CODE_COURSE && !row.parent) {
|
|
|
+ return (
|
|
|
+ <InputNumber
|
|
|
+ value={text}
|
|
|
+ onChange={(value) => this.handleInputNumberChange(row, value)}
|
|
|
+ min={1}
|
|
|
+ placeholder="请填写"
|
|
|
+ />
|
|
|
+ );
|
|
|
+ // 课程包
|
|
|
+ } else if (row.type == Codes.CODE_PACKAGE) {
|
|
|
+ return (
|
|
|
+ <InputNumber
|
|
|
+ value={text}
|
|
|
+ onChange={(value) => this.handleInputNumberChange(row, value)}
|
|
|
+ min={1}
|
|
|
+ placeholder="请填写"
|
|
|
+ />
|
|
|
+ );
|
|
|
+ // 课程包内的配套
|
|
|
+ } else if (row.type == Codes.CODE_SUPPORT && row.parent) {
|
|
|
+ return (
|
|
|
+ <InputNumber
|
|
|
+ value={text}
|
|
|
+ onChange={(value) => this.handleInputNumberChange(row, value)}
|
|
|
+ min={0}
|
|
|
+ placeholder="请填写"
|
|
|
/>
|
|
|
);
|
|
|
} else {
|
|
|
- return '-';
|
|
|
+ return text;
|
|
|
}
|
|
|
},
|
|
|
width: '6%',
|
|
|
},{
|
|
|
- title: '小计',
|
|
|
+ title: '小计(¥)',
|
|
|
dataIndex: 'rowSum',
|
|
|
key: 9,
|
|
|
- render: (text, record) => {
|
|
|
- },
|
|
|
- width: '10%',
|
|
|
+ render: (text, row) => ({ children: text, props: { rowSpan: row.sumRows } }),
|
|
|
+ width: '8%',
|
|
|
},{
|
|
|
title: '操作',
|
|
|
dataIndex: 'operation',
|
|
|
key: 10,
|
|
|
- render: (text, record) => {
|
|
|
- if (!record.isChild) {
|
|
|
- return <a onClick={() => this.handleListItemDel(record)}>删除</a>;
|
|
|
- } else {
|
|
|
- return;
|
|
|
- }
|
|
|
- },
|
|
|
+ render: (text, row) => ({ children: <a>删除</a>, props: { rowSpan: row.sumRows } }),
|
|
|
width: '7%',
|
|
|
}];
|
|
|
|
|
|
+ let total = 0;
|
|
|
+ listData.map(item => item.rowSum ? total += item.rowSum : null);
|
|
|
+
|
|
|
return (
|
|
|
<PageHeaderLayout>
|
|
|
<Card>
|
|
@@ -395,7 +489,7 @@ export default class CreateOrder extends Component {
|
|
|
: null}
|
|
|
</Form.Item>
|
|
|
<Form.Item label="收货人" {...formItemLayout}>
|
|
|
- {getFieldDecorator('contactName', {
|
|
|
+ {getFieldDecorator('name', {
|
|
|
rules: [{ required: true, type: 'string', message: '请填写收货人!' }],
|
|
|
initialValue: userInfo.contactName,
|
|
|
})(
|
|
@@ -429,11 +523,11 @@ export default class CreateOrder extends Component {
|
|
|
<Button onClick={this.handleProductSelectBtnClick} disabled={userInfo.merchantId ? false : true} type="primary" size="small" icon="plus-circle-o">添加</Button>
|
|
|
<Table
|
|
|
bordered
|
|
|
- scroll={{ x: 1300 }}
|
|
|
- rowKey={record => record.id}
|
|
|
+ scroll={{ x: 1250 }}
|
|
|
pagination={false}
|
|
|
columns={columns}
|
|
|
- dataSource={fmtProducts}
|
|
|
+ dataSource={listData}
|
|
|
+ footer={() => <strong>{`价格总计: ${total}元`}</strong>}
|
|
|
/>
|
|
|
</Form.Item>
|
|
|
</Form>
|
|
@@ -455,7 +549,7 @@ export default class CreateOrder extends Component {
|
|
|
<MerchantProductSelectModal
|
|
|
rowKeyName="id"
|
|
|
modalVisible={productModalShow}
|
|
|
- selTableData={fmtProducts}
|
|
|
+ selTableData={products}
|
|
|
style={{ top: 20 }}
|
|
|
width={660}
|
|
|
fsTableDataSource={mproduct.list}
|
|
@@ -469,7 +563,7 @@ export default class CreateOrder extends Component {
|
|
|
</Card>
|
|
|
<FooterToolbar>
|
|
|
<Button onClick={this.handlePageCancel}>取消</Button>
|
|
|
- <Button type="primary">支付</Button>
|
|
|
+ <Button onClick={this.handlePageSubmit} type="primary">提交</Button>
|
|
|
</FooterToolbar>
|
|
|
</PageHeaderLayout>
|
|
|
);
|