已修改18个文件
已添加1个文件
918 ■■■■ 文件已修改
src/api/inspectionManagement/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/tool/publicInterface.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Table/ETable.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/hooks/useDelete.js 162 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/hooks/useFormData.js 326 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/archiveManagement/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/archiveManagement/mould/archiveDialog.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicInformation/index.vue 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicInformation/mould/coal.vue 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicInformation/mould/coalMeiZhiZiDuanWeiHu.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicInformation/mould/customer.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicInformation/mould/supplier.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/index.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procureMent/components/ProductionDialog.vue 158 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procureMent/index.vue 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/production/components/ProductionDialog.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/production/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouseManagement/index.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/inspectionManagement/index.js
@@ -17,7 +17,7 @@
        data: query
    })
}
// å·¡æ£€ä»»åŠ¡è¡¨æ–°å¢žä¿®æ”¹
// å·¡æ£€ä»»åŠ¡è¡¨åˆ é™¤
export function delInspectionTask(query) {
    return request({
        url: '/inspectionTask/delInspectionTask',
src/api/tool/publicInterface.js
@@ -3,7 +3,7 @@
// èŽ·å–è·¯ç”±
export const testUserList = () => {
  return request({
    url: '/test/user/list',
    url: '/system/user/listAll',
    method: 'get'
  })
}
src/components/Table/ETable.vue
@@ -17,8 +17,8 @@
    :row-key="rowKey"
    style="width: 100%;"
  >
    <el-table-column v-if="showSelection" type="selection" width="55" align="center" />
    <el-table-column v-if="showIndex" label="序号" width="60" align="center" fixed="left">
    <el-table-column v-if="showSelection" type="selection" width="55" align="center" :show-overflow-tooltip="false" />
    <el-table-column v-if="showIndex" label="序号" width="60" align="center" fixed="left" :show-overflow-tooltip="false">
      <template #default="scope">
        {{ getRowIndex(scope.$index) }}
      </template>
@@ -38,7 +38,9 @@
          <el-button v-if="operations.includes('edit')" link type="primary" size="small"
            @click="handleEdit(scope.row)">编辑</el-button>
          <el-button v-if="operations.includes('viewRow')" link type="primary" size="small"
            @click="handleView(scope.row)">查看附件</el-button>
            @click="handleView(scope.row)">查看</el-button>
          <el-button v-if="operations.includes('viewFile')" link type="primary" size="small"
            @click="handleViewFile(scope.row)">查看附件</el-button>
        </slot>
      </template>
    </el-table-column>
@@ -161,7 +163,7 @@
};
// å¤„理选择变化、编辑、删除和导出操作
const emit = defineEmits(['selection-change', 'edit', 'delete', 'export', 'viewRow'])
const emit = defineEmits(['selection-change', 'edit', 'delete', 'export', 'viewRow', 'viewFile'])
const handleSelectionChange = (selection) => {
  emit('selection-change', selection)
}
@@ -171,6 +173,9 @@
const handleView = (row) => {
  emit('viewRow', row)
}
const handleViewFile = (row) => {
  emit('viewFile', row)
}
const handleDelete = (row) => {
  ElMessageBox.confirm(
    props.deleteConfirmText,
src/hooks/useDelete.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,162 @@
/**
 * é€šç”¨åˆ é™¤åŠŸèƒ½ç»„åˆå¼å‡½æ•°
 * æä¾›ç»Ÿä¸€çš„删除确认、API调用、数据更新逻辑
 */
import { ElMessage, ElMessageBox } from "element-plus";
/**
 * åˆ›å»ºåˆ é™¤åŠŸèƒ½
 * @param {Object} options é…ç½®é€‰é¡¹
 * @param {Function|Function} options.deleteApi åˆ é™¤API函数或返回API函数的函数
 * @param {Function|Function} options.getList é‡æ–°èŽ·å–åˆ—è¡¨æ•°æ®çš„å‡½æ•°æˆ–è¿”å›žå‡½æ•°çš„å‡½æ•°
 * @param {Ref} options.selectedRows é€‰ä¸­è¡Œçš„响应式引用
 * @param {Ref} options.tableData è¡¨æ ¼æ•°æ®çš„响应式引用
 * @param {Ref} options.total æ€»æ•°çš„响应式引用
 * @param {String} options.confirmText ç¡®è®¤åˆ é™¤çš„æç¤ºæ–‡æœ¬
 * @param {String} options.successText åˆ é™¤æˆåŠŸçš„æç¤ºæ–‡æœ¬
 * @param {Boolean} options.useLocalUpdate æ˜¯å¦ä½¿ç”¨æœ¬åœ°æ›´æ–°ï¼ˆä¸é‡æ–°è¯·æ±‚接口)
 * @returns {Object} è¿”回删除相关的方法
 */
export function useDelete(options = {}) {
  const {
    deleteApi,
    getList,
    selectedRows,
    tableData,
    total,
    confirmText = "确定删除选中的数据吗?",
    successText = "删除成功",
    useLocalUpdate = false
  } = options;
  /**
   * èŽ·å–å®žé™…çš„åˆ é™¤API函数
   * æ”¯æŒç›´æŽ¥ä¼ å…¥å‡½æ•°æˆ–返回函数的函数
   */
  const getDeleteApi = () => {
    if (typeof deleteApi === 'function') {
      // å°è¯•调用看是否返回函数
      try {
        const result = deleteApi();
        return typeof result === 'function' ? result : deleteApi;
      } catch (error) {
        // å¦‚果调用出错,说明这本身就是API函数
        return deleteApi;
      }
    }
    return deleteApi;
  };
  /**
   * èŽ·å–å®žé™…çš„èŽ·å–åˆ—è¡¨å‡½æ•°
   * æ”¯æŒç›´æŽ¥ä¼ å…¥å‡½æ•°æˆ–返回函数的函数
   */
  const getListFunction = () => {
    if (typeof getList === 'function') {
      try {
        const result = getList();
        return typeof result === 'function' ? result : getList;
      } catch (error) {
        // å¦‚果调用出错,说明这本身就是列表函数
        return getList;
      }
    }
    return getList;
  };
  /**
   * æ‰¹é‡åˆ é™¤æ–¹æ³•
   * @param {Array} customIds è‡ªå®šä¹‰è¦åˆ é™¤çš„ID数组,如果不传则使用selectedRows
   */
  const handleDelete = async (customIds = null) => {
    // ç¡®å®šè¦åˆ é™¤çš„行
    const rowsToDelete = customIds ?
      tableData.value.filter(item => customIds.includes(item.id)) :
      selectedRows.value;
    // æ£€æŸ¥æ˜¯å¦æœ‰é€‰ä¸­æ•°æ®
    if (rowsToDelete.length === 0) {
      ElMessage.warning("请选择要删除的数据");
      return false;
    }
    try {
      // ç¡®è®¤åˆ é™¤
      await ElMessageBox.confirm(confirmText, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      });
      // æå–ID
      const ids = rowsToDelete.map(item => item.id);
      // èŽ·å–å½“å‰çš„åˆ é™¤API函数
      const currentDeleteApi = getDeleteApi();
      if (!currentDeleteApi) {
        ElMessage.error("删除API未配置");
        return false;
      }
      // è°ƒç”¨åˆ é™¤API
      const res = await currentDeleteApi(ids);
      if (res.code === 200) {
        // æ ¹æ®é…ç½®é€‰æ‹©æ›´æ–°æ–¹å¼
        if (useLocalUpdate) {
          // æœ¬åœ°æ›´æ–°ï¼šä»Žè¡¨æ ¼æ•°æ®ä¸­ç§»é™¤å·²åˆ é™¤çš„项
          tableData.value = tableData.value.filter(item => !ids.includes(item.id));
          if (total && total.value !== undefined) {
            total.value = tableData.value.length;
          }
        } else {
          // é‡æ–°èŽ·å–æ•°æ®
          const currentGetList = getListFunction();
          if (currentGetList) {
            await currentGetList();
          }
        }
        // æ¸…空选中状态
        if (selectedRows && selectedRows.value) {
          selectedRows.value = [];
        }
        ElMessage.success(successText);
        return true;
      } else {
        ElMessage.error("删除失败:" + (res.msg || "未知错误"));
        return false;
      }
    } catch (error) {
      if (error !== "cancel") {
        console.error("删除操作失败:", error);
        ElMessage.error("删除失败:" + (error.message || "请稍后重试"));
      } else {
        ElMessage.info("已取消删除");
      }
      return false;
    }
  };
  /**
   * åˆ é™¤å•个项目
   * @param {Object} row è¦åˆ é™¤çš„行数据
   */
  const handleDeleteSingle = async (row) => {
    return await handleDelete([row.id]);
  };
  /**
   * åˆ é™¤å¤šä¸ªé¡¹ç›®ï¼ˆæ‰¹é‡åˆ é™¤ï¼‰
   */
  const handleDeleteBatch = async () => {
    return await handleDelete();
  };
  return {
    handleDelete,
    handleDeleteSingle,
    handleDeleteBatch
  };
}
src/hooks/useFormData.js
@@ -1,8 +1,330 @@
import { reactive } from "vue";
/**
 * é€šç”¨è¡¨å•数据管理组合式函数
 * æä¾›è¡¨å•数据的增删改查、验证、重置等功能
 */
import { ref, reactive, computed, nextTick } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { clone } from "lodash";
/**
 * åˆ›å»ºè¡¨å•数据管理功能
 * @param {Object} options é…ç½®é€‰é¡¹
 * @param {Object} options.defaultForm é»˜è®¤è¡¨å•结构
 * @param {Function} options.addApi æ–°å¢žAPI函数
 * @param {Function} options.updateApi æ›´æ–°API函数
 * @param {Function} options.getDetailApi èŽ·å–è¯¦æƒ…API函数
 * @param {Object} options.rules è¡¨å•验证规则
 * @param {Function} options.beforeSubmit æäº¤å‰çš„æ•°æ®å¤„理函数
 * @param {Function} options.afterSubmit æäº¤åŽçš„回调函数
 * @param {Boolean} options.autoReset æäº¤æˆåŠŸåŽæ˜¯å¦è‡ªåŠ¨é‡ç½®è¡¨å•
 * @returns {Object} è¿”回表单管理相关的方法和状态
 */
export function useFormData(options = {}) {
  const {
    defaultForm = {},
    addApi,
    updateApi,
    getDetailApi,
    rules = {},
    beforeSubmit,
    afterSubmit,
    autoReset = true
  } = options;
export default function useFormData(initData) {
  // è¡¨å•状态
  const form = ref({ ...defaultForm });
  const originalForm = ref({ ...defaultForm });
  const loading = ref(false);
  const dialogVisible = ref(false);
  const mode = ref('add'); // 'add', 'edit', 'view'
  const title = ref('');
  const formRef = ref(null);
  // è®¡ç®—属性
  const isAdd = computed(() => mode.value === 'add');
  const isEdit = computed(() => mode.value === 'edit');
  const isView = computed(() => mode.value === 'view');
  const isReadonly = computed(() => mode.value === 'view');
  const submitButtonText = computed(() => {
    return isAdd.value ? '新增' : '保存';
  });
  /**
   * æ‰“开表单对话框
   * @param {String} formMode è¡¨å•模式:'add', 'edit', 'view'
   * @param {Object} data ç¼–辑/查看时的数据
   * @param {String} customTitle è‡ªå®šä¹‰æ ‡é¢˜
   */
  const openForm = async (formMode = 'add', data = null, customTitle = '') => {
    mode.value = formMode;
    // è®¾ç½®æ ‡é¢˜
    if (customTitle) {
      title.value = customTitle;
    } else {
      const titleMap = {
        add: '新增',
        edit: '编辑',
        view: '查看'
      };
      title.value = titleMap[formMode] || '表单';
    }
    // æ ¹æ®æ¨¡å¼å¤„理数据
    if (formMode === 'add') {
      resetForm();
    } else if (data) {
      // ç¼–辑/查看模式,如果有详情API则获取最新数据
      if (getDetailApi && data.id) {
        loading.value = true;
        try {
          const res = await getDetailApi(data.id);
          if (res.code === 200) {
            setFormData(res.data);
          } else {
            ElMessage.error('获取详情失败');
            setFormData(data);
          }
        } catch (error) {
          console.error('获取详情失败:', error);
          setFormData(data);
        } finally {
          loading.value = false;
        }
      } else {
        setFormData(data);
      }
    }
    dialogVisible.value = true;
  };
  /**
   * è®¾ç½®è¡¨å•数据
   * @param {Object} data è¡¨å•数据
   */
  const setFormData = (data) => {
    form.value = { ...defaultForm, ...data };
    originalForm.value = { ...form.value };
  };
  /**
   * é‡ç½®è¡¨å•
   */
  const resetForm = () => {
    form.value = { ...defaultForm };
    originalForm.value = { ...defaultForm };
    if (formRef.value) {
      formRef.value.resetFields();
    }
  };
  /**
   * æ¢å¤è¡¨å•到原始状态
   */
  const restoreForm = () => {
    form.value = { ...originalForm.value };
    if (formRef.value) {
      formRef.value.clearValidate();
    }
  };
  /**
   * è¡¨å•验证
   * @returns {Promise<Boolean>} éªŒè¯ç»“æžœ
   */
  const validateForm = async () => {
    if (!formRef.value) return true;
    try {
      await formRef.value.validate();
      return true;
    } catch (error) {
      console.log('表单验证失败:', error);
      return false;
    }
  };
  /**
   * æäº¤è¡¨å•
   * @param {Object} customData è‡ªå®šä¹‰æäº¤æ•°æ®
   * @returns {Promise<Boolean>} æäº¤ç»“æžœ
   */
  const submitForm = async (customData = null) => {
    // éªŒè¯è¡¨å•
    const isValid = await validateForm();
    if (!isValid) {
      ElMessage.warning('请检查表单数据');
      return false;
    }
    // å‡†å¤‡æäº¤æ•°æ®
    let submitData = customData || { ...form.value };
    // æ‰§è¡Œæäº¤å‰å¤„理
    if (beforeSubmit && typeof beforeSubmit === 'function') {
      try {
        submitData = await beforeSubmit(submitData, mode.value);
      } catch (error) {
        console.error('提交前处理失败:', error);
        ElMessage.error('数据处理失败');
        return false;
      }
    }
    loading.value = true;
    try {
      let res;
      if (isAdd.value && addApi) {
        res = await addApi(submitData);
      } else if (isEdit.value && updateApi) {
        res = await updateApi(submitData);
      } else {
        ElMessage.error('未配置相应的API接口');
        return false;
      }
      if (res.code === 200) {
        const action = isAdd.value ? '新增' : '更新';
        ElMessage.success(`${action}成功`);
        // æ‰§è¡Œæäº¤åŽå›žè°ƒ
        if (afterSubmit && typeof afterSubmit === 'function') {
          await afterSubmit(res.data, mode.value, submitData);
        }
        // è‡ªåŠ¨é‡ç½®è¡¨å•
        if (autoReset) {
          closeForm();
        }
        return true;
      } else {
        ElMessage.error(res.msg || '操作失败');
        return false;
      }
    } catch (error) {
      console.error('提交失败:', error);
      ElMessage.error('操作失败,请稍后重试');
      return false;
    } finally {
      loading.value = false;
    }
  };
  /**
   * å…³é—­è¡¨å•对话框
   */
  const closeForm = () => {
    dialogVisible.value = false;
    resetForm();
  };
  /**
   * æ£€æŸ¥è¡¨å•是否有变更
   * @returns {Boolean} æ˜¯å¦æœ‰å˜æ›´
   */
  const hasChanges = computed(() => {
    return JSON.stringify(form.value) !== JSON.stringify(originalForm.value);
  });
  /**
   * å¸¦ç¡®è®¤çš„关闭表单
   */
  const closeFormWithConfirm = async () => {
    if (hasChanges.value && !isView.value) {
      try {
        await ElMessageBox.confirm('表单数据已修改,确定要离开吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning',
        });
        closeForm();
      } catch {
        // ç”¨æˆ·å–消
      }
    } else {
      closeForm();
    }
  };
  /**
   * è®¾ç½®è¡¨å•字段值
   * @param {String} field å­—段名
   * @param {Any} value å­—段值
   */
  const setFieldValue = (field, value) => {
    form.value[field] = value;
  };
  /**
   * èŽ·å–è¡¨å•å­—æ®µå€¼
   * @param {String} field å­—段名
   * @returns {Any} å­—段值
   */
  const getFieldValue = (field) => {
    return form.value[field];
  };
  /**
   * æ‰¹é‡è®¾ç½®è¡¨å•字段值
   * @param {Object} values å­—段值对象
   */
  const setFieldValues = (values) => {
    Object.keys(values).forEach(key => {
      if (form.value.hasOwnProperty(key)) {
        form.value[key] = values[key];
      }
    });
  };
  /**
   * æ¸…除字段验证
   * @param {String|Array} fields å­—段名或字段名数组
   */
  const clearValidate = (fields = null) => {
    if (formRef.value) {
      formRef.value.clearValidate(fields);
    }
  };
  return {
    // çŠ¶æ€
    form,
    loading,
    dialogVisible,
    mode,
    title,
    formRef,
    // è®¡ç®—属性
    isAdd,
    isEdit,
    isView,
    isReadonly,
    submitButtonText,
    hasChanges,
    // æ–¹æ³•
    openForm,
    setFormData,
    resetForm,
    restoreForm,
    validateForm,
    submitForm,
    closeForm,
    closeFormWithConfirm,
    setFieldValue,
    getFieldValue,
    setFieldValues,
    clearValidate
  };
}
// å‘后兼容的默认导出
export default function useFormDataSimple(initData) {
  const form = reactive(clone(initData, true));
  function resetForm() {
src/views/archiveManagement/index.vue
@@ -208,13 +208,14 @@
const tableSwitch = ref(false);
// å¤„理节点点击
const handleNodeClick = (data) => {
  console.log("点击节点", data);
  rowClickData.value = data; // å­˜å‚¨å½“前点击的节点数据
  tableSwitch.value = true;
  // åˆ‡æ¢èŠ‚ç‚¹æ—¶é‡ç½®åˆ°ç¬¬ä¸€é¡µ
  queryParams.current = 1;
  queryParams.treeId = data.id;
  getArchiveListData();
};
const rowClickData = ref({}); // å­˜å‚¨å½“前点击的节点数据
const archiveDialogs = ref(null); // è¡¨æ ¼ç»„件引用
// æ–°å¢žå½’æ¡£
const add = () => {
@@ -226,7 +227,7 @@
    // ç¡®ä¿ç»„件引用存在后再调用方法
    nextTick(() => {
      if (archiveDialogs.value && typeof archiveDialogs.value.initForm === 'function') {
        archiveDialogs.value.initForm(); // é‡ç½®è¡¨å•
        archiveDialogs.value.initForm(rowClickData.value); // é‡ç½®è¡¨å•
      }
    });
  } catch (error) {
src/views/archiveManagement/mould/archiveDialog.vue
@@ -101,9 +101,9 @@
const initTreeDataId = ref(null);
const fileUploadRef = ref(null);
const initForm = (val) => {
  initTreeDataId.value = val.value.id || null; // ç¡®ä¿ initTreeDataId åˆå§‹åŒ–为 null
  initTreeDataId.value = val.id || null; // ç¡®ä¿ initTreeDataId åˆå§‹åŒ–为 null
  ruleForm.value = {};
  ruleForm.value.treeId = val.value.id || null; // ç¡®ä¿ treeId åˆå§‹åŒ–为 null
  ruleForm.value.treeId = val.id || null; // ç¡®ä¿ treeId åˆå§‹åŒ–为 null
  nextTick(() => {
    fileUploadRef.value.init();
  });
@@ -146,9 +146,6 @@
      });
      return;
    }
    // å‘送 emit äº‹ä»¶
    // å…³é—­å¯¹è¯æ¡†
    centerDialogVisible.value = false;
  } catch (error) {
    ElMessage({
src/views/basicInformation/index.vue
@@ -58,7 +58,6 @@
          @selection-change="handleSelectionChange"
          :operations="['edit', 'viewRow']"
          :operationsWidth="200"
          :show-overflow-tooltip="false"
        >
          <!-- å­—段名称列的自定义插槽 - æ˜¾ç¤ºä¸ºæ ‡ç­¾ -->
          <template
@@ -168,7 +167,6 @@
import Coal from "./mould/coal.vue";
import coalQualityMaintenance from "./mould/coalQualityMaintenance.vue";
import coalMeiZhiZiDuanWeiHu from "./mould/coalMeiZhiZiDuanWeiHu.vue";
import Descriptions from "@/components/dialog/Descriptions.vue";
// ===== API æœåС坼入 =====
import { delSupply, getSupply } from "@/api/basicInformation/supplier.js";
@@ -186,16 +184,12 @@
import {
  getCoalFieldList,
  getCoalPlanList,
  delCoalPlan,
} from "@/api/basicInformation/coalQualityMaintenance";
import { useDelete } from "@/hooks/useDelete.js";
const { proxy } = getCurrentInstance();
// ===== å“åº”式状态管理 =====
// å¼¹çª—控制状态
const showDialog = ref(false);
const currentViewData = ref({}); // å½“前查看的数据
const dialogFormVisible = ref(false);
const form = ref({});
const title = ref("");
@@ -316,10 +310,12 @@
const getUserList = async () => {
  try {
    const res = await testUserList();
    console.log("获取用户列表数据:", res);
    console.log("userMap:", userMap.value);
    if (res && res.data) {
      userList.value = res.data;
      userList.value.forEach((user) => {
        userMap.value[user.userId] = user.username;
        userMap.value[user.userId] = user.nickName;
      });
    }
  } catch (error) {
@@ -369,11 +365,11 @@
 */
const searchPlaceholder = computed(() => {
  const placeholderMap = {
    supplier: "供应商/识别码/详细地址",
    customer: "供应商/识别码/详细地址",
    coal: "请输入搜索信息",
    coalQualityMaintenance: "请输入搜索信息",
    coalMeiZhiZiDuanWeiHu: "请输入搜索信息",
    supplier: "供应商/统一识别码/详细地址",
    customer: "供应商/统一识别码/详细地址",
    coal: "请输入煤种信息",
    coalQualityMaintenance: "请输入煤质方案信息",
    coalMeiZhiZiDuanWeiHu: "请输入煤质字段信息",
  };
  return placeholderMap[tabName.value] || "请输入搜索信息";
});
@@ -721,57 +717,22 @@
 * æ‰¹é‡åˆ é™¤å¤„理
 * @description æ‰¹é‡åˆ é™¤é€‰ä¸­çš„记录
 */
const handleDelete = async () => {
  if (selectedRows.value.length === 0) {
    ElMessage.warning("请选择要删除的数据");
    return;
  }
  const deleteIds = selectedRows.value.map((item) => item.id);
  try {
    await ElMessageBox.confirm("确定删除选中的数据吗?", "提示", {
      confirmButtonText: "确定",
      cancelButtonText: "取消",
      type: "warning",
    });
    const deleteApiMap = {
  const deleteApiMap = {
      supplier: delSupply,
      coal: delCoalInfo,
      coalQualityMaintenance: () => {
        throw new Error("delCoalQuality API not imported");
      },
      coalQualityMaintenance: delCoalPlan,
      customer: delCustomer,
      coalMeiZhiZiDuanWeiHu: deleteCoalField,
    };
    const deleteApi = deleteApiMap[tabName.value];
    if (!deleteApi) {
      ElMessage.error("删除接口未配置");
      return;
    }
    console.log(deleteIds);
    const res = await deleteApi(deleteIds);
    if (res.code !== 200 && res.msg !== "操作成功") {
      ElMessage.error("删除失败:" + res.msg);
      return;
    }
    ElMessage.success("删除成功");
    await getList();
  } catch (error) {
    if (error.message !== "cancel") {
      console.error("删除操作失败:", error);
      ElMessage.error("删除失败,请稍后再试");
    } else {
      ElMessage.info("已取消删除操作");
    }
  } finally {
    selectedRows.value = [];
  }
};
const {handleDeleteBatch :handleDelete} = useDelete({
  deleteApi: () => deleteApiMap[tabName.value],
  selectedRows: selectedRows,
  getList: () => getList,
  tableData: tableData,
  total: total,
  confirmText: "确认删除选中的数据吗?",
  successText: "删除成功",
})
/**
 * å…³é—­å¼¹çª—处理
src/views/basicInformation/mould/coal.vue
@@ -23,7 +23,7 @@
        </el-form-item>
        <el-form-item label="维护人姓名" prop="maintainerId">
          <el-input
              :value="userStore.name || ''"
              :value="userStore.nickName || ''"
              placeholder="维护人姓名"
              disabled
          />
@@ -38,8 +38,8 @@
        <el-form-item class="dialog-footer">
          <el-button v-if="addOrEdit === 'edit'" @click="resetForm">重置</el-button>
          <el-button v-if="addOrEdit === 'add'" @click="cancelForm">取消</el-button>
          <el-button type="primary" @click="submitForm">
          <el-button v-if="addOrEdit === 'add'||addOrEdit.includes('viewRow')" @click="cancelForm">取消</el-button>
          <el-button type="primary" @click="submitForm" v-if="!isViewMode">
            ç¡®å®š
          </el-button>
        </el-form-item>
@@ -79,26 +79,6 @@
  required: true,
  type: Object,
});
// åœ¨ç»„件挂载时获取用户信息
onMounted(async () => {
  // å¦‚æžœstore中没有用户信息,则获取用户信息
  if (!userStore.name) {
    try {
      await userStore.getInfo()
      // è‡ªåŠ¨å¡«å……ç»´æŠ¤äººID
      if (props.addOrEdit === 'add') {
        formData.value.maintainerId = userStore.id
      }
    } catch (error) {
      console.error('获取用户信息失败:', error)
    }
  } else {
    // è‡ªåŠ¨å¡«å……ç»´æŠ¤äººID
    if (props.addOrEdit === 'add') {
      formData.value.maintainerId = userStore.id
    }
  }
})
const emit = defineEmits(['submit', 'handleBeforeClose', 'update:coalDialogFormVisible'])
// è¡¨å•引用
@@ -127,7 +107,6 @@
  if (!formRef.value) return
  await formRef.value.validate(async (valid, fields) => {
    if (valid) {
      delete formData.value.maintainerName // åˆ é™¤æ˜¾ç¤ºç”¨çš„字段,只保留ID
      // ç¡®ä¿maintainerId有值
      if (!formData.value.maintainerId) {
@@ -166,12 +145,8 @@
  emit('update:coalDialogFormVisible', false)
}
const rules = reactive({
  supplierName: [
    {required: true, message: "请输入供货商名称", trigger: "blur"},
  ],
  identifyNumber: [
    {required: true, message: "请正确输入纳税人识别号", trigger: "blur"},
    {min: 17, max: 20, message: "请输入17-20位纳税人识别号", trigger: "blur"},
  coal: [
    {required: true, message: "请输入煤种名称", trigger: "blur"},
  ],
});
src/views/basicInformation/mould/coalMeiZhiZiDuanWeiHu.vue
@@ -29,11 +29,11 @@
          >重置
          </el-button
          >
          <el-button v-if="addOrEdit === 'add'" @click="cancelForm"
          <el-button v-if="addOrEdit === 'add' || addOrEdit.includes('viewRow')" @click="cancelForm"
          >取消
          </el-button
          >
          <el-button type="primary" @click="submitForm"> ç¡®å®š</el-button>
          <el-button type="primary" v-if="!isViewMode" @click="submitForm" > ç¡®å®š</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
src/views/basicInformation/mould/customer.vue
@@ -43,8 +43,8 @@
        </el-form-item>
        <el-form-item class="dialog-footer">
          <el-button v-if="addOrEdit === 'edit'" @click="resetForm">重置</el-button>
          <el-button v-if="addOrEdit === 'add'" @click="cancelForm">取消</el-button>
          <el-button type="primary" @click="submitForm">
          <el-button v-if="addOrEdit === 'add' || addOrEdit.includes('viewRow')" @click="cancelForm">取消</el-button>
          <el-button type="primary" v-if="!isViewMode" @click="submitForm">
            ç¡®å®š
          </el-button>
        </el-form-item>
src/views/basicInformation/mould/supplier.vue
@@ -127,10 +127,10 @@
          <el-button v-if="addOrEdit === 'edit'" @click="resetForm"
            >重置</el-button
          >
          <el-button v-if="addOrEdit !== 'edit'" @click="cancelForm"
          <el-button v-if="addOrEdit !== 'edit'||addOrEdit.includes('viewRow')" @click="cancelForm"
            >取消</el-button
          >
          <el-button type="primary" @click="submitForm"> ç¡®å®š</el-button>
          <el-button type="primary" @click="submitForm" v-if="!isViewMode"> ç¡®å®š</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
src/views/index.vue
@@ -325,11 +325,12 @@
}
</script>
<style scoped>
<style scoped lang="scss">
.dashboard {
  padding: 20px;
  background-color: #f5f7fa;
  min-height: 100vh;
  min-height: 91vh;
  box-sizing: border-box;
}
/* é¡¶éƒ¨ç»Ÿè®¡å¡ç‰‡ */
@@ -507,7 +508,7 @@
/* è¡¨æ ¼æ ·å¼è°ƒæ•´ */
.bottom-card.table {
  min-width: 320px;
  width: 100%;
}
.bottom-card.table .el-table {
@@ -518,7 +519,16 @@
.bottom-card.table .el-table th {
  padding: 8px 0;
}
:deep(.el-scrollbar__view){
  width: 100% !important;
}
:deep(.el-table__header,){
    width: 100% !important;
  }
:deep(.el-table__body,){
    width: 100% !important;
  }
/* å“åº”式设计 */
@media (max-width: 1200px) {
  .bottom-section {
src/views/inspectionManagement/index.vue
@@ -232,7 +232,11 @@
  }
  const deleteIds = selectedRows.value.map(item => item.id);
  proxy.$modal.confirm('是否确认删除所选数据项?').then(function() {
    return delQrCode(deleteIds)
    if (tabName.value === "task") {
      return delInspectionTask(deleteIds)
    } else {
      return delQrCode(deleteIds)
    }
  }).then(() => {
    handleQuery()
    proxy.$modal.msgSuccess("删除成功")
src/views/procureMent/components/ProductionDialog.vue
@@ -50,10 +50,10 @@
            </template>
          </el-input>
        </el-form-item>
        <el-form-item label="单价(不含税)" prop="priceExcludingTax">
        <el-form-item label="单价(含税)" prop="priceIncludingTax">
          <el-input
              v-model.number="form.priceExcludingTax"
              placeholder="请输入"
              v-model.number="form.priceIncludingTax"
              placeholder="请输入含税单价"
              @blur="handlePriceBlur"
              :disabled="isViewMode"
          >
@@ -62,11 +62,11 @@
            </template>
          </el-input>
        </el-form-item>
        <el-form-item label="单价(含税)" prop="priceIncludingTax">
        <el-form-item label="单价(不含税)" prop="priceExcludingTax">
          <el-input
              v-model.number="form.priceIncludingTax"
              v-model.number="form.priceExcludingTax"
              placeholder="自动计算"
              :disabled="isViewMode"
              disabled
          >
            <template v-slot:suffix>
              <i style="font-style: normal">元</i>
@@ -77,7 +77,7 @@
          <el-input
              v-model.number="form.totalPriceExcludingTax"
              placeholder="自动计算"
              :disabled="isViewMode"
              disabled
          >
            <template v-slot:suffix>
              <i style="font-style: normal">元</i>
@@ -88,7 +88,7 @@
          <el-input
              v-model.number="form.totalPriceIncludingTax"
              placeholder="自动计算"
              :disabled="isViewMode"
              disabled
          >
            <template v-slot:suffix>
              <i style="font-style: normal">元</i>
@@ -96,7 +96,7 @@
          </el-input>
        </el-form-item>
        <el-form-item label="登记人" prop="registrantId">
          <el-input v-model="form.registrantId" disabled placeholder="请输入"/>
          <el-input :value="match(form.registrantId)" v-model.number="form.registrantId" disabled placeholder="请输入"/>
        </el-form-item>
        <el-form-item label="登记日期" prop="registrationDate">
          <el-date-picker
@@ -112,7 +112,7 @@
      <template #footer>
        <div class="dialog-footer">
          <!-- é‡ç½®å’Œå–消 -->
          <el-button @click="handleClose" v-if="title.includes('新增')"
          <el-button @click="handleClose" v-if="title.includes('新增') || title.includes('查看')"
          >取消
          </el-button
          >
@@ -120,7 +120,7 @@
          >重置
          </el-button
          >
          <el-button type="primary" @click="handleSubmit">确认</el-button>
          <el-button type="primary" v-if="!isViewMode" @click="handleSubmit">确认</el-button>
        </div>
      </template>
    </el-dialog>
@@ -180,113 +180,95 @@
defineExpose({
  getDropdownData,
});
// æ•°å€¼æ ¼å¼åŒ–工具函数
const toFixed = (num, precision = 2) => {
  if (isNaN(num) || num === null || num === undefined || num === "") {
    return 0;
  }
  return (
      Math.floor(parseFloat(num) * Math.pow(10, precision)) /
      Math.pow(10, precision)
  );
  return Number((Math.floor(parseFloat(num) * Math.pow(10, precision)) / Math.pow(10, precision)).toFixed(precision));
};
// å«ç¨Žå•价计算
const unitPriceWithTax = computed(() => {
  const priceExcludingTax = parseFloat(form.value.priceExcludingTax) || 0;
  const taxRate = parseFloat(form.value.taxRate) || 0;
  if (!priceExcludingTax || !taxRate) {
    return 0;
  }
  const result = priceExcludingTax * (1 + taxRate / 100);
  return toFixed(result, 2);
});
// å«ç¨Žæ€»ä»·è®¡ç®—
const totalUnitPriceWithTax = computed(() => {
  const priceExcludingTax = parseFloat(form.value.priceExcludingTax) || 0;
  const taxRate = parseFloat(form.value.taxRate) || 0;
  const purchaseQuantity = parseFloat(form.value.purchaseQuantity) || 0;
// å®‰å…¨èŽ·å–æ•°å€¼
const safeNumber = (value) => {
  const num = parseFloat(value);
  return isNaN(num) ? 0 : num;
};
  if (!priceExcludingTax || !taxRate || !purchaseQuantity) {
    return 0;
  }
// è®¡ç®—逻辑 - åŸºäºŽå«ç¨Žå•价计算不含税价格
const calculatePrices = () => {
  const priceIncludingTax = safeNumber(form.value.priceIncludingTax); // å«ç¨Žå•ä»·
  const taxRate = safeNumber(form.value.taxRate); // ç¨Žçއ
  const quantity = safeNumber(form.value.purchaseQuantity); // é‡‡è´­æ•°é‡
  const unitPriceWithTaxValue = priceExcludingTax * (1 + taxRate / 100);
  const result = unitPriceWithTaxValue * purchaseQuantity;
  return toFixed(result, 2);
});
  // 1. æ ¹æ®å«ç¨Žå•价和税率计算不含税单价
  // ä¸å«ç¨Žå•ä»· = å«ç¨Žå•ä»· / (1 + ç¨Žçއ/100)
  const priceExcludingTax = priceIncludingTax && taxRate
    ? toFixed(priceIncludingTax / (1 + taxRate / 100), 2)
    : 0;
// ä¸å«ç¨Žæ€»ä»·è®¡ç®—
const taxExclusiveTotalPrice = computed(() => {
  const purchaseQuantity = parseFloat(form.value.purchaseQuantity) || 0;
  const priceExcludingTax = parseFloat(form.value.priceExcludingTax) || 0;
  // 2. è®¡ç®—不含税总价 = ä¸å«ç¨Žå•ä»· Ã— æ•°é‡
  const totalPriceExcludingTax = priceExcludingTax && quantity
    ? toFixed(priceExcludingTax * quantity, 2)
    : 0;
  if (!purchaseQuantity || !priceExcludingTax) {
    return 0;
  }
  // 3. è®¡ç®—含税总价 = å«ç¨Žå•ä»· Ã— æ•°é‡
  const totalPriceIncludingTax = priceIncludingTax && quantity
    ? toFixed(priceIncludingTax * quantity, 2)
    : 0;
  const result = purchaseQuantity * priceExcludingTax;
  return toFixed(result, 2);
});
  // æ›´æ–°è¡¨å•数据
  form.value.priceExcludingTax = priceExcludingTax;
  form.value.totalPriceExcludingTax = totalPriceExcludingTax;
  form.value.totalPriceIncludingTax = totalPriceIncludingTax;
};
// ç›‘听计算值变化,同步到 form å¯¹è±¡ä¸­
watch(unitPriceWithTax, (newValue) => {
  form.value.priceIncludingTax = newValue;
});
watch(totalUnitPriceWithTax, (newValue) => {
  form.value.totalPriceIncludingTax = newValue;
});
watch(taxExclusiveTotalPrice, (newValue) => {
  form.value.totalPriceExcludingTax = newValue;
});
// ç›‘听表单对象变化,用于处理编辑模式下的数据加载和实时计算
watch(
  () => [form.value.priceIncludingTax, form.value.taxRate, form.value.purchaseQuantity],
  () => {
    // é˜²æŠ–处理,避免频繁计算
    nextTick(() => {
      calculatePrices();
    });
  },
  { deep: true }
);
const userStore = useUserStore();
const userInfo = ref({});
// å¤„理税率输入框失焦,确保精度
const match = () => {
  return userInfo.value.nickName || "未知用户";
};
// å¤„理税率输入框失焦事件
const handleTaxRateBlur = () => {
  if (
      form.value.taxRate !== null &&
      form.value.taxRate !== undefined &&
      form.value.taxRate !== ""
  ) {
  if (form.value.taxRate !== null && form.value.taxRate !== undefined && form.value.taxRate !== "") {
    form.value.taxRate = toFixed(parseFloat(form.value.taxRate), 2);
    // watch ä¼šè‡ªåŠ¨è§¦å‘ calculatePrices,不需要手动调用
  }
};
// å¤„理不含税单价输入框失焦,确保精度
// å¤„理含税单价输入框失焦事件
const handlePriceBlur = () => {
  if (
      form.value.priceExcludingTax !== null &&
      form.value.priceExcludingTax !== undefined &&
      form.value.priceExcludingTax !== ""
  ) {
    form.value.priceExcludingTax = toFixed(
        parseFloat(form.value.priceExcludingTax),
        2
    );
  if (form.value.priceIncludingTax !== null && form.value.priceIncludingTax !== undefined && form.value.priceIncludingTax !== "") {
    form.value.priceIncludingTax = toFixed(parseFloat(form.value.priceIncludingTax), 2);
    // watch ä¼šè‡ªåŠ¨è§¦å‘ calculatePrices,不需要手动调用
  }
};
// å¤„理采购数量输入框失焦,确保精度
// å¤„理采购数量输入框失焦事件
const handleQuantityBlur = () => {
  if (
      form.value.purchaseQuantity !== null &&
      form.value.purchaseQuantity !== undefined &&
      form.value.purchaseQuantity !== ""
  ) {
    form.value.purchaseQuantity = toFixed(
        parseFloat(form.value.purchaseQuantity),
        3
    ); // æ•°é‡ä¿ç•™3位小数
  if (form.value.purchaseQuantity !== null && form.value.purchaseQuantity !== undefined && form.value.purchaseQuantity !== "") {
    form.value.purchaseQuantity = toFixed(parseFloat(form.value.purchaseQuantity), 3); // æ•°é‡ä¿ç•™3位小数
    // watch ä¼šè‡ªåŠ¨è§¦å‘ calculatePrices,不需要手动调用
  }
};
onMounted(async () => {
  let res = await userStore.getInfo();
  userInfo.value = res;
  getDropdownData()
  userInfo.value = res.user;
  await getDropdownData();
  // ç»„件加载完成后触发一次计算
  calculatePrices();
});
const rules = {
  supplierName: [
src/views/procureMent/index.vue
@@ -73,7 +73,9 @@
  purchaseRegistration,
  getSupplyList,
  getCoalInfoList,
  delPR
} from "@/api/procureMent";
import { useDelete } from "@/hooks/useDelete";
import useUserStore from "@/store/modules/user";
// å¼•入字典数据
@@ -194,6 +196,7 @@
    // è§¦å‘ref里面的方法
    return;
  }
  console.log(userInfo.value)
  // æ–°å»ºæ—¶åˆå§‹åŒ–表单
  form.value = {
    supplierName: "",
@@ -205,7 +208,7 @@
    priceIncludingTax: "",
    totalPriceIncludingTax: "",
    taxRate: "",
    registrantId: userInfo.value.userName,
    registrantId: userInfo.value.userId,
    registrationDate: new Date().toISOString().split("T")[0],
  };
  // æ–°å»ºæ—¶ä¹Ÿéœ€è¦è®¾ç½® copyForm ç”¨äºŽé‡ç½®åŠŸèƒ½
@@ -238,28 +241,15 @@
  addOrEdit.value = "viewRow";
  handleAddEdit();
};
const handleDelete = () => {
  if (selectedRows.value.length === 0) {
    ElMessage.warning("请选择要删除的数据");
    return;
  }
  ElMessageBox.confirm(`确定删除选中的数据吗?`, "提示", {
    confirmButtonText: "确定",
    cancelButtonText: "取消",
    type: "warning",
  })
    .then(() => {
      // æ¨¡æ‹Ÿåˆ é™¤æ“ä½œ
      tableData.value = tableData.value.filter(
        (item) => !selectedRows.value.includes(item)
      );
      total.value = tableData.value.length;
      ElMessage.success("删除成功");
    })
    .catch(() => {
      ElMessage.info("已取消删除");
    });
};
// ä½¿ç”¨åˆ é™¤ç»„合式函数 - ç®€åŒ–版本
const { handleDeleteBatch: handleDelete } = useDelete({
  deleteApi: delPR,
  selectedRows,
  tableData,
  total,
  confirmText: "确定删除选中的采购记录吗?",
  useLocalUpdate: true
});
const handleDeleteSuccess = (row) => {
  ElMessage.success("删除成功:" + row.supplierName);
};
src/views/production/components/ProductionDialog.vue
@@ -165,6 +165,7 @@
  getCoalInfoList,
  deleteProductionInventory,
} from "@/api/production/index.js";
import { getSupplyList } from "@/api/procureMent/index.js"
import {validateFormData, validateNumber, deepClone, createDefaultProductionRow} from "@/utils/production";
import {useCoalData} from "./useCoalData";
import useUserStore from "@/store/modules/user";
@@ -218,15 +219,13 @@
];
const formalDatabaseColumns = ref([
  {prop: "supplierName", label: "供应商名称", minwidth: 150
  // ,formatter: (row) => {
  //     console.log(row);
  //     return supplierList.value[row.supplierId] || "--";
  //   }
  {prop: "supplierId", label: "供应商名称", minwidth: 150
  ,formatter: (row) => {
      return supplierList.value.find(supplier => supplier.id === row.supplierId)?.supplierName || "--";
    }
  },
  {prop: "coalId", label: "煤种", minwidth: 60,
    formatter: (row) => {
      // return coalList.value[row.coalId].coal || "--";
      return coalList.value.find(coal => coal.id === row.coalId)?.coal || "--";
    }
  },
@@ -251,12 +250,13 @@
// èŽ·å–é…ç½®æ•°æ®
const handlData = async () => {
  innerVisible.value = true;
  let getSupplier = await getOfficialAll();
  let OfficialAll = await getOfficialAll();
  let getSupplierList = await getSupplyList();
  let getCoalName = await getCoalInfoList();
  coalList.value = getCoalName.data || [];
  supplierList.value = getSupplier.data || [];
  if (getSupplier.code === 200) {
    formalDatabaseData.value = getSupplier.data;
  supplierList.value = getSupplierList.data || [];
  if (OfficialAll.code === 200) {
    formalDatabaseData.value = OfficialAll.data;
    const existingOfficialIds = tableData.value
        .map((item) => item.officialId)
        .filter((id) => id);
src/views/production/index.vue
@@ -1,5 +1,5 @@
<template>
  <div>
  <div class="app-container">
    <!-- æœç´¢è¡¨å• -->
    <el-form :inline="true" :model="queryParams" class="search-form">
      <el-form-item label="搜索">
@@ -216,7 +216,7 @@
.search-form {
  display: flex;
  justify-content: space-between;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 20px;
src/views/warehouseManagement/index.vue
@@ -134,8 +134,8 @@
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="煤质方案" prop="qualityPlan">
              <el-select v-model="form.qualityPlan" placeholder="请选择" @change="coalPlanByIdList" clearable>
            <el-form-item label="煤质方案" prop="coalPlanId">
              <el-select v-model="form.coalPlanId" placeholder="请选择" @change="coalPlanByIdList" clearable>
                <el-option
                    v-for="dict in qualityPlanOption"
                    :key="dict.id"
@@ -163,7 +163,7 @@
      </template>
    </el-dialog>
    <!-- åˆå¹¶æ•°æ®å¼¹æ¡† -->
    <el-dialog title="合并库存" v-model="mergeVisible" width="800px">
    <el-dialog :title="operationType.value === 'edit' ? '编辑库存' : '合并库存'" v-model="mergeVisible" width="800px">
      <el-form :model="mergeForm" :rules="mergeRules" ref="mergeRef" label-width="100px">
        <el-row>
          <el-col :span="12">
@@ -214,6 +214,20 @@
          <el-col :span="12">
            <el-form-item label="总价(不含税)" prop="totalPriceExcludingTax">
              <el-input v-model="mergeForm.totalPriceExcludingTax" placeholder="请输入总价(不含税)" maxlength="30" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="煤质方案" prop="coalPlanId">
              <el-select v-model="mergeForm.coalPlanId" placeholder="请选择" @change="coalPlanByIdList" clearable>
                <el-option
                    v-for="dict in qualityPlanOption"
                    :key="dict.id"
                    :label="dict.plan"
                    :value="dict.id"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
@@ -279,7 +293,7 @@
    totalPriceIncludingTax: '',
    priceExcludingTax: '',
    totalPriceExcludingTax: '',
    qualityPlan: '',
    coalPlanId: '',
    pId: '',
  },
  mergeForm: {
@@ -291,20 +305,20 @@
    totalPriceIncludingTax: '',
    priceExcludingTax: '',
    totalPriceExcludingTax: '',
    qualityPlan: '',
    coalPlanId: '',
    pId: '',
  },
  rules: {
    supplierName: [{ required: true, message: "请输入供应商名称", trigger: "blur" }],
    coal: [{ required: true, message: "请输入煤种", trigger: "blur" }],
    unit: [{ required: true, message: "请输入单位", trigger: "blur" }],
    qualityPlan: [{ required: true, message: "请选择", trigger: "change" }],
    coalPlanId: [{ required: true, message: "请选择", trigger: "change" }],
  },
  mergeRules: {
    supplierName: [{ required: true, message: "请输入供应商名称", trigger: "blur" }],
    coal: [{ required: true, message: "请输入煤种", trigger: "blur" }],
    unit: [{ required: true, message: "请输入单位", trigger: "blur" }],
    qualityPlan: [{ required: true, message: "请选择", trigger: "change" }],
    coalPlanId: [{ required: true, message: "请选择", trigger: "change" }],
  }
})
@@ -455,7 +469,8 @@
}
// åˆå¹¶åº“存数据方法
const mergeRows = (type,row) => {
  coalFieldListOption();
  getDropdownData()
  coalPlanListOptions()
  mergeVisible.value = true;
  operationType.value = type;
  if (type === 'edit') {