Merged
Merge Request #3 · created by zhongnanhuang · ·

feat: updated the interaction logic between various operation buttons and interfaces

更新了各个按钮与接口的交互。还有部分按钮未完成。

Request to merge zhongnanhuang into develop
CI build skipped for 523b3b7d. View build details

Merged by zhusen

The changes were merged into develop. The source branch has been removed.
2 participants
canrd-main/canrd-erp-front!3
  • zhusen started a discussion on the diff
    last updated by zhusen
    src/pages/Order/index.tsx
    168   - className="p-0"
    169   - type="link"
    170   - onClick={() => {
    171   - setOrderRow(record);
    172   - setCheckVisible(true);
    173   - }}
    174   - >
    175   - 审核
    176   - </Button>
    177   - <ButtonConfirm
    178   - className="p-0"
    179   - title="确认作废?"
    180   - text="作废"
    181   - onConfirm={() => {}}
    182   - />
      150 + {record.mainPath.includes('sendProduct') ? (
    1
    zhusen started a discussion on the diff
    last updated by zhusen
    src/pages/Order/index.tsx
    247 305 if (label === undefined) {
    248 306 label = enumValueToLabel(text, PAYMENT_METHOD_OPTIONS);
    249 307 }
      308 + if (label === undefined) {
    1
    zhusen started a discussion on the diff
    last updated by zhusen
    src/pages/Order/index.tsx
      338 + ''
      339 + )}
      340 + {optRecord.subPath.includes('printOrder') ? (
      341 + <Button
      342 + className="p-0"
      343 + type="link"
      344 + onClick={async () => {
      345 + //调用打印接口
      346 + let body = { subIds: [optRecord.id] };
      347 + const data = await postServiceOrderPrintOrder({
      348 + data: body,
      349 + });
      350 + if (data.result === RESPONSE_CODE.SUCCESS) {
      351 + message.success(data.message);
      352 + window.print();
      353 + mainTableRef.current?.reload();
    1
    zhusen started a discussion on the diff
    last updated by zhusen
    src/pages/Order/index.tsx
    274   - type="link"
    275   - size="small"
    276   - onClick={() => {
    277   - setCheckVisible(true);
    278   - setOrderRow(optRecord);
    279   - }}
    280   - >
    281   - 审核
    282   - </Button>
      325 + {optRecord.subPath.includes('sendProduct') ? (
      326 + <Button
      327 + className="p-0"
      328 + type="link"
      329 + onClick={() => {
      330 + optRecord.mainOrderId = record.id;
      331 + setSelectedRows([cloneDeep(optRecord)]); //克隆一份数据,避免后续修改污染
    1
    zhusen started a discussion on the diff
    last updated by zhusen
    src/pages/Order/index.tsx
      477 + const data = await postServiceOrderExport({
      478 + data: { flag: true, ids: mainOrderAllItemKeys },
      479 + });
      480 + if (data.result === RESPONSE_CODE.SUCCESS) {
      481 + message.success(data.message);
      482 + }
      483 + },
      484 + },
      485 + {
      486 + label: '导出所有订单',
      487 + key: '3',
      488 + onClick: async () => {
      489 + const data = await postServiceOrderExport({
      490 + data: { flag: false, ids: [] },
      491 + });
      492 + if (data.result === RESPONSE_CODE.SUCCESS) {
    1