diff --git a/config/routers/pms.ts b/config/routers/pms.ts index 30672fe..b5eabf2 100644 --- a/config/routers/pms.ts +++ b/config/routers/pms.ts @@ -163,4 +163,8 @@ export default [ path: '/pms/transfer/storageOverStock', // 可调出配件 component: './pms/transfer/StorageOverStock' }, + { + path: '/pms/transfer/huolalaSetting', // 货拉拉账户配置 + component: './pms/transfer/HuolalaSetting' + }, ]; diff --git a/src/pages/pms/partPlan/PlanManage/api.ts b/src/pages/pms/partPlan/PlanManage/api.ts index 3fb2499..9c15c09 100644 --- a/src/pages/pms/partPlan/PlanManage/api.ts +++ b/src/pages/pms/partPlan/PlanManage/api.ts @@ -26,7 +26,7 @@ export interface ListVO { planDate?: string; // 计划日期 approvalOrderNo?: string; // 审核单号 userName?: string; // 计划人员 - status?: string; // 计划状态 1:待审核2:已通过9:已拒绝 + status?: number; // 计划状态 1:待审核2:已通过9:已拒绝 settleShopId?: string; // 结算门店门店id settleShopName?: string; // 结算门店名称 prepayToken?: string; // 预付token diff --git a/src/pages/pms/partPlan/PlanManage/index.tsx b/src/pages/pms/partPlan/PlanManage/index.tsx index 8c662ee..0c48c61 100644 --- a/src/pages/pms/partPlan/PlanManage/index.tsx +++ b/src/pages/pms/partPlan/PlanManage/index.tsx @@ -13,6 +13,7 @@ import DetailModal from "@/pages/pms/partPlan/PlanManage/components/DetailModal" // 计划状态 1:待审核2:已通过3待付款4已付款9:已拒绝 const statusName: {[key: number]: string} = { + 0: '草稿', 1: '待审核', 2: '已通过', 3: '待付款', @@ -69,6 +70,7 @@ export default function Index() { onChange={v => setParams({status: v }, true)} optionFilterProp="children" > + 草稿 待审核 已通过 已拒绝 @@ -95,9 +97,16 @@ export default function Index() { fixed="right" render={(text, _item: ListVO) => ( <> - history.push(`/pms/partPlan/planManage/detail/${_item.planId}`)}> - 查看 - + {[0, 9].includes(_item.status || 0) ? ( + history.push(`/pms/partPlan/planManage/apply?planId=${_item.planId}`)}> + 编辑 + + ) + : ( + history.push(`/pms/partPlan/planManage/detail/${_item.planId}`)}> + 查看 + + )} { setItem(_item); diff --git a/src/pages/pms/partPlan/PlanManage/subpages/Apply/api.ts b/src/pages/pms/partPlan/PlanManage/subpages/Apply/api.ts index 4ec92c3..1c57e01 100644 --- a/src/pages/pms/partPlan/PlanManage/subpages/Apply/api.ts +++ b/src/pages/pms/partPlan/PlanManage/subpages/Apply/api.ts @@ -16,3 +16,9 @@ export interface SaveParams { export function saveApi(params?: SaveParams): http.PromiseResp { return request.post(`${PMS_HOST}/erp/plan/pool/save/plan`, params); } +/** + * 草稿 + */ +export function draftApi(params?: SaveParams): http.PromiseResp { + return request.post(`${PMS_HOST}/erp/plan/pool/save/draft`, params); +} diff --git a/src/pages/pms/partPlan/PlanManage/subpages/Apply/components/DealerModal.tsx b/src/pages/pms/partPlan/PlanManage/subpages/Apply/components/DealerModal.tsx index a160efe..ffd7427 100644 --- a/src/pages/pms/partPlan/PlanManage/subpages/Apply/components/DealerModal.tsx +++ b/src/pages/pms/partPlan/PlanManage/subpages/Apply/components/DealerModal.tsx @@ -11,9 +11,9 @@ interface Props { } const {Option} = Select; export default function Index({ onCancel, visible, onOk, dealerList = [] }: Props) { - const [dealer, setDealer] = useState({dealerId: null, dealerName: null}); + const [dealer, setDealer] = useState({ settleDealerId: null, settleDealerName: null}); const { data: dealers } = useInitail(getDealerApi, [], {}); - const suIds = dealerList.map(it => it.dealerId); + const suIds = dealerList.map(it => it.settleDealerId); useEffect(() => { if (!visible) { @@ -22,7 +22,7 @@ export default function Index({ onCancel, visible, onOk, dealerList = [] }: Prop }, [visible]); const handSave = () => { - if (!dealer.dealerId) { + if (!dealer.settleDealerId) { message.error('请选择采购商家'); return; } @@ -40,7 +40,7 @@ export default function Index({ onCancel, visible, onOk, dealerList = [] }: Prop , , + + ]} + > +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + ); +} diff --git a/src/pages/pms/transfer/HuolalaSetting/index.tsx b/src/pages/pms/transfer/HuolalaSetting/index.tsx new file mode 100644 index 0000000..f69ab9b --- /dev/null +++ b/src/pages/pms/transfer/HuolalaSetting/index.tsx @@ -0,0 +1,55 @@ +import React, { useState } from 'react'; +import { Card, Button, Table, Divider, Popconfirm, message } from 'antd'; +import { PageHeaderWrapper } from '@ant-design/pro-layout'; +import AddModal from './components/AddModal'; +import ChargeModal from './components/ChargeModal'; +import {getList, ListVO, deleteApi} from './api'; +import usePagination from '@/hooks/usePagination'; + +const Column = Table.Column; +export default function Index() { + const {list, loading, paginationConfig, setParams} = usePagination(getList, [], {}); + const [current, setCurrent] = useState<{ visible: boolean, item: ListVO }>({visible: false, item: {}}); + const [chargeInfo, setChargeInfo] = useState<{ visible: boolean, item: ListVO }>({visible: false, item: {}}); + const data = [{id: 1, supplierName: "货拉拉", shopName: "不过承诺书可能单纯迪士尼才", amount: 3000, minAmount: 1500, roleName: "计划制定员", account: "15725173,16638183"}]; + return ( + + setCurrent({visible: true, item: {}})}>新增} + > + + + + + + + + ( +
+ setChargeInfo({visible: true, item: r})}>预付款充值申请 + + setCurrent({visible: true, item: r})}>编辑 + + { + deleteApi({id: r.id}).then(res => { + message.success('操作成功'); + setParams({}, true); + }).catch(e => message.error(e.message)); + }} + > + 删除 + +
+ )} + /> +
+ setCurrent({ visible: false, item: {} })} /> + setChargeInfo({ visible: false, item: {} })} /> +
+
+ ); +} diff --git a/src/pages/pms/transfer/transferPool/comonents/Filiter.tsx b/src/pages/pms/transfer/transferPool/comonents/Filiter.tsx index 28a6125..451f1bf 100644 --- a/src/pages/pms/transfer/transferPool/comonents/Filiter.tsx +++ b/src/pages/pms/transfer/transferPool/comonents/Filiter.tsx @@ -26,9 +26,9 @@ export default function Index() { setParams({keywords: value}, true)} - style={{ width: 220, marginRight: 10 }} + style={{ width: 200, marginRight: 10, marginBottom: 10 }} />