Prechádzať zdrojové kódy

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

leichen 7 mesiacov pred
rodič
commit
fca2429f99

+ 3 - 1
src/views/customer/UserList.vue

@@ -77,6 +77,7 @@ getTableData()
 getLableList()
 const labelOptions = ref([])
 const userId = ref('')
+const userRow = ref({})
 const value1 = ref(['',''])
 function getLableList(){
     apiMediaCommon.getPermissionList().then(res=>{
@@ -116,6 +117,7 @@ function changeDatePicker(val) {
     getTableData();
 }
 function userDetails(row) {
+    userRow.value = row
     showUserDialog.value = true;
 }
 
@@ -208,7 +210,7 @@ async function downloadExcel() {
             </div>
         </div>
         <ReadDialog v-model:show="show" :labelOptions="labelOptions" :userId="userId"></ReadDialog>
-        <UserDialog v-model:show="showUserDialog" :userId="userId"></UserDialog>
+        <UserDialog v-model:show="showUserDialog" :userRow="userRow"></UserDialog>
     </el-card>
 </template>
 

+ 44 - 24
src/views/customer/components/UserDialog.vue

@@ -1,9 +1,9 @@
 <script setup>
 const show = defineModel('show', { type: Boolean, default: false })
 const props=defineProps({
-    userId:{
-        type:String,
-        default:''
+    userRow:{
+        type:Object,
+        default:{}
     },
 })
 const emits = defineEmits(["success"])
@@ -28,29 +28,42 @@ const options = ref([
 ])
 
 import { ref, reactive } from 'vue'
-import {apiCustomerUser} from '@/api/customer'
+import {apiOrderConfig} from '@/api/order'
 
 const tableColumns = [
     {
-        label:'标题',
-        key:'SourceName',
+        label:'订单编号',
+        key:'OrderID',
         sortable:false
-    },{
-        label:'产品类型',
-        key:'SourceId',
+    },
+    {
+        label:'商品名称',
+        key:'ProductName',
         sortable:false
     },{
-        label:'品种',
-        key:'PermissionNames',
+        label:'商品类型',
+        key:'ProductType',
         sortable:false,
     },{
-        label:'最近一次点击时间',
-        key:'ClickTime',
-        sortable:true
+        label:'有效期',
+        key:'ReadCount',
+        sortable:false
     },{
-        label:'停留时长',
-        key:'ReadDurationMinutes',
-        sortable:true
+        label:'订单状态',
+        key:'Status',
+        sortable:false
+    },{
+        label:'支付金额',
+        key:'ReadCount',
+        sortable:false
+    },{
+        label:'下单时间',
+        key:'RefundFinishTime',
+        sortable:false
+    },{
+        label:'支付渠道',
+        key:'PaymentWay',
+        sortable:false
     }
 ]
 
@@ -60,8 +73,8 @@ const tableQuery = reactive({
 })
 const tableData = ref([])
 function getTableData(){
-    apiCustomerUser.getUserDetail({
-        UserId:props.userId,
+    apiOrderConfig.getProductOrderList({
+        TemplateUserId:props.userRow.TemplateUserId,
     }).then(res=>{
         if(res.Ret!==200) return
         tableData.value = res.Data.List||[]
@@ -99,6 +112,9 @@ function handleSelectChange(){
   >
     <div class="dialog-content">
         <div class="dialog-content-top">
+            <div class="title">基本信息</div>
+            <div class="info">{{ props.userRow.RealName }}  {{ props.userRow.Mobile }}</div>
+            <div class="title">商品订单</div>
         </div>
         <div class="table">
             <el-table :data="tableData" @sort-change="handleSortChange">
@@ -128,11 +144,15 @@ function handleSelectChange(){
 .dialog-content {
     // padding: 10px 50px 50px 50px;
     .dialog-content-top {
-        display: flex;
-        justify-content: flex-start;
-        padding-bottom: 30px;
-        :deep(.el-cascader-node__label) {
-            max-width: 111px;
+        // padding-bottom: 10px;
+        color: #333;
+        .title {
+            font-size: 16px;
+            padding-bottom: 10px;
+        }
+        .info {
+            font-size: 14px;
+            margin-bottom: 20px;
         }
     }
     .table {

+ 24 - 12
src/views/order/OrderList.vue

@@ -15,7 +15,8 @@ const tableColumns = [
     {
         label:'姓名',
         key:'RealName',
-        sortable:false
+        sortable:false,
+        widthsty:90,
     },
     {
         label:'手机号',
@@ -30,10 +31,12 @@ const tableColumns = [
         label:'商品类型',
         key:'ProductType',
         sortable:false,
+        widthsty:90,
     },{
         label:'商品价格',
         key:'TotalAmount',
-        sortable:false
+        sortable:false,
+        widthsty:90,
     },{
         label:'有效期',
         key:'ReadCount',
@@ -41,19 +44,23 @@ const tableColumns = [
     },{
         label:'订单状态',
         key:'Status',
-        sortable:false
+        sortable:false,
+        widthsty:90,
     },{
         label:'支付渠道',
         key:'PaymentWay',
-        sortable:false
+        sortable:false,
+        widthsty:90,
     },{
         label:'支付金额',
-        key:'ReadCount',
-        sortable:false
+        key:'PaymentAmount',
+        sortable:false,
+        widthsty:110,
     },{
         label:'售后状态',
         key:'RefundStatus',
-        sortable:false
+        sortable:false,
+        widthsty:90,
     },{
         label:'付款时间',
         key:'PaymentTime',
@@ -66,7 +73,8 @@ const tableColumns = [
     {
         label:'操作',
         key:'handle',
-        align: 'center'
+        align: 'center',
+        widthsty:100,
     }
 ]
 const productTypeList = ref([
@@ -219,8 +227,6 @@ async function downloadExcel() {
 
 function operation (handle, row) {
     refundRow.value = row
-    console.log(refundRow);
-    
     switch (handle) {
         case 'details':
             showUserDialog.value = true;
@@ -234,6 +240,11 @@ function operation (handle, row) {
         return false;
     }
 }
+
+function success() {
+    showUserDialog.value = false;
+    getTableData()
+}
 </script>
 
 <template>
@@ -307,7 +318,8 @@ function operation (handle, row) {
                 <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>
@@ -332,7 +344,7 @@ function operation (handle, row) {
                 />
             </div>
         </div>
-        <UserDialog v-model:show="showUserDialog" :isRefund="isRefund" :row="refundRow"></UserDialog>
+        <UserDialog v-model:show="showUserDialog" :isRefund="isRefund" :row="refundRow" @success="success"></UserDialog>
     </el-card>
 </template>
 

+ 7 - 5
src/views/order/components/UserDialog.vue

@@ -13,6 +13,8 @@ const props=defineProps({
         default:()=>{}
     },
 })
+const emits = defineEmits(["success"])
+emits("success")
 
 watch(() => props.show, (newval) => {
   if (newval) {
@@ -28,7 +30,7 @@ const refundInfo = ref({})
 const remark = ref('')
 function getRefundData(){
     apiOrderConfig.getRefundDetail({
-        ProductOrderNo:props.row.ProductOrderNo,
+        ProductOrderNo:props.row.OrderID,
     }).then(res=>{
         if(res.Ret!==200) return
         refundInfo.value = res.Data||{}
@@ -38,11 +40,11 @@ function getRefundData(){
 
 function confirm() {
     apiOrderConfig.postOrderRefund({
-        ProductOrderNo:props.row.ProductOrderNo,
+        ProductOrderNo:props.row.OrderID,
         Remark:remark.value
     }).then(res=>{
         if(res.Ret!==200) return
-        show.value = false
+        emits("success")
     })
 }
 </script>
@@ -65,7 +67,7 @@ function confirm() {
                 退回账号:{{  }}
             </div>
             <div class="dialog-top-item">
-                退款金额:{{ refundInfo.RefundAmount }}
+                退款金额:{{ refundInfo.PaymentAmount }}
             </div>
         </div>
         <div class="dialog-content">
@@ -80,7 +82,7 @@ function confirm() {
             </el-input>
         </div>
     </div>
-    <div class="dialog-footer">
+    <div class="dialog-footer" v-if="props.isRefund">
         <el-button @click="show = false">取 消</el-button>
         <div class="button">
             <el-button type="primary" @click="confirm()" style="margin-right: 10px;">确定</el-button>