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

fix: 对接采购订单详情申请开票,销售订单详情修改商品单价和运费功能,原有待审核订单修改单价和运费添加修改原因,供应商收到的评价添加显示隐藏评价操作

parent cad03605
...@@ -11,7 +11,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const'; ...@@ -11,7 +11,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import Search from '@/components/NiceForm/components/Search' import Search from '@/components/NiceForm/components/Search'
import Submit from '@/components/NiceForm/components/Submit' import Submit from '@/components/NiceForm/components/Submit'
import ModalTable from '@/components/ModalTable'; import ModalTable from '@/components/ModalTable';
import { getProductCustomerGetCustomerAttribute, postProductCustomerSaveOrUpdateCustomerAttribute } from '@/services/ProductV2Api'; import { getProductCustomerGetCustomerAttribute, getProductPlatformGetAttributeList, postProductCustomerSaveOrUpdateCustomerAttribute } from '@/services/ProductV2Api';
const { Option } = Select; const { Option } = Select;
...@@ -82,14 +82,12 @@ const AddAtttribute: React.FC<{}> = () => { ...@@ -82,14 +82,12 @@ const AddAtttribute: React.FC<{}> = () => {
const handleSelectOk = () => { const handleSelectOk = () => {
setRoleVisible(false) setRoleVisible(false)
if (selectRow.length) { if (selectRow.length) {
//@ts-ignore
menuForm.setFieldsValue({ attribute: selectRow[0], attributeShow: selectRow[0].name }) menuForm.setFieldsValue({ attribute: selectRow[0], attributeShow: selectRow[0].name })
} }
} }
const fetchData = (params: any) => { const fetchData = (params: any) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
//@ts-ignore
getProductPlatformGetAttributeList({ ...params, name: params.name || '', groupName: params.groupName || '', isEnable: true }).then(res => { getProductPlatformGetAttributeList({ ...params, name: params.name || '', groupName: params.groupName || '', isEnable: true }).then(res => {
resolve(res.data) resolve(res.data)
}) })
......
...@@ -23,7 +23,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte ...@@ -23,7 +23,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import ModalTable from '@/components/ModalTable' import ModalTable from '@/components/ModalTable'
import { clearModalParams } from '@/utils' import { clearModalParams } from '@/utils'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable' import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { getProductCustomerGetCustomerAttributeList, getProductPlatformGetAttributeList, postProductCustomerDeleteCustomerAttribute, postProductCustomerUpdateCustomerAttributeStatus } from '@/services/ProductV2Api' import { getProductCustomerGetCustomerAttributeList, getProductPlatformGetAttributeList, postProductCustomerDeleteCustomerAttribute, postProductCustomerSyncAttribute, postProductCustomerUpdateCustomerAttributeStatus } from '@/services/ProductV2Api'
// import styles from './index.less' // import styles from './index.less'
const formActions = createFormActions(); const formActions = createFormActions();
...@@ -213,7 +213,6 @@ const Attribute: React.FC<{}> = () => { ...@@ -213,7 +213,6 @@ const Attribute: React.FC<{}> = () => {
const handleAsyncOk = () => { const handleAsyncOk = () => {
setSyncLoading(true) setSyncLoading(true)
if(rowSelectionCtl.selectedRowKeys.length) { if(rowSelectionCtl.selectedRowKeys.length) {
// @ts-ignore
postProductCustomerSyncAttribute({idList: rowSelectionCtl.selectedRowKeys}).then(res => { postProductCustomerSyncAttribute({idList: rowSelectionCtl.selectedRowKeys}).then(res => {
if(res.code === 1000) { if(res.code === 1000) {
ref.current.reload() ref.current.reload()
......
...@@ -21,12 +21,11 @@ import Submit from '@/components/NiceForm/components/Submit' ...@@ -21,12 +21,11 @@ import Submit from '@/components/NiceForm/components/Submit'
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
import { clearModalParams } from '@/utils'; import { clearModalParams } from '@/utils';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'; import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { getProductCustomerGetCustomerAttributeValueList, getProductPlatformGetSyncAttributeValueList, postProductCustomerDeleteCustomerAttributeValue, postProductCustomerUpdateCustomerAttributeValueStatus } from '@/services/ProductV2Api'; import { getProductCustomerGetCustomerAttributeTree, getProductCustomerGetCustomerAttributeValueList, getProductPlatformGetSyncAttributeValueList, postProductCustomerDeleteCustomerAttributeValue, postProductCustomerSyncAttributeValue, postProductCustomerUpdateCustomerAttributeValueStatus } from '@/services/ProductV2Api';
const treeActions = createTreeActions() const treeActions = createTreeActions()
const fetchAttributeTreeData = async (params?) => { const fetchAttributeTreeData = async (params?) => {
// @ts-ignore
const res = await getProductCustomerGetCustomerAttributeTree({filterInput: true}) const res = await getProductCustomerGetCustomerAttributeTree({filterInput: true})
return res return res
} }
...@@ -296,8 +295,7 @@ const PropertyValue: React.FC<{}> = () => { ...@@ -296,8 +295,7 @@ const PropertyValue: React.FC<{}> = () => {
const handleAsyncOk = () => { const handleAsyncOk = () => {
setSyncLoading(true) setSyncLoading(true)
if(rowSelectionCtl.selectedRowKeys.length) { if(rowSelectionCtl.selectedRowKeys.length) {
// @ts-ignore postProductCustomerSyncAttributeValue({idList: rowSelectionCtl.selectedRowKeys}).then(res => {
postProductCustomerSyncAttributeValue({idList: rowSelectionCtl.selectedRowKeys}).then(res => {
if(res.code === 1000) { if(res.code === 1000) {
if(ref?.current?.reload) { if(ref?.current?.reload) {
ref.current.reload() ref.current.reload()
......
...@@ -20,6 +20,7 @@ import { useLocalStore, observer } from 'mobx-react' ...@@ -20,6 +20,7 @@ import { useLocalStore, observer } from 'mobx-react'
import { store } from '@/store' import { store } from '@/store'
import { CommodityType } from './constant'; import { CommodityType } from './constant';
import { getProductCommodityGetCommodity, getProductCustomerGetCustomerCategoryById, postProductCommodityApplyCheckCommodity, postProductCommoditySaveOrUpdateCommodity } from '@/services/ProductV2Api'; import { getProductCommodityGetCommodity, getProductCustomerGetCustomerCategoryById, postProductCommodityApplyCheckCommodity, postProductCommoditySaveOrUpdateCommodity } from '@/services/ProductV2Api';
import { getTemplateWebPageTemplateWebFindGoodsDescribeTemplate } from '@/services/TemplateV2Api';
const { TabPane } = Tabs const { TabPane } = Tabs
...@@ -132,7 +133,6 @@ const AddProducts: React.FC<{}> = (props) => { ...@@ -132,7 +133,6 @@ const AddProducts: React.FC<{}> = (props) => {
// 获取页面使用模板 // 获取页面使用模板
const productDescriptionTemplate = async () => { const productDescriptionTemplate = async () => {
//@ts-ignore
getTemplateWebPageTemplateWebFindGoodsDescribeTemplate({ siteId }).then(res => { getTemplateWebPageTemplateWebFindGoodsDescribeTemplate({ siteId }).then(res => {
if (res.code === 1000) if (res.code === 1000)
setCurrentTemplateName(res.data?.fileName) setCurrentTemplateName(res.data?.fileName)
......
...@@ -30,7 +30,7 @@ import { priceTypeLabel, productStatusColor, productStatusLabel } from './consta ...@@ -30,7 +30,7 @@ import { priceTypeLabel, productStatusColor, productStatusLabel } from './consta
import EyePreview from '@/components/EyePreview' import EyePreview from '@/components/EyePreview'
import UpperProductModalTable from './components/upperProductModalTable' import UpperProductModalTable from './components/upperProductModalTable'
import { Item } from '@/components/ButtonTabs' 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' import { getTemplateWebMemberShopWebFindCurrMemberShop } from '@/services/TemplateV2Api'
const { confirm } = Modal; const { confirm } = Modal;
...@@ -528,7 +528,6 @@ const Products: React.FC<{}> = () => { ...@@ -528,7 +528,6 @@ const Products: React.FC<{}> = () => {
title: '确定要执行批量删除操作?', title: '确定要执行批量删除操作?',
icon: <ExclamationCircleOutlined />, icon: <ExclamationCircleOutlined />,
onOk() { onOk() {
//@ts-ignore
postProductCommodityDeleteBatchCommodity({idList: ids}).then(res => { postProductCommodityDeleteBatchCommodity({idList: ids}).then(res => {
if(res.code === 1000) if(res.code === 1000)
ref.current.reload() ref.current.reload()
...@@ -542,7 +541,6 @@ const Products: React.FC<{}> = () => { ...@@ -542,7 +541,6 @@ const Products: React.FC<{}> = () => {
cancelText: '取消' cancelText: '取消'
}) })
}else{ }else{
//@ts-ignore
postProductCommodityDeleteBatchCommodity({idList: ids}).then(res => { postProductCommodityDeleteBatchCommodity({idList: ids}).then(res => {
if(res.code === 1000) if(res.code === 1000)
ref.current.reload() ref.current.reload()
......
...@@ -39,19 +39,19 @@ const AnyQuestion: React.FC<Iprops> = () => { ...@@ -39,19 +39,19 @@ const AnyQuestion: React.FC<Iprops> = () => {
<p className={styles.tips}>您的专属服务团队</p> <p className={styles.tips}>您的专属服务团队</p>
<p className={styles.tips}>客户经理、项目经理、技术专家为你解答平台使用过程中遇到任何问题</p> <p className={styles.tips}>客户经理、项目经理、技术专家为你解答平台使用过程中遇到任何问题</p>
</div> </div>
<div className={styles.ask}> {
{ _self === null ?
_self === null ? null
null :
: <div className={styles.ask}>
<a <a
target={"__blank"} target={"__blank"}
onClick={openIMServer} onClick={openIMServer}
> >
我要提问 我要提问
</a> </a>
} </div>
</div> }
<div className={styles.ask_image}> <div className={styles.ask_image}>
<img src={ask} /> <img src={ask} />
</div> </div>
......
...@@ -95,7 +95,7 @@ export const transformParamsForApi = (data: any, ctx: ISchemaFormActions | ISche ...@@ -95,7 +95,7 @@ export const transformParamsForApi = (data: any, ctx: ISchemaFormActions | ISche
let _params: any = {} let _params: any = {}
_params["name"] = data.name _params["name"] = data.name
_params["priceType"] = data.priceType _params["priceType"] = data.priceType
let shopInfo = ctx.getFieldState("shopId")['values'][1] let shopInfo = data?.shopId ? { id: data.shopId } : ctx.getFieldState("shopId")['values'][1]
_params["shopId"] = shopInfo["id"] _params["shopId"] = shopInfo["id"]
_params["type"] = shopInfo["type"] _params["type"] = shopInfo["type"]
...@@ -128,6 +128,7 @@ export const transformDataForNiceForm = (value: any, ctx: ISchemaFormActions | I ...@@ -128,6 +128,7 @@ export const transformDataForNiceForm = (value: any, ctx: ISchemaFormActions | I
initValue["priceType"] = value.priceType initValue["priceType"] = value.priceType
initValue["productId"] = value.commodity.id initValue["productId"] = value.commodity.id
initValue["productName"] = value.commodity.name initValue["productName"] = value.commodity.name
initValue["minOrder"] = value.commodity.minOrder
initValue["commodityMemberList"] = value.commodityMemberList.map(item => ({ initValue["commodityMemberList"] = value.commodityMemberList.map(item => ({
memberId: item.memberId, memberId: item.memberId,
name: item.memberName, name: item.memberName,
......
...@@ -61,6 +61,7 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => { ...@@ -61,6 +61,7 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => {
addSchemaAction.setFieldState('commodityMemberList', state => { addSchemaAction.setFieldState('commodityMemberList', state => {
state.dataSource = initValue.commodityMemberList state.dataSource = initValue.commodityMemberList
}) })
addSchemaAction.setFieldValue('minOrder', initValue.minOrder)
}) })
} }
}, []) }, [])
......
...@@ -69,35 +69,119 @@ ...@@ -69,35 +69,119 @@
} }
} }
// :global { // 发票抽屉
// span.ant-radio + * { .raido_group {
// display: block; position: relative;
// width: 100%; display: block;
// } width: 100%;
// .ant-radio-wrapper { .list_radio {
// display: flex; border: 1px solid #FFF;
// width: 100%; }
// align-items: center;
// height: 72px; .invoice_list {
// background-color: #fafafa; position: relative;
// margin: 10px; // display: flex;
// padding-left: 16px; margin: 0 -10px;
// } // flex-wrap: wrap;
// .ant-radio-wrapper.ant-radio-wrapper-checked { .invoice_list_item {
// border: 1px solid @main-color; display: flex;
align-items: center;
// &::after {
// content: ''; &_content {
// position: absolute; padding-left: 10px;
// width: 0;
// height: 0; &_tag {
// border-bottom: 12px solid @main-color; display: inline-block;
// border-left: 12px solid transparent; background-color: #909399;
// bottom: 0; padding: 0 6px;
// right: 0; height: 16px;
// z-index: 5; 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 ...@@ -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) { if(shopId) {
const vendorMemberId = ctx.getFieldValue('vendorMemberId') // const vendorMemberId = ctx.getFieldValue('vendorMemberId')
const vendorRoleId = ctx.getFieldValue('vendorRoleId') // const vendorRoleId = ctx.getFieldValue('vendorRoleId')
const { vendorMemberId, vendorRoleId } = jumpFormValue
const { code, data } = await getOrderBuyerFindDeliveryDate({shopId, vendorMemberId, vendorRoleId}) const { code, data } = await getOrderBuyerFindDeliveryDate({shopId, vendorMemberId, vendorRoleId})
if(code !== 1000) { return false; } if(code !== 1000) { return false; }
......
...@@ -6,7 +6,7 @@ import { createFormActions, registerVirtualBox, useFormSpy } from '@formily/antd ...@@ -6,7 +6,7 @@ import { createFormActions, registerVirtualBox, useFormSpy } from '@formily/antd
import { SaveOutlined, LinkOutlined, PlusOutlined } from '@ant-design/icons' import { SaveOutlined, LinkOutlined, PlusOutlined } from '@ant-design/icons'
import NiceForm from '@/components/NiceForm' import NiceForm from '@/components/NiceForm'
import { mergeAllSchemas } from './schema' import { mergeAllSchemas } from './schema'
import { useModelTypeChange, useEditHideField, useOrderFormInitEffect, useProductTableChangeForPay, useOrderDeliverTimeEffect } from './effects' import { useModelTypeChange, useEditHideField, useOrderFormInitEffect, useProductTableChangeForPay, useOrderDeliverTimeEffect, JumpFormValueType } from './effects'
import { orderCombination, orderTypeLabelMap, procurementProcessField, procurementRenderField, procurmentRenderInit } from './constant' import { orderCombination, orderTypeLabelMap, procurementProcessField, procurementRenderField, procurmentRenderInit } from './constant'
import { OrderModalType } from '@/constants/order' import { OrderModalType } from '@/constants/order'
import ProductModalTable, { filterProductDataById } from './components/productModalTable' import ProductModalTable, { filterProductDataById } from './components/productModalTable'
...@@ -144,6 +144,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = () => { ...@@ -144,6 +144,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = () => {
} }
return resultState return resultState
}) })
const jumpFormValueRef = useRef<JumpFormValueType | null>()
const { formContext } = useFormDetail() const { formContext } = useFormDetail()
...@@ -189,6 +190,11 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = () => { ...@@ -189,6 +190,11 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = () => {
const { code, data: quotationData } = await getTransactionNotarizeEnquiryProductQuotationDetails({ id: quotationId }) const { code, data: quotationData } = await getTransactionNotarizeEnquiryProductQuotationDetails({ id: quotationId })
if(code === 1000) { if(code === 1000) {
const { quotationNo, details, shopId, supplyMembersName, supplyMembersId, supplyMembersRoleId, inquiryListId } = quotationData const { quotationNo, details, shopId, supplyMembersName, supplyMembersId, supplyMembersRoleId, inquiryListId } = quotationData
jumpFormValueRef.current = {
shopId,
vendorMemberId: supplyMembersId,
vendorRoleId: supplyMembersRoleId,
}
addSchemaAction.setFieldValue('quoteId', quotationId) addSchemaAction.setFieldValue('quoteId', quotationId)
addSchemaAction.setFieldValue('quoteNo', quotationNo) addSchemaAction.setFieldValue('quoteNo', quotationNo)
addSchemaAction.setFieldValue('shopId', shopId) addSchemaAction.setFieldValue('shopId', shopId)
...@@ -517,7 +523,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = () => { ...@@ -517,7 +523,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = () => {
$('onFieldValueChange', 'shopId').subscribe(state => { $('onFieldValueChange', 'shopId').subscribe(state => {
// 初始化 配送时间段处理 // 初始化 配送时间段处理
useOrderDeliverTimeEffect(ctx, state.value) useOrderDeliverTimeEffect(ctx, state.value, jumpFormValueRef.current)
}) })
// // 新增下并且不是采购跳转 切换商城 清空受影响的字段 // // 新增下并且不是采购跳转 切换商城 清空受影响的字段
......
...@@ -103,7 +103,7 @@ export const procurementProcessField = (value) => { ...@@ -103,7 +103,7 @@ export const procurementProcessField = (value) => {
weight: item.logistics.weight, weight: item.logistics.weight,
stock: item.stockCount, stock: item.stockCount,
discount: item.isMemberPrice ? item.memberPrice : 1, // 字段需求 无折扣为1 discount: item.isMemberPrice ? item.memberPrice : 1, // 字段需求 无折扣为1
price: item.isMemberPrice ? Number((item.money / item.purchaseCount / item.memberPrice).toFixed(2)) : Number((item.money / item.purchaseCoun).toFixed(2)), price: item.isMemberPrice ? Number((item.money / item.purchaseCount / item.memberPrice).toFixed(2)) : Number((item.money / item.purchaseCount).toFixed(2)),
tax: item.taxRate > 0, tax: item.taxRate > 0,
vendorMemberId: item.memberId, vendorMemberId: item.memberId,
vendorRoleId: item.memberRoleId, vendorRoleId: item.memberRoleId,
......
...@@ -87,7 +87,8 @@ const SelectProcesss = (props: ISchemaFieldComponentProps) => { ...@@ -87,7 +87,8 @@ const SelectProcesss = (props: ISchemaFieldComponentProps) => {
const renderProcessType = (v: any) => { const renderProcessType = (v: any) => {
return <Tag color={ProcessTagColor[v.processType - 1]}> return <Tag color={ProcessTagColor[v.processType - 1]}>
{ProcessTagType[v.processType - 1]} {/* {ProcessTagType[v.processType - 1]} */}
{v.processTypeName}
</Tag> </Tag>
} }
......
@import '../../../../../global/styles/utils.less'; @import '../../../../../global/styles/utils.less';
.record { .record {
padding: 0; padding: 0;
margin: 0; margin: 0;
&-item { &-header {
padding: 14px 16px; background: #FAFBFC;
line-height: 14px; }
display: flex;
align-items: center; &-item {
background: #FAFBFC; padding: 14px 16px;
color: #303133; line-height: 14px;
display: flex;
&-good { align-items: center;
width: 25%; // background: #FAFBFC;
color: #303133;
&-name {
line-height: 14px; &-good {
margin-bottom: 13px; &-name {
font-size: 12px; line-height: 14px;
font-weight: 400; margin-bottom: 13px;
} font-size: 12px;
font-weight: 400;
&-price { }
margin-right: 16px;
font-weight: 500; &-price {
} margin-right: 16px;
font-weight: 500;
&-desc { }
line-height: 12px;
font-weight: 400; &-desc {
color: #909399; line-height: 12px;
} font-weight: 400;
} color: #909399;
}
&-extra { }
width: 20%;
&-extra {
&-item { &-item {
display: flex; display: flex;
align-items: center; align-items: center;
&-label { &-label {
flex: 0 0 60px; flex: 0 0 60px;
line-height: 12px; line-height: 12px;
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
color: #909399; color: #909399;
} }
&-control { &-control {
flex: 1; flex: 1;
} }
&:not(:last-child) { &:not(:last-child) {
margin-bottom: 13px; margin-bottom: 13px;
} }
} }
} }
&-comment { &-comment {
width: 40%; &-main {
margin-top: 6px;
&-main { line-height: 14px;
margin-top: 6px; font-weight: 400;
line-height: 14px; color: #303133;
font-weight: 400; .textOverflow();
color: #303133; }
.textOverflow(); }
}
} &-header {
background: #FAFBFC;
&-actions { }
flex: 1;
text-align: center; &-actions {
} flex: 1;
text-align: center;
&:not(:last-child) { }
margin-bottom: 16px;
} &:not(:last-child) {
} // margin-bottom: 16px;
} border-bottom: 1px solid #EDEEEF;
\ No newline at end of file }
}
}
import { getLogisticsReceiverAddressAgentPage } from "@/services/LogisticsV2Api" import { getLogisticsReceiverAddressAgentPage } from "@/services/LogisticsV2Api"
import { getMemberManageAllPageByordertype, getMemberManageOrderAgentMembers } from "@/services/MemberV2Api" import { getMemberManageAllPageByordertype, getMemberManageOrderAgentMembers } from "@/services/MemberV2Api"
import { getOrderVendorGetOrderMode, postOrderVendorCreateAgentPaymentFind } from "@/services/OrderNewV2Api" import { getOrderVendorGetOrderMode, postOrderVendorCreateAgentPaymentFind } from "@/services/OrderNewV2Api"
import { getProductCommodityCommonGetCommodityListByBuyer } from "@/services/ProductV2Api" import { getProductCommodityCommonGetCommodityListByGuest } from "@/services/ProductV2Api"
import { getSettleAccountsAgentInvoiceMessageList } from "@/services/SettleV2Api" import { getSettleAccountsAgentInvoiceMessageList } from "@/services/SettleV2Api"
import { getTransactionEnquiryProductAll, getTransactionProductQuotationList } from "@/services/TransactionV2Api" import { getTransactionEnquiryProductAll, getTransactionProductQuotationList } from "@/services/TransactionV2Api"
export const fetchOrderApi = { export const fetchOrderApi = {
/** 弹窗获取商品列表 */ /** 弹窗获取商品列表 */
async getProductList(params) { async getProductList(params) {
const { data } = await getProductCommodityCommonGetCommodityListByBuyer(params) const { data } = await getProductCommodityCommonGetCommodityListByGuest(params)
return data return data
}, },
......
...@@ -4,10 +4,9 @@ import { createFormActions } from '@formily/antd' ...@@ -4,10 +4,9 @@ import { createFormActions } from '@formily/antd'
import addressSchema from './schema' import addressSchema from './schema'
import './index.less' import './index.less'
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect' import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'
import { getManageCountryAreaGetTelCode } from '@/services/ManageV2Api' import { getManageAreaByPcode, GetManageAreaByPcodeRequest, getManageCountryAreaGetTelCode } from '@/services/ManageV2Api'
import { postLogisticsReceiverAddressAgentAdd, postLogisticsReceiverAddressAgentUpdate } from '@/services/LogisticsV2Api'
import { getManageAreaByPcode, GetManageAreaByPcodeRequest } from '@/services/ManageV2Api/id8689'
import { message } from 'antd' import { message } from 'antd'
import { postLogisticsReceiverAddressAgentAdd, postLogisticsReceiverAddressAgentUpdate } from '@/services/LogisticsV2Api'
export interface AddressModalProps { export interface AddressModalProps {
mode: 'add' | 'edit' | 'preview' | 'default', mode: 'add' | 'edit' | 'preview' | 'default',
......
...@@ -138,12 +138,13 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => { ...@@ -138,12 +138,13 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => {
const fetchProductList = (values) => { const fetchProductList = (values) => {
const modelType = schemaAction.getFieldValue('orderMode') const modelType = schemaAction.getFieldValue('orderMode')
const supplyMembersId = schemaAction.getFieldValue('vendorMemberId') const buyerMembersId = schemaAction.getFieldValue('buyerMemberId')
const shopId = schemaAction.getFieldValue('shopId')
const params = { const params = {
...values, ...values,
shopType: orderProductShopTypeMaps[modelType], shopType: orderProductShopTypeMaps[modelType],
environment: 1, environment: 1,
memberId: supplyMembersId, memberId: buyerMembersId,
priceTypeList: [1], priceTypeList: [1],
shopId: schemaAction.getFieldValue('shopId') shopId: schemaAction.getFieldValue('shopId')
} }
......
...@@ -120,18 +120,18 @@ export const baseOrderListColumns: any = () => { ...@@ -120,18 +120,18 @@ export const baseOrderListColumns: any = () => {
key: 'amount', key: 'amount',
render: (t, r) => (r.orderType === ORDER_TYPE_POINTS || r.orderType === ORDER_TYPE_CHANNEL_POINTS) ? t : `¥${t}` render: (t, r) => (r.orderType === ORDER_TYPE_POINTS || r.orderType === ORDER_TYPE_CHANNEL_POINTS) ? t : `¥${t}`
}, },
// {
// title: '订单类型',
// dataIndex: 'orderTypeName',
// key: 'orderTypeName',
// },
{ {
title: '送货地址', title: '订单类型',
dataIndex: 'deliverAddress', dataIndex: 'orderTypeName',
key: 'deliverAddress', key: 'orderTypeName',
width: 164,
ellipsis: true,
}, },
// {
// title: '送货地址',
// dataIndex: 'deliverAddress',
// key: 'deliverAddress',
// width: 164,
// ellipsis: true,
// },
{ {
title: '转单订单号', title: '转单订单号',
dataIndex: 'relationNo', dataIndex: 'relationNo',
......
...@@ -82,6 +82,10 @@ const SaleOrder: React.FC<SaleOrderProps> = () => { ...@@ -82,6 +82,10 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
history.push(`/memberCenter/tranactionAbility/supplierEvaluation/unevaluated`) history.push(`/memberCenter/tranactionAbility/supplierEvaluation/unevaluated`)
} }
const handleModifyPrice = (record) => {
history.push(`${history.location.pathname}/preview?id=${record.orderId}&modifyPrice=true`)
}
const handleCancel = (r) => { const handleCancel = (r) => {
destoryRef.current.setVisible(true) destoryRef.current.setVisible(true)
destroyActions.setFieldValue('id', r.orderId) destroyActions.setFieldValue('id', r.orderId)
...@@ -179,13 +183,20 @@ const SaleOrder: React.FC<SaleOrderProps> = () => { ...@@ -179,13 +183,20 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
/** 参照后台数据生成 */ /** 参照后台数据生成 */
const renderOptionButton = (record) => { 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 = { const operationHandler = {
'取消订单': () => handleCancel(record), '取消订单': () => handleCancel(record),
'中止': () => handleSuspend(record), '中止': () => handleSuspend(record),
'评价': () => handleEvaluate(), '评价': () => handleEvaluate(),
'转单': () => onlyTransform(record.orderId), '转单': () => onlyTransform(record.orderId),
'修改订单价格': () => handleModifyPrice(record)
} }
return ( return (
......
...@@ -5,14 +5,26 @@ import OrderDetailWrapper from '@/pages/transaction/components/orderDetailWrappe ...@@ -5,14 +5,26 @@ import OrderDetailWrapper from '@/pages/transaction/components/orderDetailWrappe
import PreLoading from '@/components/PreLoading'; import PreLoading from '@/components/PreLoading';
import { useOrderDetail } from '../../_public/order/effects/useOrderDetail'; import { useOrderDetail } from '../../_public/order/effects/useOrderDetail';
import OrderDetailSection from '../../components/orderDetailSection'; import OrderDetailSection from '../../components/orderDetailSection';
import { Button } from 'antd';
import { history } from 'umi'
import { usePageStatus } from '@/hooks/usePageStatus';
const OrderPreview: React.FC = () => { const OrderPreview: React.FC = () => {
const { formContext, detailList } = useOrderDetail({type: 'saleOrder'}) const { formContext, detailList } = useOrderDetail({type: 'saleOrder'})
const { modifyPrice = false } = usePageStatus() // 修改单价页面
const handleClick = () => {
history.goBack()
}
return ( return (
<div> <div>
<OrderDetailContext.Provider value={formContext}> <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> <OrderDetailWrapper>
<PreLoading loading={!formContext.data} active paragraph={{rows: 6}}> <PreLoading loading={!formContext.data} active paragraph={{rows: 6}}>
......
...@@ -51,8 +51,9 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => { ...@@ -51,8 +51,9 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
console.log(shopIds, shopInfo) console.log(shopIds, shopInfo)
const res = await getProductCommodityCommonGetCommodityListBySeller({ const res = await getProductCommodityCommonGetCommodityListBySeller({
...params, ...params,
shopType: shopInfo[0].type, // shopType: shopInfo[0].type,
environment: shopInfo[0].environment, // environment: shopInfo[0].environment,
shopId: shopInfo['id'],
statusList: [4, 5, 6, 7], statusList: [4, 5, 6, 7],
// idNotInList: idNotInList, // 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