Эх сурвалжийг харах

优化页面样式,点击效果

黄梓星 1 жил өмнө
parent
commit
6aee19d1b7

+ 6 - 1
src/views/purchase/DemandSummary/add.vue

@@ -22,6 +22,8 @@
           max-height="580"
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
+          @row-click="rowSelect"
+          ref="table"
         >
         <el-table-column show-overflow-tooltip type="selection" fixed="left"/>
         <el-table-column show-overflow-tooltip label="序号" align="center" type="index" width="55" fixed="left"/>
@@ -248,6 +250,9 @@ export default {
       this.ids = selection.map(item => item.demandItemId)
       console.log('选中数组', this.ids.join())
     },
+    rowSelect(row) {
+      this.$refs.table.toggleRowSelection(row);
+    },
     back() {
       this.$emit('jugislist', true)
       // let queryParams = {
@@ -412,6 +417,6 @@ export default {
   justify-content: flex-end;
 } 
 ::v-deep .el-table__row > td {
-  border: none;
+  border-right: none;
 }
 </style>

+ 13 - 1
src/views/purchase/DemandSummary/index.vue

@@ -228,6 +228,8 @@
           max-height="355"
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
+          @row-click="rowSelect"
+          @row-dblclick="doubleClick"
           ref="table"
           :key="isUpdate"
         >
@@ -608,6 +610,16 @@ export default {
       this.rowDetail = row
       this.disable = true
     },
+    doubleClick(row) {
+      this.isList = false
+      this.page = 'check'
+      this.rowDetail = row
+      this.disable = true
+    },
+    // 表格选中数据
+    rowSelect(row) {
+      this.$refs.table.toggleRowSelection(row);
+    },
     handleSizeChange(val) {
       console.log(`每页 ${val} 条`);
       this.queryParams.pageSize = val
@@ -809,7 +821,7 @@ export default {
   text-align: right;
 }
 ::v-deep .el-table__row > td {
-  border: none;
+  border-right: none;
 }
  ::v-deep .el-card .el-form-item {
   margin-bottom: 3px;

+ 14 - 1
src/views/purchase/MaterialClassDivision/index.vue

@@ -219,6 +219,9 @@
           max-height="390"
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
+          @row-click="rowSelect"
+          @row-dblclick="doubleClick"
+          ref="table"
         >
           <el-table-column show-overflow-tooltip type="selection" width="55" fixed="left"/>
           <el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px" fixed="left"/>
@@ -403,6 +406,10 @@ export default {
       console.log('选中', selection)
       this.allSelection = selection
     },
+    // 表格选中数据
+    rowSelect(row) {
+      this.$refs.table.toggleRowSelection(row);
+    },
     handleCommand(command) {
       alert(command)
     },
@@ -417,6 +424,12 @@ export default {
       this.rowDetail = row
       this.disable = true
     },
+    doubleClick(row) {
+      this.isList = false
+      this.page = 'check'
+      this.rowDetail = row
+      this.disable = true
+    },
     edit(row) {
       this.isList = false
       this.page = 'edit'
@@ -499,7 +512,7 @@ export default {
   margin-top: 0;
 }
 ::v-deep .el-table__row > td {
-  border: none;
+  border-right: none;
 }
  ::v-deep .el-card .el-form-item {
   margin-bottom: 3px;

+ 11 - 3
src/views/purchase/PurchaseDemandList/add.vue

@@ -179,14 +179,15 @@
           max-height="410"
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
+          @row-click="rowSelect"
           :cell-class-name="cellClassName"
           :row-key="getRowKeys"
           ref="table"
           v-el-table-infinite-scroll="load"
           :infinite-scroll-disabled="loadDisabled"
         >
-          <el-table-column show-overflow-tooltip type="selection" :reserve-selection="true"/>
-          <el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px"/>
+          <el-table-column show-overflow-tooltip type="selection" :reserve-selection="true" fixed="left"/>
+          <el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px" fixed="left"/>
           <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo">
             <template slot-scope="scope">
               {{ scope.row.rowNo = scope.$index + 1 + "0" }}
@@ -754,7 +755,9 @@ export default {
     } else if (this.pageStu == 'add') {
       this.loading = false
       this.basicForm.demandPersonal = this.$store.state.user.name
+      this.basicForm.demandPersonalName = this.$store.state.user.nickName
       this.basicForm.demandDept = this.$store.state.user.deptId
+      this.basicForm.demandDeptName = this.$store.state.user.deptName
       if (this.basicForm.demandPersonal) { this.reBackRefer('CONTACTS_PARAM', this.basicForm.demandPersonal, '需求人员') }
       if (this.basicForm.demandDept) { this.reBackRefer('DEPT_PARAM', this.basicForm.demandDept) }
     }
@@ -850,7 +853,9 @@ export default {
       this.basicForm.source = '4'
       this.basicForm.isCustomerSpecified = 'N'
       this.basicForm.demandPersonal = this.$store.state.user.name
+      this.basicForm.demandPersonalName = this.$store.state.user.nickName
       this.basicForm.demandDept = this.$store.state.user.deptId
+      this.basicForm.demandDeptName = this.$store.state.user.deptName
       if (this.basicForm.demandPersonal) { this.reBackRefer('CONTACTS_PARAM', this.basicForm.demandPersonal, '需求人员') }
       if (this.basicForm.demandDept) { this.reBackRefer('DEPT_PARAM', this.basicForm.demandDept) }
       this.basicForm.puDemandItemList.forEach(item => {
@@ -1055,6 +1060,9 @@ export default {
       })
       console.log('选中数组', this.ids)
     },
+    rowSelect(row) {
+      this.$refs.table.toggleRowSelection(row);
+    },
     // 点击预留单展示
     showReserved() {
       this.dialog.config = true
@@ -1653,7 +1661,7 @@ export default {
   background: #f11616;
 }
 ::v-deep .el-table__row > td {
-  border: none;
+  border-right: none;
 }
 .pltzTxt{
   text-align: right;

+ 14 - 1
src/views/purchase/PurchaseDemandList/index.vue

@@ -171,6 +171,9 @@
           highlight-current-row
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
+          @row-click="rowSelect"
+          @row-dblclick="doubleClick"
+          ref="tables"
         >
           <el-table-column show-overflow-tooltip type="selection" width="55" fixed="left"/>
           <el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px" fixed="left"/>
@@ -588,6 +591,16 @@ export default {
       this.rowDetail = row
       this.disable = true
     },
+    doubleClick(row) {
+      this.isList = false
+      this.page = 'check'
+      this.rowDetail = row
+      this.disable = true
+    },
+    // 表格选中数据
+    rowSelect(row) {
+      this.$refs.tables.toggleRowSelection(row);
+    },
     edit(row) {
       this.isList = false
       this.page = 'edit'
@@ -736,7 +749,7 @@ export default {
   text-align: right;
 }
 ::v-deep .el-table__row > td {
-  border: none;
+  border-right: none;
 }
  ::v-deep .el-card .el-form-item {
   margin-bottom: 10px;

+ 14 - 1
src/views/purchase/deliveryAddress/index.vue

@@ -180,6 +180,9 @@
           max-height="430"
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
+          @row-click="rowSelect"
+          @row-dblclick="doubleClick"
+          ref="table"
         >
           <el-table-column show-overflow-tooltip type="selection" width="55" fixed="left"/>
           <el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px" fixed="left"/>
@@ -421,6 +424,10 @@ export default {
       console.log('选中', selection)
       this.allSelection = selection
     },
+    // 表格选中数据
+    rowSelect(row) {
+      this.$refs.table.toggleRowSelection(row);
+    },
     handleCommand(command) {
       alert(command)
     },
@@ -435,6 +442,12 @@ export default {
       this.rowDetail = row
       this.disable = true
     },
+    doubleClick(row) {
+      this.isList = false
+      this.page = 'check'
+      this.rowDetail = row
+      this.disable = true
+    },
     edit(row) {
       this.isList = false
       this.page = 'edit'
@@ -517,7 +530,7 @@ export default {
   text-align: right;
 }
 ::v-deep .el-table__row > td {
-  border: none;
+  border-right: none;
 }
  ::v-deep .el-card .el-form-item {
   margin-bottom: 3px;

+ 1 - 1
src/views/purchase/transferOrder/add.vue

@@ -2220,6 +2220,6 @@ export default {
   margin-left: 0px !important;
 }
 ::v-deep .el-table__row > td {
-  border: none;
+  border-right: none;
 }
 </style>

+ 8 - 1
src/views/purchase/transferOrder/index.vue

@@ -84,6 +84,7 @@
           style="font-size: 12px;"
           ref="multipleTable"
           @row-click="select"
+          @row-dblclick="doubleClick"
         >
           <el-table-column show-overflow-tooltip label="单据号" align="center" prop="code" width="150px"/>
           <el-table-column show-overflow-tooltip label="单据状态" align="center" prop="status" width="100px" :formatter="formatterStatus"/>
@@ -481,6 +482,12 @@ export default {
       this.rowDetail = row
       this.disable = true
     },
+    doubleClick(row) {
+      this.isList = false
+      this.page = 'check'
+      this.rowDetail = row
+      this.disable = true
+    },
     edit(row) {
       this.isList = false
       this.page = 'edit'
@@ -569,7 +576,7 @@ export default {
   text-align: right;
 }
 ::v-deep .el-table__row > td {
-  border: none;
+  border-right: none;
 }
  ::v-deep .el-card .el-form-item {
   margin-bottom: 3px;