shish 3 лет назад
Родитель
Сommit
adbab4d1d0
3 измененных файлов с 30 добавлено и 12 удалено
  1. 21 5
      hdApp/src/admin/home/workbench.vue
  2. 1 1
      hdApp/src/pages.json
  3. 8 6
      hdApp/src/pagesPurchase/order.vue

+ 21 - 5
hdApp/src/admin/home/workbench.vue

@@ -130,6 +130,16 @@ export default {
   computed: {
   computed: {
     ...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" })
     ...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" })
   },
   },
+	watch: {
+		//纯花店打开直接跳转到采购页
+		loginInfo(newVal) {
+			if(!this.$util.isEmpty(newVal.pfShopId)){
+	    if(Number(newVal.pfShopId) == 0){
+	      uni.reLaunch({ url: '/pagesPurchase/order' })
+	    }
+	  }
+		}
+	},
   onLoad () {
   onLoad () {
 
 
   },
   },
@@ -138,6 +148,16 @@ export default {
     uni.stopPullDownRefresh();
     uni.stopPullDownRefresh();
   },
   },
   onShow () {
   onShow () {
+
+    //纯花店打开直接跳转到采购页
+    if(!this.$util.isEmpty(this.loginInfo)){
+      if(!this.$util.isEmpty(this.loginInfo.pfShopId)){
+        if(Number(this.loginInfo.pfShopId) == 0){
+          uni.reLaunch({ url: '/pagesPurchase/order' })
+        }
+      }
+    }
+
       getShopInfo().then(res => {
       getShopInfo().then(res => {
         if(res.name){
         if(res.name){
           uni.setNavigationBarTitle({ title: res.name })
           uni.setNavigationBarTitle({ title: res.name })
@@ -155,11 +175,7 @@ export default {
     goCg(){
     goCg(){
       // #ifdef MP-WEIXIN
       // #ifdef MP-WEIXIN
         //只有一个供应商,点采购直接去这个供应商的采购页
         //只有一个供应商,点采购直接去这个供应商的采购页
-        if(this.dictInfo.shop && this.dictInfo.shop.hasManyGhs == 0 && Number(this.dictInfo.shop.uniGhsId) > 0){
-          this.$util.pageTo({url:'/pagesPurchase/ghsProduct?id='+this.dictInfo.shop.uniGhsId})
-        }else{
-          this.$util.pageTo({url:'/pagesPurchase/order'})
-        }
+        this.$util.pageTo({url:'/pagesPurchase/order'})      
       // #endif
       // #endif
       // #ifdef APP-PLUS
       // #ifdef APP-PLUS
       let that = this
       let that = this

+ 1 - 1
hdApp/src/pages.json

@@ -352,7 +352,7 @@
 			"pages": [
 			"pages": [
 				{ "path": "result", "style": { "navigationBarTitleText": "结果" } },
 				{ "path": "result", "style": { "navigationBarTitleText": "结果" } },
 				{ "path": "add", "style": { "navigationBarTitleText": "新增采购单", "enablePullDownRefresh": true } },
 				{ "path": "add", "style": { "navigationBarTitleText": "新增采购单", "enablePullDownRefresh": true } },
-				{ "path": "gathering", "style": { "navigationBarTitleText": "欠款订单", "enablePullDownRefresh": true } },
+				{ "path": "gathering", "style": { "navigationBarTitleText": "待结订单", "enablePullDownRefresh": true } },
 				{ "path": "particulars", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": true } },
 				{ "path": "particulars", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": true } },
 				{ "path": "details", "style": { "navigationBarTitleText": "确认订单" } },
 				{ "path": "details", "style": { "navigationBarTitleText": "确认订单" } },
 				{ "path": "order", "style": { "navigationBarTitleText": "供应商", "enablePullDownRefresh": true } },
 				{ "path": "order", "style": { "navigationBarTitleText": "供应商", "enablePullDownRefresh": true } },

+ 8 - 6
hdApp/src/pagesPurchase/order.vue

@@ -9,17 +9,19 @@
               <view class="store_title">{{ghsInfo.name}}</view>
               <view class="store_title">{{ghsInfo.name}}</view>
               <view class="accumulative"></view>
               <view class="accumulative"></view>
             </view>
             </view>
-            <text class="debt-amount" v-if="Number(ghsInfo.debtAmount)>0">-¥{{parseFloat(ghsInfo.debtAmount)}}</text>
-            <view :class="[ghsInfo.isOpen == 0 ? 'cg-button-rest' : 'cg-button']" @click="enterShop(ghsInfo)">进店</view>
+
+            <view :class="[ghsInfo.isOpen == 0 ? 'cg-button-rest' : 'cg-button']" @click="enterShop(ghsInfo)">买花</view>
 
 
             <view class="store_btn">
             <view class="store_btn">
               <view class="btn_entrance" @click="pageTo({ url: '/admin/clear/list?ghsId='+ghsInfo.id})">结账单</view>
               <view class="btn_entrance" @click="pageTo({ url: '/admin/clear/list?ghsId='+ghsInfo.id})">结账单</view>
               <view class="btn_entrance" @click="pageTo({url:'/pagesPurchase/shopping'})" > 采购记录 </view>
               <view class="btn_entrance" @click="pageTo({url:'/pagesPurchase/shopping'})" > 采购记录 </view>
-              <view class="btn_entrance" @click="settleAccounts(ghsInfo)"> 待结订单 </view>
+              <view class="btn_entrance" style="color:red;" @click="settleAccounts(ghsInfo)"> 待结订单 </view>
               <view class="btn_entrance" @click="pageTo({ url: '/admin/ghs/debtChange?ghsId='+ghsInfo.id})">欠款变动明细</view>
               <view class="btn_entrance" @click="pageTo({ url: '/admin/ghs/debtChange?ghsId='+ghsInfo.id})">欠款变动明细</view>
             </view>
             </view>
             <text v-if="ghsInfo.isOpen == 0" 
             <text v-if="ghsInfo.isOpen == 0" 
             style="position:absolute;top:0upx;left:0upx;color:white;background-color:#CCCCCC;padding:3upx 18upx;font-size:24upx;">已休店</text>
             style="position:absolute;top:0upx;left:0upx;color:white;background-color:#CCCCCC;padding:3upx 18upx;font-size:24upx;">已休店</text>
+            <view style="position:absolute;top:275upx;font-size:29upx;text-align:center;width:100vw;color:red;font-weight:bold;" @click="settleAccounts(ghsInfo)" v-if="Number(ghsInfo.debtAmount)>0"
+            >待结 {{ghsInfo.debtNum}}笔{{ghsInfo.debtAmount?parseFloat(ghsInfo.debtAmount):0}}元</view>
           </view>
           </view>
         </block>
         </block>
         <block v-else>
         <block v-else>
@@ -126,7 +128,7 @@ export default {
     .list_item {
     .list_item {
       margin: 20upx 0 0;
       margin: 20upx 0 0;
       position: relative;
       position: relative;
-      height: 300upx;
+      height: 350upx;
       width: 100vw;
       width: 100vw;
       background: #fff;
       background: #fff;
       display: flex;
       display: flex;
@@ -244,10 +246,10 @@ export default {
         left: 0upx;
         left: 0upx;
         & > .btn_entrance {
         & > .btn_entrance {
           display: inline-block;
           display: inline-block;
-          font-size: 30upx;
+          font-size: 32upx;
           color: #BBBBBB;
           color: #BBBBBB;
           padding: 10upx 10upx;
           padding: 10upx 10upx;
-          margin-left: 32upx;
+          margin-left: 25upx;
           text-decoration: underline;
           text-decoration: underline;
           color:#666666;
           color:#666666;
         }
         }