Commit fc8e3e98 authored by GuanHua's avatar GuanHua

feat:更新god依赖版本

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