Commit 7f6b7e88 authored by Bill's avatar Bill

Merge branch 'dev' of 10.0.0.22:lingxi/lingxi-business-paltform into dev

parents 57da2d8c 0e814124
......@@ -84,7 +84,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?id=${record.orderId}`}
url={`${target}/orderDetail?orderNo=${record.orderNo}`}
>
{text}
</EyePreview>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-09 17:53:45
* @LastEditTime: 2021-01-08 14:53:52
* @Description:
*/
import { ISchema } from '@formily/antd';
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-11 10:39:47
* @LastEditTime: 2021-01-08 14:53:34
* @Description:
*/
import { ISchema } from '@formily/antd';
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-09 17:53:45
* @LastEditTime: 2021-01-08 14:53:12
* @Description:
*/
import { ISchema } from '@formily/antd';
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-09 17:53:45
* @LastEditTime: 2021-01-08 14:52:55
* @Description:
*/
import { ISchema } from '@formily/antd';
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-09 17:53:45
* @LastEditTime: 2021-01-08 14:52:41
* @Description:
*/
import { ISchema } from '@formily/antd';
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-18 19:34:09
* @LastEditTime: 2021-01-08 14:52:16
* @Description:
*/
import { ISchema } from '@formily/antd';
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-18 17:51:42
* @LastEditTime: 2021-01-08 14:51:47
* @Description:
*/
import { ISchema } from '@formily/antd';
......
......@@ -54,6 +54,9 @@ export const listSearchSchema: ISchema = {
'x-component-props': {
placeholder: '申请单摘要',
allowClear: true,
style: {
width: 160,
},
},
},
supplierName: {
......@@ -61,6 +64,9 @@ export const listSearchSchema: ISchema = {
'x-component-props': {
placeholder: '供应会员',
allowClear: true,
style: {
width: 160,
},
},
},
'[startTime, endTime]': {
......@@ -69,6 +75,9 @@ export const listSearchSchema: ISchema = {
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
submit: {
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-18 17:11:22
* @LastEditTime: 2021-01-08 14:51:15
* @Description:
*/
import { ISchema } from '@formily/antd';
......
......@@ -153,7 +153,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?id=${record.orderId}`}
url={`${target}/orderDetail?orderNo=${record.orderNo}`}
>
{text}
</EyePreview>
......
......@@ -74,7 +74,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?id=${record.orderId}`}
url={`${target}/orderDetail?orderNo=${record.orderNo}`}
>
{text}
</EyePreview>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-05 14:34:48
* @LastEditTime: 2021-01-08 15:02:20
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -54,6 +54,9 @@ export const listSearchSchema: ISchema = {
'x-component-props': {
placeholder: '申请单摘要',
allowClear: true,
style: {
width: 160,
},
},
},
supplierName: {
......@@ -61,6 +64,9 @@ export const listSearchSchema: ISchema = {
'x-component-props': {
placeholder: '供应会员',
allowClear: true,
style: {
width: 160,
},
},
},
'[startTime, endTime]': {
......@@ -69,6 +75,9 @@ export const listSearchSchema: ISchema = {
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
submit: {
......
......@@ -74,7 +74,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?id=${record.orderId}`}
url={`${target}/orderDetail?orderNo=${record.orderNo}`}
>
{text}
</EyePreview>
......
......@@ -109,7 +109,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?id=${record.orderId}`}
url={`${target}/orderDetail?orderNo=${record.orderNo}`}
>
{text}
</EyePreview>
......
......@@ -54,6 +54,9 @@ export const listSearchSchema: ISchema = {
'x-component-props': {
placeholder: '申请单摘要',
allowClear: true,
style: {
width: 160,
},
},
},
supplierName: {
......@@ -61,6 +64,9 @@ export const listSearchSchema: ISchema = {
'x-component-props': {
placeholder: '供应会员',
allowClear: true,
style: {
width: 160,
},
},
},
'[startTime, endTime]': {
......@@ -69,6 +75,9 @@ export const listSearchSchema: ISchema = {
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
submit: {
......
......@@ -135,7 +135,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={`${target}/orderDetail?id=${record.orderId}`}
url={`${target}/orderDetail?orderNo=${record.orderNo}`}
>
{text}
</EyePreview>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-09 17:19:00
* @LastEditTime: 2021-01-08 15:04:26
* @Description:
*/
import { ISchema } from '@formily/antd';
......
......@@ -784,7 +784,7 @@ const CommodityDetail = (props) => {
*/
const setCurrentPriceRange = (uniPrice) => {
const initPriceRange = uniPrice
const tempPriceRange = []
let tempPriceRange = []
Object.keys(initPriceRange).forEach((key) => {
const keyArr = key.split('-')
const min = keyArr[0]
......@@ -796,6 +796,11 @@ const CommodityDetail = (props) => {
price: initPriceRange[key]
})
})
try {
tempPriceRange = tempPriceRange.sort((a, b) => a.price < b.price ? 1: -1)
} catch (error) {
console.log(error)
}
setCommodityPriceInfo(tempPriceRange)
}
......@@ -892,12 +897,12 @@ const CommodityDetail = (props) => {
const s1 = arg1.toString()
const s2 = arg2.toString()
try {
m += s1.split(".")[1].length;
m += s1.split(".")[1]? s1.split(".")[1].length : 0
} catch (e) {
console.log(e)
}
try {
m += s2.split(".")[1].length;
m += s2.split(".")[1] ? s2.split(".")[1].length : 0
} catch (e) {
console.log(e)
}
......@@ -905,16 +910,12 @@ const CommodityDetail = (props) => {
}
/**
* 获取金额区间中数量最大的区间
* 获取和购买数量相差最小的区间价格
*/
const getMaxCountRange = () => {
let maxItem: any = {}
for (const item of commodityPriceInfo) {
if (Number(item.max) > Number(maxItem.max || 0)) {
maxItem = item
}
}
return maxItem
const priceList = [...commodityPriceInfo]
const result = priceList.sort((a, b) => Math.abs(Number(b.max) - Number(buyCount)) < Math.abs(Number(a.min) - Number(buyCount)) ? 1 : -1 )
return result[0]
}
/**
......@@ -960,6 +961,23 @@ const CommodityDetail = (props) => {
return result
}
const checkItemInRang = (item) => {
if(Number(item.min) <= Number(buyCount) && Number(item.max) >= Number(buyCount)) {
return true
} else {
const temp = commodityPriceInfo.filter(item => {
return Number(buyCount) >= Number(item.min) && Number(buyCount) <= Number(item.max)
})
if(isEmpty(temp)) {
const nearItem = getMaxCountRange()
if(Number(nearItem.min) === Number(item.min)) {
return true
}
}
return false
}
}
return (
<Spin spinning={spinLoading}>
<div className={styles.commodity_detail}>
......@@ -980,7 +998,7 @@ const CommodityDetail = (props) => {
<span key={`product_info_tags_item_${index}`}>{item}{index !== commodityDetail?.sellingPoint.length - 1 ? ' ' : ''}</span>
))
}
</>
</>
)
}
</div>
......@@ -1000,7 +1018,7 @@ const CommodityDetail = (props) => {
<div className={styles.prompt_goods_price_list}>
{
selectCommodityId ? commodityPriceInfo && commodityPriceInfo.map((item, index) => (
<div className={cx(styles.prompt_goods_price_list_item, (commodityPriceInfo.length > 1 && Number(buyCount) >= item.min && Number(buyCount) <= item.max) ? styles.active : "")} key={`prompt_goods_price_list_item_${index}`}>
<div className={cx(styles.prompt_goods_price_list_item, (commodityPriceInfo.length > 1 && checkItemInRang(item)) ? styles.active : "")} key={`prompt_goods_price_list_item_${index}`}>
<div className={styles.price}>{priceFormat(item.price)}</div>
{
(commodityDetail?.isMemberPrice && (parameter || parameter === 0)) && <div className={styles.member_price}>{priceFormat(item.price * parameter)}</div>
......
......@@ -35,6 +35,7 @@ import {
MEMBER_ROLE_TYPE_SERVICE_PROVIDER,
} from '@/constants';
import StatusTag from '../components/StatusTag';
import LevelBrand from '../components/LevelBrand';
import { importSchema, auditModalSchema } from './schema';
import { coverColFiltersItem } from '../utils';
import { MEMBER_OUTER_STATUS_TYPE, MEMBER_STATUS_TAG_MAP } from '../constant';
......@@ -107,11 +108,16 @@ const MemberMaintain: React.FC<[]> = () => {
dataIndex: 'name',
align: 'center',
render: (text: any, record: any) => (
<EyePreview
url={`/memberCenter/memberAbility/manage/import/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<>
<EyePreview
url={`/memberCenter/memberAbility/manage/import/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<div>
<LevelBrand level={record.level} />
</div>
</>
),
},
{
......@@ -339,7 +345,7 @@ const MemberMaintain: React.FC<[]> = () => {
useStateFilterSearchLinkageEffect(
$,
actions,
'cond',
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
......
......@@ -24,11 +24,12 @@ export const importSchema: ISchema = {
children: '{{controllerBtns}}',
},
},
cond: {
name: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
tip: '输入 会员名称 进行搜索',
},
},
},
......@@ -49,6 +50,9 @@ export const importSchema: ISchema = {
'x-component-props': {
placeholder: '会员类型(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
roleId: {
......@@ -58,6 +62,9 @@ export const importSchema: ISchema = {
'x-component-props': {
placeholder: '会员角色(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
level: {
......@@ -67,6 +74,9 @@ export const importSchema: ISchema = {
'x-component-props': {
placeholder: '会员等级(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
source: {
......@@ -76,6 +86,9 @@ export const importSchema: ISchema = {
'x-component-props': {
placeholder: '申请来源(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
outerStatus: {
......@@ -85,6 +98,9 @@ export const importSchema: ISchema = {
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
innerStatus: {
......@@ -94,6 +110,9 @@ export const importSchema: ISchema = {
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
'[startDate, endDate]': {
......@@ -103,6 +122,9 @@ export const importSchema: ISchema = {
'x-component-props': {
placeholder: '时间范围(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
submit: {
......
......@@ -43,6 +43,9 @@ export const levelSchema: ISchema = {
'x-component-props': {
placeholder: '角色名称',
allowClear: true,
style: {
width: 160,
},
},
},
submit: {
......
......@@ -77,8 +77,7 @@ const MemberMaintain: React.FC<[]> = () => {
{text}
</EyePreview>
<div>
{/* <LevelBrand level={1} /> */}
{record.levelTag}
<LevelBrand level={record.level} />
</div>
</>
),
......
......@@ -15,6 +15,7 @@ export const maintianSchema: ISchema = {
'x-component-props': {
placeholder: '搜索',
align: 'flex-left',
tip: '输入 会员名称 进行搜索',
},
},
[FORM_FILTER_PATH]: {
......
......@@ -20,6 +20,7 @@ import {
} from '../constant';
import { coverColFiltersItem } from '../utils';
import StatusTag from '../components/StatusTag';
import LevelBrand from '../components/LevelBrand';
const { confirm } = Modal;
......@@ -45,11 +46,16 @@ const MemberPr1: React.FC<{}> = props => {
dataIndex: 'name',
align: 'center',
render: (text: any, record: any) => (
<EyePreview
url={`/memberCenter/memberAbility/manage/memberPr1/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<>
<EyePreview
url={`/memberCenter/memberAbility/manage/memberPr1/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<div>
<LevelBrand level={record.level} />
</div>
</>
),
},
{
......
......@@ -20,6 +20,7 @@ import {
} from '../constant';
import { coverColFiltersItem } from '../utils';
import StatusTag from '../components/StatusTag';
import LevelBrand from '../components/LevelBrand';
const { confirm } = Modal;
......@@ -45,11 +46,16 @@ const MemberPr2: React.FC<{}> = props => {
dataIndex: 'name',
align: 'center',
render: (text: any, record: any) => (
<EyePreview
url={`/memberCenter/memberAbility/manage/memberPr2/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<>
<EyePreview
url={`/memberCenter/memberAbility/manage/memberPr2/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<div>
<LevelBrand level={record.level} />
</div>
</>
),
},
{
......
......@@ -13,7 +13,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { PublicApi } from '@/services/api';
import { MEMBER_INNER_STATUS_FAILED } from '@/constants';
import { auditSchema } from '../schema/auditSchema';
import { auditSchema } from './schema';
import {
MEMBER_STATUS_TAG_MAP,
MEMBER_INNER_STATUS_BADGE_COLOR,
......@@ -21,6 +21,7 @@ import {
} from '../constant';
import { coverColFiltersItem } from '../utils';
import StatusTag from '../components/StatusTag';
import LevelBrand from '../components/LevelBrand';
const { confirm } = Modal;
......@@ -46,11 +47,16 @@ const MemberPrConfirm: React.FC<{}> = props => {
dataIndex: 'name',
align: 'center',
render: (text: any, record: any) => (
<EyePreview
url={`/memberCenter/memberAbility/manage/memberPrConfirm/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<>
<EyePreview
url={`/memberCenter/memberAbility/manage/memberPrConfirm/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<div>
<LevelBrand level={record.level} />
</div>
</>
),
},
{
......@@ -100,6 +106,8 @@ const MemberPrConfirm: React.FC<{}> = props => {
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color={MEMBER_INNER_STATUS_BADGE_COLOR[record.innerStatus]} text={text} />,
},
{
......@@ -192,6 +200,7 @@ const MemberPrConfirm: React.FC<{}> = props => {
roles = [],
levels = [],
sources = [],
innerStatus = [],
} = data;
const newColumns = columns.slice();
......@@ -202,6 +211,11 @@ const MemberPrConfirm: React.FC<{}> = props => {
'statusName',
status.map(item => ({ text: item.text, value: item.id })).filter(item => item.value !== 0),
);
coverColFiltersItem(
newColumns,
'innerStatusName',
innerStatus.map(item => ({ text: item.text, value: item.id })).filter(item => item.value !== 0),
);
setColumns(newColumns);
......@@ -211,6 +225,7 @@ const MemberPrConfirm: React.FC<{}> = props => {
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
level: levels.map(item => ({ label: item.levelTag, value: item.level })),
source: sources.map(item => ({ label: item.text, value: item.id })),
innerStatus: innerStatus.map(item => ({ label: item.text, value: item.id })).filter(item => item.value !== 0),
};
}
return {};
......@@ -249,7 +264,7 @@ const MemberPrConfirm: React.FC<{}> = props => {
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberTypeId', 'status', 'level', 'roleId', 'level', 'source'],
['memberTypeId', 'status', 'level', 'roleId', 'level', 'source', 'innerStatus'],
fetchSearchItems,
);
}}
......
/*
* @Author: XieZhiXiong
* @Date: 2021-01-08 16:27:19
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-08 16:35:11
* @Description:
*/
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
export const auditSchema: ISchema = {
type: 'object',
properties: {
MEGA_LAYOUT: {
type: 'object',
'x-component': 'mega-layout',
properties: {
topLayout: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
},
properties: {
ctl: {
type: 'object',
'x-component': 'Children',
'x-component-props': {
children: '{{controllerBtns}}',
},
},
name: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
tip: '输入 会员名称 进行搜索',
},
},
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
colStyle: {
marginLeft: 20,
},
},
properties: {
memberTypeId: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员类型(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
status: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员状态(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
roleId: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员角色(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
level: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员等级(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
source: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '申请来源(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
'[startDate, endDate]': {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '时间范围(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
\ No newline at end of file
......@@ -20,6 +20,7 @@ import {
} from '../constant';
import { coverColFiltersItem } from '../utils';
import StatusTag from '../components/StatusTag';
import LevelBrand from '../components/LevelBrand';
const { confirm } = Modal;
......@@ -45,11 +46,16 @@ const MemberPrSubmit: React.FC<{}> = props => {
dataIndex: 'name',
align: 'center',
render: (text: any, record: any) => (
<EyePreview
url={`/memberCenter/memberAbility/manage/memberPrSubmit/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<>
<EyePreview
url={`/memberCenter/memberAbility/manage/memberPrSubmit/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<div>
<LevelBrand level={record.level} />
</div>
</>
),
},
{
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-07 16:33:12
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-21 17:39:44
* @LastEditTime: 2021-01-08 14:24:08
* @Description:
*/
import { ISchema } from '@formily/antd';
......
......@@ -85,11 +85,16 @@ const MemberQuery: React.FC<{}> = () => {
dataIndex: 'name',
align: 'center',
render: (text, record) => (
<EyePreview
url={`/memberCenter/memberAbility/query/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<>
<EyePreview
url={`/memberCenter/memberAbility/query/detail?id=${record.memberId}&validateId=${record.validateId}`}
>
{text}
</EyePreview>
<div>
<LevelBrand level={record.level} />
</div>
</>
),
},
{
......
......@@ -28,6 +28,7 @@ export const maintianSchema: ISchema = {
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
tip: '输入 会员名称 进行搜索',
},
},
},
......@@ -48,6 +49,9 @@ export const maintianSchema: ISchema = {
'x-component-props': {
placeholder: '审核状态(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
'[startDate, endDate]': {
......@@ -57,6 +61,9 @@ export const maintianSchema: ISchema = {
'x-component-props': {
placeholder: '时间范围(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
submit: {
......
......@@ -27,6 +27,7 @@ export const auditSchema: ISchema = {
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
tip: '输入 会员名称 进行搜索',
},
},
},
......@@ -47,6 +48,9 @@ export const auditSchema: ISchema = {
'x-component-props': {
placeholder: '会员类型(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
status: {
......@@ -56,6 +60,9 @@ export const auditSchema: ISchema = {
'x-component-props': {
placeholder: '会员状态(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
roleId: {
......@@ -65,6 +72,9 @@ export const auditSchema: ISchema = {
'x-component-props': {
placeholder: '会员角色(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
level: {
......@@ -74,6 +84,9 @@ export const auditSchema: ISchema = {
'x-component-props': {
placeholder: '会员等级(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
source: {
......@@ -83,6 +96,9 @@ export const auditSchema: ISchema = {
'x-component-props': {
placeholder: '申请来源(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
'[startDate, endDate]': {
......@@ -92,6 +108,9 @@ export const auditSchema: ISchema = {
'x-component-props': {
placeholder: '时间范围(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
submit: {
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-02 13:47:58
* @LastEditTime: 2021-01-08 14:50:23
* @Description:
*/
import { ISchema } from '@formily/antd';
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-27 17:47:42
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-15 14:12:18
* @LastEditTime: 2021-01-08 14:49:50
* @Description:
*/
import { ISchema } from '@formily/antd';
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-02 14:00:09
* @LastEditTime: 2021-01-08 14:49:20
* @Description:
*/
import { ISchema } from '@formily/antd';
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-09-30 15:40:16
* @LastEditTime: 2021-01-08 14:48:37
* @Description:
*/
import { ISchema } from '@formily/antd';
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-27 17:47:42
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-04 10:26:01
* @LastEditTime: 2021-01-08 14:48:06
* @Description:
*/
import { ISchema } from '@formily/antd';
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-29 16:18:29
* @LastEditTime: 2021-01-08 14:47:30
* @Description:
*/
import { ISchema } from '@formily/antd';
......
......@@ -7,6 +7,7 @@ const AddBills: React.FC = () => {
invoicesTypeId, // 单据类型ID
relevanceInvoices, // 对应单据
relevanceInvoicesId, // 单据id,可能是待新增销售发货单,待新增采购入库单跳转过来的
source,
} = usePageStatus();
return (
......@@ -14,6 +15,7 @@ const AddBills: React.FC = () => {
invoicesTypeId={invoicesTypeId}
relevanceInvoices={relevanceInvoices}
relevanceInvoicesId={relevanceInvoicesId}
source={+source as (1 | 2)}
/>
);
};
......
......@@ -74,6 +74,11 @@ interface BillsFormProps {
* 单据id,可能是待新增销售发货单,待新增采购入库单跳转过来的
*/
relevanceInvoicesId: string;
/**
* 来源,跳转来源于 进销存新增 or 其他地方跳转过来的
* 1 进销存,2 单据
*/
source?: 1 | 2;
};
function transforDirection(type) {
......@@ -101,6 +106,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
invoicesTypeId,
relevanceInvoices,
relevanceInvoicesId,
source = 2,
}) => {
const [visible, setVisible] = useState(false);
const [productRowSelection, productRowCtl] = useRowSelectionTable({ type: 'checkbox' });
......@@ -834,6 +840,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
supplyMembersName: memberName,
supplyMembersId: membersId,
supplyMembersRoleId: membersRoleId,
source,
})
.then(res => {
if (res.code !== 1000) {
......@@ -943,6 +950,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
supplyMembersName: memberName,
supplyMembersId: membersId,
supplyMembersRoleId: membersRoleId,
source,
})
.then(res => {
if (res.code !== 1000) {
......@@ -1041,6 +1049,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
storageCount: productCount,
};
}),
source,
})
.then(res => {
if (res.code !== 1000) {
......@@ -1139,6 +1148,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
shipmentQuantity: productCount,
};
}),
source,
})
.then(res => {
if (res.code !== 1000) {
......@@ -1254,6 +1264,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
supplyMembersId: orderNo[0].supplyMembersId,
supplyMembersRoleId: orderNo[0].supplyMembersRoleId,
invoicesTypeId,
source,
})
.then(res => {
if (res.code !== 1000) {
......@@ -1364,6 +1375,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
supplyMembersId: orderNo[0].supplyMembersId,
supplyMembersRoleId: orderNo[0].supplyMembersRoleId,
invoicesTypeId,
source,
})
.then(res => {
if (res.code !== 1000) {
......@@ -1472,6 +1484,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
supplyMembersId: orderNo[0].supplyMembersId,
supplyMembersRoleId: orderNo[0].supplyMembersRoleId,
invoicesTypeId,
source,
})
.then(res => {
if (res.code !== 1000) {
......@@ -1580,6 +1593,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
supplyMembersId: orderNo[0].supplyMembersId,
supplyMembersRoleId: orderNo[0].supplyMembersRoleId,
invoicesTypeId,
source,
})
.then(res => {
if (res.code !== 1000) {
......@@ -1687,6 +1701,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
supplyMembersId: null,
supplyMembersRoleId: null,
invoicesTypeId,
source,
})
.then(res => {
if (res.code !== 1000) {
......
......@@ -238,7 +238,7 @@ const Bills: React.FC<{}> = () => {
dataIndex: 'actions',
align: 'center',
render: (_, record: any) => {
return (
return record.source === 1 ? (
<>
{record.state === DOC_STATUS_UNREVIEWED && (
<>
......@@ -263,7 +263,7 @@ const Bills: React.FC<{}> = () => {
<Button type="link" onClick={() => handleCounterclaim(record.id)}>反审</Button>
)}
</>
);
) : null;
},
},
];
......@@ -282,7 +282,7 @@ const Bills: React.FC<{}> = () => {
icon={<PlusOutlined />}
onClick={() =>
history.push(
'/memberCenter/tranactionAbility/stockSellStorage/bills/add',
'/memberCenter/tranactionAbility/stockSellStorage/bills/add?source=2',
)
}
>
......
......@@ -49,18 +49,27 @@ export const billsSchema: ISchema = {
type: 'string',
'x-component-props': {
placeholder: '单据摘要',
style: {
width: 160,
},
},
},
memberName: {
type: 'string',
'x-component-props': {
placeholder: '会员名称',
style: {
width: 160,
},
},
},
orderNo: {
type: 'string',
'x-component-props': {
placeholder: '订单号',
style: {
width: 160,
},
},
},
invoicesType: {
......@@ -68,6 +77,9 @@ export const billsSchema: ISchema = {
'x-component-props': {
placeholder: '单据类型',
allowClear: true,
style: {
width: 160,
},
},
enum: [],
},
......@@ -76,6 +88,9 @@ export const billsSchema: ISchema = {
'x-component-props': {
placeholder: '对应仓库',
allowClear: true,
style: {
width: 160,
},
},
enum: [],
},
......@@ -85,6 +100,9 @@ export const billsSchema: ISchema = {
'x-component-props': {
placeholder: '交易时间',
allowClear: true,
style: {
width: 160,
},
},
},
submit: {
......
......@@ -29,30 +29,45 @@ export const warehouseSchema: ISchema = {
type: 'string',
'x-component-props': {
placeholder: '单据号',
style: {
width: 160,
},
},
},
invoicesAbstract: {
type: 'string',
'x-component-props': {
placeholder: '单据摘要',
style: {
width: 160,
},
},
},
memberName: {
type: 'string',
'x-component-props': {
placeholder: '会员名称',
style: {
width: 160,
},
},
},
orderNo: {
type: 'string',
'x-component-props': {
placeholder: '订单号',
style: {
width: 160,
},
},
},
invoicesType: {
type: 'string',
'x-component-props': {
placeholder: '请选择单据类型',
style: {
width: 160,
},
},
enum: [],
},
......@@ -60,6 +75,9 @@ export const warehouseSchema: ISchema = {
type: 'string',
'x-component-props': {
placeholder: '请选择对应仓库',
style: {
width: 160,
},
},
enum: [],
},
......@@ -67,6 +85,9 @@ export const warehouseSchema: ISchema = {
type: 'string',
'x-component-props': {
placeholder: '请选择单据状态',
style: {
width: 160,
},
},
enum: [],
},
......@@ -74,6 +95,9 @@ export const warehouseSchema: ISchema = {
type: 'string',
'x-component-props': {
placeholder: '请选择交易时间',
style: {
width: 160,
},
},
enum: [],
},
......
This diff is collapsed.
This diff is collapsed.
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