Browse Source

no message

DaMowang 2 năm trước cách đây
mục cha
commit
90acb1c0b6

+ 0 - 1
src/App.vue

@@ -82,7 +82,6 @@ export default {
                     });
             });
         }
-
     },
 };
 </script>

+ 6 - 0
src/pages.json

@@ -530,6 +530,12 @@
 					"style": {
 						"navigationBarTitleText": "店铺详情"
 					}
+				},
+				{
+					"path": "settledMerchant/editmerchant",
+					"style": {
+						"navigationBarTitleText": "修改信息"
+					}
 				}
 			]
 		}

+ 1 - 1
src/pagesB/scenicSpotTicket/index.vue

@@ -2,7 +2,7 @@
     <div class="scenicSpotTicket">
         <scroll-view @scrolltolower="scrolltolower" class="scroll-view" :scroll-y="true" :scroll-top="scrollTop" @scroll="scroll" :lower-threshold="100">
             <div class="head_box">
-                <uni-easyinput prefixIcon="search" suffixIcon="搜索" v-model="qda.keyWord" placeholder="景点、目的地址、景点主题..." @confirm="onsearch" @change="onsearch" confirmType="search"/>
+                <uni-easyinput prefixIcon="search" v-model="qda.keyWord" placeholder="景点、目的地址、景点主题..." @confirm="onsearch" confirmType="search"/>
                 <div class="filter_box flex_r">
                     <div class="filter_item" @click="showAddress = true">
                         <span class="item_name">{{qda.cityName}}</span>

+ 5 - 5
src/pagesC/components/up/index.vue

@@ -4,7 +4,7 @@
             <img :src="i" class="logo" alt="" srcset="" />
             <div class="del iconfont" @click="del">&#xe609;</div>
         </div>
-        <div v-if="!imgs.length" class="upimg flex_c flex_ac flex_jc flex_wrap" @click="upimg">
+        <div v-if="imgs.length < count" class="upimg flex_c flex_ac flex_jc flex_wrap" @click="upimg">
             <div class="upico iconfont">&#xe674;</div>
             <div class="upmsg">最多{{ count }}张</div>
         </div>
@@ -43,12 +43,12 @@ export default {
                 sizeType: ["compressed"],
                 sourceType: ["album", "camera"],
                 success: async (res) => {
-                    let arr = [];
-                    for (const it of res.tempFiles) {
+                    let arr = res.tempFiles.slice(0,this.count - this.imgs.length)
+                    for (const it of arr) {
                         let url = await that.$up(it.tempFilePath)
-                        arr.push(url)
+                        this.imgs.push(url)
                     }
-                    that.imgs = arr; that.emitI(arr);
+                    that.emitI(this.imgs);
                 },
             });
         },

+ 10 - 6
src/pagesC/settledMerchant/addShop.vue

@@ -84,18 +84,21 @@
             <!-- <uni-forms-item label="开户手机" required name="open_phone">
                 <uni-easyinput v-model="formData.open_phone" type="text" placeholder="请输入开户手机" />
             </uni-forms-item> -->
-            <uni-forms-item label="平台截图" name="other_type">
-                <uni-data-select v-model="formData.other_type" :localdata="TypeDesc.other_type" placeholder="请选择平台"></uni-data-select>
-            </uni-forms-item>
-            <uni-forms-item label="上传截图">
-                <upimg v-model="formData.other_images"/>
+            <uni-forms-item label="商家简介" required name="summary">
+                <uni-easyinput v-model="formData.summary" type="textarea" autoHeight placeholder="请输入商家简介" />
             </uni-forms-item>
             <uni-forms-item label="店铺图集" required name="atlas">
-                <upimg v-model="formData.atlas" :count="6"/>
+                <upimg v-model="formData.atlas" :count="9"/>
             </uni-forms-item>
             <uni-forms-item label="入驻协议" required name="settled">
                 <upimg v-model="formData.settled" :count="9"/>
             </uni-forms-item>
+            <uni-forms-item label="平台截图" name="other_type">
+                <uni-data-select v-model="formData.other_type" :localdata="TypeDesc.other_type" placeholder="请选择平台"></uni-data-select>
+            </uni-forms-item>
+            <uni-forms-item label="上传截图">
+                <upimg v-model="formData.other_images"/>
+            </uni-forms-item>
         </uni-forms>
         <div class="btn" @click="submit">确认提交</div>
         <!-- <button class="button" @click="submit">校验表单</button> -->
@@ -125,6 +128,7 @@ export default {
                 discount: { rules: [{ required: true, errorMessage: '请输入让利比率' }] },
                 province: { rules: [{ required: true, errorMessage: '请选择省市区地址' }] },
                 address: { rules: [{ required: true, errorMessage: '请输入详细地址' }] },
+                summary: { rules: [{ required: true, errorMessage: '请输入商家简介' }] },
                 longitude: { rules: [{ required: true, errorMessage: '请输入经度' }] },
                 latitude: { rules: [{ required: true, errorMessage: '请输入纬度' }] },
                 contact: { rules: [{ required: true, errorMessage: '请输入联系人' }] },

+ 52 - 3
src/pagesC/settledMerchant/business.vue

@@ -1,5 +1,11 @@
 <template>
     <div class="myBusiness">
+        <uni-easyinput prefixIcon="search" v-model="Query.name" placeholder="店铺名称" @confirm="onsearch" confirmType="search"/>
+        <div class="tabs flex_r flex_jb">
+            <div v-for="(i,s) in tabs" :key="s"
+                :class="{active:Query.status==i.status}"
+                @click="ontab(i.status)">{{i.text}}</div>
+        </div>
         <div class="list" v-if="list.length">
             <div class="list-item" v-for="(i,s) in list" :key="s">
                 <div class="head_info_row flex_r flex_ac">
@@ -17,8 +23,8 @@
                     <div>商户电话:{{i.phone}}</div>
                 </div>
                 <div class="p1 flex_r">
-                    <div>今日流水:{{i.day_stream}}</div>
-                    <div>总流水:{{i.total_stream}}</div>
+                    <div>今日流水:{{i.day_stream || "0.00"}}</div>
+                    <div>总流水:{{i.total_stream || "0.00"}}</div>
                 </div>
             </div>
         </div>
@@ -34,16 +40,28 @@ export default {
     components: {empty},
     data() {
         return {
+            tabs: [
+                { status: 2, text: "已审核" },
+                { status: 1, text: "待审核" },
+                { status: 3, text: "未通过" },
+            ],
             list: [],
             Query: {
                 page: 1,
                 rows: 20,
+                status: 2,
+                operate: uni.getStorageSync("localInfo").operate
             },
             pageData: {},
         };
     },
     methods: {
-        getList() {
+        getList(page) {
+            console.log(page);
+            if (page) {
+                this.list = []
+                this.Query.page = 1
+            }
             post("v1/merchant/region", this.Query).then(res => {
                 if (res.code == 0) {
                     let da = res.data.data
@@ -55,6 +73,15 @@ export default {
                 }
             })
         },
+        ontab(va){
+            uni.showLoading({title: '加载中'})
+            this.Query.status = va;
+            this.getList(1)
+        },
+        onsearch(){
+            uni.showLoading({title: '加载中'})
+            this.getList(1)
+        }
     },
     onLoad(da) {
         uni.showLoading({title: '加载中'})
@@ -72,6 +99,28 @@ export default {
     padding: 28rpx 32rpx;
 }
 
+.tabs {
+    padding: 0 30rpx;
+    font-size: 30rpx;
+    font-weight: 600;
+    margin-bottom: 18rpx;
+    margin-top: 18rpx;
+
+    .active {
+        position: relative;
+
+        &::after {
+            content: "";
+            width: 88rpx;
+            height: 6rpx;
+            background-color: #2E57FD;
+            border-radius: 5rpx;
+            position: absolute;
+            left: 2rpx;
+            bottom: -8rpx;
+        }
+    }
+}
 .list{
     padding: 30rpx 0;
     .list-item{

+ 89 - 0
src/pagesC/settledMerchant/editmerchant.vue

@@ -0,0 +1,89 @@
+<template>
+    <div class="editmerchant">
+        <uni-forms ref="form" :modelValue="formData" label-width="80px">
+            <uni-forms-item label="联系人" name="contact">
+                <uni-easyinput v-model="formData.contact" type="text" placeholder="请输入联系人" />
+            </uni-forms-item>
+            <uni-forms-item label="联系电话" name="phone">
+                <uni-easyinput v-model="formData.phone" type="text" placeholder="请输入联系电话" />
+            </uni-forms-item>
+            <uni-forms-item label="商家简介" name="summary">
+                <uni-easyinput v-model="formData.summary" type="textarea" autoHeight placeholder="请输入商家简介" />
+            </uni-forms-item>
+            <uni-forms-item label="店铺图集" name="atlas">
+                <upimg v-model="formData.atlas" :count="9"/>
+            </uni-forms-item>
+        </uni-forms>
+        <div class="btnbar" @click="submit">确认修改</div>
+    </div>
+</template>
+
+<script>
+import upimg from "@/pagesC/components/up/index"
+import { post } from "@/request/api.js";
+export default {
+    name: "editmerchant",
+    props: {},
+    components: {upimg},
+    data() {
+        return {
+            formData: {}
+        };
+    },
+    methods: {
+        loadData(){
+            post("v1/merchant/shopDetail", { shop_id: this.shopID }).then((res) => {
+                if (res.code == 0) {
+                    this.formData = res.data;
+                }
+            });
+        },
+        submit() {
+            let that = this
+            uni.showModal({
+                title: "温馨提示",
+                content: "确认修改当前关联信息吗?",
+                success(res) {
+                    if (res.confirm) {
+                        that.$refs.form.validate().then((res) => {
+                            post("v1/merchant/edit",{ ...res, shop_id: that.shopID }).then(res=>{
+                                if (res.code == 0) {
+                                    that.$toast("修改成功")
+                                    setTimeout(() => {
+                                        uni.navigateBack({ delta: 1 })
+                                    }, 1500);
+                                }
+                            })
+                        })
+                    }
+                },
+            });
+        },
+    },
+    onLoad(da) {
+        this.shopID = da.id
+        this.loadData()
+    },
+    onShow() {},
+    mounted() {},
+};
+</script>
+
+<style scoped lang='scss'>
+.editmerchant{
+    padding: 28rpx 32rpx;
+}
+.btnbar {
+    width: calc(100% - 60rpx);
+    height: 80rpx;
+    background-color: rgba($color: #2e57fd, $alpha: 0.6);
+    border-radius: 45rpx;
+    position: fixed;
+    bottom: 50rpx;
+    left: 30rpx;
+    color: #fff;
+    font-size: 36rpx;
+    text-align: center;
+    line-height: 80rpx;
+}
+</style>

+ 18 - 1
src/pagesC/settledMerchant/merchant.vue

@@ -24,6 +24,10 @@
                 </div>
                 <div class="iconfont ico" @click="openm">&#xe6b3;</div>
             </div>
+            <div class="summary" v-if="detail.summary">
+                <div class="tit">店铺介绍</div>
+                <div class="txt ellipsis3">{{detail.summary}}</div>
+            </div>
             <div class="atlas_list">
                 <image v-for="(i,s) in detail.atlas" :key="s" :src="i" @click="onpreview(s)" mode="aspectFill" class="atlas_img" />
             </div>
@@ -227,7 +231,7 @@ export default {
 
     .h_address {
         padding: 20rpx 0;
-        margin-bottom: 10rpx;
+        margin-bottom: 26rpx;
 
         .address {
             font-size: 24rpx;
@@ -245,6 +249,19 @@ export default {
             font-size: 50rpx;
         }
     }
+    .summary{
+        font-size: 26rpx;
+        color: #666;
+        margin-bottom: 18rpx;
+        .tit {
+            height: 30rpx;
+            line-height: 30rpx;
+            font-size: 30rpx;
+            margin-bottom: 18rpx;
+            padding-left: 12rpx;
+            border-left: 6rpx solid #00A238;
+        }
+    }
 }
 .atlas_list{
     max-height: 334rpx;

+ 52 - 21
src/pagesC/settledMerchant/merchantDetail.vue

@@ -21,25 +21,42 @@
                 <div class="r" @click="copyText(detail.user_mobile)"><span class="iconfont">&#xe9d3;</span>电话:{{detail.user_mobile}}<span class="iconfont copy">&#xe602;</span></div>
             </div>
         </div>
-            <div class="card detail">
-                <div class="tit">关联信息</div>
-                <view class="label">
-                    <view class="title">开户银行:</view>
-                    <view class="nums">{{ detail.bank }}</view>
-                </view>
-                <view class="label">
-                    <view class="title">开户名称:</view>
-                    <view class="nums">{{ detail.account_name }}</view>
-                </view>
-                <view class="label">
-                    <view class="title">银行卡号:</view>
-                    <view class="nums">{{ detail.card_no }}</view>
-                </view>
-                <view class="label flex_r flex_js">
-                    <view class="title">店铺地址:</view>
-                    <view class="nums ellipsis2">{{ detail.address }}</view>
-                </view>
-            </div>
+        <div class="card detail">
+            <div class="tit">关联信息</div>
+            <view class="label">
+                <view class="title">开户银行:</view>
+                <view class="nums">{{ detail.bank }}</view>
+            </view>
+            <view class="label">
+                <view class="title">开户名称:</view>
+                <view class="nums">{{ detail.account_name }}</view>
+            </view>
+            <view class="label">
+                <view class="title">银行卡号:</view>
+                <view class="nums">{{ detail.card_no }}</view>
+            </view>
+            <view class="label">
+                <view class="title">让利比例:</view>
+                <view class="nums">{{ detail.discount * 100 }}%</view>
+            </view>
+            <view class="label">
+                <view class="title">联系人:</view>
+                <view class="nums">{{ detail.contact }}</view>
+            </view>
+            <view class="label">
+                <view class="title">联系电话:</view>
+                <view class="nums">{{ detail.phone }}</view>
+            </view>
+            <view class="label flex_r flex_js">
+                <view class="title">店铺地址:</view>
+                <view class="nums ellipsis2">{{ detail.address }}</view>
+            </view>
+            <view class="label flex_r flex_js">
+                <view class="title">店铺简介:</view>
+                <view class="nums ellipsis2">{{ detail.summary }}</view>
+            </view>
+        </div>
+        <div class="btnbar" @click="goto('/pagesC/settledMerchant/editmerchant',{id:shopID})">修改信息</div>
     </div>
 </template>
 
@@ -78,9 +95,10 @@ export default {
     },
     onLoad(da) {
         this.shopID = da.id;
+    },
+    onShow() {
         this.loadData();
     },
-    onShow() {},
     mounted() {},
 };
 </script>
@@ -152,7 +170,7 @@ export default {
         font-size: 30rpx;
         margin-bottom: 30rpx;
         padding-left: 12rpx;
-        border-left: 6rpx solid #EB5A5F;
+        border-left: 6rpx solid #2e57fd;
     }
 }
 .detail {
@@ -171,4 +189,17 @@ export default {
         width: 160rpx;
     }
 }
+.btnbar {
+    width: calc(100% - 60rpx);
+    height: 80rpx;
+    background-color: rgba($color: #2e57fd, $alpha: 0.6);
+    border-radius: 45rpx;
+    position: fixed;
+    bottom: 50rpx;
+    left: 30rpx;
+    color: #fff;
+    font-size: 36rpx;
+    text-align: center;
+    line-height: 80rpx;
+}
 </style>

+ 2 - 2
src/pagesC/settledMerchant/myBusiness.vue

@@ -24,8 +24,8 @@
                     <div>商户电话:{{i.phone}}</div>
                 </div>
                 <div class="p1 flex_r">
-                    <div>今日流水:{{i.day_stream}}</div>
-                    <div>总流水:{{i.total_stream}}</div>
+                    <div>今日流水:{{i.day_stream || "0.00"}}</div>
+                    <div>总流水:{{i.total_stream || "0.00"}}</div>
                 </div>
             </div>
         </div>

+ 2 - 2
src/pagesC/settledMerchant/myShop.vue

@@ -86,10 +86,10 @@ export default {
             });
         },
     },
-    onLoad(da) {
+    onLoad(da) {},
+    onShow() {
         this.getList()
     },
-    onShow() {},
     mounted() {},
 };
 </script>