Forráskód Böngészése

自定义列修改

wengyuwen 4 éve
szülő
commit
404368b037

+ 0 - 1
src/views/purchaseRequest/index.vue

@@ -901,7 +901,6 @@ export default {
     //查询列数据
     getRow(data,list) {
       select(data).then((res) => {
-        console.log(res)
         if (data.tableName === '采购申请详情') {
           if (res.data.length != 0) {
             this.purchaseList.columnList = res.data.filter((e) => e.checked == 0)

+ 24 - 1
src/views/reportAnalysis/inoutStatistics.vue

@@ -23,7 +23,6 @@
       :queryList="queryList"
       :setRowList="setRowList"
       :tatolLabel="tatolLabel"
-
     />
     <el-pagination
       style="float: right;margin-top: 10px"
@@ -39,6 +38,9 @@
 </template>
 
 <script>
+import { select } from '@/api/system/set'
+import Cookies from 'js-cookie'
+
 export default {
   name: 'salesStatistics',
   data(){
@@ -249,8 +251,29 @@ export default {
   },
   created() {
     this.queryList.columnList = this.listStyle
+    let data = {
+      tableName: this.queryList.tableName,
+      userId: Cookies.get('userName')
+    }
+    this.getRow(data)
   },
   methods:{
+    getRow(data,list) {
+      select(data).then((res) => {
+        if (res.data.length != 0) {
+          this.queryList.columnList = res.data.filter((e) => e.checked == 0)
+          this.queryList.columnList = res.data
+          this.setRowList = res.data
+          this.queryList.columnList = this.queryList.columnList.filter((e) => e.checked == 0)
+          // this.waitFor = true
+        } else {
+          this.$set(this.queryList, 'columnList', this.$options.data().contentStyle)
+          this.setRowList = this.$options.data().contentStyle
+        }
+        this.isItHidden = false
+        this.inDex = this.formOption.length
+      })
+    },
     //修改
     modification(scope) {
       console.log(scope)

+ 1 - 4
src/views/warehouse/inStock/index.vue

@@ -69,7 +69,7 @@
         :customButton="detailButton"
         :listStyle="detailStyle"
         :hasPermi="hasPermi"
-        :setRowList="detailStyle"
+        :setRowList="setRowList"
         :tatolLabel="tatolLabel"
         :listData="listData"
         :queryList="detailList"/>
@@ -1050,18 +1050,15 @@ export default {
           this.inDex = this.detailOption.length
         }else {
           if (res.data.length != 0) {
-            console.log('大爷在此')
             this.queryList.columnList = res.data.filter((e) => e.checked == 0);
             this.queryList.columnList = res.data;
             this.setRowList = res.data
             this.queryList.columnList = this.queryList.columnList.filter((e) => e.checked == 0);
             this.waitFor = true
           }else {
-            console.log('大爷在此1')
             this.waitFor = true
             this.$set(this.queryList,'columnList',this.$options.data().listStyle)
             this.setRowList = this.$options.data().listStyle
-            console.log(this.$options.data().listStyle)
           }
           this.isItHidden = true
           this.inDex = 4

+ 7 - 6
src/views/warehouse/outStock/index.vue

@@ -26,7 +26,7 @@
         :hasPermi="hasPermi"
         :tatolLabel="mainTatol"
         :seachButton="seachButton"
-        :setRowList="listStyle"
+        :setRowList="setRowList"
         :listStyle="listStyle"
         :isItHidden="isItHidden"
         :queryList="queryList"/>
@@ -69,7 +69,7 @@
         :customButton="detailButton"
         :listStyle="detailStyle"
         :hasPermi="hasPermi"
-        :setRowList="detailStyle"
+        :setRowList="setRowList"
         :tatolLabel="tatolLabel"
         :listData="listData"
         :queryList="detailList"/>
@@ -147,6 +147,7 @@ export default {
   name: 'inStock',
   data(){
     return{
+      setRowList:[],
       hasPermi:{
         lookup:['anpin:stockControl:query'],
         disappear:['anpin:stockControl:remove']
@@ -1036,8 +1037,8 @@ export default {
             // this.waitFor = true
           }else {
             // this.waitFor = true
-            this.detailList.columnList = this.detailStyle
-            this.setRowList = this.detailStyle
+            this.$set(this.detailList,'columnList',this.$options.data().detailStyle)
+            this.setRowList = this.$options.data().detailStyle
           }
           // this.pageDisplay = false
           this.isItHidden = false
@@ -1051,8 +1052,8 @@ export default {
             this.waitFor = true
           }else {
             this.waitFor = true
-            this.queryList.columnList = this.listStyle
-            this.setRowList = this.listStyle
+            this.$set(this.queryList,'columnList',this.$options.data().listStyle)
+            this.setRowList = this.$options.data().listStyle
           }
           // this.pageDisplay = true
           this.isItHidden = true