Quellcode durchsuchen

Merge branch 'master' of http://132.232.92.186:3000/XinXiBu/oa-system

liuhj vor 1 Jahr
Ursprung
Commit
5f9f12da00
1 geänderte Dateien mit 61 neuen und 6 gelöschten Zeilen
  1. 61 6
      src/components/MCR/MarketCustomerResourcesHome.vue

+ 61 - 6
src/components/MCR/MarketCustomerResourcesHome.vue

@@ -20,7 +20,7 @@
 
 
                 <div>
-                    <el-select v-model="principalSel" clearable placeholder="负责人" style="width
+                    <el-select v-model="principalSel" :disabled='isSelect' clearable placeholder="负责人" style="width
                     :18%">
                         <el-option v-for="item in principalList" :key="item.id" :label="item.name" :value="item.id">
                         </el-option>
@@ -76,7 +76,7 @@
             </div>
             <div class="mcr-table">
                 <el-table :data="PageList" border @select="handleSelect" style="width: 100%">
-                    <el-table-column prop="weight" label="权重"  width="50">
+                    <el-table-column prop="weight" label="权重" width="50">
                         <template slot-scope="scope">
                             <span v-if="scope.row.weight == '393'">A</span>
                             <span v-else-if="scope.row.weight == '392'">B</span>
@@ -97,7 +97,7 @@
                     </el-table-column>
                     <!-- <el-table-column prop="birthday" label="生日">
                     </el-table-column> -->
-                    
+
                     <el-table-column prop="ascribedDepartment" label="业务归属" width="80">
                         <template slot-scope="scope">
                             <el-tooltip class="item" effect="dark" placement="top">
@@ -133,7 +133,7 @@
                                 <el-tooltip v-show="scope.row.remark != ''" class="item" effect="dark"
                                     :content="scope.row.remark" placement="top">
                                     <span v-if="scope.row.remark.length > 10">{{ scope.row.remark.slice(0, 10) + "..."
-                                    }}</span>
+                                        }}</span>
                                     <span v-else>{{ scope.row.remark }}</span>
                                     <div slot="content">
                                         <div style="width: 300px;">
@@ -152,7 +152,7 @@
                         <template slot-scope="scope">
                             <el-button type="primary" size="mini" @click="Edit(scope.row)">编
                                 辑</el-button>
-                           
+
                             <el-button type="danger" size="mini" @click="Del(scope.row)">删
                                 除</el-button>
                         </template>
@@ -160,7 +160,7 @@
                 </el-table>
                 <div class="block">
                     <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
-                        :current-page="currentPage" :page-sizes="[10, 20]" :page-size="pageSize"
+                        :current-page.sync="currentPage" :page-sizes="[10, 20]" :page-size="pageSize"
                         layout="total, sizes, prev, pager, next" :total="total">
                     </el-pagination>
                 </div>
@@ -213,6 +213,7 @@ export default {
             },
             userId: 0,
             token: '',
+            isSelect: true
         }
     },
     methods: {
@@ -227,6 +228,7 @@ export default {
         //当前页改变时触发 跳转其他页
         handleCurrentChange(val) {
             this.loading = true;
+            console.log("this.currentPage update", this.currentPage)
             this.pageloadData.pageIndex = val;
             this.pageloadData.pageSize = this.pageSize;
             this.pageload();
@@ -237,6 +239,11 @@ export default {
         },
         pageload() {
             var that = this;
+
+            if (this.userId == 21) {
+                this.isSelect = false;
+            }
+
             that.pageloadData.operationUserId = that.userId
             //初始化界面数据
             console.log(that.pageloadData)
@@ -259,6 +266,8 @@ export default {
                         that.PageList = resp.data.data.clientTableData.pageSource; //table数据
                         that.total = resp.data.data.clientTableData.pageCount; //总数
                         that.groupNumber = resp.data.data.groupNumber; //团组出团总数
+                        console.log(that.pageloadData.pageIndex, parseInt(that.pageloadData.pageIndex), 'that.pageloadData.pageIndex')
+                        that.currentPage = parseInt(that.pageloadData.pageIndex);
                     }
                     that.loading = false;
 
@@ -293,6 +302,18 @@ export default {
             this.pageload();
         },
         Edit(row) {
+            localStorage.setItem("mcrPageData", JSON.stringify({
+                inputLXR: this.inputLXR,
+                inputDW: this.inputDW,
+                inputDQ: this.inputDQ,
+                principalSel: this.principalSel,
+                territorySel: this.territorySel,
+                clientLvSel: this.clientLvSel,
+                clientTypeSel: this.clientTypeSel,
+                businessClassSel: this.businessClassSel,
+                pageSize: this.pageSize,
+                currentPage: this.currentPage,
+            }));
             this.$router.push('/home/MCROper?id=' + row.id);
         },
         Del(row) {
@@ -321,12 +342,46 @@ export default {
             });
         },
         Add(row) {
+            localStorage.setItem("mcrPageData", JSON.stringify({
+                inputLXR: this.inputLXR,
+                inputDW: this.inputDW,
+                inputDQ: this.inputDQ,
+                principalSel: this.principalSel,
+                territorySel: this.territorySel,
+                clientLvSel: this.clientLvSel,
+                clientTypeSel: this.clientTypeSel,
+                businessClassSel: this.businessClassSel,
+                pageSize: this.pageSize,
+                currentPage: this.currentPage,
+            }));
             this.$router.push('/home/MCROper?id=' + 0);
         }
     },
     mounted() {
         this.token = JSON.parse(localStorage.getItem('userinif')).token;
         this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        var mcrPageData = localStorage.getItem("mcrPageData");
+        if (mcrPageData) {
+            try {
+                console.log(mcrPageData);
+                var json = JSON.parse(mcrPageData);
+                this.inputLXR = json.inputLXR;
+                this.inputDW = json.inputDW;
+                this.inputDQ = json.inputDQ;
+                this.principalSel = json.principalSel;
+                this.territorySel = json.territorySel;
+                this.clientLvSel = json.clientLvSel;
+                this.clientTypeSel = json.clientTypeSel;
+                this.businessClassSel = json.businessClassSel;
+                this.pageSize = json.pageSize;
+                this.currentPage = json.currentPage;
+                localStorage.removeItem("mcrPageData");
+                this.QueryData();
+            } catch (e) {
+                this.pageload();
+            }
+            return;
+        }
         this.pageload();
     },
     computed: {