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