陶杰
2024-12-10 b07889e22f823fac80a66b503671e170668f4ee6
pages/home/supplier-home.vue
@@ -20,8 +20,7 @@
               ||(currentInfo.supplierDTO&&currentInfo.supplierDTO.cover)
               ||(currentInfo.partnerDTO&&currentInfo.partnerDTO.cover)
               || currentInfo.picture
               " :src="
               (currentInfo.customerDTO&&currentInfo.customerDTO.cover)
            " :src="(currentInfo.customerDTO && currentInfo.customerDTO.cover)
               ||(currentInfo.supplierDTO&&currentInfo.supplierDTO.cover)
               ||(currentInfo.partnerDTO&&currentInfo.partnerDTO.cover)
               || currentInfo.picture
@@ -38,7 +37,7 @@
            <image class="user-icon" v-if="currentInfo.picture" :src="currentInfo.picture" mode="aspectFit"></image> -->
            <view class="name">
               <view class="t1">
               <view class="t1 flex" style="align-items: center; justify-content: space-between;">
                  <!-- {{ (!!currentInfo.supplierDTO?(currentInfo.supplierDTO.name):"") || currentInfo.nickName || currentInfo.loginName || '-'}} -->
                  <span v-if="currentInfo.partnerDTO && currentInfo.partnerDTO.name">
                     {{ currentInfo.partnerDTO.name }}
@@ -62,6 +61,12 @@
                  <span v-if="currentInfo.partnerDTO&&currentInfo.partnerDTO.status!=='P'">
                     ({{currentInfo.partnerDTO?currentInfo.partnerDTO.statusStr:''}})</span>
                  <span v-if="!currentInfo.partnerDTO&&currentInfo.type==='partner'">(信息待完善)</span>
                  <u--image v-if="selftype === 'supplier' && currentInfo.switchFlag "
                     src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/fa/fa6585cd52d54156b5d64fa59af58180switch.png"
                     width="10px" height="10px" style="margin-left: 10px; margin-right: 10px;"
                     @click="switchSubAccount"></u--image>
                  <u--text v-if="selftype === 'supplier' && currentInfo.switchFlag " style="color: black;" text="切换账号" @click="switchSubAccount"></u--text>
               </view>
               <view class="t2">{{currentInfo.tel || '暂无电话'}}</view>
               <view class="t2" v-if="currentInfo.partnerDTO && currentInfo.partnerDTO.id">
@@ -73,7 +78,12 @@
      </view>
      <view class="item-container" :class="[selftype?selftype:'']">
      <view class="item-container" :class="[selftype ? selftype : '']"
         v-if="
            (selftype === 'supplier' && $hasPermission('supplier:workbench:mine:profit'))
         ||  (selftype === 'partner' && $hasPermission('partner:workbench:mine:profit'))
         ">
         <view class="title">我的收益</view>
         <view class="flex tj-container" v-if="selftype==='partner'">
            <view class="tj-each">
@@ -116,7 +126,8 @@
            </view>
         </view>
         <view class="flex tj-container">
            <view class="tj-each" @click="selftype=='supplier'&&goto('/pages/order/order-delivery?range=today',true)">
            <view class="tj-each"
               @click="selftype == 'supplier' && goto('/pages/order/order-delivery?range=today', true)">
               <view class="num">
                  {{tj.orderCountToday||0}}单
               </view>
@@ -124,7 +135,8 @@
                  今日订单数
               </view>
            </view>
            <view class="tj-each" @click="selftype=='supplier'&&goto('/pages/order/order-delivery?range=yesterday',true)">
            <view class="tj-each"
               @click="selftype == 'supplier' && goto('/pages/order/order-delivery?range=yesterday', true)">
               <view class="num">
                  {{tj.orderCountYesterday||0}}单
               </view>
@@ -132,7 +144,8 @@
                  昨日订单数
               </view>
            </view>
            <view class="tj-each" @click="selftype=='supplier'&&goto('/pages/order/order-delivery?range=month',true)">
            <view class="tj-each"
               @click="selftype == 'supplier' && goto('/pages/order/order-delivery?range=month', true)">
               <view class="num">
                  {{tj.orderCountMonth||0}}单
               </view>
@@ -142,7 +155,8 @@
            </view>
         </view>
      </view>
      <view class="item-container flex m-t-12" style="padding: 34rpx 44rpx;" v-if="selftype=='supplier'">
      <view class="item-container flex m-t-12" style="padding: 34rpx 44rpx;"
         v-if="(selftype == 'supplier' && $hasPermission('supplier:workbench:after:sale'))">
         <view class="rate-view flex1" style="max-width: 140rpx;">
            <view class="title">售后率</view>
            <view class="title" style="color: red;">{{((tj.salesRate||0)*100).toFixed(2)}}%</view>
@@ -158,87 +172,115 @@
            <view class="title">{{tj.deliverTotal||0}}扎</view>
         </view>
      </view>
      <view class="m-t-12" @click="getNoticeMore">
      <view v-if="
            (selftype === 'supplier' && $hasPermission('supplier:workbench:notice') )
         ||  (selftype === 'partner' && $hasPermission('partner:workbench:notice'))
         "
         class="m-t-12" @click="getNoticeMore">
         <uni-notice-bar class="notice-bar" color="#333" background-color="#fff" show-get-more show-icon
            :scrollable="scrollable" :text="currentNotice.title||'暂无公告'" :key="currentNotice.id" />
         <span v-if="!currentNotice||!currentNotice.id">&nbsp;</span>
      </view>
      <view class="item-container">
      <view class="item-container  m-t-12"
         v-if="
         (selftype === 'supplier' && $hasPermission('supplier:workbench:common:functions') )
         ||  (selftype === 'partner' && $hasPermission('partner:workbench:common:functions'))
         ">
         <view class="title">常用功能</view>
         <view class="flex order-icons m-t-12">
            <view class="nav row margin-tb" v-if="selftype==='partner'"
         <view class="flex order-icons m-t-12 function-container ">
            <view class="nav row margin-tb function-item "
            v-if="(selftype === 'partner' && $hasPermission('partner:workbench:common:functions:order:management'))"
               @click="goto('/sub_pages/partner/order-manage/order-manage',true)">
               <view class="img-c">
                  <image class="icon margin-bottom order-icon ddgl"
                     src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/23/23a7ad86e00c4ba28cd962dc4910433cuser-icon-ddgl.png" mode="scaleToFill" />
                     src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/23/23a7ad86e00c4ba28cd962dc4910433cuser-icon-ddgl.png"
                     mode="scaleToFill" />
               </view>
               <view class="order-desc tg">订单管理</view>
            </view>
            <view class="nav row margin-tb" v-if="selftype==='supplier'"
            <view class="nav row margin-tb function-item "
               v-if="(selftype === 'supplier' && $hasPermission('supplier:workbench:common:functions:order:statistics'))"
               @click="goto('/sub_pages/supplier/order-manage/order-manage',true)">
               <view class="img-c">
                  <image class="icon margin-bottom order-icon ddgl"
                     src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/23/23a7ad86e00c4ba28cd962dc4910433cuser-icon-ddgl.png" mode="scaleToFill" />
                     src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/23/23a7ad86e00c4ba28cd962dc4910433cuser-icon-ddgl.png"
                     mode="scaleToFill" />
               </view>
               <view class="order-desc tg">订单统计</view>
            </view>
            <!-- <view class="nav row margin-tb"
            <view
               v-if="(selftype==='partner' && $hasPermission('partner:workbench:common:functions:bill:settlement'))"
               class="nav row margin-tb function-item "
               @click="goto('/sub_pages/supplier/order-settlement/order-settlement',true)">
               <view class="img-c">
                  <image class="icon margin-bottom order-icon zdjs"
                     src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/7b/7b7ed1488fd64f6fa9bc6b557f141f37user-icon-zdjs.png" mode="scaleToFill" />
               </view>
               <view class="order-desc tg">账单结算</view>
            </view> -->
            <view class="nav row margin-tb" @click="toFlowManage" v-if="selftype==='supplier'">
            </view>
            <view class="nav row margin-tb function-item " @click="toFlowManage"
               v-if="selftype === 'supplier' && $hasPermission('supplier:workbench:common:functions:product:management')">
               <view class="img-c">
                  <image class="icon margin-bottom order-icon spgl"
                     src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/47/478e007ad07a43ea9f40a962d83cedb4user-icon-spgl.png" mode="scaleToFill" />
                     src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/47/478e007ad07a43ea9f40a962d83cedb4user-icon-spgl.png"
                     mode="scaleToFill" />
               </view>
               <view class="order-desc cqw">商品管理</view>
            </view>
            <view class="nav row margin-tb" v-if="selftype==='partner'"
            <view class="nav row margin-tb function-item "
            v-if="(selftype === 'partner' && $hasPermission('partner:workbench:common:functions:markup:configuration'))"
               @click="goto('/sub_pages/partner/markup-config/markup-config',true)">
               <view class="img-c">
                  <image class="icon margin-bottom order-icon jjpz"
                     src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/93/93356ec339074b49b04c1a3a37146f22user-icon-jjpz.png" mode="scaleToFill" />
                     src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/93/93356ec339074b49b04c1a3a37146f22user-icon-jjpz.png"
                     mode="scaleToFill" />
               </view>
               <view class="order-desc tg">加价配置</view>
            </view>
            <view class="nav row margin-tb" @click="goto('/pages/order/order-sale/order-sale',true)">
            <view class="nav row margin-tb function-item "
               v-if="(selftype === 'supplier' && $hasPermission('supplier:workbench:common:functions:after:sale:claim')) ||
               (selftype === 'partner' && $hasPermission('partner:workbench:common:functions:after:sale:claim') )"
               @click="goto('/pages/order/order-sale/order-sale', true)">
               <view class="img-c">
                  <image class="icon margin-bottom order-icon shlp"
                     src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/47/47b54c52e4c2430c8f9e91645fbf9ebduser-icon-shlp.png" mode="scaleToFill" />
                     src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/47/47b54c52e4c2430c8f9e91645fbf9ebduser-icon-shlp.png"
                     mode="scaleToFill" />
               </view>
               <view class="order-desc syst">售后理赔</view>
            </view>
   
            <!-- <view class="nav row margin-tb" @click="printDeliveryOrder">
            <!-- <view class="nav row margin-tb function-item " @click="printDeliveryOrder">
               <view class="img-c">
                  <image class="icon margin-bottom order-icon kkjl"
                     src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/22/22db478554ec436a8c7e6e89c346767duser-icon-kkjl.png" mode="scaleToFill" />
               </view>
               <view class="order-desc wbsp">测试蓝牙</view>
            </view> -->
         </view>
         <view class="flex order-icons m-t-12">
            <view class="nav row margin-tb" v-if="selftype==='supplier'" @click="goto('/sub_pages/supplier/wallet/my-wallet',true)">
         <!-- </view>
         <view class="flex order-icons m-t-12"> -->
            <view class="nav row margin-tb function-item "
               v-if="(selftype === 'supplier' && $hasPermission('supplier:workbench:common:functions:my:wallet'))" @click="goto('/sub_pages/supplier/wallet/my-wallet', true)">
               <view class="img-c">
                  <image class="icon margin-bottom order-icon shlp"
                     src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/8d/8d72f2df8a4348ac90bfbfb553a9cc71qianbao.png" mode="scaleToFill" />
                     src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/8d/8d72f2df8a4348ac90bfbfb553a9cc71qianbao.png"
                     mode="scaleToFill" />
               </view>
               <view class="order-desc syst">我的钱包</view>
            </view>
            <view class="nav row margin-tb">
               
            </view>
            <view class="nav row margin-tb">
               
            <view class="nav row margin-tb function-item "
               v-if="(selftype === 'supplier' && $hasPermission('supplier:workbench:common:functions:sub:account'))"
               @click="goto('/sub_pages/supplier/sub-account/sub-account-list', true)">
               <view class="img-c">
                  <image class="icon margin-bottom order-icon shlp"
                     src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/56/56d1a93862a4470e9b4481b970fd6fc9子账号管理.png"
                     mode="scaleToFill" />
            </view>
            <view class="nav row margin-tb">
               <view class="order-desc syst">子账号</view>
            </view>
            <!-- <view class="nav row margin-tb function-item "></view> -->
         </view>
      </view>
@@ -361,6 +403,11 @@
      },
      methods: {
      switchSubAccount() {
         uni.navigateTo({
            url: '/sub_pages/supplier/sub-account/sub-account-switch-list'
         })
      },
         printDeliveryOrder(item) {
            //蓝牙打印
            var that = this;
@@ -566,5 +613,20 @@
   @import "./home.scss";
</style>
<style lang="scss" scoped>
<style lang="css" scoped>
.function-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-start;
}
.function-item {
  min-width: 25%;
  max-width: 25%;
  text-align: center;
  padding: 10px;
  box-sizing: border-box;
  margin-bottom: 10px;
}
</style>