✨ feat(ID1000804):销售单据调整数量、删除或新增面料;

This commit is contained in:
Haiyi
2023-01-12 10:30:31 +08:00
parent eb0d906415
commit 02f2cf2bd7
25 changed files with 3347 additions and 209 deletions
+1
View File
@@ -72,6 +72,7 @@ const AddressList = (props: Params, AddressListRef) => {
const { fetchData: selectFetch } = MpSaleOrderAddress()
const handleSelect = async(item: any, index: number) => {
if (router.params.orderId && router.params.orderId != '-100') {
console.log(router.params.orderId != '-100', 'ssss')
console.log(typeof (router.params.orderId) != 'undefined', 'router.params.orderId')
Taro.showLoading({
title: '请稍等...',
+26
View File
@@ -20,6 +20,7 @@ interface prosObj {
handApplyGoods?: () => void
handApplyMoney?: () => void
handShowCodeList?: () => void
handEdit?: () => void
showDetail?: boolean
goodsObj?: any
}
@@ -42,6 +43,7 @@ const BottomBtns = (props: prosObj, ref) => {
handApplyGoods,
handApplyMoney,
handShowCodeList,
handEdit,
showDetail = false,
goodsObj = {},
} = props
@@ -94,6 +96,7 @@ const BottomBtns = (props: prosObj, ref) => {
|| (obj.sale_mode === 2 && obj.status === 2)
|| (obj.sale_mode === 2 && obj.status === 7)
|| (obj.sale_mode === 1 && obj.status === 10)
|| (obj.sale_mode === 1 && obj.status === 7)
|| (obj.sale_mode === 2 && obj.status === 10)
) {
return true
@@ -158,6 +161,16 @@ const BottomBtns = (props: prosObj, ref) => {
else { return false }
}, [obj])
// 判断是否显示修改订单
const showEdit = useMemo(() => {
if (obj.status == 0 || obj.status == 1) {
return true
}
else {
return false
}
}, [obj])
// 多的不显示别的按钮
const [btnList, setbtnList] = useState<any[]>([])
const itemNums = useMemo(() => {
@@ -233,6 +246,16 @@ const BottomBtns = (props: prosObj, ref) => {
sort: 2,
})
}
if (showEdit) {
nums = nums + 1
console.log('101010')
arr.push({
key: 'showEdit',
label: '修改订单',
bgKind: 3,
sort: 9,
})
}
console.log(arr, 'arr')
const fiterArr = arr.sort((a, b) => a.sort - b.sort)
setbtnList([...fiterArr])
@@ -266,6 +289,9 @@ const BottomBtns = (props: prosObj, ref) => {
if (key === 'canBuy') {
toPay?.(e)
}
if (key === 'showEdit') {
handEdit?.()
}
}
return (