Quellcode durchsuchen

修改工序列表及缺陷项

tanghao vor 1 Jahr
Ursprung
Commit
66ec09ec67

+ 1 - 1
.env.development

@@ -11,7 +11,7 @@ VITE_APP_BASE_API = '/dev-api'
 # VITE_APP_API_URL = http://vapi.youlai.tech
 # 开发接口地址
 # VITE_APP_API_URL = 'http://192.168.101.4:8078'
-VITE_APP_API_URL = 'http://192.168.101.188:8078'
+VITE_APP_API_URL = 'http://192.168.101.64:8078'
 # VITE_APP_API_URL = 'http://192.168.101.30:8078'  //lup
 #VITE_APP_API_URL = 'http://192.168.101.64:8078'  #hetao
 

+ 2 - 0
src/common/configs/dictDataUtil.ts

@@ -23,6 +23,8 @@ const DictDataUtil = {
     device_maintenance_cycle: "device_maintenance_cycle",
     // 工艺路线类型
     routing_type: "routing_type",
+	//缺陷管理
+	defect_mana: "defect_mana",
     //封装方法
     packaging_method: "packaging_method",
     //岗位组

+ 1 - 0
src/store/modules/dictionary.ts

@@ -38,5 +38,6 @@ export const useDictionaryStore = defineStore("dictionaryStore", {
 });
 
 export function useDictionaryStoreHook() {
+	// console.log('dicts:',useDictionaryStore(store))
   return useDictionaryStore(store);
 }

+ 16 - 0
src/views/base/craftManagement/process/index.vue

@@ -302,6 +302,7 @@ option.value = Object.assign(option.value, {
       label: "是否可跳过",
       prop: "skipped",
       span: 8,
+	  hide: true,
       type: "switch",
       dicData: switchOp,
       value: 0,
@@ -309,6 +310,7 @@ option.value = Object.assign(option.value, {
     {
       label: "是否禁用",
       prop: "enabled",
+	  hide: true,
       span: 8,
       type: "switch",
       dicData: switchOp,
@@ -318,6 +320,7 @@ option.value = Object.assign(option.value, {
       label: "是否外协",
       prop: "externalCooperation",
       span: 8,
+	  hide: true,
       type: "switch",
       dicData: switchOp,
       value: 0,
@@ -326,6 +329,7 @@ option.value = Object.assign(option.value, {
       label: "是否首检",
       prop: "firstCheck",
       span: 8,
+	  hide: true,
       type: "switch",
       dicData: switchOp,
       value: 0,
@@ -334,6 +338,7 @@ option.value = Object.assign(option.value, {
       label: "是否巡检",
       prop: "inspection",
       span: 8,
+	  hide: true,
       type: "switch",
       dicData: switchOp,
       value: 0,
@@ -342,6 +347,7 @@ option.value = Object.assign(option.value, {
       label: "是否自检",
       prop: "selfCheck",
       span: 8,
+	  hide: true,
       type: "switch",
       dicData: switchOp,
       value: 0,
@@ -350,6 +356,7 @@ option.value = Object.assign(option.value, {
       label: "是否工艺数量",
       prop: "common",
       span: 8,
+	  hide: true,
       type: "switch",
       dicData: switchOp,
       value: 0,
@@ -358,6 +365,7 @@ option.value = Object.assign(option.value, {
       label: "是否分批",
       prop: "batch",
       span: 8,
+	  hide: true,
       type: "switch",
       dicData: switchOp,
       value: 0,
@@ -366,6 +374,7 @@ option.value = Object.assign(option.value, {
       label: "是否合批",
       prop: "merge",
       span: 8,
+	  hide: true,
       type: "switch",
       dicData: switchOp,
       value: 0,
@@ -374,12 +383,14 @@ option.value = Object.assign(option.value, {
       label: "合批数量",
       prop: "mergeNum",
       span: 5,
+	  hide: true,
       value: 0,
     },
     {
       label: "是否委外",
       prop: "outsourcing",
       span: 8,
+	  hide: true,
       type: "switch",
       dicData: switchOp,
       value: 0,
@@ -388,6 +399,7 @@ option.value = Object.assign(option.value, {
       label: "分批数量",
       prop: "batchNum",
       span: 5,
+	  hide: true,
       value: 0,
       // slot:true, // 自定义列
     },
@@ -395,12 +407,14 @@ option.value = Object.assign(option.value, {
       label: "外协时间",
       prop: "outTime",
       span: 5,
+	  hide: true,
       value: 0,
       // slot:true, // 自定义列
     },
     {
       label: "前置时间",
       prop: "forceTime",
+	  hide: true,
       span: 6,
       value: 0,
       rules: [
@@ -415,12 +429,14 @@ option.value = Object.assign(option.value, {
     {
       label: "工序描述",
       prop: "operationDesc",
+	  hide: true,
       span: 24,
       type: "textarea",
     },
     {
       label: "备注",
       prop: "remark",
+	  hide: true,
       span: 24,
       type: "textarea",
     },

+ 180 - 0
src/views/base/defectMana/index.vue

@@ -0,0 +1,180 @@
+<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 }">
+        <el-button
+          :disabled="toDeleteIds.length < 1"
+          type="danger"
+          icon="el-icon-delete"
+          :size="size"
+          @click="multipleDelete"
+          >删除</el-button
+        >
+      </template>
+      <!-- <template #menu-right="{}">
+        <el-dropdown split-button
+          >导入
+          <template #dropdown>
+            <el-dropdown-menu>
+              <el-dropdown-item
+                @click="downloadTemplate('/api/v1/plan/order/template')"
+              >
+                <i-ep-download />下载模板
+              </el-dropdown-item>
+              <el-dropdown-item @click="importExcelData">
+                <i-ep-top />导入数据
+              </el-dropdown-item>
+            </el-dropdown-menu>
+          </template>
+        </el-dropdown>
+        <el-button
+          class="ml-3"
+          @click="exportData('/api/v1/plan/order/export')"
+        >
+          <template #icon> <i-ep-download /> </template>导出
+        </el-button>
+      </template> -->
+    </avue-crud>
+    <ExcelUpload ref="uploadRef" @finished="uploadFinished" />
+  </div>
+</template>
+<script setup>
+import { ref, getCurrentInstance } from "vue";
+import { useCrud } from "@/hooks/userCrud";
+import dictDataUtil from "@/common/configs/dictDataUtil";
+import ButtonPermKeys from "@/common/configs/buttonPermission";
+import { useCommonStoreHook, useDictionaryStoreHook } from "@/store";
+
+// 数据字典相关
+const { dicts } = useDictionaryStoreHook();
+
+// 传入一个url,后面不带/
+const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
+  useCrud({
+    src: "/api/v1/op/baseBug",
+  });
+const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
+  Methords; //增删改查
+const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
+const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
+// checkBtnPerm(ButtonPermKeys.PLAN.BTNS.order_add) :permission="permission"
+// const permission = reactive({
+//   delBtn: checkPerm(buttonPermission.PLAN.BTNS.order_del),
+//   addBtn: checkPerm(buttonPermission.PLAN.BTNS.order_add),
+//   editBtn: checkPerm(buttonPermission.PLAN.BTNS.order_edit),
+//   menu: true,
+// });
+
+const crudRef = ref(null); //crudRef.value 获取avue-crud对象
+
+onMounted(() => {
+  // console.log("crudRef", crudRef)
+  dataList();
+});
+
+/**
+ * 上传excel相关
+ */
+const uploadRef = ref(null);
+const uploadFinished = () => {
+  // 上传完成后的刷新操作
+  page.currentPage = 1;
+  dataList();
+};
+const importExcelData = () => {
+  if (uploadRef.value) {
+    uploadRef.value.show("/api/v1/plan/order/import");
+  }
+};
+
+// 设置表格列或者其他自定义的option
+const switchOp = [
+  {
+    label: "",
+    value: 0,
+  },
+  {
+    label: "",
+    value: 1,
+  },
+];
+option.value = Object.assign(option.value, {
+  selection: true,
+  column: [
+	{
+	  label: "缺陷类型",
+	  prop: "bugType",
+	  minWidth: 200,
+	  search: true,
+	  overHidden: true,
+	  rules: [
+	    {
+	      required: true,
+	      message: "缺陷类型不能为空",
+	      trigger: "change",
+	    },
+	  ],
+	  type: "select",
+	  dicUrl: dictDataUtil.request_url + dictDataUtil.TYPE_CODE.defect_mana,
+	  props: {
+	    label: "dictLabel",
+	    value: "dictValue",
+	  },
+	},
+    {
+      label: "缺陷编码",
+      prop: "bugCode",
+      span: 12,
+      search: true,
+      rules: [
+        {
+          required: true,
+          message: "缺陷编码不能为空",
+          trigger: "blur",
+        },
+      ],
+    },
+    {
+      label: "缺陷名称",
+      prop: "bugName",
+      span: 12,
+      search: true,
+      rules: [
+        {
+          required: true,
+          message: "缺陷名称不能为空",
+          trigger: "blur",
+        },
+      ],
+    },
+	{
+      label: "备注",
+      prop: "remark",
+      span: 12,
+      search: true,
+      rules: [
+        {
+          required: false,
+          message: "备注不能为空",
+          trigger: "blur",
+        },
+      ],
+    }
+  ],
+});
+</script>