Commit 608bc8bf authored by Bill's avatar Bill

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

parents 0db4cce4 4a4cd802
......@@ -20,7 +20,7 @@ import {
GetAsReplaceGoodsGetDetailByConsumerResponse,
GetAsReplaceGoodsPageReturnedGoodsResponse,
} from '@/services/AfterServiceApi';
import { CREDIT_INNER_STATUS, CREDIT_OUTER_STATUS, CREDIT_STATUS } from '@/constants';
import { EXCHANGE_OUTER_STATUS_FINISHED } from '@/constants';
import { normalizeFiledata, FileData, findLastIndexFlowState } from '@/utils';
import AvatarWrap from '@/components/AvatarWrap';
import StatusTag from '@/components/StatusTag';
......@@ -317,14 +317,14 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<Row
gutter={24}
>
<Col span={detailInfo && detailInfo.evaluate ? 6 : 8}>
<Col span={detailInfo && detailInfo.outerStatus === EXCHANGE_OUTER_STATUS_FINISHED ? 6 : 8}>
{/* 相关不良原因举证附件 */}
<Suspense fallback={null}>
<FileList fileList={detailInfo?.fileList} />
</Suspense>
</Col>
<Col span={detailInfo && detailInfo.evaluate ? 6 : 8}>
<Col span={detailInfo && detailInfo.outerStatus === EXCHANGE_OUTER_STATUS_FINISHED ? 6 : 8}>
{/* 退货收货地址 */}
<Suspense fallback={null}>
<ReturnAddressInfo
......@@ -346,7 +346,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
</Suspense>
</Col>
<Col span={detailInfo && detailInfo.evaluate ? 6 : 8}>
<Col span={detailInfo && detailInfo.outerStatus === EXCHANGE_OUTER_STATUS_FINISHED ? 6 : 8}>
{/* 换货收货地址 */}
<Suspense fallback={null}>
<ExchangeAddressInfo
......@@ -368,7 +368,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
</Suspense>
</Col>
{detailInfo && detailInfo.evaluate && (
{detailInfo && detailInfo.outerStatus === EXCHANGE_OUTER_STATUS_FINISHED && (
<Col span={6}>
{/* 售后评价 */}
<Suspense fallback={null}>
......
......@@ -15,17 +15,15 @@ const ExchangePrConfirmBackVerify: React.FC = () => {
return;
}
setSubmitLoading(true);
// PublicApi.postPayCreditHandleVerifyStepOne({
// applyId: id,
// isPass: values.agree,
// opinion: values.reason,
// }).then(res => {
// if (res.code === 1000) {
// history.goBack();
// }
// }).finally(() => {
// setSubmitLoading(false);
// });
PublicApi.postAsReplaceGoodsConfirmAllReturnGoodsReceipt({
dataId: id,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
}).finally(() => {
setSubmitLoading(false);
});
};
return (
......
......@@ -17,17 +17,15 @@ const ExchangePrDeliverVerify: React.FC = () => {
return;
}
setSubmitLoading(true);
// PublicApi.postPayCreditHandleVerifyStepOne({
// applyId: id,
// isPass: values.agree,
// opinion: values.reason,
// }).then(res => {
// if (res.code === 1000) {
// history.goBack();
// }
// }).finally(() => {
// setSubmitLoading(false);
// });
PublicApi.postAsReplaceGoodsConfirmReturnDeliveryGoods({
dataId: id,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
}).finally(() => {
setSubmitLoading(false);
});
};
const handleVisible = flag => {
......
......@@ -23,17 +23,17 @@ const ExchangePrFinishedDetailVerify: React.FC = () => {
if (!id) {
return;
}
// setConfirmLoading(true);
// PublicApi.postAsExchangeGoodsConfirmComplete({
// repairId: id,
// evaluate: values,
// }).then(res => {
// if (res.code === 1000) {
// history.goBack();
// }
// }).finally(() => {
// setConfirmLoading(false);
// });
setConfirmLoading(true);
PublicApi.postAsReplaceGoodsConfirmComplete({
replaceId: id,
evaluate: values,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
}).finally(() => {
setConfirmLoading(false);
});
};
return (
......
......@@ -17,17 +17,15 @@ const ExchangePrReceivedVerify: React.FC = () => {
return;
}
setSubmitLoading(true);
// PublicApi.postPayCreditHandleVerifyStepOne({
// applyId: id,
// isPass: values.agree,
// opinion: values.reason,
// }).then(res => {
// if (res.code === 1000) {
// history.goBack();
// }
// }).finally(() => {
// setSubmitLoading(false);
// });
PublicApi.postAsReplaceGoodsConfirmReplaceReceiveGoods({
dataId: id,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
}).finally(() => {
setSubmitLoading(false);
});
};
const handleVisible = flag => {
......
......@@ -20,6 +20,7 @@ import {
GetAsReplaceGoodsGetDetailBySupplierResponse,
GetAsReplaceGoodsPageReturnedGoodsResponse,
} from '@/services/AfterServiceApi';
import { EXCHANGE_OUTER_STATUS_FINISHED } from '@/constants';
import { normalizeFiledata, FileData, findLastIndexFlowState } from '@/utils';
import AvatarWrap from '@/components/AvatarWrap';
import StatusTag from '@/components/StatusTag';
......@@ -362,14 +363,14 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<Row
gutter={24}
>
<Col span={detailInfo && detailInfo.evaluate ? 6 : 8}>
<Col span={detailInfo && detailInfo.outerStatus === EXCHANGE_OUTER_STATUS_FINISHED ? 6 : 8}>
{/* 相关不良原因举证附件 */}
<Suspense fallback={null}>
<FileList fileList={detailInfo?.fileList} />
</Suspense>
</Col>
<Col span={detailInfo && detailInfo.evaluate ? 6 : 8}>
<Col span={detailInfo && detailInfo.outerStatus === EXCHANGE_OUTER_STATUS_FINISHED ? 6 : 8}>
{/* 退货收货地址 */}
<Suspense fallback={null}>
<ReturnAddressInfo
......@@ -391,7 +392,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
</Suspense>
</Col>
<Col span={detailInfo && detailInfo.evaluate ? 6 : 8}>
<Col span={detailInfo && detailInfo.outerStatus === EXCHANGE_OUTER_STATUS_FINISHED ? 6 : 8}>
{/* 换货收货地址 */}
<Suspense fallback={null}>
<ExchangeAddressInfo
......@@ -413,7 +414,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
</Suspense>
</Col>
{detailInfo && detailInfo.evaluate && (
{detailInfo && detailInfo.outerStatus === EXCHANGE_OUTER_STATUS_FINISHED && (
<Col span={6}>
{/* 售后评价 */}
<Suspense fallback={null}>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-25 16:29:06
* @LastEditTime: 2020-11-25 17:25:55
* @Description: 联动逻辑相关
*/
import { Modal } from 'antd';
......@@ -314,7 +314,7 @@ const getParams = type => {
},
tableProps: {
rowKey: 'orderNo',
lableKey: '',
lableKey: 'orderNo',
},
};
......@@ -325,7 +325,6 @@ const getParams = type => {
basicParams.columns = purchaseOrderColumns;
basicParams.fetchTableData = fetchOrderPurchaseReceiptAddList;
basicParams.formilyProps.ctx.schema = purchaseOrderBillSchema;
basicParams.tableProps.lableKey = 'orderNo';
break;
}
......@@ -335,7 +334,6 @@ const getParams = type => {
basicParams.columns = salesOrderColumns;
basicParams.fetchTableData = getOrderSalesInvoiceOrderList;
basicParams.formilyProps.ctx.schema = purchaseOrderBillSchema; // 这里用同一个 schema 是因为接口参数名是一样的,后台做了处理
basicParams.tableProps.lableKey = 'orderNo';
break;
}
......@@ -345,7 +343,6 @@ const getParams = type => {
basicParams.columns = machiningWarehousingColumns;
basicParams.fetchTableData = getMachiningWarehousingList;
basicParams.formilyProps.ctx.schema = machiningWarehousingBillSchema;
basicParams.tableProps.lableKey = 'noticeNo';
break;
}
......@@ -355,7 +352,6 @@ const getParams = type => {
basicParams.columns = machiningDeliveryColumns;
basicParams.fetchTableData = getMachiningDeliveryList;
basicParams.formilyProps.ctx.schema = machiningDeliveryBillSchema;
basicParams.tableProps.lableKey = 'noticeNo';
break;
}
......
......@@ -97,28 +97,6 @@ const BillsForm: React.FC<BillsFormProps> = ({
},
]
// 获取品牌
const fetchBrand = async () => {
const res = await PublicApi.getProductSelectGetSelectBrand({
name: '',
});
if (res.code === 1000) {
return res.data;
}
return [];
}
// 获取会员品类
const fetchCustomerCategory = async () => {
const res = await PublicApi.getProductSelectGetSelectCustomerCategory({
name: '',
});
if (res.code === 1000) {
return res.data;
}
return [];
}
// 获取单据详情
const getBillInfo = () => {
if (!id) {
......@@ -660,6 +638,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
produceNoticeOrderDetailId: extraData.id,
orderNo: extraData.orderNo,
processNum: extraData.processNum,
productName: extraData.productName,
storageCount: productCount,
};
}),
......@@ -709,6 +688,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
produceNoticeOrderDetailId: extraData.id,
orderNo: extraData.orderNo,
processNum: extraData.processNum,
productName: extraData.productName,
shipmentQuantity: productCount,
};
}),
......@@ -902,8 +882,6 @@ const BillsForm: React.FC<BillsFormProps> = ({
'name',
FORM_FILTER_PATH,
);
useAsyncSelect('brandId', fetchBrand, ['name', 'id']);
useAsyncSelect('customerCategoryId', fetchCustomerCategory, ['name', 'id']);
},
inline: false,
}
......
......@@ -18,6 +18,7 @@ import {
DEPENDENT_DOC_INTERNAL,
} from '@/constants';
import { PATTERN_MAPS } from '@/constants/regExp';
import { PublicApi } from '@/services/api';
const orderDetailSchema: ISchema = {
type: 'object',
......@@ -777,18 +778,25 @@ export const goodsSearchSchema: ISchema = {
},
},
customerCategoryId: {
type: 'string',
type: 'string',
'x-component': 'SearchSelect',
'x-component-props': {
placeholder: '品类',
allowClear: true,
fetchSearch: PublicApi.getProductSelectGetSelectCustomerCategory,
style: {
width: '100%',
}
},
},
brandId: {
type: 'string',
enum: [],
'x-component': 'SearchSelect',
'x-component-props': {
placeholder: '品牌',
allowClear: true,
fetchSearch: PublicApi.getProductSelectGetSelectBrand,
style: {
width: '100%',
}
},
},
submit: {
......
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