Explorar el Código

采购页面优化

shish hace 3 años
padre
commit
8050ec56c8
Se han modificado 1 ficheros con 7 adiciones y 18 borrados
  1. 7 18
      ghsApp/src/pagesPurchase/supplier.vue

+ 7 - 18
ghsApp/src/pagesPurchase/supplier.vue

@@ -9,7 +9,7 @@
     <view class="order_list" >
     <block>
         <block v-if="!$util.isEmpty(supplierList)">
-          <view class="list_item" v-for="(item, index) in supplierList" :key="index" @click="goToDetail(item)" >
+          <view class="list_item" v-for="(item, index) in supplierList" :key="index" @click="goToCg(item)" >
             <view class="store_name">
               <image :src="item.avatar"></image>
               <view class="store_title">{{item.name}}</view>
@@ -65,33 +65,22 @@ export default {
       this.getGHSList(e)
     },
     getGHSList (name) {
-      return getList({
-        pageSize: 100,
-        name:name
-      }).then(res => {
+      return getList({ pageSize:300, name:name }).then(res => {
         this.supplierList = res.data.list
-      }).catch(err => { console.log(err) })
+      })
     },
     goToDebtList(item) {
-			uni.navigateTo({
-				url: `/pagesGys/details?id=${item.id}`,
-				success: result => {},
-				fail: () => {},
-				complete: () => {}
-			});
+      this.pageTo({url: '/pagesGys/details?id='+item.id,type:2})
 		},
-    // 采购记录详情
-    goToDetail (item) {
-      this.pageTo({ url: '/pagesPurchase/add?ghsId='+item.id+'&ghsName='+item.name})
+    goToCg (item) {
+      this.pageTo({url: '/pagesPurchase/add?ghsId='+item.id+'&ghsName='+item.name,type:2})
     },
-    // 添加供货商
     add() {
-      this.pageTo({ url: '/pagesPurchase/suppAdd' })
+      this.pageTo({url:'/pagesPurchase/suppAdd'})
     }
   }
 }
 </script>
-
 <style lang="scss" scoped>
 .input-wrap_box {
   background-color: #fff;