|
|
@@ -0,0 +1,139 @@
|
|
|
+{
|
|
|
+ "id": "route_wmaPxJxJmB",
|
|
|
+ "name": "批次管理",
|
|
|
+ "type": "route",
|
|
|
+ "props": {
|
|
|
+ "path": "stock/manage",
|
|
|
+ "devId": "route_wmaPxJxJmB",
|
|
|
+ "style": {},
|
|
|
+ "element": [
|
|
|
+ {
|
|
|
+ "id": "fComponent_zMEmQH8kBS",
|
|
|
+ "name": "批次管理页组件",
|
|
|
+ "type": "fComponent",
|
|
|
+ "props": {
|
|
|
+ "attr": [
|
|
|
+ {
|
|
|
+ "attrId": "variable_xprakCZSMp",
|
|
|
+ "attrType": "js",
|
|
|
+ "attrValue": "",
|
|
|
+ "attrJsCode": "[\r\n {\r\n label:'批次分类ID',\r\n type:'input'\r\n },\r\n {\r\n label:'批次名称',\r\n type:'input'\r\n },\r\n {\r\n label:'批次号',\r\n type:'input'\r\n },\r\n {\r\n label:'是否上架',\r\n type:'input'\r\n },\r\n]"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "attrId": "variable_iBsTwHceQA",
|
|
|
+ "attrType": "js",
|
|
|
+ "attrValue": "",
|
|
|
+ "attrJsCode": "[\r\n {\r\n title: '序号',\r\n dataIndex: '_index',\r\n key: '_index',\r\n fixed: 'left',\r\n },\r\n {\r\n title: '分类名称',\r\n dataIndex: '批次分类名称',\r\n key: '批次分类名称',\r\n fixed: 'left',\r\n },\r\n {\r\n title: '批次号',\r\n dataIndex: '批次号',\r\n key: '批次号',\r\n fixed: 'left',\r\n },\r\n {\r\n title: '批次名称',\r\n dataIndex: '批次名称',\r\n key: '批次名称',\r\n fixed: 'left',\r\n },\r\n {\r\n title: '批次简介',\r\n dataIndex: '批次简介',\r\n key: '批次简介',\r\n },\r\n {\r\n title: '上架',\r\n dataIndex: '是否上架',\r\n key: '是否上架',\r\n render: (text, record) => {\r\n return text === 1?'已上架':'已下架'\r\n }\r\n },\r\n {\r\n title: '创建时间',\r\n dataIndex: '_create',\r\n key: '_create',\r\n render: (text, record) => {\r\n //获取dayjs对象\r\n const dayjs = _F('date_func').callMethod('dayjs');\r\n // 获取当前日期\r\n const now = dayjs(text * 1000);\r\n // console.log(now.format('YYYY-MM-DD'));\r\n return now.format('YYYY-MM-DD hh:mm:ss');\r\n }\r\n },\r\n {\r\n title: '操作',\r\n dataIndex: '操作',\r\n key: 'operate',\r\n },\r\n\r\n]"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "attrId": "variable_SbaMQEMnjM",
|
|
|
+ "attrType": "js",
|
|
|
+ "attrValue": "",
|
|
|
+ "attrJsCode": "(\r\n function () {\r\n const stockPicker = _F('fComponent_Ye4eY73j27');\r\n\r\n return [\r\n {\r\n label: '批次号',\r\n name: '批次号',\r\n type: 'input'\r\n },\r\n {\r\n label: '批次名称',\r\n name: '批次名称',\r\n type: 'input',\r\n },\r\n {\r\n label: '批次分类',\r\n name: '批次分类ID',\r\n type: 'modalPicker',\r\n onClick: ({ event, form }) => {\r\n const stockPickerEvent = stockPicker?.callMethod('jsFunc_JTH4SttH2b');\r\n stockPickerEvent?.open();\r\n stockPickerEvent?.onOk(({ selectedRows }) => {\r\n if (Array.isArray(selectedRows) && selectedRows?.length > 0) {\r\n form?.setFieldValue('批次分类ID', selectedRows[0]?._id);\r\n form?.setFieldValue('批次分类名称', selectedRows[0]?.分类名称);\r\n }\r\n });\r\n },\r\n render: (form) => {\r\n const 批次分类名称 = form?.getFieldValue('批次分类名称');\r\n const 批次分类ID = form?.getFieldValue('批次分类ID');\r\n\r\n return 批次分类名称?.toString() || 批次分类ID?.toString() || '请选择';\r\n },\r\n },\r\n {\r\n label: '制券商户号',\r\n name: '制券商户号',\r\n type: 'input'\r\n },\r\n {\r\n label: '发券商户号',\r\n name: '发券商户号',\r\n type: 'input'\r\n },\r\n {\r\n label: '是否上架',\r\n name: '是否上架',\r\n type: 'input'\r\n },\r\n {\r\n label: '是否首页展示',\r\n name: '是否首页展示',\r\n type: 'input'\r\n },\r\n {\r\n label: '批次简介',\r\n name: '批次简介',\r\n type: 'textarea'\r\n },\r\n ];\r\n }()\r\n)"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "attrId": "variable_s8TWaBnH7S",
|
|
|
+ "attrType": "js",
|
|
|
+ "attrValue": "",
|
|
|
+ "attrJsCode": "(\r\n function () {\r\n\r\n return [\r\n {\r\n title: '序号',\r\n dataIndex: '_index',\r\n },\r\n {\r\n title: '批次分类ID',\r\n dataIndex: '批次分类ID',\r\n },\r\n {\r\n title: '分类名称',\r\n dataIndex: '批次分类名称',\r\n },\r\n {\r\n title: '批次名称',\r\n dataIndex: '批次名称',\r\n },\r\n {\r\n title: '批次号',\r\n dataIndex: '批次号',\r\n },\r\n {\r\n title: '发券商户号',\r\n dataIndex: '发券商户号',\r\n },\r\n {\r\n title: '制券商户号',\r\n dataIndex: '制券商户号',\r\n },\r\n {\r\n title: '上架',\r\n dataIndex: '是否上架',\r\n key: '是否上架',\r\n render: (text, record) => {\r\n return text === 1 ? '已上架' : '已下架'\r\n }\r\n },\r\n {\r\n title: '首页展示',\r\n dataIndex: '是否首页展示',\r\n key: '是否首页展示',\r\n render: (text, record) => {\r\n return text === 1 ? '展示中' : '已隐藏'\r\n }\r\n },\r\n {\r\n title: '批次简介',\r\n dataIndex: '批次简介',\r\n span: 2,\r\n },\r\n {\r\n title: '创建时间',\r\n dataIndex: '_create',\r\n render: (text) => {\r\n const dayjs = _F('date_func').callMethod('dayjs');\r\n const now = dayjs(text * 1000);\r\n return now.format('YYYY-MM-DD');\r\n }\r\n },\r\n {\r\n title: '更新时间',\r\n dataIndex: '_update',\r\n render: (text) => {\r\n const dayjs = _F('date_func').callMethod('dayjs');\r\n const now = dayjs(text * 1000);\r\n return now.format('YYYY-MM-DD');\r\n }\r\n },\r\n ]\r\n }()\r\n)"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "attrId": "variable_YNDnsMCrnc",
|
|
|
+ "attrType": "js",
|
|
|
+ "attrValue": "",
|
|
|
+ "attrJsCode": "({\r\n 搜索:'/v1/admin/stock/search',\r\n 新增:'/v1/admin/stock/add',\r\n 编辑:'/v1/admin/stock/edit',\r\n 删除:'/v1/admin/stock/del',\r\n})"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "attrId": "variable_MJHtQRsnsR",
|
|
|
+ "attrType": "js",
|
|
|
+ "attrValue": "",
|
|
|
+ "attrJsCode": "true"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "attrId": "variable_GPmKRdbzpm",
|
|
|
+ "attrType": "js",
|
|
|
+ "attrValue": "",
|
|
|
+ "attrJsCode": "true"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "devId": "fComponent_xDDXPbCsKb",
|
|
|
+ "moduleId": "module_KXT548Mji5"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "id": "group_E4Gd4Cct53",
|
|
|
+ "name": "页面弹窗",
|
|
|
+ "type": "group",
|
|
|
+ "props": {},
|
|
|
+ "children": [
|
|
|
+ {
|
|
|
+ "id": "fComponent_Ye4eY73j27",
|
|
|
+ "name": "活动分类管理页组件",
|
|
|
+ "type": "fComponent",
|
|
|
+ "props": {
|
|
|
+ "attr": [
|
|
|
+ {
|
|
|
+ "attrId": "variable_xprakCZSMp",
|
|
|
+ "attrType": "js",
|
|
|
+ "attrValue": "",
|
|
|
+ "attrJsCode": "[\r\n {\r\n label:'批次分类',\r\n type:'input'\r\n },\r\n {\r\n label:'分类名称',\r\n type:'input'\r\n },\r\n]"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "attrId": "variable_iBsTwHceQA",
|
|
|
+ "attrType": "js",
|
|
|
+ "attrValue": "",
|
|
|
+ "attrJsCode": "[\r\n {\r\n title: '序号',\r\n dataIndex: '_index',\r\n key: '_index',\r\n fixed: 'left',\r\n },\r\n {\r\n title: '批次分类',\r\n dataIndex: '批次分类',\r\n key: '批次分类',\r\n fixed: 'left',\r\n },\r\n {\r\n title: '分类名称',\r\n dataIndex: '分类名称',\r\n key: '分类名称',\r\n fixed: 'left',\r\n },\r\n {\r\n title: '最大领取次数',\r\n dataIndex: '最大领取次数',\r\n key: '最大领取次数',\r\n },\r\n {\r\n title: '创建时间',\r\n dataIndex: '_create',\r\n key: '_create',\r\n render: (text, record) => {\r\n //获取dayjs对象\r\n const dayjs = _F('date_func').callMethod('dayjs');\r\n // 获取当前日期\r\n const now = dayjs(text * 1000);\r\n // console.log(now.format('YYYY-MM-DD'));\r\n return now.format('YYYY-MM-DD hh:mm:ss');\r\n }\r\n },\r\n // {\r\n // title: '操作',\r\n // dataIndex: '操作',\r\n // key: 'operate',\r\n // },\r\n\r\n]"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "attrId": "variable_SbaMQEMnjM",
|
|
|
+ "attrType": "js",
|
|
|
+ "attrValue": "",
|
|
|
+ "attrJsCode": "[\r\n {\r\n label:'批次分类',\r\n name:'批次分类',\r\n type:'input'\r\n },\r\n {\r\n label:'分类名称',\r\n name:'分类名称',\r\n type:'input',\r\n },\r\n {\r\n label:'图片地址',\r\n name:'图片地址',\r\n type:'upload',\r\n maxCount:3,\r\n listType:'picture-card'\r\n },\r\n {\r\n label:'最大领取次数',\r\n name:'最大领取次数',\r\n type:'input'\r\n },\r\n]"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "attrId": "variable_s8TWaBnH7S",
|
|
|
+ "attrType": "js",
|
|
|
+ "attrValue": "",
|
|
|
+ "attrJsCode": "(\r\n function () {\r\n const imgNode = _F('fNode_2Q4TGsSPMx').call;\r\n\r\n return [\r\n {\r\n title: '序号',\r\n dataIndex: '_index',\r\n },\r\n {\r\n title: '批次分类',\r\n dataIndex: '批次分类',\r\n },\r\n {\r\n title: '分类名称',\r\n dataIndex: '分类名称',\r\n },\r\n {\r\n title: '最大领取次数',\r\n dataIndex: '最大领取次数',\r\n },\r\n {\r\n title: '图片地址',\r\n dataIndex: '图片地址',\r\n span: 2,\r\n render: (text, record) => {\r\n try { \r\n return JSON.parse(text)?.map(item => (imgNode(({ 图片地址: item}))));\r\n } catch (e) {\r\n return '';\r\n }\r\n\r\n }\r\n },\r\n {\r\n title: '创建时间',\r\n dataIndex: '_create',\r\n render: (text) => {\r\n const dayjs = _F('date_func').callMethod('dayjs');\r\n const now = dayjs(text * 1000);\r\n return now.format('YYYY-MM-DD');\r\n }\r\n },\r\n {\r\n title: '更新时间',\r\n dataIndex: '_update',\r\n render: (text) => {\r\n const dayjs = _F('date_func').callMethod('dayjs');\r\n const now = dayjs(text * 1000);\r\n return now.format('YYYY-MM-DD');\r\n }\r\n },\r\n ]\r\n }()\r\n)"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "attrId": "variable_YNDnsMCrnc",
|
|
|
+ "attrType": "js",
|
|
|
+ "attrValue": "",
|
|
|
+ "attrJsCode": "({\r\n 搜索:'/v1/admin/stock_cate/search',\r\n 新增:'/v1/admin/stock_cate/add',\r\n 编辑:'/v1/admin/stock_cate/edit',\r\n 删除:'/v1/admin/stock_cate/del',\r\n})"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "attrId": "variable_MJHtQRsnsR",
|
|
|
+ "attrType": "js",
|
|
|
+ "attrValue": "",
|
|
|
+ "attrJsCode": "false"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "attrId": "variable_GPmKRdbzpm",
|
|
|
+ "attrType": "js",
|
|
|
+ "attrValue": "",
|
|
|
+ "attrJsCode": "false"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "attrId": "variable_E44FQ32E6A",
|
|
|
+ "attrType": "js",
|
|
|
+ "attrValue": "",
|
|
|
+ "attrJsCode": "true"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "attrId": "variable_GF4MPsc3k6",
|
|
|
+ "attrType": "js",
|
|
|
+ "attrValue": "",
|
|
|
+ "attrJsCode": "'radio'"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "devId": "fComponent_Ye4eY73j27",
|
|
|
+ "moduleId": "module_KXT548Mji5"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "pathNav": "/admin/stock/manage"
|
|
|
+ }
|
|
|
+}
|