ソースを参照

Merge tag 'Hotfix-mo-152' into develop

Finish Hotfix-mo-152
莫绍宝 3 年 前
コミット
64957f58fd

+ 26 - 4
src/views/supply/apply/apply_list.vue

@@ -104,7 +104,7 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :xs="24" :sm="24" :lg="6" class="tr">
+            <el-col :xs="24" :sm="24" :lg="24" class="tr">
               <el-form-item label="">
                 <el-button @click="resetScreenForm">清空</el-button>
                 <el-button type="primary" @click="submitScreenForm">搜索</el-button>
@@ -132,12 +132,11 @@
             element-loading-text="Loading"
             border
             fit
-            highlight-current-row
-            stripe
+            :row-style="rowClass"
             @selection-change="handleSelectionChange"
             show-summary
             :summary-method="$getSummaries">
-            <el-table-column align="center" type="selection" width="55"></el-table-column>
+            <el-table-column align="center" type="selection" width="55" fixed="left"></el-table-column>
             <el-table-column align="left" label="订单类型" prop="type" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{scope.row.type | orderTypeFilter}}
@@ -400,6 +399,7 @@ export default {
       isShowForm: false,
       isShowReturnForm: false,
 
+      selectRow: [],
       multipleSelection: [],
       isShowExamineDialog: false,
       examineForm: {
@@ -430,6 +430,17 @@ export default {
       }
     },
   },
+  
+  watch: {
+    multipleSelection(data) { // 监听选中状态
+      this.selectRow = []
+      if (data.length > 0) {
+        data.forEach((item, index) => {
+          this.selectRow.push(item.id)
+        })
+      }
+    }
+  },
 
   beforeCreate() {
     that = this;
@@ -578,6 +589,17 @@ export default {
 
     handleSelectionChange(val) {
       this.multipleSelection = val;
+      if(val) {
+        this.selections = val;
+      }else {
+        this.selections = [];
+      }
+    },
+
+    rowClass({ row, rowIndex }) {
+      if (this.selectRow.includes(row.id)) {
+        return { 'background-color': '#ecf5ff' }
+      }
     },
 
     // 打开 批量审批

+ 25 - 3
src/views/supply/apply/engin_list.vue

@@ -143,12 +143,11 @@
             element-loading-text="Loading"
             border
             fit
-            highlight-current-row
-            stripe
+            :row-style="rowClass"
             @selection-change="handleSelectionChange"
             show-summary
             :summary-method="$getSummaries">
-            <el-table-column align="center" type="selection" width="55"></el-table-column>
+            <el-table-column align="center" type="selection" width="55" fixed="left"></el-table-column>
             <el-table-column align="left" label="订单类型" prop="type" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{scope.row.type | orderTypeFilter}}
@@ -416,6 +415,7 @@ export default {
       isShowForm: false,
       isShowReturnForm: false,
 
+      selectRow: [],
       multipleSelection: [],
       isShowExamineDialog: false,
       examineForm: {
@@ -450,6 +450,17 @@ export default {
     },
   },
 
+  watch: {
+    multipleSelection(data) { // 监听选中状态
+      this.selectRow = []
+      if (data.length > 0) {
+        data.forEach((item, index) => {
+          this.selectRow.push(item.id)
+        })
+      }
+    }
+  },
+
   beforeCreate() {
     that = this;
   },
@@ -598,6 +609,17 @@ export default {
 
     handleSelectionChange(val) {
       this.multipleSelection = val;
+      if(val) {
+        this.selections = val;
+      }else {
+        this.selections = [];
+      }
+    },
+
+    rowClass({ row, rowIndex }) {
+      if (this.selectRow.includes(row.id)) {
+        return { 'background-color': '#ecf5ff' }
+      }
     },
 
     // 打开 批量审批

+ 29 - 6
src/views/supply/policy/policy_list.vue

@@ -112,7 +112,7 @@
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="表体业务员" prop="serviceId">
-                <el-select v-model="screenForm.serviceId" placeholder="选择表体业务员" size="small" clearable filterable style="width: 100%">
+                <el-select v-model="screenForm.serviceId" placeholder="选择表体业务员" clearable filterable style="width: 100%">
                   <el-option
                     v-for="item in salesmanList"
                     :key="item.adminUserId"
@@ -124,7 +124,7 @@
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="是否直调" prop="isDirectTransfer">
-                <el-select v-model="screenForm.isDirectTransfer" placeholder="选择是否直" size="small"   style="width: 100%">
+                <el-select v-model="screenForm.isDirectTransfer" placeholder="选择是否直"   style="width: 100%">
                   <el-option :value="null" label="默认"></el-option>
                   <el-option
                     v-for="item in transfer"
@@ -150,7 +150,7 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :xs="24" :sm="24" :lg="6" class="tr">
+            <el-col :xs="24" :sm="24" :lg="24" class="tr">
               <el-form-item label="">
                 <el-button
                   size="mini"
@@ -189,9 +189,8 @@
             element-loading-text="Loading"
             border
             fit
-            highlight-current-row
-            stripe
             show-summary
+            :row-style="rowClass"
             :summary-method="$getSummaries"
             @select-all="handleSelectionAllChange"
             @selection-change="handleSelectionAllChange"
@@ -207,7 +206,7 @@
                 <el-progress :percentage="scope.row.thjd || 0"></el-progress>
               </template>
             </el-table-column> -->
-            <el-table-column align="left" type="selection" width="55" />
+            <el-table-column align="center" type="selection" width="55" fixed="left" />
             <el-table-column
               align="left"
               label="订单号"
@@ -687,6 +686,7 @@ export default {
         date: ''
       },
       salesmanList:[],
+      selectRow: [],
       selectData:[],
       isShowExamineDialog: false,
       examineForm: {
@@ -714,6 +714,17 @@ export default {
     }
   },
 
+  watch: {
+    selectData(data) { // 监听选中状态
+      this.selectRow = []
+      if (data.length > 0) {
+        data.forEach((item, index) => {
+          this.selectRow.push(item.id)
+        })
+      }
+    }
+  },
+
   beforeCreate() {
     that = this
   },
@@ -738,7 +749,19 @@ export default {
     },
     handleSelectionAllChange(e) {
       this.selectData = e
+      if(e) {
+        this.selections = e;
+      }else {
+        this.selections = [];
+      }
     },
+
+    rowClass({ row, rowIndex }) {
+      if (this.selectRow.includes(row.id)) {
+        return { 'background-color': '#ecf5ff' }
+      }
+    },
+
     // 打开 批量审批
     batchExamine() {
       if (this.selectData.length) {

+ 28 - 5
src/views/supply/sales/sales_list.vue

@@ -169,8 +169,7 @@
             element-loading-text="Loading"
             border
             fit
-            highlight-current-row
-            stripe
+            :row-style="rowClass"
             @selection-change="handleSelectionChange"
             show-summary
             :summary-method="$getSummaries"
@@ -179,6 +178,7 @@
               align="center"
               type="selection"
               width="55"
+              fixed="left"
             ></el-table-column>
             <el-table-column
               align="left"
@@ -479,8 +479,8 @@ export default {
         { label: "审核通过", value: "OK" },
         // { label: '审核驳回', value: 'FAIL' },,
       ],
-centerDialogVisible:false,
-cid:'',
+      centerDialogVisible:false,
+      cid:'',
       queryItem: {},
       isShowDetail: false,
       isShowExamine: false,
@@ -489,6 +489,7 @@ cid:'',
       qty:'',
       edit:false,
       choiceDate: "",
+      selectRow: [],
       multipleSelection: [],
       isShowExamineDialog: false,
       examineForm: {
@@ -534,6 +535,17 @@ cid:'',
     },
   },
 
+  watch: {
+    multipleSelection(data) { // 监听选中状态
+      this.selectRow = []
+      if (data.length > 0) {
+        data.forEach((item, index) => {
+          this.selectRow.push(item.id)
+        })
+      }
+    }
+  },
+
   beforeCreate() {
     that = this;
   },
@@ -665,6 +677,17 @@ cid:'',
 
     handleSelectionChange(val) {
       this.multipleSelection = val;
+      if(val) {
+        this.selections = val;
+      }else {
+        this.selections = [];
+      }
+    },
+
+    rowClass({ row, rowIndex }) {
+      if (this.selectRow.includes(row.id)) {
+        return { 'background-color': '#ecf5ff' }
+      }
     },
 
     // 打开 批量审批
@@ -699,4 +722,4 @@ cid:'',
 };
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped></style>