소스 검색

Merge branch 'ch/ht_3.0' of eta_mini/eta_mini_crm_front into debug_ht

leichen 7 달 전
부모
커밋
31cdeac361

+ 2 - 2
src/api/system/message.js

@@ -3,10 +3,10 @@ import { get, post } from "@/api/index";
 export default {
   //系统消息
   list: () => {
-    return get("/sys_message/list", {});
+    return get("/user/message", {});
   },
   // 消息已读
   msgRead: (params) => {
-    return post("/sys_message/read", params);
+    return post("/user/readMessage", params);
   },
 };

+ 3 - 0
src/assets/svg/failure.svg

@@ -0,0 +1,3 @@
+<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M14 7C14 3.13401 10.866 1.18292e-06 7 0C3.13401 -2.14186e-06 1.18292e-06 3.134 0 7C-2.14186e-06 10.866 3.134 14 7 14C10.866 14 14 10.866 14 7ZM4.67091 3.94754L7.00001 6.29075L9.32912 3.94754L10.0384 4.65251L7.70499 7L10.0383 9.34749L9.32911 10.0525L7.00001 7.70925L4.67092 10.0525L3.96168 9.34749L6.29503 7L3.96167 4.65251L4.67091 3.94754Z" fill="#D54941"/>
+</svg>

+ 10 - 2
src/assets/svg/notification-filled.svg

@@ -1,3 +1,11 @@
-<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M8.49993 2.02746V1H7.49993V2.02746C5.24996 2.27619 3.49993 4.18372 3.49993 6.5V11L2.59993 12.2C2.35272 12.5296 2.58791 13 2.99993 13H5.54994C5.78158 14.1411 6.79045 15 7.99993 15C9.20941 15 10.2183 14.1411 10.4499 13H12.9999C13.412 13 13.6471 12.5296 13.3999 12.2L12.4999 11V6.5C12.4999 4.18372 10.7499 2.27619 8.49993 2.02746Z" fill="white"/>
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_2563_19773)">
+<path d="M17.0965 13.9594L16.0431 12.2232C15.7945 11.8145 15.663 11.3452 15.6631 10.8668V6.91367C15.6631 3.79082 13.1226 1.25 9.99977 1.25C6.87692 1.25 4.3361 3.79082 4.3361 6.91367V10.8668C4.3361 11.3453 4.20466 11.8143 3.95622 12.2232L2.92438 13.9201L2.9027 13.9594C2.73571 14.2941 2.75368 14.6838 2.95055 15.0021C3.14743 15.3201 3.48825 15.51 3.86227 15.51H6.26325C6.52438 17.3381 8.10016 18.7482 9.99958 18.7482C11.8988 18.7482 13.4746 17.3381 13.7357 15.51H16.1371C16.5111 15.51 16.8517 15.3201 17.0484 15.0021C17.2453 14.6842 17.2634 14.2941 17.0965 13.9594ZM9.99977 17.6762C8.69313 17.6762 7.60016 16.7441 7.35075 15.51H12.6486C12.3992 16.7441 11.3064 17.6762 9.99977 17.6762ZM3.86442 14.4379L4.87243 12.7801C5.2228 12.2035 5.40812 11.5417 5.40817 10.867V6.91387C5.40817 4.38203 7.46794 2.32227 9.99977 2.32227C12.5314 2.32227 14.591 4.38203 14.591 6.91387V10.867C14.591 11.542 14.7763 12.2037 15.1271 12.7803L16.1349 14.4379H3.86442Z" fill="black"/>
+<path d="M17.0965 13.9594L16.0431 12.2232C15.7945 11.8145 15.663 11.3452 15.6631 10.8668V6.91367C15.6631 3.79082 13.1226 1.25 9.99977 1.25C6.87692 1.25 4.3361 3.79082 4.3361 6.91367V10.8668C4.3361 11.3453 4.20466 11.8143 3.95622 12.2232L2.92438 13.9201L2.9027 13.9594C2.73571 14.2941 2.75368 14.6838 2.95055 15.0021C3.14743 15.3201 3.48825 15.51 3.86227 15.51H6.26325C6.52438 17.3381 8.10016 18.7482 9.99958 18.7482C11.8988 18.7482 13.4746 17.3381 13.7357 15.51H16.1371C16.5111 15.51 16.8517 15.3201 17.0484 15.0021C17.2453 14.6842 17.2634 14.2941 17.0965 13.9594ZM9.99977 17.6762C8.69313 17.6762 7.60016 16.7441 7.35075 15.51H12.6486C12.3992 16.7441 11.3064 17.6762 9.99977 17.6762ZM3.86442 14.4379L4.87243 12.7801C5.2228 12.2035 5.40812 11.5417 5.40817 10.867V6.91387C5.40817 4.38203 7.46794 2.32227 9.99977 2.32227C12.5314 2.32227 14.591 4.38203 14.591 6.91387V10.867C14.591 11.542 14.7763 12.2037 15.1271 12.7803L16.1349 14.4379H3.86442Z" fill="black"/>
+</g>
+<defs>
+<clipPath id="clip0_2563_19773">
+<rect width="20" height="20" fill="white"/>
+</clipPath>
+</defs>
 </svg>

+ 3 - 0
src/assets/svg/success.svg

@@ -0,0 +1,3 @@
+<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M7 14C10.866 14 14 10.866 14 7C14 3.13401 10.866 0 7 0C3.13401 0 0 3.13401 0 7C0 10.866 3.13401 14 7 14ZM3.5 7.2065L4.2065 6.5L6 8.293L9.7925 4.5L10.5 5.2075L6 9.707L3.5 7.2065Z" fill="#2BA471"/>
+</svg>

+ 15 - 17
src/layout/components/HeaderWrap.vue

@@ -2,7 +2,6 @@
 import { useLayoutState } from '../hooks/index'
 import { useRoute, useRouter } from 'vue-router'
 import NoticeWrap from './NoticeWrap.vue'
-import {apiSystemMessage} from '@/api/system'
 
 const { menuClose, menuCloseChange } = useLayoutState()
 
@@ -36,14 +35,6 @@ function handleClickBreadcrumb(e){
 }
 
 
-// 阅读消息
-function handleReadNotice(){
-  apiSystemMessage.msgRead().then(res=>{
-    if(res.Ret===200){
-      hasUnRead.value=false
-    }
-  })
-}
 const hasUnRead=ref(false)//是否有未读
 
 const userName=computed(()=>{
@@ -90,14 +81,17 @@ function handleCommand(command){
     </el-breadcrumb>
     <div class="content"></div>
     <!-- 通知 -->
-    <el-popover placement="bottom" :width="500" trigger="click" @show="handleReadNotice" v-if="hasPermission('message:info')">
-      <template #reference>
-        <div :class="['system-notice-box',hasUnRead?'system-notice-box_red':'']">
-          <svg-icon name="notification-filled" size="18px"></svg-icon>
-        </div>
-      </template>
-      <NoticeWrap @change="e=>hasUnRead=e"/>
-    </el-popover>
+     <!-- v-if="hasPermission('message:info')"  @show="handleReadNotice" -->
+    <div class="popover">
+      <el-popover placement="bottom" :width="800" trigger="click">
+        <template #reference>
+          <div :class="['system-notice-box',hasUnRead?'system-notice-box_red':'']">
+            <svg-icon name="notification-filled" size="18px"></svg-icon>
+          </div>
+        </template>
+        <NoticeWrap @change="e=>hasUnRead=e"/>
+      </el-popover>
+    </div>
     <!-- 用户信息 -->
     <el-dropdown @command="handleCommand">
         <div class="system-user-box">
@@ -142,6 +136,10 @@ function handleCommand(command){
   .content {
     flex: 1;
   }
+  .popover{
+    padding-top: 5px;
+    margin-right: 15px;
+  }
   .system-notice-box{
     position: relative;
     &.system-notice-box_red::after{

+ 51 - 10
src/layout/components/NoticeWrap.vue

@@ -5,39 +5,78 @@ import { useRouter } from 'vue-router'
 const router=useRouter()
 
 const emits=defineEmits(['change'])
-
+const tableQuery = reactive({
+    currentPage:1,
+    pageSize:10,
+    totals:0,
+})
 const list = ref([])
 function getMsgList() {
-  apiSystemMessage.list().then(res => {
+  apiSystemMessage.list({
+    CurrentIndex:tableQuery.currentPage,
+    PageSize:tableQuery.pageSize,
+  }).then(res => {
     if (res.Ret === 200) {
       list.value = res.Data.List || []
-      const hasUnRead=list.value.some(item=>!item.IsRead)
+      list.value.map(item=>{
+        // item.isTrue = item.Message.substr(item.Message.length - 5) === '退款成功!' ? true : false
+        item.isTrue = item.Message.search("退款成功") != -1
+      })
+      tableQuery.totals = res.Data.Paging.Totals||0
+      const hasUnRead=list.value.some(item=>item.Status === 'UNREAD')
       emits('change',hasUnRead)
     }
   })
 }
 getMsgList()
 
-function handleGoCustomerDetail(e){
-  router.push('/customer/userDetail?id=' + e.UserId)
+function handlePageChange(page){
+    tableQuery.currentPage = page
+    getMsgList()
 }
 
+function handleGoCustomerDetail(e){
+  handleReadNotice(e.Id)
+  // router.push('/order/orderList')
+}
+// 阅读消息
+function handleReadNotice(id){
+  apiSystemMessage.msgRead({
+    messageId: id
+  }).then(res=>{
+    if(res.Ret===200){
+      router.push('/order/orderList')
+    }
+  })
+}
 
 </script>
 
 <template>
   <div class="notice-wrap">
-    <div class="title">客户到期提醒</div>
+    <div class="title">消息提醒</div>
     <div class="list-wrap">
       <div
-        :class="['item', item.IsRead ? 'item-read' : '']"
+        :class="['item', item.Status !=='UNREAD' ? 'item-read' : '']"
         v-for="item in list"
         :key="item.SysMessageReportId"
         @click="handleGoCustomerDetail(item)"
       >
-        <span style="margin-right: 20px">{{ item.Content }}</span>
-        <span>{{ item.CreateTime }}</span>
+        <svg-icon name="success" size="16px" v-if="item.isTrue"></svg-icon>
+        <svg-icon name="failure" size="16px" v-if="!item.isTrue"></svg-icon>
+        <span style="margin-left: 10px">{{ item.Message }}</span>
+        <span style="margin-left: 20px">{{ item.CreatedTime }}</span>
+        <!-- <div v-html="item.Message"></div> -->
       </div>
+      <el-pagination
+        background
+        layout="total,prev,pager,next,jumper"
+        :current-page="tableQuery.currentPage"
+        :page-size="tableQuery.pageSize"
+        :total="tableQuery.totals"
+        @current-change="handlePageChange"
+        style=" justify-content: flex-end;"
+      />
     </div>
   </div>
 </template>
@@ -45,7 +84,7 @@ function handleGoCustomerDetail(e){
 <style lang="scss" scoped>
 .notice-wrap {
   .title {
-    padding: 20px 0;
+    padding: 15px 0;
     border-bottom: 1px solid #e7e7e7;
   }
   .list-wrap {
@@ -54,6 +93,8 @@ function handleGoCustomerDetail(e){
     .item {
       padding: 10px;
       cursor: pointer;
+      display: flex;
+      align-items: center;
       span {
         display: inline-block;
       }

+ 2 - 6
src/views/customer/TempUserList.vue

@@ -14,10 +14,6 @@ const tableColumns = [
         label:'最近一次阅读时间',
         key:'LastReadTime',
         sortable:true
-    },{
-        label:'开户状态',
-        key:'AccountStatus',
-        sortable:false,
     },{
         label:'累计阅读次数',
         key:'ReadCount',
@@ -117,7 +113,7 @@ async function downloadExcel() {
     <el-card class="box-card">
         <div class="temp-user-list-wrap">
             <div class="search-box">
-                <el-button type="primary" style="margin-right: 20px;"  @click="downloadExcel">导出表格</el-button>
+                <el-button type="primary" style="margin-right: 20px;"  @click="downloadExcel" v-permission="'tempUser:export'">导出表格</el-button>
                 <el-input 
                     v-model="tableQuery.keyWord"
                     :prefix-icon="Search" clearable
@@ -135,7 +131,7 @@ async function downloadExcel() {
                             <el-tag :type="scope.row[column.key]=== 'Open' ?'success':'info'">{{scope.row[column.key]=== 'Open'?'已开户':'未开户' }}</el-tag>
                         </template>
                         <template #default="scope" v-else-if="column.key === 'ReadCount'">
-                            <span class="ReadCount" @click="Details(scope.row)">
+                            <span class="ReadCount" @click="Details(scope.row)" v-permission="'tempUser:readCount'">
                                 {{ scope.row[column.key] }}
                             </span>
                         </template>

+ 12 - 7
src/views/customer/UserList.vue

@@ -112,8 +112,13 @@ function handleSelectChange() {
     getTableData();
 }
 function changeDatePicker(val) {
-    tableQuery.RegisterBeginDate = val[0];
-    tableQuery.RegisterEndDate = val[1];
+    if (!val) {
+        tableQuery.RegisterBeginDate = '';
+        tableQuery.RegisterEndDate = '';
+    } else {
+        tableQuery.RegisterBeginDate = val[0];
+        tableQuery.RegisterEndDate = val[1];
+    }
     getTableData();
 }
 function userDetails(row) {
@@ -165,7 +170,7 @@ async function downloadExcel() {
                     </el-date-picker>
                 </div>
                 <div class="search-box">
-                    <el-button type="primary" style="margin-right: 20px;" @click="downloadExcel">导出表格</el-button>
+                    <el-button type="primary" style="margin-right: 20px;" @click="downloadExcel" v-permission="'user:export'">导出表格</el-button>
                     <el-input 
                         v-model="tableQuery.keyWord"
                         :prefix-icon="Search" clearable
@@ -180,16 +185,16 @@ async function downloadExcel() {
                     <el-table-column 
                         v-for="column in tableColumns" :key="column.key"
                         :prop="column.key" :label="column.label" :sortable="column.sortable">
-                        <template #default="scope" v-if="column.key === 'AccountStatus'">
-                            <el-tag :type="scope.row[column.key]=== 'Open' ?'success':'info'">{{scope.row[column.key]=== 'Open'?'已开户':'未开户' }}</el-tag>
+                        <template #default="scope" v-if="column.key === 'FollowingGzh'">
+                            <span>{{ scope.row.FollowingGzh ? '是' : '否' }}</span>
                         </template>
                         <template #default="scope" v-else-if="column.key === 'ReadCount'">
-                            <span class="ReadCount" @click="Details(scope.row)">
+                            <span class="ReadCount" @click="Details(scope.row)" v-permission="'user:count'">
                                 {{ scope.row[column.key] }}
                             </span>
                         </template>
                         <template #default="scope" v-else-if="column.key === 'RealName'">
-                            <span class="ReadCount" @click="userDetails(scope.row)">
+                            <span class="ReadCount" @click="userDetails(scope.row)" v-permission="'user:details'">
                                 {{ scope.row[column.key] }}
                             </span>
                         </template>

+ 14 - 4
src/views/customer/components/ReadDialog.vue

@@ -15,6 +15,11 @@ emits("success")
 
 watch(() => props.show, (newval) => {
   if (newval) {
+    tableQuery.PermissionIds = null
+    tableQuery.ProductType = ''
+    tableQuery.currentPage = 1
+    tableQuery.sortParam = '',
+    tableQuery.sortType = '',
     getTableData()
   }
 })
@@ -42,19 +47,23 @@ const tableColumns = [
     },{
         label:'产品类型',
         key:'SourceName',
-        sortable:false
+        sortable:false,
+        widthsty:100
     },{
         label:'品种',
         key:'PermissionNames',
         sortable:false,
+        widthsty:100
     },{
         label:'最近一次点击时间',
         key:'ClickTime',
-        sortable:true
+        sortable:true,
+        widthsty:180
     },{
         label:'停留时长',
         key:'ReadDurationMinutes',
-        sortable:true
+        sortable:true,
+        widthsty:140
     }
 ]
 
@@ -143,7 +152,8 @@ function handleSelectChange(){
             <el-table :data="tableData" @sort-change="handleSortChange">
                 <el-table-column 
                     v-for="column in tableColumns" :key="column.key"
-                    :prop="column.key" :label="column.label" :sortable="column.sortable">
+                    :prop="column.key" :label="column.label" :sortable="column.sortable":width="column.widthsty"
+                    :min-width="column.minwidthsty">
                     <template #default="scope">
                         {{scope.row[column.key]}}
                     </template>

+ 23 - 13
src/views/customer/components/UserDialog.vue

@@ -44,6 +44,7 @@ const tableColumns = [
         label:'商品类型',
         key:'ProductType',
         sortable:false,
+        widthsty:100
     },{
         label:'有效期',
         key:'ReadCount',
@@ -51,11 +52,13 @@ const tableColumns = [
     },{
         label:'订单状态',
         key:'Status',
-        sortable:false
+        sortable:false,
+        widthsty:100
     },{
         label:'支付金额',
-        key:'ReadCount',
-        sortable:false
+        key:'PaymentAmount',
+        sortable:false,
+        widthsty:100
     },{
         label:'下单时间',
         key:'RefundFinishTime',
@@ -63,28 +66,34 @@ const tableColumns = [
     },{
         label:'支付渠道',
         key:'PaymentWay',
-        sortable:false
+        sortable:false,
+        widthsty:90
     }
 ]
 
 const tableQuery = reactive({
     sortParam:'',
     sortType:'',
+    pageSize:10,
+    currentPage:1,
+    totals:0
 })
 const tableData = ref([])
 function getTableData(){
     apiOrderConfig.getProductOrderList({
         TemplateUserId:props.userRow.TemplateUserId,
+        CurrentIndex:tableQuery.currentPage,
+        PageSize:tableQuery.pageSize,
     }).then(res=>{
         if(res.Ret!==200) return
         tableData.value = res.Data.List||[]
         tableQuery.totals = res.Data.Paging && res.Data.Paging.Totals||0
     })
 }
-// function handlePageChange(page){
-//     tableQuery.currentPage = page
-//     getTableData()
-// }
+function handlePageChange(page){
+    tableQuery.currentPage = page
+    getTableData()
+}
 function handleSortChange({order,prop}){
     const propMap = {
         0:'ClickTime',
@@ -106,9 +115,9 @@ function handleSelectChange(){
     v-model="show"
     :close-on-click-modal="false"
     :modal-append-to-body="false"
-    width="60%"
+    width="75%"
     draggable
-    title="阅读详情"
+    title="用户详情"
   >
     <div class="dialog-content">
         <div class="dialog-content-top">
@@ -120,13 +129,14 @@ function handleSelectChange(){
             <el-table :data="tableData" @sort-change="handleSortChange">
                 <el-table-column 
                     v-for="column in tableColumns" :key="column.key"
-                    :prop="column.key" :label="column.label" :sortable="column.sortable">
+                    :prop="column.key" :label="column.label" :sortable="column.sortable" :width="column.widthsty"
+                    :min-width="column.minwidthsty">
                     <template #default="scope">
                         {{scope.row[column.key]}}
                     </template>
                 </el-table-column>
             </el-table>
-            <!-- <el-pagination
+            <el-pagination
                 background
                 layout="total,prev,pager,next,jumper"
                 :current-page="tableQuery.currentPage"
@@ -134,7 +144,7 @@ function handleSelectChange(){
                 :total="tableQuery.totals"
                 @current-change="handlePageChange"
                 style=" justify-content: flex-end; margin-top: 10px;"
-            /> -->
+            />
         </div>
     </div>
   </el-dialog>

+ 4 - 4
src/views/order/OrderList.vue

@@ -36,7 +36,7 @@ const tableColumns = [
         label:'商品价格',
         key:'TotalAmount',
         sortable:false,
-        widthsty:90,
+        widthsty:110,
     },{
         label:'有效期',
         key:'ReadCount',
@@ -304,7 +304,7 @@ function success() {
                     />
                 </div>
                 <div class="search-box">
-                    <el-button type="primary" style="margin-right: 20px;" @click="downloadExcel">导出表格</el-button>
+                    <el-button type="primary" style="margin-right: 20px;" @click="downloadExcel" v-permission="'order:export'">导出表格</el-button>
                     <el-input 
                         v-model="tableQuery.keyWord"
                         :prefix-icon="Search" clearable
@@ -325,8 +325,8 @@ function success() {
                         </template>
                         <template #default="scope" v-else-if="column.key === 'handle'">
                             <span v-if="scope.row.Status !== '已支付' && scope.row.RefundStatus !== '退款成功'">-</span>
-                            <span class="edit" v-if="scope.row.Status === '售后' && scope.row.RefundStatus === '退款成功'"  @click="operation('details', scope.row)" >退款详情</span>
-                            <span class="edit" v-if="scope.row.Status === '已支付'" @click="operation('refund', scope.row)">退款</span>
+                            <span class="edit" v-if="scope.row.Status === '售后' && scope.row.RefundStatus === '退款成功'"  @click="operation('details', scope.row)" v-permission="'order:refundDetails'">退款详情</span>
+                            <span class="edit" v-if="scope.row.Status === '已支付'" @click="operation('refund', scope.row)" v-permission="'order:refund'">退款</span>
                         </template>
                         <template #default="scope" v-else>
                             {{scope.row[column.key] || '-'}}

+ 36 - 20
src/views/order/PaymentList.vue

@@ -2,7 +2,7 @@
 import { ref, reactive } from 'vue'
 import { Search } from '@element-plus/icons-vue'
 import {apiOrderConfig} from '@/api/order'
-import { apiMediaCommon } from '@/api/media'
+import { apiSystemCommon } from '@/api/system'
 
 const tableColumns = [
     {
@@ -18,7 +18,8 @@ const tableColumns = [
     {
         label:'姓名',
         key:'RealName',
-        sortable:false
+        sortable:false,
+        widthsty:80,
     },
     {
         label:'手机号',
@@ -31,16 +32,19 @@ const tableColumns = [
         sortable:false
     },{
         label:'支付金额',
-        key:'payment_account',
-        sortable:false
+        key:'amount',
+        sortable:false,
+        widthsty:100,
     },{
         label:'支付状态',
         key:'payment_status',
-        sortable:false
+        sortable:false,
+        widthsty:100,
     },{
         label:'支付渠道',
         key:'payment_way',
-        sortable:false
+        sortable:false,
+        widthsty:90,
     },{
         label:'支付账号',
         key:'ReadCount',
@@ -48,7 +52,8 @@ const tableColumns = [
     },{
         label:'收款方',
         key:'merchant_id',
-        sortable:false
+        sortable:false,
+        widthsty:120,
     },{
         label:'完成支付时间',
         key:'DealTime',
@@ -64,14 +69,11 @@ const orderStatusList = ref([
         value: 'pending',
         label: '待支付'
     }, {
-        value: 'paid',
+        value: 'done',
         label: '已支付'
     }, {
-        value: 'closed',
+        value: 'failed',
         label: '已关闭'
-    }, {
-        value: 'refund',
-        label: '售后'
     }
 ])
 
@@ -114,9 +116,18 @@ const labelOptions = ref([])
 const userId = ref('')
 const value1 = ref(['',''])
 function getLableList(){
-    apiMediaCommon.getPermissionList().then(res=>{
+    apiSystemCommon.getSysConfig({
+        ConfigKey:'paymentWay'
+    }).then(res=>{
         if(res.Ret!==200) return
-        labelOptions.value = res.Data.List||[]
+        labelOptions.value = res.Data.paymentWay.map(item => {
+            const key = Object.keys(item)[0]; // 获取支付方式的中文名称
+            const value = item[key]; // 获取支付方式的英文名称
+            return {
+                value: value, // 将英文名称设置为 value
+                label: key // 将中文名称设置为 label
+            };
+        })
     })
 }
 
@@ -190,9 +201,13 @@ async function downloadExcel() {
                         :value="item.value">
                         </el-option>
                     </el-select>
-                    <el-select v-model="tableQuery.FollowingGzh" clearable @change="handleSelectChange()" placeholder="支付渠道" style="width: 150px; margin-right: 20px;">
-                        <el-option label="微信" :value="true"></el-option>
-                        <el-option label="支付宝" :value="false"></el-option>
+                    <el-select v-model="tableQuery.paymentWay" clearable @change="handleSelectChange()" placeholder="支付渠道" style="width: 150px; margin-right: 20px;">
+                        <el-option
+                            v-for="item in labelOptions"
+                            :key="item.value"
+                            :label="item.label"
+                            :value="item.value">
+                        </el-option>
                     </el-select>
                     <el-date-picker
                         v-model="tableQuery.createdDate"
@@ -214,7 +229,7 @@ async function downloadExcel() {
                     />
                 </div>
                 <div class="search-box">
-                    <el-button type="primary" style="margin-right: 20px;" @click="downloadExcel">导出表格</el-button>
+                    <el-button type="primary" style="margin-right: 20px;" @click="downloadExcel" v-permission="'payment:export'">导出表格</el-button>
                     <el-input 
                         v-model="tableQuery.keyWord"
                         :prefix-icon="Search" clearable
@@ -228,7 +243,8 @@ async function downloadExcel() {
                 <el-table stripe border :data="tableData" @sort-change="handleSortChange">
                     <el-table-column 
                         v-for="column in tableColumns" :key="column.key"
-                        :prop="column.key" :label="column.label" :sortable="column.sortable">
+                        :prop="column.key" :label="column.label" :sortable="column.sortable" :width="column.widthsty"
+                        :min-width="column.minwidthsty">
                         <template #default="scope" v-if="column.key === 'AccountStatus'">
                             <el-tag :type="scope.row[column.key]=== 'Open' ?'success':'info'">{{scope.row[column.key]=== 'Open'?'已开户':'未开户' }}</el-tag>
                         </template>
@@ -238,7 +254,7 @@ async function downloadExcel() {
                             </span>
                         </template>
                         <template #default="scope" v-else>
-                            {{scope.row[column.key]}}
+                            {{scope.row[column.key] || '-'}}
                         </template>
                     </el-table-column>
                 </el-table>

+ 13 - 8
src/views/order/RefundList.vue

@@ -18,7 +18,8 @@ const tableColumns = [
     {
         label:'姓名',
         key:'RealName',
-        sortable:false
+        sortable:false,
+        widthsty:80,
     },
     {
         label:'手机号',
@@ -31,16 +32,18 @@ const tableColumns = [
         sortable:false
     },{
         label:'支付金额',
-        key:'payment_account',
+        key:'amount',
         sortable:false
     },{
         label:'支付状态',
         key:'payment_status',
-        sortable:false
+        sortable:false,
+        widthsty:90,
     },{
         label:'支付渠道',
         key:'payment_way',
-        sortable:false
+        sortable:false,
+        widthsty:90,
     },{
         label:'支付账号',
         key:'ReadCount',
@@ -48,7 +51,8 @@ const tableColumns = [
     },{
         label:'收款方',
         key:'merchant_id',
-        sortable:false
+        sortable:false,
+        widthsty:100,
     },{
         label:'完成支付时间',
         key:'DealTime',
@@ -173,7 +177,7 @@ async function downloadExcel() {
                     />
                 </div>
                 <div class="search-box">
-                    <el-button type="primary" style="margin-right: 20px;" @click="downloadExcel">导出表格</el-button>
+                    <el-button type="primary" style="margin-right: 20px;" @click="downloadExcel" v-permission="'refund:export'">导出表格</el-button>
                     <el-input 
                         v-model="tableQuery.keyWord"
                         :prefix-icon="Search" clearable
@@ -187,12 +191,13 @@ async function downloadExcel() {
                 <el-table stripe border :data="tableData">
                     <el-table-column 
                         v-for="column in tableColumns" :key="column.key"
-                        :prop="column.key" :label="column.label" :sortable="column.sortable">
+                        :prop="column.key" :label="column.label" :sortable="column.sortable" :width="column.widthsty"
+                        :min-width="column.minwidthsty">
                         <template #default="scope" v-if="column.key === 'AccountStatus'">
                             <el-tag :type="scope.row[column.key]=== 'Open' ?'success':'info'">{{scope.row[column.key]=== 'Open'?'已开户':'未开户' }}</el-tag>
                         </template>
                         <template #default="scope" v-else>
-                            {{scope.row[column.key]}}
+                            {{scope.row[column.key] || '-'}}
                         </template>
                     </el-table-column>
                 </el-table>

+ 1 - 0
src/views/order/components/UserDialog.vue

@@ -34,6 +34,7 @@ function getRefundData(){
     }).then(res=>{
         if(res.Ret!==200) return
         refundInfo.value = res.Data||{}
+        refundInfo.value.PaymentAmount = res.Data.RefundAmount
         remark.value = refundInfo.value.Remark||''
     })
 }

+ 6 - 6
src/views/products/PackageConfigList.vue

@@ -51,7 +51,7 @@ const tableColumns = [
     }
     ,{
         label:'创建人',
-        key:'LastReadTime',
+        key:'Creator',
         align: 'center',
         widthsty:100,
     },{
@@ -210,7 +210,7 @@ function closeEdit() {
         <div class="temp-user-list-wrap">
             <div class="top-box">
                 <div>
-                    <el-button type="primary" style="margin-right: 20px;" @click="operation('add')">添加套餐</el-button>
+                    <el-button type="primary" style="margin-right: 20px;" @click="operation('add')" v-permission="'package:add'">添加套餐</el-button>
                     <el-select v-model="tableQuery.SaleStatus" clearable @change="handleSelectChange()" placeholder="状态" style="width: 200px; margin-right: 20px;">
                         <el-option
                         v-for="item in saleStatusList"
@@ -257,10 +257,10 @@ function closeEdit() {
                             <el-tag :type="scope.row[column.key]=== '已上架' ?'success':'info'">{{ scope.row[column.key] }}</el-tag>
                         </template>
                         <template #default="scope" v-else-if="column.key === 'handle'">
-                            <span class="edit" v-if="scope.row.SaleStatus !== '已上架'" @click="operation('stock', scope.row)">上架</span>
-                            <span class="edit" v-if="scope.row.SaleStatus === '已上架'"  @click="operation('delist', scope.row)" >下架</span>
-                            <span class="edit" v-if="scope.row.SaleStatus !== '已上架'" @click="operation('edit', scope.row)">编辑</span>
-                            <span class="delete" v-if="scope.row.SaleStatus !== '已上架'" @click="operation('delete', scope.row)">删除</span>
+                            <span class="edit" v-if="scope.row.SaleStatus !== '已上架'" @click="operation('stock', scope.row)" v-permission="'package:stock'">上架</span>
+                            <span class="edit" v-if="scope.row.SaleStatus === '已上架'"  @click="operation('delist', scope.row)" v-permission="'package:delist'">下架</span>
+                            <span class="edit" v-if="scope.row.SaleStatus !== '已上架'" @click="operation('edit', scope.row)" v-permission="'package:edit'">编辑</span>
+                            <span class="delete" v-if="scope.row.SaleStatus !== '已上架'" @click="operation('delete', scope.row)" v-permission="'package:delete'">删除</span>
                         </template>
                         <template #default="scope" v-else-if="column.key === 'CoverSrc'">
                             <el-image 

+ 6 - 6
src/views/products/SingleConfigList.vue

@@ -38,7 +38,7 @@ const tableColumns = [
         widthsty:120,
     },{
         label:'创建人',
-        key:'LastReadTime',
+        key:'Creator',
         align: 'center'
     },{
         label:'创建时间',
@@ -205,7 +205,7 @@ function closeEdit() {
         <div class="temp-user-list-wrap">
             <div class="top-box">
                 <div>
-                    <el-button type="primary" style="margin-right: 20px;" @click="router.push('/products/addSingle')">添加单品</el-button>
+                    <el-button type="primary" style="margin-right: 20px;" @click="router.push('/products/addSingle')" v-permission="'single:add'">添加单品</el-button>
                     <el-select clearable v-model="tableQuery.ProductType" @change="handleSelectChange()" placeholder="产品类型" style="width: 200px; margin-right: 20px;">
                         <el-option
                         v-for="item in options"
@@ -260,10 +260,10 @@ function closeEdit() {
                             <el-tag :type="scope.row[column.key]=== '已上架' ?'success':'info'">{{ scope.row[column.key] }}</el-tag>
                         </template>
                         <template #default="scope" v-else-if="column.key === 'handle'">
-                            <span class="edit" v-if="scope.row.SaleStatus !== '已上架'" @click="operation('stock', scope.row)">上架</span>
-                            <span class="edit" v-if="scope.row.SaleStatus === '已上架'"  @click="operation('delist', scope.row)" >下架</span>
-                            <span class="edit" v-if="scope.row.SaleStatus !== '已上架'" @click="operation('edit', scope.row)">编辑</span>
-                            <span class="delete" v-if="scope.row.SaleStatus !== '已上架'" @click="operation('delete', scope.row)">删除</span>
+                            <span class="edit" v-if="scope.row.SaleStatus !== '已上架'" @click="operation('stock', scope.row)" v-permission="'single:stock'">上架</span>
+                            <span class="edit" v-if="scope.row.SaleStatus === '已上架'"  @click="operation('delist', scope.row)" v-permission="'single:delist'">下架</span>
+                            <span class="edit" v-if="scope.row.SaleStatus !== '已上架'" @click="operation('edit', scope.row)" v-permission="'single:edit'">编辑</span>
+                            <span class="delete" v-if="scope.row.SaleStatus !== '已上架'" @click="operation('delete', scope.row)" v-permission="'single:delete'">删除</span>
                         </template>
                         <template #default="scope" v-else>
                             {{scope.row[column.key]}}

+ 2 - 2
src/views/products/addSingleList.vue

@@ -26,7 +26,7 @@ const tableColumns = [
         widthsty:100
     },{
         label:'品种',
-        key:'ClickTime',
+        key:'PermissionNames',
         sortable:false,
         align:'center'
     },{
@@ -103,7 +103,7 @@ function stockProducts(row){
     if(!row.Price) return ElMessage.warning('请输入价格')
     apiProductsConfig.postAddProduct({
         SourceId:row.SourceId,
-        Type:row.ProductType === '报告'?'report':'audio',
+        Type:row.ProductType === '报告'?'report': row.ProductType === '视频'?'video':'audio',
         // ProductName:,
         // CoverSrc:,
         // ValidDays:,