傅行帆 5 年之前
父節點
當前提交
3bfad1e5ea
共有 3 個檔案被更改,包括 19 行新增8 行删除
  1. 1
    1
      src/pages/sample/demand/edit.jsx
  2. 10
    1
      src/pages/sample/demand/index.jsx
  3. 8
    6
      src/pages/sample/h5/edit.jsx

+ 1
- 1
src/pages/sample/demand/edit.jsx 查看文件

@@ -81,8 +81,8 @@ const header = props => {
81 81
       {
82 82
         label: '备注',
83 83
         name: 'remark',
84
-        type: FieldTypes.Text,
85 84
         value: data.remark,
85
+        render: <Input placeholder="不超过100个字" maxLength = "100"/>
86 86
       },
87 87
       {
88 88
         label: '最后修改时间',

+ 10
- 1
src/pages/sample/demand/index.jsx 查看文件

@@ -50,7 +50,16 @@ function header(props) {
50 50
   }
51 51
 
52 52
   const changePageNum = (pageNumber) => {
53
-    getList({ pageNum: pageNumber, pageSize: 10 })
53
+    let {createDate, ...submitValue}  = props.form.getFieldsValue()
54
+    if(null != createDate && createDate.length > 0){
55
+      const [startCreateDate, endCreateDate] = createDate
56
+      submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
57
+      submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
58
+    }else{
59
+      submitValue.startCreateDate = null
60
+      submitValue.endCreateDate = null
61
+    }
62
+    getList({ pageNum: pageNumber, pageSize: 10, ...submitValue })
54 63
   }
55 64
 
56 65
   const rowSelection = {

+ 8
- 6
src/pages/sample/h5/edit.jsx 查看文件

@@ -116,19 +116,19 @@ const header = props => {
116 116
           </Form.Item>
117 117
           <Form.Item label="发布状态" >
118 118
             {getFieldDecorator('status', {
119
-              initialValue: "1",
119
+              initialValue: 1,
120 120
             })(
121 121
             <Select style={{ width: '180px' }}>
122
-              <Select.Option value="1">是</Select.Option>
123
-              <Select.Option value="0">否</Select.Option>
122
+              <Select.Option value={1}>是</Select.Option>
123
+              <Select.Option value={0}>否</Select.Option>
124 124
             </Select>)}
125 125
           </Form.Item>
126 126
           <Form.Item label="权重" help="数值越大越靠前">
127
-            {getFieldDecorator('orderNo')(<InputNumber />)}
127
+            {getFieldDecorator('orderNo')(<InputNumber placeholder="权重越大,在列表中的排序越靠前" />)}
128 128
           </Form.Item>
129 129
           <Form.Item label="标签" help="标签长度6个字,最多3个标签">
130 130
             {getFieldDecorator('tags')(
131
-              <Select mode="tags" placeholder="输入后选中" style={{ width: '1016px' }}>
131
+              <Select mode="tags" placeholder="输入标签,回车确认后再输入下一个" style={{ width: '1016px' }}>
132 132
 
133 133
               </Select>,
134 134
             )}
@@ -150,7 +150,9 @@ const header = props => {
150 150
             })(<Input placeholder="填写外部链接,如公众号链接或135编辑器生成的页面链接" />)}
151 151
           </Form.Item>}
152 152
           {typeState === 'rich' && <Form.Item label="样例内容" >
153
-            {getFieldDecorator('sampleContent')(
153
+            {getFieldDecorator('sampleContent', {
154
+              rules: [{ required: true, message: '请输入样例内容' }],
155
+            })(
154 156
               <Wangedit />,
155 157
             )}
156 158
           </Form.Item> }