Commit 39989d1b authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

🐞 fix: 修复商品询价BUG

parent 01bc2d1c
......@@ -62,9 +62,10 @@ const Table: React.FC<Iprops> = (props: any) => {
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<number>>([]);
const rowSelection = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
fetchRowkeys(selectedRowKeys)
setSelectedRowKeys(selectedRowKeys);
onChange: (rowKeys: any) => {
console.log(rowKeys, 98)
fetchRowkeys(rowKeys)
setSelectedRowKeys(rowKeys);
},
}
......@@ -108,7 +109,9 @@ const Table: React.FC<Iprops> = (props: any) => {
controlRender={
<NiceForm
actions={formActions}
expressionScope={{ controllerBtns }}
components={{
controllerBtns: () => controllerBtns,
}}
onSubmit={values => search(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, effects, FORM_FILTER_PATH)
......
......@@ -23,7 +23,7 @@ export interface ProgressProps {
const RecordLayout: React.FC<ProgressProps> = (props: any) => {
const { logstate } = props;
const context = useContext(Context);
const [logStatus, setLogStatus] = useState<number>(logstate || LOGSTATESTYPE.EXTERNALSTATES);
const [logStatus, setLogStatus] = useState<number>(context.externalLogs ? LOGSTATESTYPE.EXTERNALSTATES : LOGSTATESTYPE.INTERIORSTATES );
return (
<Card
......@@ -32,10 +32,12 @@ const RecordLayout: React.FC<ProgressProps> = (props: any) => {
extra={
<Radio.Group
onChange={(e) => setLogStatus(e.target.value)}
defaultValue={logStatus}
defaultValue={context.externalLogs ? LOGSTATESTYPE.EXTERNALSTATES : LOGSTATESTYPE.INTERIORSTATES}
>
{context.externalLogs && <Radio.Button value={LOGSTATESTYPE.EXTERNALSTATES}>外部流转</Radio.Button>}
{context.interiorLogs && <Radio.Button value={LOGSTATESTYPE.INTERIORSTATES}>内部流转</Radio.Button>}
{/* {context.externalLogs && <Radio.Button value={LOGSTATESTYPE.EXTERNALSTATES}>外部流转</Radio.Button>}
{context.interiorLogs && <Radio.Button value={LOGSTATESTYPE.INTERIORSTATES}>内部流转</Radio.Button>} */}
<Radio.Button value={LOGSTATESTYPE.EXTERNALSTATES}>外部流转</Radio.Button>
<Radio.Button value={LOGSTATESTYPE.INTERIORSTATES}>内部流转</Radio.Button>
</Radio.Group>
}
>
......
......@@ -53,7 +53,7 @@ export const OFFERSEARCHSCHEMA: ISchema = {
memberName: {
type: "string",
"x-component-props": {
placeholder: "价会员"
placeholder: "价会员"
}
},
details: {
......
......@@ -13,10 +13,7 @@ export const WAITAUDITINQUIRYONESCHEMA: ISchema = {
properties: {
ctl: {
type: "object",
"x-component": "Children",
"x-component-props": {
children: "{{controllerBtns}}"
}
"x-component": "controllerBtns",
},
quotationNo: {//报价单号
type: "string",
......
......@@ -13,10 +13,7 @@ export const WAITAUDITINQUIRYTWOSCHEMA: ISchema = {
properties: {
ctl: {
type: "object",
"x-component": "Children",
"x-component-props": {
children: "{{controllerBtns}}"
}
"x-component": "controllerBtns",
},
quotationNo: {//报价单号
type: "string",
......
......@@ -13,10 +13,7 @@ export const WAITSUBMITAUDITOFFERSCHEMA: ISchema = {
properties: {
ctl: {
type: "object",
"x-component": "Children",
"x-component-props": {
children: "{{controllerBtns}}"
}
"x-component": "controllerBtns",
},
quotationNo: {//报价单号
type: "string",
......
......@@ -13,10 +13,7 @@ export const WAITSUBMITOFFERSCHEMA: ISchema = {
properties: {
ctl: {
type: "object",
"x-component": "Children",
"x-component-props": {
children: "{{controllerBtns}}"
}
"x-component": "controllerBtns",
},
quotationNo: {//报价单号
type: "string",
......
......@@ -13,10 +13,7 @@ export const WAITADDOFFERSCHEMA: ISchema = {
properties: {
ctl: {
type: "object",
"x-component": "Children",
"x-component-props": {
children: "{{controllerBtns}}"
}
"x-component": "controllerBtns",
},
quotationNo: {//报价单号
type: "string",
......
......@@ -13,10 +13,7 @@ export const WAITAUDITOFFERONESCHEMA: ISchema = {
properties: {
ctl: {
type: "object",
"x-component": "Children",
"x-component-props": {
children: "{{controllerBtns}}"
}
"x-component": "controllerBtns",
},
quotationNo: {//报价单号
type: "string",
......
......@@ -13,10 +13,7 @@ export const WAITADUITOFFERTWOSCHEMA: ISchema = {
properties: {
ctl: {
type: "object",
"x-component": "Children",
"x-component-props": {
children: "{{controllerBtns}}"
}
"x-component": "controllerBtns",
},
quotationNo: {//报价单号
type: "string",
......
......@@ -13,10 +13,7 @@ export const WAITSUBMITOFFERSCHEMA: ISchema = {
properties: {
ctl: {
type: "object",
"x-component": "Children",
"x-component-props": {
children: "{{controllerBtns}}"
}
"x-component": "controllerBtns",
},
quotationNo: {//报价单号
type: "string",
......
......@@ -42,6 +42,12 @@ export const INQUIRYSEARCHSCHEMA: ISchema = {
inline: true
},
properties: {
details: {
type: "string",
"x-component-props": {
placeholder: "被询价会员"
}
},
memberName: {
type: "string",
"x-component-props": {
......
......@@ -5,8 +5,8 @@ import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview';
import moment from 'moment'
import { PublicApi } from '@/services/api';
import { Row, Col, Space, Button, Dropdown, Menu, Tag, Badge, Popconfirm, Typography } from 'antd';
import { DeleteOutlined, DownOutlined, PlusOutlined } from '@ant-design/icons';
import { Row, Col, Space, Button, Tag, Badge, Popconfirm, Typography } from 'antd';
import { DeleteOutlined, PlusOutlined } from '@ant-design/icons';
import { WAITADDINQURYSCHEMA } from './schema';
import { EXTERNALSTATE_COLOR, INTERNALSTATE_COLOR } from '@/pages/transaction/components/stateColor';
......@@ -17,8 +17,8 @@ const WaitAddInquiry = () => {
return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</>
}
const [rowkeys, setRowKeys] = useState<Array<number>>([]);
const [rowkeys, setRowKeys] = useState<any>([]);
console.log(rowkeys)
/** 批量审核 */
const fetchSubmitBatch = async (id?: number) => {
let res = null;
......@@ -164,20 +164,13 @@ const WaitAddInquiry = () => {
>
批量提交审核
</Button>
<Dropdown.Button
<Button
icon={<DeleteOutlined />}
onClick={() => fetchDeleteBatch()}
disabled={rowkeys.length === 0}
trigger={['click']}
overlay={
<Menu onClick={() => fetchDeleteBatch()}>
<Menu.Item key='1' icon={<DeleteOutlined />}>
批量删除
</Menu.Item>
</Menu>
}
icon={<DownOutlined />}
>
更多
</Dropdown.Button>
批量删除
</Button>
</Space>
</Col>
</Row>
......
......@@ -13,10 +13,7 @@ export const WAITADDINQURYSCHEMA: ISchema = {
properties: {
ctl: {
type: "object",
"x-component": "Children",
"x-component-props": {
children: "{{controllerBtns}}"
}
"x-component": "controllerBtns",
},
inquiryListNo: {//报价单号
type: "string",
......
......@@ -13,10 +13,7 @@ export const WAITAUDITINQUIRYONESCHEMA: ISchema = {
properties: {
ctl: {
type: "object",
"x-component": "Children",
"x-component-props": {
children: "{{controllerBtns}}"
}
"x-component": "controllerBtns",
},
inquiryListNo: {//报价单号
type: "string",
......
......@@ -13,10 +13,7 @@ export const WAITAUDITINQUIRYTWOSCHEMA: ISchema = {
properties: {
ctl: {
type: "object",
"x-component": "Children",
"x-component-props": {
children: "{{controllerBtns}}"
}
"x-component": "controllerBtns",
},
inquiryListNo: {//报价单号
type: "string",
......
......@@ -13,10 +13,7 @@ export const WAITSUBMITINQUIRYSCHEMA: ISchema = {
properties: {
ctl: {
type: "object",
"x-component": "Children",
"x-component-props": {
children: "{{controllerBtns}}"
}
"x-component": "controllerBtns",
},
inquiryListNo: {//报价单号
type: "string",
......
......@@ -70,8 +70,8 @@ const LogisticsBillManageDetail = () => {
setFreightEffect([
{
col: [
{ label: '含税/税率', extra: `${data.taxInclusive}/${data.taxRate}` },
{ label: '运费', extra: `¥${data.freightPrice && data.freightPrice.toFixed(2)}` },
{ label: '含税/税率', extra: `${data.taxInclusive ? '是' : '-'}/${data.taxRate ? data.taxRate : '-'}` },
{ label: '运费', extra: `¥${data.freightPrice ? Number(data.freightPrice).toFixed(2) : '-' }` },
{ label: '结算方式', extra: data.settlementWay },
]
},
......@@ -156,6 +156,15 @@ const LogisticsBillManageDetail = () => {
fetchData();
}, [])
const handleConfirm = (value) => {
const params = { ...dataSource }
params.taxInclusive = 1;
params.taxRate = value.taxRate;
params.freightPrice = value.freightPrice;
handleFreightEffect(params);
setFreightVisible(false);
}
return (
<Context.Provider value={dataSource}>
<PeripheralLayout
......@@ -206,7 +215,12 @@ const LogisticsBillManageDetail = () => {
</Fragment>
}
/>
<FreightEdit visible={freightVisible} />
<FreightEdit
visible={freightVisible}
effect={dataSource}
onClose={() => setFreightVisible(false)}
onConfirm={handleConfirm}
/>
</Context.Provider>
)
}
......
......@@ -3,35 +3,49 @@ import { Modal, Form, Input, Checkbox } from 'antd';
interface FreightEditProps {
/** 显示隐藏 */
visible: boolean
visible: boolean,
/** 回显数据 */
effect?: any,
/** 关闭 */
onClose?: () => void,
/** 确定 */
onConfirm?: (e: any) => void,
}
const FreightEdit: React.FC<FreightEditProps> = (props: any) => {
const { visible } = props;
const { visible, onClose, effect, onConfirm } = props;
const [form] = Form.useForm<any>();
const handleSubmit = async () => {
await form.validateFields().then(res => {
onConfirm(res)
})
}
return (
<Modal
visible={visible}
onCancel={onClose}
onOk={handleSubmit}
>
<Form layout="vertical">
<Form.Item label="是否含税">
<Checkbox checked></Checkbox>
<Form layout="vertical" form={form}>
<Form.Item label="是否含税" required name='taxInclusive'>
<Checkbox checked value={1}></Checkbox>
</Form.Item>
<Form.Item label="税率">
<Form.Item label="税率" name="taxRate" rules={[{ required: true, message: '请输入税率' }]} initialValue={effect.taxRate}>
<Input
type='number'
addonAfter='%'
addonAfter={<div style={{ width: 40 }}>%</div>}
maxLength={25}
/>
</Form.Item>
<Form.Item label="运费">
<Form.Item label="运费" name="freightPrice" rules={[{ required: true, message: '请输入运费' }]} initialValue={effect.freightPrice}>
<Input
type='number'
addonBefore="¥"
addonBefore={<div style={{ width: 40 }}></div>}
maxLength={25}
/>
</Form.Item>
<Form.Item label="结算方式">
<Input />
<Form.Item label="结算方式" name="settlement" required initialValue={effect.settlementWay}>
<Input disabled />
</Form.Item>
</Form>
</Modal>
......
......@@ -32,10 +32,10 @@ const PurchasSeoAdded = () => {
form.validateFields().then((value: any) => {
const type: number = value.type;
const link: string = value.link;
const params = {
id,
...value,
link: `http://${link}`,
doorType: DOORTYPE.PROCUREMENT_DOORTYPE,
name: SELECT_NAME[type]
}
......
......@@ -53,6 +53,7 @@ const PurchasSeo = () => {
title: '访问链接',
key: 'link',
dataIndex: 'link',
render: (text) => `http://${text}`
},
{
title: '状态',
......
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