Parcourir la source

修改仓储平台登录后只能看到自己的库存

lichao il y a 3 ans
Parent
commit
5bc5c370ef
1 fichiers modifiés avec 7 ajouts et 5 suppressions
  1. 7 5
      src/views/stock/index.vue

+ 7 - 5
src/views/stock/index.vue

@@ -428,6 +428,7 @@ export default {
       open: false,
       // 查询参数
       queryParams: {
+        createBy: '',
         pageNum: 1,
         pageSize: 50,
         fOriginalbillno: null,
@@ -690,14 +691,15 @@ export default {
       let that = this;
       this.data = {
         tableName: "库存总账",
-        userId: Cookies.get("userName"),
+        userId: Cookies.get("username"),
       };
-      console.log(Cookies.get("userName"));
+      console.log(Cookies.get("username"));
       request({
         url: '/system/set/select',
         method: 'get',
         params: this.data
       }).then((res) => {
+        console.log(res)
         if (res.data.data.length !== 0) {
           this.getRowList = res.data.data.filter((e) => e.checked == 0);
           this.setRowList = res.data.data
@@ -719,7 +721,7 @@ export default {
     delRow() {
       this.data = {
         tableName: "库存总账",
-        userId: Cookies.get("userName"),
+        userId: Cookies.get("username"),
       };
       request({
         url: '/system/set/resetModule',
@@ -739,7 +741,7 @@ export default {
       this.showSetting = false;
       this.data = {
         tableName: "库存总账",
-        userId: Cookies.get("userName"),
+        userId: Cookies.get("username"),
         sysTableSetList: this.setRowList,
       };
       request({
@@ -935,12 +937,12 @@ export default {
     /** 查询库存总账列表 */
     getList() {
       this.loading = true;
+      this.queryParams.createBy = Cookies.get("username");
       request({
         url: '/warehouseBusiness/whgenleg/whgenlegList',
         method: 'get',
         params: this.queryParams
       }).then((response) => {
-        console.log(response);
         response.data.rows.map((e) => {
           e.fCntrno=this.queryParams.isCntrno == 1 ? null:e.fCntrno
         })