lupeng vor 10 Monaten
Ursprung
Commit
1e89e348ba

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

@@ -425,6 +425,21 @@ export const tableConfig = {
           },
         ],
       },
+      {
+        label: "设备状态",
+        prop: "state",
+        type: "select",
+        dicData: [
+          {
+            label: "启用",
+            value: "0",
+          },
+          {
+            label: "停用",
+            value: "1",
+          },
+        ],
+      },
     ],
   },
 

+ 17 - 1
src/views/base/craftManagement/route/index.vue

@@ -42,6 +42,14 @@
       <template #menu="{ row }">
         <el-button
           link
+          type="primary"
+          icon="el-icon-edit"
+          :disabled="false"
+          @click="doEdit(row, index)"
+          >编辑</el-button
+        >
+        <el-button
+          link
           icon="el-icon-copy-document"
           :disabled="false"
           @click="copyRow(row)"
@@ -144,6 +152,11 @@ const uploadFinished = () => {
   page.currentPage = 1;
   dataList();
 };
+
+const doEdit = (row, index) => {
+  row.prodtName1 = row.prodtName;
+  crudRef.value && crudRef.value.rowEdit(row, index);
+};
 const importExcelData = () => {
   if (uploadRef.value) {
     uploadRef.value.show("/api/v1/op/route/import");
@@ -217,6 +230,7 @@ option.value = Object.assign(option.value, {
   selection: true,
   labelWidth: 110,
   searchLabelWidth: 110,
+  editBtn: false,
   column: [
     {
       label: "工艺路线编号",
@@ -301,7 +315,8 @@ option.value = Object.assign(option.value, {
       overHidden: true,
       width: 150,
       search: true,
-      display: false,
+      editDisplay: false,
+      addDisplay: false,
       rules: [
         {
           required: true,
@@ -314,6 +329,7 @@ option.value = Object.assign(option.value, {
       label: "产品名称",
       prop: "prodtName1",
       overHidden: true,
+      viewDisplay: false,
       width: 150,
       rules: [
         {

+ 1 - 1
src/views/base/information/index.vue

@@ -244,7 +244,7 @@ option.value = Object.assign(option.value, {
       rules: [
         {
           required: true,
-          message: "请选择物料属性",
+          message: "请选择图纸类型",
           trigger: "blur",
         },
       ],

+ 16 - 2
src/views/device/disable/index.vue

@@ -28,6 +28,14 @@
       </template>
       <template #menu="{ size, row, index }">
         <el-button
+          @click="doEdit(row, index)"
+          icon="el-icon-edit"
+          text
+          type="primary"
+          :size="size"
+          >编辑</el-button
+        >
+        <el-button
           @click="maintenance(row)"
           icon="el-icon-check"
           text
@@ -308,7 +316,10 @@ const test = () => {
   isShowTable.value = true;
   tableType.value = tableType.value == 1 ? 2 : 1;
 };
-
+const doEdit = (row, index) => {
+  row.deviceName2 = row.deviceName;
+  crudRef.value && crudRef.value.rowEdit(row, index);
+};
 // 传入一个url,后面不带/
 const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
   useCrud({
@@ -414,6 +425,7 @@ const maintenanceSubmit2 = () => {
 option.value = Object.assign(option.value, {
   selection: true,
   delBtn: false,
+  editBtn: false,
   selectable: rowSelectable,
   column: [
     {
@@ -421,7 +433,8 @@ option.value = Object.assign(option.value, {
       prop: "deviceName",
       search: true,
       overHidden: true,
-      display: false,
+      editDisplay: false,
+      addDisplay: false,
       rules: [
         {
           required: true,
@@ -435,6 +448,7 @@ option.value = Object.assign(option.value, {
       prop: "deviceName2",
       overHidden: true,
       hide: true,
+      viewDisplay: false,
       rules: [
         {
           required: true,

+ 4 - 0
src/views/pro/traceability/components/traceabilityCom.vue

@@ -9,6 +9,10 @@
       :option="option"
       @row-update="updateRow"
       v-model:page="page"
+      @search-change="searchChange"
+      @search-reset="resetChange"
+      @size-change="dataList"
+      @current-change="dataList"
     />
     <CommonTable
       ref="userRef"