瀏覽代碼

1.生产排产首页。

jiaxiaoqiang 1 年之前
父節點
當前提交
10cc3ab1f5
共有 2 個文件被更改,包括 152 次插入4 次删除
  1. 7 4
      src/common/configs/dictDataUtil.ts
  2. 145 0
      src/views/plan/schedule/index.vue

+ 7 - 4
src/common/configs/dictDataUtil.ts

@@ -4,8 +4,9 @@ const DictDataUtil = {
   request_url:
     import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/dictData/queryByType/",
   dept_tree_url: import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/dept/orgTree",
-  dept_list_url:import.meta.env.VITE_APP_BASE_API+"/api/v1/sys/dept/parent/list",
-  post_list_url:import.meta.env.VITE_APP_BASE_API+"/api/v1/sys/post/list",
+  dept_list_url:
+    import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/dept/parent/list",
+  post_list_url: import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/post/list",
 
   TYPE_CODE: {
     //订单类型
@@ -26,8 +27,8 @@ const DictDataUtil = {
     device_maintenance_cycle: "device_maintenance_cycle",
     // 工艺路线类型
     routing_type: "routing_type",
-	//缺陷管理
-	defect_mana: "defect_mana",
+    //缺陷管理
+    defect_mana: "defect_mana",
     //封装方法
     packaging_method: "packaging_method",
     //岗位组
@@ -52,6 +53,8 @@ const DictDataUtil = {
     prepare_data_file: "prepare_data_file",
     //生产准备-工艺文件
     prepare_craft_file: "prepare_craft_file",
+    //   生产计划-工位任务状态
+    station_task_state: "station_task_state",
   },
   EXPAND_FIELD_TABLE: {
     //字段类型

+ 145 - 0
src/views/plan/schedule/index.vue

@@ -0,0 +1,145 @@
+<template>
+  <div class="mainContentBox">
+    <avue-crud
+      ref="crudRef"
+      v-model:search="search"
+      v-model="form"
+      :data="data"
+      :option="option"
+      v-model:page="page"
+      @row-save="createRow"
+      @row-update="updateRow"
+      @row-del="deleteRow"
+      @search-change="searchChange"
+      @search-reset="resetChange"
+      @size-change="dataList"
+      @current-change="dataList"
+      @selection-change="selectionChange"
+    >
+      <template #menu-left="{ size }">
+        <div id="charts"></div>
+      </template>
+    </avue-crud>
+  </div>
+</template>
+<script setup>
+import { ref } from "vue";
+import { useCrud } from "@/hooks/userCrud";
+import dictDataUtil from "@/common/configs/dictDataUtil";
+
+import { useDictionaryStoreHook } from "@/store";
+
+// 数据字典相关
+const { dicts } = useDictionaryStoreHook();
+
+// 传入一个url,后面不带/
+const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
+  useCrud({
+    src: "/api/v1/plan/task",
+  });
+const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
+  Methords; //增删改查
+const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
+const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
+
+const crudRef = ref(null); //crudRef.value 获取avue-crud对象
+
+onMounted(() => {
+  dataList();
+});
+
+// 设置表格列或者其他自定义的option
+option.value = Object.assign(option.value, {
+  selection: true,
+  menu: false,
+  addBtn: false,
+  filterBtn: false,
+  searchShowBtn: false,
+  columnBtn: false,
+  gridBtn: false,
+  column: [
+    {
+      label: "序列号",
+      prop: "seqNo",
+      search: true,
+    },
+    {
+      label: "工位名称",
+      prop: "stationName",
+      search: true,
+    },
+    {
+      label: "工单编码",
+      prop: "workOrderCode",
+      search: true,
+    },
+    {
+      label: "工单名称",
+      prop: "workOrderName",
+    },
+    {
+      label: "产线编码",
+      prop: "productLineCode",
+      search: true,
+    },
+    {
+      label: "产线名称",
+      prop: "productLineName",
+    },
+    {
+      label: "工艺路线名称",
+      prop: "routeName",
+    },
+    {
+      label: "物料编号",
+      prop: "materialCode",
+      search: true,
+    },
+    {
+      label: "工单名称",
+      prop: "workOrderName",
+    },
+    {
+      label: "工序编码",
+      prop: "operationCode",
+      search: true,
+    },
+    {
+      label: "工序名称",
+      prop: "operationName",
+    },
+
+    {
+      label: "状态",
+      prop: "state",
+      type: "select",
+      search: true,
+      dicUrl:
+        dictDataUtil.request_url + dictDataUtil.TYPE_CODE.station_task_state,
+      props: {
+        label: "dictLabel",
+        value: "dictValue",
+      },
+    },
+    {
+      label: "计划开始时间",
+      prop: "planStartWhen",
+    },
+    {
+      label: "计划结束时间",
+      prop: "planStartEnd",
+    },
+    {
+      label: "修改时间",
+      prop: "updated",
+    },
+  ],
+});
+</script>
+
+<style lang="scss" scoped>
+#charts {
+  width: 100%;
+  height: 300px;
+}
+</style>