Commit 78b8312b1222f8f9c958ec4b90f7312410a0f921
1 parent
96450634
feat: 自行派送、金额不一致提醒。
Showing
3 changed files
with
271 additions
and
143 deletions
src/pages/Order/components/DeliverModal.tsx
@@ -205,6 +205,107 @@ const DeliverModal = ({ | @@ -205,6 +205,107 @@ const DeliverModal = ({ | ||
205 | onCancel={() => { | 205 | onCancel={() => { |
206 | setVisible(false); | 206 | setVisible(false); |
207 | }} | 207 | }} |
208 | + footer={[ | ||
209 | + <Button | ||
210 | + key="back" | ||
211 | + size="large" | ||
212 | + onClick={() => { | ||
213 | + setVisible(false); | ||
214 | + }} | ||
215 | + > | ||
216 | + 取消 | ||
217 | + </Button>, | ||
218 | + <Button | ||
219 | + key="selfDeliver" | ||
220 | + type="primary" | ||
221 | + size="large" | ||
222 | + onClick={async () => { | ||
223 | + //请求体封装 | ||
224 | + let list = data.map((item) => { | ||
225 | + return { | ||
226 | + id: item.id, | ||
227 | + deliverType: 'SELF_DELIVER', | ||
228 | + }; | ||
229 | + }); | ||
230 | + | ||
231 | + let body = { id: data[0].mainOrderId, list: list, flag: false }; | ||
232 | + if (isSendProduct) { | ||
233 | + body.flag = true; | ||
234 | + } | ||
235 | + //发货请求 | ||
236 | + let res; | ||
237 | + if (optType(CHECK_TYPE.SUPPLIER)) { | ||
238 | + res = await postServiceOrderSupplierSendOrder({ data: body }); | ||
239 | + } else if (optType(CHECK_TYPE.PROCURE)) { | ||
240 | + res = await postServiceOrderProcureSend({ data: body }); | ||
241 | + } else { | ||
242 | + res = await postServiceOrderSendProduct({ data: body }); | ||
243 | + } | ||
244 | + | ||
245 | + if (res.result === RESPONSE_CODE.SUCCESS) { | ||
246 | + message.success(res.message); | ||
247 | + onClose(); | ||
248 | + } | ||
249 | + }} | ||
250 | + > | ||
251 | + 自行派送 | ||
252 | + </Button>, | ||
253 | + <Button | ||
254 | + key="submit" | ||
255 | + type="primary" | ||
256 | + size="large" | ||
257 | + onClick={async () => { | ||
258 | + //请求体封装 | ||
259 | + let list = data.map((item) => { | ||
260 | + return { | ||
261 | + id: item.id, | ||
262 | + logisticsMethod: item.logisticsMethod, | ||
263 | + serialNumber: item.serialNumber, | ||
264 | + packageNumber: | ||
265 | + item.packageNumber === null || | ||
266 | + item.packageNumber === undefined | ||
267 | + ? 1 | ||
268 | + : item.packageNumber, | ||
269 | + logisticsNotes: item.logisticsNotes, | ||
270 | + }; | ||
271 | + }); | ||
272 | + | ||
273 | + for (let item of list) { | ||
274 | + let method = item.logisticsMethod; | ||
275 | + let notes = item.logisticsNotes; | ||
276 | + if ( | ||
277 | + method === 'OTHER_LOGISTICS' && | ||
278 | + (notes === '' || notes === undefined) | ||
279 | + ) { | ||
280 | + message.error( | ||
281 | + '请检查:物流方式为[其他物流方式]的记录中,物流备注不能为空!请将实际的物流方式填写在备注中!', | ||
282 | + ); | ||
283 | + return; | ||
284 | + } | ||
285 | + } | ||
286 | + let body = { id: data[0].mainOrderId, list: list, flag: false }; | ||
287 | + if (isSendProduct) { | ||
288 | + body.flag = true; | ||
289 | + } | ||
290 | + //发货请求 | ||
291 | + let res; | ||
292 | + if (optType(CHECK_TYPE.SUPPLIER)) { | ||
293 | + res = await postServiceOrderSupplierSendOrder({ data: body }); | ||
294 | + } else if (optType(CHECK_TYPE.PROCURE)) { | ||
295 | + res = await postServiceOrderProcureSend({ data: body }); | ||
296 | + } else { | ||
297 | + res = await postServiceOrderSendProduct({ data: body }); | ||
298 | + } | ||
299 | + | ||
300 | + if (res.result === RESPONSE_CODE.SUCCESS) { | ||
301 | + message.success(res.message); | ||
302 | + onClose(); | ||
303 | + } | ||
304 | + }} | ||
305 | + > | ||
306 | + 确认 | ||
307 | + </Button>, | ||
308 | + ]} | ||
208 | > | 309 | > |
209 | <Flex vertical> | 310 | <Flex vertical> |
210 | <strong>将物流方式和物流单号更新到下方所有订单</strong> | 311 | <strong>将物流方式和物流单号更新到下方所有订单</strong> |
src/pages/Order/components/OrderDrawer.tsx
@@ -105,6 +105,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -105,6 +105,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
105 | let copyData = cloneDeep(data); | 105 | let copyData = cloneDeep(data); |
106 | 106 | ||
107 | let originSubOrders = cloneDeep(subOrders); | 107 | let originSubOrders = cloneDeep(subOrders); |
108 | + | ||
108 | /** | 109 | /** |
109 | * 获取当前的操作类型boolean值 | 110 | * 获取当前的操作类型boolean值 |
110 | * @param type 操作类型,如果与当前匹配返回true | 111 | * @param type 操作类型,如果与当前匹配返回true |
@@ -571,11 +572,14 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -571,11 +572,14 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
571 | }; | 572 | }; |
572 | 573 | ||
573 | /** | 574 | /** |
574 | - * 是否有草稿 | ||
575 | - */ | 575 | + * 是否有草稿 |
576 | + */ | ||
576 | function checkHasLocalData() { | 577 | function checkHasLocalData() { |
577 | let preOrderData = localStorage.getItem('preOrderData'); | 578 | let preOrderData = localStorage.getItem('preOrderData'); |
578 | - let hasLocalData = preOrderData !== null && preOrderData !== undefined && preOrderData !== ''; | 579 | + let hasLocalData = |
580 | + preOrderData !== null && | ||
581 | + preOrderData !== undefined && | ||
582 | + preOrderData !== ''; | ||
579 | setHasLocalData(hasLocalData); | 583 | setHasLocalData(hasLocalData); |
580 | return hasLocalData; | 584 | return hasLocalData; |
581 | } | 585 | } |
@@ -586,25 +590,25 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -586,25 +590,25 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
586 | function saveFormDataToLocal() { | 590 | function saveFormDataToLocal() { |
587 | let preOrderData = localStorage.getItem('preOrderData'); | 591 | let preOrderData = localStorage.getItem('preOrderData'); |
588 | let values = form.getFieldsValue(); | 592 | let values = form.getFieldsValue(); |
589 | - values.isLocalData = true;//标识为本地草稿数据 | 593 | + values.isLocalData = true; //标识为本地草稿数据 |
590 | let formData = JSON.stringify(values); | 594 | let formData = JSON.stringify(values); |
591 | 595 | ||
592 | //检查本地是否已有数据 | 596 | //检查本地是否已有数据 |
593 | if (preOrderData) { | 597 | if (preOrderData) { |
594 | Modal.confirm({ | 598 | Modal.confirm({ |
595 | - title: "提示", | ||
596 | - content: "检测到本地有订单数据,是否覆盖?", | 599 | + title: '提示', |
600 | + content: '检测到本地有订单数据,是否覆盖?', | ||
597 | onOk: () => { | 601 | onOk: () => { |
598 | - localStorage.setItem("preOrderData", formData); | ||
599 | - message.success("本地保存成功"); | 602 | + localStorage.setItem('preOrderData', formData); |
603 | + message.success('本地保存成功'); | ||
600 | }, | 604 | }, |
601 | onCancel: () => { | 605 | onCancel: () => { |
602 | - message.info("取消保存"); | ||
603 | - } | ||
604 | - }) | 606 | + message.info('取消保存'); |
607 | + }, | ||
608 | + }); | ||
605 | } else { | 609 | } else { |
606 | - localStorage.setItem("preOrderData", formData); | ||
607 | - message.success("本地保存成功"); | 610 | + localStorage.setItem('preOrderData', formData); |
611 | + message.success('本地保存成功'); | ||
608 | } | 612 | } |
609 | 613 | ||
610 | checkHasLocalData(); | 614 | checkHasLocalData(); |
@@ -625,11 +629,10 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -625,11 +629,10 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
625 | /** | 629 | /** |
626 | * 刪除草稿数据 | 630 | * 刪除草稿数据 |
627 | */ | 631 | */ |
628 | - function removeLocalFormData(){ | ||
629 | - localStorage.removeItem("preOrderData"); | 632 | + function removeLocalFormData() { |
633 | + localStorage.removeItem('preOrderData'); | ||
630 | } | 634 | } |
631 | 635 | ||
632 | - | ||
633 | useEffect(() => { | 636 | useEffect(() => { |
634 | checkHasLocalData(); | 637 | checkHasLocalData(); |
635 | getSalesCodeOptions(); | 638 | getSalesCodeOptions(); |
@@ -659,7 +662,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -659,7 +662,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
659 | minWidth: 400, | 662 | minWidth: 400, |
660 | }} | 663 | }} |
661 | onFinishFailed={() => { | 664 | onFinishFailed={() => { |
662 | - message.error("表单项存在错误,请检查"); | 665 | + message.error('表单项存在错误,请检查'); |
663 | setSubmitBtnLoading(false); | 666 | setSubmitBtnLoading(false); |
664 | }} | 667 | }} |
665 | submitter={{ | 668 | submitter={{ |
@@ -676,7 +679,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -676,7 +679,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
676 | <Button | 679 | <Button |
677 | key="localSave" | 680 | key="localSave" |
678 | loading={localSaveLoading} | 681 | loading={localSaveLoading} |
679 | - hidden={!optType('add') && !optType("copy")} | 682 | + hidden={!optType('add') && !optType('copy')} |
680 | onClick={() => { | 683 | onClick={() => { |
681 | setLocalSaveLoading(true); | 684 | setLocalSaveLoading(true); |
682 | saveFormDataToLocal(); | 685 | saveFormDataToLocal(); |
@@ -692,7 +695,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -692,7 +695,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
692 | onClick={() => { | 695 | onClick={() => { |
693 | setSubmitBtnLoading(true); | 696 | setSubmitBtnLoading(true); |
694 | props.submit(); | 697 | props.submit(); |
695 | - | ||
696 | }} | 698 | }} |
697 | > | 699 | > |
698 | 提交 | 700 | 提交 |
@@ -705,7 +707,18 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -705,7 +707,18 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
705 | drawerProps={{ | 707 | drawerProps={{ |
706 | destroyOnClose: true, | 708 | destroyOnClose: true, |
707 | maskClosable: false, | 709 | maskClosable: false, |
708 | - extra: [<Button key="useLocalData" hidden={!hasLocalData} type='link' onClick={() => { useLocalFormData() }}>使用草稿</Button>] | 710 | + extra: [ |
711 | + <Button | ||
712 | + key="useLocalData" | ||
713 | + hidden={!hasLocalData} | ||
714 | + type="link" | ||
715 | + onClick={() => { | ||
716 | + useLocalFormData(); | ||
717 | + }} | ||
718 | + > | ||
719 | + 使用草稿 | ||
720 | + </Button>, | ||
721 | + ], | ||
709 | }} | 722 | }} |
710 | submitTimeout={2000} | 723 | submitTimeout={2000} |
711 | onFinish={async (values) => { | 724 | onFinish={async (values) => { |
@@ -779,8 +792,8 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -779,8 +792,8 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
779 | onClose(true); | 792 | onClose(true); |
780 | 793 | ||
781 | //判断保存的数据是否是本地草稿,是的话将草稿删除 | 794 | //判断保存的数据是否是本地草稿,是的话将草稿删除 |
782 | - let isLocalData = form.getFieldValue("isLocalData"); | ||
783 | - if(isLocalData){ | 795 | + let isLocalData = form.getFieldValue('isLocalData'); |
796 | + if (isLocalData) { | ||
784 | removeLocalFormData(); | 797 | removeLocalFormData(); |
785 | checkHasLocalData(); | 798 | checkHasLocalData(); |
786 | } | 799 | } |
@@ -955,7 +968,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -955,7 +968,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
955 | }, | 968 | }, |
956 | }} | 969 | }} |
957 | debounceTime={1000} | 970 | debounceTime={1000} |
958 | - request={async (value, { }) => { | 971 | + request={async (value, {}) => { |
959 | const keywords = value.keyWords; | 972 | const keywords = value.keyWords; |
960 | const res = await postKingdeeRepCustomer({ | 973 | const res = await postKingdeeRepCustomer({ |
961 | data: { search: keywords }, | 974 | data: { search: keywords }, |
@@ -1170,6 +1183,20 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1170,6 +1183,20 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1170 | max: 1000, // 最大长度为1000个字符 | 1183 | max: 1000, // 最大长度为1000个字符 |
1171 | message: '备注不能超过1000个字符', | 1184 | message: '备注不能超过1000个字符', |
1172 | }, | 1185 | }, |
1186 | + { | ||
1187 | + validator: (rule, value) => { | ||
1188 | + let totalPayment = form.getFieldValue('totalPayment'); | ||
1189 | + let list = form.getFieldValue('list'); | ||
1190 | + let reduce = list.reduce( | ||
1191 | + (sum, item) => sum + item.subOrderPayment, | ||
1192 | + 0, | ||
1193 | + ); | ||
1194 | + if (reduce === totalPayment || value) { | ||
1195 | + return Promise.resolve(); | ||
1196 | + } | ||
1197 | + return Promise.reject(new Error('请填写订单金额不一致的原因')); | ||
1198 | + }, | ||
1199 | + }, | ||
1173 | ]} | 1200 | ]} |
1174 | /> | 1201 | /> |
1175 | 1202 | ||
@@ -1364,7 +1391,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1364,7 +1391,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1364 | rules={[{ required: true, message: '商品参数必填' }]} | 1391 | rules={[{ required: true, message: '商品参数必填' }]} |
1365 | disabled={ | 1392 | disabled={ |
1366 | productParametersDisabledFlagList[listMeta.index] !== | 1393 | productParametersDisabledFlagList[listMeta.index] !== |
1367 | - false || optType('after-sales-check') | 1394 | + false || optType('after-sales-check') |
1368 | } | 1395 | } |
1369 | />, | 1396 | />, |
1370 | <ProFormDigit | 1397 | <ProFormDigit |
@@ -1405,7 +1432,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1405,7 +1432,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1405 | placeholder="请输入商品单位" | 1432 | placeholder="请输入商品单位" |
1406 | disabled={ | 1433 | disabled={ |
1407 | productParametersDisabledFlagList[listMeta.index] !== | 1434 | productParametersDisabledFlagList[listMeta.index] !== |
1408 | - false || optType('after-sales-check') | 1435 | + false || optType('after-sales-check') |
1409 | } | 1436 | } |
1410 | rules={[{ required: true, message: '商品单位必填' }]} | 1437 | rules={[{ required: true, message: '商品单位必填' }]} |
1411 | />, | 1438 | />, |
src/pages/Order/index.tsx
@@ -79,6 +79,7 @@ import FinancialEditDrawer from './components/FinancialEditDrawer'; | @@ -79,6 +79,7 @@ import FinancialEditDrawer from './components/FinancialEditDrawer'; | ||
79 | import FinancialMergeDrawer from './components/FinancialMergeDrawer'; | 79 | import FinancialMergeDrawer from './components/FinancialMergeDrawer'; |
80 | import FinancialReceiptsModal from './components/FinancialReceiptsModal'; | 80 | import FinancialReceiptsModal from './components/FinancialReceiptsModal'; |
81 | import HistoryModal from './components/HistoryModal'; | 81 | import HistoryModal from './components/HistoryModal'; |
82 | +import ImagesViewerModal from './components/ImagesViewerModal'; | ||
82 | import ImportModal from './components/ImportModal'; | 83 | import ImportModal from './components/ImportModal'; |
83 | import MessageListDrawer from './components/MessageListDrawer'; | 84 | import MessageListDrawer from './components/MessageListDrawer'; |
84 | import ModifiedDiffModal from './components/ModifiedDiffModal'; | 85 | import ModifiedDiffModal from './components/ModifiedDiffModal'; |
@@ -88,6 +89,7 @@ import ProcureCheckModal from './components/ProcureCheckModal'; | @@ -88,6 +89,7 @@ import ProcureCheckModal from './components/ProcureCheckModal'; | ||
88 | import ProcureConvertModal from './components/ProcureConvertModal'; | 89 | import ProcureConvertModal from './components/ProcureConvertModal'; |
89 | import ProductionTimeModal from './components/ProductionTimeModal'; | 90 | import ProductionTimeModal from './components/ProductionTimeModal'; |
90 | import ShippingWarehouseChangeModal from './components/ShippingWarehouseChangeModal'; | 91 | import ShippingWarehouseChangeModal from './components/ShippingWarehouseChangeModal'; |
92 | +import UploadPayBillModal from './components/UploadPayBillModal'; | ||
91 | import { | 93 | import { |
92 | AFTER_INVOICING_STATUS, | 94 | AFTER_INVOICING_STATUS, |
93 | CHECK_TYPE, | 95 | CHECK_TYPE, |
@@ -109,18 +111,14 @@ import { | @@ -109,18 +111,14 @@ import { | ||
109 | } from './constant'; | 111 | } from './constant'; |
110 | import './index.less'; | 112 | import './index.less'; |
111 | import { OrderListItemType, OrderType } from './type.d'; | 113 | import { OrderListItemType, OrderType } from './type.d'; |
112 | -import UploadPayBillModal from './components/UploadPayBillModal'; | ||
113 | -import ImagesViewerModal from './components/ImagesViewerModal'; | ||
114 | 114 | ||
115 | const OrderPage = () => { | 115 | const OrderPage = () => { |
116 | const [orderDrawerVisible, setOrderDrawerVisible] = useState<boolean>(false); | 116 | const [orderDrawerVisible, setOrderDrawerVisible] = useState<boolean>(false); |
117 | const [checkVisible, setCheckVisible] = useState<boolean>(false); | 117 | const [checkVisible, setCheckVisible] = useState<boolean>(false); |
118 | const [orderPrintVisible, setOrderPrintVisible] = useState<boolean>(false); | 118 | const [orderPrintVisible, setOrderPrintVisible] = useState<boolean>(false); |
119 | const [allMainChecked, setAllMainChecked] = useState(false); | 119 | const [allMainChecked, setAllMainChecked] = useState(false); |
120 | - const [ | ||
121 | - imagesViewerModalVisible, | ||
122 | - setImagesViewerModalVisible, | ||
123 | - ] = useState<boolean>(false); | 120 | + const [imagesViewerModalVisible, setImagesViewerModalVisible] = |
121 | + useState<boolean>(false); | ||
124 | const [data, setData] = useState([]); //列表数据 | 122 | const [data, setData] = useState([]); //列表数据 |
125 | const [notesEditVisible, setNotesEditVisible] = useState<boolean>(false); | 123 | const [notesEditVisible, setNotesEditVisible] = useState<boolean>(false); |
126 | const [financialMergeDrawerVisible, setFinancialMergeDrawerVisible] = | 124 | const [financialMergeDrawerVisible, setFinancialMergeDrawerVisible] = |
@@ -174,7 +172,7 @@ const OrderPage = () => { | @@ -174,7 +172,7 @@ const OrderPage = () => { | ||
174 | const [pageSize, setPageSize] = useState(10); | 172 | const [pageSize, setPageSize] = useState(10); |
175 | const [currentPage, setCurrentPage] = useState(1); | 173 | const [currentPage, setCurrentPage] = useState(1); |
176 | const [orderCheckType, setOrderCheckType] = useState(''); | 174 | const [orderCheckType, setOrderCheckType] = useState(''); |
177 | - const [imagesViewerOptType,setImagesViewerOptType] = useState(''); | 175 | + const [imagesViewerOptType, setImagesViewerOptType] = useState(''); |
178 | const [filterCondifion, setFilterCondition] = useState(0); | 176 | const [filterCondifion, setFilterCondition] = useState(0); |
179 | const [mainOrderSelectedMap] = useState(new Map()); //选中的主订单Map key:主订单id value:主订单数据 | 177 | const [mainOrderSelectedMap] = useState(new Map()); //选中的主订单Map key:主订单id value:主订单数据 |
180 | const [subOrderSelectedMap] = useState(new Map()); //选中的子订单Map key:主订单id value:选中的子订单数据集合 | 178 | const [subOrderSelectedMap] = useState(new Map()); //选中的子订单Map key:主订单id value:选中的子订单数据集合 |
@@ -764,7 +762,7 @@ const OrderPage = () => { | @@ -764,7 +762,7 @@ const OrderPage = () => { | ||
764 | onConfirm={() => { | 762 | onConfirm={() => { |
765 | window.open( | 763 | window.open( |
766 | '/previewApi/onlinePreview?url=' + | 764 | '/previewApi/onlinePreview?url=' + |
767 | - encodeURIComponent(Base64.encode(item.url)), | 765 | + encodeURIComponent(Base64.encode(item.url)), |
768 | ); | 766 | ); |
769 | }} | 767 | }} |
770 | onCancel={() => { | 768 | onCancel={() => { |
@@ -836,7 +834,7 @@ const OrderPage = () => { | @@ -836,7 +834,7 @@ const OrderPage = () => { | ||
836 | </span> | 834 | </span> |
837 | {(roleCode === 'salesRepresentative' || | 835 | {(roleCode === 'salesRepresentative' || |
838 | roleCode === 'salesManager') && | 836 | roleCode === 'salesManager') && |
839 | - !optRecord.isCurrentUserOrder ? ( | 837 | + !optRecord.isCurrentUserOrder ? ( |
840 | <span className="text-[#f44e4e]">(非本账号订单)</span> | 838 | <span className="text-[#f44e4e]">(非本账号订单)</span> |
841 | ) : ( | 839 | ) : ( |
842 | '' | 840 | '' |
@@ -918,7 +916,7 @@ const OrderPage = () => { | @@ -918,7 +916,7 @@ const OrderPage = () => { | ||
918 | {(roleCode === 'procure' || | 916 | {(roleCode === 'procure' || |
919 | roleCode === 'warehouseKeeper' || | 917 | roleCode === 'warehouseKeeper' || |
920 | roleCode === 'admin') && | 918 | roleCode === 'admin') && |
921 | - !isSupplier() ? ( | 919 | + !isSupplier() ? ( |
922 | <> | 920 | <> |
923 | <Flex title={optRecord.supplierName}> | 921 | <Flex title={optRecord.supplierName}> |
924 | <div className="max-w-[90%] whitespace-no-wrap overflow-hidden overflow-ellipsis"> | 922 | <div className="max-w-[90%] whitespace-no-wrap overflow-hidden overflow-ellipsis"> |
@@ -1055,20 +1053,29 @@ const OrderPage = () => { | @@ -1055,20 +1053,29 @@ const OrderPage = () => { | ||
1055 | {/* 回款审核状态 */} | 1053 | {/* 回款审核状态 */} |
1056 | {optRecord.paymentReceiptStatus !== null ? ( | 1054 | {optRecord.paymentReceiptStatus !== null ? ( |
1057 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1055 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> |
1058 | - <Tag className='hover:cursor-pointer' | 1056 | + <Tag |
1057 | + className="hover:cursor-pointer" | ||
1059 | onMouseEnter={(e: any) => { | 1058 | onMouseEnter={(e: any) => { |
1060 | - e.target.innerText = "点击查看回款凭证" | 1059 | + e.target.innerText = '点击查看回款凭证'; |
1061 | }} | 1060 | }} |
1062 | onMouseLeave={(e: any) => { | 1061 | onMouseLeave={(e: any) => { |
1063 | - e.target.innerText = enumValueToLabel(optRecord.paymentReceiptStatus, PAYMENT_RECEIPTS_STATUS_OPTIONS); | 1062 | + e.target.innerText = enumValueToLabel( |
1063 | + optRecord.paymentReceiptStatus, | ||
1064 | + PAYMENT_RECEIPTS_STATUS_OPTIONS, | ||
1065 | + ); | ||
1064 | }} | 1066 | }} |
1065 | - onClick={()=>{ | ||
1066 | - createOptObject(optRecord.id,record.id); | ||
1067 | - setImagesViewerOptType("paymentReceipt"); | 1067 | + onClick={() => { |
1068 | + createOptObject(optRecord.id, record.id); | ||
1069 | + setImagesViewerOptType('paymentReceipt'); | ||
1068 | setImagesViewerModalVisible(true); | 1070 | setImagesViewerModalVisible(true); |
1069 | }} | 1071 | }} |
1070 | - key="key" color={TAGS_COLOR.get(optRecord.paymentReceiptStatus)}> | ||
1071 | - {enumValueToLabel(optRecord.paymentReceiptStatus, PAYMENT_RECEIPTS_STATUS_OPTIONS)} | 1072 | + key="key" |
1073 | + color={TAGS_COLOR.get(optRecord.paymentReceiptStatus)} | ||
1074 | + > | ||
1075 | + {enumValueToLabel( | ||
1076 | + optRecord.paymentReceiptStatus, | ||
1077 | + PAYMENT_RECEIPTS_STATUS_OPTIONS, | ||
1078 | + )} | ||
1072 | </Tag> | 1079 | </Tag> |
1073 | </div> | 1080 | </div> |
1074 | ) : ( | 1081 | ) : ( |
@@ -1110,21 +1117,23 @@ const OrderPage = () => { | @@ -1110,21 +1117,23 @@ const OrderPage = () => { | ||
1110 | )} | 1117 | )} |
1111 | 1118 | ||
1112 | {/* 开票状态 */} | 1119 | {/* 开票状态 */} |
1113 | - {optRecord.afterInvoicingStatus !== null ? | 1120 | + {optRecord.afterInvoicingStatus !== null ? ( |
1114 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1121 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> |
1115 | <Tooltip | 1122 | <Tooltip |
1116 | title={ | 1123 | title={ |
1117 | optRecord.invoicingUrgentCause !== null && | 1124 | optRecord.invoicingUrgentCause !== null && |
1118 | - optRecord.afterInvoicingStatus === | 1125 | + optRecord.afterInvoicingStatus === |
1119 | 'URGENT_INVOICE_AUDITING' | 1126 | 'URGENT_INVOICE_AUDITING' |
1120 | ? optRecord.invoicingUrgentCause | 1127 | ? optRecord.invoicingUrgentCause |
1121 | : enumValueToLabel( | 1128 | : enumValueToLabel( |
1122 | - optRecord.afterInvoicingStatus, | ||
1123 | - AFTER_INVOICING_STATUS, | ||
1124 | - ) | 1129 | + optRecord.afterInvoicingStatus, |
1130 | + AFTER_INVOICING_STATUS, | ||
1131 | + ) | ||
1125 | } | 1132 | } |
1126 | > | 1133 | > |
1127 | - <Tag color={TAGS_COLOR.get(optRecord.afterInvoicingStatus)}> | 1134 | + <Tag |
1135 | + color={TAGS_COLOR.get(optRecord.afterInvoicingStatus)} | ||
1136 | + > | ||
1128 | {enumValueToLabel( | 1137 | {enumValueToLabel( |
1129 | optRecord.afterInvoicingStatus, | 1138 | optRecord.afterInvoicingStatus, |
1130 | AFTER_INVOICING_STATUS, | 1139 | AFTER_INVOICING_STATUS, |
@@ -1132,8 +1141,9 @@ const OrderPage = () => { | @@ -1132,8 +1141,9 @@ const OrderPage = () => { | ||
1132 | </Tag> | 1141 | </Tag> |
1133 | </Tooltip> | 1142 | </Tooltip> |
1134 | </div> | 1143 | </div> |
1135 | - : "" | ||
1136 | - } | 1144 | + ) : ( |
1145 | + '' | ||
1146 | + )} | ||
1137 | 1147 | ||
1138 | {/* 是否加急图标显示 */} | 1148 | {/* 是否加急图标显示 */} |
1139 | {optRecord.isUrgent ? ( | 1149 | {optRecord.isUrgent ? ( |
@@ -1149,7 +1159,7 @@ const OrderPage = () => { | @@ -1149,7 +1159,7 @@ const OrderPage = () => { | ||
1149 | )} | 1159 | )} |
1150 | 1160 | ||
1151 | {(roleCode === 'warehouseKeeper' || roleCode === 'admin') && | 1161 | {(roleCode === 'warehouseKeeper' || roleCode === 'admin') && |
1152 | - optRecord.shippingWarehouse !== null ? ( | 1162 | + optRecord.shippingWarehouse !== null ? ( |
1153 | <div | 1163 | <div |
1154 | className="overflow-hidden whitespace-no-wrap overflow-ellipsis" | 1164 | className="overflow-hidden whitespace-no-wrap overflow-ellipsis" |
1155 | title={enumValueToLabel( | 1165 | title={enumValueToLabel( |
@@ -1171,7 +1181,7 @@ const OrderPage = () => { | @@ -1171,7 +1181,7 @@ const OrderPage = () => { | ||
1171 | {/* 生产时间 */} | 1181 | {/* 生产时间 */} |
1172 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1182 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> |
1173 | {optRecord.productionStartTime !== null || | 1183 | {optRecord.productionStartTime !== null || |
1174 | - optRecord.productionEndTime !== null ? ( | 1184 | + optRecord.productionEndTime !== null ? ( |
1175 | <MyToolTip | 1185 | <MyToolTip |
1176 | title={ | 1186 | title={ |
1177 | formatdate(optRecord.productionStartTime) + | 1187 | formatdate(optRecord.productionStartTime) + |
@@ -1201,7 +1211,7 @@ const OrderPage = () => { | @@ -1201,7 +1211,7 @@ const OrderPage = () => { | ||
1201 | <Tag | 1211 | <Tag |
1202 | color={ | 1212 | color={ |
1203 | optRecord.invoicingTime === null || | 1213 | optRecord.invoicingTime === null || |
1204 | - optRecord.invoicingTime === undefined | 1214 | + optRecord.invoicingTime === undefined |
1205 | ? TAGS_COLOR.get(optRecord.invoicingStatus) | 1215 | ? TAGS_COLOR.get(optRecord.invoicingStatus) |
1206 | : 'success' | 1216 | : 'success' |
1207 | } | 1217 | } |
@@ -1229,7 +1239,7 @@ const OrderPage = () => { | @@ -1229,7 +1239,7 @@ const OrderPage = () => { | ||
1229 | 1239 | ||
1230 | {/**采购是否已下单状态 */} | 1240 | {/**采购是否已下单状态 */} |
1231 | {optRecord.procureOrderStatus !== null && | 1241 | {optRecord.procureOrderStatus !== null && |
1232 | - optRecord.procureOrderStatus !== undefined ? ( | 1242 | + optRecord.procureOrderStatus !== undefined ? ( |
1233 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1243 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> |
1234 | <Tag color="success"> | 1244 | <Tag color="success"> |
1235 | {enumValueToLabel( | 1245 | {enumValueToLabel( |
@@ -1245,21 +1255,23 @@ const OrderPage = () => { | @@ -1245,21 +1255,23 @@ const OrderPage = () => { | ||
1245 | {/* 物流信息 */} | 1255 | {/* 物流信息 */} |
1246 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1256 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> |
1247 | {optRecord.orderStatus === 'CONFIRM_RECEIPT' || | 1257 | {optRecord.orderStatus === 'CONFIRM_RECEIPT' || |
1248 | - optRecord.orderStatus === 'AFTER_SALES_COMPLETION' || | ||
1249 | - optRecord.orderStatus === 'IN_AFTER_SALES' || | ||
1250 | - optRecord.orderStatus === 'SHIPPED' ? ( | 1258 | + optRecord.orderStatus === 'AFTER_SALES_COMPLETION' || |
1259 | + optRecord.orderStatus === 'IN_AFTER_SALES' || | ||
1260 | + optRecord.orderStatus === 'SHIPPED' ? ( | ||
1251 | <MyToolTip | 1261 | <MyToolTip |
1252 | title={ | 1262 | title={ |
1253 | - optRecord.serialNumber === undefined | ||
1254 | - ? '暂无物流信息' | ||
1255 | - : enumValueToLabel( | ||
1256 | - optRecord.logisticsMethod, | ||
1257 | - LOGISTICS_STATUS_OPTIONS, | ||
1258 | - ) + | ||
1259 | - ' ' + | ||
1260 | - optRecord.serialNumber + | ||
1261 | - ' ' + | ||
1262 | - optRecord.logisticsNotes | 1263 | + optRecord.serialNumber |
1264 | + ? enumValueToLabel( | ||
1265 | + optRecord.logisticsMethod, | ||
1266 | + LOGISTICS_STATUS_OPTIONS, | ||
1267 | + ) + | ||
1268 | + ' ' + | ||
1269 | + optRecord.serialNumber + | ||
1270 | + ' ' + | ||
1271 | + optRecord.logisticsNotes | ||
1272 | + : optRecord.deliverType | ||
1273 | + ? '自行派送' | ||
1274 | + : '暂无物流信息' | ||
1263 | } | 1275 | } |
1264 | content={ | 1276 | content={ |
1265 | <Button type="link" size="small" style={{ padding: 0 }}> | 1277 | <Button type="link" size="small" style={{ padding: 0 }}> |
@@ -1273,7 +1285,7 @@ const OrderPage = () => { | @@ -1273,7 +1285,7 @@ const OrderPage = () => { | ||
1273 | 1285 | ||
1274 | {/* 修改审核状态 */} | 1286 | {/* 修改审核状态 */} |
1275 | {optRecord.modifiedAuditStatus !== null && | 1287 | {optRecord.modifiedAuditStatus !== null && |
1276 | - optRecord.modifiedAuditStatus !== 'AUDIT_FAILURE' ? ( | 1288 | + optRecord.modifiedAuditStatus !== 'AUDIT_FAILURE' ? ( |
1277 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1289 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> |
1278 | <Tooltip | 1290 | <Tooltip |
1279 | title={enumValueToLabel( | 1291 | title={enumValueToLabel( |
@@ -1318,7 +1330,6 @@ const OrderPage = () => { | @@ -1318,7 +1330,6 @@ const OrderPage = () => { | ||
1318 | </div> | 1330 | </div> |
1319 | </Flex> | 1331 | </Flex> |
1320 | <Flex className="w-[18%]" wrap="wrap" gap="small"> | 1332 | <Flex className="w-[18%]" wrap="wrap" gap="small"> |
1321 | - | ||
1322 | {optRecord.subPath?.includes('uploadPaymentReceiptBill') ? ( | 1333 | {optRecord.subPath?.includes('uploadPaymentReceiptBill') ? ( |
1323 | <Button | 1334 | <Button |
1324 | className="p-0" | 1335 | className="p-0" |
@@ -1334,7 +1345,6 @@ const OrderPage = () => { | @@ -1334,7 +1345,6 @@ const OrderPage = () => { | ||
1334 | '' | 1345 | '' |
1335 | )} | 1346 | )} |
1336 | 1347 | ||
1337 | - | ||
1338 | {optRecord.subPath?.includes('leaderAudit') ? ( | 1348 | {optRecord.subPath?.includes('leaderAudit') ? ( |
1339 | <Button | 1349 | <Button |
1340 | className="p-0" | 1350 | className="p-0" |
@@ -1572,7 +1582,7 @@ const OrderPage = () => { | @@ -1572,7 +1582,7 @@ const OrderPage = () => { | ||
1572 | )} | 1582 | )} |
1573 | 1583 | ||
1574 | {optRecord.subPath?.includes('queryAnnex') && | 1584 | {optRecord.subPath?.includes('queryAnnex') && |
1575 | - optRecord.listAnnex?.length > 0 ? ( | 1585 | + optRecord.listAnnex?.length > 0 ? ( |
1576 | <Button | 1586 | <Button |
1577 | className="p-0" | 1587 | className="p-0" |
1578 | type="link" | 1588 | type="link" |
@@ -1914,7 +1924,7 @@ const OrderPage = () => { | @@ -1914,7 +1924,7 @@ const OrderPage = () => { | ||
1914 | type="link" | 1924 | type="link" |
1915 | onClick={() => { | 1925 | onClick={() => { |
1916 | createOptObject(optRecord.id, record.id); | 1926 | createOptObject(optRecord.id, record.id); |
1917 | - setImagesViewerOptType("shippingReceipt"); | 1927 | + setImagesViewerOptType('shippingReceipt'); |
1918 | setImagesViewerModalVisible(true); | 1928 | setImagesViewerModalVisible(true); |
1919 | }} | 1929 | }} |
1920 | > | 1930 | > |
@@ -1947,9 +1957,9 @@ const OrderPage = () => { | @@ -1947,9 +1957,9 @@ const OrderPage = () => { | ||
1947 | </Flex> | 1957 | </Flex> |
1948 | 1958 | ||
1949 | {roleCode === 'admin' || | 1959 | {roleCode === 'admin' || |
1950 | - roleCode === 'salesManager' || | ||
1951 | - roleCode === 'salesRepresentative' || | ||
1952 | - roleCode === 'finance' ? ( | 1960 | + roleCode === 'salesManager' || |
1961 | + roleCode === 'salesRepresentative' || | ||
1962 | + roleCode === 'finance' ? ( | ||
1953 | <Flex title={optRecord.notes}> | 1963 | <Flex title={optRecord.notes}> |
1954 | <div className="flex items-center"> | 1964 | <div className="flex items-center"> |
1955 | <div className="flex items-center max-w-[500px]"> | 1965 | <div className="flex items-center max-w-[500px]"> |
@@ -1961,7 +1971,7 @@ const OrderPage = () => { | @@ -1961,7 +1971,7 @@ const OrderPage = () => { | ||
1961 | <span className="text-[#8C8C8C]"> | 1971 | <span className="text-[#8C8C8C]"> |
1962 | 申请开票备注: | 1972 | 申请开票备注: |
1963 | {optRecord.applyInvoicingNotes === undefined || | 1973 | {optRecord.applyInvoicingNotes === undefined || |
1964 | - optRecord.applyInvoicingNotes === null | 1974 | + optRecord.applyInvoicingNotes === null |
1965 | ? '暂无备注' | 1975 | ? '暂无备注' |
1966 | : optRecord.applyInvoicingNotes} | 1976 | : optRecord.applyInvoicingNotes} |
1967 | </span> | 1977 | </span> |
@@ -1989,7 +1999,7 @@ const OrderPage = () => { | @@ -1989,7 +1999,7 @@ const OrderPage = () => { | ||
1989 | <span className="text-[#8C8C8C] mr-3"> | 1999 | <span className="text-[#8C8C8C] mr-3"> |
1990 | 财务审核备注: | 2000 | 财务审核备注: |
1991 | {optRecord.checkNotes === undefined || | 2001 | {optRecord.checkNotes === undefined || |
1992 | - optRecord.checkNotes === null | 2002 | + optRecord.checkNotes === null |
1993 | ? '暂无备注' | 2003 | ? '暂无备注' |
1994 | : optRecord.checkNotes} | 2004 | : optRecord.checkNotes} |
1995 | </span> | 2005 | </span> |
@@ -2282,9 +2292,9 @@ const OrderPage = () => { | @@ -2282,9 +2292,9 @@ const OrderPage = () => { | ||
2282 | <span className="text-slate-700"> | 2292 | <span className="text-slate-700"> |
2283 | {record.receivingCompany !== null | 2293 | {record.receivingCompany !== null |
2284 | ? enumValueToLabel( | 2294 | ? enumValueToLabel( |
2285 | - record.receivingCompany, | ||
2286 | - getReceivingCompanyOptions(PAYEE_OPTIONS), | ||
2287 | - ) | 2295 | + record.receivingCompany, |
2296 | + getReceivingCompanyOptions(PAYEE_OPTIONS), | ||
2297 | + ) | ||
2288 | : '暂无'} | 2298 | : '暂无'} |
2289 | </span> | 2299 | </span> |
2290 | </div> | 2300 | </div> |
@@ -2325,44 +2335,43 @@ const OrderPage = () => { | @@ -2325,44 +2335,43 @@ const OrderPage = () => { | ||
2325 | '' | 2335 | '' |
2326 | )} | 2336 | )} |
2327 | 2337 | ||
2328 | - { | ||
2329 | - record.goodsWeight !== null ? | ||
2330 | - <div title={record.goodsWeight + "kg"} className='pl-3'> | ||
2331 | - <div | ||
2332 | - className="max-w-md overflow-hidden whitespace-no-wrap overflow-ellipsis hover:cursor-pointer" | ||
2333 | - onClick={() => { | ||
2334 | - copyToClipboard(record.goodsWeight + "kg"); | ||
2335 | - message.info('包裹重量复制成功:' + record.goodsWeight + "kg"); | ||
2336 | - }} | ||
2337 | - > | ||
2338 | - <span className="text-[#8C8C8C]">包裹重量:</span> | ||
2339 | - <span className="ml-2"> | ||
2340 | - {record.goodsWeight + "kg"} | ||
2341 | - </span> | ||
2342 | - </div> | 2338 | + {record.goodsWeight !== null ? ( |
2339 | + <div title={record.goodsWeight + 'kg'} className="pl-3"> | ||
2340 | + <div | ||
2341 | + className="max-w-md overflow-hidden whitespace-no-wrap overflow-ellipsis hover:cursor-pointer" | ||
2342 | + onClick={() => { | ||
2343 | + copyToClipboard(record.goodsWeight + 'kg'); | ||
2344 | + message.info( | ||
2345 | + '包裹重量复制成功:' + record.goodsWeight + 'kg', | ||
2346 | + ); | ||
2347 | + }} | ||
2348 | + > | ||
2349 | + <span className="text-[#8C8C8C]">包裹重量:</span> | ||
2350 | + <span className="ml-2">{record.goodsWeight + 'kg'}</span> | ||
2343 | </div> | 2351 | </div> |
2344 | - : "" | ||
2345 | - } | 2352 | + </div> |
2353 | + ) : ( | ||
2354 | + '' | ||
2355 | + )} | ||
2346 | 2356 | ||
2347 | - { | ||
2348 | - record.goodsVolume !== null ? | ||
2349 | - <div title={record.goodsVolume + "m³"} className='pl-3'> | ||
2350 | - <div | ||
2351 | - className="max-w-md overflow-hidden whitespace-no-wrap overflow-ellipsis hover:cursor-pointer" | ||
2352 | - onClick={() => { | ||
2353 | - copyToClipboard(record.goodsVolume + "m³"); | ||
2354 | - message.info('包裹体积复制成功:' + record.goodsVolume + "m³"); | ||
2355 | - }} | ||
2356 | - > | ||
2357 | - <span className="text-[#8C8C8C]">包裹体积:</span> | ||
2358 | - <span className="ml-2"> | ||
2359 | - {record.goodsVolume + "m³"} | ||
2360 | - </span> | ||
2361 | - </div> | 2357 | + {record.goodsVolume !== null ? ( |
2358 | + <div title={record.goodsVolume + 'm³'} className="pl-3"> | ||
2359 | + <div | ||
2360 | + className="max-w-md overflow-hidden whitespace-no-wrap overflow-ellipsis hover:cursor-pointer" | ||
2361 | + onClick={() => { | ||
2362 | + copyToClipboard(record.goodsVolume + 'm³'); | ||
2363 | + message.info( | ||
2364 | + '包裹体积复制成功:' + record.goodsVolume + 'm³', | ||
2365 | + ); | ||
2366 | + }} | ||
2367 | + > | ||
2368 | + <span className="text-[#8C8C8C]">包裹体积:</span> | ||
2369 | + <span className="ml-2">{record.goodsVolume + 'm³'}</span> | ||
2362 | </div> | 2370 | </div> |
2363 | - : "" | ||
2364 | - } | ||
2365 | - | 2371 | + </div> |
2372 | + ) : ( | ||
2373 | + '' | ||
2374 | + )} | ||
2366 | </Flex> | 2375 | </Flex> |
2367 | </Flex> | 2376 | </Flex> |
2368 | <Flex wrap="wrap" gap="middle" vertical> | 2377 | <Flex wrap="wrap" gap="middle" vertical> |
@@ -2930,9 +2939,9 @@ const OrderPage = () => { | @@ -2930,9 +2939,9 @@ const OrderPage = () => { | ||
2930 | for (let i = 0; i < selectedSubOrders.length; i++) { | 2939 | for (let i = 0; i < selectedSubOrders.length; i++) { |
2931 | if ( | 2940 | if ( |
2932 | selectedSubOrders[i].invoicingStatus === | 2941 | selectedSubOrders[i].invoicingStatus === |
2933 | - 'UN_INVOICE' || | 2942 | + 'UN_INVOICE' || |
2934 | selectedSubOrders[i].afterInvoicingStatus === | 2943 | selectedSubOrders[i].afterInvoicingStatus === |
2935 | - 'APPLY_FOR_INVOICING' | 2944 | + 'APPLY_FOR_INVOICING' |
2936 | ) { | 2945 | ) { |
2937 | message.error( | 2946 | message.error( |
2938 | '请选择需要开票且未申请开票的子订单进行申请', | 2947 | '请选择需要开票且未申请开票的子订单进行申请', |
@@ -3121,13 +3130,13 @@ const OrderPage = () => { | @@ -3121,13 +3130,13 @@ const OrderPage = () => { | ||
3121 | if ( | 3130 | if ( |
3122 | selectedSubOrders[i].orderStatus !== 'AUDITED' && | 3131 | selectedSubOrders[i].orderStatus !== 'AUDITED' && |
3123 | selectedSubOrders[i].orderStatus !== | 3132 | selectedSubOrders[i].orderStatus !== |
3124 | - 'PROCURE_PROCESS' && | 3133 | + 'PROCURE_PROCESS' && |
3125 | selectedSubOrders[i].orderStatus !== | 3134 | selectedSubOrders[i].orderStatus !== |
3126 | - 'PROCURE_PROCESS_FOR_MINE' && | 3135 | + 'PROCURE_PROCESS_FOR_MINE' && |
3127 | selectedSubOrders[i].orderStatus !== | 3136 | selectedSubOrders[i].orderStatus !== |
3128 | - 'PROCURE_WAIT_SHIP' && | 3137 | + 'PROCURE_WAIT_SHIP' && |
3129 | selectedSubOrders[i].orderStatus !== | 3138 | selectedSubOrders[i].orderStatus !== |
3130 | - 'SUPPLIER_WAIT_SHIP' && | 3139 | + 'SUPPLIER_WAIT_SHIP' && |
3131 | selectedSubOrders[i].orderStatus !== 'WAIT_SHIP' | 3140 | selectedSubOrders[i].orderStatus !== 'WAIT_SHIP' |
3132 | ) { | 3141 | ) { |
3133 | message.error( | 3142 | message.error( |
@@ -3214,9 +3223,9 @@ const OrderPage = () => { | @@ -3214,9 +3223,9 @@ const OrderPage = () => { | ||
3214 | if ( | 3223 | if ( |
3215 | selectedSubOrders[i].orderStatus !== 'UNAUDITED' && | 3224 | selectedSubOrders[i].orderStatus !== 'UNAUDITED' && |
3216 | selectedSubOrders[i].orderStatus !== | 3225 | selectedSubOrders[i].orderStatus !== |
3217 | - 'FINANCE_PROCESS' && | 3226 | + 'FINANCE_PROCESS' && |
3218 | selectedSubOrders[i].orderStatus !== | 3227 | selectedSubOrders[i].orderStatus !== |
3219 | - 'LEADER_AUDITED' | 3228 | + 'LEADER_AUDITED' |
3220 | ) { | 3229 | ) { |
3221 | message.error( | 3230 | message.error( |
3222 | '请选择[未审核]、[财务待审核]、[领导已审核]的子订单进行审核', | 3231 | '请选择[未审核]、[财务待审核]、[领导已审核]的子订单进行审核', |
@@ -3284,9 +3293,9 @@ const OrderPage = () => { | @@ -3284,9 +3293,9 @@ const OrderPage = () => { | ||
3284 | for (let i = 0; i < selectedSubOrders.length; i++) { | 3293 | for (let i = 0; i < selectedSubOrders.length; i++) { |
3285 | if ( | 3294 | if ( |
3286 | selectedSubOrders[i].orderStatus !== | 3295 | selectedSubOrders[i].orderStatus !== |
3287 | - 'CONFIRM_RECEIPT' && | 3296 | + 'CONFIRM_RECEIPT' && |
3288 | selectedSubOrders[i].orderStatus !== | 3297 | selectedSubOrders[i].orderStatus !== |
3289 | - 'AFTER_SALES_FAILURE' | 3298 | + 'AFTER_SALES_FAILURE' |
3290 | ) { | 3299 | ) { |
3291 | message.error('请选择确认收货状态的子订单进行售后'); | 3300 | message.error('请选择确认收货状态的子订单进行售后'); |
3292 | return; | 3301 | return; |
@@ -3490,10 +3499,7 @@ const OrderPage = () => { | @@ -3490,10 +3499,7 @@ const OrderPage = () => { | ||
3490 | (item) => { | 3499 | (item) => { |
3491 | //首能账号只能搜索订单编号 | 3500 | //首能账号只能搜索订单编号 |
3492 | let canSearchIndex = ['id', 'salesCode', 'subNotes', 'orderStatus']; | 3501 | let canSearchIndex = ['id', 'salesCode', 'subNotes', 'orderStatus']; |
3493 | - if ( | ||
3494 | - isSupplier() && | ||
3495 | - !canSearchIndex.includes(item.dataIndex) | ||
3496 | - ) { | 3502 | + if (isSupplier() && !canSearchIndex.includes(item.dataIndex)) { |
3497 | item.search = false; | 3503 | item.search = false; |
3498 | } | 3504 | } |
3499 | if (item.dataIndex === 'name') { | 3505 | if (item.dataIndex === 'name') { |
@@ -3521,10 +3527,7 @@ const OrderPage = () => { | @@ -3521,10 +3527,7 @@ const OrderPage = () => { | ||
3521 | /** | 3527 | /** |
3522 | * 采购可以筛选供应商备注 | 3528 | * 采购可以筛选供应商备注 |
3523 | */ | 3529 | */ |
3524 | - if ( | ||
3525 | - (roleCode === 'procure' || roleCode === 'admin') && | ||
3526 | - !isSupplier() | ||
3527 | - ) { | 3530 | + if ((roleCode === 'procure' || roleCode === 'admin') && !isSupplier()) { |
3528 | mainOrdersColumns.push({ | 3531 | mainOrdersColumns.push({ |
3529 | title: '供应商备注', | 3532 | title: '供应商备注', |
3530 | width: 120, | 3533 | width: 120, |
@@ -3537,10 +3540,7 @@ const OrderPage = () => { | @@ -3537,10 +3540,7 @@ const OrderPage = () => { | ||
3537 | /** | 3540 | /** |
3538 | * 采购可以筛选其他采购 | 3541 | * 采购可以筛选其他采购 |
3539 | */ | 3542 | */ |
3540 | - if ( | ||
3541 | - (roleCode === 'procure' || roleCode === 'admin') && | ||
3542 | - !isSupplier() | ||
3543 | - ) { | 3543 | + if ((roleCode === 'procure' || roleCode === 'admin') && !isSupplier()) { |
3544 | mainOrdersColumns.push({ | 3544 | mainOrdersColumns.push({ |
3545 | title: '采购名称', | 3545 | title: '采购名称', |
3546 | width: 120, | 3546 | width: 120, |
@@ -3687,7 +3687,7 @@ const OrderPage = () => { | @@ -3687,7 +3687,7 @@ const OrderPage = () => { | ||
3687 | 3687 | ||
3688 | const exportMenuProps = { | 3688 | const exportMenuProps = { |
3689 | items: exportItems, | 3689 | items: exportItems, |
3690 | - onClick: () => { }, | 3690 | + onClick: () => {}, |
3691 | }; | 3691 | }; |
3692 | 3692 | ||
3693 | //导出按钮配置 | 3693 | //导出按钮配置 |
@@ -3723,7 +3723,7 @@ const OrderPage = () => { | @@ -3723,7 +3723,7 @@ const OrderPage = () => { | ||
3723 | 3723 | ||
3724 | const auditProps = { | 3724 | const auditProps = { |
3725 | items: auditItems, | 3725 | items: auditItems, |
3726 | - onClick: () => { }, | 3726 | + onClick: () => {}, |
3727 | }; | 3727 | }; |
3728 | 3728 | ||
3729 | if (rolePath?.includes('leaderMergeAudit')) { | 3729 | if (rolePath?.includes('leaderMergeAudit')) { |
@@ -3831,8 +3831,8 @@ const OrderPage = () => { | @@ -3831,8 +3831,8 @@ const OrderPage = () => { | ||
3831 | if (errorIds.size > 0) { | 3831 | if (errorIds.size > 0) { |
3832 | message.error( | 3832 | message.error( |
3833 | '订单号为:' + | 3833 | '订单号为:' + |
3834 | - [...errorIds.values()].join(',') + | ||
3835 | - '的订单存在不是[申请开票]或者[部分开票]状态的子订单,请检查!', | 3834 | + [...errorIds.values()].join(',') + |
3835 | + '的订单存在不是[申请开票]或者[部分开票]状态的子订单,请检查!', | ||
3836 | ); | 3836 | ); |
3837 | return; | 3837 | return; |
3838 | } | 3838 | } |
@@ -4271,7 +4271,7 @@ const OrderPage = () => { | @@ -4271,7 +4271,7 @@ const OrderPage = () => { | ||
4271 | 4271 | ||
4272 | {imagesViewerModalVisible && ( | 4272 | {imagesViewerModalVisible && ( |
4273 | <ImagesViewerModal | 4273 | <ImagesViewerModal |
4274 | - optType={imagesViewerOptType} | 4274 | + optType={imagesViewerOptType} |
4275 | setVisible={(val: boolean) => { | 4275 | setVisible={(val: boolean) => { |
4276 | setImagesViewerModalVisible(val); | 4276 | setImagesViewerModalVisible(val); |
4277 | if (!val) { | 4277 | if (!val) { |