Browse Source

去掉帮助说明模块

zhanghe 6 years ago
parent
commit
cafeaa879d

+ 1 - 2
package.json

@@ -19,7 +19,7 @@
     "test:all": "node ./tests/run-tests.js"
   },
   "dependencies": {
-    "antd": "^3.0.0",
+    "antd": "^3.1.6",
     "babel-polyfill": "^6.26.0",
     "babel-runtime": "^6.9.2",
     "classnames": "^2.2.5",
@@ -77,7 +77,6 @@
     "mockjs": "^1.0.1-beta3",
     "prettier": "^1.9.0",
     "pro-download": "^1.0.0",
-    "react-markdown": "^3.1.4",
     "react-test-renderer": "^16.0.0",
     "redbox-react": "^1.3.2",
     "roadhog": "^1.3.1",

+ 4 - 4
src/common/menu.js

@@ -96,10 +96,10 @@ const menuData = [
       name: 'CMS用户',
       path: 'user',
     }]
-  },{
-    name: '使用说明',
-    icon: 'question-circle-o',
-    path: 'help',
+  // },{
+  //   name: '使用说明',
+  //   icon: 'question-circle-o',
+  //   path: 'help',
   },
 ];
 

+ 3 - 3
src/common/router.js

@@ -36,9 +36,9 @@ export const getRouterData = (app) => {
     '/': {
       component: dynamicWrapper(app, ['user', 'login'], () => import('../layouts/BasicLayout')),
     },
-    '/help': {
-      component: dynamicWrapper(app, [], () => import('../routes/About')),
-    },
+    // '/help': {
+    //   component: dynamicWrapper(app, [], () => import('../routes/About')),
+    // },
     '/dashboard': {
       component: dynamicWrapper(app, [], () => import('../routes/Dashboard')),
     },

+ 1 - 1
src/routes/MProduct/Edit/index.js

@@ -271,7 +271,7 @@ export default class MerchantProductEdit extends PureComponent {
             onSearch={this.handleTagModalSearch}
             fsTableOnChange={this.handleTagModalTableChange}
           />
-          {tags ? tags.map(item => <Tag color="#f50">{item.name}</Tag>) : null}
+          {tags ? tags.map(item => <Tag key={item.id} color="#f50">{item.name}</Tag>) : null}
         </Card>
         <FooterToolbar>
           <Button onClick={this.handlePageExit} type="primary">

+ 5 - 0
src/routes/MProduct/Edit/price.js

@@ -26,6 +26,10 @@ export default class NewPriceModal extends PureComponent {
     });
   }
 
+  handleTest = (value) => {
+    console.log(value);
+  }
+
   render() {
     const { form, data, onSubmit, ...modalProps } = this.props;
     const { getFieldDecorator } = form;
@@ -56,6 +60,7 @@ export default class NewPriceModal extends PureComponent {
                 min={0}
                 style={{ width: '80%' }}
                 placeholder="请填写"
+                onChange={this.handleTest}
                 formatter={value => `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')}
                 parser={value => value.replace(/\¥\s?|(,*)/g, '')}
               />

+ 74 - 2
src/routes/Order/Add/index.js

@@ -140,6 +140,71 @@ export default class CreateOrder extends Component {
   }
 
   /**
+   * @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}
@@ -175,6 +240,7 @@ export default class CreateOrder extends Component {
     const { userInfo, products } = this.state;
     const { getFieldDecorator } = form;
     const { terminalModalShow, productModalShow } = orderDetail;
+    console.log(this.state)
     const fmtProducts = this.formatTableDatas(products);
 
     const formItemLayout = {
@@ -189,6 +255,10 @@ export default class CreateOrder extends Component {
       },
     };
 
+    const newColumns = [{
+
+    }];
+
     const columns = [{
       title: '序号',
       dataIndex: 'sort',
@@ -270,11 +340,11 @@ export default class CreateOrder extends Component {
       dataIndex: 'quantity',
       key: 8,
       render: (text, record) => {
-        if (!record.isChild || record.type == Codes.CODE_SUPPORT) {
+        if (!record.isChild) {
           return (
             <InputNumber
               min={1}
-              value={text}
+              value={record.goods.filter(item => item.selected)[0].quantity}
               formatter={value => `x ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')}
               parser={value => value.replace(/\x\s?|(,*)/g, '')}
             />
@@ -288,6 +358,8 @@ export default class CreateOrder extends Component {
       title: '小计',
       dataIndex: 'rowSum',
       key: 9,
+      render: (text, record) => {
+      },
       width: '10%',
     },{
       title: '操作',