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

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

parents 46ce0f8b c11dbaa0
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-21 16:10:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-07 16:49:23
* @LastEditTime: 2021-07-08 10:05:03
* @Description: 会员分类信息
*/
import React, { useState } from 'react';
......@@ -83,7 +83,8 @@ const MemberDocCategory: React.FC<IProps> = (props: IProps) => {
} = props;
const [visibleDrawer, setVisibleDrawer] = useState(false);
const [classifyInfo, setClassifyInfo] = useState<FormValueType & { partnerTypes: PartnerTypesItem[] }>();
const [classifyInfo, setClassifyInfo] = useState<FormValueType>();
const [partnerTypes, setPartnerTypes] = useState<PartnerTypesItem[]>([]);
const [infoLoading, setInfoLoading] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
......@@ -111,8 +112,11 @@ const MemberDocCategory: React.FC<IProps> = (props: IProps) => {
taxPoint: +taxPoint,
...rest
})),
partnerTypes: res.data.partnerTypes,
});
setPartnerTypes(res.data.partnerTypes.map((item) => ({
value: item.id,
label: item.text,
})));
handleVisibleDrawer(true);
}
}).finally(() => {
......@@ -212,7 +216,7 @@ const MemberDocCategory: React.FC<IProps> = (props: IProps) => {
onClose={() => handleVisibleDrawer(false)}
onSubmit={handleSubmit}
submitLoading={submitLoading}
partnerTypes={classifyInfo?.partnerTypes}
partnerTypes={partnerTypes}
value={classifyInfo}
/>
</>
......
......@@ -2,4 +2,5 @@
.description {
color: @text-color-secondary;
margin-bottom: @margin-md;
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-07-07 15:21:00
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-07 18:12:33
* @LastEditTime: 2021-07-08 09:59:57
* @Description: 修改入库分类信息 抽屉
*/
import React, { useEffect } from 'react';
......@@ -173,6 +173,9 @@ interface IProps {
* 合作关系
*/
partnerTypes: PartnerTypesItem[],
/**
* 值
*/
value: FormValueType,
/**
* 确认按钮 loading
......@@ -193,6 +196,7 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
onSubmit,
onClose,
partnerTypes,
value,
submitLoading,
} = props;
......@@ -310,6 +314,7 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
>
<NiceForm
previewPlaceholder="' '"
initialValues={value}
components={{
ArrayCards,
CascaderFormItem,
......
......@@ -136,7 +136,7 @@ export const MEMBER_OUTER_COLUMNS: EditableColumns[] = [
dataIndex: 'outerStatusName',
align: 'center',
render: (text, record) => (
<StatusTag type={MEMBER_INNER_STATUS_BADGE_COLOR[record.outerStatus]} title={text} />
<StatusTag type={MEMBER_OUTER_STATUS_TYPE[record.outerStatus]} title={text} />
),
},
{
......
......@@ -95,9 +95,6 @@ const MemberMaintain: React.FC<[]> = () => {
filters: [],
align: 'center',
onFilter: (value, record) => record.status === value,
render: (text, record) => (
<StatusTag type={MEMBER_STATUS_TAG_MAP[record.status]} title={text} />
),
},
{
title: '外部状态',
......
......@@ -2,4 +2,5 @@
.description {
color: @text-color-secondary;
margin-bottom: @margin-md;
}
\ No newline at end of file
......@@ -28,7 +28,7 @@ type CategoriesType = {
/**
* 品类名称
*/
name: string,
names: string[],
/**
* 付款周期(天)
*/
......@@ -224,7 +224,7 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
if (onSubmit) {
const { maxAmount, categories, ...rest } = values;
const formated = categories.map((item) => ({
name: item.category.join('-'),
names: item.category,
paymentDay: +item.paymentDay,
invoiceTypeName: item.invoiceTypeName,
taxPoint: +item.taxPoint,
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-25 14:36:14
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-18 17:15:48
* @LastEditTime: 2021-07-08 11:46:29
* @Description: 入库分类
*/
import React, { useState, useEffect } from 'react';
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-24 17:47:32
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-06 17:43:13
* @LastEditTime: 2021-07-08 11:03:50
* @Description: 审核Form抽屉
*/
import React, { useEffect } from 'react';
......@@ -187,10 +187,9 @@ const VerifyComingDataDrawer: React.FC<IProps> = (props: IProps) => {
}
const {
channelLevel,
channelTypeId,
} = channelValue;
if (channelTypeId && !channelLevel) {
if (channelLevel !== undefined && !channelLevel) {
formActions.setFieldState('INVESTIGATE_INFO', state => {
FormPath.setIn(state, 'visible', false);
});
......
......@@ -63,6 +63,8 @@ const AddForm = () => {
basicInfo.offerEndTime = params.offerEndTime;
basicInfo.createTime = params.createTime;
basicInfo.externalState = params.externalState;
basicInfo.interiorStateName = params.interiorStateName;
basicInfo.externalStateName = params.externalStateName;
basicInfo.interiorState = params.interiorState;
offerInfo.id = params.id;
if (path === 'edit') {
......
......@@ -166,13 +166,13 @@ const BasicInfo: React.FC<IProps> = (props: any) => {
label='外部状态'
name='externalState'
>
{fetchdata && <Tag color={OFFTER_EXTERNALSTATE_COLOR[fetchdata.externalState]}>{OFFTER_EXTERNALSTATE[fetchdata.externalState]}</Tag>}
{fetchdata && <Tag color={OFFTER_EXTERNALSTATE_COLOR[fetchdata.externalState]}>{fetchdata.externalStateName}</Tag>}
</Form.Item>
<Form.Item
label='内部状态'
name='interiorState'
>
{fetchdata && <Badge status={OFFTER_INTERNALSTATE_COLOR[fetchdata.interiorState]} text={OFFTER_INTERNALSTATE[fetchdata.interiorState]} />}
{fetchdata && <Badge status={OFFTER_INTERNALSTATE_COLOR[fetchdata.interiorState]} text={fetchdata.interiorStateName} />}
</Form.Item>
</Form>
......
......@@ -128,6 +128,7 @@ const OfferInfo: React.FC<IProps> = (props: any) => {
name={`isTax${index}`}
style={{ margin: 0 }}
rules={[{ required: true, message: '请选择' }]}
initialValue={text}
>
<Select
style={{ width: 100 }}
......@@ -223,7 +224,7 @@ const OfferInfo: React.FC<IProps> = (props: any) => {
console.log(params, 123)
params.forEach((it: any, i: number) => {
form.setFieldsValue({
['isTax' + i]: it.isTax ? it.isTax : 1,
['isTax' + i]: (it.isTax || it.isTax === 0) ? it.isTax : 1,
['taxProbability' + i]: it.taxProbability,
['taxUnitPrice' + i]: it.taxUnitPrice
})
......@@ -299,7 +300,7 @@ const OfferInfo: React.FC<IProps> = (props: any) => {
detailss.push({
purchaseInquiryDetailsId: name === 'quote' ? item.id : item.purchaseInquiryDetailsId,
taxUnitPrice: item.taxUnitPrice,
isTax: item.isTax ? item.isTax : 1,
isTax: (item.isTax || item.isTax === 0) ? item.isTax : 1,
taxProbability: item.taxProbability,
productName: item.productName,
productId: item.productId,
......
......@@ -78,11 +78,7 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
// 根据站点获取商城信息
const fetchAllShop = () => {
const param: any = {
siteId,
type: 3
}
PublicApi.getManageShopFindShopsBySiteId(param).then(res => {
PublicApi.getManageShopFindByDoorType({doorType: '3'}).then(res => {
if (res.code === 1000) {
setAllMallList(res.data)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment