shish hai 1 ano
pai
achega
5bb3fa7e84

+ 7 - 0
ghs/src/service/cg-refund/index.js

@@ -10,5 +10,12 @@ export class CgRefundService extends BaseService {
 		});
 	}
 
+	getRefundList(data) {
+		return this.request({
+			url: '/get-refund-list',
+			params: data
+		});
+	}
+
 }
 export default new CgRefundService();

+ 100 - 0
ghs/src/views/in/components/refund-record.vue

@@ -0,0 +1,100 @@
+<template>
+	<div>
+		<el-drawer :visible.sync="showArea" size="55vw" :before-close="closeFn" custom-class="drawer-class" direction="ltr">
+			<div>
+				<div style="margin-left:10px;font-weight:bold;">售后记录</div>
+                <x-crud @load="onLoad">
+					<template #table-column-status="{scope}">
+						{{ scope.row.status==0?'待审核':scope.row.status==1?'已通过':scope.row.status==2?'已驳回':'已取消' }}
+					</template>
+
+                    <template #slot-column-option="{scope}">
+                        <el-button @click.stop="confirmLoan(scope.row)" size="medium" type="primary">明细</el-button>
+                    </template>
+                </x-crud>
+			</div>
+
+		</el-drawer>
+	</div>
+</template>
+<script>
+export default {
+	name: 'refund-record',
+	props: {
+		currentData: {
+			type: Object,
+			default: () => {}
+		}
+	},
+	data() {
+		return {
+			showArea: false
+		};
+	},
+	methods: {
+		init() {
+			this.showArea = true
+			if(this.app){
+				this.app.refresh({relateOrderSn:this.currentData.orderSn})
+			}
+		},
+		closeFn() {
+			this.showArea = false;
+		},
+		onLoad({ ctx, app }) {
+			this.app = app;
+			ctx.service(this.$service.cgRefund)
+			.set('table', {
+				columns: [
+					{
+						label: '日期',
+						prop: 'addTime',
+						align: 'center',
+					},
+					{
+						label: '单号',
+						prop: 'refundSn',
+						align: 'center',
+					},
+					{
+						label: '金额',
+						prop: 'refundPrice',
+						align: 'center',
+					},
+					{
+						label: '操作',
+						prop: 'shopAdminName',
+						align: 'center',
+					},
+					{
+						label: '状态',
+						prop: 'status',
+						align: 'center',
+					}
+				],
+				op: {
+					visible: true,
+					props: {
+						width: 160,
+						align: 'center',
+						fixed: 'right',
+						label: '操作'
+					},
+					layout:['slot-column-option']
+				}
+			})
+			.set('layout', [
+				[ 'data-table' ],
+				['flex1', 'pagination']
+			])
+			.done()
+			app.refresh({relateOrderSn:this.currentData.orderSn})
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.drawer-class{
+	height:100vh;
+}
+</style>

+ 16 - 11
ghs/src/views/in/list.vue

@@ -101,14 +101,12 @@
         <el-button size="small" v-if="scope.row.status == 5 || scope.row.status == 1">打小票({{ scope.row.printNum }})</el-button>
         <el-button @click.stop="printOrder(scope.row)" size="small" type="primary" v-else>打小票({{ scope.row.printNum }})</el-button>
 
-
-        <el-dropdown @command="doMore($event,scope.row)" style="margin-left:10px;">
-          <el-button type="primary" size="small">
-            更多<i class="el-icon-arrow-down el-icon--right"></i>
-          </el-button>
+        <el-dropdown @command="doMore($event,scope.row)" style="margin-left:10px;" trigger="click">
+          <el-button size="small" v-if="scope.row.status == 5 || scope.row.status == 1">更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
+          <el-button type="primary" size="small" v-else>更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
           <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item command="cancel">取消</el-dropdown-item>
             <el-dropdown-item command="refundRecord">售后记录</el-dropdown-item>
+            <el-dropdown-item command="cancel">取消</el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
 
@@ -139,6 +137,7 @@
 
     <order-detail ref="orderDetail" :orderOperate="optionData" />
     <begin-refund ref="beginRefundRef" :currentRefundData="currentRefundData" />
+    <refund-record ref="refundRecordRef" :currentData="refundRecordData" />
 
   </div>
 </template>
@@ -146,11 +145,13 @@
 <script>
 import OrderDetail from './components/order-detail';
 import beginRefund from './components/begin-refund';
+import refundRecord from './components/refund-record';
 import {hiprint, defaultElementTypeProvider} from 'vue-plugin-hiprint'
 export default {
   components: {
     OrderDetail,
-    beginRefund
+    beginRefund,
+    refundRecord
   },
   data() {
     return {
@@ -180,6 +181,7 @@ export default {
       ],
       optionData: {},
       currentRefundData:{},
+      refundRecordData:{},
       orderData:'',
       addPop:false,
       location:0,
@@ -247,12 +249,15 @@ export default {
 
 	},
   methods: {
-    doMore(cmd,info){
+    doMore(cmd,data){
       if(cmd == 'cancel'){
-        this.cancelOrder(info)
+        this.cancelOrder(data)
       }
       if(cmd == 'refundRecord'){
-
+        this.refundRecordData = data
+        setTimeout(() => {
+          this.$refs.refundRecordRef.init()
+        })
       }
     },
     goRefund(data){
@@ -534,7 +539,7 @@ export default {
             op: {
               visible: true,
               props: {
-                width: 540,
+                width: 560,
                 align: 'center',
                 fixed: 'right',
                 label: '操作'