Commit 42236fe818993d179a2b368142e4f0185ab9779e
Merge remote-tracking branch 'origin/master'
Showing
6 changed files
with
170 additions
and
22 deletions
src/pages/Order/components/CheckModal.tsx
@@ -648,11 +648,15 @@ export default ({ | @@ -648,11 +648,15 @@ export default ({ | ||
648 | ) : ( | 648 | ) : ( |
649 | <div>请特别注意订单总金额与订单金额。</div> | 649 | <div>请特别注意订单总金额与订单金额。</div> |
650 | )} | 650 | )} |
651 | - <ProFormTextArea | ||
652 | - width="lg" | ||
653 | - name="name" | ||
654 | - placeholder="若驳回,请填写驳回理由" | ||
655 | - /> | 651 | + {!checkType(CHECK_TYPE.CONFIRM_DELIVER) ? ( |
652 | + <ProFormTextArea | ||
653 | + width="lg" | ||
654 | + name="name" | ||
655 | + placeholder="若驳回,请填写驳回理由" | ||
656 | + /> | ||
657 | + ) : ( | ||
658 | + <></> | ||
659 | + )} | ||
656 | {checkType(CHECK_TYPE.FINALCIAL) ? ( | 660 | {checkType(CHECK_TYPE.FINALCIAL) ? ( |
657 | <> | 661 | <> |
658 | <div className="pb-4 text-xs decoration-gray-50"> | 662 | <div className="pb-4 text-xs decoration-gray-50"> |
src/pages/Order/components/OrderDrawer.tsx
@@ -991,6 +991,9 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -991,6 +991,9 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
991 | debounceTime={1000} | 991 | debounceTime={1000} |
992 | request={async (value, {}) => { | 992 | request={async (value, {}) => { |
993 | const keywords = value.keyWords; | 993 | const keywords = value.keyWords; |
994 | + if (keywords === '') { | ||
995 | + return []; | ||
996 | + } | ||
994 | const res = await postCanrdApiUserAddressList({ | 997 | const res = await postCanrdApiUserAddressList({ |
995 | data: { keywords: keywords }, | 998 | data: { keywords: keywords }, |
996 | }); | 999 | }); |
@@ -1078,18 +1081,18 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1078,18 +1081,18 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1078 | label="支付总额(¥)" | 1081 | label="支付总额(¥)" |
1079 | rules={[ | 1082 | rules={[ |
1080 | { required: true, message: '支付总额必填' }, | 1083 | { required: true, message: '支付总额必填' }, |
1081 | - { | ||
1082 | - validator: (_, value) => { | ||
1083 | - if (value <= 0) { | ||
1084 | - return Promise.reject( | ||
1085 | - new Error( | ||
1086 | - '支付总额必须大于0 (扣预存的订单现在也必须填写实际金额)', | ||
1087 | - ), | ||
1088 | - ); | ||
1089 | - } | ||
1090 | - return Promise.resolve(); | ||
1091 | - }, | ||
1092 | - }, | 1084 | + // { |
1085 | + // validator: (_, value) => { | ||
1086 | + // if (value <= 0) { | ||
1087 | + // return Promise.reject( | ||
1088 | + // new Error( | ||
1089 | + // '支付总额必须大于0 (扣预存的订单现在也必须填写实际金额)', | ||
1090 | + // ), | ||
1091 | + // ); | ||
1092 | + // } | ||
1093 | + // return Promise.resolve(); | ||
1094 | + // }, | ||
1095 | + // }, | ||
1093 | ]} | 1096 | ]} |
1094 | tooltip="点击计算,合计所有子订单金额" | 1097 | tooltip="点击计算,合计所有子订单金额" |
1095 | fieldProps={{ | 1098 | fieldProps={{ |
@@ -1516,8 +1519,20 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1516,8 +1519,20 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1516 | label="商品数量" | 1519 | label="商品数量" |
1517 | fieldProps={{ | 1520 | fieldProps={{ |
1518 | onChange: (value) => { | 1521 | onChange: (value) => { |
1519 | - listMeta.record.quantity = value; | ||
1520 | - computeSubOrderPayment(listMeta); | 1522 | + // 确保变更后的值为整数 |
1523 | + const intValue = parseInt(value, 10); | ||
1524 | + if (!isNaN(intValue)) { | ||
1525 | + listMeta.record.quantity = intValue; | ||
1526 | + computeSubOrderPayment(listMeta); | ||
1527 | + } | ||
1528 | + }, | ||
1529 | + parser: (value) => { | ||
1530 | + // 将输入的值转换为整数,如果不是合法数字则返回空字符串触发校验错误 | ||
1531 | + return value ? parseInt(value, 10) : ''; | ||
1532 | + }, | ||
1533 | + formatter: (value) => { | ||
1534 | + // 在显示时始终将其格式化为不带小数部分的整数字符串 | ||
1535 | + return value ? value.toString() : ''; | ||
1521 | }, | 1536 | }, |
1522 | }} | 1537 | }} |
1523 | placeholder="请输入商品数量" | 1538 | placeholder="请输入商品数量" |
src/pages/Order/constant.ts
@@ -28,6 +28,7 @@ export const PAYMENT_METHOD_OPTIONS = { | @@ -28,6 +28,7 @@ export const PAYMENT_METHOD_OPTIONS = { | ||
28 | CASH_ON_DELIVERY: '货到付款', | 28 | CASH_ON_DELIVERY: '货到付款', |
29 | HIRE_PURCHASE: '分期付款', | 29 | HIRE_PURCHASE: '分期付款', |
30 | PAYMENT_RECEIPT: '已回款', | 30 | PAYMENT_RECEIPT: '已回款', |
31 | + PREPAID_NO_NEED_SEND: '预存款无需发货', | ||
31 | }; | 32 | }; |
32 | 33 | ||
33 | export const PRODUCT_BELONG_DEPARTMENT_OPTIONS = { | 34 | export const PRODUCT_BELONG_DEPARTMENT_OPTIONS = { |
@@ -170,6 +171,7 @@ export const PAYMENT_RECEIPTS_STATUS_OPTIONS = { | @@ -170,6 +171,7 @@ export const PAYMENT_RECEIPTS_STATUS_OPTIONS = { | ||
170 | 171 | ||
171 | export const ORDER_STATUS_OPTIONS = { | 172 | export const ORDER_STATUS_OPTIONS = { |
172 | WAIT_CONFIRM_DELIVER_AFTER_INVOICE: '待开票后确认发货', | 173 | WAIT_CONFIRM_DELIVER_AFTER_INVOICE: '待开票后确认发货', |
174 | + SALES_CONFIRM: '销售待确认', | ||
173 | UNAUDITED: '未审核', | 175 | UNAUDITED: '未审核', |
174 | LEADER_PROCESS: '领导待审核', | 176 | LEADER_PROCESS: '领导待审核', |
175 | MODIFY_APPLY_WAIT_FOR_AUDIT: '修改待审核', | 177 | MODIFY_APPLY_WAIT_FOR_AUDIT: '修改待审核', |
@@ -271,6 +273,7 @@ export const TAGS_COLOR = new Map<string, string>([ | @@ -271,6 +273,7 @@ export const TAGS_COLOR = new Map<string, string>([ | ||
271 | ['AUDIT_PASS', 'success'], | 273 | ['AUDIT_PASS', 'success'], |
272 | ['AUDIT_NOTPASS', 'error'], | 274 | ['AUDIT_NOTPASS', 'error'], |
273 | ['WAIT_CONFIRM_DELIVER_AFTER_INVOICE', 'processing'], | 275 | ['WAIT_CONFIRM_DELIVER_AFTER_INVOICE', 'processing'], |
276 | + ['SALES_CONFIRM', 'warning'], | ||
274 | ]); | 277 | ]); |
275 | export const SALES_CODE_OPTIONS = [ | 278 | export const SALES_CODE_OPTIONS = [ |
276 | { label: 'D-Linda', value: 'D-Linda' }, | 279 | { label: 'D-Linda', value: 'D-Linda' }, |
@@ -398,6 +401,7 @@ export const HISTORY_OPT_TYPE = new Map<string, string>([ | @@ -398,6 +401,7 @@ export const HISTORY_OPT_TYPE = new Map<string, string>([ | ||
398 | ['applyModify', '申请修改订单信息'], | 401 | ['applyModify', '申请修改订单信息'], |
399 | ['OUTSIDE_SYSTEM_PUSH', '外部系统推送了本订单'], | 402 | ['OUTSIDE_SYSTEM_PUSH', '外部系统推送了本订单'], |
400 | ['cancelSendOrder', '取消发货'], | 403 | ['cancelSendOrder', '取消发货'], |
404 | + ['salesConfirm', '商城订单销售确认'], | ||
401 | ]); | 405 | ]); |
402 | 406 | ||
403 | export const MAIN_ORDER_COLUMNS = [ | 407 | export const MAIN_ORDER_COLUMNS = [ |
src/pages/Order/index.tsx
@@ -13,6 +13,7 @@ import { | @@ -13,6 +13,7 @@ import { | ||
13 | postServiceOrderProvideProcurementRoles, | 13 | postServiceOrderProvideProcurementRoles, |
14 | postServiceOrderQueryServiceOrder, | 14 | postServiceOrderQueryServiceOrder, |
15 | postServiceOrderSaleCancelInvoicing, | 15 | postServiceOrderSaleCancelInvoicing, |
16 | + postServiceOrderSalesConfirm, | ||
16 | } from '@/services'; | 17 | } from '@/services'; |
17 | import { orderExport } from '@/services/order'; | 18 | import { orderExport } from '@/services/order'; |
18 | import { | 19 | import { |
@@ -767,7 +768,7 @@ const OrderPage = () => { | @@ -767,7 +768,7 @@ const OrderPage = () => { | ||
767 | key={index} | 768 | key={index} |
768 | onConfirm={() => { | 769 | onConfirm={() => { |
769 | window.open( | 770 | window.open( |
770 | - '/previewApi/onlinePreview?url=' + | 771 | + '/onlinePreview?url=' + |
771 | encodeURIComponent(Base64.encode(item.url)), | 772 | encodeURIComponent(Base64.encode(item.url)), |
772 | ); | 773 | ); |
773 | }} | 774 | }} |
@@ -1230,6 +1231,25 @@ const OrderPage = () => { | @@ -1230,6 +1231,25 @@ const OrderPage = () => { | ||
1230 | </div> | 1231 | </div> |
1231 | </Flex> | 1232 | </Flex> |
1232 | <Flex className="w-[18%]" wrap="wrap" gap="small"> | 1233 | <Flex className="w-[18%]" wrap="wrap" gap="small"> |
1234 | + {optRecord.subPath?.includes('salesConfirm') && ( | ||
1235 | + <ButtonConfirm | ||
1236 | + className="p-0" | ||
1237 | + title="是否确认此商城订单信息无误?确认无误之后订单将进入审核流程。" | ||
1238 | + text="订单确认" | ||
1239 | + onConfirm={async () => { | ||
1240 | + let res = await postServiceOrderSalesConfirm({ | ||
1241 | + data: { | ||
1242 | + subOrderIds: [optRecord.id], | ||
1243 | + }, | ||
1244 | + }); | ||
1245 | + | ||
1246 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
1247 | + message.success(res.message); | ||
1248 | + refreshTable(); | ||
1249 | + } | ||
1250 | + }} | ||
1251 | + /> | ||
1252 | + )} | ||
1233 | {optRecord.subPath?.includes('uploadPaymentReceiptBill') ? ( | 1253 | {optRecord.subPath?.includes('uploadPaymentReceiptBill') ? ( |
1234 | <Button | 1254 | <Button |
1235 | className="p-0" | 1255 | className="p-0" |
@@ -2507,6 +2527,37 @@ const OrderPage = () => { | @@ -2507,6 +2527,37 @@ const OrderPage = () => { | ||
2507 | <Flex justify="flex-end"> | 2527 | <Flex justify="flex-end"> |
2508 | <Space.Compact direction="vertical" align="end"> | 2528 | <Space.Compact direction="vertical" align="end"> |
2509 | <Space wrap> | 2529 | <Space wrap> |
2530 | + {record.mainPath?.includes('salesConfirm') && ( | ||
2531 | + <ButtonConfirm | ||
2532 | + className="p-0" | ||
2533 | + title="是否确认此商城订单信息无误?确认无误之后订单将进入审核流程。" | ||
2534 | + text="订单确认" | ||
2535 | + onConfirm={async () => { | ||
2536 | + let subIds = subOrderSelectedMap | ||
2537 | + .get(record.id) | ||
2538 | + ?.map((item) => { | ||
2539 | + return item.id; | ||
2540 | + }); | ||
2541 | + if (subIds === null || subIds === undefined) { | ||
2542 | + subIds = record.subOrderInformationLists.map( | ||
2543 | + (item) => { | ||
2544 | + return item.id; | ||
2545 | + }, | ||
2546 | + ); | ||
2547 | + } | ||
2548 | + let res = await postServiceOrderSalesConfirm({ | ||
2549 | + data: { | ||
2550 | + subOrderIds: subIds, | ||
2551 | + }, | ||
2552 | + }); | ||
2553 | + | ||
2554 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
2555 | + message.success(res.message); | ||
2556 | + refreshTable(); | ||
2557 | + } | ||
2558 | + }} | ||
2559 | + /> | ||
2560 | + )} | ||
2510 | {record.mainPath?.includes('uploadPaymentReceiptBill') ? ( | 2561 | {record.mainPath?.includes('uploadPaymentReceiptBill') ? ( |
2511 | <Button | 2562 | <Button |
2512 | className="p-0" | 2563 | className="p-0" |
@@ -3613,6 +3664,7 @@ const OrderPage = () => { | @@ -3613,6 +3664,7 @@ const OrderPage = () => { | ||
3613 | 'subNotes', | 3664 | 'subNotes', |
3614 | 'orderStatus', | 3665 | 'orderStatus', |
3615 | 'createTime', | 3666 | 'createTime', |
3667 | + 'modifiedAuditStatus', | ||
3616 | ]; | 3668 | ]; |
3617 | if (isSupplier() && !canSearchIndex.includes(item.dataIndex)) { | 3669 | if (isSupplier() && !canSearchIndex.includes(item.dataIndex)) { |
3618 | item.search = false; | 3670 | item.search = false; |
src/services/definition.ts
@@ -1549,13 +1549,13 @@ export interface QueryBankStatementDto { | @@ -1549,13 +1549,13 @@ export interface QueryBankStatementDto { | ||
1549 | * collection_date | 1549 | * collection_date |
1550 | * @format date | 1550 | * @format date |
1551 | */ | 1551 | */ |
1552 | - collectionDateBegin?: string; | 1552 | + collectionDatetimeBegin?: string; |
1553 | /** | 1553 | /** |
1554 | * @description | 1554 | * @description |
1555 | * collection_date | 1555 | * collection_date |
1556 | * @format date | 1556 | * @format date |
1557 | */ | 1557 | */ |
1558 | - collectionDateEnd?: string; | 1558 | + collectionDatetimeEnd?: string; |
1559 | /** @format int32 */ | 1559 | /** @format int32 */ |
1560 | current?: number; | 1560 | current?: number; |
1561 | /** @format int64 */ | 1561 | /** @format int64 */ |
@@ -1844,6 +1844,8 @@ export interface UpdatePwdVO { | @@ -1844,6 +1844,8 @@ export interface UpdatePwdVO { | ||
1844 | 1844 | ||
1845 | export interface UserAddressListRequest { | 1845 | export interface UserAddressListRequest { |
1846 | keywords?: string; | 1846 | keywords?: string; |
1847 | + /** @format int32 */ | ||
1848 | + limit?: number; | ||
1847 | } | 1849 | } |
1848 | 1850 | ||
1849 | export interface UserCenterInfoRequest { | 1851 | export interface UserCenterInfoRequest { |
src/services/request.ts
@@ -12189,6 +12189,77 @@ export const postServiceOrderSaleCancelInvoicing = /* #__PURE__ */ (() => { | @@ -12189,6 +12189,77 @@ export const postServiceOrderSaleCancelInvoicing = /* #__PURE__ */ (() => { | ||
12189 | return request; | 12189 | return request; |
12190 | })(); | 12190 | })(); |
12191 | 12191 | ||
12192 | +/** @description request parameter type for postServiceOrderSalesConfirm */ | ||
12193 | +export interface PostServiceOrderSalesConfirmOption { | ||
12194 | + /** | ||
12195 | + * @description | ||
12196 | + * dto | ||
12197 | + */ | ||
12198 | + body: { | ||
12199 | + /** | ||
12200 | + @description | ||
12201 | + dto */ | ||
12202 | + dto: Dto; | ||
12203 | + }; | ||
12204 | +} | ||
12205 | + | ||
12206 | +/** @description response type for postServiceOrderSalesConfirm */ | ||
12207 | +export interface PostServiceOrderSalesConfirmResponse { | ||
12208 | + /** | ||
12209 | + * @description | ||
12210 | + * OK | ||
12211 | + */ | ||
12212 | + 200: ServerResult; | ||
12213 | + /** | ||
12214 | + * @description | ||
12215 | + * Created | ||
12216 | + */ | ||
12217 | + 201: any; | ||
12218 | + /** | ||
12219 | + * @description | ||
12220 | + * Unauthorized | ||
12221 | + */ | ||
12222 | + 401: any; | ||
12223 | + /** | ||
12224 | + * @description | ||
12225 | + * Forbidden | ||
12226 | + */ | ||
12227 | + 403: any; | ||
12228 | + /** | ||
12229 | + * @description | ||
12230 | + * Not Found | ||
12231 | + */ | ||
12232 | + 404: any; | ||
12233 | +} | ||
12234 | + | ||
12235 | +export type PostServiceOrderSalesConfirmResponseSuccess = | ||
12236 | + PostServiceOrderSalesConfirmResponse[200]; | ||
12237 | +/** | ||
12238 | + * @description | ||
12239 | + * 销售订单确认 | ||
12240 | + * @tags 内部订单 | ||
12241 | + * @produces * | ||
12242 | + * @consumes application/json | ||
12243 | + */ | ||
12244 | +export const postServiceOrderSalesConfirm = /* #__PURE__ */ (() => { | ||
12245 | + const method = 'post'; | ||
12246 | + const url = '/service/order/salesConfirm'; | ||
12247 | + function request( | ||
12248 | + option: PostServiceOrderSalesConfirmOption, | ||
12249 | + ): Promise<PostServiceOrderSalesConfirmResponseSuccess> { | ||
12250 | + return requester(request.url, { | ||
12251 | + method: request.method, | ||
12252 | + ...option, | ||
12253 | + }) as unknown as Promise<PostServiceOrderSalesConfirmResponseSuccess>; | ||
12254 | + } | ||
12255 | + | ||
12256 | + /** http method */ | ||
12257 | + request.method = method; | ||
12258 | + /** request url */ | ||
12259 | + request.url = url; | ||
12260 | + return request; | ||
12261 | +})(); | ||
12262 | + | ||
12192 | /** @description request parameter type for postServiceOrderSendProduct */ | 12263 | /** @description request parameter type for postServiceOrderSendProduct */ |
12193 | export interface PostServiceOrderSendProductOption { | 12264 | export interface PostServiceOrderSendProductOption { |
12194 | /** | 12265 | /** |