diff --git a/src/components/goodsItem/index.module.scss b/src/components/goodsItem/index.module.scss index 0dab70c..3403373 100644 --- a/src/components/goodsItem/index.module.scss +++ b/src/components/goodsItem/index.module.scss @@ -37,7 +37,6 @@ width: 260px; height: 30px; font-size: 24px; - font-family: PingFangSC-Regular, PingFang SC; font-weight: 400; color: #000000; margin-bottom: 16px; @@ -48,10 +47,16 @@ .productNums { font-size: 24px; - font-family: PingFangSC-Regular, PingFang SC; font-weight: 400; color: #000000; } + + .productName { + font-size: 24px; + font-weight: 400; + color: #000000; + height: 40px; + } } .rightFontsbox { @@ -59,7 +64,6 @@ display: flex; justify-content: flex-end; font-size: 28px; - font-family: PingFangSC-Medium, PingFang SC; font-weight: 500; color: #F41A39; margin-bottom: 14px; @@ -94,7 +98,6 @@ align-items: center; justify-content: center; font-size: 24px; - font-family: PingFangSC-Regular, PingFang SC; font-weight: 400; color: #000000; text-align: center; diff --git a/src/components/goodsItem/index.tsx b/src/components/goodsItem/index.tsx index c8d4ea8..2f1bd17 100644 --- a/src/components/goodsItem/index.tsx +++ b/src/components/goodsItem/index.tsx @@ -20,7 +20,8 @@ interface props { name?: string, roll?: number | string, buyNums?: number | string, - id?: number + id?: number, + weight_error?: number | string }, goodList?: any[], onBlur?: (a: any, c: any) => void @@ -68,8 +69,8 @@ export default memo((props: props) => { {props.value?.code} {props.value?.name} - {/* 0681# 26S全棉平纹 */} - 剩:{props.value?.roll}件 + 剩:{props.value?.roll}件 + 空差:{props?.value?.weight_error as number / 1000}Kg ¥{props?.modeFont === 0 ? Number(props.value?.bulk_price) / 100 : props.modeFont === 1 ? Number(props.value?.length_cut_price) / 100 : Number(props.value?.weight_cut_price) / 100}{props.modeFont != 1 ? '/Kg' : '/m'} diff --git a/src/pages/addCollection/index.module.scss b/src/pages/addCollection/index.module.scss index a5d674c..6dffd07 100644 --- a/src/pages/addCollection/index.module.scss +++ b/src/pages/addCollection/index.module.scss @@ -1,19 +1,17 @@ .addBox { - height: 556px; margin: 24px; - padding: 0px 32px 40px 32px; + padding: 0px 32px 0px 32px; background: #FFFFFF; - border-radius: 16px 16px 0px 0px; + border-radius: 16px; transition: 0.3s; } .activeBox { transition: 0.3s; - height: 1000px; margin: 24px; - padding: 0px 32px 40px 32px; + padding: 0px 32px 0px 32px; background: #FFFFFF; - border-radius: 16px 16px 0px 0px; + border-radius: 16px; } .textAreaBox { @@ -106,7 +104,7 @@ } .openBox { - height: 82px; + // height: 82px; display: flex; align-items: center; justify-content: center; diff --git a/src/pages/customerEditor/index.tsx b/src/pages/customerEditor/index.tsx index 3c7ea6c..0618bc4 100644 --- a/src/pages/customerEditor/index.tsx +++ b/src/pages/customerEditor/index.tsx @@ -11,15 +11,21 @@ import Form from "./components/form" import Remark from '../orderDetails/components/remark'; import Address from "@/components/address" import { mppurchaser, mppurchaserpost, mppurchaserput } from '@/api/customer' +type AddressParms = { + id: number, + name: string +} export default () => { + const router = useRouter() const [infoObj, setinfoObj] = useState() const [formData, setformData] = useState() + const [addressArr, setaddressArr] = useState([]) useEffect(() => { if (router.params.type === 'edit') { getInfo() @@ -86,6 +92,13 @@ export default () => { district_id: res.data?.district_id }) setremarkDesc(res.data?.remark) + let arr: any[] = [] + arr = [ + { id: res.data.province_id, name: res.data.province_name }, + { id: res.data.city_id, name: res.data.city_name }, + { id: res.data.district_id, name: res.data.district_name } + ] + setaddressArr([...arr]) Taro.hideLoading() } @@ -324,7 +337,7 @@ export default () => { setShowDesc(false)}> getRemark(e)} defaultValue={infoObj?.remark} showInput={showDesc ? true : false} /> -
handleSetSite(val)} defaultValue={[infoObj?.province_id, infoObj?.city_id, infoObj?.district_id]} addressOnClose={() => onClose()} show={showSiteModal} /> +
handleSetSite(val)} defaultValue={addressArr} addressOnClose={() => onClose()} show={showSiteModal} /> diff --git a/src/pages/customerManagement/components/ItemList/index.tsx b/src/pages/customerManagement/components/ItemList/index.tsx index f278839..abd7ce9 100644 --- a/src/pages/customerManagement/components/ItemList/index.tsx +++ b/src/pages/customerManagement/components/ItemList/index.tsx @@ -7,7 +7,8 @@ import { alert } from '@/common/common' import { formatPriceDiv, formatDateTime, formatWeightDiv } from '@/common/format' import IconFont from '@/components/iconfont/iconfont' interface Props { - obj: any + obj: any, + sortId: number | string } export default memo((props: Props) => { @@ -25,6 +26,21 @@ export default memo((props: Props) => { }) } + const time = useMemo(() => { + if (props?.sortId == '') { + return props?.obj?.recent_order_time + } + if (props?.sortId == 1 || props?.sortId == -1) { + return props?.obj?.recent_order_time + } + if (props?.sortId == 2 || props?.sortId == -2) { + return props?.obj?.create_time + } + if (props?.sortId == 3 || props?.sortId == -3) { + return props?.obj?.update_time + } + }, [props?.sortId]) + return ( handNav()}> @@ -59,7 +75,7 @@ export default memo((props: Props) => { {props.obj.default_address.province_name + props.obj.default_address.city_name + props.obj.default_address.district_name || '暂无'} - 更新时间:{formatDateTime(props.obj.recent_order_time) || '暂无'} + 更新时间:{formatDateTime(time) || '暂无'} ) diff --git a/src/pages/customerManagement/components/tabs/index.module.scss b/src/pages/customerManagement/components/tabs/index.module.scss index 5fdb765..5a9bf05 100644 --- a/src/pages/customerManagement/components/tabs/index.module.scss +++ b/src/pages/customerManagement/components/tabs/index.module.scss @@ -32,14 +32,14 @@ .itemFont { font-size: 28px; font-family: Microsoft YaHei, Microsoft YaHei-Bold; - font-weight: 700; + font-weight: 400; color: #000000; } .activeItems { font-size: 28px; font-family: Microsoft YaHei, Microsoft YaHei-Regular; - font-weight: 400; + font-weight: 700; color: #337FFF; } diff --git a/src/pages/customerManagement/index.tsx b/src/pages/customerManagement/index.tsx index 352890b..5db1f57 100644 --- a/src/pages/customerManagement/index.tsx +++ b/src/pages/customerManagement/index.tsx @@ -87,9 +87,11 @@ export default () => { } //选择排序 + const sortRefRef = useRef() const handSort = useCallback((e: string) => { pageNum.current.page = 1 setSearchField((val) => ({ ...val, size: 10, abstract_sort_key: e })) + sortRefRef.current = e }, []) const SortRef = useRef() @@ -153,7 +155,7 @@ export default () => { selfOnRefresherRefresh={getRefresherRefresh}> {orderData?.list?.map((item, index) => { return ( - + ) })} diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index aa40a81..f84db0c 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -96,7 +96,8 @@ export default () => { modeId: 0, goodsId: null, code_or_name: '', - physical_warehouse: onj.physical_warehouse + physical_warehouse: onj.physical_warehouse, + purchaser_id: -1, }) //选择的类型 @@ -122,14 +123,14 @@ export default () => { const [goodObj, setGoodsobj] = useState({}) //点击对应商品显示购物车 const showCart = async (item) => { - setSearchObj((e) => ({ ...e, goodsId: item.id })) + setSearchObj((e) => ({ ...e, goodsId: item.id, purchaser_id: clientObj?.clientId })) setShowShopCart(true) setGoodsobj(item) ShopCartRef.current.SearchRef.current.clearInput() } const getGoodList = async () => { - const res = await colorlistFetch({ product_id: search.goodsId, sale_mode: search.modeId, code_or_name: search.code_or_name, physical_warehouse: 1 }) + const res = await colorlistFetch({ product_id: search.goodsId, sale_mode: search.modeId, code_or_name: search.code_or_name, physical_warehouse: search?.physical_warehouse, purchaser_id: clientObj?.clientId }) res.data.list.map((item) => { item.showInput = false if (search.modeId == 0) { @@ -309,6 +310,7 @@ export default () => { clientId: currPage.data?.clientId, clientName: currPage.data?.clientName, }) + setSearchObj((val) => ({ ...val, purchaser_id: currPage.data?.clientId })) } //默认客户 if (currPage.data?.clientId == null) { diff --git a/src/pages/order/index.module.scss b/src/pages/order/index.module.scss index 7e9da40..ae2a12b 100644 --- a/src/pages/order/index.module.scss +++ b/src/pages/order/index.module.scss @@ -191,7 +191,7 @@ } .bottomBox { - width: 100%; + // width: 100%; // width: 750px; height: 160px; background: #FFFFFF; diff --git a/src/pages/searchPage/index.tsx b/src/pages/searchPage/index.tsx index 873ff4b..e546655 100644 --- a/src/pages/searchPage/index.tsx +++ b/src/pages/searchPage/index.tsx @@ -54,6 +54,7 @@ export default memo(() => { clientId: currPage.data?.clientId, clientName: currPage.data?.clientName, }) + setSearchObj((val) => ({ ...val, purchaser_id: currPage.data?.clientId })) } //默认客户 if (currPage.data?.clientId == null) { @@ -73,7 +74,8 @@ export default memo(() => { modeId: 0, goodsId: null, code_or_name: '', - physical_warehouse: onj.physical_warehouse + physical_warehouse: onj.physical_warehouse, + purchaser_id: -1 }) const [showShopCart, setShowShopCart] = useState(false) @@ -88,7 +90,7 @@ export default memo(() => { //获取商品 const { fetchData: colorlistFetch } = mpproductcolorlist() const getGoodList = async () => { - const res = await colorlistFetch({ product_id: search.goodsId, sale_mode: search.modeId, code_or_name: search.code_or_name, physical_warehouse: 1 }) + const res = await colorlistFetch({ product_id: search.goodsId, sale_mode: search.modeId, code_or_name: search.code_or_name, physical_warehouse: search?.physical_warehouse, purchaser_id: clientObj?.clientId }) res.data.list.map((item) => { item.showInput = false if (search.modeId == 0) { @@ -178,7 +180,7 @@ export default memo(() => { const ShopCartRef = useRef() //点击对应商品显示购物车 const showCart = async (item) => { - setSearchObj((e) => ({ ...e, goodsId: item.id })) + setSearchObj((e) => ({ ...e, goodsId: item.id, purchaser_id: clientObj?.clientId })) setShowShopCart(true) setGoodsobj(item) ShopCartRef.current.SearchRef.current.clearInput()