✨ feat:根据客户传递id接口获得商品价格
This commit is contained in:
@@ -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<any>()
|
||||
//点击对应商品显示购物车
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user