Commit afd98953 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 处理合并代码异常

parent bdff5100
......@@ -20,6 +20,7 @@ import { useLocalStore, observer } from 'mobx-react'
import { store } from '@/store'
import { CommodityType } from './constant';
import { getProductCommodityGetCommodity, getProductCustomerGetCustomerCategoryById, postProductCommodityApplyCheckCommodity, postProductCommoditySaveOrUpdateCommodity } from '@/services/ProductV2Api';
import { getTemplateWebPageTemplateWebFindGoodsDescribeTemplate } from '@/services/TemplateV2Api';
const { TabPane } = Tabs
......@@ -132,7 +133,6 @@ const AddProducts: React.FC<{}> = (props) => {
// 获取页面使用模板
const productDescriptionTemplate = async () => {
//@ts-ignore
getTemplateWebPageTemplateWebFindGoodsDescribeTemplate({ siteId }).then(res => {
if (res.code === 1000)
setCurrentTemplateName(res.data?.fileName)
......
......@@ -30,7 +30,7 @@ import { priceTypeLabel, productStatusColor, productStatusLabel } from './consta
import EyePreview from '@/components/EyePreview'
import UpperProductModalTable from './components/upperProductModalTable'
import { Item } from '@/components/ButtonTabs'
import { getProductCommodityGetCommodityList, getProductCommodityGetShop, GetProductCommodityGetShopResponse, postProductCommodityApplyCheckCommodity, postProductCommodityCopyCommodity, postProductCommodityGetShopBatch, postProductCommodityOffPublishCommodity, postProductCommodityOffPublishCommodityBatch, postProductCommodityPublishCommodity, postProductCommodityPublishCommodityBatch } from '@/services/ProductV2Api'
import { getProductCommodityGetCommodityList, getProductCommodityGetShop, GetProductCommodityGetShopResponse, postProductCommodityApplyCheckCommodity, postProductCommodityCopyCommodity, postProductCommodityDeleteBatchCommodity, postProductCommodityGetShopBatch, postProductCommodityOffPublishCommodity, postProductCommodityOffPublishCommodityBatch, postProductCommodityPublishCommodity, postProductCommodityPublishCommodityBatch } from '@/services/ProductV2Api'
import { getTemplateWebMemberShopWebFindCurrMemberShop } from '@/services/TemplateV2Api'
const { confirm } = Modal;
......@@ -528,7 +528,6 @@ const Products: React.FC<{}> = () => {
title: '确定要执行批量删除操作?',
icon: <ExclamationCircleOutlined />,
onOk() {
//@ts-ignore
postProductCommodityDeleteBatchCommodity({idList: ids}).then(res => {
if(res.code === 1000)
ref.current.reload()
......@@ -542,7 +541,6 @@ const Products: React.FC<{}> = () => {
cancelText: '取消'
})
}else{
//@ts-ignore
postProductCommodityDeleteBatchCommodity({idList: ids}).then(res => {
if(res.code === 1000)
ref.current.reload()
......
......@@ -69,35 +69,119 @@
}
}
// :global {
// span.ant-radio + * {
// display: block;
// width: 100%;
// }
// .ant-radio-wrapper {
// display: flex;
// width: 100%;
// align-items: center;
// height: 72px;
// background-color: #fafafa;
// margin: 10px;
// padding-left: 16px;
// }
// .ant-radio-wrapper.ant-radio-wrapper-checked {
// border: 1px solid @main-color;
// &::after {
// content: '';
// position: absolute;
// width: 0;
// height: 0;
// border-bottom: 12px solid @main-color;
// border-left: 12px solid transparent;
// bottom: 0;
// right: 0;
// z-index: 5;
// }
// }
// }
// 发票抽屉
.raido_group {
position: relative;
display: block;
width: 100%;
.list_radio {
border: 1px solid #FFF;
}
.invoice_list {
position: relative;
// display: flex;
margin: 0 -10px;
// flex-wrap: wrap;
.invoice_list_item {
display: flex;
align-items: center;
&_content {
padding-left: 10px;
&_tag {
display: inline-block;
background-color: #909399;
padding: 0 6px;
height: 16px;
line-height: 16px;
color: #FFF;
font-size: 12px;
&.special {
background-color: #5377CE;
}
}
&_name {
display: flex;
align-items: center;
.default {
width: 64px;
height: 16px;
line-height: 16px;
text-align: center;
background: rgba(238, 238, 238, 1);
font-size: 12px;
color: #606266;
}
&>span {
margin-right: 20px;
}
}
}
&_btn_group {
display: flex;
margin-left: auto;
line-height: 14px;
// height: 14px;
.invoice_list_item_btn {
margin: 0 10px;
}
}
}
.select_style_border {
border: 1px solid #EEF0F3;
// display: flex;
// align-items: center;
// justify-content: space-between;
// padding: 8px 14px;
// flex: 1;
// cursor: pointer;
// line-height: 28px;
// position:relative;
}
:global {
span.ant-radio+* {
display: block;
width: 100%;
}
.ant-radio-wrapper {
display: flex;
width: 100%;
align-items: center;
height: 72px;
background-color: #FAFAFA;
// margin: 10px;
padding-left: 16px;
}
.ant-radio-wrapper.ant-radio-wrapper-checked {
border: 1px solid @main-color;
&::after {
content: '';
position: absolute;
width: 0;
height: 0;
border-bottom: 12px solid @main-color;
border-left: 12px solid transparent;
bottom: 0;
right: 0;
z-index: 5;
}
}
}
}
}
......@@ -106,11 +106,19 @@ export const useProductTableChangeForPay = (ctx: ISchemaFormActions | ISchemaFor
})
}
export interface JumpFormValueType {
shopId: number;
vendorMemberId: number;
vendorRoleId: number;
}
// 异步处理发货 预约时间 时间段配置
export const useOrderDeliverTimeEffect = async (ctx: ISchemaFormActions | ISchemaFormAsyncActions, shopId) => {
export const useOrderDeliverTimeEffect = async (ctx: ISchemaFormActions | ISchemaFormAsyncActions, shopId, jumpFormValue?: JumpFormValueType) => {
if(shopId) {
const vendorMemberId = ctx.getFieldValue('vendorMemberId')
const vendorRoleId = ctx.getFieldValue('vendorRoleId')
// const vendorMemberId = ctx.getFieldValue('vendorMemberId')
// const vendorRoleId = ctx.getFieldValue('vendorRoleId')
const { vendorMemberId, vendorRoleId } = jumpFormValue
const { code, data } = await getOrderBuyerFindDeliveryDate({shopId, vendorMemberId, vendorRoleId})
if(code !== 1000) { return false; }
......
......@@ -87,7 +87,8 @@ const SelectProcesss = (props: ISchemaFieldComponentProps) => {
const renderProcessType = (v: any) => {
return <Tag color={ProcessTagColor[v.processType - 1]}>
{ProcessTagType[v.processType - 1]}
{/* {ProcessTagType[v.processType - 1]} */}
{v.processTypeName}
</Tag>
}
......
......@@ -3,18 +3,20 @@
.record {
padding: 0;
margin: 0;
&-header {
background: #FAFBFC;
}
&-item {
padding: 14px 16px;
line-height: 14px;
display: flex;
align-items: center;
background: #FAFBFC;
// background: #FAFBFC;
color: #303133;
&-good {
width: 25%;
&-name {
line-height: 14px;
margin-bottom: 13px;
......@@ -35,8 +37,6 @@
}
&-extra {
width: 20%;
&-item {
display: flex;
align-items: center;
......@@ -60,8 +60,6 @@
}
&-comment {
width: 40%;
&-main {
margin-top: 6px;
line-height: 14px;
......@@ -71,13 +69,18 @@
}
}
&-header {
background: #FAFBFC;
}
&-actions {
flex: 1;
text-align: center;
}
&:not(:last-child) {
margin-bottom: 16px;
// margin-bottom: 16px;
border-bottom: 1px solid #EDEEEF;
}
}
}
\ No newline at end of file
}
import { getLogisticsReceiverAddressAgentPage } from "@/services/LogisticsV2Api"
import { getMemberManageAllPageByordertype, getMemberManageOrderAgentMembers } from "@/services/MemberV2Api"
import { getOrderVendorGetOrderMode, postOrderVendorCreateAgentPaymentFind } from "@/services/OrderNewV2Api"
import { getProductCommodityCommonGetCommodityListByBuyer } from "@/services/ProductV2Api"
import { getProductCommodityCommonGetCommodityListByGuest } from "@/services/ProductV2Api"
import { getSettleAccountsAgentInvoiceMessageList } from "@/services/SettleV2Api"
import { getTransactionEnquiryProductAll, getTransactionProductQuotationList } from "@/services/TransactionV2Api"
export const fetchOrderApi = {
/** 弹窗获取商品列表 */
async getProductList(params) {
const { data } = await getProductCommodityCommonGetCommodityListByBuyer(params)
const { data } = await getProductCommodityCommonGetCommodityListByGuest(params)
return data
},
......
......@@ -139,12 +139,13 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => {
const fetchProductList = (values) => {
const modelType = schemaAction.getFieldValue('orderMode')
const supplyMembersId = schemaAction.getFieldValue('vendorMemberId')
const buyerMembersId = schemaAction.getFieldValue('buyerMemberId')
const shopId = schemaAction.getFieldValue('shopId')
const params = {
...values,
shopType: orderProductShopTypeMaps[modelType],
environment: 1,
memberId: supplyMembersId,
memberId: buyerMembersId,
priceTypeList: [1],
shopId: schemaAction.getFieldValue('shopId')
}
......
......@@ -120,18 +120,18 @@ export const baseOrderListColumns: any = () => {
key: 'amount',
render: (t, r) => (r.orderType === ORDER_TYPE_POINTS || r.orderType === ORDER_TYPE_CHANNEL_POINTS) ? t : `¥${t}`
},
// {
// title: '订单类型',
// dataIndex: 'orderTypeName',
// key: 'orderTypeName',
// },
{
title: '送货地址',
dataIndex: 'deliverAddress',
key: 'deliverAddress',
width: 164,
ellipsis: true,
title: '订单类型',
dataIndex: 'orderTypeName',
key: 'orderTypeName',
},
// {
// title: '送货地址',
// dataIndex: 'deliverAddress',
// key: 'deliverAddress',
// width: 164,
// ellipsis: true,
// },
{
title: '转单订单号',
dataIndex: 'relationNo',
......
......@@ -82,6 +82,10 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
history.push(`/memberCenter/tranactionAbility/supplierEvaluation/unevaluated`)
}
const handleModifyPrice = (record) => {
history.push(`${history.location.pathname}/preview?id=${record.orderId}&modifyPrice=true`)
}
const handleCancel = (r) => {
destoryRef.current.setVisible(true)
destroyActions.setFieldValue('id', r.orderId)
......@@ -179,13 +183,20 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
/** 参照后台数据生成 */
const renderOptionButton = (record) => {
const buttonGroup = { '取消订单': record.showCancel, '中止': record.showTerminate, '评价': record.showComment, '转单': record.showTransfer }
const buttonGroup = {
'取消订单': record.showCancel,
'中止': record.showTerminate,
'评价': record.showComment,
'转单': record.showTransfer,
'修改订单价格': record.showModifyPrice,
}
const operationHandler = {
'取消订单': () => handleCancel(record),
'中止': () => handleSuspend(record),
'评价': () => handleEvaluate(),
'转单': () => onlyTransform(record.orderId),
'修改订单价格': () => handleModifyPrice(record)
}
return (
......
......@@ -5,14 +5,26 @@ import OrderDetailWrapper from '@/pages/transaction/components/orderDetailWrappe
import PreLoading from '@/components/PreLoading';
import { useOrderDetail } from '../../_public/order/effects/useOrderDetail';
import OrderDetailSection from '../../components/orderDetailSection';
import { Button } from 'antd';
import { history } from 'umi'
import { usePageStatus } from '@/hooks/usePageStatus';
const OrderPreview: React.FC = () => {
const { formContext, detailList } = useOrderDetail({type: 'saleOrder'})
const { modifyPrice = false } = usePageStatus() // 修改单价页面
const handleClick = () => {
history.goBack()
}
return (
<div>
<OrderDetailContext.Provider value={formContext}>
<OrderDetailHeader detailList={detailList} detailData={formContext.data}/>
<OrderDetailHeader detailList={detailList} detailData={formContext.data} extraRight={
modifyPrice && <Button type='primary' onClick={handleClick}>
提交
</Button>
} />
<OrderDetailWrapper>
<PreLoading loading={!formContext.data} active paragraph={{rows: 6}}>
......
......@@ -37,14 +37,14 @@ interface ReceivedSearch {
};
interface EstimateSumItems {
id?: number,
id?: number,
title?: JSX.Element,
star?: number,
last7days?: number,
last30days?: number,
last180days?: number,
before180days?: number,
sum?: number,
star?: number,
last7days?: number,
last30days?: number,
last180days?: number,
before180days?: number,
sum?: number,
};
interface AnalysisProps {
......@@ -52,7 +52,7 @@ interface AnalysisProps {
};
const Analysis: React.FC<AnalysisProps> = ({
EvaluationStore,
EvaluationStore,
}) => {
const [evaluateSum, setEvaluateSum] = useState([]);
const [evaluatePie, setEvaluatePie] = useState([]);
......@@ -75,8 +75,8 @@ const Analysis: React.FC<AnalysisProps> = ({
title: (<Mood type="smile" />),
},
{
id: 2,
title: (<Mood type="notBad" />),
id: 2,
title: (<Mood type="notBad" />),
},
{
id: 3,
......@@ -90,7 +90,7 @@ const Analysis: React.FC<AnalysisProps> = ({
let target = null;
switch (item.star) {
case 1:
case 1:
case 2: {
target = ret[2];
break;
......@@ -101,12 +101,12 @@ const Analysis: React.FC<AnalysisProps> = ({
break;
}
case 4:
case 4:
case 5: {
target = ret[0];
break;
}
default:
break;
}
......@@ -144,16 +144,16 @@ const Analysis: React.FC<AnalysisProps> = ({
const ret = [
{
x: `好评 ${count > 0 ? (good / count * 100).toFixed(2) : '0'}%`,
y: good,
x: `好评 ${count > 0 ? (good / count * 100).toFixed(2) : '0'}%`,
y: good,
},
{
x: `中评 ${count > 0 ? (notBad / count * 100).toFixed(2) : 0}%`,
y: notBad,
x: `中评 ${count > 0 ? (notBad / count * 100).toFixed(2) : 0}%`,
y: notBad,
},
{
x: `差评 ${count > 0 ? (bad / count * 100).toFixed(2) : 0}%`,
y: bad,
x: `差评 ${count > 0 ? (bad / count * 100).toFixed(2) : 0}%`,
y: bad,
},
];
......@@ -179,8 +179,8 @@ const Analysis: React.FC<AnalysisProps> = ({
const { star, ...rest } = params;
return new Promise((resolve, reject) => {
getMemberCommentSupplyCountTradeHistoryPage({
...rest,
starLevel: params.star,
...rest,
starLevel: params.star,
}).then(res => {
if (res.code === 1000) {
const { data, totalCount } = res.data;
......@@ -198,7 +198,7 @@ const Analysis: React.FC<AnalysisProps> = ({
dealTime: item.dealTime as string,
};
}),
totalCount,
totalCount,
});
}
reject(res.data);
......@@ -212,7 +212,7 @@ const Analysis: React.FC<AnalysisProps> = ({
const getReceivedList = (params: ListParams): Promise<RecordRes> => {
return new Promise((resolve, reject) => {
getMemberCommentSupplyReceiveTradeHistoryPage({
...params,
...params,
}).then(res => {
if (res.code === 1000) {
const { data, totalCount } = res.data;
......@@ -229,9 +229,10 @@ const Analysis: React.FC<AnalysisProps> = ({
orderId: item.orderId,
replyStatus: item.replyStatus,
dealTime: item.dealTime as string,
status: item.status,
};
}),
totalCount,
totalCount,
});
}
reject(res.data);
......@@ -240,14 +241,14 @@ const Analysis: React.FC<AnalysisProps> = ({
});
});
};
// 获取发出的评价列表
const getSentList = (params: ListParams): Promise<RecordRes> => {
const { memberName, ...rest } = params;
return new Promise((resolve, reject) => {
getMemberCommentSupplySendTradeHistoryPage({
...rest,
subMemberName: memberName,
subMemberName: memberName,
}).then(res => {
if (res.code === 1000) {
const { data, totalCount } = res.data;
......@@ -265,7 +266,7 @@ const Analysis: React.FC<AnalysisProps> = ({
dealTime: item.dealTime as string,
};
}),
totalCount,
totalCount,
});
}
reject(res.data);
......@@ -310,11 +311,11 @@ const Analysis: React.FC<AnalysisProps> = ({
const handleJumpReceived = record => {
history.push(`/memberCenter/tranactionAbility/supplierEvaluation/received/detail?id=${record.id}`);
};
const handleEditSent = record => {
history.push(`/memberCenter/tranactionAbility/supplierEvaluation/sent/edit?id=${record.id}`);
};
const handleJumpSent = record => {
history.push(`/memberCenter/tranactionAbility/supplierEvaluation/sent/detail?id=${record.id}`);
};
......@@ -347,10 +348,10 @@ const Analysis: React.FC<AnalysisProps> = ({
<PageHeaderWrapper>
<MellowCard
bodyStyle={{
padding: '0 24px 24px',
padding: '0 24px 24px',
}}
>
<Tabs
<Tabs
className={styles.tabs}
activeKey={supplier.activeKey}
onChange={setSupplierActiveKey}
......@@ -385,28 +386,29 @@ const Analysis: React.FC<AnalysisProps> = ({
</Shelves>
<Shelves title="评价记录">
<RecordList
fetchList={getTradeHistory}
paginationType="button"
searchable={false}
<RecordList
fetchList={getTradeHistory}
paginationType="button"
searchable={false}
onCheck={handleJumpReceived}
/>
</Shelves>
</TabPane>
<TabPane tab="收到的评价" key="2">
<RecordList
fetchList={getReceivedList}
<RecordList
fetchList={getReceivedList}
onCheck={handleJumpReceived}
onExplain={handleExplain}
explicable={true}
ref={recordListRef}
statusable={true}
/>
</TabPane>
<TabPane tab="发出的评价" key="3">
<RecordList
fetchList={getSentList}
<RecordList
fetchList={getSentList}
onCheck={handleJumpSent}
onEdit={handleEditSent}
opposite={false}
......@@ -427,4 +429,4 @@ const Analysis: React.FC<AnalysisProps> = ({
);
};
export default inject('EvaluationStore')(observer(Analysis));
\ No newline at end of file
export default inject('EvaluationStore')(observer(Analysis));
......@@ -51,8 +51,9 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
console.log(shopIds, shopInfo)
const res = await getProductCommodityCommonGetCommodityListBySeller({
...params,
shopType: shopInfo[0].type,
environment: shopInfo[0].environment,
// shopType: shopInfo[0].type,
// environment: shopInfo[0].environment,
shopId: shopInfo['id'],
statusList: [4, 5, 6, 7],
// idNotInList: idNotInList,
})
......
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