Quellcode durchsuchen

Merge remote-tracking branch 'origin/xf_dev' into xf_dev

lupeng vor 11 Monaten
Ursprung
Commit
8b04148d80

+ 1 - 1
.env.development

@@ -11,7 +11,7 @@ VITE_APP_BASE_API = '/dev-api'
 VITE_APP_UPLOAD_URL = 'http://192.168.101.4:9000'
 # 开发接口地址
 # VITE_APP_API_URL = 'http://192.168.101.4:8078'
-VITE_APP_API_URL = 'http://121.41.179.41:8079'
+VITE_APP_API_URL = 'http://192.168.101.4:8078'
 #  VITE_APP_API_URL = 'http://121.41.179.41:8078'  #lup
 #VITE_APP_API_URL = 'http://192.168.101.64:8078'  #hetao
 

+ 1 - 0
.gitignore

@@ -17,3 +17,4 @@ package-lock.json
 pnpm-lock.yaml
 stats.html
 /docker/.run
+/.vite/deps_temp_327c80ff

+ 84 - 1
index.html

@@ -59,9 +59,92 @@
     }
     /* 甘特图样式控制 */
     .gantt_task_line {
-      border-radius: 15px !important;
+      border-radius: 20px !important;
       border: 0px solid black;
     }
+    .gantt_tooltip {
+      font-size: 15px;
+      font-weight: 300;
+    }
+    .gantt_tree_content {
+      font-size: 15px !important;
+    }
+    .gantt_grid_data {
+      background-color: rgba(0, 0, 0, 0.1);
+      .gantt_row_task {
+        background-color: rgba(0, 0, 0, 0.1) !important;
+      }
+      .odd {
+        background-color: rgba(0, 0, 0, 0.2) !important;
+      }
+      .gantt_row:hover {
+        background-color: rgba(0, 0, 0, 0.4) !important;
+      }
+      .gantt_selected {
+        background-color: rgb(123, 123, 123) !important;
+      }
+    }
+    .gantt_task {
+      .gantt_selected {
+        background-color: rgb(123, 123, 123);
+        .gantt_task_cell {
+          border-color: white;
+        }
+      }
+    }
+    .gantt_data_area {
+      background-color: rgba(0, 0, 0, 0.1);
+      .gantt_task_cell {
+        background-color: rgba(0, 0, 0, 0.1);
+        border-color: white;
+      }
+    }
+    .year {
+      background: #ffcc00;
+      color: #fff !important;
+      font-size: 16px;
+    }
+    .month {
+      background: #66ccff;
+      color: #fff !important;
+      font-size: 16px;
+    }
+    .day {
+      background: #abe4ff;
+      color: #fff !important;
+      font-size: 16px;
+    }
+    .hour {
+      background: #0bb051;
+      color: #fff !important;
+      font-size: 16px;
+    }
+    .gantt_grid_head_cell {
+      font-size: 16px;
+      color: white !important;
+      font-weight: 600;
+      border: 1px solid rgb(206, 206, 206);
+      background-color: rgb(48, 65, 86, 0.6);
+    }
+
+    /* 滚动条样式 */
+    ::-webkit-scrollbar {
+      width: 6px !important; /* 设置滚动条的宽度 */
+    }
+
+    ::-webkit-scrollbar-track {
+      background-color: #f0f2f5; /* 滚动条轨道的背景色 */
+    }
+
+    ::-webkit-scrollbar-thumb {
+      background-color: #90939960; /* 滚动条的颜色 */
+      border-radius: 8px !important; /* 滚动条的圆角 */
+    }
+
+    ::-webkit-scrollbar-thumb:hover {
+      background-color: #5a5e66; /* 滚动条hover时的颜色 */
+    }
+
     @keyframes l19 {
       100% {
         transform: rotate(360deg);

+ 3 - 0
src/hooks/userCrud.ts

@@ -45,6 +45,7 @@ export const useCrud = (config?: UseCrudConfig) => {
     tip: false, //选中的提示
   });
   const data = ref<any>([]); //表格数据
+  const lines = ref<any>([]); //产线
   const form = ref({}); //新增或者编辑弹出的表单绑定值
   /** 表格顶部搜索的表单的变量 v-model */
   const search = ref({});
@@ -123,6 +124,7 @@ export const useCrud = (config?: UseCrudConfig) => {
             page.value.total = res?.data?.length || 0;
           } else {
             data.value = res?.data?.records || [];
+            lines.value = res?.data?.productLines || [];
             page.value.total = res?.data?.totalCount || 0;
           }
         }
@@ -391,6 +393,7 @@ export const useCrud = (config?: UseCrudConfig) => {
     url,
     option,
     data,
+    lines,
     form,
     search,
     page,

+ 4 - 1
src/layout/components/NavBar/components/NavbarRight.vue

@@ -147,8 +147,11 @@ const dialog = reactive({
   state: "0",
 });
 const clickItem =(row) =>{
+  if(row.msgId === '3'){
+    window.open("/quality/faultHandle",'_blank')
+  }
   if(row.msgId === '4'){
-    window.open("/#/outsource",'_blank')
+    window.open("/outsource",'_blank')
   }
 }
 const openMessageDialog = () => {

+ 16 - 0
src/views/base/craftManagement/route/bindConfig.ts

@@ -135,6 +135,22 @@ export const formOption = {
       value: 0,
     },
     {
+      label: "是否互检",
+      prop: "mutualInspection",
+      span: 24,
+      type: "switch",
+      dicData: switchOp,
+      value: 0,
+    },
+    {
+      label: "是否专检",
+      prop: "specialInspection",
+      span: 24,
+      type: "switch",
+      dicData: switchOp,
+      value: 0,
+    },
+    {
       label: "是否巡检",
       prop: "inspection",
       span: 24,

+ 14 - 0
src/views/plan/order/components/order-page.vue

@@ -102,6 +102,20 @@ option.value = Object.assign(option.value, {
       prop: "materialModel",
     },
     {
+      label: "订单数量",
+      prop: "orderNum",
+      type: "number",
+      width: "100",
+      min: 1,
+      max: 99999,
+    },
+    {
+      label: "排产数量",
+      prop: "scheduledNum",
+      width: "100",
+      display: false,
+    },
+    {
       label: "产品版本",
       width: 130,
       overHidden: true,

+ 1 - 1
src/views/pro/traceability/components/traceabilityCom.vue

@@ -47,7 +47,7 @@ const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
 
 const refreshTra = (row) => {
-  commonConfig.value.params = { seqNo: row.seqNo };
+  commonConfig.value.params = { seqNo: row.seqNo,workOrderCode: row.workOrderCode };
   dataList();
 };
 defineExpose({ refreshTra });

+ 1 - 1
src/views/quality/faultHandle/components/fault-page.vue

@@ -67,7 +67,7 @@
         <el-checkbox v-model="row.isScrap" label="报废" size="small" value=true border @click="checkScrap(row)"/>
       </template>
       <template #processInfo="{row,index,type}">
-        <el-select v-model="value[row.$index]" placeholder="请选择" @click="getFaults(row)" @change="listData(row)">
+        <el-select v-model="value[row.$index]" placeholder="请选择" @click="getFaults(row)" @change="listData(row)" :disabled="row.enabled">
           <el-option
             v-for="item in optionFault[row.$index]"
             :key="item.value"

+ 102 - 43
src/views/report/productionScheduling/line/index.vue

@@ -7,8 +7,8 @@
       @search-reset="resetChange"
     />
     <div class="btns">
-      <el-button type="params" @click="exportToPNG">导出PNG图片</el-button>
-      <el-button type="params" @click="exportToPDF">导出PDF文件</el-button>
+      <el-button type="primary" @click="exportToPNG">导出PNG图片</el-button>
+      <el-button type="primary" @click="exportToPDF">导出PDF文件</el-button>
       <!-- <el-button type="params" v-print="printObj" @click="toPrint"
         >打印</el-button
       > -->
@@ -25,12 +25,22 @@ import "dhtmlx-gantt/codebase/dhtmlxgantt.css";
 import html2canvas from "html2canvas";
 import { htmlPdf } from "@/utils/htmlPDF.js";
 import { useCrud } from "@/hooks/userCrud";
+import { v4 as uuidv4 } from "uuid";
 const ganttRef = ref(null);
-const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
-  useCrud({
-    src: "/api/v1/process/census/productLineApsResultGant",
-    pageStr: "no",
-  });
+const {
+  form,
+  data,
+  option,
+  search,
+  page,
+  toDeleteIds,
+  Methords,
+  Utils,
+  lines,
+} = useCrud({
+  src: "/api/v1/process/census/productLineApsResultGant",
+  pageStr: "no",
+});
 const exportToPDF = () => {
   var fileName = "甘特图pdf";
   const fileList = document.getElementsByClassName("gantt_here");
@@ -190,7 +200,7 @@ const initGantt = (type) => {
   });
   gantt.templates.task_text = function (start, end, task) {
     return (
-      "<span style='padding:0 5px;color: #000; display: inline-block;width: 100%; white-space: nowrap;overflow: hidden; text-overflow: ellipsis; '>" +
+      "<span style='padding:0 5px;font-size:15px;color: #000; display: inline-block;width: 100%; white-space: nowrap;overflow: hidden; text-overflow: ellipsis; '>" +
       task.text +
       "</span>"
     );
@@ -217,41 +227,23 @@ const initGantt = (type) => {
     {
       tree: true,
       name: "text",
-      label: "订单名称",
+      label: "产线名称",
       width: "240",
     },
-    {
-      name: "startTime",
-      label: "开始时间",
-      align: "center",
-      width: "160",
-      template(task) {
-        return task.startTime;
-      },
-    },
-    {
-      name: "endTime",
-      label: "结束时间",
-      align: "center",
-      width: "160",
-      template(task) {
-        return task.endTime;
-      },
-    },
   ];
   gantt.config.autofit = true;
   gantt.config.resize_rows = true;
-  gantt.config.row_height = 40;
-  gantt.config.bar_height = 30;
+  gantt.config.row_height = 60;
+  gantt.config.bar_height = 40;
   gantt.config.min_column_width = 60;
   gantt.config.xml_date = "%Y-%m-%d %H:%i:%s"; //甘特图时间格式
   gantt.config.readonly = true; //是否只读
   gantt.i18n.setLocale("cn"); //设置语言
   gantt.templates.tooltip_text = function (start, end, task) {
-    const text = `名称: ${task.text}<br/>总数: ${task.num}<br/>完成进度: ${task.progress * 100}%`;
-    return !task.parent
-      ? `${text}<br/>交期时间: ${task.deliverWhen}`
-      : `${text}<br/>计划开始时间: ${task.startTime}<br/>计划结束时间: ${task.endTime}`; // eslint-disable-line
+    const text = `产线名称: ${task.name}`;
+    return task.parent
+      ? `名称: ${task.text}<br/>完成进度: ${task.progress * 100}%<br/>计划开始时间: ${task.startTime}<br/>计划结束时间: ${task.endTime}`
+      : `${text}<br/>`;
   };
   const dateToStr = gantt.date.date_to_str(gantt.config.task_date);
   const today = new Date(new Date().setHours(0, 0, 0, 0));
@@ -301,6 +293,7 @@ function convertDateString2(str) {
 //   gantt.parse(demoData);
 // });
 const setGantt = () => {
+  gantt.clearAll();
   if (search?.value.searchTime) {
     gantt.config.start_date = convertDateString1(search?.value.searchTime[0]);
     gantt.config.end_date = convertDateString2(search?.value.searchTime[1]);
@@ -311,17 +304,37 @@ const setGantt = () => {
       gantt.config.duration_unit = "hour";
       gantt.config.scale_height = 28 * 4;
       gantt.config.scales = [
-        { unit: "year", step: 1, format: "%Y年" },
-        { unit: "month", step: 1, format: "%m月" },
+        {
+          unit: "year",
+          step: 1,
+          format: "%Y年",
+          css: function (date) {
+            return "year";
+          },
+        },
+        {
+          unit: "month",
+          step: 1,
+          format: "%m月",
+          css: function (date) {
+            return "month";
+          },
+        },
         {
           unit: "day",
           step: 1,
           format: "%d日",
+          css: function (date) {
+            return "day";
+          },
         },
         {
           unit: "hour",
           step: 1,
           format: "%H时",
+          css: function (date) {
+            return "hour";
+          },
         },
       ];
       gantt.init("gantt_here");
@@ -331,12 +344,29 @@ const setGantt = () => {
     case "1":
       gantt.config.scale_height = 28 * 4;
       gantt.config.scales = [
-        { unit: "year", step: 1, format: "%Y年" },
-        { unit: "month", step: 1, format: "%m月" },
+        {
+          unit: "year",
+          step: 1,
+          format: "%Y年",
+          css: function (date) {
+            return "year";
+          },
+        },
+        {
+          unit: "month",
+          step: 1,
+          format: "%m月",
+          css: function (date) {
+            return "month";
+          },
+        },
         {
           unit: "day",
           step: 1,
           format: "%d日",
+          css: function (date) {
+            return "day";
+          },
         },
       ];
       gantt.config.duration_unit = "day";
@@ -349,8 +379,22 @@ const setGantt = () => {
       // initGantt("month");
       gantt.config.scale_height = 28 * 4;
       gantt.config.scales = [
-        { unit: "year", step: 1, format: "%Y年" },
-        { unit: "month", step: 1, format: "%m月" },
+        {
+          unit: "year",
+          step: 1,
+          format: "%Y年",
+          css: function (date) {
+            return "year";
+          },
+        },
+        {
+          unit: "month",
+          step: 1,
+          format: "%m月",
+          css: function (date) {
+            return "month";
+          },
+        },
       ];
       gantt.config.duration_unit = "month";
       gantt.init("gantt_here");
@@ -360,8 +404,11 @@ const setGantt = () => {
   }
 };
 const useData = ref([]);
-const setUseData = (data) => {
-  const data1 = [...data];
+const setUseData = (data, lines) => {
+  useData.value = [];
+  const reslinedata = ref([]);
+  const data1 = JSON.parse(JSON.stringify(data));
+  const line1 = JSON.parse(JSON.stringify(lines));
   data1.forEach((element) => {
     element.start_date = element.startTime;
     if (element.progress != 1) {
@@ -369,9 +416,21 @@ const setUseData = (data) => {
     } else {
       element.color = "green";
     }
+    element.id = uuidv4();
+    element.parent = element.productLineId;
   });
   const data2 = JSON.parse(JSON.stringify(data1));
-  useData.value = data2;
+  line1.forEach((element) => {
+    let obj = {};
+    obj.id = element.productLineId;
+    obj.name = element.productLineName;
+    obj.text = element.productLineName;
+    obj.render = "split";
+    reslinedata.value.push(obj);
+  });
+  const data3 = JSON.parse(JSON.stringify(reslinedata.value));
+  const data4 = [...data3, ...data2];
+  useData.value = data4;
 };
 onMounted(() => {
   setTime();
@@ -382,7 +441,7 @@ watch(
   () => data.value,
   () => {
     if (data.value) {
-      setUseData(data.value);
+      setUseData(data.value, lines.value);
       setGantt();
     }
   },

+ 66 - 13
src/views/report/productionScheduling/order/index.vue

@@ -7,8 +7,8 @@
       @search-reset="resetChange"
     />
     <div class="btns">
-      <el-button type="params" @click="exportToPNG">导出PNG图片</el-button>
-      <el-button type="params" @click="exportToPDF">导出PDF文件</el-button>
+      <el-button type="primary" @click="exportToPNG">导出PNG图片</el-button>
+      <el-button type="primary" @click="exportToPDF">导出PDF文件</el-button>
       <!-- <el-button type="params" v-print="printObj" @click="toPrint"
         >打印</el-button
       > -->
@@ -188,9 +188,10 @@ const initGantt = (type) => {
     critical_path: true,
     export_api: true,
   });
+
   gantt.templates.task_text = function (start, end, task) {
     return (
-      "<span style='padding:0 5px;color: #000; display: inline-block;width: 100%; white-space: nowrap;overflow: hidden; text-overflow: ellipsis; '>" +
+      "<span style='padding:0 5px;font-size:15px;color: #000; display: inline-block;width: 100%; white-space: nowrap;overflow: hidden; text-overflow: ellipsis; '>" +
       task.text +
       "</span>"
     );
@@ -212,7 +213,7 @@ const initGantt = (type) => {
   gantt.config.grid_width = 350;
   gantt.config.add_column = false;
   gantt.config.duration_step = 1;
-  gantt.config.drag_resize = true;
+  gantt.config.resize_rows = true;
   gantt.config.columns = [
     {
       tree: true,
@@ -241,8 +242,8 @@ const initGantt = (type) => {
   ];
   gantt.config.autofit = true;
   gantt.config.resize_rows = true;
-  gantt.config.row_height = 40;
-  gantt.config.bar_height = 30;
+  gantt.config.row_height = 60;
+  gantt.config.bar_height = 40;
   gantt.config.min_column_width = 60;
   gantt.config.xml_date = "%Y-%m-%d %H:%i:%s"; //甘特图时间格式
   gantt.config.readonly = true; //是否只读
@@ -301,6 +302,7 @@ function convertDateString2(str) {
 //   gantt.parse(demoData);
 // });
 const setGantt = () => {
+  gantt.clearAll();
   if (search?.value.searchTime) {
     gantt.config.start_date = convertDateString1(search?.value.searchTime[0]);
     gantt.config.end_date = convertDateString2(search?.value.searchTime[1]);
@@ -311,17 +313,37 @@ const setGantt = () => {
       gantt.config.duration_unit = "hour";
       gantt.config.scale_height = 28 * 4;
       gantt.config.scales = [
-        { unit: "year", step: 1, format: "%Y年" },
-        { unit: "month", step: 1, format: "%m月" },
+        {
+          unit: "year",
+          step: 1,
+          format: "%Y年",
+          css: function (date) {
+            return "year";
+          },
+        },
+        {
+          unit: "month",
+          step: 1,
+          format: "%m月",
+          css: function (date) {
+            return "month";
+          },
+        },
         {
           unit: "day",
           step: 1,
           format: "%d日",
+          css: function (date) {
+            return "day";
+          },
         },
         {
           unit: "hour",
           step: 1,
           format: "%H时",
+          css: function (date) {
+            return "hour";
+          },
         },
       ];
       gantt.init("gantt_here");
@@ -331,16 +353,32 @@ const setGantt = () => {
     case "1":
       gantt.config.scale_height = 28 * 4;
       gantt.config.scales = [
-        { unit: "year", step: 1, format: "%Y年" },
-        { unit: "month", step: 1, format: "%m月" },
+        {
+          unit: "year",
+          step: 1,
+          format: "%Y年",
+          css: function (date) {
+            return "year";
+          },
+        },
+        {
+          unit: "month",
+          step: 1,
+          format: "%m月",
+          css: function (date) {
+            return "month";
+          },
+        },
         {
           unit: "day",
           step: 1,
           format: "%d日",
+          css: function (date) {
+            return "day";
+          },
         },
       ];
       gantt.config.duration_unit = "day";
-
       gantt.init("gantt_here");
       gantt.render();
       gantt.parse({ data: useData.value });
@@ -349,8 +387,22 @@ const setGantt = () => {
       // initGantt("month");
       gantt.config.scale_height = 28 * 4;
       gantt.config.scales = [
-        { unit: "year", step: 1, format: "%Y年" },
-        { unit: "month", step: 1, format: "%m月" },
+        {
+          unit: "year",
+          step: 1,
+          format: "%Y年",
+          css: function (date) {
+            return "year";
+          },
+        },
+        {
+          unit: "month",
+          step: 1,
+          format: "%m月",
+          css: function (date) {
+            return "month";
+          },
+        },
       ];
       gantt.config.duration_unit = "month";
       gantt.init("gantt_here");
@@ -361,6 +413,7 @@ const setGantt = () => {
 };
 const useData = ref([]);
 const setUseData = (data) => {
+  useData.value = [];
   const data1 = [...data];
   data1.forEach((element) => {
     element.start_date = element.startTime;