feat: 添加订单转让用户手机号字段并优化多个页面逻辑
- 在订单转让页面添加新用户手机号字段
- 优化用户管理和订单详情页面的显示逻辑
- 修复大礼包订单详情支付时间和状态的显示问题
- 调整搜索参数处理逻辑,统一参数命名
- 移除财务统计页面的权限控制
| | |
| | | align: 'center', |
| | | hideInSearch: true, |
| | | render: (text) => { |
| | | return <Tag color="blue">{text || '默认角色'}</Tag>; |
| | | return <Tag color="blue">{text}</Tag>; |
| | | }, |
| | | }, |
| | | { |
| | |
| | | <PageContainer> |
| | | <div style={{ marginBottom: 24 }}> |
| | | <Space> |
| | | <Access accessible={access.summaryStatistics_search || false}> |
| | | <DatePicker.RangePicker |
| | | value={dateRange.map(date => date ? moment(date) : null)} |
| | | onChange={handleDateChange} |
| | | style={{ width: 300 }} |
| | | /> |
| | | </Access> |
| | | <Access accessible={access.summaryStatistics_search || false}> |
| | | <Button onClick={fetchData} type="primary">查询</Button> |
| | | </Access> |
| | | <DatePicker.RangePicker |
| | | value={dateRange.map(date => date ? moment(date) : null)} |
| | | onChange={handleDateChange} |
| | | style={{ width: 300 }} |
| | | /> |
| | | <Button onClick={fetchData} type="primary">查询</Button> |
| | | </Space> |
| | | </div> |
| | | |
| | |
| | | children: '微信支付', |
| | | }, |
| | | { |
| | | label: '定金支付时间', |
| | | children: orderDetail.depositTime || '-', |
| | | }, |
| | | { |
| | | label: '备注', |
| | | children: orderDetail.remark || '-', |
| | | }, |
| | | ]]; |
| | | } else if (status === 3 && paymentType === 1) { |
| | | } else if ((status === 3 || status === 4) && paymentType === 1) { |
| | | // 已支付定金+尾款 |
| | | specificItems = [...specificItems, ...[ |
| | | { |
| | |
| | | children: '微信支付', |
| | | }, |
| | | { |
| | | label: '定金支付时间', |
| | | children: orderDetail.depositTime || '-', |
| | | }, |
| | | { |
| | | label: '已付尾款', |
| | | children: `¥${orderDetail.finalPayment || 0}`, |
| | | }, |
| | |
| | | children: '微信支付', |
| | | }, |
| | | { |
| | | label: '尾款支付时间', |
| | | children: orderDetail.finalPaymentTime || '-', |
| | | }, |
| | | { |
| | | label: '备注', |
| | | children: orderDetail.remark || '-', |
| | | }, |
| | | ]]; |
| | | } else if (status === 3 && paymentType === 2) { |
| | | } else if ((status === 3 || status === 4) && paymentType === 2) { |
| | | // 已支付全款 |
| | | specificItems = [...specificItems, ...[ |
| | | { |
| | |
| | | }, |
| | | { |
| | | label: '支付时间', |
| | | children: orderDetail.depositTime || '-', // 全款支付时间使用订金时间字段 |
| | | children: orderDetail.depositTime || '-', |
| | | }, |
| | | { |
| | | label: '支付方式', |
| | |
| | | </Descriptions> |
| | | |
| | | {/* 营销明细(仅已支付定金+尾款时显示) */} |
| | | {status === 3 && paymentType === 1 && ( |
| | | {((status === 3 || status === 4) && paymentType === 2) && ( |
| | | <div style={{ marginTop: 24 }}> |
| | | <Text strong>营销明细</Text> |
| | | <Descriptions column={3} bordered style={{ marginTop: 8 }}> |
| | |
| | | align: 'center', |
| | | }, |
| | | { |
| | | title: '转让用户手机号', |
| | | dataIndex: 'newUserPhone', |
| | | align: 'newUserPhone', |
| | | hideInSearch: true, |
| | | }, |
| | | { |
| | | title: '操作', |
| | | hideInSearch: true, |
| | | render: (text, record) => { |
| | |
| | | <> |
| | | <Descriptions.Item label="订单编号">{orderDetail.code}</Descriptions.Item> |
| | | <Descriptions.Item label="下单时间">{orderDetail.createTime}</Descriptions.Item> |
| | | <Descriptions.Item label="订单价格">¥{orderDetail.orderPrice || 0}</Descriptions.Item> |
| | | {/* <Descriptions.Item label="订单价格">¥{orderDetail.orderPrice || 0}</Descriptions.Item> */} |
| | | <Descriptions.Item label="用户昵称">{orderDetail.userName}</Descriptions.Item> |
| | | <Descriptions.Item label="用户手机号">{orderDetail.phone}</Descriptions.Item> |
| | | </> |
| | |
| | | columns={columns} |
| | | request={async (params) => { |
| | | const { current, pageSize, ...rest } = params; |
| | | setSearchParams({ |
| | | let obj = { |
| | | ...rest, |
| | | pageNum: current, |
| | | pageSize, |
| | | }); |
| | | const res = await getPhysicalGoodsOrderList({ |
| | | ...rest, |
| | | pageNum: current, |
| | | pageSize, |
| | | }); |
| | | pageSize |
| | | } |
| | | if (obj.physicalGoodsName) { |
| | | obj.name = obj.physicalGoodsName |
| | | } |
| | | setSearchParams(obj); |
| | | const res = await getPhysicalGoodsOrderList(obj); |
| | | return { |
| | | data: res.data?.records || [], |
| | | success: res.code === 200, |
| | |
| | | width="30%" |
| | | centered |
| | | destroyOnHidden |
| | | title={editData.id ? '编辑人员' : '添加人员'} |
| | | title={editData.userId ? '编辑人员' : '添加人员'} |
| | | open={visible} |
| | | onCancel={() => { |
| | | onCancel(false); |
| | |
| | | name="userName" |
| | | label="登录账号" |
| | | width={240} |
| | | disabled={editData.id} |
| | | disabled={editData.userId} |
| | | placeholder="请输入" |
| | | rules={[{ required: true, message: '请输入登录账号' }]} |
| | | addonAfter={<span style={{ color: 'red' }}>账号不可重复</span>} |
| | |
| | | ]} |
| | | request={async (params) => { |
| | | const { current, pageSize, ...rest } = params; |
| | | |
| | | let queryParams = { |
| | | ...rest, |
| | | pageNum: current, |
| | | pageSize, |
| | | }; |
| | | if (queryParams.name) { |
| | | queryParams.nickName = queryParams.name; |
| | | } |
| | | if (queryParams.phone) { |
| | | queryParams.phoneNumber = queryParams.phone; |
| | | } |
| | | // 保存搜索参数,用于导出 |
| | | setSearchParams({ |
| | | ...rest, |
| | | pageNum: current, |
| | | pageSize, |
| | | }); |
| | | setSearchParams(queryParams); |
| | | |
| | | const res = await getUserList({ |
| | | ...rest, |
| | | pageNum: current, |
| | | pageSize, |
| | | }); |
| | | const res = await getUserList(queryParams); |
| | | |
| | | return { |
| | | data: res.data?.records || [], |