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