Ben Lin
2024-08-22 ec0d91353b767f089fa72f3cd1eb62568852710b
src/views/tigerprojects/system/lowcode/entityts/BIZ_MES_WO_BATCH.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-07-25 21:44:58
 * @LastEditTime: 2024-08-22 10:26:40
 */
import { Tag, Tooltip } from 'ant-design-vue';
@@ -58,6 +58,10 @@
        if (x.name == 'handleRelease') {
          x.onClick = handleRelease.bind(null, args, params);
          x.tooltip = '下发';
        }
        if (x.name == 'handleUnRelease') {
          x.onClick = handleUnRelease.bind(null, args, params);
          x.tooltip = '取消下发';
        }
      });
      return data;
@@ -408,6 +412,33 @@
    });
  }
  /**
   * @description: 工单取消下发方法
   * @param {*} args
   * @param {Recordable} params
   * @return {*}
   */
  function handleUnRelease(args, params: Recordable) {
    const reload = args[1];
    if (params['record'].STATUS != 2) {
      createErrorModal({
        title: t('警告'),
        content: t('工单不是下发状态,不能取消下发!'),
        getContainer: () => document.body,
      });
      return;
    }
    params['record'].STATUS = 0;
    SaveEntity(params['record'], true, 'BIZ_MES_WO_BATCH').then((action) => {
      if (action.IsSuccessed) {
        createMessage.success(t('已取消'));
        reload();
      } else {
        createMessage.success(t('取消操作失败'));
      }
    });
  }
  const woformSchema: FormSchema[] = [
    {
      field: 'PLAN_QTY',