Commit 9c848afe authored by XieZhiXiong's avatar XieZhiXiong
parents 6186b2b2 e16b20bb
......@@ -86,7 +86,7 @@
"chalk": "^4.1.0",
"clone": "^2.1.2",
"connect-history-api-fallback": "^1.6.0",
"cross-env": "^7.0.2",
"cross-env": "^7.0.3",
"events": "^3.2.0",
"express": "^4.17.1",
"fs-extra": "^9.0.1",
......
......@@ -28,6 +28,9 @@ console.log(`\n当前访问的后端url是${remoteUrl}!!!!!!`)
const axios = Axios.create({
baseURL: remoteUrl,
responseType: 'json',
headers: {
"source": "1"
}
})
if (!SITE_ID) {
......@@ -134,4 +137,4 @@ async function batchAxiosHttps() {
return isDemo ? Object.assign(asyncHttpQueue, await demoFetch()) : asyncHttpQueue
}
exports.fetchConfig = batchAxiosHttps
\ No newline at end of file
exports.fetchConfig = batchAxiosHttps
import React, { useRef, useEffect, useState } from 'react'
import { Input } from 'antd';
import styled from 'styled-components'
/**
* 自定义数值范围控件
*/
const RowStyleLayout = styled(props => <div {...props} />)`
.site-input-split {
background-color: #fff;
}
.site-input-right {
border-left-width: 0;
}
.site-input-right:hover,
.site-input-right:focus {
border-left-width: 1px;
}
.ant-input-rtl.site-input-right {
border-right-width: 0;
}
.ant-input-rtl.site-input-right:hover,
.ant-input-rtl.site-input-right:focus {
border-right-width: 1px;
}
`
const NumberRange = (props) => {
const { value, mutators } = props
const { placeholder = [], ...rest } = props.props["x-component-props"] || {}
const [rangeValue, setrangeValue] = useState([])
useEffect(() => {
if(rangeValue.length) {
mutators.change(rangeValue);
}
}, [rangeValue])
const loseBlur = (e, index) => {
setrangeValue(() => {
let newValue = [...rangeValue]
newValue[index] = e.target.value
return newValue
})
}
return (
<RowStyleLayout>
<Input.Group compact {...rest}>
<Input
style={{
width: 100,
textAlign: 'center'
}}
placeholder={placeholder[0] || '最小值'}
onBlur={(e) => loseBlur(e, 0)}
/>
<Input
className="site-input-split"
style={{
width: 30,
borderLeft: 0,
borderRight: 0,
pointerEvents: 'none',
}}
placeholder="~"
disabled
/>
<Input
className="site-input-right"
style={{
width: 100,
textAlign: 'center',
}}
placeholder={placeholder[1] || '最大值'}
onBlur={(e) => loseBlur(e, 1)}
/>
</Input.Group>
</RowStyleLayout>
)
}
NumberRange.defaultProps = {}
NumberRange.isFieldComponent = true;
export default NumberRange
\ No newline at end of file
import React, { useRef, useEffect, useState } from 'react'
import { Input } from 'antd';
import styled from 'styled-components'
/**
* 自定义数值范围控件
*/
const RowStyleLayout = styled(props => <div {...props} />)`
.site-input-split {
background-color: #fff;
}
.site-input-right {
border-left-width: 0;
}
.site-input-right:hover,
.site-input-right:focus {
border-left-width: 1px;
}
.ant-input-rtl.site-input-right {
border-right-width: 0;
}
.ant-input-rtl.site-input-right:hover,
.ant-input-rtl.site-input-right:focus {
border-right-width: 1px;
}
`
const NumberRange = (props) => {
const { value, mutators } = props
const { placeholder = [], ...rest } = props.props["x-component-props"] || {}
const [rangeValue, setrangeValue] = useState([])
useEffect(() => {
if(rangeValue.length) {
mutators.change(rangeValue);
}
}, [rangeValue])
const loseBlur = (e, index) => {
setrangeValue(() => {
let newValue = [...rangeValue]
newValue[index] = e.target.value
return newValue
})
}
return (
<RowStyleLayout>
<Input.Group compact {...rest}>
<Input
style={{
width: 100,
textAlign: 'center'
}}
placeholder={placeholder[0] || '最小值'}
onBlur={(e) => loseBlur(e, 0)}
/>
<Input
className="site-input-split"
style={{
width: 30,
borderLeft: 0,
borderRight: 0,
pointerEvents: 'none',
background: '#fff',
}}
placeholder="~"
disabled
/>
<Input
className="site-input-right"
style={{
width: 100,
textAlign: 'center',
}}
placeholder={placeholder[1] || '最大值'}
onBlur={(e) => loseBlur(e, 1)}
/>
</Input.Group>
</RowStyleLayout>
)
}
NumberRange.defaultProps = {}
NumberRange.isFieldComponent = true;
export default NumberRange
This diff is collapsed.
......@@ -60,7 +60,7 @@ const AccountDetail: React.FC<{}> = () => {
title: '交易时间',
dataIndex: 'tradeTime',
key: 'tradeTime',
render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss")
render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss")
},
{
title: '交易金额(元)',
......@@ -91,7 +91,7 @@ const AccountDetail: React.FC<{}> = () => {
let amount = (details.accountBalance*100 - details.lockBalance*100)/100
setWidthdrawAmount(amount)
}
// 提交提现申请
const handleSubmitApply = () => {
setBtnLoading(true)
......@@ -135,8 +135,8 @@ const AccountDetail: React.FC<{}> = () => {
<Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="账户提现">
<Row gutter={100}>
<Col
// span={8}
<Col
// span={8}
xxl={8}
xl={12}
lg={12}
......@@ -157,8 +157,8 @@ const AccountDetail: React.FC<{}> = () => {
min={0}
/>
<Button
type="text"
size="small"
type="text"
size="small"
style={{marginLeft:24, color:'#fff'}}
onClick={handleAllCharge}
>
......@@ -173,28 +173,28 @@ const AccountDetail: React.FC<{}> = () => {
</div>
</div>
<div className={styles['repayment-right']}>
<Button ghost onClick={handleSubmitApply} loading={btnLoading}>提交</Button>
<Button ghost onClick={handleSubmitApply} loading={btnLoading} disabled={bankDetail ? false: true}>提交</Button>
</div>
</div>
</Col>
<Col
// span={16}
<Col
// span={16}
xxl={16}
xl={12}
lg={12}
>
<div className={styles.infoRight}>
<Row>
<Col
// span={4}
<Col
// span={4}
xxl={4}
xl={10}
lg={10}
>
<p className={styles.rightTitle}>账户归属:</p>
</Col>
<Col
// span={20}
<Col
// span={20}
xxl={20}
xl={14}
lg={14}
......@@ -203,16 +203,16 @@ const AccountDetail: React.FC<{}> = () => {
</Col>
</Row>
<Row>
<Col
// span={4}
<Col
// span={4}
xxl={4}
xl={10}
lg={10}
>
<p className={styles.rightTitle}>银行账号:</p>
</Col>
<Col
// span={20}
<Col
// span={20}
xxl={20}
xl={14}
lg={14}
......@@ -221,16 +221,16 @@ const AccountDetail: React.FC<{}> = () => {
</Col>
</Row>
<Row>
<Col
// span={4}
<Col
// span={4}
xxl={4}
xl={10}
lg={10}
>
<p className={styles.rightTitle}>开户行:</p>
</Col>
<Col
// span={20}
<Col
// span={20}
xxl={20}
xl={14}
lg={14}
......@@ -246,8 +246,8 @@ const AccountDetail: React.FC<{}> = () => {
<Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="账户信息">
<Row gutter={100}>
<Col
// span={8}
<Col
// span={8}
xxl={8}
xl={12}
lg={12}
......@@ -268,24 +268,24 @@ const AccountDetail: React.FC<{}> = () => {
</div>
</div>
</Col>
<Col
// span={16}
<Col
// span={16}
xxl={16}
xl={12}
lg={12}
>
<div className={styles.infoRight}>
<Row>
<Col
// span={4}
<Col
// span={4}
xxl={4}
xl={10}
lg={10}
>
<p className={styles.rightTitle}>账户归属:</p>
</Col>
<Col
// span={20}
<Col
// span={20}
xxl={20}
xl={14}
lg={14}
......@@ -294,16 +294,16 @@ const AccountDetail: React.FC<{}> = () => {
</Col>
</Row>
<Row>
<Col
// span={4}
<Col
// span={4}
xxl={4}
xl={10}
lg={10}
>
<p className={styles.rightTitle}>账户余额(元):</p>
</Col>
<Col
// span={20}
<Col
// span={20}
xxl={20}
xl={14}
lg={14}
......@@ -312,16 +312,16 @@ const AccountDetail: React.FC<{}> = () => {
</Col>
</Row>
<Row>
<Col
// span={4}
<Col
// span={4}
xxl={4}
xl={10}
lg={10}
>
<p className={styles.rightTitle}>锁定金额(元):</p>
</Col>
<Col
// span={20}
<Col
// span={20}
xxl={20}
xl={14}
lg={14}
......@@ -330,16 +330,16 @@ const AccountDetail: React.FC<{}> = () => {
</Col>
</Row>
<Row>
<Col
// span={4}
<Col
// span={4}
xxl={4}
xl={10}
lg={10}
>
<p className={styles.rightTitle}>账户状态:</p>
</Col>
<Col
// span={20}
<Col
// span={20}
xxl={20}
xl={14}
lg={14}
......
......@@ -22,7 +22,7 @@ const modelTitle = {
const InvoiceModal:React.FC<InvoiceModalProps> = (props) => {
const { mode, formInitValue } = props
const selfInitValue = useMemo(() => mode === 'add' ? null : formInitValue, [mode, formInitValue])
const selfInitValue = useMemo(() => mode === 'add' ? null : formInitValue, [mode, formInitValue])
// 由于默认是number类型, 但switch组件只接收boolean
if (selfInitValue) {
selfInitValue.isDefault = !!selfInitValue.isDefault
......@@ -72,4 +72,4 @@ const InvoiceModal:React.FC<InvoiceModalProps> = (props) => {
InvoiceModal.defaultProps = {}
export default InvoiceModal
\ No newline at end of file
export default InvoiceModal
......@@ -12,11 +12,12 @@ const addressSchema: ISchema = {
labelAlign: 'left',
labelCol: 4,
wrapperCol: 20,
full: true
full: true,
},
properties: {
type: {
type: 'radio',
required: true,
title: '开具类型',
enum: [
{
......@@ -29,12 +30,6 @@ const addressSchema: ISchema = {
}
],
default: 1,
"x-rules": [
{
required: true,
message: '请选择开具类型'
},
],
"x-linkages": [
{
type: 'value:visible',
......@@ -45,6 +40,7 @@ const addressSchema: ISchema = {
},
kind: {
type: 'radio',
required: true,
title: '发票种类',
enum: [
{
......@@ -57,39 +53,35 @@ const addressSchema: ISchema = {
}
],
default: 1,
"x-rules": [
{
required: true,
message: '请选择开具类型'
}
]
},
invoiceTitle: {
type: 'string',
required: true,
title: '发票抬头',
"x-rules": [
{
required: true,
message: '请输入发票抬头'
},
{
limitByte: true,
maxByte: 40
},
{
required: true,
message: '请输入发票抬头'
}
]
},
taxNo: {
type: 'string',
required: true,
title: '纳税号',
"x-rules": [
{
required: true,
message: '请输入纳税号'
},
{
limitByte: true,
maxByte: 20
},
{
required: true,
message: '请输入纳税号'
}
]
},
bankOfDeposit: {
......@@ -139,4 +131,4 @@ const addressSchema: ISchema = {
}
}
export default addressSchema
\ No newline at end of file
export default addressSchema
......@@ -87,7 +87,6 @@ export const PayInfoCell:React.FC<PayInfoCellProps> = ({
}
case 'select': {
const { options, ...rest } = formItemProps
// 支付方式
if (dataIndex === 'payWay') {
return <Select ref={formItemRef}
......@@ -97,7 +96,7 @@ export const PayInfoCell:React.FC<PayInfoCellProps> = ({
setChildOptions(result.payList.map(v => ({label: v.way, value: v.id})))
form.setFieldsValue({channel: ''})
save(e)
}}
}}
{...rest}
id={formId}
/>
......@@ -106,21 +105,21 @@ export const PayInfoCell:React.FC<PayInfoCellProps> = ({
// 需联动的内容
if (dataIndex === 'channel') {
return <Select
ref={formItemRef}
onChange={save}
ref={formItemRef}
onChange={save}
options={childOptions}
{...rest}
id={formId}
/>
}
}
}
}
let childNode = children;
if (editable) {
childNode = (forceEdit) ? (
<Form.Item
......@@ -146,4 +145,4 @@ export const PayInfoCell:React.FC<PayInfoCellProps> = ({
PayInfoCell.defaultProps = {}
export default PayInfoCell
\ No newline at end of file
export default PayInfoCell
......@@ -92,7 +92,7 @@ export const filterProductDataById = (data, targetData) => {
next.category = next.category || next.customerCategoryName
next.unit = next.unit || next.unitName
next.productName = next.productName || next.name
if (logistics.deliveryType === 2) {
const { code, data } = await PublicApi.getLogisticsShipperAddressGet({
id: logistics.sendAddress
......@@ -118,7 +118,7 @@ export const filterProductDataById = (data, targetData) => {
prev.push(next)
}
return prev
}, [])
}
......@@ -138,7 +138,12 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => {
const handleConfirmProduct = async () => {
// 判断所选择的商品是否属于同一个工作流
const res = await PublicApi.postOrderIsWorkFlow({memberId: rowSelectionCtl.selectRow[0].memberId, productIds: rowSelectionCtl.selectedRowKeys}, { ctlType: 'none' })
const res = await PublicApi.postOrderIsWorkFlow({
memberId: rowSelectionCtl.selectRow[0].memberId,
memberRoleId: rowSelectionCtl.selectRow[0].memberRoleId,
productIds: rowSelectionCtl.selectedRowKeys,
orderModel: schemaAction.getFieldValue('orderModel')
}, { ctlType: 'none' })
if (res.code === 1000) {
const productData = schemaAction.getFieldValue('orderProductRequests')
......@@ -192,4 +197,4 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => {
ProductModalTable.defaultProps = {}
export default ProductModalTable
\ No newline at end of file
export default ProductModalTable
......@@ -63,7 +63,6 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
}, [sum, freePrice])
useEffect(() => {
// 存在商品 并且有选择收货地址,则开始计算运费
console.log(data,'ddd')
if (data && data.length > 0 && receiverAddressId) {
// 筛选配送方式为物流的商品并且使用了运费模板
const logsiticsDataMaps = data.filter(v => v.logistics && v.logistics.useTemplate && v.logistics.deliveryType === 1)
......
......@@ -69,7 +69,6 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
// }, [])
useEffect(() => {
console.log(memberId, 'memberId')
// 当选择报价单/会员/商品时有memberId传入时 调用支付方式api
if(memberId) {
getPayLists(memberId)
......@@ -100,16 +99,14 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
...item,
...row,
});
console.log(newData)
console.log(productSumPrice)
ctx.setFieldValue('paymentInformationResponses', newData)
resolve({item, newData})
})
};
return [
columns,
components,
handleSave
]
}
\ No newline at end of file
}
......@@ -62,4 +62,4 @@ const SecondApprovedOrderDetail: React.FC = () => {
);
};
export default SecondApprovedOrderDetail;
\ No newline at end of file
export default SecondApprovedOrderDetail;
......@@ -69,7 +69,7 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'invoiceNumber',
key: 'invoiceNumber',
render: (text, record) => <Link to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.invoiceId}&preview=1`}>{text}</Link>
render: (text, record) => <Link to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.orderDeliveryDetailsId}&preview=1`}>{text}</Link>
},
// { title: '当前支付', align: 'center', dataIndex: 'currentPayments', render: (text, record) => text},
{
......
......@@ -22,10 +22,11 @@ const FirstApprovedOrderDetail: React.FC = () => {
// 提交表单
const handleSubmit = useCallback(() => {
approvedRef.current.actions.submit().then(async () => {
approvedRef.current.actions.submit().then(async (v) => {
const params = {
id: Number(id),
state: 1
state: v.values.state,
cause: v.values.cause,
}
const result = await run(params)
......@@ -62,4 +63,4 @@ const FirstApprovedOrderDetail: React.FC = () => {
);
};
export default FirstApprovedOrderDetail;
\ No newline at end of file
export default FirstApprovedOrderDetail;
......@@ -54,7 +54,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.orderDeliveryDetailsId}&preview=1`}>{text}</Link>
},
// { title: '当前支付', align: 'center', dataIndex: 'currentPayments', render: (text, record) => text},
{
title: '订单类型',
......@@ -83,10 +89,10 @@ export const useSelfTable = () => {
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <>
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.ADD_LOGISTICS_ORDER &&
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.ADD_LOGISTICS_ORDER &&
<Button type='link' onClick={() => handleConfirm(record)}>新增物流单</Button>
}
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.DELIVERY_APPROVED_SUCCESS &&
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.DELIVERY_APPROVED_SUCCESS &&
<Button type='link' onClick={() => handlePreview(record)}>查看物流单</Button>
}
</>
......
......@@ -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.orderDeliveryDetailsId}&preview=1`}>{text}</Link>
},
{
title: '订单类型',
align: 'center',
......
......@@ -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.orderDeliveryDetailsId}&preview=1`}>{text}</Link>
},
{
title: '订单类型',
align: 'center',
......@@ -93,7 +99,7 @@ export const useSelfTable = () => {
key: 'ctl',
render: (text, record) => <>
{/* 支付结果确认到账= 待审核状态 */}
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.CONFIRM_RECEIPT &&
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.CONFIRM_RECEIPT &&
<Button type='link' onClick={() => handleConfirm(record)}>确认回单</Button>
}
</>
......
......@@ -22,10 +22,11 @@ const SecondApprovedOrderDetail: React.FC = () => {
// 提交表单
const handleSubmit = useCallback(() => {
approvedRef.current.actions.submit().then(async () => {
approvedRef.current.actions.submit().then(async (v) => {
const params = {
id: Number(id),
state: approvedRef.current.actions.getFieldValue('state')
state: v.values.state,
cause: v.values.cause,
}
const result = await run(params)
......@@ -62,4 +63,4 @@ const SecondApprovedOrderDetail: React.FC = () => {
);
};
export default SecondApprovedOrderDetail;
\ No newline at end of file
export default SecondApprovedOrderDetail;
......@@ -38,8 +38,8 @@ const Unevaluated: React.FC = () => {
{
title: '订单摘要',
dataIndex: 'orderThe',
align: 'center',
ellipsis: true,
align: 'center',
ellipsis: true,
},
{
title: '采购会员',
......@@ -61,7 +61,7 @@ const Unevaluated: React.FC = () => {
{
title: '订单类型',
dataIndex: 'type',
align: 'center',
align: 'center',
render: text => ORDER_TYPE2[text],
},
{
......@@ -144,4 +144,4 @@ const Unevaluated: React.FC = () => {
);
};
export default Unevaluated;
\ No newline at end of file
export default Unevaluated;
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