Commit e3e0109f authored by GuanHua's avatar GuanHua

feat:进货单最小订购数

parent f6906685
...@@ -406,8 +406,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -406,8 +406,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
* 结算 * 结算
*/ */
const handleSettlement = async () => { const handleSettlement = async () => {
if (orderList.every(item => item.checkedList.length > 1)) {
if (orderList.every(item => item.checkedList.length > 0)) {
message.info("暂不支持多个供应商商品生成订单,请选择相同供应商的商品") message.info("暂不支持多个供应商商品生成订单,请选择相同供应商的商品")
return return
} else if (orderList.every(item => item.checkedList.length === 0)) { } else if (orderList.every(item => item.checkedList.length === 0)) {
...@@ -460,6 +459,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -460,6 +459,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
buyOrderInfo.payWayList = await getPayWayListByMemberId(selectItem.memberId) buyOrderInfo.payWayList = await getPayWayListByMemberId(selectItem.memberId)
PublicApi.postOrderIsWorkFlow({ productIds }).then(res => { PublicApi.postOrderIsWorkFlow({ productIds }).then(res => {
message.destroy()
setConfirmLoading(false) setConfirmLoading(false)
if (res.code === 1000) { if (res.code === 1000) {
let sessionKey = `${selectItem.id}${new Date().getTime()}` let sessionKey = `${selectItem.id}${new Date().getTime()}`
...@@ -577,7 +577,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -577,7 +577,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
} }
</div> </div>
<div className={cx(styles.order_list_item_item, styles.count)}> <div className={cx(styles.order_list_item_item, styles.count)}>
<InputNumber disabled={true} max={childItem.stockCount || 0} min={0} value={childItem.count} onChange={(value) => handleCountChange(value, childItem.id)} /> <InputNumber disabled={true} max={childItem.stockCount || 0} min={childItem.commodityUnitPrice.commodity.minOrder || 1} value={childItem.count} onChange={(value) => handleCountChange(value, childItem.id)} />
<div className={styles.stock}>(库存{numFormat(childItem.stockCount)}{childItem.commodityUnitPrice.commodity.unitName})</div> <div className={styles.stock}>(库存{numFormat(childItem.stockCount)}{childItem.commodityUnitPrice.commodity.unitName})</div>
</div> </div>
<div className={cx(styles.order_list_item_item, styles.amount)}> <div className={cx(styles.order_list_item_item, styles.amount)}>
......
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