Commit a3c2e82a9e09fc00e4e8551127420fc478d7b4e0

Authored by by1642146903
2 parents 5a1dd4c5 651a20fb

Merge remote-tracking branch 'origin/pms'

config/routers/pms.ts
... ... @@ -171,4 +171,8 @@ export default [
171 171 path: '/pms/storage/prepare', // 备料管理
172 172 component: './pms/storage/Prepare'
173 173 },
  174 + {
  175 + path: '/pms/storage/partStock', // 配件锁库时长
  176 + component: './pms/storage/partStock'
  177 + },
174 178 ];
... ...
src/pages/pms/comonents/ImageUpload.tsx
... ... @@ -77,6 +77,7 @@ function Index(props: Props) {
77 77 <Upload
78 78 action="/api/file/upload"
79 79 listType="picture-card"
  80 + accept=".jpg,.png"
80 81 disabled={disabled}
81 82 fileList={fileList}
82 83 onPreview={handlePreview}
... ... @@ -85,6 +86,7 @@ function Index(props: Props) {
85 86 >
86 87 {fileList.length >= max ? null : uploadButton}
87 88 </Upload>
  89 + <span style={{fontSize: 10}}>支持上传类型 jpg、png</span>
88 90 <Modal open={previewOpen} footer={null} onCancel={handleCancel}>
89 91 <img alt="example" style={{ width: '100%' }} src={previewImage} />
90 92 </Modal>
... ...
src/pages/pms/part/PartPriceCoefficient/components/UploadModal.tsx
... ... @@ -127,12 +127,13 @@ export default function UploadExcel(props: Props) {
127 127 <span>导入原因:</span>
128 128 <Input value={uploadInfo?.fixRemark} onChange={(e) => setUploadInfo({ ...uploadInfo, fixRemark: e.target.value})} style={{width: 250}} />
129 129 </div>
130   - <Dragger {...uploadProps}>
  130 + <Dragger {...uploadProps} style={{ marginBottom: 20 }}>
131 131 <p className="ant-upload-drag-icon">
132 132 <InboxOutlined />
133 133 </p>
134 134 <p className="ant-upload-text">将文件拖到此处上传</p>
135 135 </Dragger>
  136 + <a href="/api/pms/erp/part/template/part/price/import">下载导入模版</a>
136 137 </div>
137 138 ) : (
138 139 <div>
... ...
src/pages/pms/part/Repertory/index.tsx
... ... @@ -12,7 +12,6 @@ import Filter from &#39;./components/Filter&#39;;
12 12 import SpecList from './components/SpecList';
13 13 import List from './components/List';
14 14 import SpecEcpModal from './components/SpecEpcModal';
15   -import moment from 'moment';
16 15  
17 16 const { TabPane } = Tabs;
18 17 export const { Provider, useStore } = createStore(store);
... ... @@ -42,7 +41,7 @@ function RepertoryIndex() {
42 41 导入
43 42 </Button>
44 43 <Button type="default" style={{ marginLeft: 10 }}>
45   - <a href={`http://static.feewee.cn/templates/配件批量导入模板.xlsx?t=${moment().valueOf()}`}>
  44 + <a href="/api/pms/erp/part/template/part/import">
46 45 下载模板
47 46 </a>
48 47 </Button>
... ...
src/pages/pms/partPlan/AppointPart/comonents/UploadExcel.tsx
... ... @@ -77,12 +77,13 @@ export default function UploadExcel(props: Props) {
77 77 </Popconfirm>
78 78 ]}
79 79 >
80   - <Dragger {...uploadProps}>
  80 + <Dragger {...uploadProps} style={{ marginBottom: 20 }}>
81 81 <p className="ant-upload-drag-icon">
82 82 <InboxOutlined />
83 83 </p>
84 84 <p className="ant-upload-text">将文件拖到此处上传</p>
85 85 </Dragger>
  86 + <a href="/api/pms/erp/part/template/plan/part/import">下载导入模版</a>
86 87 </Modal>
87 88 );
88 89 }
... ...
src/pages/pms/partPlan/Setting/api.ts
... ... @@ -11,6 +11,9 @@ export interface Item {
11 11 prepareTime?: number // 备料时效
12 12 startingPrice?: number// 调运起步价
13 13 startingDistance?: number // 调运起步距离
  14 + ratioMorax1?:string
  15 + ratioMorax2?:string
  16 + ratioMorax3?:string
14 17 }
15 18  
16 19 /**
... ...
src/pages/pms/partPlan/Setting/index.tsx
... ... @@ -100,6 +100,32 @@ export default function Index() {
100 100 onChange={(value: any) => setData({ ...data, prepareTime: value })}
101 101 />
102 102 </span>
  103 + <span style={{ marginBottom: 20 }}>9、库销比≥&nbsp;
  104 + <InputNumber
  105 + disabled={!disable}
  106 + controls={false}
  107 + style={{width: 50}}
  108 + value={data.ratioMorax1}
  109 + onChange={(value: any) => setData({ ...data, ratioMorax1: value })}
  110 + />
  111 + &nbsp;时每增加&nbsp;
  112 + <InputNumber
  113 + disabled={!disable}
  114 + controls={false}
  115 + style={{ width: 50 }}
  116 + value={data.ratioMorax2}
  117 + onChange={(value: any) => setData({ ...data, ratioMorax2: value })}
  118 + />
  119 + &nbsp;扣&nbsp;
  120 + <InputNumber
  121 + addonAfter="%"
  122 + disabled={!disable}
  123 + controls={false}
  124 + style={{ width: 80 }}
  125 + value={data.ratioMorax3}
  126 + onChange={(value: any) => setData({ ...data, ratioMorax3: value })}
  127 + />
  128 + </span>
103 129 <ConfirmBnt
104 130 disable={disable}
105 131 onOk={handleSave}
... ...
src/pages/pms/storage/partStock/api.ts 0 → 100644
  1 +import request from '@/utils/request';
  2 +import { PMS_HOST } from '@/utils/host';
  3 +import { http } from '@/typing/http';
  4 +
  5 +export const Type: { [key: number]: string } = {
  6 + 0: '正常锁定',
  7 + 1: '售后工单锁定',
  8 + 2: '市场工单锁定',
  9 + 3: '装潢零售锁定',
  10 + 4: '定巡航领料',
  11 + 5: '调拨锁定',
  12 + 6: '库存锁定',
  13 + 7: '外采锁定',
  14 + 8: '订件锁定',
  15 + 10: '客户主动订件锁定',
  16 + 11: '办公用品锁定',
  17 +};
  18 +// 处理类型
  19 +export const handleTypeData = [
  20 + { value: 1, label: '释放' },
  21 + { value: 2, label: '延期' },
  22 +];
  23 +// 处理类型
  24 +export const lockTypeData = [
  25 + // { value: 0, label: '正常锁定' },
  26 + { value: 1, label: '售后工单锁定' },
  27 + { value: 3, label: '装潢零售锁定' },
  28 + { value: 5, label: '调件锁定' },
  29 + // { value: 6, label: '库存锁定' },
  30 + // { value: 7, label: '外采锁定' },
  31 + // { value: 8, label: '订件锁定' },
  32 + { value: 10, label: '客户主动订件锁定' },
  33 + // { value: 11, label: '办公用品锁定' },
  34 +];
  35 +/**
  36 + * 列表项
  37 + */
  38 +export interface Item {
  39 + lockId?: number;
  40 + // 锁件ID
  41 + partId?: number;
  42 + // 配件ID
  43 + partCode?: string;
  44 + // 配件编码?
  45 + partName?: string;
  46 + // 配件名称
  47 + // reid.renner
  48 + needCnt?: number;
  49 + // int32
  50 + // 需要数量
  51 + confirmTime?: string;
  52 + // 确认时间(锁库时间)
  53 + lockCnt?: number;
  54 + // 锁定数量
  55 + // 594
  56 + useCnt?: number;
  57 + // int32
  58 + // 使用数量
  59 + outCnt?: number;
  60 + days?: number;
  61 + // int32
  62 + // 领料出库数量
  63 + type?: number;
  64 + // 锁定类型0正常锁定1售后工单锁定2市场工单锁定3装潢零售锁定4定巡航锁定5调出锁定6库存锁定7外采锁定8订件锁定10客户主动订件锁定11办公用品锁定(See: 锁定类型
  65 + typeId?: string;
  66 + // 类型ID
  67 + remark?: string;
  68 + // 单号
  69 + storageName?: string;
  70 + delayCnt?: number; //延期次数
  71 +}
  72 +export interface RecordItem {
  73 + id?: number;
  74 + // int64
  75 + // ID
  76 + // 870
  77 + lockId?: number;
  78 + // int64
  79 + // 锁件ID
  80 + // 558
  81 + type?: number;
  82 + // enum
  83 + // 锁定处理类型1释放2延期(See: 锁定处理类型
  84 + days?: number;
  85 + // int32
  86 + // 延期天数
  87 + // 500
  88 + userId?: number;
  89 + // int64
  90 + // 处理人员ID
  91 + // 769
  92 + userName?: string;
  93 + // 处理人员名称
  94 + // hobert.wiegand
  95 + shopId?: number;
  96 + // int64
  97 + // 门店ID
  98 + // 533
  99 + shopName?: string;
  100 + // 门店名称
  101 + // hobert.wiegand
  102 + remark?: string;
  103 + // 备注
  104 + // wxushz
  105 + fids?: string;
  106 + // 附件
  107 + // di8yqs
  108 + groupId?: number;
  109 + // int64
  110 + // 集团ID
  111 + // 291
  112 + createTime?: string;
  113 + // 创建时间
  114 +}
  115 +/**
  116 + * 参数
  117 + */
  118 +export interface QueryParams {
  119 + current?:number,
  120 + shopIds?: number; // 门店
  121 + storageId?: number;
  122 + lockType?: number; //
  123 + orderBy?: number;
  124 + isAsc?: boolean;
  125 + pageSize?:number
  126 +}
  127 +export interface handleParams {
  128 + lockId?: number;
  129 + type?: number;
  130 + delayDays?: number;
  131 + remark?: string;
  132 + fids?: string[];
  133 +}
  134 +/**配件锁料异常列表*/
  135 +export function fetchList(params?: QueryParams): http.PromisePageResp<Item> {
  136 + return request.get(`${PMS_HOST}/part/lock/handler/lock/list`, { params });
  137 +}
... ...
src/pages/pms/storage/partStock/components/AsOrderDetail/api.ts 0 → 100644
  1 +import request from '@/utils/request';
  2 +import {CAS_HOST} from '@/utils/host';
  3 +import { http } from '@/typing/http';
  4 +
  5 +export interface Detail {
  6 + brandId?: number;
  7 + carName?: string;
  8 + consultantDesc?: string;
  9 + cusRequire?: string;
  10 + cusType?: number;
  11 + orderId?: number;
  12 + orderNo?: string;
  13 + ownerName?: string;
  14 + plateNo?: string;
  15 + receiverName?: string; // 服务顾问
  16 + exclusiveAdviserName?: string; // 专属顾问
  17 + senderTime?: number;
  18 + serviceCatName?: string;
  19 + shopId?: number;
  20 + specCode?: string;
  21 + trip?: string;
  22 + vin?: string;
  23 +}
  24 +/**查询工单详情 */
  25 +export function fetchDetai2lApi(params: { orderId?: number; orderNo?: string }): http.PromiseResp<Detail> {
  26 + return request.get(`${CAS_HOST}/app/order/base/info/view`, { params });
  27 +}
0 28 \ No newline at end of file
... ...
src/pages/pms/storage/partStock/components/AsOrderDetail/index.tsx 0 → 100644
  1 +import React, { useEffect, useState } from 'react';
  2 +import {Modal, Button} from 'antd';
  3 +import {fetchDetai2lApi, Detail} from './api';
  4 +import useInitial from '@/hooks/useInitail';
  5 +import moment from 'moment';
  6 +import st from './style.less';
  7 +
  8 +interface Props {
  9 + visible:boolean
  10 + onCancel:Function,
  11 + orderNo:string
  12 +}
  13 +
  14 +export default function Index(props: Props) {
  15 + const {visible, onCancel, orderNo} = props;
  16 + const [delay, setDelay] = useState(true);
  17 + const { data, setParams, setData } = useInitial(fetchDetai2lApi, {} as Detail, {}, delay);
  18 +
  19 + useEffect(() => {
  20 + if (!!visible && !!orderNo) {
  21 + setDelay(false);
  22 + setParams({orderNo}, true);
  23 + }
  24 + if (!visible) {
  25 + setData({});
  26 + }
  27 + }, [visible]);
  28 +
  29 + return (
  30 + <Modal
  31 + title="工单详情"
  32 + width={600}
  33 + open={visible}
  34 + maskClosable={false}
  35 + onCancel={() => onCancel()}
  36 + footer={[
  37 + <Button key="cancel" onClick={() => onCancel()}>返回</Button>
  38 + ]}
  39 + >
  40 + <div className={st.text}>车牌号:{data.plateNo || '--'}</div>
  41 + <div className={st.text}>车主:{data.ownerName || '--'}</div>
  42 + <div className={st.text}>车辆:{data.carName || '--'}</div>
  43 + <div className={st.text}>VIN:{data.vin || '--'}</div>
  44 + <div className={st.text}>配置代码:{data.specCode || '--'}</div>
  45 + <div className={st.text}>专属服务顾问:{data.exclusiveAdviserName || '--'}</div>
  46 + <div className={st.text}>服务顾问:{data.receiverName || '--'}</div>
  47 + <div className={st.text}>接车类型:{data.serviceCatName || '--'}</div>
  48 + <div className={st.text}>工单号:{data.orderNo || '--'}</div>
  49 + <div className={st.text}>进站时间:{data.senderTime ? moment(data.senderTime).format('YYYY.MM.DD HH:mm') : '--'}</div>
  50 + </Modal>
  51 + );
  52 +}
0 53 \ No newline at end of file
... ...
src/pages/pms/storage/partStock/components/AsOrderDetail/style.less 0 → 100644
  1 +.text {
  2 + margin-bottom: 15px;
  3 +}
0 4 \ No newline at end of file
... ...
src/pages/pms/storage/partStock/components/DecorationOrder/api.ts 0 → 100644
  1 +import request from '@/utils/request';
  2 +import { DECORATION } from '@/utils/host';
  3 +import { http } from '@/typing/http';
  4 +
  5 +interface Params {
  6 + decoOrderNo?: string;
  7 + rnId?: number;
  8 +}
  9 +export interface DecoDetail{
  10 + rnId?:number
  11 + // 退换货ID
  12 + // 590
  13 + shopId?:number
  14 + // 归属门店ID
  15 + // 515
  16 + carName?:
  17 + string
  18 + // 车辆名称
  19 +// trent.fadel?
  20 +shopName?:
  21 +string
  22 +// 门店名称
  23 +// trent.fadel
  24 +orderId?:number
  25 +// int64
  26 +// 订单ID
  27 +// 947
  28 +decoOrderNo?:
  29 +string
  30 +// 订单编号
  31 +// 2d5oxj
  32 +totalPrice?:
  33 +number
  34 +// 原商品总价
  35 +// 5
  36 +totalActualPrice?:
  37 +number
  38 +// 实际支付金额
  39 +// 99
  40 +couponPrice?:
  41 +number
  42 +// 优惠券优惠金额
  43 +// 704
  44 +proTotalPrice?:
  45 +number
  46 +// 促销优惠金额
  47 +// 678
  48 +totalManHoursFee?:
  49 +number
  50 +// 工时费
  51 +// 343
  52 +additionalPrice?:
  53 +number
  54 +// 差价
  55 +// 复制
  56 +// 196
  57 +status?:number
  58 +// enum
  59 + // 订单状态
  60 + plateNo?:
  61 +string
  62 +// 车牌号
  63 +// uyfnbs
  64 +vin?:
  65 +string
  66 +// 车架号
  67 +// xdexm3
  68 +brandId?:number
  69 +// int64
  70 +// 品牌ID
  71 +// 884
  72 +seriesId?:number
  73 +// int64
  74 +// 车系ID
  75 +// 465
  76 +specId?:number
  77 +// int64
  78 +// 车型ID
  79 +// 331
  80 +orderTime?:
  81 +string
  82 +// 下单时间
  83 +// 2023 - 05 - 16 14: 41: 25
  84 +payTime?:
  85 +string
  86 +// 支付时间
  87 +// 2023 - 05 - 16 14: 41: 25
  88 +leftSeconds?:number
  89 +// int64
  90 +// 支付剩余时间
  91 +// 733
  92 +userName?:
  93 +string
  94 +// 专属顾问
  95 +// trent.fadel
  96 +bizType?:number
  97 +// int32
  98 +// 业务形态
  99 +// 286
  100 +tradeNo?:
  101 +string
  102 +// 交易号
  103 +// 49suvl
  104 +permitReturnNew?:boolean
  105 +// boolean
  106 +// 是否允许退换货
  107 +// true
  108 +proRemake?:
  109 +string
  110 +// 促销优惠备注
  111 +proVos?: proVo[] // 商品详情
  112 +}
  113 +interface proVo{
  114 + promotionId?:number
  115 + // int64
  116 + // 促销ID
  117 + // 126
  118 + promotionName?:
  119 + string
  120 + // 促销名称
  121 +// trent.fadel
  122 +proType?:number
  123 +// enum
  124 + // 促销类型
  125 + startTime?:
  126 +string
  127 +// 开始时间
  128 +// 2023 - 05 - 16 14: 41: 25
  129 +endTime?:
  130 +string
  131 +// 结束时间
  132 +// 2023 - 05 - 16
  133 +tip?:
  134 +string
  135 +// 提示
  136 +// 231.226.211.162
  137 +price?:
  138 +number
  139 +// 套餐价格
  140 +// 371
  141 +applyPrice?:
  142 +number
  143 +// 抵扣价格
  144 +// 64
  145 +proPrice?:
  146 +number
  147 +// 促销优惠金额
  148 +// 194
  149 +actualPrice?:
  150 +number
  151 +// 结算金额
  152 +// 500
  153 +originalPrice?:
  154 +number
  155 +// 已选金额
  156 + rules?:rule[]
  157 + hitCoupon?:boolean
  158 + orderGoodsVos?: orderGoodsVo[]
  159 +}
  160 +interface rule{
  161 + require?:number
  162 + expect?:number
  163 +}
  164 +interface orderGoodsVo {
  165 + cartId?:number
  166 +proType?:number
  167 +// 促销类型?
  168 +// 983
  169 +proId?:number
  170 +// int64
  171 +// 促销ID
  172 +// 88
  173 +goodsId?:number
  174 +// int64
  175 +// 商品ID
  176 +// 793
  177 +orderGoodsId?:number
  178 +// int64
  179 +// 订单商品ID
  180 +// 678
  181 +partId?:number
  182 +// int64
  183 +// 配件ID
  184 +// 99
  185 +partCode?:string
  186 +// 配件编码
  187 +// 8687
  188 +goodsName?:
  189 +string
  190 +// 商品名称
  191 +// trent.fadel
  192 +mainImgFid?:
  193 +string
  194 +// 主图
  195 +// 26
  196 +comRequire?:
  197 +boolean
  198 +// 套餐必选
  199 +// true
  200 +originalPrice?:
  201 +number
  202 +// 原价
  203 +// 868
  204 +specialPrice?:
  205 +number
  206 +// 特价
  207 +startTime?:
  208 +string
  209 +// 开始时间
  210 +// 2023 - 05 - 16 14: 41: 25
  211 +endTime?:
  212 +string
  213 +// 结束时间
  214 +// 2023 - 05 - 16
  215 +quantity?:number
  216 +// int32
  217 +// 数量
  218 +// 175
  219 +minRequire?:number
  220 +// int32
  221 +// 最低数量
  222 +// 495
  223 +workItemId?:number
  224 +// int64
  225 +// 作业项ID
  226 +// 630
  227 +workItemName?:
  228 +string
  229 +// 作业项名称
  230 +// trent.fadel
  231 +manHours?:
  232 +number
  233 +// 工时
  234 +// 544
  235 +manHoursFee?:
  236 +number
  237 +// 工时费?:
  238 +// 644/
  239 +rnId?:number
  240 +// int64
  241 +// 退换货ID
  242 +// 804
  243 +invalid?:
  244 +boolean
  245 +// 是否下架
  246 +// 复制
  247 +// true
  248 +old?:
  249 +boolean
  250 +// 是否为原订单商品
  251 +}
  252 +/**
  253 + * 装潢退货详情
  254 + */
  255 +export function OrderDetail(params: Params): http.PromiseResp<DecoDetail> {
  256 + return request.get(`${DECORATION}/deco/order/detail`, { params });
  257 +}
0 258 \ No newline at end of file
... ...
src/pages/pms/storage/partStock/components/DecorationOrder/index.tsx 0 → 100644
  1 +import React, { useEffect, useState } from 'react';
  2 +import { Modal, Button, Collapse, Spin } from 'antd';
  3 +import { OrderDetail, DecoDetail } from './api';
  4 +import useInitial from '@/hooks/useInitail';
  5 +import moment from 'moment';
  6 +import st from './style.less';
  7 +
  8 +interface Props {
  9 + visible: boolean
  10 + onCancel: Function,
  11 + decoOrderNo: string
  12 +}
  13 +
  14 +enum ProType {
  15 + '单品' = 0,
  16 + '套餐',
  17 + '满送',
  18 + '特价',
  19 +}
  20 +const { Panel } = Collapse;
  21 +export default function Index(props: Props) {
  22 + const { visible, onCancel, decoOrderNo } = props;
  23 + const [delay, setDelay] = useState(true);
  24 + const { data, setParams, setData, loading } = useInitial(OrderDetail, {} as DecoDetail, {}, delay);
  25 +
  26 + useEffect(() => {
  27 + if (!!visible && !!decoOrderNo) {
  28 + setDelay(false);
  29 + setParams({ decoOrderNo }, true);
  30 + }
  31 + if (!visible) {
  32 + setData({});
  33 + }
  34 + }, [visible]);
  35 +
  36 + return (
  37 + <Modal
  38 + title="装潢详情"
  39 + width={600}
  40 + open={visible}
  41 + maskClosable={false}
  42 + onCancel={() => onCancel()}
  43 + footer={[
  44 + <Button key="cancel" onClick={() => onCancel()}>返回</Button>
  45 + ]}
  46 + >
  47 + <Spin spinning={loading}>
  48 + <div className={st.title}>订单详情</div>
  49 + <div className={st.text}>订单编号:{data.decoOrderNo}</div>
  50 + <div className={st.text}>车牌号:{data.plateNo}</div>
  51 + <div className={st.text}>车架号:{data.vin}</div>
  52 + {data.bizType == 0 ? <div className={st.text}>销售顾问:{data.decoOrderNo}</div> : <div className={st.text}>服务顾问:{data.decoOrderNo}</div>}
  53 + <div className={st.text}>下单时间:{moment(data.orderTime).format('YYYY.MM.DD HH:mm')}</div>
  54 +
  55 + <div className={st.title}>商品详情</div>
  56 + <Collapse expandIconPosition="end">
  57 + {data.proVos?.map((item, index) => (
  58 + <Panel
  59 + header={
  60 + <>
  61 + <div style={{ display: 'flex' }}>
  62 + <span style={{marginRight: 10}}>促销类型:{ProType[item.proType || 0]}</span>
  63 + <span>{item.promotionName}</span>
  64 + </div>
  65 + {item && item.startTime ? (
  66 + <span>
  67 + 活动时间:{moment(item.startTime).format('YYYY-MM-DD')}-{moment(item.endTime).format('YYYY-MM-DD')}
  68 + </span>
  69 + ) :null}
  70 + <div style={{ marginBottom: 5 }}>结算金额:{item.actualPrice}元</div>
  71 + </>
  72 + }
  73 + key={index}
  74 + style={{ backgroundColor: '#F8F9FC'}}
  75 + >
  76 + <div className={st.goods}>
  77 + {item.orderGoodsVos?.map(i => (
  78 + <div key={i.cartId} className={st.good_item}>
  79 + <img src={i.mainImgFid} alt="暂无图片信息" width={140} height={100} />
  80 + <div style={{marginLeft: 10}}>
  81 + <div>商品名称:{i.goodsName}</div>
  82 + <div className={st.flex}>
  83 + <span>数量:{i.quantity}</span>
  84 + <span>编码:{i.partCode}</span>
  85 + </div>
  86 + {i.proType === 3 ? (
  87 + <div className={st.flex}>
  88 + <span>¥{i.specialPrice}</span>
  89 + <span>¥{i.originalPrice}</span>
  90 + </div>
  91 + ) : (
  92 + <div>¥{i.originalPrice || 0}</div>
  93 + )}
  94 + {i.workItemName ? (
  95 + <div className={st.flex}>
  96 + <span>装潢作业项:{i.workItemName || '无'}</span>
  97 + <span>工时费: ¥{i.manHoursFee || 0}</span>
  98 + </div>
  99 + ) : null}
  100 + </div>
  101 + </div>
  102 + ))}
  103 + </div>
  104 + </Panel>
  105 + ))}
  106 + </Collapse>
  107 +
  108 + <div className={st.title} style={{marginTop: 10}}>金额详情</div>
  109 + <div className={st.text}>售价:{data.totalPrice}元</div>
  110 + <div className={st.text}>优惠卷:{data.couponPrice || 0}</div>
  111 + <div className={st.text}>促销优惠备注:{data.proRemake}</div>
  112 + <div className={st.text}>合计:{data.totalActualPrice}元</div>
  113 + </Spin>
  114 + </Modal>
  115 + );
  116 +}
0 117 \ No newline at end of file
... ...
src/pages/pms/storage/partStock/components/DecorationOrder/style.less 0 → 100644
  1 +.title {
  2 + font-size: 18px;
  3 + margin-bottom: 10px;
  4 + color: #333333;
  5 + font-family: 'PingFangSC-Medium';
  6 + padding-bottom: 10px;
  7 + border-bottom: 1px #D9D9D9 solid ;
  8 +}
  9 +.text {
  10 + margin-bottom: 10px;
  11 +}
  12 +.goods{
  13 + height: 286px;
  14 + overflow: auto;
  15 + padding: 15px 15px;
  16 + -ms-overflow-style: none;
  17 +
  18 + .good_item{
  19 + display: flex;
  20 + margin-bottom: 15px;
  21 + box-shadow: 0px 1px 2px #c5c1c1;
  22 + padding: 10px 12px;
  23 + align-items: center;
  24 + background-color: white;
  25 + }
  26 + .flex{
  27 + display: flex;
  28 + justify-content: space-between;
  29 + }
  30 +}
  31 +.goods::-webkit-scrollbar {
  32 + display: none;
  33 +}
0 34 \ No newline at end of file
... ...
src/pages/pms/storage/partStock/index.tsx 0 → 100644
  1 +import React, { useState } from 'react';
  2 +import { PageHeaderWrapper } from '@ant-design/pro-layout';
  3 +import { Card, Table, Input } from 'antd';
  4 +import type { SorterResult } from 'antd/es/table/interface';
  5 +import usePagination from '@/hooks/usePagination';
  6 +import { fetchList, Item, Type, lockTypeData } from './api';
  7 +import moment from 'moment';
  8 +import PmsSelect from '@/pages/pms/comonents/PmsSelect';
  9 +import { getStoragePage } from '@/pages/pms/storage/StorageManage/api';
  10 +import AsOrderDetail from './components/AsOrderDetail';
  11 +import DecorationOrder from './components/DecorationOrder';
  12 +
  13 +const { Column } = Table;
  14 +const { Search } = Input;
  15 +
  16 +const OrderBy: { [key: string]: number } = {
  17 + 'lockCnt': 1,
  18 + 'confirmTime': 2,
  19 + 'days': 3,
  20 + 'delayCnt': 4,
  21 +};
  22 +
  23 +export default function Index() {
  24 + const { list, loading, setParams, paginationConfig } = usePagination<Item>(fetchList, {});
  25 + const { list: storages } = usePagination<PartStorageSpace.PageVO>(getStoragePage, { pageSize: 1000 });
  26 + const [asOrder, setAsOrder] = useState<{visible: boolean, orderNo: string}>({visible: false, orderNo: ''});
  27 + const [decOrder, setDecOrder] = useState<{ visible: boolean, decoOrderNo: string }>({ visible: false, decoOrderNo: ''});
  28 +
  29 + const click = (i: Item) => {
  30 + if (i.type == 1) {
  31 + setAsOrder({visible: true, orderNo: i.remark || ''});
  32 + } else {
  33 + setDecOrder({ visible: true, decoOrderNo: i.remark || '' });
  34 + }
  35 + };
  36 +
  37 + return (
  38 + <PageHeaderWrapper title="配件锁库时长">
  39 + <Card>
  40 + <div style={{ display: 'flex', alignItems: 'center', marginBottom: 20 }}>
  41 + <Search
  42 + placeholder="关键词搜索"
  43 + allowClear
  44 + enterButton
  45 + onSearch={v => setParams({ keywords: v }, true)}
  46 + style={{ width: 250, marginRight: 20 }}
  47 + />
  48 + <PmsSelect
  49 + style={{ width: 250, marginRight: 20 }}
  50 + allowClear
  51 + onChange={value => {
  52 + setParams({ storageId: value}, true);
  53 + }}
  54 + placeholder="请选择库房"
  55 + options={storages.map((item: PartStorageSpace.PageVO) => ({ value: item.id, label: item.storageName }))}
  56 + />
  57 + <PmsSelect
  58 + placeholder="类型筛选"
  59 + allowClear
  60 + style={{ width: 250, marginRight: 20 }}
  61 + onChange={v => setParams({ lockType: v }, true)}
  62 + options={lockTypeData}
  63 + />
  64 + </div>
  65 + <Table
  66 + dataSource={list}
  67 + loading={loading}
  68 + scroll={{x: 1500}}
  69 + pagination={paginationConfig}
  70 + rowKey={r => `${r.lockId}`}
  71 + onChange={(p, f, s: SorterResult<Item>) => {
  72 + let st = s.field as string;
  73 + setParams({ orderBy: OrderBy[st], isAsc: s.order == 'ascend'}, true);
  74 +}}
  75 + >
  76 + <Column title="配件编码" dataIndex="partCode" />
  77 + <Column title="配件名称" dataIndex="partName" />
  78 + <Column title="库房" dataIndex="storageName" />
  79 + <Column title="锁库类型" dataIndex="type" render={t => Type[t]} />
  80 + <Column title="锁定库存数" dataIndex="lockCnt" sorter />
  81 + <Column title="锁件开始时间" dataIndex="confirmTime" sorter render={t => (t ? moment(t).format('YYYY-MM-DD HH:mm:ss') : '')} />
  82 + <Column title="锁库天数" dataIndex="days" sorter />
  83 + <Column title="延期次数" dataIndex="delayCnt" sorter />
  84 + <Column title="VIN" dataIndex="typeId" />
  85 + <Column title="单号" render={i => ([1, 3].includes(i.type || 0) ? <a onClick={() => click(i)}>{i.remark}</a> : '--')} />
  86 + </Table>
  87 + <AsOrderDetail visible={asOrder.visible} orderNo={asOrder.orderNo} onCancel={() => setAsOrder({visible: false, orderNo: ''})} />
  88 + <DecorationOrder visible={decOrder.visible} decoOrderNo={decOrder.decoOrderNo} onCancel={() => setDecOrder({ visible: false, decoOrderNo: '' })} />
  89 + </Card>
  90 + </PageHeaderWrapper>
  91 + );
  92 +}
0 93 \ No newline at end of file
... ...