Procházet zdrojové kódy

修改工艺路线相关问题

ooo před 1 rokem
rodič
revize
2b89316f19

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

@@ -489,6 +489,45 @@ export const tableConfig = {
 			},
 		],
 	},
+	
+	ESOP: {
+		url: "/api/v1/base/drawing",
+		column: [
+			{
+			  label: "图纸编码",
+			  prop: "drawingCode",
+			  span: 12,
+			  labelWidth: '150',
+			  search: true,
+			  editDisabled: true,
+			},
+			{
+			  label: "标题",
+			  prop: "drawingTitle",
+			  labelWidth: '150',
+			  editDisabled: true,
+			  span: 12,
+			  search: false,
+			},
+			{
+			  label: "版本号",
+			  prop: "drawingVersion",
+			  span: 12,
+			  search: false,
+			},
+			{
+			  label: "图纸",
+			  prop: "drawingPath",
+			  type: "img",
+			  span: 24,
+			  display: false,
+			  slot: true,
+			  // formatter: (row, column, cellValue, index) => {
+			  //   return `${row.drawingPath}`;
+			  // },
+			}
+		],
+	},
 
 	USERS: {
 		url: "/api/v1/sys/employeeSkill/users",

+ 16 - 5
src/views/base/craftManagement/route/components/bottomTable.vue

@@ -17,15 +17,15 @@
       @size-change="dataList"
       @current-change="dataList"
     >
-      <template #filePath-form="scope">
+      <!-- <template #filePath-form="scope">
         <single-upload v-model="form.filePath" />
-        <!-- <FilesUpload v-model:src="form.filePath" v-model:src-list="form.filePath" /> -->
-      </template>
-      <template #filePath="{ row }">
+        <FilesUpload v-model:src="form.filePath" v-model:src-list="form.filePath" />
+      </template> -->
+      <!-- <template #filePath="{ row }">
         <el-button link type="primary" @click.stop="imgUrlClick(row)">{{
           row.filePath
         }}</el-button>
-      </template>
+      </template> -->
     </avue-crud>
     <CommonTable
       ref="commonTableRef"
@@ -100,6 +100,11 @@ const startCreat = () => {
   } else if (props.tableType === "dianjian") {
     commonTableType.value = "OP_CHECK";
     commonTableRef.value?.startSelect();
+  } else if (props.tableType === "ESOP") {
+    commonTableType.value = "ESOP";
+    commonTableRef.value?.startSelect({
+      materialCode: route.query.prodtCode,
+    });
   } else {
     crudRef.value && crudRef.value.rowAdd();
   }
@@ -134,6 +139,12 @@ const onSelectedFinish = (itemValue) => {
     form.value.checkName = itemValue.checkName;
     form.value.checkCode = itemValue.checkCode;
     form.value.content = itemValue.content;
+  } else if (props.tableType === "ESOP") {
+    form.value.filePath = itemValue.drawingPath;
+    form.value.drawingCode = itemValue.drawingCode;
+    form.value.recordVersion = itemValue.drawingVersion;
+    form.value.sortNum = itemValue.sort;
+    form.value.title = itemValue.drawingTitle;
   }
 };
 

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

@@ -1,245 +1,252 @@
 import { useDictionaryStoreHook } from "@/store";
 const { dicts } = useDictionaryStoreHook();
 
-export const getTableConfig = (id: string) => {
-  return {
-    // 获取工序记录项信息信息
-    jiluxiang: {
-      url: `/api/v1/op/operationRecord`,
-      column: [
-        {
-          label: "工序id",
-          prop: "operationId",
-          display: false,
-          hide: true,
-          value: id,
-        },
-        { label: "记录项", prop: "thName" },
-        {
-          label: "单位",
-          prop: "unit",
-          search: true,
-          filterable: true,
-          type: "select",
-          dataType: "string",
-          dicData: dicts.danwei_type,
-          props: { label: "dictLabel", value: "dictValue" },
-        },
-        { label: "标准值", prop: "standard" },
-        { label: "上限值", prop: "upper" },
-        { label: "下限值", prop: "lower" },
-      ],
-    },
-    //工序物料
-    wuliaocaiji: {
-      url: "/api/v1/op/operationItem",
-      column: [
-        {
-          label: "工序id",
-          prop: "operationId",
-          display: false,
-          hide: true,
-          value: id,
-        },
-        { 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: "追溯类型",
-          prop: "traceType",
-          search: true,
-          filterable: true,
-          type: "select",
-          dataType: "string",
-          dicData: dicts.trace_type,
-          props: { label: "dictLabel", value: "dictValue" },
-        },
-        {
-          label: "单位",
-          prop: "unit",
-          search: true,
-          filterable: true,
-          type: "select",
-          dataType: "string",
-          dicData: dicts.danwei_type,
-          props: { label: "dictLabel", value: "dictValue" },
-        },
-        {
-          label: "是否需要",
-          prop: "isTrace",
-          type: "radio", //类型为单选框
-          dicData: [
-            {
-              label: "需采集物料",
-              value: 1,
-            },
-            {
-              label: "非必须采集物料",
-              value: 0,
-            },
-          ],
-          value: 1,
-          rules: [
-            {
-              required: true,
-              message: "是否需要",
-              trigger: "blur",
-            },
-          ],
-        },
-      ],
-    },
-    dianjian: {
-      url: `/api/v1/op/operationCheck`,
-      column: [
-        {
-          label: "工序id",
-          prop: "operationId",
-          display: false,
-          hide: true,
-          value: id,
-        },
-        { label: "点检名称", prop: "checkName",addDisabled:true,editDisabled:true },
-        { label: "点检编码", prop: "checkCode",addDisabled:true,editDisabled:true },
-        { label: "内容", prop: "content",addDisabled:true,editDisabled:true },
-        {
-          label: "单位",
-          prop: "unit",
-          search: true,
-          filterable: true,
-          type: "select",
-          dataType: "string",
-          dicData: dicts.danwei_type,
-          props: { label: "dictLabel", value: "dictValue" },
-        },
-        { label: "标准值", prop: "standard" },
-        { label: "上限值", prop: "upper" },
-        { label: "下限值", prop: "lower" },
-      ],
-    },
-    shebeijilu: {
-      url: "/api/v1/op/operationEquit",
-      column: [
-        {
-          label: "工序id",
-          prop: "operationId",
-          display: false,
-          hide: true,
-          value: id,
-        },
-        { label: "精度要求", prop: "accuracy" },
-        { label: "所需数量", prop: "num", display: false, hide: true },
-        {
-          label: "设备类型",
-          prop: "equitType",
-          search: true,
-          filterable: true,
-          type: "select",
-          dataType: "string",
-          dicData: dicts.device_type,
-          props: { label: "dictLabel", value: "dictValue" },
-        },
-        {
-          label: "必须采集",
-          prop: "collection",
-          type: "radio", //类型为单选框
-          dicData: [
-            {
-              label: "必须",
-              value: 1,
-            },
-            {
-              label: "非必须",
-              value: 0,
-            },
-          ],
-          value: 1,
-          rules: [
-            {
-              required: true,
-              message: "是否必须采集",
-              trigger: "blur",
-            },
-          ],
-        },
-      ],
-    },
-    ESOP: {
-      url: "/api/v1/op/esop",
-      column: [
-        {
-          label: "工序id",
-          prop: "operationId",
-          display: false,
-          hide: true,
-          value: id,
-        },
-        { label: "内容", prop: "content" },
-        { label: "标题", prop: "title" },
-		{ label: "展示页数", prop: "showAppointPageNum",type: "number" },
-		{ label: "总页数", prop: "pageNum",type: "number" },
-		{ label: "版本号", prop: "recordVersion",type: "number",
-		rules: [
-            {
-              required: true,
-              message: "版本号",
-              trigger: "blur",
-            },
-          ], },
-        {
-          label: "文件",
-          prop: "filePath",
-          span: 24,
-          slot: true,
-          viewDisplay: false,
-        },
-      ],
-    },
-  };
+export const getTableConfig = (id : string) => {
+	return {
+		// 获取工序记录项信息信息
+		jiluxiang: {
+			url: `/api/v1/op/operationRecord`,
+			column: [
+				{
+					label: "工序id",
+					prop: "operationId",
+					display: false,
+					hide: true,
+					value: id,
+				},
+				{ label: "记录项", prop: "thName" },
+				{
+					label: "单位",
+					prop: "unit",
+					search: true,
+					filterable: true,
+					type: "select",
+					dataType: "string",
+					dicData: dicts.danwei_type,
+					props: { label: "dictLabel", value: "dictValue" },
+				},
+				{ label: "标准值", prop: "standard" },
+				{ label: "上限值", prop: "upper" },
+				{ label: "下限值", prop: "lower" },
+			],
+		},
+		//工序物料
+		wuliaocaiji: {
+			url: "/api/v1/op/operationItem",
+			column: [
+				{
+					label: "工序id",
+					prop: "operationId",
+					display: false,
+					hide: true,
+					value: id,
+				},
+				{ 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: "追溯类型",
+					prop: "traceType",
+					search: true,
+					filterable: true,
+					type: "select",
+					dataType: "string",
+					dicData: dicts.trace_type,
+					props: { label: "dictLabel", value: "dictValue" },
+				},
+				{
+					label: "单位",
+					prop: "unit",
+					search: true,
+					filterable: true,
+					type: "select",
+					dataType: "string",
+					dicData: dicts.danwei_type,
+					props: { label: "dictLabel", value: "dictValue" },
+				},
+				{
+					label: "是否需要",
+					prop: "isTrace",
+					type: "radio", //类型为单选框
+					dicData: [
+						{
+							label: "需采集物料",
+							value: 1,
+						},
+						{
+							label: "非必须采集物料",
+							value: 0,
+						},
+					],
+					value: 1,
+					rules: [
+						{
+							required: true,
+							message: "是否需要",
+							trigger: "blur",
+						},
+					],
+				},
+			],
+		},
+		dianjian: {
+			url: `/api/v1/op/operationCheck`,
+			column: [
+				{
+					label: "工序id",
+					prop: "operationId",
+					display: false,
+					hide: true,
+					value: id,
+				},
+				{ label: "点检名称", prop: "checkName", addDisabled: true, editDisabled: true },
+				{ label: "点检编码", prop: "checkCode", addDisabled: true, editDisabled: true },
+				{ label: "内容", prop: "content", addDisabled: true, editDisabled: true },
+				{
+					label: "单位",
+					prop: "unit",
+					search: true,
+					filterable: true,
+					type: "select",
+					dataType: "string",
+					dicData: dicts.danwei_type,
+					props: { label: "dictLabel", value: "dictValue" },
+				},
+				{ label: "标准值", prop: "standard" },
+				{ label: "上限值", prop: "upper" },
+				{ label: "下限值", prop: "lower" },
+			],
+		},
+		shebeijilu: {
+			url: "/api/v1/op/operationEquit",
+			column: [
+				{
+					label: "工序id",
+					prop: "operationId",
+					display: false,
+					hide: true,
+					value: id,
+				},
+				{ label: "精度要求", prop: "accuracy" },
+				{ label: "所需数量", prop: "num", display: false, hide: true },
+				{
+					label: "设备类型",
+					prop: "equitType",
+					search: true,
+					filterable: true,
+					type: "select",
+					dataType: "string",
+					dicData: dicts.device_type,
+					props: { label: "dictLabel", value: "dictValue" },
+				},
+				{
+					label: "必须采集",
+					prop: "collection",
+					type: "radio", //类型为单选框
+					dicData: [
+						{
+							label: "必须",
+							value: 1,
+						},
+						{
+							label: "非必须",
+							value: 0,
+						},
+					],
+					value: 1,
+					rules: [
+						{
+							required: true,
+							message: "是否必须采集",
+							trigger: "blur",
+						},
+					],
+				},
+			],
+		},
+		ESOP: {
+			url: "/api/v1/op/esop",
+			column: [
+				{
+					label: "工序id",
+					prop: "operationId",
+					display: false,
+					hide: true,
+					value: id,
+				},
+
+				{ label: "标题", prop: "title", addDisabled: true, editDisabled: true },
+				{ label: "展示页数", prop: "showAppointPageNum", type: "number" },
+				{ label: "总页数", prop: "pageNum", type: "number" },
+				{
+					label: "版本号", prop: "recordVersion", type: "number", addDisabled: true, editDisabled: true,
+					rules: [
+						{
+							required: true,
+							message: "版本号",
+							trigger: "blur",
+						},
+					],
+				},
+				{ label: "图纸编码", prop: "drawingCode", hide: true, addDisabled: true, editDisabled: true, },
+				{ label: "内容", prop: "content", hide: true,addDisabled: true, editDisabled: true, },
+				{ label: "排序", prop: "sortNum", hide: true,addDisabled: true, editDisabled: true, },
+				{
+					label: "文件",
+					prop: "filePath",
+					span: 24,
+					type: "img",
+					slot: true,
+					viewDisplay: false,
+					addDisabled: true, editDisabled: true
+				},
+			],
+		},
+	};
 };
 
 // 工艺工序组件路径的组件类别
 interface comType {
-  compentName: string;
-  compentType: string;
+	compentName : string;
+	compentType : string;
 }
-export const comTypes: comType[] = [
-  {
-    compentName: "记录项",
-    compentType: "jiluxiang",
-  },
-  {
-    compentName: "物料采集",
-    compentType: "wuliaocaiji",
-  },
-  {
-    compentName: "ESOP",
-    compentType: "ESOP",
-  },
-  {
-    compentName: "点检",
-    compentType: "dianjian",
-  },
-  {
-    compentName: "设备记录",
-    compentType: "shebeijilu",
-  },
-  {
-    compentName: "紧固",
-    compentType: "jingu",
-  },
-  {
-    compentName: "调试配对",
-    compentType: "tiaoshipipei",
-  },
-  {
-    compentName: "铭牌绑定",
-    compentType: "mingpai",
-  },
-  {
-    compentName: "多媒体采集",
-    compentType: "duomeiticaiji",
-  },
-];
+export const comTypes : comType[] = [
+	{
+		compentName: "记录项",
+		compentType: "jiluxiang",
+	},
+	{
+		compentName: "物料采集",
+		compentType: "wuliaocaiji",
+	},
+	{
+		compentName: "ESOP",
+		compentType: "ESOP",
+	},
+	{
+		compentName: "点检",
+		compentType: "dianjian",
+	},
+	{
+		compentName: "设备记录",
+		compentType: "shebeijilu",
+	},
+	{
+		compentName: "紧固",
+		compentType: "jingu",
+	},
+	{
+		compentName: "调试配对",
+		compentType: "tiaoshipipei",
+	},
+	{
+		compentName: "铭牌绑定",
+		compentType: "mingpai",
+	},
+	{
+		compentName: "多媒体采集",
+		compentType: "duomeiticaiji",
+	},
+];