CD配唱片
2025-04-24 8bea44fb459b8fcb3e0897924424971441ae4ae9
提交钣金计划大表所有
已修改3个文件
已删除1个文件
269 ■■■■■ 文件已修改
src/api/ApsPlateProcessShopStat/ApsPlateProcessShopStat.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mainPlan/apsPlatePlanList.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/platePlanList/index.vue 215 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/ApsPlateProcessShopStat/ApsPlateProcessShopStat.js
ÎļþÒÑɾ³ý
src/api/mainPlan/apsPlatePlanList.js
@@ -8,7 +8,13 @@
    params: query
  })
}
// æ›´æ–°
export function listApsPlateProcessShopStatUpdate() {
  return request({
    url: '/aps/plateProcessShopStat/update',
    method: 'post'
  })
}
// // æŸ¥è¯¢é’£é‡‘车间统计详细
// export function getApsPlateProcessShopStat(id) {
//   return request({
src/utils/request.js
@@ -17,7 +17,7 @@
  // axios中请求配置有baseURL选项,表示请求URL公共部分
  baseURL: import.meta.env.VITE_APP_BASE_API,
  // è¶…æ—¶
  timeout: 10000
  timeout: 1000000
})
src/views/mainPlan/platePlanList/index.vue
@@ -1,6 +1,6 @@
<template>
  <div class="app-container">
    <el-row :gutter="20">
    <!-- <el-row :gutter="20">
      <el-col>
        <el-form
          :model="queryParams"
@@ -31,7 +31,7 @@
          </el-row>
        </el-form>
      </el-col>
    </el-row>
    </el-row> -->
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
@@ -111,8 +111,7 @@
</template>
<script setup name="Aps_plate_process_stat">
import { listPlateStat, updateStat } from "@/api/mainPlan/plateProcessStat";
import { listApsPlateProcessShopStat } from "@/api/mainPlan/apsPlatePlanList";
import { listApsPlateProcessShopStat, listApsPlateProcessShopStatUpdate } from "@/api/mainPlan/apsPlatePlanList";
import HxlhTable from "@/components/HxlhTable/index.vue";
import { getToken } from "@/utils/auth";
import { nextTick, onMounted, ref } from "vue";
@@ -132,24 +131,24 @@
const height = ref(document.documentElement.clientHeight - 270 + "px;");
const columnsVersion = ref(0);
const data = reactive({
  form: {},
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    workOrderNo: null,
    processName: null,
    num: null,
    routeProcessNumber: null,
    currentProcessNumber: null,
    productionQuantity: null,
    standardTime: null,
    processTotalTime: null,
    processPlanEndDay: null,
    computePlanEndDay: null,
    designTimes: null,
    batchNumber: null,
  },
  rules: {},
  // form: {},
  // queryParams: {
  //   pageNum: 1,
  //   pageSize: 10,
  //   workOrderNo: null,
  //   processName: null,
  //   num: null,
  //   routeProcessNumber: null,
  //   currentProcessNumber: null,
  //   productionQuantity: null,
  //   standardTime: null,
  //   processTotalTime: null,
  //   processPlanEndDay: null,
  //   computePlanEndDay: null,
  //   designTimes: null,
  //   batchNumber: null,
  // },
  // rules: {},
});
const xGrid = ref();
const { queryParams, form, rules } = toRefs(data);
@@ -232,7 +231,7 @@
/** æŸ¥è¯¢é’£é‡‘统计列表 */
async function getList() {
  loading.value = true;
  const response = await listApsPlateProcessShopStat(queryParams.value);
  const response = await listApsPlateProcessShopStat();
  const listValue = response.data;
  const resData = listValue.map((item,index)=>{
    item.deptPlans.map((n, i) => {
@@ -298,72 +297,69 @@
    },
  ]);
  await nextTick();
  console.log(xGrid.value, "llll");
  columns.value = [...columns.value, ...newArray];              // å¼ºåˆ¶ç»„件重新渲染
  
}
function generateColumnDynamic() {}
// å–消按钮
function cancel() {
  open.value = false;
  reset();
}
// // å–消按钮
// function cancel() {
//   open.value = false;
//   reset();
// }
// è¡¨å•重置
function reset() {
  form.value = {
    id: null,
    workOrderNo: null,
    processName: null,
    num: null,
    routeProcessNumber: null,
    currentProcessNumber: null,
    productionQuantity: null,
    standardTime: null,
    processTotalTime: null,
    processPlanEndDay: null,
    computePlanEndDay: null,
    designTimes: null,
    batchNumber: null,
    createBy: null,
    delFlag: null,
  };
  proxy.resetForm("aps_plate_process_statRef");
}
// // è¡¨å•重置
// function reset() {
//   form.value = {
//     id: null,
//     workOrderNo: null,
//     processName: null,
//     num: null,
//     routeProcessNumber: null,
//     currentProcessNumber: null,
//     productionQuantity: null,
//     standardTime: null,
//     processTotalTime: null,
//     processPlanEndDay: null,
//     computePlanEndDay: null,
//     designTimes: null,
//     batchNumber: null,
//     createBy: null,
//     delFlag: null,
//   };
//   proxy.resetForm("aps_plate_process_statRef");
// }
/** æœç´¢æŒ‰é’®æ“ä½œ */
function handleQuery() {
  queryParams.value.pageNum = 1;
  getList();
}
// /** æœç´¢æŒ‰é’®æ“ä½œ */
// function handleQuery() {
//   queryParams.value.pageNum = 1;
//   getList();
// }
/** é‡ç½®æŒ‰é’®æ“ä½œ */
function resetQuery() {
  queryParams.value.workOrderNo = "";
  proxy.resetForm("queryRef");
  handleQuery();
}
// function resetQuery() {
//   queryParams.value.workOrderNo = "";
//   proxy.resetForm("queryRef");
//   handleQuery();
// }
// å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
function handleSelectionChange(selection) {
  ids.value = selection.map((item) => item.id);
  single.value = selection.length != 1;
  multiple.value = !selection.length;
}
// function handleSelectionChange(selection) {
//   ids.value = selection.map((item) => item.id);
//   single.value = selection.length != 1;
//   multiple.value = !selection.length;
// }
/** æ–°å¢žæŒ‰é’®æ“ä½œ */
function handleAdd() {
  reset();
  open.value = true;
  title.value = "添加钣金统计";
}
// /** æ–°å¢žæŒ‰é’®æ“ä½œ */
// function handleAdd() {
//   reset();
//   open.value = true;
//   title.value = "添加钣金统计";
// }
/** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
function handleUpdate(row) {
  reset();
  updateStat().then((response) => {
    form.value = response.data;
  listApsPlateProcessShopStatUpdate().then((response) => {
    // form.value = response.data;
    ElMessage({
      message: "数据更新成功",
      type: "success",
@@ -371,76 +367,17 @@
    getList();
  });
}
/** æäº¤æŒ‰é’® */
function submitForm() {
  proxy.$refs["aps_plate_process_statRef"].validate((valid) => {
    if (valid) {
      if (form.value.id != null) {
        updateAps_plate_process_stat(form.value).then((response) => {
          proxy.$modal.msgSuccess("修改成功");
          open.value = false;
          getList();
        });
      } else {
        addAps_plate_process_stat(form.value).then((response) => {
          proxy.$modal.msgSuccess("新增成功");
          open.value = false;
          getList();
        });
      }
    }
  });
}
/** åˆ é™¤æŒ‰é’®æ“ä½œ */
function handleDelete(row) {
  const _ids = row.id || ids.value;
  proxy.$modal
    .confirm('是否确认删除钣金统计编号为"' + _ids + '"的数据项?')
    .then(function () {
      return delAps_plate_process_stat(_ids);
    })
    .then(() => {
      getList();
      proxy.$modal.msgSuccess("删除成功");
    })
    .catch(() => {});
}
/** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
function handleExport() {
  proxy.download(
    "/aps/plateProcessStat/export",
    {
      ...queryParams.value,
    },
    "/aps/plateProcessShopStat/export",
    // {
    //   ...queryParams.value,
    // },
    `aps_plate_process_stat_${new Date().getTime()}.xlsx`
  );
}
const headerCellClassName = ({ column }) => {
  if (column.field === "name") {
    return "col-blue";
  }
  return null;
};
const rowClassName = ({ rowIndex }) => {
  if ([2, 3, 5].includes(rowIndex)) {
    return "row-green";
  }
  return null;
};
const cellClassName = ({ row, column }) => {
  if (
    column.field === "processPlanStartDay" ||
    column.field === "processPlanEndDay"
  ) {
    if (row.warning) {
      return "col-orange";
    }
  }
  return null;
};
onMounted(async () => {
  getList();
});