Commit c9aa16b7 authored by LeeJiancong's avatar LeeJiancong

'新增需求单查询页面-新增需求单详情-新增需求单审核列表-新增需求单详情和对接功能'

parent 23394486
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-08-04 15:47:40
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-08-06 11:24:58
* @LastEditTime: 2020-09-25 10:30:02
*/
/**
......@@ -12,6 +12,7 @@ import pageCustomized from './pageCustomized'
import calssPropertyRoute from './calssPropertyRoute' // 品类属性路由
import trademarkRoute from './brandRoute' // 品牌路由
import commodity from './commodityRoute' // 商品审核路由
import requisitionRoute from './requisitionRoute' //需求单
import logisticsRoutes from './logisticsRoutes'
import memberAbility from './memberAbility'
import ruleSettingRoutes from './ruleSettingRoutes'
......@@ -24,6 +25,7 @@ const routeList = [
calssPropertyRoute,
trademarkRoute,
commodity,
requisitionRoute,
logisticsRoutes,
memberAbility,
ruleSettingRoutes,
......
/*
* @Author: LeeJiancong
* @Date: 2020-08-04 16:21:48
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-09-25 14:31:33
*/
const router = {
path: '/requisitionManager',
name: 'requisitionManager',
key: 'requisitionManager',
icon: 'SmileOutlined',
routes:[
//需求单查询
{
path: '/requisitionManager/aduit/enquirySearch',
name: 'enquirySearch',
component: '@/pages/requisition/aduit/enquirySearch',
},
//需求单查询详情
{
path: '/requisitionManager/aduit/enquirySearch/enquiryDetail',
name: 'enquiryDetail',
component: '@/pages/requisition/aduit/enquirySearch/detail',
hideInMenu: true,
hidePageHeader: true
},
//需求单审核列表
{
path: '/requisitionManager/aduit/aduitList',
name: 'aduitList',
component: '@/pages/requisition/aduit/aduitList',
},
//审核需求单(详情)
{
path: '/requisitionManager/aduit/aduitDetail',
name: 'aduitDetail',
component: '@/pages/requisition/aduit/components/detail',
hideInMenu: true,
hidePageHeader: true
},
]
}
export default router
\ No newline at end of file
/*
* @Author: LeeJiancong
* @Date: 2020-08-04 15:05:52
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-09-23 10:38:53
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-09-25 14:01:53
*/
import utils from '@/utils'
import menu from '../en-US/menu'
......@@ -80,10 +80,18 @@ export default {
'menu.memberAbility.memberLevel': '会员等级',
'menu.memberAbility.addEquity': '会员权益设置',
//需求单
'menu.requisitionManager':'需求单审核',
'menu.requisitionManager.enquirySearch':'需求单查询',
'menu.requisitionManager.enquiryDetail':'需求单详情',
'menu.requisitionManager.aduitList':'需求单审核',
//物流管理
'menu.logisticsManager': '物流管理',
'menu.logisticsManager.logisticsList': '物流单查询',
//规则
'menu.ruleSettingManager': '平台规则配置',
'menu.ruleSettingManager.paySetting': '平台支付参数配置',
......
import React, { Component } from 'react'
import OrderList from "../components/index"
const List = () => {
return (
<OrderList des='审核需求单' type={1}/>
)
}
export default List
\ No newline at end of file
/*
* @Author: LeeJiancong
* @Date: 2020-08-24 11:32:05
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-25 14:49:19
*/
import React, { Component, useEffect, useState, ReactNode, useRef } from 'react';
import { Row, Col, Modal, Table, Tooltip, Input, Select,Switch, Button, Popconfirm, Card, Tag, Badge, Steps, Tabs, } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { EyeOutlined, ClockCircleOutlined, UpOutlined, DownOutlined, StopOutlined, CheckSquareOutlined } from '@ant-design/icons'
import { StandardTable } from 'god'
import EyePreview from '@/components/EyePreview'
import { ColumnType } from 'antd/lib/table/interface'
import ConfirmModal from '../../components/confirmModal'
import { history } from 'umi'
import { PublicApi } from '@/services/api'
import { getAuth} from '@/utils/auth'
import {PageStatus,usePageStatus} from '@/hooks/usePageStatus'
import { dockingColumn,externalColumn,interiorColumn } from '../../common/detailFormColumnType'
import moment from 'moment'
import style from '../../components/index.less'
import {interiorState,interiorStateTwo,enquirySearchInteriorState,
enquirySearchexternalState} from '../../common/tableStatusList'
import statuStyle from '../../common/colorTag'
import PlatType from '../../components/platType'
const { Step } = Steps
const { TabPane } = Tabs
const data = [
{
key: '1',
id: '1',
role: '采购商',
operation: '申请会员',
opTime: '2020-05-12 08:08',
suggest: '',
status: 2,
},
];
interface dataInfoType {
status: any;
digest?: any;
logisticsOrderNo: string;
companyName: string;
invoicesTime: any,
detailList: Array<any>,
logList: Array<any>,
totalCarton: number,
totalVolume: number,
totalWeight: number,
freightPrice: number,
settlementWay: string
}
const detailInfo: React.FC<{}> = () => {
const ref = useRef<any>({})
const [pagetype, setpagetype] = useState(history.location.query.page_type)
let interiorStateList = []
let [isextraOption, setIsextraOption] = useState(false)
const [platType, setplatType] = useState(1) //需求对接类型
const [otherList, setotherList] = useState([])//动态tab循环
const [productSource, setproductSource] = useState([])//商品列表 新增
let [dataInfo, setdataInfo] = useState<any>({
status: '',
externalState: 0,
interiorState: 0,
externalRequisitionFormStateResponses:[],
interiorRequisitionFormStateResponses:[],
requisitionFormAddress:[]
})
const [shipperAddress, setshipperAddress] = useState('')
const {pageStatus, id} = usePageStatus()
//PageStatus:{0: "ADD", 1: "EDIT", 2: "PREVIEW", ADD: 0, EDIT: 1, PREVIEW: 2}0: "ADD"1: "EDIT"2: "PREVIEW"ADD: 0EDIT: 1PREVIEW: 2} 1
let _title = pageStatus === PageStatus.PREVIEW ? '查看' : id ? '编辑' : '新建'
let [visible, setvisible] = useState(false)
const [pagination, setPagination] = useState({
current: 1,
pageSize: 10
})
const [detailData, setDetailData] = useState<any>({
externalStateStep: {
current: 0,
title: '外部流转',
items: [
{
title: '采购商',
desc: '提交需求单',
},
{
title: '平台',
desc: '审核需求单',
},
{
title: '供应商',
desc: '提交报价单',
},
{
title: '采购商',
desc: '确认报价单',
},
{
title: '完成',
desc: ''
}
]
},
interiorStateStep: {
current: 0,
title: '内部流转',
items: [
{
title: '采购员',
desc: '新增需求单',
},
{
title: '采购经理',
desc: '审核需求单',
},
{
title: '副总经理',
desc: '审核需求单',
},
{
title: '采购员',
desc: '提交需求单',
},
{
title: '完成',
desc: ''
}
]
}
})
const infoTem = {
base: {
title: '交易条件',
leftElem: [
{ title: '交付日期', key: 'shipmentOrderNo', value: moment(dataInfo.deliveryTime).format('YYYY-MM-DD HH:mm:ss')},
{ title: '交付地址', key: '', value: shipperAddress },
{ title: '物流要求', key: '', value: dataInfo.logistics }
],
centerElem: [
{ title: '报价截至日期', key: '', value: moment(dataInfo.quotationAsTime).format('YYYY-MM-DD HH:mm:ss') },
{ title: '报价要求', key: '', value: dataInfo.packRequire },
{ title: '包装要求', key: '', value: dataInfo.offer },
],
rightElem: [
{ title: '付款方式', key: '', value: dataInfo.paymentType },
{ title: '税费要求', key: '', value: dataInfo.taxes },
{ title: '其他要求', key: '', value: dataInfo.otherRequire }
],
elem: [
]
},
freight: {
title: '运费',
leftElem: [
{ title: '运费:', key: 'freight', value: dataInfo.freightPrice },
{ title: '结算方式:', key: '', value: dataInfo.settlementWay }
]
}
}
const columns1: ColumnType<any>[] = [
{
title: 'ID',
dataIndex: 'productId',
align: 'center',
key: 'productId',
},
{
title: '商品名称',
dataIndex: 'productName',
align: 'center',
key: 'productName',
width: 240
},
{
title: '品类',
dataIndex: 'categoryName',
align: 'center',
key: 'categoryName',
},
{
title:'需求会员',
key:'demandMembers',
dataIndex:'demandMembers',
align:'left'
},
{
title: '品牌',
dataIndex: 'brandName',
align: 'center',
key: 'brandName',
},
{
title: '单位',
dataIndex: 'unitName',
align: 'center',
key: 'unitName',
},
{
title: '数量',
dataIndex: 'amount',
align: 'center',
key: 'amount',
},
{
title: '箱数',
dataIndex: 'carton',
align: 'center',
key: 'carton',
},
{
title: '重量 (KG)',
dataIndex: 'weight',
align: 'center',
key: 'weight',
},
{
title: '体积 (M3)',
dataIndex: 'volume',
align: 'center',
key: 'volume',
}
];
const switchState = (text, record, index) => {
return <Switch disabled defaultChecked={text ? true : false} size="small" />
}
/**
* @description: 进入店铺
* @param {type}
* @return {type}
*/
const optionChild = (text, record, index) => {
return <Button type="link" onClick={()=> history.push('/home')} />
}
/**
* @description: 打开商品弹窗
* @param {type}
* @return {type}
*/
const handleOpenModal = (id) => {
}
const equiryColumns: ColumnType<any>[] = [
{
title: '商品规格型号',
dataIndex: 'model',
key: 'model',
align: 'left',
render: (text: any, records: any) => <EyePreview type="button" handleClick={() => {
handleOpenModal(records.id)
}}>{text}</EyePreview>
},
{
title: '品牌',
dataIndex: 'brand',
key: 'brand',
align: 'center'
},
...otherList,
{
title: '单位',
dataIndex: 'purchaseNuit',
key: 'purchaseNuit',
align: 'center'
},
{
title: '采购数量',
dataIndex: 'purchaseQuantity',
key: 'purchaseQuantity',
align: 'center'
}
]
//在这做逻辑判断 判断路由 是由哪个页面进来的
useEffect(() => {
let pathname = history.location.pathname
init()
}, [])
const init = () => {
PublicApi.getOrderRequisitionFormDetails({ id: id }).then(res => {
let {data} = res
if(pagetype == 2){
if(data.interiorState === 3){//一级的审核通过变为2级的待审核
data.interiorState = 2
}
}
setplatType(data.type)
setdataInfo(data)
interiorStateList = [...data.interiorRequisitionFormStateResponses]
if(pagetype == 1 || pagetype == 2){
if(data.externalState === 2){
setIsextraOption(true)
}
}
PublicApi.getLogisticsSelectListShipperAddress().then(res => {
res.data.forEach(item => {
if(data.addresId === item.id){
setshipperAddress(item.fullAddress)
}
})
})
})
//商品列表
PublicApi.getOrderRequisitionFormProductAll({ id: id }).then(res => {
if (res.code === 1000) {
let { data } = res
//商品
let source = []
let otherColumnkey = []//动态列的展示
data.forEach((v)=> {
let obj:any = {}
obj.model = v.model
obj.id = v.id
obj.brand = v.brand
obj.purchaseNuit = v.purchaseNuit
obj.purchaseQuantity = v.purchaseQuantity
if(v.productAttributeJson){
JSON.parse(v.productAttributeJson).forEach(child => {
Object.keys(child).forEach(key => {
//获取列头
otherColumnkey.push({
title: key,
dataIndex: key,
key: key,
align:'center'
})
// console.log('key',key,child,child[key])
obj[key] = child[key]
})
});
}
source.push(obj)
})
setotherList([...otherColumnkey])//生成列
setproductSource([...source])
}
})
}
/**
* @description: 状态改变就刷新数据
* @param {type}
* @return {type}
*/
// useEffect(() => {
// init()
// },[dataInfo.interiorState])
const formTime = (text) => {
return <>{moment(text).format('YYYY-MM-DD HH:mm:ss')}</>
}
/**
* @description: 外部流转记录
* @param {type}
* @return {type}
*/
const externalTextState = (text) => {
let name = ''
dataInfo.externalRequisitionFormStateResponses.forEach(element => {
if(element.state === text ){
name = element.operationalProcess
}
})
return <>{name}</>
}
/**
* @description: 内部流转记录
* @param {type}
* @return {type}
*/
const interiorTextState = (text) => {
let name = ''
dataInfo.interiorRequisitionFormStateResponses.forEach(element => {
if(element.state === text ){
name = element.operationalProcess
}
})
return <>{name}</>
}
const fetchData = (params: any) => {
return new Promise((resolve, reject) => {
PublicApi.getLogisticsOrderWaitSubmitPageOrderLog({ ...params, orderId: id }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
})
});
};
/**
* @description: 需求单列表
* @param {type}
* @return {type}
*/
const fetchDockingData = async(params) => {
const res = await PublicApi.getOrderPlatformRequisitionFormDemandDockingList(params);
return res.data
}
/**
* @description: 弹窗确认
* @param {type}
* @return {type}
*/
const handleModalOK = () => {
console.log('5555')
setvisible(false)
setTimeout(()=> {
history.goBack()
},1000)
}
const interiorData = [
{
operationTime:1598853606806
}
]
const handlediaSubmit = (type:number) => {
if(type == 1){//提交需求单
PublicApi.postOrderSubmitRequisitionForm({id: id}).then(res => {
if(res.code === 1000){
setTimeout(()=> {
history.goBack()
},1000)
}
})
}
}
//外部状态
const renderExternalState = () => {
return <Steps
style={{ padding: '34px 0' }}
progressDot
current={Number(dataInfo.externalState)-1}
>
{detailData.externalStateStep.items.map((item, index) => {
return (
<Step
key={index}
title={item.title}
description={item.desc}
/>
);
})}
</Steps>
}
return (
<PageHeaderWrapper
onBack={() => window.history.back()}
title={
<>
<div className={style['headerTop']}>
<div className={style['headerTop-prefix']}></div>
<div className={style['headerTop-name']}>
需求单号:{dataInfo.logisticsOrderNo}
</div>
<div className={style[`levelIcon${'1'}`]}></div>
</div>
</>
}
extra={
(isextraOption &&
<>
{
(pagetype == 1 || pagetype == 2) &&
<>
<Button onClick={() => setvisible(true)}>
<StopOutlined />
审核不通过
</Button>
<Button onClick={() => setvisible(true)} className={style['saveBtn']}>
<CheckSquareOutlined />
审核通过
</Button>
</>
}
{
(pagetype == 3) &&
<Button type="primary" onClick={() => handlediaSubmit(1)}>
<CheckSquareOutlined />
提交
</Button>
}
</>)
}
content={
<div className={style['headerMain']}>
<div className={style['headerMain-left']}>
<div className={style['headerMain-left-option']}>
<div>单据摘要:</div>
<div>{dataInfo.details}</div>
</div>
<div className={style['headerMain-left-option']}>
<div>商品品类:</div>
<div>{dataInfo.productCategory?.name}</div>
</div>
<div className={style['headerMain-left-option']}>
<div>会员名称:</div>
<div>
{getAuth().name || ''}
</div>
</div>
<div className={style['headerMain-left-option']}>
<div>单据时间:</div>
<div>
<Tag color="green">{moment(dataInfo.invoicesTime).format('YYYY-MM-DD HH:mm:ss')}</Tag>
</div>
</div>
<div className={style['headerMain-left-option']}>
<div>外部状态:</div>
<div>
{
dataInfo.externalState == 1 ? <><span style={statuStyle.default}>待提交需求单</span></> :
dataInfo.externalState == 3 ? <><span style={statuStyle.warn}>审核不通过需求单</span></> :
''
}
</div>
</div>
<div className={style['headerMain-left-option']}>
<div>内部状态:</div>
<div>
{
// pagetype === 1 ? interiorState(dataInfo.interiorState) :
// pagetype === 2 || pagetype == 3? interiorStateTwo(dataInfo.interiorState) :
enquirySearchInteriorState(dataInfo.interiorState)//4
}
</div>
</div>
</div>
</div>
}
>
<Row>
<Col className={style['mainCol']} span={24}>
<div className={style['mainCol-title']}>外部流转</div>
{renderExternalState()}
</Col>
<Col className={style['mainCol']} span={24}>
<div className={style['mainCol-title']}>
适合地市
</div>
<Row className={style['mainCol-rows']}>
{
dataInfo.requisitionFormAddress.length > 0 ?
dataInfo.requisitionFormAddress
.map((item,index) => {
return <Col key={index} span={8}>
{item.province}/{ item.city}
</Col>
})
:'所有地市'
}
</Row>
</Col>
<Col className={style['mainCol']} span={24}>
<div className={style['mainCol-title']}>
采购商品
</div>
<Table rowKey={'id'} dataSource={productSource} columns={equiryColumns} pagination={false} />
</Col>
<Col className={style['mainCol']} span={24}>
<div className={style['mainCol-title']}>
{infoTem['base'].title}
</div>
<div className={style['mainCol-rows']}>
<div className={style['mainCol-rows-cols']}>
{infoTem['base'].leftElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
<div className={style['cols-main-options']} style={{ flex: '1.5 1' }}>
{item.title}
</div>
<div className={style['cols-main-options']}>
{item.value}
</div>
</div>
);
},
)}
</div>
<div className={style['mainCol-rows-cols']}>
{infoTem['base'].centerElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
<div className={style['cols-main-options']}>
{item.title}
</div>
<div className={style['cols-main-options']}>{item.value}</div>
</div>
);
},
)}
</div>
<div className={style['mainCol-rows-cols']}>
{infoTem['base'].rightElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
<div className={style['cols-main-options']}>
{item.title}
</div>
<div className={style['cols-main-options']}>{item.value}</div>
</div>
);
},
)}
</div>
</div>
</Col>
<Col className={style['mainCol']} span={24}>
<div className={style['mainCol-title']}>
需求对接
</div>
<PlatType platType={platType} disabled={true}/>
<StandardTable
tableProps={{ rowKey: 'id' }}
currentRef={ref}
columns={dockingColumn(switchState,optionChild)}
fetchTableData={(params: any) => fetchDockingData(params)}
/>
</Col>
<Col className={style['mainCol']} span={24}>
{
<>
<div className={style['mainCol-title']}>外部流转记录</div>
<Table rowKey={'id'} dataSource={dataInfo.externalRequisitionForms || []} columns={externalColumn(formTime,externalTextState)} />
</>
}
</Col>
</Row>
<ConfirmModal
type={pagetype}
id={id}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={ handleModalOK}
/>
</PageHeaderWrapper>
)
}
export default detailInfo
\ No newline at end of file
/*
* @Author: LeeJiancong
* @Date: 2020-08-24 11:39:11
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-25 14:48:05
*/
/**
* @description: 组件描述: 一级 二级 待提交需求单
* @param {type}
* @return {type}
*/
import React, { ReactNode, useRef, useState,useEffect } from 'react';
import { history } from 'umi';
import {
Button,
Card,
Space,
Row,
Col,
Dropdown,
Menu,
Popconfirm
} from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import {
PlusOutlined,DownOutlined,DeleteOutlined
} from '@ant-design/icons';
import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
import {
IFormFilter,
IButtonFilter,
} from 'god/dist/src/standard-table/TableController';
import EyePreview from '@/components/EyePreview';
import StatusSwitch from '@/components/StatusSwitch';
import {interiorState,interiorStateTwo,enquirySearchInteriorState} from '../../common/tableStatusList'
import statuStyle from '../../common/colorTag'
import NiceForm from '@/components/NiceForm';
import {timeRange} from '@/utils/index'
import moment from 'moment'
import { createFormActions, FormEffectHooks } from '@formily/antd';
import {PageStatus} from '@/hooks/usePageStatus'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import {searchSelectGetSelectCategoryOptionEffect} from '../../effect/index'
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { enquierySchema } from '../../schema';
import { PublicApi } from '@/services/api';
import { values, action } from 'mobx';
/**
* @description: 按页面来 type一级为1 二级为2 待提交需求单3
* @param {type}
* @return {type}
*/
export interface listParams{
type: number;
des?: string;
}
const formActions = createFormActions();
const List:React.FC<listParams> = (props) => {
console.log(props)
const ref = useRef<any>({})
const [more, setmore] = useState(false)
const [selectRow, setSelectRow] = useState([])
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<number>>([])
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const fetchData = async (params: any) => {
if(props.type === 1){//一级
const res = await PublicApi.getOrderPlatformReviewedRequisitionFormList(params);
return res.data
}
// else if(props.type === 2){//二级
// const res = await PublicApi.getOrderRequisitionFormAuditTwoList(params);
// return res.data
// }
// else if(props.type === 3){//待提交需求单
// const res = await PublicApi.getOrderRequisitionFormSubmitList(params);
// return res.data
// }
}
/**
* @description:
* @param {type} 可以根据props.type处理
* @return {type}
*/
const handleToDetail= (id) => {
history.push(`/requisitionManager/aduit/aduitDetail?page_type=${props.type}&id=${id}`)
}
const columns : ColumnType<any>[] = [
{
title:'需求单号',
key:'requisitionFormNo',
dataIndex:'requisitionFormNo',
align:'center',
render: (text: any,records: any) => <EyePreview type="button" handleClick={() => {
handleToDetail(records.id)
}}>{text}</EyePreview>
},
{
title:'需求摘要',
key:'details',
dataIndex:'details',
align:'left'
},
{
title:'品类',
key:'category',
dataIndex:'category',
align:'left'
},
{
title:'需求会员',
key:'demandMembers',
dataIndex:'demandMembers',
align:'left'
},
{
title:'交付日期',
key:'deliveryTime',
dataIndex:'deliveryTime',
align:'center',
render:(text:any)=> format(text)
},
{
title:'报价截至时间',
key:'quotationAsTime',
dataIndex:'quotationAsTime',
align:'center',
render:(text:any)=> format(text)
},
{
title:'单据时间',
key:'voucherTime',
dataIndex:'voucherTime',
align:'center',
render:(text:any)=> format(text)
},
{
title:'外部状态',
key:'externalState',
dataIndex:'externalState',
align:'center',
render: (text: any, reconds) => {
let component: ReactNode = null
if (text == 3) {
component = <><span style={statuStyle.warn}>审核不通过需求单</span></>
}else if (text == 1) {
component = <><span style={statuStyle.default}>待提交需求单</span></>
}
return component
}
},
{
title:'内部状态',
key:'interiorState',
dataIndex:'interiorState',
align:'center',
render:(text:any) =>
// props.type === 1 ? interiorState(text) :
// props.type === 2 || props.type == 3? interiorStateTwo(text) : ''
enquirySearchInteriorState(text)
},
{
title:'操作',
key:'options',
dataIndex:'options',
align:'center',
render: (_: any, record: any) => {
return (
<>
{
(props.type === 1 || props.type === 2) ?
<Button type="link" onClick={() =>
history.push(`/requisitionManager/aduit/aduitDetail?page_type=${props.type}&id=${record.id}`)}>
审核
</Button>
:
<>
{
(props.type === 3 && record.externalState === 1) &&
<Button type="link" onClick={() =>
history.push(`/memberCenter/tranactionAbility/enquirySubmit/viewEnquiryDetail?page_type=${props.type}&id=${record.id}`)}>
提交</Button>
}
{
(record.externalState === 1 && record.interiorState === 1) &&
<>
<Popconfirm title="确定要删除吗?" okText="是" cancelText="否" onConfirm={() => handleDelete([record.id])}>
<Button type='link'>
删除
</Button>
</Popconfirm>
<Popconfirm title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => handleSubmit(record.id)}>
<Button type='link'>提交</Button>
</Popconfirm>
</>
}
</>
}
</>
)
}
},
]
useEffect(()=> {
},[])
const toEdit = (id:number | string) => {
history.push(`/memberCenter/tranactionAbility/enquirySubmit/addEnquiry?id=${id}`)
}
/**
* @description: 删除
* @param {type}
* @return {type}
*/
const handleDelete = (arr:number[]| string[]) => {
PublicApi.postOrderRequisitionFormDeleteAll({ ids: arr }).then(res => {
ref.current.reload()
})
}
//批量提交
const handleSubmitAll = (ids: number[]) => {
if(ids.length === 0){
return
}
if(props.type === 1){//一级(审核)
PublicApi.postOrderPlatformRequisitionFormAuditAll({ ids: ids }).then(res => {
ref.current.reload()
})
}
// else if(props.type === 2){//二级
// PublicApi.postOrderRequisitionFormAuditAllTwo({ ids: ids }).then(res => {
// ref.current.reload()
// })
// }else if(props.type === 3){//待提交审核
// PublicApi.postOrderSubmitRequisitionFormAll({ ids: ids }).then(res => {
// ref.current.reload()
// })
// }
}
//提交审核
const handleSubmit = (id) => {
PublicApi.postOrderNewRequisitionFormAudit({ id: id }).then(res => {
ref.current.reload()
})
}
const handleSumbit = (values:any) => {
if(values.voucherTime){
values.startVoucherTime = timeRange(values.voucherTime).st
values.endVoucherTime = timeRange(values.voucherTime).et
delete values.voucherTime
}
console.log('values',values)
ref.current.reload(values)
}
const menu = (
<Menu onClick={() => handleDelete(selectedRowKeys)}>
<Menu.Item key='1' icon={<DeleteOutlined/>}>
批量删除
</Menu.Item>
</Menu>
)
const handleBatchDel = (e:any) => {
}
const rowSelection = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectRow(selectedRows);
setSelectedRowKeys(selectedRowKeys);
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
},
}
const controllerBtns = <Row>
<Col span={24}>
<Space direction="horizontal" size={16}>
<Button onClick={() => handleSubmitAll(selectedRowKeys)}>
{ (props.type == 1 || props.type == 2) ? '批量提交审核' :'批量审核通过'}
</Button>
{
(props.type !== 1 && props.type !== 2 && props.type !== 3)&&
<>
<Dropdown.Button
overlay={menu}
trigger={['click']}
icon={<DownOutlined />}
>
更多
</Dropdown.Button>
</>
}
</Space>
</Col>
</Row>
return (
<Card>
<StandardTable
currentRef={ref}
columns={columns}
tableProps={{rowKew:'id'}}
fetchTableData={(params: any) => fetchData(params)}
rowSelection={rowSelection}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => handleSumbit(values)}
effects={($,actions) => {
useStateFilterSearchLinkageEffect($,actions,'requisitionFormNo',FORM_FILTER_PATH)
FormEffectHooks.onFieldChange$('category').subscribe(state => {
searchSelectGetSelectCategoryOptionEffect(actions,'category')
})
}}
expressionScope={{
controllerBtns
}}
schema={enquierySchema}
>
</NiceForm>
}
/>
</Card>
)
}
export default List
\ No newline at end of file
/*
* @Author: LeeJiancong
* @Date: 2020-08-24 11:32:05
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-25 14:49:38
*/
/**
* @description: 需求单详情 只用于这
* @param {type}
* @return {type}
*/
import React, { Component, useEffect, useState, ReactNode, useRef } from 'react';
import { Row, Col, Modal, Table, Tooltip, Input, Select,Switch, Button, Popconfirm, Card, Tag, Badge, Steps, Tabs, } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { EyeOutlined, ClockCircleOutlined, UpOutlined, DownOutlined, StopOutlined, CheckSquareOutlined } from '@ant-design/icons'
import { StandardTable } from 'god'
import EyePreview from '@/components/EyePreview'
import { ColumnType } from 'antd/lib/table/interface'
import ConfirmModal from '../../components/confirmModal'
import { history } from 'umi'
import { PublicApi } from '@/services/api'
import { getAuth} from '@/utils/auth'
import {PageStatus,usePageStatus} from '@/hooks/usePageStatus'
import { dockingColumn,externalColumn,interiorColumn } from '../../common/detailFormColumnType'
import moment from 'moment'
import style from '../../components/index.less'
import {interiorState,interiorStateTwo,enquirySearchInteriorState,
enquirySearchexternalState} from '../../common/tableStatusList'
import statuStyle from '../../common/colorTag'
import PlatType from '../../components/platType'
const { Step } = Steps
const { TabPane } = Tabs
const data = [
{
key: '1',
id: '1',
role: '采购商',
operation: '申请会员',
opTime: '2020-05-12 08:08',
suggest: '',
status: 2,
},
];
interface dataInfoType {
status: any;
digest?: any;
logisticsOrderNo: string;
companyName: string;
invoicesTime: any,
detailList: Array<any>,
logList: Array<any>,
totalCarton: number,
totalVolume: number,
totalWeight: number,
freightPrice: number,
settlementWay: string
}
const detailInfo: React.FC<{}> = () => {
const ref = useRef<any>({})
const [pagetype, setpagetype] = useState(history.location.query.page_type)
let interiorStateList = []
let [isextraOption, setIsextraOption] = useState(false)
const [platType, setplatType] = useState(1) //需求对接类型
const [otherList, setotherList] = useState([])//动态tab循环
const [productSource, setproductSource] = useState([])//商品列表 新增
let [dataInfo, setdataInfo] = useState<any>({
status: '',
externalState: 0,
interiorState: 0,
externalRequisitionFormStateResponses:[],
interiorRequisitionFormStateResponses:[],
requisitionFormAddress:[]
})
const [shipperAddress, setshipperAddress] = useState('')
const {pageStatus, id} = usePageStatus()
//PageStatus:{0: "ADD", 1: "EDIT", 2: "PREVIEW", ADD: 0, EDIT: 1, PREVIEW: 2}0: "ADD"1: "EDIT"2: "PREVIEW"ADD: 0EDIT: 1PREVIEW: 2} 1
let _title = pageStatus === PageStatus.PREVIEW ? '查看' : id ? '编辑' : '新建'
let [visible, setvisible] = useState(false)
const [pagination, setPagination] = useState({
current: 1,
pageSize: 10
})
const [detailData, setDetailData] = useState<any>({
externalStateStep: {
current: 0,
title: '外部流转',
items: [
{
title: '采购商',
desc: '提交需求单',
},
{
title: '平台',
desc: '审核需求单',
},
{
title: '供应商',
desc: '提交报价单',
},
{
title: '采购商',
desc: '确认报价单',
},
{
title: '完成',
desc: ''
}
]
},
interiorStateStep: {
current: 0,
title: '内部流转',
items: [
{
title: '采购员',
desc: '新增需求单',
},
{
title: '采购经理',
desc: '审核需求单',
},
{
title: '副总经理',
desc: '审核需求单',
},
{
title: '采购员',
desc: '提交需求单',
},
{
title: '完成',
desc: ''
}
]
}
})
const infoTem = {
base: {
title: '交易条件',
leftElem: [
{ title: '交付日期', key: 'shipmentOrderNo', value: moment(dataInfo.deliveryTime).format('YYYY-MM-DD HH:mm:ss')},
{ title: '交付地址', key: '', value: shipperAddress },
{ title: '物流要求', key: '', value: dataInfo.logistics }
],
centerElem: [
{ title: '报价截至日期', key: '', value: moment(dataInfo.quotationAsTime).format('YYYY-MM-DD HH:mm:ss') },
{ title: '报价要求', key: '', value: dataInfo.packRequire },
{ title: '包装要求', key: '', value: dataInfo.offer },
],
rightElem: [
{ title: '付款方式', key: '', value: dataInfo.paymentType },
{ title: '税费要求', key: '', value: dataInfo.taxes },
{ title: '其他要求', key: '', value: dataInfo.otherRequire }
],
elem: [
]
},
freight: {
title: '运费',
leftElem: [
{ title: '运费:', key: 'freight', value: dataInfo.freightPrice },
{ title: '结算方式:', key: '', value: dataInfo.settlementWay }
]
}
}
const columns1: ColumnType<any>[] = [
{
title: 'ID',
dataIndex: 'productId',
align: 'center',
key: 'productId',
},
{
title: '商品名称',
dataIndex: 'productName',
align: 'center',
key: 'productName',
width: 240
},
{
title: '品类',
dataIndex: 'categoryName',
align: 'center',
key: 'categoryName',
},
{
title: '品牌',
dataIndex: 'brandName',
align: 'center',
key: 'brandName',
},
{
title: '单位',
dataIndex: 'unitName',
align: 'center',
key: 'unitName',
},
{
title: '数量',
dataIndex: 'amount',
align: 'center',
key: 'amount',
},
{
title: '箱数',
dataIndex: 'carton',
align: 'center',
key: 'carton',
},
{
title: '重量 (KG)',
dataIndex: 'weight',
align: 'center',
key: 'weight',
},
{
title: '体积 (M3)',
dataIndex: 'volume',
align: 'center',
key: 'volume',
}
];
const switchState = (text, record, index) => {
return <Switch disabled defaultChecked={text ? true : false} size="small" />
}
/**
* @description: 进入店铺
* @param {type}
* @return {type}
*/
const optionChild = (text, record, index) => {
return <Button type="link" onClick={()=> history.push('/home')} />
}
/**
* @description: 打开商品弹窗
* @param {type}
* @return {type}
*/
const handleOpenModal = (id) => {
}
const equiryColumns: ColumnType<any>[] = [
{
title: '商品规格型号',
dataIndex: 'model',
key: 'model',
align: 'left',
render: (text: any, records: any) => <EyePreview type="button" handleClick={() => {
handleOpenModal(records.id)
}}>{text}</EyePreview>
},
{
title: '品牌',
dataIndex: 'brand',
key: 'brand',
align: 'center'
},
...otherList,
{
title: '单位',
dataIndex: 'purchaseNuit',
key: 'purchaseNuit',
align: 'center'
},
{
title: '采购数量',
dataIndex: 'purchaseQuantity',
key: 'purchaseQuantity',
align: 'center'
}
]
//在这做逻辑判断 判断路由 是由哪个页面进来的
useEffect(() => {
let pathname = history.location.pathname
init()
}, [])
const init = () => {
PublicApi.getOrderPlatformRequisitionFormDetails({ id: id }).then(res => {
let {data} = res
if(pagetype == 2){
if(data.interiorState === 3){//一级的审核通过变为2级的待审核
data.interiorState = 2
}
}
setplatType(data.type)
setdataInfo(data)
interiorStateList = [...data.interiorRequisitionFormStateResponses|| []]
if(pagetype == 1 || pagetype == 2){
if(data.interiorState === 2){
setIsextraOption(true)
}
}else if(pagetype == 3){
if(data.externalState == 1){
setIsextraOption(true)
}
}
PublicApi.getLogisticsSelectListShipperAddress().then(res => {
res.data.forEach(item => {
if(data.addresId === item.id){
setshipperAddress(item.fullAddress)
}
})
})
})
//商品列表
PublicApi.getOrderPlatformRequisitionFormProductList({ id: id }).then(res => {
if (res.code === 1000) {
let { data } = res.data
//商品
let source = []
let otherColumnkey:any[] = []//动态列的展示
data.forEach((v)=> {
let obj:any = {}
obj.model = v.model
obj.id = v.id
obj.brand = v.brand
obj.purchaseNuit = v.purchaseNuit
obj.purchaseQuantity = v.purchaseQuantity
if(v.productAttributeJson){
JSON.parse(v.productAttributeJson).forEach(child => {
Object.keys(child).forEach(key => {
//获取列头
otherColumnkey.push({
title: key,
dataIndex: key,
key: key,
align:'center'
})
// console.log('key',key,child,child[key])
obj[key] = child[key]
})
});
}
source.push(obj)
})
setotherList([...otherColumnkey])//生成列
setproductSource([...source])
}
})
}
/**
* @description: 状态改变就刷新数据
* @param {type}
* @return {type}
*/
// useEffect(() => {
// init()
// },[dataInfo.interiorState])
const formTime = (text) => {
return <>{moment(text).format('YYYY-MM-DD HH:mm:ss')}</>
}
/**
* @description: 外部流转记录
* @param {type}
* @return {type}
*/
const externalTextState = (text) => {
let name = ''
dataInfo.externalRequisitionFormStateResponses?.forEach(element => {
if(element.state === text ){
name = element.operationalProcess
}
})
return <>{name}</>
}
/**
* @description: 内部流转记录
* @param {type}
* @return {type}
*/
const interiorTextState = (text) => {
let name = ''
dataInfo.interiorRequisitionFormStateResponses.forEach(element => {
if(element.state === text ){
name = element.operationalProcess
}
})
return <>{name}</>
}
const fetchData = (params: any) => {
return new Promise((resolve, reject) => {
PublicApi.getLogisticsOrderWaitSubmitPageOrderLog({ ...params, orderId: id }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
})
});
};
/**
* @description: 需求单列表
* @param {type}
* @return {type}
*/
const fetchDockingData = async(params) => {
const res = await PublicApi.getOrderPlatformRequisitionFormDemandDockingList(params);
return res.data
}
/**
* @description: 弹窗确认
* @param {type}
* @return {type}
*/
const handleModalOK = () => {
console.log('5555')
setvisible(false)
setTimeout(()=> {
history.goBack()
},1000)
}
const interiorData = [
{
operationTime:1598853606806
}
]
const handlediaSubmit = (type:number) => {
if(type == 1){//提交需求单
PublicApi.postOrderSubmitRequisitionForm({id: id}).then(res => {
if(res.code === 1000){
setTimeout(()=> {
history.goBack()
},1000)
}
})
}
}
//外部状态
const renderExternalState = () => {
return <Steps
style={{ padding: '34px 0' }}
progressDot
current={Number(dataInfo.externalState)-1}
>
{detailData.externalStateStep.items.map((item, index) => {
return (
<Step
key={index}
title={item.title}
description={item.desc}
/>
);
})}
</Steps>
}
return (
<PageHeaderWrapper
onBack={() => window.history.back()}
title={
<>
<div className={style['headerTop']}>
<div className={style['headerTop-prefix']}></div>
<div className={style['headerTop-name']}>
需求单号:{dataInfo.logisticsOrderNo}
</div>
<div className={style[`levelIcon${'1'}`]}></div>
</div>
</>
}
extra={
(isextraOption &&
<>
{
(pagetype == 1 || pagetype == 2) &&
<>
<Button onClick={() => setvisible(true)}>
<StopOutlined />
审核不通过
</Button>
<Button onClick={() => setvisible(true)} className={style['saveBtn']}>
<CheckSquareOutlined />
审核通过
</Button>
</>
}
{
(pagetype == 3) &&
<Button type="primary" onClick={() => handlediaSubmit(1)}>
<CheckSquareOutlined />
提交
</Button>
}
</>)
}
content={
<div className={style['headerMain']}>
<div className={style['headerMain-left']}>
<div className={style['headerMain-left-option']}>
<div>单据摘要:</div>
<div>{dataInfo.details}</div>
</div>
<div className={style['headerMain-left-option']}>
<div>商品品类:</div>
<div>{dataInfo.productCategory?.name}</div>
</div>
<div className={style['headerMain-left-option']}>
<div>会员名称:</div>
<div>
{getAuth().name || ''}
</div>
</div>
<div className={style['headerMain-left-option']}>
<div>单据时间:</div>
<div>
<Tag color="green">{moment(dataInfo.invoicesTime).format('YYYY-MM-DD HH:mm:ss')}</Tag>
</div>
</div>
<div className={style['headerMain-left-option']}>
<div>外部状态:</div>
<div>
{
dataInfo.externalState == 1 ? <><span style={statuStyle.default}>待提交需求单</span></> :
dataInfo.externalState == 3 ? <><span style={statuStyle.warn}>审核不通过需求单</span></> :
''
}
</div>
</div>
<div className={style['headerMain-left-option']}>
<div>内部状态:</div>
<div>
{
// pagetype === 1 ? interiorState(dataInfo.interiorState) :
// pagetype === 2 || pagetype == 3? interiorStateTwo(dataInfo.interiorState) :
enquirySearchInteriorState(dataInfo.interiorState)//4
}
</div>
</div>
</div>
</div>
}
>
<Row>
<Col className={style['mainCol']} span={24}>
{
pagetype == 6?
<>
<div className={style['mainCol-title']}>外部流转</div>
{renderExternalState()}
</>
:
<Tabs type="line" defaultActiveKey='1'>
<TabPane tab='外部流转' key="1">
{renderExternalState()}
</TabPane>
<TabPane tab='内部流转' key="2">
<Steps
style={{ padding: '34px 0' }}
progressDot
current={Number(dataInfo.interiorState) - 1}
>
{detailData.interiorStateStep.items.map((item, index) => {
return (
<Step
key={index}
title={item.title}
description={item.desc}
/>
);
})}
</Steps>
</TabPane>
</Tabs>
}
</Col>
<Col className={style['mainCol']} span={24}>
<div className={style['mainCol-title']}>
适合地市
</div>
<Row className={style['mainCol-rows']}>
{
dataInfo.requisitionFormAddress && dataInfo.requisitionFormAddress.length > 0 ?
dataInfo.requisitionFormAddress
.map((item,index) => {
return <Col key={index} span={8}>
{item.province}/{ item.city}
</Col>
})
:'所有地市'
}
</Row>
</Col>
<Col className={style['mainCol']} span={24}>
<div className={style['mainCol-title']}>
采购商品
</div>
<Table rowKey={'id'} dataSource={productSource} columns={equiryColumns} pagination={false} />
</Col>
<Col className={style['mainCol']} span={24}>
<div className={style['mainCol-title']}>
{infoTem['base'].title}
</div>
<div className={style['mainCol-rows']}>
<div className={style['mainCol-rows-cols']}>
{infoTem['base'].leftElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
<div className={style['cols-main-options']} style={{ flex: '1.5 1' }}>
{item.title}
</div>
<div className={style['cols-main-options']}>
{item.value}
</div>
</div>
);
},
)}
</div>
<div className={style['mainCol-rows-cols']}>
{infoTem['base'].centerElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
<div className={style['cols-main-options']}>
{item.title}
</div>
<div className={style['cols-main-options']}>{item.value}</div>
</div>
);
},
)}
</div>
<div className={style['mainCol-rows-cols']}>
{infoTem['base'].rightElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
<div className={style['cols-main-options']}>
{item.title}
</div>
<div className={style['cols-main-options']}>{item.value}</div>
</div>
);
},
)}
</div>
</div>
</Col>
<Col className={style['mainCol']} span={24}>
<div className={style['mainCol-title']}>
需求对接
</div>
<PlatType platType={platType} disabled={true}/>
{platType != 1 &&
<StandardTable
tableProps={{ rowKey: 'id' }}
currentRef={ref}
columns={dockingColumn(switchState,optionChild)}
fetchTableData={(params: any) => fetchDockingData(params)}
/>
}
</Col>
<Col className={style['mainCol']} span={24}>
{
//需求报价-需求单详情
pagetype == 6 ?
<>
<div className={style['mainCol-title']}>外部流转记录</div>
<Table rowKey={'id'} dataSource={dataInfo.externalRequisitionForms || []} columns={externalColumn(formTime,externalTextState)} />
</>
:
<Tabs type="line" defaultActiveKey='1'>
<TabPane tab='外部流转记录' key="1">
<Table rowKey={'id'} dataSource={dataInfo.externalRequisitionForms || []} columns={externalColumn(formTime,externalTextState)} />
</TabPane>
<TabPane tab='内部流转记录' key="2">
<Table rowKey={'id'} dataSource={dataInfo.interiorRequisitionForms || []} columns={interiorColumn(formTime,interiorTextState)} />
</TabPane>
</Tabs>
}
</Col>
</Row>
<ConfirmModal
type={pagetype}
id={id}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={ handleModalOK}
/>
</PageHeaderWrapper>
)
}
export default detailInfo
\ No newline at end of file
/*
* @Author: LeeJiancong
* @Date: 2020-08-24 11:39:11
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-25 14:27:52
*/
/**
* @description: 组件描述:
* @param {type}
* @return {type}
*/
import React, { ReactNode, useRef, useState,useEffect } from 'react';
import { history } from 'umi';
import {
Button,
Card,
Space,
Row,
Col,
Dropdown,
Menu,
Popconfirm
} from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import {
PlusOutlined,DownOutlined,DeleteOutlined
} from '@ant-design/icons';
import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
import {
IFormFilter,
IButtonFilter,
} from 'god/dist/src/standard-table/TableController';
import EyePreview from '@/components/EyePreview';
import StatusSwitch from '@/components/StatusSwitch';
import {interiorState,interiorStateTwo,
enquirySearchInteriorState,enquirySearchexternalState} from '../../common/tableStatusList'
import statuStyle from '../../common/colorTag'
import NiceForm from '@/components/NiceForm';
import {timeRange} from '@/utils/index'
import {filterInteriorStateList,filterExternalStateList} from './../../common/statusList'
import moment from 'moment'
import { createFormActions, FormEffectHooks } from '@formily/antd';
import {PageStatus} from '@/hooks/usePageStatus'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import {searchSelectGetSelectCategoryOptionEffect} from '../../effect/index'
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { enquierySearchSchema } from '../../schema';
import { PublicApi } from '@/services/api';
import { values, action } from 'mobx';
export interface listParams{
type: number;
des?: string;
}
const formActions = createFormActions();
const List:React.FC<{listParams}> = (props) => {
const ref = useRef<any>({})
const [more, setmore] = useState(false)
const [selectRow, setSelectRow] = useState([])
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<number>>([])
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const fetchData = async (params: any) => {
const res = await PublicApi.getOrderPlatformRequisitionFormList(params);
return res.data
}
/**
* @description:
* @param {type} 可以根据props.type处理
* @return {type}
*/
const handleToDetail= (id) => {
history.push(`/requisitionManager/aduit/enquirySearch/enquiryDetail?page_type=${6}&id=${id}`)
}
const columns : ColumnType<any>[] = [
{
title:'需求单号',
key:'requisitionFormNo',
dataIndex:'requisitionFormNo',
align:'center',
render: (text: any,records: any) => <EyePreview type="button" handleClick={() => {
handleToDetail(records.id)
}}>{text}</EyePreview>
},
{
title:'需求摘要',
key:'details',
dataIndex:'details',
align:'left'
},
{
title:'品类',
key:'category',
dataIndex:'category',
align:'left'
},
{
title:'需求会员',
key:'demandMembers',
dataIndex:'demandMembers',
align:'left'
},
{
title:'交付日期',
key:'deliveryTime',
dataIndex:'deliveryTime',
align:'center',
render:(text:any)=> format(text)
},
{
title:'报价截至时间',
key:'quotationAsTime',
dataIndex:'quotationAsTime',
align:'center',
render:(text:any)=> format(text)
},
{
title:'单据时间',
key:'voucherTime',
dataIndex:'voucherTime',
align:'center',
render:(text:any)=> format(text)
},
{
title:'外部状态',
key:'externalState',
dataIndex:'externalState',
align:'center',
filters: filterExternalStateList,
filterMultiple: false,
onFilter: (value, record) => record.externalState === value,
render: (text: any, reconds) =>
enquirySearchexternalState(text)
},
{
title:'内部状态',
key:'interiorState',
dataIndex:'interiorState',
align:'left',
filters: filterInteriorStateList,
filterMultiple: false,
onFilter: (value, record) => record.interiorState === value,
render:(text:any) =>
enquirySearchInteriorState(text)
}
]
useEffect(()=> {
},[])
const toEdit = (id:number | string) => {
history.push(`/memberCenter/tranactionAbility/enquirySubmit/addEnquiry?id=${id}`)
}
/**
* @description: 删除
* @param {type}
* @return {type}
*/
const handleDelete = (arr:number[]| string[]) => {
PublicApi.postOrderRequisitionFormDeleteAll({ ids: arr }).then(res => {
ref.current.reload()
})
}
//提交审核
const handleSubmit = (id) => {
PublicApi.postOrderNewRequisitionFormAudit({ id: id }).then(res => {
ref.current.reload()
})
}
const handleSumbit = (values:any) => {
if(values.voucherTime){
values.startVoucherTime = timeRange(values.voucherTime).st
values.endVoucherTime = timeRange(values.voucherTime).et
delete values.voucherTime
}
console.log('values',values)
ref.current.reload(values)
}
const handleBatchDel = (e:any) => {
}
const rowSelection = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectRow(selectedRows);
setSelectedRowKeys(selectedRowKeys);
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
},
}
const controllerBtns = <Row>
<Col span={24}>
</Col>
</Row>
return (
<Card>
<StandardTable
currentRef={ref}
columns={columns}
tableProps={{rowKew:'id'}}
fetchTableData={(params: any) => fetchData(params)}
// rowSelection={rowSelection}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => handleSumbit(values)}
effects={($,actions) => {
useStateFilterSearchLinkageEffect($,actions,'requisitionFormNo',FORM_FILTER_PATH)
FormEffectHooks.onFieldChange$('category').subscribe(state => {
searchSelectGetSelectCategoryOptionEffect(actions,'category')
})
}}
schema={enquierySearchSchema}
>
</NiceForm>
}
/>
</Card>
)
}
export default List
\ No newline at end of file
/*
* @Author: LeeJiancong
* @Date: 2020-07-30 17:23:48
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-30 17:24:49
*/
export default {
default: {
padding: '2px 5px',
background: 'rgba(244,245,247,1)',
borderRadius: '4px'
},
confirm: {
color: '#3F7ED2',
padding: '2px 5px',
background: 'rgba(240, 248, 255, 1)',
borderRadius: '4px'
},
success: {
color: '#00B37A',
padding: '2px 5px',
background: 'rgba(235,247,242,1)',
borderRadius: '4px'
},
warn: {
color: '#E63F3B',
padding: '2px 5px',
background: 'rgba(255,235,230,1)',
borderRadius: '4px'
}
}
\ No newline at end of file
/*
* @Author: LeeJiancong
* @Date: 2020-08-27 16:27:53
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-10 10:22:41
*/
import { ColumnType } from 'antd/lib/table/interface'
import moment from 'moment'
export const dockingColumn = (children,optionChild) => {
let columns: ColumnType<any>[] = []
columns =
[
{
title: '序号',
dataIndex: 'id',
align: 'center',
key: 'id',
},
{
title: '会员名称',
dataIndex: 'memberName',
key: 'memberName',
align: 'left'
},
{
title: '会员类型',
dataIndex: 'memberTypeName',
key: 'memberTypeName',
align: 'center'
},
{
title: '会员角色',
dataIndex: 'roleName',
key: 'roleName',
align: 'center'
},
{
title: '会员等级',
dataIndex: 'levelTag',
key: 'levelTag',
align: 'center'
},
{
title: '是否归属会员',
dataIndex: 'membershipOrNot',
key: 'membershipOrNot',
align: 'center',
render:(text:any) => (
text == 0 ?'否':'是'
)
},
{
title: '需求发送状态',
dataIndex: 'state',
key: 'state',
align: 'center',
render:(text:any,records,index) => children? children(text,records,index) :''
},
{
title: '操作',
dataIndex: 'option',
key: 'option',
align: 'center',
render:(text:any,records,index) => optionChild? optionChild(text,records,index) :''
}
]
return columns
}
export const memberColumn = (children?) => {
let columns: ColumnType<any>[] = []
columns =
[
{
title: '序号',
dataIndex: 'memberId',
align: 'center',
key: 'memberId',
},
{
title: '会员名称',
dataIndex: 'name',
key: 'name',
align: 'left'
},
{
title: '会员类型',
dataIndex: 'memberTypeName',
key: 'memberTypeName',
align: 'center'
},
{
title: '会员角色',
dataIndex: 'roleName',
key: 'roleName',
align: 'center'
},
{
title: '会员等级',
dataIndex: 'levelTag',
key: 'levelTag',
align: 'center'
},
{
title: '是否归属会员',
dataIndex: 'membershipOrNot',
key: 'membershipOrNot',
align: 'center',
render:(text:any) => (
text == 0 ?'否':'是'
)
},
{
title: '需求发送状态',
dataIndex: 'state',
key: 'state',
align: 'center',
render:(text:any,records,index) => children? children(text,records,index) :''
}
]
return columns
}
/**
* @description: 内部流转interiorRequisitionForms
* 外部流转 externalRequisitionForms
* @param {type}
* @return {type}
*/
export const externalColumn = (childeren,stateList?) => {
let culumn:ColumnType<any>[] = []
return culumn = [
{
title: '序号',
dataIndex: 'id',
align: 'center',
key: 'id',
},
{
title: '操作角色',
dataIndex: 'roleName',
align: 'center',
key: 'roleName',
},
{
title: '状态',
dataIndex: 'state',
align: 'center',
key: 'state',
render:(text:any,record:any) => stateList(text)
},
{
title: '操作',
dataIndex: 'operation',
align: 'center',
key: 'operation',
},
{
title: '操作时间',
dataIndex: 'operationTime',
align: 'center',
key: 'operationTime',
render: (text: any, record: any) => childeren(text)
},
{
title: '审核意见',
dataIndex: 'auditOpinion',
align: 'left',
key: 'auditOpinion'
}
]
}
export const interiorColumn = (childeren,stateList?) => {
let culumn:ColumnType<any>[] = []
return culumn = [
{
title: '序号',
dataIndex: 'id',
align: 'center',
key: 'id',
},
{
title: '操作人',
dataIndex: 'roleName',
align: 'center',
key: 'roleName',
},
{
title: '部门',
dataIndex: 'department',
align: 'center',
key: 'department',
},
{
title: '职位',
dataIndex: 'position',
align: 'center',
key: 'position',
},
{
title: '状态',
dataIndex: 'state',
align: 'center',
key: 'state',
render:(text:any,record:any) => stateList(text)
},
{
title: '操作',
dataIndex: 'operation',
align: 'center',
key: 'operation',
},
{
title: '操作时间',
dataIndex: 'operationTime',
align: 'center',
key: 'operationTime',
render: (text: any, record: any) => childeren(text)
},
{
title: '审核意见',
dataIndex: 'auditOpinion',
align: 'left',
key: 'auditOpinion'
}
]
}
/*
* @Author: LeeJiancong
* @Date: 2020-08-01 11:06:09
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-09-09 14:47:02
*/
export const TimeList = [
{
label: '单据时间(全部)', value: 0
},
{
label: '今天', value: 1
},
{
label: '一周内', value: 2
},
{
label: '一个月内', value: 3
},
{
label: '三个月内', value: 4
},
{
label: '六个月内', value: 5
},
{
label: '一年内', value: 6
},
{
label: '一年前', value: 7
}
]
/**
* @description: 需求单发布状态筛选
* @param {type}
* @return {type} 内
*/
export const filterExternalStateList = [
{
text: '提交需求单', value: 1
},
{
text: '审核需求单', value: 2
},
{
text: '提交报价单', value: 3
},
{
text: '确认报价单', value: 4
},
{
text: '完成', value: 5
},
{
text: '审核不通过', value: 6
},
{
text: '取消报价单', value: 7
}
]
/**
* @description: 需求单发布状态筛选
* @param {type}
* @return {type} 内
*/
export const filterInteriorStateList = [
{
text: '新增需求单', value: 1
},
{
text: '审核需求单一级', value: 2
},
{
text: '审核需求单二级', value: 3
},
{
text: '提交需求单', value: 4
},
{
text: '完成', value: 5
},
{
text: '审核不通过', value: 6
},
{
text: '取消需求单', value: 7
}
]
import React, { Component,ReactNode } from 'react';
import {Badge} from 'antd'
/****** *********************** 需求单 ************************** */
/**
* @description: 需求提交一级
* @param {type}
* @return {type}
*/
export const interiorState = (text:any) => {
let component: ReactNode = null;
text === 1 ? component = <Badge status='default' text="待提交审核" />:
text === 2 ? component = <Badge status='processing' text="待审核" />:
text === 3 ? component = <Badge status='success' text="审核通过" />:
component = <Badge status='error' text="审核不通过" />
return component;
}
/**
* @description: 需求提交二级
* @param {type}
* @return {type}
*/
export const interiorStateTwo = (text:any) => {
let component: ReactNode = null;
text === 1 ? component = <Badge status='default' text="待提交审核" />:
text === 3 ? component = <Badge status='processing' text="待审核" />:
text === 4 ? component = <Badge status='success' text="审核通过" />:
component = <Badge status='error' text="审核不通过" />
return component;
}
/**
* @description: 专用需求发布的需求单查询
* @param {type}
* @return {type} 内
*/
export const enquirySearchInteriorState = (text:any) => {
let component: ReactNode = null;
text === 1 ? component = <Badge status='default' text="新增需求单" />:
text === 2 ? component = <Badge color="#FFC400" text="审核需求单一级" />:
text === 3 ? component = <Badge color="#FFC400" text="审核需求单二级" />:
text === 4 ? component = <Badge status='processing' text="待提交需求单" />:
text === 5 ? component = <Badge status='success' text="完成" />:
text === 6 ? component = <Badge status='error' text="审核不通过" />:
component = <Badge status="default" text="取消需求单" />
return component;
}
/**
* @description: 专用需求发布的需求单查询
* @param {type}
* @return {type} 外
*/
export const enquirySearchexternalState = (text:any) => {
let component: ReactNode = null;
text === 1 ? component = <Badge status='default' text="提交需求单" />:
text === 2 ? component = <Badge color="#FFC400" text="审核需求单" />:
text === 3 ? component = <Badge status='default' text="提交报价单" />:
text === 4 ? component = <Badge status='processing' text="确认报价单" />:
text === 5 ? component = <Badge status='success' text="完成" />:
text === 6 ? component = <Badge status='error' text="审核不通过" />:
component = <Badge status="default" text="取消报价单" />
return component;
}
/****** *********************** 报价单 ************************** */
import React, { Component, useState, useEffect } from 'react';
import { Modal, Button, Form } from 'antd'
import {
SchemaForm, SchemaMarkupField as Field,
createFormActions,
FormEffectHooks
} from '@formily/antd'
import { Input, Radio, FormMegaLayout } from '@formily/antd-components'
import { PublicApi } from '@/services/api'
import {PATTERN_MAPS} from '@/constants/regExp'
export interface Params {
id: number | string;
type: number|string;//1是一级 2是二级
dialogVisible: boolean;
onCancel: Function;
onOK?: Function;
dontReceive?: boolean; //默认展示
}
const actions = createFormActions()
const { onFieldChange$ } = FormEffectHooks
const comfirmDialog: React.FC<Params> = (props:any) => {
console.log(props.dialogVisible)
const handleCancel = () => {
}
const handletOk = (values: any) => {
let value = { ...values }
value.id = props.id
console.log('value',value)
//平台审核
if(props.type == 1){
PublicApi.postOrderPlatformRequisitionFormAudit(value).then(res => {
if (res.code === 1000) {
props.onOK()
}
})
}
// else if(props.type == 2){
// PublicApi.postOrderRequisitionFormAuditTwo(value).then(res => {
// if (res.code === 1000) {
// props.onOK()
// }
// })
// }
}
useEffect(() => {
return () => {
}
}, [])
const useFormEffects = () => {
const { setFieldState } = createFormActions()
onFieldChange$('state').subscribe(({ value }) => {
setFieldState('cause', state => {
if (value == 1) {
state.visible = false
} else {
state.visible = true
}
})
})
}
return (
<>
<Modal
title='审核确认'
width={800}
visible={props.dialogVisible}
onOk={() => actions.submit()}
onCancel={() => props.onCancel()}
destroyOnClose
afterClose={() => actions.reset()}
okText='确定'
cancelText={`取消`}
>
<SchemaForm
labelCol={4}
components={{
Input, Radio: Radio.Group, TextArea: Input.TextArea
}}
actions={actions}
effects={() => useFormEffects()}
onSubmit={(values) => handletOk(values)}
initialValues={{
state: 1
}}
>
<Field
enum={
[
{ label: '审核通过', value: 1 },
{ label: '审核不通过', value: 0 }
]}
name='state'
required
x-component="Radio"
x-component-props={{
}}
/>
{props.dontReceive &&
<>
{/* <FormMegaLayout name='remarkOption' label='不接受原因' full required labelCol={2} labelAlign="top"> */}
<Field
title='审核不通过原因'
name="cause"
x-component="TextArea"
required
x-component-props={{
placeholder: '在此输入你的内容,最多60个汉字'
}}
x-rules ={{
max:60,
// maximum:10,//最大数值
message:'原因最多60个汉字'
}}
/>
</>
}
</SchemaForm>
</Modal>
</>
)
}
comfirmDialog.defaultProps = {
dontReceive: true
}
export default comfirmDialog
\ No newline at end of file
.nameCell {
text-align: left;
.nameCellTitle {
color : @main-color;
cursor: pointer;
}
.levelIcon1 {
width : 100%;
height : 16px;
background : url("/static/imgs/level1@2x.png") no-repeat;
background-size: 54px 16px;
margin-top : 8px;
}
.levelIcon2 {
width : 100%;
height : 16px;
background : url("/static/imgs/level2@2x.png") no-repeat;
background-size: 54px 16px;
margin-top : 8px;
}
.levelIcon3 {
width : 100%;
height : 16px;
background : url("/static/imgs/level3@2x.png") no-repeat;
background-size: 54px 16px;
margin-top : 8px;
}
}
.headerTop {
display : flex;
align-items: center;
font-size : 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
&-prefix {
width : 48px;
height : 48px;
line-height : 48px;
border-radius : 4px;
border : 1px solid #DFE1E6;
color : #fff;
text-align : center;
background-color: #8777D9;
}
&-name {
color : #172B4D;
margin: 0 8px 0 12px;
}
}
.headerMain {
display: flex;
&-left {
flex : 6;
display : flex;
flex-wrap : wrap;
padding-left: 90px;
&-option {
display : flex;
width : calc(100% / 3);
margin-bottom: 17px;
font-size : 14px;
font-family : PingFangSC-Regular, PingFang SC;
font-weight : 400;
color : #6B778C;
padding-right: 20px;
// &:nth-of-type(n + 4) {
// margin: 0;
// }
&:nth-of-type(3n+1) {
margin: 0;
}
div {
flex: 1;
&:nth-last-of-type(1) {
flex: 2;
}
}
}
}
&-right {
flex : 1;
text-align: right;
}
}
.saveBtn {
color : #fff;
background : @main-color;
margin-left: 10px;
}
.count{
font-size: 24px;
color: #172B4D;
font-weight: 500;
}
.add-btn{
margin-bottom: 24px;
padding: 6px 0;
text-align: center;
background: #FAFBFC;
}
.alignCenter{
text-align: center;
}
.alignLeft{
text-align: left;
}
.hidden{
display: none;
}
.block{
display: block;
}
.selectBtn {
margin: 0 16px;
}
.filter-btn{
width : 112px;
margin: 0 0 0 16px;
}
.select {
width : 160px;
&:nth-last-of-type(1) {
margin-right: 0;
}
}
.mainCol {
background-color: #fff;
margin-bottom : 24px;
padding : 0 24px;
box-sizing : border-box;
&-title {
font-size : 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color : #172B4D;
padding : 20px 0;
}
&:nth-last-of-type(1) {
margin: 0;
}
&-row {
display : flex;
flex-wrap : wrap;
padding-bottom: 16px;
&-col {
display: flex;
width : calc(100% / 3);
padding: 16px 0;
&-option {
flex : 1;
font-size : 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color : #6B778C;
&:nth-last-of-type(1) {
flex : 3;
padding-right: 20px;
box-sizing : border-box;
color : #172B4D;
}
}
}
}
&-rows {
display : flex;
padding-bottom: 16px;
&-cols {
flex: 1;
.cols-main {
display: flex;
padding: 16px 0;
&:nth-last-of-type(1) {
padding-bottom: 0;
}
&-options {
flex : 1;
font-size : 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color : #6B778C;
&:nth-last-of-type(1) {
flex : 3;
padding-right: 20px;
box-sizing : border-box;
color : #172B4D;
}
}
}
}
}
}
\ No newline at end of file
/*
* @Author: LeeJiancong
* @Date: 2020-09-10 11:00:17
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-10 11:17:09
*/
/**
* @description: 需求选择
* @param {type}
* @return {type}
*/
import React, { Component } from 'react';
import {Space,Radio,Tooltip} from 'antd'
import {QuestionCircleOutlined} from '@ant-design/icons'
export interface plarms{
platType: number;//类型 1平台 2系统匹配 3会员选择
changePlatform?: Function;//事件
disabled?: boolean;
}
const PlatType: React.FC<plarms> = (props) => {
return (
<Space size={16}>
<Radio.Group disabled={props.disabled} value={props.platType} onChange={(e) => props.changePlatform(e)}>
<Radio value={1}>
发布至平台
<Tooltip title="需求发布至企业商城求购频">
<QuestionCircleOutlined />
</Tooltip>
</Radio>
<Radio value={2}>
系统匹配
<Tooltip title="系统通过需求单品类、商品属性、适用地市与平台会员发布的商品品类、
商品属性、归属地区进行匹配,推荐满足条件的平台会员">
<QuestionCircleOutlined />
</Tooltip>
</Radio>
<Radio value={3}>
指定会员
<Tooltip title="选择与当前会员有归属关系的会员且角色类型为服务提供的会员(供应商),
需求只发送给指定会员">
<QuestionCircleOutlined />
</Tooltip>
</Radio>
</Radio.Group>
</Space>
)
}
PlatType.defaultProps ={
platType: 1,
disabled: false
}
export default PlatType
\ No newline at end of file
import React, { useEffect } from 'react'
import { ISchemaFormActions, FormEffectHooks, IFormActions } from '@formily/antd';
import { PublicApi } from '@/services/api';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
const { onFieldValueChange$ } = FormEffectHooks
// 高级筛选schema中用于输入搜索需求发布品类的Effect
export const searchSelectGetSelectCategoryOptionEffect = (context: any, fieldName: string) => {
context.getFieldState(fieldName, state => {
PublicApi.getProductSelectGetSelectCategory({ name: state.props['x-component-props'].searchValue }).then(res => {
context.setFieldState(fieldName, state => {
state.props['x-component-props'].dataoption = res.data
})
})
})
}
\ No newline at end of file
import { ISchema} from '@formily/antd'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import {TimeList} from '../common/statusList'
/**
* @description: 公用
* @param {type}
* @return {type}
*/
export const enquierySchema: ISchema = {
type:'object',
properties:{
megalayout:{
type:'object',
"x-component":'mega-layout',
"x-component-props":{
grid:true
},
properties:{
ctl:{
type:'object',
"x-component":"Children",
"x-component-props":{
children:"{{controllerBtns}}"
}
},
requisitionFormNo:{
type:'string',
"x-component":"Search",
"x-mega-props":{
},
"x-component-props":{
placeholder:'搜索'
}
}
}
},
[FORM_FILTER_PATH]:{
type:'object',
"x-component":"flex-layout",
"x-component-props":{
rowStyle:{
flexWrap:'nowrap'
},
colStyle:{
marginLeft: 20
}
},
properties:{
PRO_LAYOUT:{
type:'object',
"x-component":'mega-layout',
"x-mega-props":{
span: 5
},
"x-component-props":{
inline: true
},
properties:{
details:{
type:'string',
"x-component-props":{
placeholder:'需求摘要'
}
},
category:{
type:'string',
'x-component': 'CustomInputSearch',
'x-component-props': {
placeholder: '商品品类',
showSearch: true,
showArrow: true,
defaultActiveFirstOption: false,
filterOption: false,
notFoundContent: null,
style: { width: '174px', lineHeight: '32px' },
searchValue: null,
dataoption: []
}
// "x-component-props":{
// placeholder:'请选择品类'
// },
// enum:[]
},
voucherTime:{
type:'string',
default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
},
enum: TimeList
},
}
},
sumbit:{
"x-component":'Submit',
"x-mega-props":{
span:1
},
"x-component-props":{
children:'查询'
}
}
}
}
}
}
/**
* @description: 公用
* @param {type}
* @return {type}
*/
export const commonEnquieryOfferSchema: ISchema = {
type:'object',
properties:{
megalayout:{
type:'object',
"x-component":'mega-layout',
"x-component-props":{
grid:true
},
properties:{
ctl:{
type:'object',
"x-component":"Children",
"x-component-props":{
children:"{{controllerBtns}}"
}
},
quotationNo:{//报价单号
type:'string',
"x-component":"Search",
"x-mega-props":{
},
"x-component-props":{
placeholder:'报价单搜索'
}
}
}
},
[FORM_FILTER_PATH]:{
type:'object',
"x-component":"flex-layout",
"x-component-props":{
rowStyle:{
flexWrap:'nowrap'
},
colStyle:{
marginLeft: 20
}
},
properties:{
PRO_LAYOUT:{
type:'object',
"x-component":'mega-layout',
"x-mega-props":{
span: 5
},
"x-component-props":{
inline: true
},
properties:{
requisitionFormNo:{//需求单号
type:'string',
"x-mega-props":{
},
"x-component-props":{
placeholder:'询价单'
}
},
details:{
type:'string',
"x-component-props":{
placeholder:'报价摘要'
}
},
demandMembers:{
type:'string',
"x-component-props":{
placeholder:'询价会员'
}
},
// category:{
// type:'string',
// 'x-component': 'CustomInputSearch',
// 'x-component-props': {
// placeholder: '商品品类',
// showSearch: true,
// showArrow: true,
// defaultActiveFirstOption: false,
// filterOption: false,
// notFoundContent: null,
// style: { width: '174px', lineHeight: '32px' },
// searchValue: null,
// dataoption: []
// }
// // "x-component-props":{
// // placeholder:'请选择品类'
// // },
// // enum:[]
// },
voucherTime:{
type:'string',
default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
},
enum: TimeList
},
}
},
sumbit:{
"x-component":'Submit',
"x-mega-props":{
span:1
},
"x-component-props":{
children:'查询'
}
}
}
}
}
}
/**
* @description: 需求报价查询
* @param {type}
* @return {type}
*/
export const enquierySearchSchema: ISchema = {
type:'object',
properties:{
megalayout:{
type:'object',
"x-component":'mega-layout',
properties:{
requisitionFormNo:{
type:'string',
"x-component":"Search",
"x-mega-props":{
},
"x-component-props":{
placeholder:'搜索',
align: 'flex-left',
}
}
}
},
[FORM_FILTER_PATH]:{
type:'object',
"x-component":"flex-layout",
"x-component-props":{
rowStyle:{
justifyContent: 'flex-start',
flexWrap:'nowrap'
},
colStyle:{//改变间隔
marginRight: 20
}
},
properties:{
PRO_LAYOUT:{
type:'object',
"x-component":'mega-layout',
"x-mega-props":{
span: 5
},
"x-component-props":{
inline: true
},
properties:{
demandMembers:{
type:'string',
"x-component-props":{
placeholder:'询价会员'
}
},
// category:{
// type:'string',
// 'x-component': 'CustomInputSearch',
// 'x-component-props': {
// placeholder: '商品品类',
// showSearch: true,
// showArrow: true,
// defaultActiveFirstOption: false,
// filterOption: false,
// notFoundContent: null,
// style: { width: '174px', lineHeight: '32px' },
// searchValue: null,
// dataoption: []
// }
// // "x-component-props":{
// // placeholder:'请选择品类'
// // },
// // enum:[]
// },
voucherTime:{
type:'string',
default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
},
enum: TimeList
},
}
},
sumbit:{
"x-component":'Submit',
"x-mega-props":{
span: 1
},
"x-component-props":{
children:'查询'
}
}
}
}
}
}
/**
* @description: 报价单新增编辑-需求单查询
* @param {type}
* @return {type}
*/
export const dialogEqformSearch: ISchema = {
type:'object',
properties:{
megalayout:{
type:'object',
"x-component":'mega-layout',
properties:{
requisitionFormNo:{
type:'string',
"x-component":"Search",
"x-mega-props":{
},
"x-component-props":{
placeholder:'需求单号',
align: 'flex-left',
}
}
}
},
[FORM_FILTER_PATH]:{
type:'object',
"x-component":"flex-layout",
"x-component-props":{
rowStyle:{
justifyContent: 'flex-start',
flexWrap:'nowrap'
},
colStyle:{//改变间隔
marginRight: 20
}
},
properties:{
PRO_LAYOUT:{
type:'object',
"x-component":'mega-layout',
"x-mega-props":{
span: 5
},
"x-component-props":{
inline: true
},
properties:{
details:{
type:'string',
"x-component-props":{
placeholder:'需求摘要'
}
},
demandMembers:{
type:'string',
"x-component-props":{
placeholder:'需求会员'
}
},
voucherTime:{
type:'string',
default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
},
enum: TimeList
},
}
},
sumbit:{
"x-component":'Submit',
"x-mega-props":{
span: 1
},
"x-component-props":{
children:'查询'
}
}
}
}
}
}
\ No newline at end of file
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