Commit b1e3ed94 authored by Bill's avatar Bill

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

parents ce0ba6ce 3ff59317
...@@ -66,6 +66,7 @@ export interface IProductModule { ...@@ -66,6 +66,7 @@ export interface IProductModule {
areaOption: any[]; // 省市数据 areaOption: any[]; // 省市数据
currentPageInStore: IPage; currentPageInStore: IPage;
tabClickItem: any[]; tabClickItem: any[];
productPriceType: any;
setAttributeLists(lists: any[]): void; setAttributeLists(lists: any[]): void;
setProductName(name: string): void; setProductName(name: string): void;
...@@ -81,4 +82,5 @@ export interface IProductModule { ...@@ -81,4 +82,5 @@ export interface IProductModule {
setProductInfoByEdit(data: GetProductCommodityGetCommodityResponse): void; setProductInfoByEdit(data: GetProductCommodityGetCommodityResponse): void;
setCurrentPageInStore(data: IPage): void; setCurrentPageInStore(data: IPage): void;
setTabClickItem(data: any): void; setTabClickItem(data: any): void;
setProductPriceType(data: any): void;
} }
...@@ -36,8 +36,9 @@ const LogisticsForm: React.FC<Iprops> = (props) => { ...@@ -36,8 +36,9 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
const [deliveryType, setDeliveryType] = useState<number>(1) const [deliveryType, setDeliveryType] = useState<number>(1)
const [carriageType, setCarriageType] = useState<number>() const [carriageType, setCarriageType] = useState<number>()
const flagRef = useRef<boolean>(false) const flagRef = useRef<boolean>(false)
const [banCarriageType, setBanCarriageType] = useState(false)
const { productInfoByEdit, selectCategoryId } = ProductStore const { productInfoByEdit, selectCategoryId, productPriceType } = ProductStore
useEffect(()=>{ useEffect(()=>{
//传入ref给父级 //传入ref给父级
...@@ -75,12 +76,25 @@ const LogisticsForm: React.FC<Iprops> = (props) => { ...@@ -75,12 +76,25 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
} }
}, [selectCategoryId]) }, [selectCategoryId])
useEffect(() => {
console.log(productPriceType)
if(productPriceType === 3){
logisticsForm.setFieldsValue({carriageType: 1})
setCarriageType(1)
setBanCarriageType(true)
}else{
setBanCarriageType(false)
}
}, [productPriceType])
const changeDeliveryType = (e) => { const changeDeliveryType = (e) => {
console.log(e)
setDeliveryType(e.target.value) setDeliveryType(e.target.value)
setCarriageType(1) setCarriageType(1)
setIsTemplate(false) setIsTemplate(false)
logisticsForm.resetFields() logisticsForm.resetFields()
logisticsForm.setFieldsValue({deliveryType: e.target.value}) logisticsForm.setFieldsValue({deliveryType: e.target.value})
logisticsForm.setFieldsValue({carriageType: 1})
} }
const onChangeTemplate = (e) => { const onChangeTemplate = (e) => {
...@@ -126,7 +140,7 @@ const LogisticsForm: React.FC<Iprops> = (props) => { ...@@ -126,7 +140,7 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
}, },
]} ]}
> >
<Radio.Group onChange={(e)=>setCarriageType(e.target.value)}> <Radio.Group onChange={(e)=>setCarriageType(e.target.value)} disabled={banCarriageType}>
<Radio value={1}>卖家承担运费(默认)</Radio> <Radio value={1}>卖家承担运费(默认)</Radio>
<Radio value={2}>买家承担运费</Radio> <Radio value={2}>买家承担运费</Radio>
</Radio.Group> </Radio.Group>
......
...@@ -71,7 +71,8 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => { ...@@ -71,7 +71,8 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
getPriceAttributeFormParamsByEdit, getPriceAttributeFormParamsByEdit,
selectCategoryId, selectCategoryId,
productAttributeAndImageParams, productAttributeAndImageParams,
tabClickItem tabClickItem,
setProductPriceType
} = ProductStore } = ProductStore
// const memoizedValue = useMemo(() => { // const memoizedValue = useMemo(() => {
...@@ -466,8 +467,8 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => { ...@@ -466,8 +467,8 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
setPriceForm.resetFields() setPriceForm.resetFields()
setLadderPrice(false) setLadderPrice(false)
setPlanPrice(v.target.value) setPlanPrice(v.target.value)
setProductPriceType(v.target.value)
setIsChangePriceType(true) setIsChangePriceType(true)
console.log('价格类型变动')
} }
const setPriceOk = () => { const setPriceOk = () => {
......
...@@ -40,7 +40,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => { ...@@ -40,7 +40,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
message.error('请先勾选订单') message.error('请先勾选订单')
return ; return ;
} }
const canBitch = !rowSelectionCtl.selectRow.some(v => v.purchaseOrderInteriorState !== PurchaseOrderInsideWorkState.FILLING_ORDER) const canBitch = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.FILLING_ORDER)
if (canBitch) { if (canBitch) {
const { code } = await run({ids: rowSelectionCtl.selectedRowKeys}) const { code } = await run({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) { if (code === 1000) {
......
...@@ -17,6 +17,7 @@ class ProductStore implements IProductModule { ...@@ -17,6 +17,7 @@ class ProductStore implements IProductModule {
@observable public isAllAttributePic: boolean = true; // 是否所有属性共用 @observable public isAllAttributePic: boolean = true; // 是否所有属性共用
@observable public currentPageInStore: IPage = { current: null, pageSize: null }; // 页码相关 @observable public currentPageInStore: IPage = { current: null, pageSize: null }; // 页码相关
@observable public tabClickItem: any[] = []; // tab标签页点击项 @observable public tabClickItem: any[] = []; // tab标签页点击项
@observable public productPriceType: any = null; // 商品价格类型
/** 计算操作 **/ /** 计算操作 **/
// 加工接口返回的数据,用户编辑回显数据 // 加工接口返回的数据,用户编辑回显数据
...@@ -138,6 +139,7 @@ class ProductStore implements IProductModule { ...@@ -138,6 +139,7 @@ class ProductStore implements IProductModule {
this.attributeLists = []; this.attributeLists = [];
this.selectCategoryId = null; this.selectCategoryId = null;
this.selectBrandId = null; this.selectBrandId = null;
this.productPriceType = null;
} }
// 编辑时 品类变更 清空部分数据 // 编辑时 品类变更 清空部分数据
...@@ -199,6 +201,11 @@ class ProductStore implements IProductModule { ...@@ -199,6 +201,11 @@ class ProductStore implements IProductModule {
this.tabClickItem = data this.tabClickItem = data
} }
@action.bound
public setProductPriceType(data: any) {
this.productPriceType = data
}
} }
export default ProductStore export default ProductStore
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