Browse Source

供应商模块

asd26269546 2 years ago
parent
commit
a5b68668f3

+ 2 - 2
src/components/board/board.vue

@@ -497,13 +497,13 @@ export default {
     }
   },
   mounted () {
-    this.getList()
+    //this.getList()
     // this.SRConnection()
     /* 10秒轮询一次 */
     this.lxTimer = setInterval(() => {
       //this.getList()
     }, 5000)
-    this.getTime()
+    //this.getTime()
   },
   destroyed () {
     clearInterval(this.nowTimer)

+ 7 - 6
src/components/main/components/header-bar/header-bar.vue

@@ -9,7 +9,7 @@
           <span class="text">智能仓储系统</span>
         </div>
         <div class="item">
-          <span class="title">Hi,{{ name }}</span>
+          <span class="title">Hi,{{ userInfo.real_name }}</span>
           <span class="sub-title">欢迎登录!</span>
         </div>
       </div>
@@ -23,7 +23,7 @@
         <div class="item info">
           <Poptip v-model="tipVisible" placement="bottom">
             <img :src="avatarPic" alt="">
-            <span class="sub-title">{{ name }}</span>
+            <span class="sub-title">{{ userInfo.real_name }}</span>
             <Icon type="md-arrow-dropdown" color="#0077ff" />
             <div class="tip-content" slot="content">
               <div class="tip-top">
@@ -31,9 +31,9 @@
                   <img :src="avatarPic" alt="">
                 </div>
                 <div class="tip-top-right">
-                  <div class="sub-title">{{ name }}</div>
-                  <div class="tip-top-text">{{ accessName }}</div>
-                  <div class="tip-top-text">工号:{{ jobNo }}</div>
+                  <div class="sub-title">{{ userInfo.real_name }}</div>
+                  <div class="tip-top-text">{{ userInfo.user_name }}</div>
+                  <!-- <div class="tip-top-text">工号:{{ userInfo.user_name }}</div> -->
                 </div>
               </div>
 <!--              <div class="tip-center">-->
@@ -135,7 +135,8 @@ export default {
         cfmPassword: [
           { required: true, message: '确认密码不能为空', trigger: 'blur' }
         ]
-      }
+      },
+      userInfo: JSON.parse(window.localStorage.getItem('token')),
     }
   },
   computed: {

+ 4 - 4
src/components/main/components/side-menu/side-menu.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="side-menu-wrapper">
 		<slot></slot>
-		<Menu theme="dark"  v-show="!collapsed" width="auto" active-name="1"  @on-select="handleSelect">
+		<Menu theme="dark"  v-show="!collapsed" width="auto" active-name="1" accordion  @on-select="handleSelect">
 			<div v-for="i in menuList" :key="i.id">
 				<MenuItem :name="i.id" v-if="!i.children || i.children.length == 0" :to="i.path">
 					<Icon type="ios-paper" />
@@ -134,9 +134,9 @@ export default {
 			this.openedNames = newNames
 		},
 		openedNames() {
-			this.$nextTick(() => {
-				this.$refs.menu.updateOpened()
-			})
+			// this.$nextTick(() => {
+			// 	this.$refs.menu.updateOpened()
+			// })
 		},
 	},
 	mounted() {

+ 9 - 3
src/components/main/main.vue

@@ -176,9 +176,9 @@ export default {
     ]),
     getMenu(){
       this.$get('/api/blade-system/menu/routes').then((res) => {
-        this.menuList = res.data[2].children
-        console.log(res)
-  
+        res.data.map(item=>{
+          if(item.id === '1585525818292314114') this.menuList = item.children
+        })
       })
     },
     ...mapActions(['handleLogin']),
@@ -271,3 +271,9 @@ export default {
   }
 }
 </script>
+<style>
+.ivu-menu-submenu a {
+  text-decoration: none;
+}
+
+</style>

+ 26 - 35
src/view/base-manage/provider-maintenance/provider-maintenance2.vue

@@ -59,12 +59,11 @@
     </Form>
     <div class="tabs-warp">
       <div 
-        @click="params.TechnologyType = i.technologyType;changePage(1);" 
-        :class="params.TechnologyType == i.technologyType ? 'active' : ''" 
+        @click="params.type = i.value;changePage(1);" 
+        :class="params.type == i.value ? 'active' : ''" 
         v-for="i in statisticsClassifyData" 
-        :key="i.technologyType">
-        {{(i.technologyType == 99) ? '全部' : technologyTypeList[i.technologyType]}}
-        (<span>{{(i.technologyType == 99) ? total : i.categoryCount}}</span>)
+        :key="i.value || 99">
+        {{i.label}}
       </div>
     </div>
     <my-table :calcHeight="110" :data="data" :columns="columns" :table-page="params" @event-handle="eventHandle" @on-change="changePage"></my-table>
@@ -158,14 +157,14 @@ export default {
         {
           type: 'input',
           label: '登录账户',
-          key: 'userAccount',
+          key: 'bindUserAccount',
           placeholder: '请输入登录账户',
           span: 12
         },
         {
           type: 'selectSearch',
           label: '物料类型',
-          key: 'categoryCode',
+          key: 'materialClassifyId',
           list: [],
           placeholder: '请选择物料类型',
           span: 12
@@ -914,12 +913,12 @@ export default {
         },
         {
           title: '供应商代码',
-          key: 'code',
+          key: 'supplierCoded',
           minWidth: 100
         },
         {
           title: '供应商名称',
-          key: 'name',
+          key: 'materialCode',
           minWidth: 300,
           render(h,p){
             return h(renderListimgs,{
@@ -931,7 +930,7 @@ export default {
         },
         {
           title: '物料类型',
-          key: 'categoryName',
+          key: 'malssifyName',
           minWidth: 150
         },
         {
@@ -1166,7 +1165,7 @@ export default {
     },
     cfm (type, formData) {
       if (type === 'add') {
-        axios.post('/cloudApi/supplier/add',formData).then(res=>{
+        this.$post('/api/storage-restructure/supplier/add',formData).then(res=>{
           this.show = false
           this.$Message.info(res.data.msg)
           this.getList()
@@ -1250,11 +1249,10 @@ export default {
       })
     },
     getList () {
-      axios
-				.post('/api/storage-restructure/supplier/page', {...this.params})
+      this.$post('/api/storage-restructure/supplier/page', {...this.params})
 				.then((res) => {
 					this.data = res.data.records
-          this.params.total = res.data.pages
+          this.params.total = res.data.total
 				})        
       // GetFactoryPageList(this.params).then(res => {
       //   if (res.code === 0) {
@@ -1266,7 +1264,7 @@ export default {
     getMaterialSelectPurposeList(){
       const v = this
       v.loading = true
-      v.post('/api/storage-restructure/supplier/getStatistics' + '', {})
+      v.$post('/api/storage-restructure/supplier/getStatistics' + '', {})
         .then((res) => {
           for (let i = 0; i < res.data.data.length; i++) {
             const element = res.data.data[i];
@@ -1291,22 +1289,15 @@ export default {
         })
     },
     getStatisticsClassify(){
-      axios
-				.post(
-					'/cloudApi/supplier/statisticsClassify',this.params)
+      this
+				.$post(
+					'/api/storage-restructure/supplier/getStatistics',this.params)
 				.then((res) => {
-					res.data.data.unshift({
-						technologyType: 99,
-						categoryCount: 0,
-					})
-					axios
-						.post('/cloudApi/supplier/list/count', {
-							...this.params,
-						})
-						.then((res) => {
-							this.total = res.data.data
-						})
-					this.statisticsClassifyData = res.data.data
+          res.data.map(item => {
+            if(!item.value) item.value = null
+          })
+					this.statisticsClassifyData = res.data
+					
 				})
     },
 
@@ -1315,12 +1306,12 @@ export default {
   mounted () {
     this.getList()
     // this.getUserPageList()
-    this.getMaterialCategoryZTree()
+    // this.getMaterialCategoryZTree()
     this.getStatisticsClassify()
-    this.getSupplierSelectList()
-    this.getMaterialSelectPurposeList()
-    this.getAccountDateList()
-    this.getSafetyWarnDayList()
+    // this.getSupplierSelectList()
+    // this.getMaterialSelectPurposeList()
+    // this.getAccountDateList()
+    // this.getSafetyWarnDayList()
   }
 }
 </script>