Commit fc8e3e98 authored by GuanHua's avatar GuanHua

feat:更新god依赖版本

parent 4a3d352b
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
"@umijs/preset-react": "1.x", "@umijs/preset-react": "1.x",
"@umijs/test": "^3.2.0", "@umijs/test": "^3.2.0",
"bizcharts": "^4.0.7", "bizcharts": "^4.0.7",
"god": "0.1.7", "god": "^0.1.13",
"god-tool": "2.4.0", "god-tool": "2.4.0",
"lint-staged": "^10.0.7", "lint-staged": "^10.0.7",
"mobx": "^5.15.4", "mobx": "^5.15.4",
......
...@@ -80,6 +80,7 @@ h6 { ...@@ -80,6 +80,7 @@ h6 {
// 公共着色 主体颜色 // 公共着色 主体颜色
.commonPickColor { .commonPickColor {
color: @main-color; color: @main-color;
cursor: pointer;
} }
// 公共状态 圆点 // 公共状态 圆点
......
...@@ -19,7 +19,7 @@ const Attribute: React.FC<{}> = () => { ...@@ -19,7 +19,7 @@ const Attribute: React.FC<{}> = () => {
const fetchData = (params?: any) => { const fetchData = (params?: any) => {
console.log(params, '搜索参数') console.log(params, '搜索参数')
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
PublicApi.getProductCustomerGetCustomerAttributeList({ current: params.page, name: params.name || '', pageSize: params.rows }).then(res => { PublicApi.getProductCustomerGetCustomerAttributeList({ ...params, name: params.name || '' }).then(res => {
resolve(res.data) resolve(res.data)
}) })
}) })
......
...@@ -128,7 +128,7 @@ const Goods: React.FC<{}> = () => { ...@@ -128,7 +128,7 @@ const Goods: React.FC<{}> = () => {
const fetchData = (params: any) => { const fetchData = (params: any) => {
console.log(params) console.log(params)
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj = {...params, pageSize: params.rows, current: params.page} let obj = {...params}
PublicApi.getProductGoodsGetGoodsList(obj).then(res=>{ PublicApi.getProductGoodsGetGoodsList(obj).then(res=>{
resolve(res.data) resolve(res.data)
}) })
......
...@@ -9,6 +9,7 @@ import { ...@@ -9,6 +9,7 @@ import {
} from '@ant-design/icons' } from '@ant-design/icons'
import { StandardTable } from 'god' import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface' import { ColumnType } from 'antd/lib/table/interface'
import { PublicApi } from '@/services/api'
import { IFormFilter, IButtonFilter } from 'god/dist/src/standard-table/TableController' import { IFormFilter, IButtonFilter } from 'god/dist/src/standard-table/TableController'
import styles from "./index.less" import styles from "./index.less"
...@@ -95,17 +96,22 @@ const data = [ ...@@ -95,17 +96,22 @@ const data = [
] ]
// 模拟请求 // 模拟请求
const fetchData = (params:any) => { // const fetchData = (params:any) => {
return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
const queryResult = data.find(v => v.key === params.keywords) // const queryResult = data.find(v => v.key === params.keywords)
setTimeout(() => { // setTimeout(() => {
resolve({ // resolve({
code: 200, // code: 200,
message: '', // message: '',
data: queryResult ? [queryResult] : data // data: queryResult ? [queryResult] : data
}) // })
}, 1000) // }, 1000)
}) // })
// }
const fetchData = async (params:any) => {
const res = await PublicApi.getProductCommodityGetCommodityDetailList(params)
return res.data ? res.data : []
} }
const FastModifyPrice: React.FC<{}> = () => { const FastModifyPrice: React.FC<{}> = () => {
...@@ -117,52 +123,44 @@ const FastModifyPrice: React.FC<{}> = () => { ...@@ -117,52 +123,44 @@ const FastModifyPrice: React.FC<{}> = () => {
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
title: 'ID', title: 'ID',
dataIndex: 'key', dataIndex: 'id',
align: 'center', key: 'id',
key: 'key',
}, },
{ {
title: '货品名称', title: '商品品名称',
dataIndex: 'goodsName', dataIndex: 'name',
align: 'center', key: 'name',
key: 'goodsName',
className: 'commonPickColor', className: 'commonPickColor',
render: (text:any, record:any) => <span className="commonPickColor" onClick={()=>handleSee(record)}>{text}&nbsp;<EyeOutlined /></span> render: (text:any, record:any) => <span className="commonPickColor" onClick={()=>handleSee(record)}>{text}&nbsp;<EyeOutlined /></span>
}, },
{ {
title: '品类', title: '品类',
dataIndex: 'type', dataIndex: 'type',
align: 'center',
key: 'type', key: 'type',
}, },
{ {
title: '品牌', title: '品牌',
dataIndex: 'brand', dataIndex: 'brand',
align: 'center',
key: 'brand', key: 'brand',
}, },
{ {
title: '单位', title: '单位',
dataIndex: 'unit', dataIndex: 'unit',
align: 'center',
key: 'unit', key: 'unit',
}, },
{ {
title: '价格', title: '价格',
dataIndex: 'price', dataIndex: 'price',
align: 'center',
key: 'price', key: 'price',
}, },
{ {
title: '申请审核时间', title: '申请审核时间',
dataIndex: 'checkTime', dataIndex: 'checkTime',
align: 'center',
key: 'checkTime', key: 'checkTime',
}, },
{ {
title: '状态', title: '状态',
dataIndex: 'status', dataIndex: 'status',
align: 'center',
key: 'status', key: 'status',
render: (text:any, record:any) => { render: (text:any, record:any) => {
let component: ReactNode = null let component: ReactNode = null
...@@ -184,7 +182,7 @@ const FastModifyPrice: React.FC<{}> = () => { ...@@ -184,7 +182,7 @@ const FastModifyPrice: React.FC<{}> = () => {
{ {
title: '操作', title: '操作',
dataIndex: 'option', dataIndex: 'option',
align: 'center', width: 128,
render: (text:any, record:any) => { render: (text:any, record:any) => {
return ( return (
<> <>
...@@ -275,6 +273,7 @@ const FastModifyPrice: React.FC<{}> = () => { ...@@ -275,6 +273,7 @@ const FastModifyPrice: React.FC<{}> = () => {
<PageHeaderWrapper> <PageHeaderWrapper>
<Card> <Card>
<StandardTable <StandardTable
tableProps={{ rowKey: 'code'}}
columns={columns} columns={columns}
currentRef={ref} currentRef={ref}
fetchTableData={(params:any) => fetchData(params)} fetchTableData={(params:any) => fetchData(params)}
......
...@@ -237,7 +237,7 @@ const Products: React.FC<{}> = () => { ...@@ -237,7 +237,7 @@ const Products: React.FC<{}> = () => {
console.log(params, filterParams) console.log(params, filterParams)
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
//@ts-ignore //@ts-ignore
PublicApi.getProductCommodityGetCommodityList({...filterParams, pageSize: params.rows, current: params.page}).then(res => { PublicApi.getProductCommodityGetCommodityList({ ...filterParams, ...params}).then(res => {
console.log(res, 'res') console.log(res, 'res')
const { data } = res const { data } = res
resolve(data) resolve(data)
......
...@@ -220,7 +220,7 @@ const Repositories: React.FC<{}> = () => { ...@@ -220,7 +220,7 @@ const Repositories: React.FC<{}> = () => {
} }
const handleAdjust = (record: any) => { const handleAdjust = (record: any) => {
history.push(`/repositories/adjustRepository?id=${record.key}`) history.push(`/memberCenter/commodityAbility/repositories/adjustRepository?id=${record.key}`)
} }
return ( return (
......
...@@ -19,7 +19,7 @@ const Trademark: React.FC<{}> = () => { ...@@ -19,7 +19,7 @@ const Trademark: React.FC<{}> = () => {
const fetchData = (params: any) => { const fetchData = (params: any) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
PublicApi.getProductBrandGetBrandList({ current: params.page, pageSize: params.rows, name: params.name || '', status: params.status || 0 }).then(res => { PublicApi.getProductBrandGetBrandList({ ...params, name: params.name || '', status: params.status || 0 }).then(res => {
const { data } = res const { data } = res
resolve(data) resolve(data)
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment