Commit ed793325 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

Merge branch 'dev' into test

parents 54334763 a8260a1d
......@@ -72,7 +72,7 @@ export const productModalSchema: ISchema = {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '请输入商品名称/ID',
placeholder: '请输入商品名称',
align: 'flex-left',
},
},
......
......@@ -72,7 +72,7 @@ export const productModalSchema: ISchema = {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '请输入商品名称/ID',
placeholder: '请输入商品名称',
align: 'flex-left',
},
},
......
......@@ -33,7 +33,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const [form] = Form.useForm()
const [confirmLoading, setConfirmLoading] = useState<boolean>(false)
const [operationType, setOprationType] = useState<string>(OPERATION_TYPE.list) // 操作类型:list:显示已选列表;select:选择列表
let [isHighSearch, setIsHighSearch] = useState(false)
const [isHighSearch, setIsHighSearch] = useState(false)
const { templateid, categoryid, goodsList = [], templateType } = props
const [current, setCurrent] = useState<number>(1)
const [pageSize, setPageSize] = useState<number>(10)
......@@ -49,33 +49,27 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const [categoryResponseList, setCategoryResponseList] = useState<any>([])
const [noSelectBrands, setNoSelectBrands] = useState<any[]>([])
const changeNewProps = (key: string, data: any) => {
const newProps = { ...props }
newProps[key] = data
setNewProps(newProps)
}
useEffect(() => {
fetchBrandsList()
fetchCategoryList()
}, [])
const fetchCategoryList = () => {
let param = {
const param: any = {
categoryId: categoryid,
templateId: templateid
}
setSpinLoading(true)
//@ts-ignore
PublicApi.getTemplatePlatformFindCategoryList(param).then(res => {
const data = res.data
setCategoryResponseList(data.categoryBOList || [])
setSpinLoading(false)
if (res.code === 1000) {
const data = res.data
setCategoryResponseList(data.categoryBOList || [])
}
})
}
const fetchBrandsList = () => {
let param = {
const param: any = {
type: 0,
templateId: templateid,
categoryId: categoryid,
......@@ -83,7 +77,6 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
pageSize: 100
}
//@ts-ignore
PublicApi.getTemplatePlatformFindBrandList(param).then((res: any) => {
if (res.code === 1000) {
const dataInfo = res.data
......@@ -98,7 +91,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
}, [filterParam, current])
const fetchGoodsList = () => {
let param = {
let param: any = {
type: 0,
templateId: templateid,
categoryId: categoryid,
......@@ -115,13 +108,14 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
getFn = PublicApi.getTemplateShopFindGoodsList
}
//@ts-ignore
setSpinLoading(true)
getFn(param).then((res: any) => {
if (res.code === 1000) {
const dataInfo = res.data
setTotalCount(dataInfo.totalCount)
setNoSelectGoods(dataInfo.data || [])
}
setSpinLoading(false)
})
}
......@@ -154,7 +148,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const handleSearch = () => {
setCurrent(1)
let param = filterProps(form.getFieldsValue())
const param = filterProps(form.getFieldsValue())
setFilterParam(param)
}
......@@ -194,7 +188,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
// if (selectGoodsList.length <= 0) {
// message.error("请选择要推荐的商品")
// return
// } else
// } else
if (selectGoodsList.length > 10) {
message.error("最多只能推荐10件商品")
return
......@@ -228,13 +222,13 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const saveGoods = () => {
return new Promise((resolve, reject) => {
let param: any = {
const param: any = {
templateId: templateid,
categoryId: categoryid,
}
let ids: number[] = []
const ids: number[] = []
for (let item of selectGoodsList) {
for (const item of selectGoodsList) {
ids.push(item.goodsId)
}
param.goodsIds = ids
......@@ -258,8 +252,8 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const handleChangeOprationType = (type: string) => {
setOprationType(type)
let keys: number[] = []
for (let item of selectGoodsList) {
const keys: number[] = []
for (const item of selectGoodsList) {
keys.push(item.goodsId)
}
setGoodsIds(keys)
......@@ -314,7 +308,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
</Col>
<Col>
<Button onClick={() => setIsHighSearch(isHighSearch = !isHighSearch)}>高级筛选{isHighSearch ? <CaretUpOutlined /> : <CaretDownOutlined />}</Button>
<Button onClick={() => setIsHighSearch(!isHighSearch)}>高级筛选{isHighSearch ? <CaretUpOutlined /> : <CaretDownOutlined />}</Button>
</Col>
<Col>
<Button onClick={() => handleReset()}>重置</Button>
......@@ -336,7 +330,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
>
<Select placeholder="品类" style={{ width: 180 }}>
{
categoryResponseList.map((item, index) => <Select.Option kye={`select_category_item_${index}`} value={item.categoryId}>{item.categoryName}</Select.Option>)
categoryResponseList.map((item, index) => <Select.Option key={`select_category_item_${index}`} value={item.categoryId}>{item.categoryName}</Select.Option>)
}
</Select>
</Form.Item>
......@@ -348,7 +342,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
>
<Select placeholder="品牌" style={{ width: 180 }}>
{
noSelectBrands.map((item, index) => (<Select.Option kye={`select_brand_item_${index}`} value={item.brandId}>{item.brandName}</Select.Option>))
noSelectBrands.map((item, index) => (<Select.Option key={`select_brand_item_${index}`} value={item.brandId}>{item.brandName}</Select.Option>))
}
</Select>
</Form.Item>
......
......@@ -13,7 +13,9 @@ import ProcessProducts from '../../components/ProcessProducts';
import ProcessOrder from '../../components/ProcessOrder';
import {WrapUploadFile} from '../../components/UploadFile';
import { PublicApi } from '@/services/api';
import ProcessDetail from '../../components/ProcessDetail'
import ProcessDetail from '../../components/ProcessDetail';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
/*
* @Author: Bill
* @Date: 2020-10-12 11:36:38
......@@ -33,7 +35,16 @@ const Add: React.FC<{}> = () => {
// 加工订单 modal 框
const [modalOrderVisible, setModalOrderVisible] = useState<boolean>(false);
/* --------以下是 element-------- */
const [rowSelection, selectRowCtl] = useRowSelectionTable({
customKey: 'fullId',
extendsSelection: {
getCheckboxProps: record => ({
disabled: record.purchaseCount - (record.processNum || 0) <= 0,
}),
}
});
const [productRowSelection, productSelectRowCtl] = useRowSelectionTable({ customKey: 'id' });
// 选择加工企业 modal 层
const connectProduct = (
<div>
......@@ -209,10 +220,9 @@ const Add: React.FC<{}> = () => {
formActions.setFieldValue('Tabs.tab-1.layout.processName', name);
formActions.setFieldValue('Tabs.tab-1.layout.processMemberId', memberId);
formActions.setFieldValue('Tabs.tab-1.layout.processRoleId', roleId);
}
const getChangeRows = (rows, primaryKey) => {
const getChangeRows = (rows, primaryKey: string) => {
const {selectedRowKeys, selectRow} = rows;
const currentList = formActions.getFieldValue('Tabs.tab-2.layout.someLists');
// 首先去除掉没有在selectedRowkeys 的那些数据
......@@ -238,8 +248,8 @@ const Add: React.FC<{}> = () => {
* 加工商品Modal框 行勾选回调
* @param rows
*/
const processProductSelected = (rows) => {
const newRows = getChangeRows(rows, "id")
const processProductSelected = () => {
const newRows = getChangeRows(productSelectRowCtl, "id")
formActions.setFieldValue('Tabs.tab-2.layout.someLists', newRows)
}
......@@ -247,8 +257,8 @@ const Add: React.FC<{}> = () => {
* 加工订单Modal框 行勾选回调
* @param row
*/
const processOrderOnok = (rows) => {
const newRows = getChangeRows(rows, "fullId")
const processOrderOnok = () => {
const newRows = getChangeRows(selectRowCtl, "fullId")
formActions.setFieldValue('Tabs.tab-2.layout.someLists', newRows)
}
......@@ -257,7 +267,6 @@ const Add: React.FC<{}> = () => {
*/
const handleSubmit = (values: any) => {
console.log(values)
setSubmitLoading(true);
const SELF_MENTION = 2; // 自提
const {
deliveryDate,
......@@ -277,11 +286,12 @@ const Add: React.FC<{}> = () => {
const isSomeFieldNotFill = someLists.some((item) => {
return typeof item.processNum === 'undefined' || typeof item.processUnitPrice === 'undefined'
})
if(isSomeFieldNotFill) {
message.error("通知单明细中有加工商品的加工数量或加工单价未填写");
return
}
setSubmitLoading(true);
const detailList = someLists.map((item) => {
return {
orederNo: item.orderNo, // 如果是商品加工,那么他没有订单号
......@@ -356,11 +366,22 @@ const Add: React.FC<{}> = () => {
}
}
/**
* 移除数据, 这里有个bug,移除数据时,对应的modal的rowSelection 没有跟着删除
* 尝试从父组件给rowSelection
* @param id
*/
const handleRemoveRow = (id: number) => {
const currentList = formActions.getFieldValue('Tabs.tab-2.layout.someLists');
const primaryKey = activeSource === '加工订单' ? 'fullId' : 'id'
const newList = currentList.filter((item) => item[primaryKey] !== id);
formActions.setFieldValue('Tabs.tab-2.layout.someLists', newList)
const newSelectedKeys = newList.map((item) => item.id);
if(activeSource === '加工订单') {
selectRowCtl.setSelectedRowKeys(newSelectedKeys);
} else {
productSelectRowCtl.setSelectedRowKeys(newSelectedKeys)
}
}
return (
......@@ -406,12 +427,14 @@ const Add: React.FC<{}> = () => {
visible={modalProductVisible}
cancel={() => setModalProductVisible(false)}
onOk={processProductSelected}
rowSelection={productRowSelection}
></ProcessProducts>
<ProcessOrder
visible={modalOrderVisible}
cancel={() => setModalOrderVisible(false)}
onOk={processOrderOnok}
rowSelection={rowSelection}
>
</ProcessOrder>
</Card>
......
......@@ -29,16 +29,56 @@ const ADD_PROCESS_PATH = '/memberCenter/tranactionAbility/stockSellStorage/bills
const ADD_DELIVERY_PATH = '/memberCenter/tranactionAbility/stockSellStorage/bills/add';
const ADD_LOGISTICS_PATH = '/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add';
const SERVICE_MAPS = {
[PENDING_ADD_PROCESS_PATH]: PublicApi.getEnhanceSupplierToBeAddStorageList,
[PROCESSING_INVOICE_TO_BE_ADD_PATH]: PublicApi.getEnhanceProcessToBeAddDeliveryList,
[PENDING_ADD_LOGISTICS_PATH]: PublicApi.getEnhanceProcessToBeAddLogisticsList,
///enhance/process/toBeDelivery/list
[PENDING_DELIVERD_PATH]: PublicApi.getEnhanceProcessToBeDeliveryList,
[PENDING_RECEIPT_PATH]: PublicApi.getEnhanceProcessToBeConfirmReceiptList,
[ASSIGN_PENDING_RECEIVE]: PublicApi.getEnhanceSupplierToBeReceiveList
}
/**
* 记录 outerStatus 还有 innerStatus, 在不同状态的时候会渲染不同的组件
* 例子 3_15 此时 状态为待审核加工发货单, 那么对应的columns 的render组件是 <a>审核</a>
*/
enum OuterAndInnerStatus {
pending_add_process = '待新增加工发货单',
/**
* 待审核加工发货单
*/
pending_exam_add_process = '3_15',
/**
* 待新增物流单
*/
pending_add_logistics = '4_16',
/**
* 待确认物流单
*/
pending_confirm_logistics = '待确认物流单',
/**
* 待确认发货
*/
pending_confirm_deliver = '5_18',
/**
* 待新增加工入库单
*/
pending_add_process_in_warehouse = '6_18',
/**
* 待审核加工入库单
*/
pending_exam_process_in_warehouse = '6_20',
/**
* 待确认收货
*/
pending_confirm_receive = '7_21',
/**
* 待确认回单
*/
pending_confirm_receipt = '8_22'
}
enum ExamType {
delivery = "deliver", //加工发货单
warehouseReceipt = 'warehouseReceipt', // 加工入库单
......@@ -86,12 +126,14 @@ const processStock: React.FC<{}> = () => {
{
title: () => pathname == PENDING_ADD_PROCESS_PATH ? '入库单号' : '发货单号',
dataIndex: 'deliveryNo',
render: (text) => {
render: (text, record: any) => {
if(!text) {
return null
}
const url = '/memberCenter/tranactionAbility/stockSellStorage/bills/detail';
const type = pathname == PENDING_ADD_PROCESS_PATH ? DOC_TYPE_PROCESS_RECEIPT : DOC_TYPE_PROCESS_INVOICE
return (
<EyePreview url="/" >{text}</EyePreview>
<EyePreview url={`${url}?relevanceInvoicesId=${record.id}&invoicesTypeId=${type}&relevanceInvoices=${DEPENDENT_DOC_PRODUCTION}`} >{text}</EyePreview>
)
}
},
......@@ -102,62 +144,58 @@ const processStock: React.FC<{}> = () => {
dataIndex: 'action',
render: (text, record: any) => {
// 这里暂时不知道status的状态, 先用内部状态判断, 审核的先不处理, 感觉应该用入库单号去判断吧
const outerStatus = record.outerStatus;
const innerStatus = record.innerStatus;
const MAP = {
// outerStatus = 5, innerStatus = 18
'待确认发货': <Link to={`${PENDING_DELIVERD_PATH}/detail?id=${record.id}`}>发货</Link>,
// outerStatus = 6, innerStatus = 19
'待新增加工入库单': (
[OuterAndInnerStatus.pending_add_process]: (
<Link
to={`${ADD_DELIVERY_PATH}?relevanceInvoicesId=${record.id}&invoicesTypeId=${DOC_TYPE_PROCESS_RECEIPT}&relevanceInvoices=${DEPENDENT_DOC_PRODUCTION}`}
to={`${ADD_PROCESS_PATH}?relevanceInvoicesId=${record.id}&invoicesTypeId=${DOC_TYPE_PROCESS_INVOICE}&relevanceInvoices=${DEPENDENT_DOC_PRODUCTION}`}
>
新增加工入库
新增加工发货
</Link>
),
// outerStatus = 6, innerStatus = 20
'待审核加工入库单': (
[OuterAndInnerStatus.pending_exam_add_process]: (
<Popconfirm
title={`是否确认审核入库单号为${record.deliveryNo}的加工入库单?`}
title={`是否确认审核发货单号为${record.deliveryNo}的加工发货单?`}
visible={visibleID === record.id}
placement="left"
okText="确定"
cancelText="取消"
onCancel={handleCancel}
okButtonProps={{ loading: confirmLoading }}
onConfirm={() => handleExam(record.id, ExamType.warehouseReceipt)}
onConfirm={() => handleExam(record.id, ExamType.delivery)}
>
<a onClick={() => handleVisible(record.id)}>审核</a>
</Popconfirm>
),
// outerStatus = 7, innerStatus = 21
'待确认收货': <Link to={`${ASSIGN_PENDING_RECEIVE}/detail?id=${record.id}`}>收货</Link>,
'待新增加工发货单': (
[OuterAndInnerStatus.pending_add_logistics]: <Link to={`${ADD_LOGISTICS_PATH}`}>新增</Link>,
[OuterAndInnerStatus.pending_confirm_logistics]: <a>查看</a>,
[OuterAndInnerStatus.pending_confirm_deliver]: <Link to={`${PENDING_DELIVERD_PATH}/detail?id=${record.id}`}>发货</Link>,
[OuterAndInnerStatus.pending_add_process_in_warehouse]: (
<Link
to={`${ADD_PROCESS_PATH}?relevanceInvoicesId=${record.id}&invoicesTypeId=${DOC_TYPE_PROCESS_INVOICE}&relevanceInvoices=${DEPENDENT_DOC_PRODUCTION}`}
to={`${ADD_DELIVERY_PATH}?relevanceInvoicesId=${record.id}&invoicesTypeId=${DOC_TYPE_PROCESS_RECEIPT}&relevanceInvoices=${DEPENDENT_DOC_PRODUCTION}`}
>
新增加工发货
新增加工入库
</Link>
),
'待审核加工发货单': (
[OuterAndInnerStatus.pending_exam_process_in_warehouse]: (
<Popconfirm
title={`是否确认审核发货单号为${record.deliveryNo}的加工发货单?`}
title={`是否确认审核入库单号为${record.deliveryNo}的加工入库单?`}
visible={visibleID === record.id}
placement="left"
okText="确定"
cancelText="取消"
onCancel={handleCancel}
okButtonProps={{ loading: confirmLoading }}
onConfirm={() => handleExam(record.id, ExamType.delivery)}
onConfirm={() => handleExam(record.id, ExamType.warehouseReceipt)}
>
<a onClick={() => handleVisible(record.id)}>审核</a>
</Popconfirm>
),
'待新增物流单': <Link to={`${ADD_LOGISTICS_PATH}`}>新增</Link>,
'待确认物流单': <a>查看</a>,
// outerStatus = 8, innerStatus = 22
'待确认回单': <Link to={`${PENDING_RECEIPT_PATH}/detail?id=${record.id}`}>确认回单</Link>
[OuterAndInnerStatus.pending_confirm_receive]: <Link to={`${ASSIGN_PENDING_RECEIVE}/detail?id=${record.id}`}>收货</Link>,
[OuterAndInnerStatus.pending_confirm_receipt]: <Link to={`${PENDING_RECEIPT_PATH}/detail?id=${record.id}`}>确认回单</Link>
}
return MAP[record.innerStatusName]
return MAP[`${outerStatus}_${innerStatus}`] || MAP[record.innerStatusName]
}
}
]
......
......@@ -173,6 +173,7 @@ export const SUPPLIER_INNER_STATUS_COLOR = {
'4': 'processing',
"5": "success",
"9": "error",
"10": "success"
}
......@@ -226,8 +227,24 @@ export const SUPPLIER_OUTER_STATUS_COLOR: SUPPLIER_OUTER_STATUS_COLOR_TYPE= [
"success"
]
/**
* 确认生产通知单 -> 列表页 -> 内部状态
*/
export const PROCESS_OUTER_STATUS_COLOR: ("default" | "processing" | "error"| "success" | "warning")[] = [
"error", // 不接受申请
"default", // 待提交审核 processInnerStatus = 1,
"warning", // 待审核 processInnerStatus = 2,
"error", // 待审核(1级) processInnerStatus = 3 不通过
"success", // 待审核(2级) processInnerStatus = 4 审核通过
"processing", // 待新增加工发货单 processInnerStatus = 5
"warning", // 待审核加工发货单 processInnerStatus = 6
"default", // 待新增物流单 processInnerStatus = 7
"processing", // 待确认物流单 processInnerStatus = 8
"warning", // 待确认发货 processInnerStatus = 9
"success", // 已确认发货 processInnerStatus = 10
"default", // processInnerStatus = 11 待确认回单
"success", // 完成 processInnerStatus = 12
]
/**
* 待新增加工入库单
......
......@@ -10,9 +10,15 @@ const TablePagination = (props) => {
}
return (
<div style={parentStyle}>
<Pagination {...componentProps} current={props.value?.current || 1} onChange={handleChange} ></Pagination>
</div>
<>
{
total > 0
? <div style={parentStyle}>
<Pagination {...componentProps} current={props.value?.current || 1} onChange={handleChange} ></Pagination>
</div>
: null
}
</>
)
}
......
......@@ -22,7 +22,7 @@ const expandRowColumn = [
];
const ProcessProducts = ({visible, cancel, ...restProps}) => {
const ProcessProducts = ({visible, cancel, rowSelection, ...restProps}) => {
// const [mainTableSelectRow, mainTableSelectRowCtl] = useRowSelectionTable({customKey: 'id'});
const [selectRow, selectRowCtl] = useRowSelectionTable({
customKey: 'fullId',
......@@ -73,7 +73,8 @@ const ProcessProducts = ({visible, cancel, ...restProps}) => {
<Table
columns={expandRowColumn}
rowKey={(row) => row.fullId}
rowSelection={selectRow}
// rowSelection={selectRow}
rowSelection={rowSelection}
dataSource={renderData}
pagination={false}
/>
......@@ -85,8 +86,9 @@ const ProcessProducts = ({visible, cancel, ...restProps}) => {
const handleSubmit = () => {
// console.log(selectRowCtl, mainTableSelectRowCtl);
console.log(selectRowCtl)
restProps.onOk(selectRowCtl)
// console.log(selectRowCtl)
// restProps.onOk(selectRowCtl)
restProps.onOk()
cancel();
}
......
......@@ -118,18 +118,29 @@ export const schema = {
width: '150px',
margin: '0 20px 0 0'
},
default: 0,
defaultValue: 0,
}
},
type: {
type: 'string',
'x-component': 'Select',
'x-component-props': {
options: [],
options: [
{label: '询价采购', value: 1},
{label: '需求采购', value: 2},
{label: '现货采购', value: 3},
{label: '集采', value: 4},
{label: '积分兑换', value: 5},
{label: '渠道直采', value: 6},
{label: '渠道现货', value: 7},
{label: '渠道积分兑换', value: 8},
],
style: {
width: '150px',
margin: '0 20px 0 0'
}
},
placeholder: '订单类型',
allowClear: true
}
},
queryBtn: {
......
......@@ -4,11 +4,9 @@ import { PublicApi } from '@/services/api';
import EyePreview from '@/components/EyePreview';
import { BasicForm, TablePagination, SearchForm } from '../ModalForTable'
import { createAsyncFormActions, FormEffectHooks } from '@formily/antd';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { schema } from './schema';
import { getAuth } from '@/utils/auth';
const { onFieldInit$ } = FormEffectHooks
const actions = createAsyncFormActions();
......@@ -20,8 +18,7 @@ const MALL_NAME = {
"3": "渠道商城",
"4": "渠道自有商城"
}
const ProcessProducts = ({visible, cancel, ...restProps}) => {
const [selectRow, setSelectRow] = useRowSelectionTable({ customKey: 'id' });
const ProcessProducts = ({visible, cancel, rowSelection, ...restProps}) => {
const authInfo = getAuth();
const fetchData = useCallback(async (params: any) => {
console.log(params);
......@@ -32,7 +29,6 @@ const ProcessProducts = ({visible, cancel, ...restProps}) => {
memberId:authInfo.memberId,
...params,
}
console.log(postData);
let res = await PublicApi.getProductCommodityCommonGetCommodityListByBuyer(postData);
return res;
}, [])
......@@ -52,13 +48,13 @@ const ProcessProducts = ({visible, cancel, ...restProps}) => {
]
const onOk = () => {
restProps.onOk(setSelectRow)
// restProps.onOk(setSelectRow)
restProps.onOk()
cancel();
}
const effects = () => {
onFieldInit$('branchId').subscribe((fieldState) => {
///product/select/getSelectBrand
PublicApi.getProductSelectGetSelectBrand({name: ''}).then(res => {
let options = []
if(res.code === 1000) {
......@@ -70,7 +66,6 @@ const ProcessProducts = ({visible, cancel, ...restProps}) => {
})
});
onFieldInit$('categoryId').subscribe((fieldState) => {
///product/select/getSelectBrand
PublicApi.getProductSelectGetSelectCategory({name: ''}).then(res => {
let options = []
if(res.code === 1000) {
......@@ -99,7 +94,7 @@ const ProcessProducts = ({visible, cancel, ...restProps}) => {
schema={schema}
actions={actions}
effects={effects}
expressionScope={{rowSelection: selectRow, columns: columns}}
expressionScope={{rowSelection: rowSelection, columns: columns}}
></SearchForm>
: null
}
......
......@@ -19,7 +19,8 @@ import {
CONFIRM_PENDING_SECOND,
CONFIRM_PENDING_CONFIRM,
SUPPLIER_INNER_STATUS_COLOR,
SUPPLIER_OUTER_STATUS_COLOR
SUPPLIER_OUTER_STATUS_COLOR,
PROCESS_OUTER_STATUS_COLOR
} from '../../common'
import { timeRange } from '@/utils';
......@@ -72,10 +73,8 @@ const Query: React.FC<{}> = (props) => {
return {}
}, [pathname])
// 初始化高级筛选选项
const fetchSelectOptions = useCallback(async () => {
const fetchSelectOptions = useCallback(async () => {
const { data, code } = await PublicApi.getEnhanceSupplierAllOuterAndInner()
if(code === 1000) {
return {
......@@ -120,7 +119,7 @@ const Query: React.FC<{}> = (props) => {
dataIndex: 'innerStatusName',
render: (text, record: any) => {
return (
<Badge status={SUPPLIER_INNER_STATUS_COLOR[record.processInnerStatus] || 'default'} text={text}></Badge>
<Badge status={PROCESS_OUTER_STATUS_COLOR[record.processInnerStatus] || 'default'} text={text}></Badge>
)
}
}
......
......@@ -10,12 +10,11 @@ interface Iprops {};
const url = '/memberCenter/handling/assign/query'
const KEY_TITLE = {
processList: '指派生产通知单',
supplierList: '生产通知单处理'
supplierList: '指派生产通知单',
processList: '生产通知单处理'
}
const ProcessCenter: React.FC<Iprops> = () => {
///report/member/home/getEnhanceTally
const request = useCallback(async () => {
const res = await PublicApi.getReportMemberHomeGetEnhanceTally();
return res;
......
......@@ -19,11 +19,12 @@
.item {
background: #F7F8FA;
width: 157px;
text-align: center;
color: #303133;
padding: 6px;
margin-bottom: 16px;
display: flex;
justify-content: center;
align-items: center;
a {
color: #303133;
}
......
......@@ -501,7 +501,8 @@ const CommodityDetail = (props) => {
stockCount: stockCount,
minOrder: commodityDetail.minOrder,
commodityPic: attrAndValList.commodityPic ? attrAndValList.commodityPic[0] : commodityDetail.mainPic,
attribute: attrAndValList.attributeAndValueList
attribute: attrAndValList.attributeAndValueList,
isMemberPrice: commodityDetail.isMemberPrice ? 1 : 0
}
const sessionKey = `${commodityDetail.id}${new Date().getTime()}`
......
......@@ -34,9 +34,9 @@ const Category: React.FC<CategoryPropsType> = (props) => {
setLastCategoryId(null)
setSelectAttrbuteList([])
} else {
let initKeys = []
const initKeys = []
// let initAttrKeys = []
for (let item of filterList) {
for (const item of filterList) {
if (item.type === FILTER_TYPE.category) {
initKeys.push(String(item.key))
}
......@@ -50,7 +50,7 @@ const Category: React.FC<CategoryPropsType> = (props) => {
useEffect(() => {
let getCategoryListFn
let param: any = {}
const param: any = {}
let headers = {}
/**
* 根据不通过的页面类型,请求不同的品类接口
......@@ -105,7 +105,7 @@ const Category: React.FC<CategoryPropsType> = (props) => {
useEffect(() => {
if (lastCategoryId) {
let param: any = {
const param: any = {
categoryId: lastCategoryId
}
let getAttributeFn
......@@ -160,8 +160,8 @@ const Category: React.FC<CategoryPropsType> = (props) => {
if (!list) {
return []
}
let initExpandKeys = []
let result: any = list.map(item => {
const initExpandKeys = []
const result: any = list.map(item => {
initExpandKeys.push(item.id)
return {
title: item.title,
......@@ -200,7 +200,7 @@ const Category: React.FC<CategoryPropsType> = (props) => {
setAttributeList([])
onFilter({
type: FILTER_TYPE.attribute,
key: [],
key: null,
title: ``
})
}
......@@ -217,12 +217,12 @@ const Category: React.FC<CategoryPropsType> = (props) => {
const getDetailById = (attrId, attrValId, state = 2) => {
let detail = {}
for (let item of attributeList) {
for (const item of attributeList) {
if (item.id === attrId) {
if (state === 1) {
detail = item
} else {
for (let childItem of item.attributeValueList) {
for (const childItem of item.attributeValueList) {
if (childItem.value === attrValId) {
detail = childItem
}
......@@ -235,7 +235,7 @@ const Category: React.FC<CategoryPropsType> = (props) => {
const getSelectAttributeList = (selectList) => {
let ids = []
for (let item of selectList) {
for (const item of selectList) {
ids = [...ids, ...item.customerAttributeValueList.map(childItem => childItem.id)]
}
return ids
......@@ -243,12 +243,12 @@ const Category: React.FC<CategoryPropsType> = (props) => {
const handleChange = (attrId, checkedList) => {
let tempSelect = [...initSelectAttributeList]
let attrInfo: any = getDetailById(attrId, attrId, 1)
let tempItem = {
const attrInfo: any = getDetailById(attrId, attrId, 1)
const tempItem = {
customerAttributeId: attrId,
customerAttributeName: attrInfo.name,
customerAttributeValueList: checkedList.map(item => {
let detail: any = getDetailById(attrId, item)
const detail: any = getDetailById(attrId, item)
return {
id: detail.value,
name: detail.label
......@@ -268,7 +268,7 @@ const Category: React.FC<CategoryPropsType> = (props) => {
tempSelect.push(tempItem)
}
let keys = getSelectAttributeList(tempSelect)
const keys = getSelectAttributeList(tempSelect)
setSelectAttrbuteList(keys)
tempSelect = tempSelect.filter(item => item.customerAttributeValueList.length > 0)
onFilter({
......
......@@ -27,8 +27,8 @@ const CommodityType: React.FC<CommodityTypePropsType> = (props) => {
if (isEmpty(filterList)) {
setSelectKeys([])
} else {
let initKeys = []
for (let item of filterList) {
const initKeys = []
for (const item of filterList) {
if (item.type === FILTER_TYPE.commodityType) {
initKeys.push(Number(item.key))
}
......@@ -54,7 +54,7 @@ const CommodityType: React.FC<CommodityTypePropsType> = (props) => {
} else {
onFilter({
type: FILTER_TYPE.commodityType,
key: [],
key: false,
title: ''
})
}
......@@ -62,7 +62,7 @@ const CommodityType: React.FC<CommodityTypePropsType> = (props) => {
const getItemText = (key: number) => {
let result = ""
for (let item of styleOptions) {
for (const item of styleOptions) {
if (item.value === key) {
result = item.label
}
......
......@@ -73,11 +73,11 @@ const Order: React.FC<OrderPropsType> = (props) => {
}, [])
const initOrderInfo = async () => {
let result = []
const result = []
const sessionOrderInfo: any = await getOrderInfo(spam_id)
for (let item of sessionOrderInfo.orderList) {
let tempOrderList = []
for (let orderItem of item.orderList) {
for (const item of sessionOrderInfo.orderList) {
const tempOrderList = []
for (const orderItem of item.orderList) {
let resData: any = {}
if (orderItem.logistics?.sendAddress) {
try {
......@@ -103,17 +103,17 @@ const Order: React.FC<OrderPropsType> = (props) => {
// 是否选用电子合同
if (data.isElectronicContract) {
setElectronicContractId(data.electronicContractId)
if (!!sessionStorage.getItem(`contract${spam_id}`)) {
if (sessionStorage.getItem(`contract${spam_id}`)) {
setContractInfo(JSON.parse(sessionStorage.getItem(`contract${spam_id}`)))
setIsElectronicContract(true)
} else {
// 根据电子合同模板id获取生成电子合同
let param = {
const param: any = {
contractTemplateId: data.electronicContractId,
signMemberId: userInfo?.memberId,
orderNo: new Date().getTime()
}
//@ts-ignore
const signRes = await PublicApi.postOrderSignatureSignContractCreate(param)
const signData: any = signRes.data
if (signRes.code === 1000) {
......@@ -173,8 +173,8 @@ const Order: React.FC<OrderPropsType> = (props) => {
const getCommodityAmount = () => {
let amount = 0
for (let item of orderInfo.orderList) {
for (let orderItem of item.orderList) {
for (const item of orderInfo.orderList) {
for (const orderItem of item.orderList) {
amount += (orderItem.unitPrice * orderItem.count)
}
}
......@@ -187,10 +187,10 @@ const Order: React.FC<OrderPropsType> = (props) => {
const getLogisticsFeeAnync = async () => {
if (selectAddressInfo) {
let orderProductList = []
for (let item of orderInfo.orderList) {
for (let orderItem of item.orderList) {
let templateId = orderItem.logistics?.templateId
const orderProductList = []
for (const item of orderInfo.orderList) {
for (const orderItem of item.orderList) {
const templateId = orderItem.logistics?.templateId
// 判断是否物流的方式和由买家承担费用并使用了运费模板
if (orderItem.logistics?.deliveryType === 1 && orderItem.logistics?.carriageType === 2 && orderItem.logistics?.useTemplate && templateId) {
orderProductList.push({
......@@ -202,7 +202,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
}
}
if (orderProductList.length > 0) {
let params: any = {
const params: any = {
orderProductList,
receiverAddressId: selectAddressInfo.id
}
......@@ -210,7 +210,9 @@ const Order: React.FC<OrderPropsType> = (props) => {
const res: any = await PublicApi.postLogisticsFreightTemplateCalFreightPrice(params)
message.destroy()
setLogisticsFee(Number(res.data))
} catch (error) { }
} catch (error) {
console.log(error)
}
}
}
}
......@@ -261,7 +263,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
* 提交订单
*/
const submitOrder = (signatureLogId?: number) => {
let params: any = {
const params: any = {
orderModel: getOrderMode(), // 下单模式
needTheInvoice: needTheInvoice ? 1 : 0,
}
......@@ -278,12 +280,12 @@ const Order: React.FC<OrderPropsType> = (props) => {
// params.addres = selectAddressInfo.address
}
let orderProductRequests = []
let purchaseIds = []
for (let item of orderList) {
const orderProductRequests = []
const purchaseIds = []
for (const item of orderList) {
for (let orderItem of item.orderList) {
let temp: any = {}
for (const orderItem of item.orderList) {
const temp: any = {}
purchaseIds.push(orderItem.purchaseId)
temp.imgUrl = orderItem.commodityPic
temp.productId = orderItem.id
......@@ -299,6 +301,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
temp.minOrder = orderItem.minOrder
temp.memberId = orderInfo.supplyMembersId
temp.memberRoleId = orderInfo.supplyMembersRoleId
temp.isMemberPrice = orderItem.isMemberPrice
orderProductRequests.push(temp)
}
}
......@@ -316,7 +319,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
params.theInvoiceId = selectInvoiceInfo.id
params.theInvoiceInfo = selectInvoiceInfo
}
if (!!orderInfo.purchaseOrder) {
if (orderInfo.purchaseOrder) {
params.idList = purchaseIds
params.productType = (layoutType === LAYOUT_TYPE.channel || layoutType === LAYOUT_TYPE.ichannel) ? 2 : 1
}
......@@ -388,13 +391,13 @@ const Order: React.FC<OrderPropsType> = (props) => {
}
const handleSignModalConfirm = () => {
let param = {
const param: any = {
contractTemplateId: electronicContractId,
contractName: contractInfo.contractName,
contractUrl: contractInfo.contractUrl,
}
setAgreeSignLoading(true)
// @ts-ignore
PublicApi.postOrderSignatureOrderSettleSign(param).then((res: any) => {
if (res.code === 1000) {
message.destroy()
......@@ -409,7 +412,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
}
const pollingCheckStatus = (signatureLogId) => {
let param = {
const param = {
signatureLogId
}
PublicApi.getOrderSignatureOrderSettleSignDetail(param).then(res => {
......
......@@ -89,8 +89,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
/**
* 初始化进货单数据
* @param list
* @param initState
* @param list
* @param initState
*/
const initPurchaseList = async (list: GetSearchShopPurchaseGetPurchaseListResponse) => {
let result = []
......@@ -119,7 +119,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
price: isMemberPrice ? Number(unitPrice[key]) * Number(parameter) : unitPrice[key]
})
})
item.commodityUnitPrice['priceRange'] = tempPriceRange
tempItem.orderList = [...tempItem.orderList, item]
tempResult.push(tempItem)
......@@ -234,8 +234,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
/**
* 修改购买数量
* @param count
* @param id
* @param count
* @param id
*/
const handleCountChange = (count: number, id: number, type: string) => {
handleChangeFinishCount(count, id)
......@@ -273,8 +273,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
/**
* 修改商品购买数量
* @param count
* @param id
* @param count
* @param id
*/
const handleChangeFinishCount = (count, id) => {
const result = orderList.map(item => {
......@@ -291,8 +291,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
/**
* 计算单个商品总价格
* @param priceRange
* @param count
* @param priceRange
* @param count
*/
const computeItemPrice = (priceRange, count) => {
count = Number(count)
......@@ -314,7 +314,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
/**
* 删除进货单的商品
* @param id
* @param id
*/
const handleDeleteItem = (id: number) => {
Modal.confirm({
......@@ -387,7 +387,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
/**
* 删除指定id的商品
* @param ids
* @param ids
*/
const deleteListItems = (ids: number[]) => {
const newOrderList = JSON.parse(JSON.stringify(orderList))
......@@ -436,8 +436,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
/**
* 获取用户权益参数
* @param memberId
* @param memberRoleId
* @param memberId
* @param memberRoleId
*/
const getMemberCredit = (memberId, memberRoleId) => {
return new Promise((resolve) => {
......@@ -455,10 +455,10 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
/**
* 获取支付方式
* @param memberId
* @param memberId
*/
const getPayWayListByMemberId = (memberId: number) => {
return new Promise((resolve) => {
return new Promise((resolve, reject) => {
if (!memberId) {
resolve([])
return
......@@ -469,6 +469,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
PublicApi.getPayPayWayList(param).then(res => {
if (res.code === 1000) {
resolve(initPayWayList(res.data))
} else {
resolve([])
}
})
})
......@@ -539,7 +541,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
purchaseIds.push(item.id)
productIds.push(item.commodityUnitPrice.id)
commonLogistics = item.commodityUnitPrice.commodity.logistics
if(item.commodityUnitPrice.commodity.logistics.deliveryType === 1) {
hasLogistics = true
logisticsInfo = item.commodityUnitPrice.commodity.logistics
......@@ -558,7 +560,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
brand: item.commodityUnitPrice.commodity.brand.name,
commodityPic: item.commodityUnitPrice.commodity.mainPic,
attribute: item.commodityUnitPrice.attributeAndValueList,
stockCount: item.stockCount || 0
stockCount: item.stockCount || 0,
isMemberPrice: item.commodityUnitPrice.commodity.isMemberPrice ? 1 : 0
}
if (item.commodityUnitPrice.commodity.isMemberPrice) {
......@@ -582,7 +585,6 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
orderList: buyOrderlist
}]
}
buyOrderInfo.payWayList = await getPayWayListByMemberId(selectItem.memberId)
PublicApi.postOrderIsWorkFlow({ productIds, memberId: selectItem.memberId }).then(res => {
......
......@@ -47,4 +47,28 @@ export const useUnitPreview = (initValue, context) => {
context.setFieldValue('itemNo', initValue.itemNo)
}
}, [initValue])
}
// 高级筛选schema中用于输入搜索品牌的Effect
export const searchBrandOptionEffect = (context: any, fieldName: string) => {
context.getFieldState(fieldName, state => {
PublicApi.getProductSelectGetSelectBrand({ name: state.props['x-component-props'].searchValue }).then(res => {
context.setFieldState(fieldName, state => {
state.props['x-component-props'].dataoption = res.data
})
})
})
}
// 高级筛选schema中用于输入搜索商品品类的Effect
export const searchCustomerCategoryOptionEffect = (context: any, fieldName: string) => {
context.getFieldState(fieldName, state => {
PublicApi.getProductSelectGetSelectCustomerCategory({ name: state.props['x-component-props'].searchValue }).then(res => {
context.setFieldState(fieldName, state => {
state.props['x-component-props'].dataoption = res.data
})
})
})
}
\ No newline at end of file
......@@ -35,11 +35,25 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { repositSchema } from './schema';
import { PublicApi } from '@/services/api';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { searchBrandOptionEffect, searchCustomerCategoryOptionEffect } from './effects';
const formActions = createFormActions();
// 模拟请求
const fetchData = async (params: any) => {
console.log(params)
if(params?.category) {
formActions.getFieldState('category', state => {
let categorys = state.props['x-component-props'].dataoption
params.category = categorys.filter(i => i.id === params.category)[0].name
})
}
if(params?.brand) {
formActions.getFieldState('brand', state => {
let brands = state.props['x-component-props'].dataoption
params.brand = brands.filter(i => i.id === params.brand)[0].name
})
}
const res = await PublicApi.getWarehouseFreightSpaceList(params);
return res.data;
};
......@@ -190,6 +204,12 @@ const Repositories: React.FC<{}> = () => {
'name',
FORM_FILTER_PATH,
);
FormEffectHooks.onFieldChange$('brand').subscribe(state => {
searchBrandOptionEffect(actions, 'brand')
})
FormEffectHooks.onFieldChange$('category').subscribe(state => {
searchCustomerCategoryOptionEffect(actions, 'category')
})
}}
schema={repositSchema}
/>
......
......@@ -99,30 +99,60 @@ export const repositSchema: ISchema = padRequiredMessage({
placeholder: '商品名称'
}
},
category: {
brand: {
type: 'string',
"x-component": 'SearchSelect',
"x-component-props": {
fetchSearch: PublicApi.getProductSelectGetSelectCustomerCategory,
placeholder: '请选择品类',
style: {
width: 160,
}
'x-component': 'CustomInputSearch',
'x-component-props': {
placeholder: '商品品牌',
showSearch: true,
showArrow: true,
defaultActiveFirstOption: false,
filterOption: false,
notFoundContent: null,
style: { width: '160px' },
searchValue: null,
dataoption: [],
},
enum: []
},
brand: {
category: {
type: 'string',
"x-component": 'SearchSelect',
"x-component-props": {
fetchSearch: PublicApi.getProductSelectGetSelectBrand,
placeholder: '请选择品牌',
style: {
width: 160
}
'x-component': 'CustomInputSearch',
'x-component-props': {
placeholder: '商品品类',
showSearch: true,
showArrow: true,
defaultActiveFirstOption: false,
filterOption: false,
notFoundContent: null,
style: { width: '160px' },
searchValue: null,
dataoption: []
},
enum: []
},
// category: {
// type: 'string',
// "x-component": 'SearchSelect',
// "x-component-props": {
// fetchSearch: PublicApi.getProductSelectGetSelectCustomerCategory,
// placeholder: '请选择品类',
// style: {
// width: 160,
// }
// },
// enum: []
// },
// brand: {
// type: 'string',
// "x-component": 'SearchSelect',
// "x-component-props": {
// fetchSearch: PublicApi.getProductSelectGetSelectBrand,
// placeholder: '请选择品牌',
// style: {
// width: 160
// }
// },
// enum: []
// },
}
},
submit: {
......
......@@ -227,7 +227,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
}
const asyncGetMemberPrice = async (asyncData: any[]) => {
return await Promise.all(asyncData.filter(v => v.memberPrice === undefined).map(async v => {
return await Promise.all(asyncData.filter(v => v.memberPrice === undefined).map(async v => {
const {code, data} = await PublicApi.getMemberManageUpperCreditParamGet({
parentMemberId: v.memberId,
parentMemberRoleId: v.memberRoleId
......@@ -313,7 +313,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
dataIndex: 'memberPrice',
align: 'center',
key: 'memberPrice',
render: (text, record) => record.isMemberPrice ? (text + '%') : null
render: (text, record) => record.isMemberPrice ? (text * 100 + '%') : null
},
{
title: creditsCommodity ? '兑换数量' : '采购数量',
......
......@@ -85,6 +85,7 @@ const warehouseColumns: any[] = [
const modalPriceActions = createFormActions()
// 总计金额联动框
export const MoneyTotalBox = ({ dataSource, isEditData }) => {
const { reloadFormData } = useContext(OrderDetailContext)
const { orderProductRequests = [], receiverAddressId, freight, amount, orderModel } = dataSource || {}
const creditsCommodity = (orderModel === 24 || orderModel === 25) // 积分或渠道积分下单模式
......@@ -107,7 +108,11 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
useEffect(() => {
if(changeTotal){
// 执行修改订单运费
PublicApi.postOrderProductPriceUpdate({orderId: dataSource.id, price: freePrice, type: 2})
PublicApi.postOrderProductPriceUpdate({orderId: dataSource.id, price: freePrice, type: 2}).then(res => {
if(res.code === 1000) {
reloadFormData()
}
})
}
}, [amountMoney])
......@@ -291,7 +296,7 @@ const EditableCell: React.FC<EditableCellProps> = ({
};
const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
const { ctl, data } = useContext(OrderDetailContext)
const { ctl, data, reloadFormData } = useContext(OrderDetailContext)
const { page_type } = usePageStatus()
const { orderProductRequests = [], orderModel } = data || {}
const creditsCommodity = (orderModel === 24 || orderModel === 25) // 积分或渠道积分下单模式
......@@ -351,7 +356,11 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
...row,
});
// 执行修改订单价格
PublicApi.postOrderProductPriceUpdate({orderId: data.id, orderDetailsId: row.id, price: row.price, type: 1})
PublicApi.postOrderProductPriceUpdate({orderId: data.id, orderDetailsId: row.id, price: row.price, type: 1}).then(res => {
if(res.code === 1000) {
reloadFormData()
}
})
ctl.setData({
...data,
orderProductRequests: newData
......@@ -406,7 +415,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
dataIndex: 'memberPrice',
align: 'center',
key: 'memberPrice',
render: (text, record) => record.isMemberPrice ? (text + '%') : null
render: (text, record) => record.isMemberPrice ? (text * 100 + '%') : null
},
{
title: creditsCommodity ? '兑换数量' : '采购数量',
......@@ -485,6 +494,9 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
currentRef={warehouseRef}
confirm={() => setWarehouseVisible(false)}
fetchTableData={params => fetchWarehouseData(params)}
resetModal={{
destroyOnClose: true
}}
/>
</MellowCard>
)
......
......@@ -64,7 +64,7 @@ export const useSelfTable = () => {
},
{ title: '收货批次', align: 'center', dataIndex: 'shipmentBatch', key: 'shipmentBatch', render: text => text ? `第${text}次` : '' },
// @todo 收货单号跳转
{ title: '收货单号', align: 'center', dataIndex: 'invoiceNumber', key: 'invoiceNumber', render: text => <Link to={'/'}>{text}</Link> },
{ title: '入库单号', align: 'center', dataIndex: 'invoiceNumber', key: 'invoiceNumber', render: text => <Link to={'/'}>{text}</Link> },
{
title: '订单类型',
align: 'center',
......
......@@ -3,7 +3,7 @@ import { PublicApi } from '@/services/api'
import { FILTER_TYPE } from '@/constants'
interface FilterValueType {
key: string | string[] | number;
key: any;
title: string;
type: FILTER_TYPE;
}
......
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