Commit f52b6d98 authored by GuanHua's avatar GuanHua
parents acc79611 3229623c
......@@ -25,11 +25,12 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
const isDeleved = pathname.indexOf('readyConfirmDelevedOrder') !== -1
// 是否是确认回单页
const isReturn = pathname.indexOf('readyConfirmReturnOrder') !== -1
console.log(isPreview, isDeleved, isReturn)
// 用于储存已经修改过的订单id
const dataRef = useRef<any>([])
const { data, reloadFormData } = useContext(OrderDetailContext)
const { orderReceivingStatisticsResponses, orderDeliveryDetailsResponses, orderModel } = data
const { orderReceivingStatisticsResponses, orderDeliveryDetailsResponses, orderModel, externalState } = data
const creditsCommodity = (orderModel === 24 || orderModel === 25) // 积分或渠道积分下单模式
const outOrderCols: any[] = [
......@@ -113,8 +114,8 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
key: 'differenceCount',
},
]
const sideChildrenCols: any[] = [
{
title: '商品ID',
......@@ -341,10 +342,13 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
childrenDataKey='orderDeliveryProducts'
dataSource={orderDeliveryDetailsResponses}
/>
<Space style={{marginTop: 18, display: "flex", justifyContent: "flex-end"}}>
<Button type="primary" onClick={handelReciveReturnOrder}>确认本单全部发货单已收到回单</Button>
<Button type="primary" onClick={handleContinueDeliver}>继续发货</Button>
</Space>
{
externalState === 11 && !isPreview && isReturn &&
<Space style={{marginTop: 18, display: "flex", justifyContent: "flex-end"}}>
<Button type="primary" onClick={handelReciveReturnOrder}>确认本单全部发货单已收到回单</Button>
<Button type="primary" onClick={handleContinueDeliver}>继续发货</Button>
</Space>
}
</Tabs.TabPane>
}
</Tabs>
......@@ -356,4 +360,4 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
OrderSaleRecord.defaultProps = {}
export default OrderSaleRecord
\ No newline at end of file
export default OrderSaleRecord
......@@ -363,7 +363,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
})
ctl.setData({
...data,
orderProductRequests: newData
orderProductRequests: newData.sort((a, b) => a.id - b.id)
})
};
......@@ -479,7 +479,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
<MellowCard title='订单商品' style={{marginTop: 24}} bordered={false}>
<Table
columns={columns}
dataSource={orderProductRequests}
dataSource={orderProductRequests.sort((a, b) => a.id - b.id)}
components={productComponents}
rowKey='id'
pagination={false}
......
......@@ -4,7 +4,6 @@ import { Row, Space, Popover } from 'antd'
import { DELIVERY_TYPE, OrderModalType, PurchaseOrderOutWorkStateTexts } from '@/constants'
import { EnvironmentOutlined } from '@ant-design/icons'
import { PublicApi } from '@/services/api'
import { toPercent } from '@/utils/type'
// 简单控制价格区间的组件
// @todo 后续需要优化, 样式,目录文件等。
......@@ -71,7 +70,7 @@ export const orderCombination = {
]
}
export const orderTypeLabel = ['',
export const orderTypeLabel = ['',
'现货采购',
'现货采购',
'询价采购',
......@@ -278,15 +277,11 @@ export const productInfoColumns: any[] = [
align: 'left',
key: 'unitPrice',
render: (t, r) => {
// if(r?.commodityId) {
// return <PriceComp priceSection={r.unitPrice}/>
// } else {
// return r.price
// }
if(JSON.stringify(r.unitPrice) === '{}') {
return r.price
} else {
// todo 还差需求报价的商品数据字段对比
if(r?.commodityId) {
return <PriceComp priceSection={r.unitPrice}/>
} else {
return <span style={{color: 'red'}}>{r.price}</span>
}
}
},
......@@ -295,7 +290,7 @@ export const productInfoColumns: any[] = [
dataIndex: 'memberPrice',
align: 'center',
key: 'memberPrice',
render: (text, record) => record.isMemberPrice ? toPercent(text) : null
render: (text, record) => record.isMemberPrice && text ? text * 100 + '%' : null
},
{
title: '采购数量',
......@@ -328,7 +323,7 @@ export const productInfoColumns: any[] = [
render: (t, r) => {
if(r.logistics?.deliveryType === 1)
return "物流(默认)"
else if(r.logistics?.deliveryType === 2)
else if(r.logistics?.deliveryType === 2)
return "自提"
else if(r.logistics?.deliveryType === 3)
return "无需配送"
......@@ -379,4 +374,4 @@ export const mergeOrderColumns: any[] = [
align: 'center',
key: 'none',
}
]
\ No newline at end of file
]
......@@ -59,12 +59,12 @@ const asyncPadDataForProduct = async (ctx: ISchemaFormActions | ISchemaFormAsync
// return v
// }))
// }
// 配送方式请求
// const asyncAddressRequests = productData.filter(v => v.distributeMode !== undefined)
}
export const createEffects = context => () => {
}
export const useModelTypeChange = (callback) => {
......@@ -89,14 +89,13 @@ export const useEditHideField = () => {
export const useProductTableChangeForPay = (ctx: ISchemaFormActions | ISchemaFormAsyncActions, update) => {
FormEffectHooks.onFieldValueChange$('orderProductRequests').subscribe(state => {
const { value } = state
console.log(value, 'vlaue')
const payInfoData = ctx.getFieldValue('paymentInformationResponses')
// 强制渲染一次, 用于触发金额总数
update()
// // 已经存在数据 无需请求
// if (payInfoData && payInfoData.length > 0) {
// } else
// } else
if (value && value.length > 0){
// 请求一次并复制给支付信息
const productItem = value[0]
......@@ -157,7 +156,7 @@ export const useOrderFormInitEffect = (ctx: ISchemaFormActions | ISchemaFormAsyn
// query中存在modelType参数, 则是从其他页面跳转而来,需禁用其余query选项
// 商城跳转过来的数据
const initValue = JSON.parse(window.sessionStorage.getItem(spam_id))
// 从商城跳转, 需回显数据
if (initValue) {
const fn = async (initValue) => {
......@@ -175,17 +174,18 @@ export const useOrderFormInitEffect = (ctx: ISchemaFormActions | ISchemaFormAsyn
prev[next.range] = next.price
return prev
}, {}),
isMemberPrice: !!v.memberDiscount,
isMemberPrice: v.isMemberPrice,
purchaseCount: v.count,
money: v.count * v.unitPrice,
productId: v.id,
memberId: initValue.supplyMembersId, // 添加 memberId 字段
commodityId: v.id, // 添加commodityId用于判断是商品价格是使用price字段还是unitPrice字段(也可判断是报价订单还是其他)
memberPrice: v.memberDiscount !== 1 ? toPercent(v.memberDiscount) : 1, // 添加会员折扣
memberPrice: v.memberDiscount !== 1 ? v.memberDiscount : 1, // 添加会员折扣
}
})))
})
))
}
// 回显的数据保存在表单中, 当切换下单模式时,可以再次回显
ctx.setFieldState('orderModel', state => {
state.remoteDataFn = fn
......@@ -196,7 +196,7 @@ export const useOrderFormInitEffect = (ctx: ISchemaFormActions | ISchemaFormAsyn
fn(initValue)
}
// 写入收货地址数据
useProductAddress(ctx)
})
......@@ -209,7 +209,7 @@ export const useOrderFormInitEffect = (ctx: ISchemaFormActions | ISchemaFormAsyn
}
export const useProductAddress = (ctx: ISchemaFormActions | ISchemaFormAsyncActions) => {
fetchOrderApi.getProductAddressAll().then(data => {
ctx.setFieldState('deliveryAddresId', state => {
if (data.length > 0 && !state.value) {
......
......@@ -55,7 +55,7 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
const receiverAddressId = form.getFieldValue('deliveryAddresId')
const sum = data.reduce((prev, next) => prev + (next.money || 0), 0)
const [freePrice, setFreePrice] = useState<number>(0)
useEffect(() => {
if (sum + freePrice) {
form.notify('sumPrice', sum + freePrice)
......@@ -72,7 +72,7 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
orderProductList: logsiticsDataMaps.map(v => ({
templateId: v.logistics.templateId,
weight: v.logistics.weight,
count: v?.purchaseCount || 0
count: v?.purchaseCount || null
})),
receiverAddressId: typeof receiverAddressId === 'object' ? receiverAddressId.id : receiverAddressId
}, {ttl: 10 * 1000, useCache: true, ctlType: 'none'}).then(res => {
......@@ -84,7 +84,7 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
}
}, [data])
return <RowStyle>
<Col span={2}>
<div>合计金额</div>
......@@ -161,7 +161,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
shopDataRef.current = Object.assign({}, shopDataRef.current, item)
}
}
}, [])
const handleSubmit = async (value) => {
try {
......@@ -274,7 +274,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
// @todo 未实现金额合计
const couponAddButton = <Button onClick={() => productRef.current.setVisible(true)} block type='default' style={{margin: '24px auto'}}>选择优惠券</Button>
// 新增收货地址
const addNewAddress = <Button block icon={<PlusOutlined/>}>新增收货地址</Button>
......@@ -326,25 +326,25 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
]}
>
<ReadyAddOrderDetailContext.Provider value={providerValue}>
{ pageStatus !== PageStatus.ADD && initFormValue && initFormValue.externalWorkflowFlowRecordLogResponses && <AuditProcess
{ pageStatus !== PageStatus.ADD && initFormValue && initFormValue.externalWorkflowFlowRecordLogResponses && <AuditProcess
customTitleKey='operationalProcess'
customKey='state'
outerVerifyCurrent={findLastIndexFlowState(initFormValue.externalWorkflowFlowRecordLogResponses)}
innerVerifyCurrent={findLastIndexFlowState(initFormValue.interiorWorkflowFlowRecordLogResponses)}
outerVerifyCurrent={findLastIndexFlowState(initFormValue.externalWorkflowFlowRecordLogResponses)}
innerVerifyCurrent={findLastIndexFlowState(initFormValue.interiorWorkflowFlowRecordLogResponses)}
outerVerifySteps={
initFormValue.externalWorkflowFlowRecordLogResponses ?
initFormValue.externalWorkflowFlowRecordLogResponses ?
initFormValue.externalWorkflowFlowRecordLogResponses.map(item => ({
...item,
status: item.isExecute ? 'finish' : 'wait',
})) :
...item,
status: item.isExecute ? 'finish' : 'wait',
})) :
[]
}
}
innerVerifySteps={
initFormValue.interiorWorkflowFlowRecordLogResponses ?
initFormValue.interiorWorkflowFlowRecordLogResponses ?
initFormValue.interiorWorkflowFlowRecordLogResponses.map(item => ({
...item,
status: item.isExecute ? 'finish' : 'wait',
})) :
...item,
status: item.isExecute ? 'finish' : 'wait',
})) :
[]
}
></AuditProcess> }
......@@ -416,12 +416,12 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
const { value, editable } = state
// 报价单的值 等同于是否填写过报价单
const quotationOrderValue = ctx.getFieldValue('quotationNo')
// 当选择了手工下单、渠道直采手工下单、渠道现货手工下单、或者选择了合并订单下单并未选择报价单则需要显示商品列表添加接口
if (
value === OrderModalType.HAND_ORDER ||
value === OrderModalType.CHANNEL_DIRECT_MINING_ORDER ||
value === OrderModalType.CHANNEL_SPOT_MANUAL_ORDER ||
value === OrderModalType.CHANNEL_SPOT_MANUAL_ORDER ||
(value === OrderModalType.CONSOLIDATED_ORDER && quotationOrderValue)
) {
addSchemaAction.setFieldState('orderProductRequests', productState => {
......@@ -476,4 +476,4 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
PurchaseOrderDetail.defaultProps = {}
export default PurchaseOrderDetail
\ No newline at end of file
export default PurchaseOrderDetail
......@@ -48,9 +48,9 @@ export const getUnitPriceTotal = (record) => {
// let memberPrice = record.memberPrice !== 1 ? toPoint(record.memberPrice) : 1
let memberPrice = record.memberPrice
if(record.isMemberPrice) {
return unitPrice * purchaseCount * memberPrice
return Number((unitPrice * purchaseCount * memberPrice).toFixed(2))
} else {
return unitPrice * purchaseCount
return Number((unitPrice * purchaseCount).toFixed(2))
}
}
export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActions) => {
......@@ -79,7 +79,7 @@ export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
} else {
return [...productInfoColumns].slice(0, productInfoColumns.length - 1)
}
return productInfoColumns
})
const handleShowProduct = () => {
......@@ -105,7 +105,6 @@ export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
const newData = [...ctx.getFieldValue('orderProductRequests')];
const index = newData.findIndex(item => row.id === item.id);
const item = newData[index];
console.log(getUnitPriceTotal(row), 'row')
row['money'] = getUnitPriceTotal(row)
// 新增的时候接口字段id,commodityId 编辑的时候id,productId
row['productId'] = row?.commodityId ? row.id : row.productId
......@@ -146,4 +145,4 @@ export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
rowSelection,
rowSelectionCtl
}
}
\ No newline at end of file
}
......@@ -184,7 +184,7 @@ const basicInfo: ISchema = {
type: 'number',
display: false
},
orderNo: {
type: 'string',
title: '订单编号',
......@@ -213,7 +213,7 @@ const basicInfo: ISchema = {
},
}
},
}
}
// 订单商品
......@@ -449,7 +449,7 @@ const auditRecord: ISchema = {
}
}
}
}
}
......@@ -485,7 +485,7 @@ const electronicResult: ISchema = {
}
}
}
}
}
// 流转记录
......@@ -597,4 +597,4 @@ export const mergeAllSchemas = {
4: orderElectronicSchema,
// 订单支付
5: orderDetailSchema
}
\ No newline at end of file
}
......@@ -4,7 +4,7 @@ import { Button, Row, Col, Progress, Popconfirm } from 'antd'
import { PublicApi } from '@/services/api'
import EyePreview from '@/components/EyePreview'
import { formatTimeString } from '@/utils'
import { ORDER_TYPE, PurchaseOrderOutWorkState } from '@/constants'
import { ORDER_TYPE, PurchaseOrderInsideWorkState, PurchaseOrderOutWorkState } from '@/constants'
import StatusColors from '../../components/StatusColors'
import { FieldTimeOutlined } from '@ant-design/icons'
import {
......@@ -136,8 +136,8 @@ export const useSelfTable = (props) => {
<Col>{record.currentPayments} / {record.sum}</Col>
{/* <Col>
{
record.currentPayments !== record.sum &&
(record.externalState === PurchaseOrderOutWorkState.PAY_ORDER || record.externalState === PurchaseOrderOutWorkState.CONFIRM_NOT_ARRIVED_ACCOUNT) &&
record.currentPayments !== record.sum &&
(record.externalState === PurchaseOrderOutWorkState.PAY_ORDER || record.externalState === PurchaseOrderOutWorkState.CONFIRM_NOT_ARRIVED_ACCOUNT) &&
<Link to={`/memberCenter/tranactionAbility/purchaseOrder/readyPayOrder/detail?id=${record.id}`}>去支付</Link>
}
</Col> */}
......@@ -152,17 +152,22 @@ export const useSelfTable = (props) => {
key: 'ctl',
render: (text, record) => <>
{
record.currentPayments !== record.sum &&
record.currentPayments !== record.sum &&
(
record.externalState === PurchaseOrderOutWorkState.PAY_ORDER ||
record.externalState === PurchaseOrderOutWorkState.PAY_ORDER ||
record.externalState === PurchaseOrderOutWorkState.CONFIRM_NOT_ARRIVED_ACCOUNT ||
record.externalState === PurchaseOrderOutWorkState.NOT_PAYMENT_FINAL ||
record.externalState === PurchaseOrderOutWorkState.CONFIRM_WITHOUT_ARRIVED_ACCOUNT
) &&
) &&
<Link to={`/memberCenter/tranactionAbility/purchaseOrder/readyPayOrder/detail?id=${record.id}`}>去支付</Link>
}
{
(record.externalState === PurchaseOrderOutWorkState.PAY_ORDER && !record.signatureLogId || record.externalState === PurchaseOrderOutWorkState.CONFIRM_NOT_ARRIVED_ACCOUNT) &&
(
record.externalState === PurchaseOrderOutWorkState.PAY_ORDER &&
!record.signatureLogId ||
record.externalState === PurchaseOrderOutWorkState.CONFIRM_NOT_ARRIVED_ACCOUNT &&
record.interiorState !== PurchaseOrderInsideWorkState.PAY_SUCCESS
) &&
<Popconfirm
title="是否要取消该订单?"
onConfirm={() => handleCancel(record.id)}
......
......@@ -64,7 +64,7 @@ export const useSelfTable = () => {
},
{ title: '收货批次', align: 'center', dataIndex: 'shipmentBatch', key: 'shipmentBatch', render: text => text ? `第${text}次` : '' },
// @todo 收货单号跳转
{ title: '入库单号', align: 'center', dataIndex: 'invoiceNumber', key: 'invoiceNumber', render: text => <Link to={'/'}>{text}</Link> },
{ title: '收货单号', align: 'center', dataIndex: 'invoiceNumber', key: 'invoiceNumber', render: text => <Link to={'/'}>{text}</Link> },
{
title: '订单类型',
align: 'center',
......@@ -93,7 +93,7 @@ export const useSelfTable = () => {
key: 'ctl',
render: (text, record) => <>
{/* 支付结果确认到账= 待审核状态 */}
{ (record.interiorState === PurchaseOrderInsideWorkState.CONFIRM_RECEIPT || record.interiorState === PurchaseOrderInsideWorkState.HAND_RECEIPT_ORDER) &&
{ (record.interiorState === PurchaseOrderInsideWorkState.CONFIRM_RECEIPT || record.interiorState === PurchaseOrderInsideWorkState.HAND_RECEIPT_ORDER) &&
<Button type='link' onClick={() => handleConfirm(record)}>确认收货</Button>
}
</>
......
......@@ -12,7 +12,6 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
// 待确认支付结果订单
export interface FirstApprovedOrderProps {}
......@@ -64,4 +63,4 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
FirstApprovedOrder.defaultProps = {}
export default FirstApprovedOrder
\ No newline at end of file
export default FirstApprovedOrder
......@@ -64,7 +64,13 @@ export const useSelfTable = () => {
},
{ title: '发货批次', align: 'center', dataIndex: 'shipmentBatch', key: 'shipmentBatch', render: text => text ? `第${text}次` : '' },
// @todo 发货单号跳转
{ title: '发货单号', align: 'center', dataIndex: 'invoiceNumber', key: 'invoiceNumber', render: text => <Link to={'/'}>{text}</Link> },
{
title: '发货单号',
align: 'center',
dataIndex: 'invoiceNumber',
key: 'invoiceNumber',
render: (text, record) => <Link to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.invoiceId}&preview=1`}>{text}</Link>
},
// { title: '当前支付', align: 'center', dataIndex: 'currentPayments', render: (text, record) => text},
{
title: '订单类型',
......@@ -94,10 +100,10 @@ export const useSelfTable = () => {
key: 'ctl',
render: (text, record) => <>
{/* 支付结果确认到账= 待审核状态 */}
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.READY_DELEVED_APPROVED &&
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.READY_DELEVED_APPROVED &&
<Button type='link' onClick={() => handleConfirm(record)}>审核</Button>
}
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.SALE_CREATE_DELIVED_ORDER &&
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.SALE_CREATE_DELIVED_ORDER &&
<Button type='link' onClick={() => handleAdd(record)}>新增发货单</Button>
}
</>
......
......@@ -60,7 +60,7 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'sumPrice',
key: 'sumPrice',
render: text => '¥' + text
render: (t, r) => (r.type === 7 || r.type === 8) ? t : '¥' + t
},
{ title: '发货批次', align: 'center', dataIndex: 'shipmentBatch', key: 'shipmentBatch', render: text => text ? `第${text}次` : '' },
// @todo 发货单号跳转
......@@ -93,7 +93,7 @@ export const useSelfTable = () => {
key: 'ctl',
render: (text, record) => <>
{/* 支付结果确认到账= 待审核状态 */}
{ (record.purchaseOrderInteriorState === SaleOrderInsideWorkState.CONFIRM_DELIVERY_ORDER || record.purchaseOrderInteriorState === SaleOrderInsideWorkState.HAND_DELEVED_ORDER) &&
{ (record.purchaseOrderInteriorState === SaleOrderInsideWorkState.CONFIRM_DELIVERY_ORDER || record.purchaseOrderInteriorState === SaleOrderInsideWorkState.HAND_DELEVED_ORDER) &&
<Button type='link' onClick={() => handleConfirm(record)}>确认发货</Button>
}
</>
......
......@@ -78,29 +78,29 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
const tableAddButton = <Button style={{marginBottom: 16}} block icon={<PlusOutlined/>} disabled={pageStatus === PageStatus.PREVIEW} onClick={handleAddProductBtn} type='dashed'>选择指定商品</Button>
const tableColumns = [
{
{
dataIndex: 'id',
title: 'ID',
key: 'id'
},
{
dataIndex: 'name',
title: '商品名称',
{
dataIndex: 'name',
title: '商品名称',
key: 'name',
render: (_, record) => <EyePreview url={`/memberCenter/commodityAbility/commodity/products/detail?id=${record.commodityId}`}>{_}</EyePreview>
render: (_, record) => <EyePreview url={`/memberCenter/commodityAbility/commodity/products/detail?id=${record.commodityId}`}>{_}</EyePreview>
},
{
dataIndex: 'customerCategoryName',
title: '品类',
title: '品类',
key: 'customerCategoryName'
},
{
dataIndex: 'brandName',
{
dataIndex: 'brandName',
title: '品牌',
key: 'brandName'
},
{
dataIndex: 'priceType',
{
dataIndex: 'priceType',
title: '商品定价',
key: 'priceType',
render: (text:any, reocrd:any)=>{
......@@ -112,10 +112,10 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
return '积分兑换商品'
},
},
{
dataIndex: 'ctl',
title: '操作',
render: (_, record) => <Button type='link' disabled={pageStatus === PageStatus.PREVIEW} onClick={() => handleDeleteTable(record.id)}>删除</Button>
{
dataIndex: 'ctl',
title: '操作',
render: (_, record) => <Button type='link' disabled={pageStatus === PageStatus.PREVIEW} onClick={() => handleDeleteTable(record.id)}>删除</Button>
}
]
......@@ -136,28 +136,28 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
}
const columnsSetProduct: any[] = [
{
{
dataIndex: 'id',
title: 'ID',
key: 'id'
},
{
dataIndex: 'name',
title: '商品名称',
{
dataIndex: 'name',
title: '商品名称',
key: 'name'
},
{
dataIndex: 'customerCategoryName',
{
dataIndex: 'customerCategoryName',
title: '品类',
key: 'customerCategoryName'
},
{
dataIndex: 'brandName',
title: '品牌',
{
dataIndex: 'brandName',
title: '品牌',
key: 'brandName'
},
{
dataIndex: 'priceType',
{
dataIndex: 'priceType',
title: '商品定价',
key: 'priceType',
render: (text:any, reocrd:any)=>{
......@@ -203,7 +203,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
"x-component": 'SearchSelect',
"x-component-props": {
placeholder: '请选择品类',
className: 'fixed-ant-selected-down',
className: 'fixed-ant-selected-down',
fetchSearch: PublicApi.getProductSelectGetSelectCustomerCategory,
style: {
width: 160
......@@ -239,7 +239,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
async function getInitValue() {
const { data } = await PublicApi.getOrderTradingRulesDetails({id: id})
if(data.isTacitlyApprove === 2) {
const res = await getBindingProducts({id: id.toString(), current: '1', pageSize: '10'})
const res = await getBindingProducts({id: id.toString(), current: '1', pageSize: '1000'})
addSchemaAction.setFieldState('products', state => {
state.value = res.data
})
......@@ -289,7 +289,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
productsLength
}}
components={{
SelectProcesss,
SelectProcesss,
}}
effects={($, { setFieldState }) => {
FormEffectHooks.onFormInputChange$().subscribe(() => {
......@@ -324,9 +324,9 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
fetchTableData={params => fetchProductList(params)}
formilyProps={
{
ctx: {
schema: formProduct,
components: {
ctx: {
schema: formProduct,
components: {
ModalSearch: Search,
SearchSelect, Submit,
} ,
......@@ -347,10 +347,10 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
/>
</>
)
}
RuleSetting.defaultProps = {}
export default RuleSetting
\ No newline at end of file
export default RuleSetting
......@@ -176,7 +176,6 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
rowKey: 'id',
columns: "{{tableColumns}}",
prefix: "{{tableAddButton}}",
idNotList: []
}
}
}
......
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