Commit 597a4fa1 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents e76ef1eb d0046413
......@@ -121,8 +121,8 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
tableType='small'
currentRef={selfRef}
formRender={(child, ps) => <Row justify='space-between' style={{marginBottom: 16}}>
<Col span={22} style={{ zIndex: 99 }}>{child}</Col>
<Col span={2} style={{ marginTop: 4 }}>{ps}</Col>
<Col style={{ zIndex: 99, width: 'calc(100% - 130px)' }}>{child}</Col>
<Col style={{ marginTop: 4, minWidth: 128 }}>{ps}</Col>
</Row >}
formilyProps={
modalType === 'none' ? null : {
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-08-20 16:15:59
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-28 17:39:18
* @LastEditTime: 2021-07-29 14:08:56
* @Description: 可以带查询的表格,内置 formily,如果需要其他Form可以传入 customRenderSearchForm 配合 reload() 实现查询
*/
import React, { useState, useEffect, useRef, useImperativeHandle } from 'react';
......@@ -90,7 +90,7 @@ const NormalTable: React.ForwardRefRenderFunction<NormalTableRefHandleType, Norm
return {
...prevState,
data: props.dataSource as T[],
totalCount: props.dataSource.length,
totalCount: props.dataSource?.length || 0,
}
});
}
......
......@@ -18,10 +18,18 @@ export const TOP_DOMAIN = process.env.NODE_ENV !== 'development' ? getTopDomainB
// export const TOP_DOMAIN = getTopDomainByHost(GlobalConfig.global.siteInfo.siteUrl)
/**
* 获取平台首页子域名
*/
const getPlatformSubDomain = (defaultSubDomian: string) => {
const siteUrl = GlobalConfig.global.siteInfo.siteUrl
return siteUrl.split('.')[0] || defaultSubDomian
}
/**
* 平台首页域名
*/
export const PLATFORM_DOMAIN = `${REQUEST_HEADER}www.${TOP_DOMAIN}`
export const PLATFORM_DOMAIN = `${REQUEST_HEADER}${getPlatformSubDomain('lx-www')}.${TOP_DOMAIN}`
/**
* 企业商城域名
......
......@@ -306,3 +306,11 @@
.ant-table-filter-column {
justify-content: center !important;
}
// 修复所有输入框不对称搜索
.ant-input-group {
.ant-input {
padding-top: 6px;
padding-bottom: 6px;
}
}
......@@ -88,7 +88,7 @@ const MemberDetail: React.FC<{}> = () => {
if (!keywordName) {
return tableData
}
return tableData.filter(v => v.memberId.toString().includes(keywordName))
return tableData.filter(v => v.name.toString().includes(keywordName))
}, [tableData, keywordName])
const fetchMemberSaleChannel = async (params) => {
const userInfo = formAction.getFieldValue('userId')
......@@ -503,7 +503,7 @@ const MemberDetail: React.FC<{}> = () => {
<Button type='default' onClick={() => unBindMember()} disabled={pageStatus === PageStatus.PREVIEW}>批量解除绑定关系</Button>
</Col>
<Col style={{display: 'flex'}}>
<Input.Search value={keywordName} onChange={e => setKeywordName(e.target.value)} onPressEnter={handleSearchChannel}/>
<Input.Search placeholder='请搜索会员名称' value={keywordName} onChange={e => setKeywordName(e.target.value)} onPressEnter={handleSearchChannel}/>
<Button type='default' style={{marginLeft: 20}} onClick={() => setKeywordName('')}>重置</Button>
</Col>
</Row>
......
......@@ -13,6 +13,7 @@ import { PublicApi } from '@/services/api';
import { store } from '@/store'
import { inject, observer } from 'mobx-react'
import { validatorNumberRange } from '../constant';
const {Item}:any = Form
......@@ -307,28 +308,6 @@ const SetPrice:React.FC<IProps> = (props) => {
setLadderPrice(false)
}
// 校验阶梯范围
const validatorNumberRange = (rule, value, callback) => {
try {
if(Array.isArray(value)){
let range = value.map(item => {
if(item)
return Object.values(item.numberRange)
}).reduce(
function(a, b) {
return a.concat(b);
},
[]
)
let result = range.map(Number).reduce((a, b) => { if(a<b) return b })
if(!result) throw new Error('请正确输入阶梯数量范围');
callback()
}
} catch (err) {
callback(err)
}
}
const onChangeTax = (e) => {
setIsTax(e.target.checked)
}
......
......@@ -9,6 +9,7 @@ import { QuestionCircleOutlined, SettingOutlined, PlusOutlined, MinusOutlined, }
import { inject, observer } from 'mobx-react'
import { store } from '@/store'
import { IProductSelectAttribute } from '@/module/productModule'
import { validatorNumberRange } from '../constant'
const _ = require("lodash");
......@@ -588,56 +589,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
priceForm.setFieldsValue({unitName: option.children})
}
// 校验阶梯范围
const validatorNumberRange = (rule, value, callback) => {
// let minOrder = Number(minOrderNumber)
// let precision;
// if(Number.isInteger(minOrder)) { // 整数取1
// precision = 1
// } else { // 小数取最小精度(最多三位)
// switch(minOrderNumber.toString().split(".")[1].length) {
// case 1:
// precision = 0.1
// break;
// case 2:
// precision = 0.01
// break;
// case 3:
// precision = 0.001
// break;
// default:
// precision = 1
// }
// }
try {
if(Array.isArray(value)){
let range = value.map(item => {
if(item)
return Object.values(item.numberRange)
}).reduce(
function(a, b) {
// // 判断首位数是否满足精度
// if(a.length && b.length) {
// if((Number(b[0])*1000 - Number(a[a.length-1])*1000)/1000 !== precision) {
// throw new Error('请正确输入阶梯数量范围');
// }
// }
return a.concat(b);
},
[]
)
let result = range.map(Number).reduce((a, b) => { if(a<b) return b })
if(!result) throw new Error('请正确输入阶梯数量范围');
if(Number(range[0]) !== Number(minOrderNumber)) throw new Error('阶段的起始值必须为最小起订数');
callback()
}
} catch (err) {
callback(err)
}
}
const clickBatchSetPrice = () => {
// console.log('批量设置价格')
setPriceForm.resetFields() // 先清空
setIsBatchSetting(true) // 点击置为true
setSetPriceModal(true)
......@@ -861,7 +813,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
message: '阶梯范围为必填项'
},
{
validator: validatorNumberRange
validator: (r, v, c) => validatorNumberRange(r, v, c, minOrderNumber)
}
]}
>
......
import { ColumnType } from 'antd/lib/table';
import moment from 'moment';
import React, { ReactNode } from 'react'
/** 商品 渠道商品 快捷修改单价 共用常量 */
/** 商品(渠道商品)状态 */
export const productStatusLabel = [
'',
'待提交审核',
'待审核',
'审核通过',
'审核不通过',
'已上架',
'已下架',
'未上架'
]
/** 品类类型&商品类型 */
export const customerCategoryTypeLabel = [
'',
'实物商品',
'虚拟商品',
'服务商品',
]
/** 商品定价类型 */
export const priceTypeLabel = [
'',
'现货价格',
'价格需要询价',
'积分兑换商品',
]
/** 商品物流类型 */
export const deliveryTypeLabel = [
'',
'物流(默认)',
'自提',
'无需配送',
]
/** 商品运费类型 */
export const carriageTypeLabel = [
'',
'卖家承担运费(默认)',
'买家承担运费',
]
/** 查看商品 审核历史列 */
export const columns: ColumnType<any>[] = [
{
title: '序号',
dataIndex: 'memberRoleId',
key: 'memberRoleId',
render: (t, c, i) => i + 1
},
{
title: '角色',
dataIndex: 'memberRoleName',
key: 'memberRoleName',
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
render: (text:any, record:any) => {
let component: ReactNode = null
if(record.status === 4)
component = (<><span className="commonStatusValid"></span>审核通过</>)
else if(record.status === 1)
component = (<><span className="commonStatusInvalid"></span>待提交审核</>)
else if(record.status === 2)
component = (<><span className="commonStatusModify"></span>待审核</>)
else if(record.status === 3)
component = (<><span className="commonStatusStop"></span>审核不通过</>)
return component
}
},
{
title: '操作',
dataIndex: 'operation',
key: 'operation',
render: (text:any, record:any) => {
if(record.operation === 1)
return '提交审核'
else if(record.operation === 2)
return '修改商品'
else if(record.operation === 3)
return '审核商品'
}
},
{
title: '操作时间',
dataIndex: 'createTime',
key: 'createTime',
render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss")
},
{
title: '意见',
dataIndex: 'checkRemark',
key: 'checkRemark',
},
];
/** 校验阶梯价格函数 min参数判断是否校验最小起订 */
export const validatorNumberRange = (rule: any, value: any, callback: any, min?: any) => {
try {
if(Array.isArray(value)){
let range = value.map(item => {
if(item)
return Object.values(item.numberRange)
}).reduce(
function(a, b) {
return a.concat(b);
},
[]
)
let result = range.map(Number).reduce((a, b) => { if(a<b) return b })
if(!result) throw new Error('请正确输入阶梯数量范围');
if(min && (Number(range[0]) !== Number(min))) throw new Error('阶段的起始值必须为最小起订数');
callback()
}
} catch (err) {
callback(err)
}
}
......@@ -16,6 +16,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { searchCustomerCategoryOptionEffect, searchBrandOptionEffect } from './effect'
import { fastSchema } from './schema/productSchema'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { validatorNumberRange } from './constant'
const formActions = createFormActions();
......@@ -235,54 +236,6 @@ const FastModifyPrice: React.FC<{}> = () => {
}
}
// 校验阶梯范围
const validatorNumberRange = (rule, value, callback) => {
// let minOrder = Number(currentRow.minOrder)
// let precision;
// if(Number.isInteger(minOrder)) { // 整数取1
// precision = 1
// } else { // 小数取最小精度(最多三位)
// switch(minOrder.toString().split(".")[1].length) {
// case 1:
// precision = 0.1
// break;
// case 2:
// precision = 0.01
// break;
// case 3:
// precision = 0.001
// break;
// default:
// precision = 1
// }
// }
try {
if(Array.isArray(value)){
let range = value.map(item => {
if(item)
return Object.values(item.numberRange)
}).reduce(
function(a, b) {
// // 判断首位数是否满足精度
// if(a.length && b.length) {
// if((Number(b[0])*1000 - Number(a[1])*1000)/1000 !== precision) {
// throw new Error('请正确输入阶梯数量范围');
// }
// }
return a.concat(b);
},
[]
)
let result = range.map(Number).reduce((a, b) => { if(a<b) return b })
if(!result) throw new Error('请正确输入阶梯数量范围');
if(Number(range[0]) !== Number(currentRow.minOrder)) throw new Error('阶段的起始值必须为最小起订数');
callback()
}
} catch (err) {
callback(err)
}
}
return (
<PageHeaderWrapper>
<Card>
......@@ -347,7 +300,7 @@ const FastModifyPrice: React.FC<{}> = () => {
message: '阶梯范围为必填项'
},
{
validator: validatorNumberRange
validator: (r, v, c) => validatorNumberRange(r, v, c, currentRow.minOrder)
}
]}
>
......
......@@ -26,6 +26,8 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { searchBrandOptionEffect, searchCustomerCategoryOptionEffect } from './effect'
import { getAuth } from '@/utils/auth'
import useSetSearchValueInTable from '@/hooks/useSetSearchValueInTable'
import { priceTypeLabel, productStatusLabel } from './constant'
import EyePreview from '@/components/EyePreview'
const { Option } = Select;
const { confirm } = Modal;
......@@ -94,7 +96,9 @@ const Products: React.FC<{}> = () => {
className: 'commonPickColor',
width: 240,
ellipsis: true,
render: (text: any, record: any) => <a title={text} onClick={() => handleSee(record)}>{text}&nbsp;<EyeOutlined /></a>
render: (text: any, record: any) => <EyePreview url={`/memberCenter/commodityAbility/commodity/products/detail?id=${record.id}`}>
{text}
</EyePreview>
},
{
title: '商品品类',
......@@ -115,29 +119,7 @@ const Products: React.FC<{}> = () => {
title: '产品定价',
dataIndex: 'priceType',
key: 'priceType',
render: (text:any, reocrd:any)=>{
if(text===1)
return '现货价格'
else if(text===2)
return '价格需要询价'
else if(text===3)
return '积分兑换商品'
},
filters: [
{
text: '现货价格',
value: 1,
},
{
text: '价格需要询价',
value: 2,
},
{
text: '积分兑换商品',
value: 3,
},
],
onFilter: (value, record) => record.priceType === value,
render: (text:any, reocrd:any) => priceTypeLabel[text]
},
{
title: '价格',
......@@ -170,49 +152,7 @@ const Products: React.FC<{}> = () => {
title: '商品状态',
dataIndex: 'status',
key: 'status',
render: (text: any, record: any) => {
let component: ReactNode = null
if (record.status === 1)
component = (<><span className="commonStatusStop"></span>待提交审核</>)
else if (record.status === 2)
component = (<><span className="commonStatusModify"></span>待审核</>)
else if (record.status === 3)
component = (<><span className="commonStatusInvalid"></span>审核不通过</>)
else if (record.status === 4)
component = (<><span className="commonStatusValid"></span>审核通过</>)
else if (record.status === 5)
component = (<span style={{ color: '#00B37A', padding: '2px 5px', background: 'rgba(235,247,242,1)', borderRadius: '4px' }}>已上架</span>)
else if (record.status === 6)
component = (<span style={{ padding: '2px 5px', background: 'rgba(244,245,247,1)', borderRadius: '4px' }}>已下架</span>)
return component
},
filters: [
{
text: '待提交审核',
value: 1,
},
{
text: '待审核',
value: 2,
},
{
text: '审核不通过',
value: 3,
},
{
text: '审核通过',
value: 4,
},
{
text: '已上架',
value: 5,
},
{
text: '已下架',
value: 6,
}
],
onFilter: (value, record) => record.status === value,
render: (text: any, record: any) => <><span className="commonStatusModify"></span>{productStatusLabel[text]}</>
},
{
title: '操作',
......@@ -270,16 +210,11 @@ const Products: React.FC<{}> = () => {
})
}
const handleSee = (record: any) => {
history.push(`/memberCenter/commodityAbility/commodity/products/detail?id=${record.id}`)
}
const clickModify = (id: number) => {
history.push(`/memberCenter/commodityAbility/commodity/products/edit?id=${id}`)
}
const handleCancel = () => {
console.log('cancel')
setImportModal(false)
}
......@@ -288,7 +223,6 @@ const Products: React.FC<{}> = () => {
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectRow(selectedRows);
setSelectedRowKeys(selectedRowKeys);
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
}
}
......
......@@ -10,9 +10,9 @@ import {
} from '@ant-design/icons'
import ReutrnEle from '@/components/ReturnEle';
import styles from './index.less'
import { PublicApi } from '@/services/api';
import { GetLogisticsSelectListCompanyResponse, GetLogisticsSelectListFreightTemplateResponse, GetLogisticsSelectListShipperAddressResponse } from '@/services/LogisticsApi';
import { validatorNumberRange } from './constant';
const layout = {
labelCol: {
......@@ -96,11 +96,9 @@ const ModifyDirectChannel:React.FC<{}> = () => {
PublicApi.getLogisticsSelectListShipperAddress().then(res=>{
setLogisticsAddressList(res.data)
})
PublicApi.getLogisticsSelectListCompany({cooperateType: '2'}).then(res=>{
setLogisticsCompanyLists(res.data)
})
PublicApi.getLogisticsSelectListFreightTemplate().then(res=>{
setLogisticsTemplateList(res.data)
})
......@@ -128,9 +126,6 @@ const ModifyDirectChannel:React.FC<{}> = () => {
idList: priceTableData.map(item => item.id)
}, { ctlType: "none" }).then(res => {
const { data } = res
// let hasIds = priceTableData.map(item => item.id)
// setOriginHasIds(hasIds)
// let _data = data.filter(item => !originHasIds.includes(item.id))
setOriginTableData(data)
if(data.length > 0) {
structureTable(data)
......@@ -261,10 +256,9 @@ const ModifyDirectChannel:React.FC<{}> = () => {
const clickSetPrice = (record: any) => {
setIsBatchSetting(false) // 点击行操作批量置为false
console.log(record, 'record')
setCurrentSetPriceRow(record)
setModifyModal(true)
setPriceForm.resetFields() // 先清空
setPriceForm.resetFields()
if(Object.keys(record['单价'])[0] === '0-0') { // 状态为非阶梯价格
setLadderPrice(false)
setPriceForm.setFieldsValue({ladderPrice: false, uniquePrice: Object.values(record['单价'])[0]})
......@@ -308,9 +302,7 @@ const ModifyDirectChannel:React.FC<{}> = () => {
return _row
} else return item
})
// newTabeData[curretSetPriceRow['索引']] = _row
}
console.log(curretSetPriceRow, _row, _newTabeData, newTabeData, 'option')
setPriceTableData(_newTabeData)
constructedPrarams()
})
......@@ -350,12 +342,10 @@ const ModifyDirectChannel:React.FC<{}> = () => {
})
setSubmitParams(_data)
// console.log(priceTableData, _priceTableData, _data, 'params')
}
const clickDelete = (record: any) => {
setPriceTableData(priceTableData => [...priceTableData].filter(item => item.id != record.id))
// setSelectedSpecRowKeys(selectedSpecRowKeys => [...selectedSpecRowKeys].filter(item => item != record.id))
if(!flagRef.current){
PublicApi.postProductChannelCommodityDeleteChannelCommodityPrice({id: record.id},{ctlType: 'none'})
}
......@@ -367,34 +357,12 @@ const ModifyDirectChannel:React.FC<{}> = () => {
}
const clickBatchSetPrice = () => {
setPriceForm.resetFields() // 先清空
setIsBatchSetting(true) // 点击置为true
setPriceForm.resetFields()
setIsBatchSetting(true)
setModifyModal(true)
setLadderPrice(false)
}
// 校验阶梯范围
const validatorNumberRange = (rule, value, callback) => {
try {
if(Array.isArray(value)){
let range = value.map(item => {
if(item)
return Object.values(item.numberRange)
}).reduce(
function(a, b) {
return a.concat(b);
},
[]
)
let result = range.reduce((a, b) => { if(a<b) return b })
if(!result) throw new Error('请正确输入阶梯数量范围');
callback()
}
} catch (err) {
callback(err)
}
}
const onSave = async () => {
setIsDisabledSave(true)
let logistics = await logisticsForm.validateFields()
......
......@@ -3,9 +3,9 @@ import { history } from 'umi'
import { Card, Space, Row, Col, Descriptions, Table, Avatar } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import ReutrnEle from '@/components/ReturnEle'
import styles from "./index.less"
import { GlobalConfig } from '@/global/config'
import { PublicApi } from '@/services/api'
import { carriageTypeLabel, deliveryTypeLabel, productStatusLabel } from './constant'
const ViewDriectChannel: React.FC<{}> = () => {
const [channelDetails, setChannelDetails] = useState<any>()
......@@ -111,26 +111,14 @@ const ViewDriectChannel: React.FC<{}> = () => {
"单价": item.unitPrice
})
})
console.log(col, 'col', _tableData)
setPriceTableData(_tableData)
}
}
const renderStatus = (status: any) => {
if (status === 5)
return <span className={styles.pruductStatus}>已上架</span>
if (status === 6)
return <span style={{ padding: '2px 5px', background: 'rgba(244,245,247,1)', borderRadius: '4px' }}>已下架</span>
if (status === 7)
return <span style={{ color: '#E63F3B', padding: '2px 5px', background: 'rgba(255,235,230,1)', borderRadius: '4px' }}>未上架</span>
else
return null
}
const content = <>
<Descriptions colon={true} style={{ marginTop: 50 }}>
{
renderStatus(channelDetails?.status) && <Descriptions.Item label="商品状态">{renderStatus(channelDetails?.status)}</Descriptions.Item>
channelDetails?.status && <Descriptions.Item label="商品状态">{productStatusLabel[channelDetails?.status]}</Descriptions.Item>
}
{
channelDetails?.channelCommodity?.source === 1 && <Descriptions.Item label="上级渠道">{channelDetails?.channelCommodity?.parentMemberName}</Descriptions.Item>
......@@ -156,18 +144,6 @@ const ViewDriectChannel: React.FC<{}> = () => {
</Descriptions>
</>
const renderDeliveryType = (type: number) => {
if(type === 1) return '物流(默认)'
else if(type === 2) return '自提'
else if(type === 3) return '无需配送'
else return null
}
const renderCarriageType = (type: number) => {
if(type === 1) return '卖家承担运费(默认)'
if(type === 2) return '买家承担运费'
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
......@@ -229,24 +205,24 @@ const ViewDriectChannel: React.FC<{}> = () => {
<Row>
<Col span={24}>
{
renderDeliveryType(channelDetails?.logistics?.deliveryType) &&
channelDetails?.logistics?.deliveryType &&
<Row>
<Col span={4}>
<p>配送方式:</p>
</Col>
<Col span={20}>
<p>{renderDeliveryType(channelDetails?.logistics?.deliveryType)}</p>
<p>{deliveryTypeLabel[channelDetails?.logistics?.deliveryType]}</p>
</Col>
</Row>
}
{
renderCarriageType(channelDetails?.logistics?.carriageType) &&
channelDetails?.logistics?.carriageType &&
<Row>
<Col span={4}>
<p>运送方式:</p>
</Col>
<Col span={20}>
<p>{renderCarriageType(channelDetails?.logistics?.carriageType)}</p>
<p>{carriageTypeLabel[channelDetails?.logistics?.carriageType]}</p>
</Col>
</Row>
}
......
......@@ -44,7 +44,7 @@ const situationList: React.FC<Iprops> = ({ contractId }) => {
startTime: "",
endTime: "",
current: 1,
pageSize: 5,
pageSize: size,
}
getContracInfoList(data)
}
......@@ -204,16 +204,29 @@ const situationList: React.FC<Iprops> = ({ contractId }) => {
getContracInfoList(data)
};
/* 重置 */
const Reset = () => {
setPage(1);
const data = {
contractId,
orderNo: '',
orderAbstract: '',
startTime: "",
endTime: "",
current: page,
pageSize: size,
}
getContracInfoList(data)
}
useEffect(() => {
if (contractId) {
let data = {
contractId,
current: 1,
pageSize: 8
current: page,
pageSize: size
}
getContracInfoList(data)
}
console.log(data, '13132131')
}, [contractId])
return (
<div id='docking' className='ant-card ant-card-bordered'>
......@@ -229,7 +242,7 @@ const situationList: React.FC<Iprops> = ({ contractId }) => {
allowClear
onSearch={onSearch}
/>
<Button style={{ paddingLeft: 10, paddingRight: 10, marginLeft: 10, marginRight: 10 }}> 重置 </Button>
<Button style={{ paddingLeft: 10, paddingRight: 10, marginLeft: 10, marginRight: 10 }} onClick={Reset}> 重置 </Button>
</div>
</div>
</div>
......
......@@ -71,7 +71,7 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
return new Promise((resolve) => {
const params: any = {
templateId: id,
type: 2,
type: 3,
memberId,
roleId: memberRoleId
}
......
......@@ -44,7 +44,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
tempObject.memberName = item.memberName
for(let j = 0; j < item.evaluationTenderList.length; j++) {
let _item = item['evaluationTenderList'][j]
tempObject.expertExtractRecordId = _item['expertExtractRecord']['id']
tempObject.expertExtractRecordId = _item.expertExtractRecord?.id || _item['sort']
tempObject.score = _item['score']
tempObject.sort = _item['sort']
tempObject.standard = _item['standard']
......
......@@ -44,7 +44,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
tempObject.memberName = item.memberName
for(let j = 0; j < item.evaluationTenderList.length; j++) {
let _item = item['evaluationTenderList'][j]
tempObject.expertExtractRecordId = _item['expertExtractRecord']['id']
tempObject.expertExtractRecordId = _item.expertExtractRecord?.id || _item['sort']
tempObject.score = _item['score']
tempObject.sort = _item['sort']
tempObject.standard = _item['standard']
......
......@@ -44,7 +44,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
tempObject.memberName = item.memberName
for(let j = 0; j < item.evaluationTenderList.length; j++) {
let _item = item['evaluationTenderList'][j]
tempObject.expertExtractRecordId = _item['expertExtractRecord']['id']
tempObject.expertExtractRecordId = _item.expertExtractRecord?.id || _item['sort']
tempObject.score = _item['score']
tempObject.sort = _item['sort']
tempObject.standard = _item['standard']
......
......@@ -44,7 +44,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
tempObject.memberName = item.memberName
for(let j = 0; j < item.evaluationTenderList.length; j++) {
let _item = item['evaluationTenderList'][j]
tempObject.expertExtractRecordId = _item['expertExtractRecord']['id']
tempObject.expertExtractRecordId = _item.expertExtractRecord?.id || _item['sort']
tempObject.score = _item['score']
tempObject.sort = _item['sort']
tempObject.standard = _item['standard']
......
......@@ -46,7 +46,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
if(item.evaluationTenderList)
for(let j = 0; j < item.evaluationTenderList.length; j++) {
let _item = item['evaluationTenderList'][j]
tempObject.expertExtractRecordId = _item['expertExtractRecord']['id']
tempObject.expertExtractRecordId = _item.expertExtractRecord?.id || _item['sort']
tempObject.score = _item['score']
tempObject.sort = _item['sort']
tempObject.standard = _item['standard']
......
......@@ -186,6 +186,7 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
dataIndex: 'createTime',
align: 'center',
key: 'createTime',
render: text => formatTimeString(text, 'YYYY-MM-DD')
},
{
title: '物流单号',
......
......@@ -191,7 +191,7 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
dataIndex: 'createTime',
align: 'center',
key: 'createTime',
// render: text => formatTimeString(text)
render: text => formatTimeString(text, 'YYYY-MM-DD')
},
{
title: '物流单号',
......
......@@ -74,7 +74,6 @@ const orderProductShopTypeMaps = {
export const AddressPop = (props) => {
const { pickInfo = null, children } = props
console.log(pickInfo)
return pickInfo && pickInfo.deliverType === 2 ? <Space>
<EnvironmentOutlined style={{marginRight: 8}}/>
<Popover content={
......
......@@ -286,7 +286,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
if(!data.allContracts) {
const res = await getBindingContracts({id: id.toString(), current: '1', pageSize: '1000', digest: ''})
addSchemaAction.setFieldState('contracts', state => {
state.value = processFields(res.data, false)
state.value = res.data
})
setProductsLength(res.totalCount)
}
......
import React, { useState, useRef, useEffect } from 'react'
import styled from 'styled-components'
import { ISchemaFormProps, ISchemaFieldProps, ISchemaFieldComponentProps, createFormActions, useFieldState } from '@formily/antd'
import { Button, Space, Row, Col, Tag } from 'antd'
import { PlusOutlined, DeleteColumnOutlined, EditOutlined, DeleteOutlined, CaretUpOutlined, CaretDownOutlined, EyeOutlined } from '@ant-design/icons'
import { ISchemaFieldComponentProps, useFieldState } from '@formily/antd'
import { Row, Col, Tag } from 'antd'
import { CaretUpOutlined, CaretDownOutlined } from '@ant-design/icons'
import cx from 'classnames'
import { PublicApi } from '@/services/api'
......@@ -62,7 +62,7 @@ const SelectProcesss = (props: ISchemaFieldComponentProps) => {
const { value, mutators, editable } = props
useEffect(() => {
PublicApi.getOrderTradeProcessBaseList().then(res => {
PublicApi.getOrderPurchaseProcessBaseList().then(res => {
setFieldState({
dataSource: res.data,
showMore
......
......@@ -69,7 +69,7 @@ const PurchaseRules: React.FC<{}> = () => {
>
<Button
type="link"
style={record.status ? { color: '#00B37A' } : { color: 'red' }}>{record.state ? <>有效 <PlayCircleOutlined /></> : <>无效 <PauseCircleOutlined /></>}</Button>
style={record.status ? { color: '#00B37A' } : { color: 'red' }}>{record.status ? <>有效 <PlayCircleOutlined /></> : <>无效 <PauseCircleOutlined /></>}</Button>
</Popconfirm>
)
return component
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-03-02 14:30:30
* @LastEditTime: 2021-07-29 13:40:54
* @Description: 联动逻辑相关
*/
import { Modal, message } from 'antd';
......@@ -388,6 +388,7 @@ export const useBusinessEffects = (context, actions) => {
FormPath.setIn(state, 'originAsyncData', details.map(item => ({
...item,
// 这里的数据以采购、销售订单的为准
price: item.processPrice, // 与采购入库单、销售发货单统一
logistics: {
deliveryType, // 手动赋值配送方式,同一个通知单下的所有商品都是统一的配送方式
},
......@@ -418,7 +419,10 @@ export const useBusinessEffects = (context, actions) => {
value: item.id,
}));
setFieldState('invoicesDetailsRequests.*.product', state => {
FormPath.setIn(state, 'originAsyncData', details);
FormPath.setIn(state, 'originAsyncData', details.map((item) => ({
...item,
price: item.processPrice, // 与采购入库单、销售发货单统一
})));
FormPath.setIn(state, 'props.enum', goodOptions);
});
});
......@@ -731,6 +735,14 @@ export const useBusinessEffects = (context, actions) => {
state.value = current.processNum;
}
);
setFieldState(
FormPath.transform(name, /\d/, $1 => {
return `invoicesDetailsRequests.${$1}.amount`
}),
state => {
state.value = current.processPrice ? `¥${(current.processNum * current.processPrice).toFixed(2)}` : null;
}
);
break;
}
......
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