Преглед на файлове

修改工艺路线的需求

ooo преди 1 година
родител
ревизия
dbcf922a8d

+ 28 - 0
src/components/CommonTable/configs/tableConfig.ts

@@ -462,6 +462,34 @@ export const tableConfig = {
 		],
 	},
 
+	OP_CHECK: {
+		url: "/api/v1/op/base/check",
+		column: [
+			{
+			  label: "点检项名称",
+			  prop: "checkName",
+			  span: 12,
+			  width: '150',
+			  search: true,
+			  editDisabled: true,
+			},
+			{
+			  label: "点检项编码",
+			  prop: "checkCode",
+			  width: '150',
+			  editDisabled: true,
+			  span: 12,
+			  search: true,
+			},
+			{
+			  label: "内容",
+			  prop: "content",
+			  span: 12,
+			  search: false,
+			},
+		],
+	},
+
 	USERS: {
 		url: "/api/v1/sys/employeeSkill/users",
 		column: [

+ 2 - 0
src/components/CommonTable/index.vue

@@ -119,6 +119,7 @@ onMounted(() => {
     height: "500",
     overHidden: true,
     indexWidth: "120px",
+    searchLabelWidth: 110,
     column: tableConfig[props.tableType].column,
   });
   // 列处理
@@ -139,6 +140,7 @@ watch(
       addBtn: false,
       height: "500",
       overHidden: true,
+      searchLabelWidth: 110,
       column: tableConfig[props.tableType].column,
     });
     // 列处理

+ 37 - 14
src/views/base/craftManagement/route/components/bottomTable.vue

@@ -17,12 +17,13 @@
       @size-change="dataList"
       @current-change="dataList"
     >
-      <template #imgUrl-form="scope">
-        <single-upload v-model="form.imgUrl" />
+      <template #filePath-form="scope">
+        <single-upload v-model="form.filePath" />
+        <!-- <FilesUpload v-model:src="form.filePath" v-model:src-list="form.filePath" /> -->
       </template>
-      <template #imgUrl="{ row }">
+      <template #filePath="{ row }">
         <el-button link type="primary" @click.stop="imgUrlClick(row)">{{
-          row.imgUrl
+          row.filePath
         }}</el-button>
       </template>
     </avue-crud>
@@ -41,7 +42,7 @@
 import { ref, getCurrentInstance } from "vue";
 import { useCrud } from "@/hooks/userCrud";
 import { getTableConfig } from "./configs";
-import { saveCompoents } from "@/api/craft/process/index";
+import { saveCompoents, getBomVersion } from "@/api/craft/process/index";
 import SingleUpload from "@/components/Upload/SingleUpload.vue";
 
 const props = defineProps({
@@ -72,15 +73,33 @@ const crudRef = ref(null); //crudRef.value 获取avue-crud对象
 
 const startCreat = () => {
   if (props.tableType === "wuliaocaiji") {
-    //根据物料编码获取对应的物料BOM
-    commonTableRef.value &&
-      commonTableRef.value.startSelect(
-        {
-          materialCode: route.query.prodtCode,
-          bomVersion: 1.0,
-        },
-        { tableName: "wuliaocaiji" }
-      );
+    commonTableType.value = "MARTERIAL_BOM";
+    if (!route.query.prodtCode) {
+      ElMessage.error("物料编号读取错误");
+      return;
+    }
+    //根据物料编码和版本号获取对应的物料BOM
+    let bomParam = {
+      materialCode: route.query.prodtCode,
+    };
+    getBomVersion(bomParam).then((res) => {
+      let resListMap = [];
+      //说明时物料采集的添加框 进行物料采集的下拉框数据获取
+      res?.data.forEach((versions) => {
+        resListMap.push({
+          label: versions.bomVersion,
+          value: versions.bomVersion,
+        });
+      });
+      //根据物料编码和版本号获取对应的物料BOM
+      commonTableRef.value?.startSelect({
+        materialCode: route.query.prodtCode,
+      });
+      commonTableRef.value?.refreshDictData("bomVersion", resListMap, "value");
+    });
+  } else if (props.tableType === "dianjian") {
+    commonTableType.value = "OP_CHECK";
+    commonTableRef.value?.startSelect();
   } else {
     crudRef.value && crudRef.value.rowAdd();
   }
@@ -111,6 +130,10 @@ const onSelectedFinish = (itemValue) => {
     form.value.num = itemValue.bomMaterialNumber;
     form.value.traceType = "S";
     form.value.unit = itemValue.unitDictValue;
+  } else if (props.tableType === "dianjian") {
+    form.value.checkName = itemValue.checkName;
+    form.value.checkCode = itemValue.checkCode;
+    form.value.content = itemValue.content;
   }
 };
 

+ 9 - 9
src/views/base/craftManagement/route/components/configs.ts

@@ -41,10 +41,10 @@ export const getTableConfig = (id: string) => {
           hide: true,
           value: id,
         },
-        { label: "物料名称", prop: "itemName" },
-		{ label: "物料版本号", prop: "recordVersion" },
-        { label: "物料编码", prop: "itemCode" },
-        { label: "物料规格", prop: "itemModel" },
+        { label: "物料名称", prop: "itemName",addDisabled:true,editDisabled:true },
+		{ label: "物料版本号", prop: "recordVersion",addDisabled:true,editDisabled:true },
+        { label: "物料编码", prop: "itemCode",addDisabled:true,editDisabled:true },
+        { label: "物料规格", prop: "itemModel",addDisabled:true,editDisabled:true },
         { label: "所需数量", prop: "num" },
         {
           label: "追溯类型",
@@ -101,9 +101,9 @@ export const getTableConfig = (id: string) => {
           hide: true,
           value: id,
         },
-        { label: "点检名称", prop: "checkName" },
-        { label: "点检编码", prop: "checkCode" },
-        { label: "内容", prop: "content" },
+        { label: "点检名称", prop: "checkName",addDisabled:true,editDisabled:true },
+        { label: "点检编码", prop: "checkCode",addDisabled:true,editDisabled:true },
+        { label: "内容", prop: "content",addDisabled:true,editDisabled:true },
         {
           label: "单位",
           prop: "unit",
@@ -179,7 +179,7 @@ export const getTableConfig = (id: string) => {
         { label: "内容", prop: "content" },
         { label: "标题", prop: "title" },
 		{ label: "展示页数", prop: "showAppointPageNum",type: "number" },
-		{ label: "文件页数", prop: "pageNum",type: "number" },
+		{ label: "页数", prop: "pageNum",type: "number" },
 		{ label: "版本号", prop: "recordVersion",type: "number",
 		rules: [
             {
@@ -190,7 +190,7 @@ export const getTableConfig = (id: string) => {
           ], },
         {
           label: "文件",
-          prop: "imgUrl",
+          prop: "filePath",
           span: 24,
           slot: true,
           viewDisplay: false,