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

fix: 处理新增商品物流区块提示错误,处理询价报价下单无法查询自营商城的问题。

parent 5f33098b
...@@ -631,7 +631,7 @@ export default { ...@@ -631,7 +631,7 @@ export default {
'commodity.products.addProductsItem.logisticsForm.form.weight.placeholder' : '请输入重量', 'commodity.products.addProductsItem.logisticsForm.form.weight.placeholder' : '请输入重量',
'commodity.products.addProductsItem.logisticsForm.form.useTemplate' : '使用运费模板(只有买家承担运费才能选择)', 'commodity.products.addProductsItem.logisticsForm.form.useTemplate' : '使用运费模板(只有买家承担运费才能选择)',
'commodity.products.addProductsItem.logisticsForm.form.templateId' : '运费模板', 'commodity.products.addProductsItem.logisticsForm.form.templateId' : '运费模板',
'commodity.products.addProductsItem.logisticsForm.form.templateId.message' : '请正确输入重量', 'commodity.products.addProductsItem.logisticsForm.form.templateId.message' : '请选择运费模板',
'commodity.products.addProductsItem.logisticsForm.form.templateId.placeholder' : '请选择运费模板', 'commodity.products.addProductsItem.logisticsForm.form.templateId.placeholder' : '请选择运费模板',
'commodity.products.addProductsItem.logisticsForm.form.sendAddress' : '发货地址', 'commodity.products.addProductsItem.logisticsForm.form.sendAddress' : '发货地址',
'commodity.products.addProductsItem.logisticsForm.form.sendAddress.message' : '请选择发货地址', 'commodity.products.addProductsItem.logisticsForm.form.sendAddress.message' : '请选择发货地址',
......
...@@ -118,7 +118,7 @@ const SelectAddress = (props: ISchemaFieldComponentProps) => { ...@@ -118,7 +118,7 @@ const SelectAddress = (props: ISchemaFieldComponentProps) => {
<div style={{ width: '100%'}}> <div style={{ width: '100%'}}>
<SelectStyles><Row gutter={[16, 16]} style={{width: '100%'}}> <SelectStyles><Row gutter={[16, 16]} style={{width: '100%'}}>
{ {
showDataSource.map(v => <Col span={12}><div key={v.id} onClick={() => handleCheck(v)} className={cx('select_style_border', checkedId === v.id ? 'active' : '')}> showDataSource.map(v => <Col span={12} key={v.id}><div onClick={() => handleCheck(v)} className={cx('select_style_border', checkedId === v.id ? 'active' : '')}>
<div> <div>
<Row style={{ color: '#303133' }}> <Row style={{ color: '#303133' }}>
<Col>{v.receiverName}</Col> <Col>{v.receiverName}</Col>
......
...@@ -456,17 +456,17 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = () => { ...@@ -456,17 +456,17 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = () => {
effects={($, ctx) => { effects={($, ctx) => {
useAsyncSelect('orderMode', fetchOrderMode, ['text', 'id']) useAsyncSelect('orderMode', fetchOrderMode, ['text', 'id'])
$('onFormMount').subscribe(async () => { $('onFormMount').subscribe(async () => {
const data = await fectchShopListsSource() // const data = await fectchShopListsSource()
if(data && data.length) { // if(data && data.length) {
ctx.setFieldState('shopId', state => { // ctx.setFieldState('shopId', state => {
state.props.enum = data.map(item => ({ // state.props.enum = data.map(item => ({
label: item.name, // label: item.name,
value: item.id, // value: item.id,
type: item.type, // type: item.type,
environment: item.environment, // environment: item.environment,
})) // }))
}) // })
} // }
if (id || modelType) { if (id || modelType) {
ctx.setFieldState('orderMode', state => { ctx.setFieldState('orderMode', state => {
state.editable = false state.editable = false
...@@ -478,6 +478,19 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = () => { ...@@ -478,6 +478,19 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = () => {
}) })
} }
}) })
// 供应商变动查询商城列表
$('onFieldValueChange', 'vendorMemberId').subscribe(async state => {
const role = ctx.getFieldValue('vendorRoleId')
const data = await fectchShopListsSource({
environment: 1,
hasMemberType: 1,
memberId: state.value,
roleId: role
})
ctx.setFieldState('shopId', prevState => {
prevState.props.enum = data.map(item => ({ ...item, label: item.name, value: item.id }))
})
})
$('onFieldInputChange', 'orderMode').subscribe(state => { $('onFieldInputChange', 'orderMode').subscribe(state => {
const { value } = state const { value } = state
// 处理商城类型选项 报价单文案 支付信息栏隐藏 // 处理商城类型选项 报价单文案 支付信息栏隐藏
......
...@@ -119,7 +119,7 @@ const SelectAddress = (props: ISchemaFieldComponentProps) => { ...@@ -119,7 +119,7 @@ const SelectAddress = (props: ISchemaFieldComponentProps) => {
<div style={{ width: '100%'}}> <div style={{ width: '100%'}}>
<SelectStyles><Row gutter={[16, 16]} style={{width: '100%'}}> <SelectStyles><Row gutter={[16, 16]} style={{width: '100%'}}>
{ {
showDataSource.map(v => <Col span={12}><div key={v.id} onClick={() => handleCheck(v)} className={cx('select_style_border', checkedId === v.id ? 'active' : '')}> showDataSource.map(v => <Col span={12} key={v.id}><div onClick={() => handleCheck(v)} className={cx('select_style_border', checkedId === v.id ? 'active' : '')}>
<div> <div>
<Row style={{ color: '#303133' }}> <Row style={{ color: '#303133' }}>
<Col>{v.receiverName}</Col> <Col>{v.receiverName}</Col>
......
...@@ -29,6 +29,7 @@ import { useFormDetail } from '@/formSchema/effects/useFormDetail' ...@@ -29,6 +29,7 @@ import { useFormDetail } from '@/formSchema/effects/useFormDetail'
import { getLogisticsReceiverAddressGet, getLogisticsSelectListMemberShipperAddress, postLogisticsFreightTemplateCalFreightPrice } from '@/services/LogisticsV2Api' import { getLogisticsReceiverAddressGet, getLogisticsSelectListMemberShipperAddress, postLogisticsFreightTemplateCalFreightPrice } from '@/services/LogisticsV2Api'
import { getOrderBuyerCreateDetail, postOrderBuyerCreatePurchase, postOrderBuyerCreatePurchaseUpdate } from '@/services/OrderNewV2Api' import { getOrderBuyerCreateDetail, postOrderBuyerCreatePurchase, postOrderBuyerCreatePurchaseUpdate } from '@/services/OrderNewV2Api'
import { postManageWebShopWebAll } from '@/services/ManageV2Api' import { postManageWebShopWebAll } from '@/services/ManageV2Api'
import { fectchShopListsSource } from '@/utils/type'
export interface AgentOrderDetailProps {} export interface AgentOrderDetailProps {}
...@@ -410,13 +411,12 @@ const AgentOrderDetail:React.FC<AgentOrderDetailProps> = () => { ...@@ -410,13 +411,12 @@ const AgentOrderDetail:React.FC<AgentOrderDetailProps> = () => {
// 供应商变动查询商城列表 // 供应商变动查询商城列表
$('onFieldValueChange', 'vendorMemberId').subscribe(async state => { $('onFieldValueChange', 'vendorMemberId').subscribe(async state => {
const role = ctx.getFieldValue('vendorRoleId') const role = ctx.getFieldValue('vendorRoleId')
const { data } = await postManageWebShopWebAll({ const data = await fectchShopListsSource({
siteId: GlobalConfig.global.siteInfo.id,
environment: 1, environment: 1,
hasMemberType: 1, hasMemberType: 1,
memberId: state.value, memberId: state.value,
roleId: role roleId: role
}, { ctlType: "none" }) })
ctx.setFieldState('shopId', prevState => { ctx.setFieldState('shopId', prevState => {
prevState.props.enum = data.map(item => ({ ...item, label: item.name, value: item.id })) prevState.props.enum = data.map(item => ({ ...item, label: item.name, value: item.id }))
}) })
......
...@@ -125,7 +125,7 @@ const SelectAddress = (props: ISchemaFieldComponentProps) => { ...@@ -125,7 +125,7 @@ const SelectAddress = (props: ISchemaFieldComponentProps) => {
{/* {editable && <Button block onClick={handleAdd} icon={<PlusOutlined />}>新建地址</Button>} */} {/* {editable && <Button block onClick={handleAdd} icon={<PlusOutlined />}>新建地址</Button>} */}
<SelectStyles><Row gutter={[16, 16]} style={{width: '100%'}}> <SelectStyles><Row gutter={[16, 16]} style={{width: '100%'}}>
{ {
showDataSource.map(v => <Col span={12}><div key={v.id} onClick={() => handleCheck(v)} className={cx('select_style_border', checkedId === v.id ? 'active' : '')}> showDataSource.map(v => <Col span={12} key={v.id}><div onClick={() => handleCheck(v)} className={cx('select_style_border', checkedId === v.id ? 'active' : '')}>
<div> <div>
<Row style={{ color: '#303133' }}> <Row style={{ color: '#303133' }}>
<Col>{v.receiverName}</Col> <Col>{v.receiverName}</Col>
......
...@@ -124,7 +124,7 @@ const SelectAddress = (props: ISchemaFieldComponentProps) => { ...@@ -124,7 +124,7 @@ const SelectAddress = (props: ISchemaFieldComponentProps) => {
{/* {editable && <Button block onClick={handleAdd} icon={<PlusOutlined />}>新建地址</Button>} */} {/* {editable && <Button block onClick={handleAdd} icon={<PlusOutlined />}>新建地址</Button>} */}
<SelectStyles><Row gutter={[16, 16]} style={{width: '100%'}}> <SelectStyles><Row gutter={[16, 16]} style={{width: '100%'}}>
{ {
showDataSource.map(v => <Col span={12}><div key={v.id} onClick={() => handleCheck(v)} className={cx('select_style_border', checkedId === v.id ? 'active' : '')}> showDataSource.map(v => <Col span={12} key={v.id}><div onClick={() => handleCheck(v)} className={cx('select_style_border', checkedId === v.id ? 'active' : '')}>
<div> <div>
<Row style={{ color: '#303133' }}> <Row style={{ color: '#303133' }}>
<Col>{v.receiverName}</Col> <Col>{v.receiverName}</Col>
......
...@@ -121,7 +121,7 @@ const SelectAddress = (props: ISchemaFieldComponentProps) => { ...@@ -121,7 +121,7 @@ const SelectAddress = (props: ISchemaFieldComponentProps) => {
{/* {editable && <Button block onClick={handleAdd} icon={<PlusOutlined />}>新建地址</Button>} */} {/* {editable && <Button block onClick={handleAdd} icon={<PlusOutlined />}>新建地址</Button>} */}
<SelectStyles><Row gutter={[16, 16]} style={{width: '100%'}}> <SelectStyles><Row gutter={[16, 16]} style={{width: '100%'}}>
{ {
showDataSource.map(v => <Col span={12}><div key={v.id} onClick={() => handleCheck(v)} className={cx('select_style_border', checkedId === v.id ? 'active' : '')}> showDataSource.map(v => <Col span={12} key={v.id}><div onClick={() => handleCheck(v)} className={cx('select_style_border', checkedId === v.id ? 'active' : '')}>
<div> <div>
<Row style={{ color: '#303133' }}> <Row style={{ color: '#303133' }}>
<Col>{v.receiverName}</Col> <Col>{v.receiverName}</Col>
......
...@@ -35,6 +35,14 @@ interface getShopListsParmasProps { ...@@ -35,6 +35,14 @@ interface getShopListsParmasProps {
* 1 为是 * 1 为是
*/ */
hasMemberType?: number; hasMemberType?: number;
/**
* 会员ID
*/
memberId?: number
/**
* 角色ID
*/
roleId?: number
} }
/** /**
...@@ -42,7 +50,7 @@ interface getShopListsParmasProps { ...@@ -42,7 +50,7 @@ interface getShopListsParmasProps {
* @param params 接口参数 * @param params 接口参数
*/ */
export const fectchShopListsSource = async (params?: getShopListsParmasProps) => { export const fectchShopListsSource = async (params?: getShopListsParmasProps) => {
if (postManageWebShopWebAllShop) { if (postManageWebShopWebAll) {
const { data } = await postManageWebShopWebAll({ ...params, siteId: GlobalConfig.global.siteInfo.id }, { ctlType: 'none' }) const { data } = await postManageWebShopWebAll({ ...params, siteId: GlobalConfig.global.siteInfo.id }, { ctlType: 'none' })
return data return data
} }
......
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