shish 2 лет назад
Родитель
Сommit
f026af4201
3 измененных файлов с 49 добавлено и 9 удалено
  1. 3 2
      ghsApp/src/admin/home/workbench.vue
  2. 39 7
      pt/src/saas/shop/shop.vue
  3. 7 0
      pt/src/service/shop/index.js

+ 3 - 2
ghsApp/src/admin/home/workbench.vue

@@ -281,15 +281,16 @@ export default {
 			})
 		},
 		startRenew(){
-			this.$util.pageTo({ url: "/admin/shop/renewSuccess"})
-			return false
+			uni.showLoading({mask:true})
 			renewShop().then(res=>{
+				uni.hideLoading()
 				if(res.code == 1){
 					wexinPay(res.data, this.getSuccess, this.getError)
 				}
 			})
 		},
 		getSuccess(){
+			this.closeRenew();
 			this.$util.pageTo({ url: "/admin/shop/renewSuccess"})
 		},
 		getError(){

+ 39 - 7
pt/src/saas/shop/shop.vue

@@ -11,6 +11,33 @@
               <el-button type="text" @click="addStaff(scope.row)">添加员工</el-button>
               <el-button type="text" @click="clearStock(scope.row)">清库存</el-button>
             </template>
+
+            
+            <template #table-column-ptStyle="{scope}">
+                <span v-if="scope.row.ptStyle == 1" style="color:#CCCCCC;">零售花店</span>
+                <span v-else>
+                  <span v-if="scope.row.pfLevel == 0" style="color:brown;">城市批发</span>
+                  <span v-else style="color:blue;">斗南批发</span>
+                </span>
+            </template>
+
+            <template #table-column-hasRenew="{scope}">
+                <span v-if="scope.row.hasRenew == 0" style="color:#CCCCCC;">-</span>
+                <span v-else>
+                  <i class="el-icon-success" style="color:green;font-size:20px;"></i>
+                </span>
+            </template>
+
+            <template #table-column-needRenew="{scope}">
+              <span v-if="scope.row.hasRenew == 1">
+                -
+              </span>
+              <span v-else>
+                <span v-if="scope.row.needRenew == 0" @click="changeRenewNeed(scope.row)" style="cursor: pointer;">未要求</span>
+                <span v-else style="color:blue;cursor: pointer;" @click="changeRenewNeed(scope.row)">已要求</span>
+              </span>
+            </template>
+
         </x-crud>
 
         <balance-detail v-if='showBalanceDetail' @closeFn='showBalanceDetail = false' ref="balanceDetail" :orderOperate="optionData" />
@@ -88,6 +115,12 @@ export default {
     mounted() {
     },
     methods: {
+      changeRenewNeed(info){
+          this.$service.shop.changeNeedRenew({id:info.id}).then(res => {
+            this.$message.success('操作成功')
+            this.app.refresh()
+          })
+        },
         clearStock(shop){
           this.clearStockPop = true 
           this.clearStockForm.shopId = shop.id
@@ -106,7 +139,6 @@ export default {
             if (valid) {
 
             } else {
-              console.log('出错了哦');
               return false;
             }
           })
@@ -129,7 +161,7 @@ export default {
                         {
                             prop: 'merchantName',
                             label: '商家',
-                            width: '120',
+                            width: '150',
                             align: 'center'
                         },
                         {
@@ -145,14 +177,14 @@ export default {
                             align: 'center'
                         },
                         {
-                            prop: 'balance',
-                            label: '余额',
+                            prop: 'hasRenew',
+                            label: '已续期',
                             width: '100',
                             align: 'center'
                         },
                         {
-                            prop: 'totalIncome',
-                            label: '收入',
+                            prop: 'needRenew',
+                            label: '续期',
                             width: '100',
                             align: 'center'
                         },
@@ -188,7 +220,7 @@ export default {
                             label: '地址',
                             align: 'center',
                             emptyText: '-',
-                            width: '370'
+                            width: '300'
                         }
                     ],
                     op: {

+ 7 - 0
pt/src/service/shop/index.js

@@ -13,5 +13,12 @@ export class ShopService extends BaseService {
 		});
 	}
 
+	changeNeedRenew(data) {
+		return this.request({
+			url: '/need-renew-change',
+			params: data
+		});
+	}
+
 }
 export default new ShopService();