Commit 76efb002 authored by Bill's avatar Bill

Merge branch 'dev' of 10.0.0.22:lingxi/lingxi-business-paltform into dev

parents 26920268 337db0fd
...@@ -332,7 +332,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -332,7 +332,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<Suspense fallback={null}> <Suspense fallback={null}>
<ProductList <ProductList
title="换货商品" title="换货商品"
rowKey="orderRecordId" rowKey="detailId"
columns={productColumns} columns={productColumns}
loading={replaceGoodsLoading} loading={replaceGoodsLoading}
dataSource={replaceGoodsList.data} dataSource={replaceGoodsList.data}
......
...@@ -299,6 +299,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({ ...@@ -299,6 +299,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
replaceId: id || 0, replaceId: id || 0,
supplierMemberId: supplierMember[0].memberId, supplierMemberId: supplierMember[0].memberId,
supplierRoleId: supplierMember[0].roleId, supplierRoleId: supplierMember[0].roleId,
supplierMemberName: supplierMember[0].name,
replaceGoodsAddress: { replaceGoodsAddress: {
receiveAddress: deliveryAddress.fullAddress || '', receiveAddress: deliveryAddress.fullAddress || '',
receiveUserName: deliveryAddress.receiverName || '', receiveUserName: deliveryAddress.receiverName || '',
...@@ -422,6 +423,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({ ...@@ -422,6 +423,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
unit: item.costPrice, unit: item.costPrice,
purchaseCount: item.purchaseCount, purchaseCount: item.purchaseCount,
purchasePrice: item.price, purchasePrice: item.price,
purchaseAmount: +(item.price * item.purchaseCount).toFixed(2),
replacedCount: item.replaceCount || item.purchaseCount || 0, // 已换货数量 replacedCount: item.replaceCount || item.purchaseCount || 0, // 已换货数量
replaceReason: '', replaceReason: '',
}; };
......
...@@ -265,7 +265,7 @@ export const addBillSchema: ISchema = { ...@@ -265,7 +265,7 @@ export const addBillSchema: ISchema = {
title: '采购单价', title: '采购单价',
'x-component': 'Text', 'x-component': 'Text',
}, },
costPrice3: { purchaseAmount: {
type: 'string', type: 'string',
title: '采购金额', title: '采购金额',
'x-component': 'Text', 'x-component': 'Text',
......
...@@ -227,6 +227,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -227,6 +227,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
}; };
const handleReturnAddressSubmit = values => { const handleReturnAddressSubmit = values => {
console.log('values', values)
setReturnAddress(values); setReturnAddress(values);
}; };
...@@ -381,7 +382,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -381,7 +382,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<Suspense fallback={null}> <Suspense fallback={null}>
<ProductList <ProductList
title="换货商品" title="换货商品"
rowKey="orderRecordId" rowKey="detailId"
columns={productColumns} columns={productColumns}
loading={replaceGoodsLoading} loading={replaceGoodsLoading}
dataSource={replaceGoodsList.data} dataSource={replaceGoodsList.data}
......
...@@ -396,8 +396,10 @@ const CommodityDetail = (props) => { ...@@ -396,8 +396,10 @@ const CommodityDetail = (props) => {
const directParam: any = { const directParam: any = {
productId: selectCommodityId, productId: selectCommodityId,
memberId, memberId,
shopId shopId: storeId,
memberRoleId: commodityDetail.memberRoleId
} }
PublicApi.postOrderDirectPayment(directParam).then(res => { PublicApi.postOrderDirectPayment(directParam).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
message.destroy() message.destroy()
...@@ -513,6 +515,8 @@ const CommodityDetail = (props) => { ...@@ -513,6 +515,8 @@ const CommodityDetail = (props) => {
const param: any = { const param: any = {
productId: selectCommodityId, productId: selectCommodityId,
memberId, memberId,
shopId: storeId,
memberRoleId: commodityDetail.memberRoleId
} }
PublicApi.postOrderDirectPayment(param).then(res => { PublicApi.postOrderDirectPayment(param).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
......
...@@ -287,7 +287,6 @@ const Order: React.FC<OrderPropsType> = (props) => { ...@@ -287,7 +287,6 @@ const Order: React.FC<OrderPropsType> = (props) => {
const params: any = { const params: any = {
orderModel: getOrderMode(), // 下单模式 orderModel: getOrderMode(), // 下单模式
needTheInvoice: needTheInvoice ? 1 : 0, needTheInvoice: needTheInvoice ? 1 : 0,
memberRoleId: userInfo.memberRoleId,
shopId: storeId shopId: storeId
} }
......
...@@ -393,7 +393,6 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -393,7 +393,6 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
* @param ids * @param ids
*/ */
const deleteListItems = (ids: number[]) => { const deleteListItems = (ids: number[]) => {
console.log(ids, "ids")
const newOrderList = JSON.parse(JSON.stringify(orderList)) const newOrderList = JSON.parse(JSON.stringify(orderList))
const result = [] const result = []
for (const item of newOrderList) { for (const item of newOrderList) {
...@@ -600,14 +599,16 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -600,14 +599,16 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
productIds, productIds,
memberId: selectItem.memberId, memberId: selectItem.memberId,
shopId: storeId, shopId: storeId,
memberRoleId: userInfo.memberRoleId memberRoleId: selectItem.memberRoleId,
} }
PublicApi.postOrderIsWorkFlow(param).then(res => { PublicApi.postOrderIsWorkFlow(param).then(res => {
setConfirmLoading(false) setConfirmLoading(false)
if (res.code === 1000) { if (res.code === 1000) {
message.destroy() message.destroy()
PublicApi.postOrderDirectPayment({ productId: productIds[0], memberId: selectItem.memberId }).then(res => { param.productId = productIds[0]
param.productIds = undefined
PublicApi.postOrderDirectPayment(param).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
message.destroy() message.destroy()
const sessionKey = `${selectItem.id}${new Date().getTime()}` const sessionKey = `${selectItem.id}${new Date().getTime()}`
......
...@@ -113,7 +113,6 @@ ...@@ -113,7 +113,6 @@
&-main { &-main {
position: relative; position: relative;
width: 328px; width: 328px;
height: 38px;
padding-bottom: 8px; padding-bottom: 8px;
&::after { &::after {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47 * @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-03 15:40:31 * @LastEditTime: 2020-12-04 16:59:25
* @Description: 联动逻辑相关 * @Description: 联动逻辑相关
*/ */
import { Modal } from 'antd'; import { Modal } from 'antd';
...@@ -488,6 +488,20 @@ export const useBusinessEffects = (context, actions) => { ...@@ -488,6 +488,20 @@ export const useBusinessEffects = (context, actions) => {
linkage.componentProps('orderNo', params); linkage.componentProps('orderNo', params);
}); });
// 根据 单据类型 联动 对应单据所选项
context('requestAsyncSelect').subscribe(fieldState => {
if (fieldState.name === 'invoicesTypeId') {
const invoicesTypeIdState = getFieldState('invoicesTypeId');
if (invoicesTypeIdState.value) {
const current = invoicesTypeIdState.originAsyncData.find(item => item.id === invoicesTypeIdState.value);
if (current) {
linkage.value('invoicesTypeCode', current.number);
}
};
}
});
// 对应仓库改变 // 对应仓库改变
onFieldInputChange$('inventoryId').subscribe(fieldState => { onFieldInputChange$('inventoryId').subscribe(fieldState => {
const current = fieldState.originAsyncData.find(item => item.id === fieldState.value); const current = fieldState.originAsyncData.find(item => item.id === fieldState.value);
......
...@@ -665,6 +665,7 @@ const BillsForm: React.FC<BillsFormProps> = ({ ...@@ -665,6 +665,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
id, id,
orderNo, orderNo,
deliveryType, deliveryType,
goodsCount,
...extraRest ...extraRest
}, },
itemName, itemName,
...@@ -677,6 +678,7 @@ const BillsForm: React.FC<BillsFormProps> = ({ ...@@ -677,6 +678,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
...extraRest, ...extraRest,
goodsName: itemName, goodsName: itemName,
storageCount: productCount, storageCount: productCount,
productCount: goodsCount,
}; };
}), }),
supplyMembersName: memberName, supplyMembersName: memberName,
...@@ -709,6 +711,7 @@ const BillsForm: React.FC<BillsFormProps> = ({ ...@@ -709,6 +711,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
id, id,
orderNo, orderNo,
deliveryType, deliveryType,
goodsCount,
...extraRest ...extraRest
}, },
itemName, itemName,
...@@ -721,6 +724,7 @@ const BillsForm: React.FC<BillsFormProps> = ({ ...@@ -721,6 +724,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
...extraRest, ...extraRest,
goodsName: itemName, goodsName: itemName,
storageCount: productCount, storageCount: productCount,
productCount: goodsCount,
}; };
}), }),
}) })
...@@ -756,6 +760,7 @@ const BillsForm: React.FC<BillsFormProps> = ({ ...@@ -756,6 +760,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
id, id,
orderNo, orderNo,
deliveryType, deliveryType,
goodsCount,
...extraRest ...extraRest
}, },
itemName, itemName,
...@@ -768,6 +773,7 @@ const BillsForm: React.FC<BillsFormProps> = ({ ...@@ -768,6 +773,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
...extraRest, ...extraRest,
goodsName: itemName, goodsName: itemName,
shipmentQuantity: productCount, shipmentQuantity: productCount,
productCount: goodsCount,
}; };
}), }),
createMemberName: memberName, createMemberName: memberName,
...@@ -800,6 +806,7 @@ const BillsForm: React.FC<BillsFormProps> = ({ ...@@ -800,6 +806,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
id, id,
orderNo, orderNo,
deliveryType, deliveryType,
goodsCount,
...extraRest ...extraRest
}, },
itemName, itemName,
...@@ -812,6 +819,7 @@ const BillsForm: React.FC<BillsFormProps> = ({ ...@@ -812,6 +819,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
...extraRest, ...extraRest,
goodsName: itemName, goodsName: itemName,
shipmentQuantity: productCount, shipmentQuantity: productCount,
productCount: goodsCount,
}; };
}), }),
}) })
......
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