Sfoglia il codice sorgente

订单详情增加价格类型

zhanghe 6 anni fa
parent
commit
a2feb8132c

+ 5 - 2
src/routes/Order/Edit/OrderProfile.js

@@ -199,10 +199,13 @@ export default class OrderProfile extends Component {
       key: 3,
       width: '15%',
     }, {
-      title: '商品售价(元)',
-      dataIndex: 'merchantPrice',
+      title: '商品价格',
       key: 4,
       width: '20%',
+      render: (_, record) => {
+        const { merchantPrice, chargeUnit } = record;
+        return `¥${merchantPrice}/${chargeUnit}`;
+      },
     }, {
       title: '商品数量',
       dataIndex: 'quantity',

+ 5 - 2
src/routes/Order/Edit/SubOrderProfile.js

@@ -223,9 +223,12 @@ export default class SubOrderProfile extends Component {
       key: 3,
       width: '15%',
     }, {
-      title: '商品售价(元)',
-      dataIndex: 'merchantPrice',
+      title: '商品价格',
       key: 4,
+      render: (_, record) => {
+        const { chargeUnit, merchantPrice }  = record;
+        return `¥${merchantPrice}/${chargeUnit}`;
+      },
       width: '25%',
     }, {
       title: '商品数量',