Commit 77a07cfd authored by tjy's avatar tjy

merge

parents 9b4dba81 3c025c35
......@@ -41,6 +41,7 @@
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-image-crop": "^8.6.4",
"typescript": "^3.9.7",
"umi": "^3.2.0",
"yorkie": "^2.0.0"
},
......@@ -50,7 +51,7 @@
"chalk": "^4.1.0",
"clone": "^2.1.2",
"fs-extra": "^9.0.1",
"god-yapi2ts": "1.6.0",
"god-yapi2ts": "^1.6.0",
"gulp": "^4.0.2",
"json2ts": "^0.0.7",
"ora": "^4.0.4"
......
......@@ -12,7 +12,7 @@ const ReutrnEle:React.FC<IProps> = (props) => {
const { description, logoSrc } = props
return <>
<span style={{fontSize:15,color:'#6B778CFF'}}><ArrowLeftOutlined /> {logoSrc?<img src={logoSrc} style={{width:48,height:48,margin:'0 14px'}}/>:description}</span>
<span style={{fontSize:15,color:'#6B778CFF'}}><ArrowLeftOutlined /> {logoSrc?<img src={logoSrc} style={{width:48,height:48,margin:'0 0 0 14px'}}/>:description}</span>
</>
}
......
import React, { useState } from 'react';
import { IApiRequest } from '@/utils/request';
export interface IHttpRequestReturn<T> {
data: T | null,
loading: boolean,
err: any,
run(params?: any)
}
/**
* 简易版本的useRequest hooks, 用于处理带有loading的业务场景
* @auth xjm
*/
export function useHttpRequest<T>(api: (params?, config?) => Promise<T>, config?: IApiRequest): IHttpRequestReturn<T> {
const [loading, setLoading] = useState(false)
const [data, setData] = useState<T | null>(null)
const [err, setErr] = useState()
const run = (params) => {
setLoading(true)
api(params).then((res: any) => {
setData(res.data)
}).catch(err => {
setErr(err)
}).finally(() => {
setTimeout(() => {
setLoading(false)
}, 200)
})
}
return {
data,
loading,
err,
run
}
}
\ No newline at end of file
......@@ -6,7 +6,7 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god'
import {ColumnType} from 'antd/lib/table/interface';
import ReutrnEle from '@/components/ReturnEle';
import { updateAttribute, getPlatformAttribute, getAttributeDetail } from '@/services/classAndProperty/attribute'
import { PublicApi } from '@/services/api';
const { Option } = Select;
......@@ -44,7 +44,7 @@ const AddAtttribute: React.FC<{}> = () => {
}
console.log('进入编辑页')
setQueryId(location.query.id)
getAttributeDetail({id: location.query.id}).then(res=>{
PublicApi.getProductCustomerGetCustomerAttribute({id: location.query.id}).then(res=>{
const { data } = res
setFormValue(data)
menuForm.setFieldsValue(data)
......@@ -59,14 +59,7 @@ const AddAtttribute: React.FC<{}> = () => {
delete values.attributeShow
if(JSON.stringify(values.attribute)==='{}')
delete values.attribute
updateAttribute(values).then(res=>{
if(res.code===1000){
message.success(res.message)
// if(!queryId)
// menuForm.resetFields()
}
console.log('res', res)
})
PublicApi.postProductCustomerSaveOrUpdateCustomerAttribute(values)
}).catch(error => {
console.error(error)
})
......@@ -84,7 +77,8 @@ const AddAtttribute: React.FC<{}> = () => {
const fetchData = (params:any) => {
console.log(params,'params')
return new Promise((resolve, reject) => {
getPlatformAttribute({current: params.page, pageSize: params.rows, name: params.name||'', groupName: params.groupName||'', isEnable: true}).then(res => {
//@ts-ignore
PublicApi.getProductPlatformGetAttributeList({current: params.page, pageSize: params.rows, name: params.name||'', groupName: params.groupName||'', isEnable: true}).then(res=>{
resolve(res.data)
})
})
......
......@@ -10,7 +10,7 @@ import {
} from '@ant-design/icons'
import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface'
import { getAttributeLists, updateAttributeStatus, deleteAttribute } from '@/services/classAndProperty/attribute'
import { PublicApi } from '@/services/api'
// import styles from './index.less'
const Attribute: React.FC<{}> = () => {
......@@ -19,7 +19,7 @@ const Attribute: React.FC<{}> = () => {
const fetchData = (params?: any) => {
console.log(params, '搜索参数')
return new Promise((resolve, reject) => {
getAttributeLists({ current: params.page, name: params.name || '', pageSize: params.rows }).then(res => {
PublicApi.getProductCustomerGetCustomerAttributeList({ current: params.page, name: params.name || '', pageSize: params.rows }).then(res => {
resolve(res.data)
})
})
......@@ -101,22 +101,16 @@ const Attribute: React.FC<{}> = () => {
const confirm = (record: any) => {
console.log(record, 'record')
updateAttributeStatus({ id: record.id, status: !record.isEnable }).then(res => {
if (res.code === 1000) {
message.success(res.message)
PublicApi.postProductCustomerUpdateCustomerAttributeStatus({id: record.id, isEnable: !record.isEnable}).then(res=>{
//@ts-ignore
ref.current.reload()
}
})
}
const clickDelete = (record: any) => {
deleteAttribute({ id: record.id }).then(res => {
if (res.code === 1000) {
message.success(res.message)
PublicApi.postProductCustomerDeleteCustomerAttribute({ id: record.id }).then(res=>{
//@ts-ignore
ref.current.reload()
}
})
}
......@@ -140,18 +134,30 @@ const Attribute: React.FC<{}> = () => {
}}
formilyProps={{
layouts: {
order: 1
order: 1,
span: 4
},
ctx: {
inline: false,
schema: {
type: 'object',
properties: {
name: {
type: 'string',
'x-component-props': {
placeHolder: '属性名称'
megaLayout0: {
type: 'object',
'x-component': 'mega-layout',
"x-component-props": {
grid: true,
columns: 1,
},
'x-component': 'Search'
properties: {
name: {
type: 'string',
'x-component-props': {
placeholder: '属性名称',
},
'x-component': 'Search'
}
}
}
}
}
......
import React, { useState, useRef, ReactNode, useEffect } from 'react'
import { Row, Col, Tooltip, Popconfirm, Button, Modal, message } from 'antd';
import {
DeleteOutlined,
PauseCircleOutlined,
PlusCircleOutlined,
PlayCircleOutlined,
PlusOutlined,
EyeOutlined
......@@ -12,12 +10,8 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import { MenuTree, StandardTable } from 'god';
import { ColumnType, TableRowSelection } from 'antd/lib/table/interface';
import styles from './index.less'
import { getCustomerCategoryTree } from '@/services/classAndProperty/class'
import { getCategoyAttributeLists, updateCategoyAttribute, deleteCategoryAttribute } from '@/services/classAndProperty/categoryAttributes';
import { getAttributeLists, updateAttributeStatus } from '@/services/classAndProperty/attribute';
import { CategoyAttributeApi } from '@/services/classAndProperty/categoryAttributes/API';
import styles from './index.less';
import { PublicApi } from '@/services/api';
function formatter(params: any) { // 字段title转换为name
params.name = params.title
......@@ -40,7 +34,7 @@ const CategoryAttributes: React.FC<{}> = () => {
const [treeData, setTreeData] = useState<CategoryTreeApi.CategoryTreeModel[]>([]) // 初始品类树
useEffect(() => {
getCustomerCategoryTree().then(res => {
PublicApi.getProductCustomerGetCustomerCategoryTree().then(res=>{
const { data } = res
let newArr: CategoryTreeApi.CategoryTreeModel[] = []
//@ts-ignore
......@@ -64,7 +58,7 @@ const CategoryAttributes: React.FC<{}> = () => {
const fetchLinkAttributeData = (params: any) => {
if (requestLinkFlag) {
return new Promise((resolve, reject) => {
getCategoyAttributeLists({ current: params.page, pageSize: params.rows, categoryId: selectRow.id, name: params.name || '' }).then(res => {
PublicApi.getProductCustomerGetCustomerCategoryAttributeList({current: params.page, pageSize: params.rows, categoryId: selectRow.id, name: params.name || ''}).then(res=>{
resolve(res.data)
setLinkTableRowData(res.data.data)
})
......@@ -77,7 +71,7 @@ const CategoryAttributes: React.FC<{}> = () => {
// 获取所有属性列表
const fetchAttributeData = (params: any) => {
return new Promise((resolve, reject) => {
getAttributeLists({ current: params.page, name: params.name || '', pageSize: params.rows }).then(res => {
PublicApi.getProductCustomerGetCustomerAttributeList({ current: params.page, name: params.name || '', pageSize: params.rows }).then(res=>{
resolve(res.data)
})
})
......@@ -91,12 +85,9 @@ const CategoryAttributes: React.FC<{}> = () => {
const handleSelectOk = () => {
setRoleVisible(false)
if (selectTableRow.length) {
updateCategoyAttribute({ customerCategoryId: selectRow.id, customerAttributeIds: selectedTableRowKeys }).then(res => {
if (res.code === 1000) {
message.success(res.message)
PublicApi.postProductCustomerSaveCustomerCategoryAttribute({ customerCategoryId: selectRow.id, customerAttributeIds: selectedTableRowKeys }).then(res=>{
//@ts-ignore
ref.current.reload()
}
})
}
console.log(selectRow)
......@@ -246,23 +237,17 @@ const CategoryAttributes: React.FC<{}> = () => {
};
const clickRelief = (paramsId: number) => {
deleteCategoryAttribute({ customerCategoryId: selectRow.id, customerAttributeIds: [paramsId] }).then(res => {
if (res.code === 1000) {
message.success(res.message)
PublicApi.postProductCustomerDeleteCustomerCategoryAttribute({ customerCategoryId: selectRow.id, customerAttributeIds: [paramsId] }).then(res=>{
//@ts-ignore
ref.current.reload()
}
})
}
const confirm = (record: any) => {
console.log(record, 'record')
updateAttributeStatus({ id: record.id, status: !record.isEnable }).then(res => {
if (res.code === 1000) {
message.success(res.message)
PublicApi.postProductCustomerUpdateCustomerAttributeStatus({ id: record.id, isEnable: !record.isEnable }).then(res=>{
//@ts-ignore
ref.current.reload()
}
})
}
......
......@@ -4,7 +4,7 @@ import { history } from 'umi';
import { InfoCircleOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ReutrnEle from '@/components/ReturnEle';
import { getAttributeDetail } from '@/services/classAndProperty/attribute'
import { PublicApi } from '@/services/api';
const { Option } = Select;
......@@ -26,7 +26,7 @@ const viewAtttributes: React.FC<{}> = () => {
const { location } = history
if(location.query.id) {
setQueryId(location.query.id)
getAttributeDetail({id: location.query.id}).then(res=>{
PublicApi.getProductCustomerGetCustomerAttribute({id: location.query.id}).then(res=>{
const { data } = res
setFormValue(data)
menuForm.setFieldsValue(data)
......
import React, { useState, useEffect } from 'react'
import { Row, Col, Tooltip, Form, Input, Select, Popconfirm, Button, Card, Upload, message, Modal } from 'antd';
import { DeleteOutlined, FormOutlined, PlusCircleOutlined, LoadingOutlined, PlusOutlined, LinkOutlined, NumberOutlined } from '@ant-design/icons';
import {
DeleteOutlined,
PlusCircleOutlined,
LoadingOutlined,
PlusOutlined,
LinkOutlined
} from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import {MenuTree} from 'god';
import { UploadFile, UploadChangeParam } from 'antd/lib/upload/interface';
import { getCustomerCategoryTree, getPlatformCategoryTree, getCategoryDetail, deleteCategory, updateCategory } from '@/services/classAndProperty/class'
import { PublicApi } from '@/services/api';
const { Option } = Select;
......@@ -139,7 +145,7 @@ const ClassProperty: React.FC<{}> = () => {
const initGetCategoryTree = () => {
// 商品品类
getCustomerCategoryTree().then( res => {
PublicApi.getProductCustomerGetCustomerCategoryTree().then(res=>{
const { data } = res
let newArr:CategoryTreeApi.CategoryTreeModel[] = []
//@ts-ignore
......@@ -149,8 +155,9 @@ const ClassProperty: React.FC<{}> = () => {
})
setTreeData(newArr)
})
// 平台品类
getPlatformCategoryTree().then(res => {
PublicApi.getProductPlatformGetCategoryTree().then(res=>{
const { data } = res
let tempArr:CategoryTreeApi.CategoryTreeModel[] = []
//@ts-ignore
......@@ -163,7 +170,7 @@ const ClassProperty: React.FC<{}> = () => {
}
const getClassTreeDetail = (id: number) => {
getCategoryDetail({id: id}).then(res=>{
PublicApi.getProductCustomerGetCustomerCategory({id: id.toString()}).then(res=>{
const { data } = res
treeForm.setFieldsValue(data)
treeForm.setFieldsValue({categoryName: data.categoryKey})
......@@ -183,34 +190,19 @@ const ClassProperty: React.FC<{}> = () => {
}else if(addType==='f'){
obj = addFirstClass(treeData, obj)
}
//@ts-ignore
updateCategory(obj).then(res=>{
console.log(res)
if(res.code===1000){
message.success(res.message)
initGetCategoryTree()
}
else
message.error(res.message)
//@ts-ignore
PublicApi.postProductCustomerSaveOrUpdateCustomerCategory(obj).then(res=>{
initGetCategoryTree()
})
console.log(obj, 'values')
}).catch(error => {
console.error(error)
})
}
const handleDeleteMenu = () => {
console.log('delete', selectRow)
if(selectRow && selectRow.id){
deleteCategory({id: selectRow.id}).then(res=>{
console.log(res)
if(res.code===1000){
message.success(res.message)
setSelectKeys(undefined)
initGetCategoryTree() // reload
}
else
message.error(res.message)
PublicApi.postProductCustomerDeleteCustomerCategory({id: selectRow.id}).then(res=>{
setSelectKeys(undefined)
initGetCategoryTree() // reload
})
}else{
message.info('请选择对应项!')
......@@ -375,6 +367,7 @@ const ClassProperty: React.FC<{}> = () => {
<Option value={1}>实物商品</Option>
<Option value={2}>虚拟商品</Option>
<Option value={3}>服务商品</Option>
<Option value={4}>积分兑换商品</Option>
</Select>
</Form.Item>
</Col>
......
......@@ -5,8 +5,8 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import {MenuTree} from 'god';
import { history } from 'umi';
import ReutrnEle from '@/components/ReturnEle';
import { getPlatformPropertyValueTree, updatePropertyValue, getPropertyValueDetail } from '@/services/classAndProperty/propertyValue'
import { PropertyValueApi } from '@/services/classAndProperty/propertyValue/API'
import { PublicApi } from '@/services/api';
const layout = {
labelCol: {
......@@ -53,7 +53,7 @@ const AddPropertyValue: React.FC<{}> = () => {
if(attrValueId){ // 编辑
attrValueForm.setFieldsValue({id: attrValueId})
setAttributeValueId(attrValueId)
getPropertyValueDetail({id: attrValueId}).then(res=>{
PublicApi.getProductCustomerGetCustomerAttributeValue({id: attrValueId}).then(res=>{
console.log(res, 'detail')
if(res.code===1000){
setFormValue(res.data)
......@@ -64,7 +64,7 @@ const AddPropertyValue: React.FC<{}> = () => {
if(isSee){
setIsSee(true)
}
getPlatformPropertyValueTree().then(res=>{ // 初始平台属性值树数据
PublicApi.getProductPlatformGetAttributeValueTree().then(res=>{ // 初始平台属性值树数据
const { data } = res
let tempArr:PropertyValueApi.PlatformPropertyValueTreeModel[] = []
//@ts-ignore
......@@ -84,10 +84,8 @@ const AddPropertyValue: React.FC<{}> = () => {
if(JSON.stringify(pararms.attributeValue)==='{}')
delete pararms.attributeValue
//@ts-ignore
updatePropertyValue(pararms).then(res=>{
if(res.code === 1000)
message.success(res.message)
})
PublicApi.postProductCustomerSaveOrUpdateCustomerAttributeValue(pararms)
}).catch(error => {
console.error(error)
})
......
......@@ -13,9 +13,7 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import { MenuTree, StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
import { getAttributeTree } from '@/services/classAndProperty/attribute'
import { getPropertyValueLists, updatePropertyValueStatus, deletePropertyValue } from '@/services/classAndProperty/propertyValue'
// import { PropertyValueApi } from '@/services/classAndProperty/propertyValue/API';
import { PublicApi } from '@/services/api';
function formatter(params: any) { // 字段title转换为name
params.name = params.title
......@@ -34,7 +32,7 @@ const PropertyValue: React.FC<{}> = () => {
// 加载属性树 转换字段
useEffect(() => {
getAttributeTree().then(res => {
PublicApi.getProductCustomerGetCustomerAttributeTree().then(res=>{
const { data } = res
let newArr: CategoryTreeApi.CategoryTreeModel[] = []
//@ts-ignore
......@@ -59,7 +57,7 @@ const PropertyValue: React.FC<{}> = () => {
const fetchData = (params: any) => {
if (requestFlag) {
return new Promise((resolve, reject) => {
getPropertyValueLists({ current: params.page, pageSize: params.rows, name: params.name || '', customerAttributeId: selectRow.id }).then(res => {
PublicApi.getProductCustomerGetCustomerAttributeValueList({ current: params.page, pageSize: params.rows, name: params.name || '', customerAttributeId: selectRow.id }).then(res=>{
const { data } = res
resolve(data)
})
......@@ -145,22 +143,16 @@ const PropertyValue: React.FC<{}> = () => {
];
const confirm = (record: any) => {
updatePropertyValueStatus({ id: record.id, status: !record.isEnable }).then(res => {
if (res.code === 1000) {
message.success(res.message)
PublicApi.postProductCustomerUpdateCustomerAttributeValueStatus({id: record.id, isEnable: !record.isEnable}).then(res=>{
//@ts-ignore
ref.current.reload()
}
})
}
const clickDelete = (record: any) => {
deletePropertyValue({ id: record.id }).then(res => {
if (res.code === 1000) {
message.success(res.message)
PublicApi.postProductCustomerDeleteCustomerAttributeValue({ id: record.id }).then(res=>{
//@ts-ignore
ref.current.reload()
}
})
}
......@@ -168,11 +160,6 @@ const PropertyValue: React.FC<{}> = () => {
console.log('cancel')
}
const handleModify = (record: object) => {
// 通过传入的params字符串判断是修改那种类型的数据
console.log('执行状态修改', record)
}
return <PageHeaderWrapper>
<Row gutter={[24, 36]}>
<Col span={8}>
......
import React, { useState } from 'react';
import { Form, Input, Button, Select, Card, Tooltip } from 'antd'
import React, { useState, useEffect } from 'react';
import { Form, Input, Button, Select, Card, Tooltip, message, InputNumber, Popconfirm } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { history } from 'umi';
import {
......@@ -7,6 +7,7 @@ import {
} from '@ant-design/icons'
import ReutrnEle from '@/components/ReturnEle';
import styles from './index.less'
import { PublicApi } from '@/services/api';
const { Option } = Select;
const layout = {
......@@ -26,15 +27,100 @@ const tailLayout = {
const AddGoods = () => {
const [form] = Form.useForm();
const [brandData, setBrandData] = useState<any>([])
const [brandValue, setBrandValue] = useState(undefined)
const [classData, setClassData] = useState<any>([])
const [classValue, setClassValue] = useState(undefined)
const [unitData, setUnitData] = useState<any>([])
const [unitValue, setUnitValue] = useState(undefined)
const [queryId, setQueryId] = useState<number>(null)
const [isSee, setIsSee] = useState(false)
useEffect(() => {
const { id, isSee } = history.location.query
if(id){
setQueryId(id)
PublicApi.getProductSelectGetSelectCustomerCategory({name: ''}).then(res=>{
if(res.code === 1000)
setClassData(res.data)
})
PublicApi.getProductSelectGetSelectCnUnit({name: ''}).then(res=>{
if(res.code === 1000)
setUnitData(res.data)
})
PublicApi.getProductSelectGetSelectBrand({name: ''}).then(res=>{
if(res.code === 1000)
setBrandData(res.data)
})
PublicApi.getProductGoodsGetGoods({id: id}).then(res=>{
if(res.code===1000)
form.setFieldsValue(res.data)
})
if(isSee)
setIsSee(isSee)
}
}, [])
const handleBrandSearch = (value:any) => { // end value
console.log(value, 'handleBrandSearch')
if (value) {
PublicApi.getProductSelectGetSelectBrand({name: value}).then(res=>{
if(res.code === 1000)
setBrandData(res.data)
})
} else {
setBrandData([])
}
}
const handleBrandChange = (value:any) => {
setBrandValue(value)
console.log(value, 'handleBrandChange')
// let obj = {...filterParams, brandId: value}
// setFilterParams(obj)
}
const handleClassSearch = (value:any) => {
console.log(value, 'handleClassSearch')
if (value) {
PublicApi.getProductSelectGetSelectCustomerCategory({name: value}).then(res=>{
if(res.code === 1000)
setClassData(res.data)
})
} else {
setClassData([])
}
}
const handleClassChange = (value:any) => {
setClassValue(value)
// let obj = {...filterParams, customerCategoryId: value}
// setFilterParams(obj)
console.log(value, 'handleClassChange')
}
const handleUnitSearch = (value:any) => {
console.log(value, 'handleClassSearch')
if (value) {
PublicApi.getProductSelectGetSelectCnUnit({name: value}).then(res=>{
if(res.code === 1000)
setUnitData(res.data)
})
} else {
setUnitData([])
}
}
const handleUnitChange = (value:any) => {
setUnitValue(value)
// let obj = {...filterParams, customerCategoryId: value}
// setFilterParams(obj)
console.log(value, 'handleClassChange')
}
const onFinish = (values:any) => {
console.log(values);
PublicApi.postProductGoodsSaveOrUpdateGoods({...values})
};
return (<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回"/>}
title="新建货品"
title={queryId?`${isSee?'查看货品':'编辑货品'}`:'新建货品'}
>
<Card>
<Form
......@@ -51,9 +137,13 @@ const AddGoods = () => {
required: true,
message: '请填入货号'
},
{
pattern: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*-_])[\da-zA-Z~!@#$%^&*-_]{1,20}$/,
message: '最长20个字符(由字母、数组、特殊字符组成)'
}
]}
>
<Input placeholder="最长20个字符(由字母、数组、特殊字符组成)" />
<Input placeholder="最长20个字符(由字母、数组、特殊字符组成)" maxLength={20} disabled={isSee} />
</Form.Item>
<Form.Item
name="name"
......@@ -65,10 +155,10 @@ const AddGoods = () => {
},
]}
>
<Input placeholder="最长40个字符、20个汉字" />
<Input placeholder="最长20个字符" maxLength={20} disabled={isSee} />
</Form.Item>
<Form.Item
name="specification"
name="type"
label="规格型号"
rules={[
{
......@@ -77,10 +167,10 @@ const AddGoods = () => {
},
]}
>
<Input placeholder="最长40个字符、20个汉字" />
<Input placeholder="最长20个字符" maxLength={20} disabled={isSee} />
</Form.Item>
<Form.Item
name="class"
name={['customerCategory', 'id']}
label="品类"
rules={[
{
......@@ -89,10 +179,25 @@ const AddGoods = () => {
},
]}
>
<Input placeholder="最长24个字符、12个汉字" />
{/* <Input placeholder="最长24个字符、12个汉字" /> */}
<Select
showSearch
placeholder="请填入品类"
value={classValue}
defaultActiveFirstOption={false}
showArrow={false}
filterOption={false}
onSearch={handleClassSearch}
onChange={handleClassChange}
notFoundContent={null}
style={{width:'100%'}}
disabled={isSee}
>
{classData.map(d => <Option value={d.id} key={d.id}>{d.name}</Option>)}
</Select>
</Form.Item>
<Form.Item
name="brand"
name={['brand', 'id']}
label="品牌"
rules={[
{
......@@ -101,34 +206,56 @@ const AddGoods = () => {
},
]}
>
<Input placeholder="最长40个字符、20个汉字" />
{/* <Input placeholder="最长40个字符、20个汉字" /> */}
<Select
showSearch
placeholder="请填入品牌"
value={brandValue}
defaultActiveFirstOption={false}
showArrow={false}
filterOption={false}
onSearch={handleBrandSearch}
onChange={handleBrandChange}
notFoundContent={null}
style={{width:'100%'}}
disabled={isSee}
>
{brandData.map(d => <Option value={d.id} key={d.id}>{d.name}</Option>)}
</Select>
</Form.Item>
<Form.Item
name="unit"
name="unitId"
label="单位"
rules={[
{
required: true,
message: '请选择单位'
message: '请输入单位'
},
]}
>
<Select
placeholder="请选择单位"
allowClear
showSearch
placeholder="请输入单位"
value={unitValue}
defaultActiveFirstOption={false}
showArrow={false}
filterOption={false}
onSearch={handleUnitSearch}
onChange={handleUnitChange}
notFoundContent={null}
style={{width:'100%'}}
disabled={isSee}
>
<Option value="g"></Option>
<Option value="kg">千克</Option>
<Option value="t"></Option>
{unitData.map(d => <Option value={d.id} key={d.id}>{d.name}</Option>)}
</Select>
</Form.Item>
<Form.Item
name="originPrice"
name="costPrice"
// label="成本价"
label={
<span>
成本价&nbsp;
<Tooltip title="这是一段描述?">
<Tooltip title="成本价即该商品销售时不能低于此价,如在商品发布时商品销售价低于成本价,则将触发风控预警。">
<QuestionCircleOutlined />
</Tooltip>
</span>
......@@ -136,20 +263,22 @@ const AddGoods = () => {
rules={[
{
required: true,
message: '请填入成本价'
},
message: '请填入成本价',
}
]}
>
<Input placeholder="请输入成本价" />
<InputNumber placeholder="请输入成本价" style={{width: '100%'}} min={0} disabled={isSee} />
</Form.Item>
<Form.Item {...tailLayout}>
{!isSee && <Form.Item {...tailLayout}>
<Button type="primary" htmlType="submit">
保存
</Button>
<Button className={styles.ml20}>
取消
</Button>
</Form.Item>
<Popconfirm title="确定要取消吗?" okText="是" cancelText="否" onConfirm={()=>history.goBack()}>
<Button className={styles.ml20}>
取消
</Button>
</Popconfirm>
</Form.Item>}
</Form>
</Card>
</PageHeaderWrapper>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
.proveBox{
width:175px;
height:120px;
border:1px solid rgba(235,236,240,1);
img {
height: 100%;
padding: 18px;
}
}
\ No newline at end of file
import React, { ReactNode, useRef, useEffect } from 'react'
import { history } from 'umi'
import { Button, Popconfirm, Card, message } from 'antd'
import { Button, Popconfirm, Card, message, Dropdown, Menu } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
PlusOutlined,
PlayCircleOutlined,
EyeOutlined,
PauseCircleOutlined
PauseCircleOutlined,
CaretDownOutlined
} from '@ant-design/icons'
import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface'
import { getTradeMarkLists, updateTradeMarkStatus, deleteTradeMark } from '@/services/trademark'
import moment from 'moment'
import { PublicApi } from '@/services/api'
const Trademark: React.FC<{}> = () => {
const ref = useRef({})
const fetchData = (params: any) => {
return new Promise((resolve, reject) => {
getTradeMarkLists({ current: params.page, pageSize: params.rows, name: params.name || '', status: params.status || 0 }).then(res => {
PublicApi.getProductBrandGetBrandList({ current: params.page, pageSize: params.rows, name: params.name || '', status: params.status || 0 }).then(res => {
const { data } = res
resolve(data)
})
......@@ -42,7 +43,7 @@ const Trademark: React.FC<{}> = () => {
title: '申请时间',
dataIndex: 'applyTime',
key: 'applyTime',
render: (text: any, record: any) => moment(text).format('YYYY-MM-DD HH:mm:ss')
render: (text: any, record: any) => text && moment(text).format('YYYY-MM-DD HH:mm:ss')
},
{
title: '状态',
......@@ -86,12 +87,9 @@ const Trademark: React.FC<{}> = () => {
{
title: '操作',
dataIndex: 'option',
align: 'center',
render: (text: any, record: any) => {
return (
<>
{record.status === 1 ? <Button type='link'>提交审核</Button> : ''}
{(record.status === 1 || record.status === 3) ? <Button type='link'>修改</Button> : ''}
<Popconfirm
title="确定要执行这个操作?"
onConfirm={() => handelDelete(record)}
......@@ -101,6 +99,22 @@ const Trademark: React.FC<{}> = () => {
>
<Button type='link'>删除</Button>
</Popconfirm>
{
(record.status !== 2) ? <Dropdown overlay={
<Menu>
<Menu.Item>
<Button type='link' onClick={()=>history.push(`/memberCenter/commodityAbility/trademark/addBrand?id=${record.id}`)}>修改</Button>
</Menu.Item>
<Menu.Item>
{record.status === 1 ? <Button type='link' onClick={()=>handleApplyCheck(record)}>提交审核</Button> : ''}
</Menu.Item>
</Menu>
}>
<a className="ant-dropdown-link" onClick={e => e.preventDefault()}>
更多 <CaretDownOutlined />
</a>
</Dropdown> : ''
}
</>
)
}
......@@ -113,12 +127,9 @@ const Trademark: React.FC<{}> = () => {
}
const confirm = (record: any) => {
updateTradeMarkStatus({ id: record.id, isEnable: !record.isEnable }).then(res => {
if (res.code === 1000) {
message.success(res.message)
PublicApi.postProductBrandUpdateBrandEnable({ id: record.id, isEnable: !record.isEnable }).then(res => {
//@ts-ignore
ref.current.reload()
}
})
}
......@@ -127,12 +138,15 @@ const Trademark: React.FC<{}> = () => {
}
const handelDelete = (record: any) => {
deleteTradeMark({ id: record.id }).then(res => {
if (res.code === 1000) {
message.success(res.message)
PublicApi.postProductBrandDeleteBrand({ id: record.id }).then(res => {
//@ts-ignore
ref.current.reload()
})
}
const handleApplyCheck = (record:any) => {
PublicApi.getProductBrandApplyCheckBrand({id: record.id}).then(res=>{
//@ts-ignore
ref.current.reload()
}
})
}
......
import React, { useState, useRef, ReactNode } from 'react'
import React, { useState, useRef, ReactNode, useEffect } from 'react'
import { history } from 'umi'
import { Button, Steps, Card, Space, Tooltip, Row, Col, Descriptions, Table } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
PlusOutlined,
QuestionCircleOutlined,
FormOutlined,
LoadingOutlined
} from '@ant-design/icons'
import { ColumnType } from 'antd/lib/table/interface'
import ReutrnEle from '@/components/ReturnEle'
import moment from 'moment'
import styles from './index.less'
import { PublicApi } from '@/services/api'
const { Step } = Steps;
const viewBrand: React.FC<{}> = () => {
const dataSource = [
{
key: '1',
name: '供应商',
status: 0,
action: '提交审核',
time: '2015-44-15 12:34:32',
advice: '同意',
},
{
key: '2',
name: '平台',
status: 2,
action: '品牌审核',
time: '2334-23-32 45:23:21',
advice: '重新整改',
},
];
const [queryId, setQueryId] = useState<number>(null)
const [brandInfo, setBrandInfo] = useState<any>({})
const [fixStep, setFixStep] = useState(0)
const [recordData, setRecordData] = useState<any[]>([])
useEffect(() => {
const { id } = history.location.query
if(id){
setQueryId(id)
PublicApi.getProductBrandGetBrand({id: id}).then(res => {
console.log(res.data, 'data')
if(res.code===1000){
setBrandInfo(res.data)
if(res.data.status===1)
setFixStep(0)
else if(res.data.status===2)
setFixStep(1)
}
})
PublicApi.getProductBrandGetBrandCheckRecord({brandId: id}).then(res=> {
if(res.code===1000)
setRecordData(res.data)
})
}
}, [])
const columns: ColumnType<any>[] = [
{
title: '序号',
dataIndex: 'key',
key: 'key',
align: 'center',
dataIndex: 'id',
key: 'id',
render: (text, record, index)=> index+1
},
{
title: '角色',
dataIndex: 'name',
key: 'name',
align: 'center',
dataIndex: 'merchantRoleName',
key: 'merchantRoleName',
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
align: 'center',
render: (text:any, record:any) => {
let component: ReactNode = null
if(record.status === 0)
component = (<><span className="commonStatusValid"></span>通过</>)
else if(record.status === 1)
component = (<><span className="commonStatusInvalid"></span>待提交</>)
if(record.status === 1)
component = (<><span className="commonStatusInvalid"></span>待提交审核</>)
else if(record.status === 2)
component = (<><span className="commonStatusModify"></span>待审核</>)
else if(record.status === 3)
component = (<><span className="commonStatusStop"></span>审核不通过</>)
else if(record.status === 4)
component = (<><span className="commonStatusValid"></span>审核通过</>)
return component
}
},
{
title: '操作',
dataIndex: 'action',
key: 'action',
align: 'center',
dataIndex: 'operation',
key: 'operation',
render: (text:any, record:any) => {
let component: ReactNode = null
if(record.operation === 1)
component = (<>新增</>)
else if(record.operation === 2)
component = (<>修改</>)
else if(record.operation === 3)
component = (<>审核</>)
return component
}
},
{
title: '操作时间',
dataIndex: 'time',
key: 'time',
align: 'center',
dataIndex: 'createTime',
key: 'createTime',
render: (text:any, record:any) => moment(text).format('YYYY-MM-DD HH:mm:ss')
},
{
title: '意见',
dataIndex: 'advice',
key: 'advice',
align: 'center',
dataIndex: 'checkRemark',
key: 'checkRemark',
},
];
const tips = <>证明材料<Tooltip title="这是一段描述的文字"><span>&nbsp;<QuestionCircleOutlined /></span></Tooltip></>
const fixStatus = (state: number) => {
if(state === 1)
return <><span className="commonStatusInvalid"></span>待提交审核</>
else if(state === 2)
return <><span className="commonStatusModify"></span>待审核</>
else if(state === 3)
return <><span className="commonStatusStop"></span>审核不通过</>
else if(state === 4)
return <><span className="commonStatusValid"></span>审核通过</>
else if(state === 5)
return <><span className="commonStatusValid"></span>已上架</>
else if(state === 6)
return <><span className="commonStatusStop"></span>已下架</>
}
const fixProveUrl = (proveInfo: any) => {
if(proveInfo){
let imgArray = Object.values(proveInfo)
return imgArray.map((item: string, index: number) => <Col key={index} span={3}>
<div className={styles.proveBox}>
<img src={item} alt=""/>
</div>
</Col>
)
}
}
const tips = <>证明材料<Tooltip title="证明材料:如商标注册证书、品牌授权证书等证明材料"><span>&nbsp;<QuestionCircleOutlined /></span></Tooltip></>
const content = <>
<Descriptions colon={true} style={{textAlign: 'center'}}>
<Descriptions.Item label="申请审核时间">2020-08-25 09:00:32</Descriptions.Item>
<Descriptions.Item label="审核状态"><span className="commonStatusValid"></span>通过</Descriptions.Item>
<Descriptions.Item label="品牌状态">有效</Descriptions.Item>
<Descriptions.Item label="申请审核时间">{brandInfo.applyTime && moment(brandInfo.applyTime).format('YYYY-MM-DD HH:mm:ss')}</Descriptions.Item>
<Descriptions.Item label="审核状态">
{
fixStatus(brandInfo?.status)
}
</Descriptions.Item>
<Descriptions.Item label="品牌状态">{brandInfo.isEnable?'有效':'无效'}</Descriptions.Item>
</Descriptions>
</>
return (
<PageHeaderWrapper
title="万宝龙"
title={brandInfo?.name}
onBack={() => history.goBack()}
backIcon={<ReutrnEle logoSrc='https://avatars1.githubusercontent.com/u/8186664?s=460&v=4' />}
backIcon={<ReutrnEle logoSrc={brandInfo?.logoUrl} />}
content={content}
extra={[
<Button icon={<FormOutlined />} key="1" type="primary">
<Button
icon={<FormOutlined />}
key="1"
type="primary"
onClick={()=>history.push(`/memberCenter/commodityAbility/trademark/addBrand?id=${brandInfo.id}`)}
disabled={!(brandInfo.status===1||brandInfo.status===3)}
>
修改
</Button>,
]}
>
<Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title={tips}>
<Row>
<Col span={4}>
<div>横版</div>
</Col>
<Col span={4}>
<div>竖版</div>
</Col>
<Col span={4}>
<div>上版</div>
</Col>
<Col span={4}>
<div>下版</div>
</Col>
<Col span={4}>
<div>左版</div>
</Col>
<Col span={4}>
<div>右版</div>
</Col>
<Row gutter={24}>
{
fixProveUrl(brandInfo.proveUrl)
}
</Row>
</Card>
</Space>
<Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="流程进度">
<Steps progressDot current={2}>
<Steps progressDot current={fixStep}>
<Step title="提交审核" description="供应商" />
<Step title="审核品牌" description="平台" />
<Step title="完成" description="" />
......@@ -141,7 +175,7 @@ const viewBrand: React.FC<{}> = () => {
</Space>
<Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="审核历史">
<Table dataSource={dataSource} columns={columns} pagination={false} />
<Table dataSource={recordData} columns={columns} pagination={false} />
</Card>
</Space>
</PageHeaderWrapper>
......
......@@ -304,4 +304,7 @@
.mr_t-40 {
margin-top: 40px;
}
.mr_t-24 {
margin-top: 24px;
}
\ No newline at end of file
......@@ -49,6 +49,7 @@ const CustomCheckbox = props => {
const CustomInput = props => {
const { help, ...restProps } = props
console.log(props)
return (
<AntdInput
{...restProps}
......@@ -281,7 +282,7 @@ const UserRegistry = () => {
GlobalConfig.userRegister.useDetail.map(v => {
return (
<FormBlock className={styles['mr_t-40']} visible={current === 2} key={v.groupName} title={<span className={styles.commonPanelTitle}>{v.groupName}</span>}>
<FormMegaLayout columns={2} grid>
<FormMegaLayout columns={2} grid autoRow size='large' className={styles['mr_t-24']}>
{
v.elements.map(field => {
// 字段类型暂时为null, 所以固定为input
......@@ -309,7 +310,8 @@ const UserRegistry = () => {
pattern: v.rulePattern
}
})}
x-component-props={{ help: field.fieldRemark, placeholder: `请输入${field.fieldCNName}`}}
maxLength={field.fieldLength}
x-component-props={{ help: field.fieldRemark, placeholder: `请输入${field.fieldCNName}`, size: 'large'}}
x-component='CustomInput'
>
</Field>
......
......@@ -38,7 +38,7 @@ declare namespace AttributeApi {
export interface AttributeByUpdateStatusDTO {
id: number;
status: boolean;
isEnable: boolean;
}
......
......@@ -56,7 +56,8 @@ export async function updateAttribute(params: AttributeApi.AttributeItem) {
export async function deleteAttribute(params: AttributeApi.AttributeByQueryDTO) {
return request('/customer/deleteCustomerAttribute', {
prefix,
params
method: 'post',
data: params
})
}
......@@ -68,7 +69,8 @@ export async function deleteAttribute(params: AttributeApi.AttributeByQueryDTO)
export async function updateAttributeStatus(params: AttributeApi.AttributeByUpdateStatusDTO) {
return request('/customer/updateCustomerAttributeStatus', {
prefix,
params,
method: 'post',
data: params,
// ctlType: 'message'
})
}
......
......@@ -65,7 +65,8 @@ export async function updateCategory(params: CategoryTreeApi.CategoryListItem) {
export async function deleteCategory(params: CategoryTreeApi.CategoryByQueryDTO) {
return request('/customer/deleteCustomerCategory', {
prefix,
params
method: 'post',
data: params
})
}
......
......@@ -2,16 +2,18 @@ import '../attribute/API'
declare namespace PropertyValueApi {
export interface innerAttributeValue {
id: number;
value: string;
}
export interface PropertyValueItem {
id?: number;
value: string;
imageUrl?: string;
isEnable: boolean;
customerAttribute?: AttributeApi.innerAttribute;
attributeValue?: {
id: number;
value: string;
}
attributeValue?: innerAttributeValue;
}
export interface PropertyValueListsModel {
......@@ -46,7 +48,7 @@ declare namespace PropertyValueApi {
export interface PropertyValueByUpdateStatusDTO {
id: number;
status: boolean;
isEnable: boolean;
}
......
......@@ -48,7 +48,8 @@ export async function updatePropertyValue(params: PropertyValueApi.PropertyValue
export async function deletePropertyValue(params: PropertyValueApi.PropertyValueByQueryDTO) {
return request('/customer/deleteCustomerAttributeValue', {
prefix,
params
method: 'post',
data: params
})
}
......@@ -60,7 +61,8 @@ export async function deletePropertyValue(params: PropertyValueApi.PropertyValue
export async function updatePropertyValueStatus(params: PropertyValueApi.PropertyValueByUpdateStatusDTO) {
return request('/customer/updateCustomerAttributeValueStatus', {
prefix,
params,
method: 'post',
data: params,
// ctlType: 'message'
})
}
......
declare namespace CommodityGoodsApi {
export interface innerCategory {
id: number;
name: string;
}
export interface innerBrand {
id: number;
name: string;
}
export interface GoodsItem {
id?: number;
code: string;
name: string;
type: string;
getCustomerCategory: innerCategory;
brand: innerBrand;
unitName: string;
costPrice: number;
batch: string;
}
export interface GoodsListsModel {
totalCount: number;
data: GoodsItem[];
}
export interface GoodsListsByQueryDTO {
current: number;
pageSize: number;
name?: string;
code?: string;
brandId?: number;
customerCategoryId?: number;
batch?: string;
}
// 查询
export interface GoodsInfoByQueryDTO {
id: number;
}
export interface GoodsInfoByUpdateDTO {
id?: number;
code: string;
name: string;
type: string;
customerCategoryId: number;
brandId: number;
unitId: number;
costPrice: number;
}
// 批量删除
export interface GoodsByBatchDeleteDTO {
idList: number[]
}
// 品牌 品类下拉筛选
export interface SelectCustomerCategoryModel {
data: innerCategory[];
}
export interface SelectCustomerCategoryByQueryDTO {
name: string;
}
export interface SelectBrandModel {
data: innerBrand[];
}
export interface SelectBrandByQueryDTO {
name: string;
}
// 新增 单位下拉
export interface SelectUniteByQueryDTO {
name: string;
}
export interface SelectUniteModel {
data: innerBrand[];
}
}
\ No newline at end of file
import request from '@/utils/request';
const prefix = '/product'
/**
* @description 查询货品信息
* @param {CommodityGoodsApi.GoodsInfoByQueryDTO} params
*/
export async function getGoodsDetail(params: CommodityGoodsApi.GoodsInfoByQueryDTO) {
return request<CommodityGoodsApi.GoodsItem>('/goods/getGoods', {
prefix,
params
})
}
/**
* @description 查询货品列表
* @param {CommodityGoodsApi.GoodsListsByQueryDTO} parmas
*/
export async function getGoodsLists(params: CommodityGoodsApi.GoodsListsByQueryDTO) {
return request<CommodityGoodsApi.GoodsListsModel>('/goods/getGoodsList', {
prefix,
params
})
}
/**
* @description 新增/修改货品
* @param {CommodityGoodsApi.GoodsInfoByUpdateDTO} params
*/
export async function updateGoods(params: CommodityGoodsApi.GoodsInfoByUpdateDTO) {
return request('/goods/saveOrUpdateGoods', {
prefix,
method: 'post',
data: params
})
}
/**
* @description 批量删除货品
* @param {CommodityGoodsApi.GoodsByBatchDeleteDTO} params
*/
export async function deleteBatchGoods(params: CommodityGoodsApi.GoodsByBatchDeleteDTO) {
return request('/goods/deleteBatchGoods', {
prefix,
method: 'post',
data: params
})
}
/**
* @description 获取下拉框品类数据
* @param {CommodityGoodsApi.SelectCustomerCategoryByQueryDTO} params
*/
export async function getSelectCustomerCategoryList(params: CommodityGoodsApi.SelectCustomerCategoryByQueryDTO) {
return request<CommodityGoodsApi.SelectCustomerCategoryModel>('/select/getSelectCustomerCategory', {
prefix,
params
})
}
/**
* @description 获取下拉框品牌数据
* @param {CommodityGoodsApi.SelectBrandByQueryDTO} params
*/
export async function getSelectBrandList(params: CommodityGoodsApi.SelectBrandByQueryDTO) {
return request<CommodityGoodsApi.SelectBrandModel>('/select/getSelectBrand', {
prefix,
params
})
}
/**
* @description 获取下拉框单位数据
* @param {CommodityGoodsApi.SelectUniteByQueryDTO} params
*/
export async function getSelectUniteList(params: CommodityGoodsApi.SelectUniteByQueryDTO) {
return request<CommodityGoodsApi.SelectUniteModel>('/select/getSelectCNUnit', {
prefix,
params
})
}
import '../goods/API'
import '../../classAndProperty/attribute/API'
import { PropertyValueApi } from '../../classAndProperty/propertyValue/API'
declare namespace ProductsAPI {
interface customerCategoryObject {
// 查询列表
export interface ProductsListsByQueryDTO {
current: number;
pageSize: number;
name: string;
code: string;
brandId: number;
customerCategoryId: number;
priceType: number;
Min: number;
Max: number;
status: number;
}
export interface ProductItem {
id: number;
code: string;
name: string;
customerCategory: CommodityGoodsApi.innerCategory,
brand: CommodityGoodsApi.innerBrand,
unitName: string;
priceType: number;
min: number;
max: number;
status: number;
applyTime: number;
}
export interface ProductsListsModel {
totalCount: number;
data: ProductItem[];
}
// 查询商品信息
interface innerLogistics {
deliveryType: number;
carriageType: number;
weight: number;
sendAddress: string;
company: string;
}
interface innerCommodityPic {
main: string;
front: string;
side: string;
bottom: string;
other: string[];
}
interface commodityAttributeItem {
id: number;
key: string;
level: number;
name: string;
type: number;
imageUrl: string;
categoryKey: string;
customerAttribute: AttributeApi.innerAttribute;
customerAttributeValueList: PropertyValueApi.innerAttributeValue[]
}
interface brandObject {
interface unitPriceAndPicItem {
id: number;
goods: CommodityGoodsApi.GoodsItem;
attributeAndValueList: commodityAttributeItem[];
unitPrice: Object; //..
commodityPic: innerCommodityPic;
}
/* 获取详情 删除 提交审核 获取上架商城 复制商品 共用 */
export interface ProductDetailByQueryDTO {
id: number;
name: string;
logoUrl: string;
applyTime: string
status: number;
checkTime: string;
isEnable: boolean;
}
interface goodItem {
export interface ProductDetailModel {
id: number;
status: number;
applyTime: number;
customerCategoryName: string;
brand: CommodityGoodsApi.innerBrand;
code: string;
name: string;
type: string;
customerCategoryId: number;
customerCategory: customerCategoryObject;
brandId: number;
brand: object;
unitId: number;
slogan: string;
sellingPoint: string;
area: string[];
commodityAttributeList: commodityAttributeItem[];
unitName: string;
costPrice: number;
batch: string;
unitId: string;
minOrder: number;
priceType: number;
min: number;
max: number;
unitPriceAndPicList: unitPriceAndPicItem[];
logistics: innerLogistics;
isInvoice: boolean;
marks: string;
packing: string;
afterService: string;
}
export interface ProductListsByQueryDTO {
current: number;
pageSize: number;
name: string;
status: number;
// 新增修改商品
interface innerCustomerAttributeValueList {
customerAttributeValueId: number;
value: string;
}
export interface ProductItem {
id: number;
interface innerCustomerAttributeList {
customerAttributeId: number;
customerAttributeValueList: innerCustomerAttributeValueList[];
}
interface innerGoodsCustomerAttributeList {
customerAttributeId: number;
customerAttributeValueId: number;
value: string;
}
interface innerUnitPriceAndPicList {
goodsId: number;
goodsCustomerAttributeList: innerGoodsCustomerAttributeList[];
unitPrice: Object;
commodityPic: innerCommodityPic;
}
export interface ProductsInfoByUpdateDTO {
id?: number;
memberId?: number;
status: number;
categoryId: number;
customerCategoryId: number;
brandId: number;
goodsList: goodItem[];
name: string;
slogan: string;
sellingPoint: string;
area: string[];
// commodityAttribute: commodityAttributeItem[];
commodityAttribute: any[];
unitId: string;
customerAttributeList: innerCustomerAttributeList[];
unitId: number;
unitName: string;
minOrder: number;
priceType: number;
// unitPriceAndPic: unitPriceAndPicItem[];
unitPriceAndPic: any[];
logistics: object;
unitPriceAndPicList: innerUnitPriceAndPicList[];
logistics: innerLogistics;
isInvoice: boolean;
marks: string;
packing: string;
afterService: string;
}
// 获取上架商城
export interface ProductsGetShopModel {
id: number;
name: string;
isCheck: boolean;
}
// 上架商品
/* 上下架共用 */
export interface publishAndOffCommodityDTO {
id: number;
shopIdList: number[];
}
}
\ No newline at end of file
import request from '@/utils/request';
import { ProductsAPI } from './API';
const prefix = '/product'
......@@ -8,7 +9,7 @@ const prefix = '/product'
* @param {ProductsAPI.ProductListsByQueryDTO} params
*/
export async function getProductLists(params: ProductsAPI.ProductListsByQueryDTO) {
export async function getProductLists(params: ProductsAPI.ProductsListsByQueryDTO) {
return request<CategoryTreeApi.CategroyListsModel>('/commodity/getCommodityList', {
prefix,
params
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -14,10 +14,7 @@ declare namespace TradeMarkApi {
status: number;
checkTime: string;
isEnable: boolean;
proveUrl: {
mapkey: {},
mapValue: {}
}
proveUrl: {}
}
export interface TradeMarkListsModel {
......@@ -42,4 +39,19 @@ declare namespace TradeMarkApi {
isEnable: boolean;
}
export interface TradeMarkRecordByQueryDTO {
brandId: number;
}
export interface TradeMarkRecodModel {
id: number;
merchantRoleId: number;
merchantRoleName: string;
status: number;
createTime: number;
operation: number;
checkRemark: string;
brandId: number;
}
}
\ No newline at end of file
......@@ -73,4 +73,11 @@ export async function applyCheckTradeMark(params: TradeMarkApi.TradeMarkByQueryD
prefix,
params
})
}
export async function getTradeMarkCheckRecord(params: TradeMarkApi.TradeMarkRecordByQueryDTO) {
return request<TradeMarkApi.TradeMarkRecodModel[]>('/brand/getBrandCheckRecord', {
prefix,
params
})
}
\ No newline at end of file
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