Parcourir la source

卓美销售端加入财务审核相关原因

yjwang il y a 2 jours
Parent
commit
d5d81eb504

+ 25 - 0
src/views/hisStore/components/productAfterSalesOrder.vue

@@ -68,6 +68,13 @@
                   <el-tag  v-for="(item, index) in salesStatusOptions"    v-if="afterSales.salesStatus==item.dictValue" >{{item.dictLabel}}</el-tag>
                 </span>
             </el-descriptions-item>
+
+            <el-descriptions-item label="财务审核原因" v-if="isRefundOrder">
+                <span>{{ financeAuditReasonText }}</span>
+            </el-descriptions-item>
+            <el-descriptions-item label="财务审核备注" v-if="isRefundOrder">
+                <span>{{ financeAuditRemarkText }}</span>
+            </el-descriptions-item>
         </el-descriptions>
         <div style="margin: 20px 0px">
           <span class="font-small">收货信息</span>
@@ -289,6 +296,24 @@ export default {
         this.serviceTypeOptions = response.data;
     });
   },
+  computed: {
+    isRefundOrder() {
+      return this.order != null && (this.order.status === -1 || this.order.status === -2);
+    },
+    financeAuditReasonText() {
+      if (!this.afterSales) {
+        return '';
+      }
+      const parts = [this.afterSales.reasonValue1, this.afterSales.reasonValue2].filter(Boolean);
+      if (parts.length) {
+        return parts.join(' / ');
+      }
+      return this.afterSales.auditReasonName || '';
+    },
+    financeAuditRemarkText() {
+      return this.afterSales ? (this.afterSales.auditRemark || '') : '';
+    }
+  },
   methods: {
     submitForm() {
       var id=this.afterSales.id;

+ 42 - 1
src/views/hisStore/components/productOrder.vue

@@ -178,6 +178,13 @@
                 </span>
           </el-descriptions-item>
 
+            <el-descriptions-item label="财务审核原因" v-if="isRefundOrder">
+                <span>{{ financeAuditReasonText }}</span>
+            </el-descriptions-item>
+            <el-descriptions-item label="财务审核备注" v-if="isRefundOrder">
+                <span>{{ financeAuditRemarkText }}</span>
+            </el-descriptions-item>
+
         </el-descriptions>
         <div style="margin: 20px 0px" v-if="order!=null">
         <span class="font-small">
@@ -1267,7 +1274,13 @@ export default {
       // 其它商品信息分页数据
       otherProductsPage: 1,
       otherProductsPageSize: 5,
-      otherProductsTotal: 0
+      otherProductsTotal: 0,
+      afterSales: {
+        auditReasonName: null,
+        auditRemark: null,
+        reasonValue1: null,
+        reasonValue2: null
+      }
     };
   },
   created() {
@@ -1326,6 +1339,28 @@ export default {
       }
       return `历史订单商品 ${this.currentOrderCode} - 商品详情`;
     },
+    /** 退款中 / 已退款 */
+    isRefundOrder() {
+      if (!this.order) return false;
+      const s = Number(this.order.status);
+      return s === -1 || s === -2;
+    },
+    /** 财务审核原因:售后一级 + 二级,兼容旧数据 auditReasonName */
+    financeAuditReasonText() {
+      const a = this.afterSales;
+      if (!a) return '—';
+      const parts = [a.reasonValue1, a.reasonValue2].filter(
+        x => x != null && String(x).trim() !== ''
+      );
+      if (parts.length > 0) return parts.join(' / ');
+      if (a.auditReasonName) return a.auditReasonName;
+      return '—';
+    },
+    financeAuditRemarkText() {
+      const a = this.afterSales;
+      if (!a || a.auditRemark == null || String(a.auditRemark).trim() === '') return '—';
+      return a.auditRemark;
+    }
 
   },
   methods: {
@@ -1961,6 +1996,12 @@ export default {
         this.payments = response.payments;
         this.customerInfo = response.customer;
         this.auditLogs = response.auditLogs;
+        this.afterSales = response.afterSales || {
+          auditReasonName: null,
+          auditRemark: null,
+          reasonValue1: null,
+          reasonValue2: null
+        };
 
         // 调用分页接口获取其他订单商品信息
         if (this.order && this.user) {

+ 3 - 0
src/views/hisStore/storeAfterSales/list.vue

@@ -130,6 +130,9 @@
               <div prop="serviceType" v-for="(item, index) in serviceTypeOptions"    v-if="scope.row.serviceType==item.dictValue">{{item.dictLabel}}</div>
           </template>
       </el-table-column>
+      <el-table-column label="售后原因一级" align="center" prop="reasonValue1" min-width="120" show-overflow-tooltip />
+      <el-table-column label="售后原因二级" align="center" prop="reasonValue2" min-width="120" show-overflow-tooltip />
+      <el-table-column label="售后备注" align="center" prop="auditRemark" min-width="140" show-overflow-tooltip />
       <el-table-column label="申请原因" align="center" prop="reasons" />
       <el-table-column label="说明" align="center" prop="explains" />
       <el-table-column label="状态" align="center" prop="status" >

+ 17 - 1
src/views/hisStore/storeAfterSales/myList.vue

@@ -47,6 +47,18 @@
       </el-form-item>
     </el-form>
 
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
     <el-table  height="500" border v-loading="loading" :data="storeAfterSalesList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="ID" align="center" prop="id" />
@@ -60,6 +72,9 @@
               <div prop="serviceType" v-for="(item, index) in serviceTypeOptions"    v-if="scope.row.serviceType==item.dictValue">{{item.dictLabel}}</div>
           </template>
       </el-table-column>
+      <el-table-column label="售后原因一级" align="center" prop="reasonValue1" min-width="120" show-overflow-tooltip />
+      <el-table-column label="售后原因二级" align="center" prop="reasonValue2" min-width="120" show-overflow-tooltip />
+      <el-table-column label="售后备注" align="center" prop="auditRemark" min-width="140" show-overflow-tooltip />
       <el-table-column label="申请原因" align="center" prop="reasons" />
       <el-table-column label="说明" align="center" prop="explains" />
       <el-table-column label="状态" align="center" prop="status" >
@@ -107,8 +122,9 @@
 <script>
 import { myListStoreAfterSales, getStoreAfterSales, delStoreAfterSales, addStoreAfterSales, updateStoreAfterSales, exportStoreAfterSales } from "@/api/hisStore/storeAfterSales";
 import productAfterSalesOrder from "../components/productAfterSalesOrder";
+import RightToolbar from "@/components/RightToolbar";
 export default {
-  components: { productAfterSalesOrder },
+  components: { productAfterSalesOrder, RightToolbar },
   name: "StoreAfterSales",
   data() {
     return {

+ 7 - 0
src/views/hisStore/storeOrder/healthStoreList.vue

@@ -535,6 +535,10 @@
         </template>
       </el-table-column>
 
+      <el-table-column align="center" label="售后原因一级" prop="reasonValue1" min-width="110" show-overflow-tooltip />
+      <el-table-column align="center" label="售后原因二级" prop="reasonValue2" min-width="110" show-overflow-tooltip />
+      <el-table-column align="center" label="售后备注" prop="auditRemark" min-width="120" show-overflow-tooltip />
+
       <el-table-column align="center" fixed="right" label="操作" width="80px">
         <template slot-scope="scope">
           <el-button
@@ -1106,6 +1110,9 @@ export default {
         { key: 'deliveryName', label: '快递公司', checked: false },
         { key: 'deliveryId', label: '快递单号', checked: false },
         { key: 'remark', label: '备注', checked: false },
+        { key: 'reasonValue1', label: '售后原因一级', checked: false },
+        { key: 'reasonValue2', label: '售后原因二级', checked: false },
+        { key: 'auditRemark', label: '售后备注', checked: false },
 
       ],
       appMallOptions:[],

+ 7 - 0
src/views/hisStore/storeOrder/index.vue

@@ -553,6 +553,10 @@
           </template>
       </el-table-column>
 
+        <el-table-column label="售后原因一级" align="center" prop="reasonValue1" width="120px" />
+        <el-table-column label="售后原因二级" align="center" prop="reasonValue2" width="120px" />
+        <el-table-column label="售后备注" align="center" prop="auditRemark" width="150px" />
+
       <el-table-column label="操作" fixed="right" width="80px" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -1117,6 +1121,9 @@ export default {
         { key: 'remark', label: '备注', checked: false },
         { key: 'erpPhone', label: 'ERP电话', checked: false },
         { key: 'erpAccount', label: 'ERP账号', checked: false },
+          { key: 'reasonValue1', label: '售后原因一级', checked: false },
+          { key: 'reasonValue2', label: '售后原因二级', checked: false },
+          { key: 'auditRemark', label: '售后备注', checked: false },
 
       ],
 

+ 20 - 0
src/views/live/components/productAfterSalesOrder.vue

@@ -64,6 +64,12 @@
                   <el-tag  v-for="(item, index) in salesStatusOptions"    v-if="afterSales.salesStatus==item.dictValue" >{{item.dictLabel}}</el-tag>
                 </span>
             </el-descriptions-item>
+            <el-descriptions-item label="财务审核原因" v-if="isRefundOrder">
+                <span>{{ financeAuditReasonText }}</span>
+            </el-descriptions-item>
+            <el-descriptions-item label="财务审核备注" v-if="isRefundOrder">
+                <span>{{ financeAuditRemarkText }}</span>
+            </el-descriptions-item>
         </el-descriptions>
         <div style="margin: 20px 0px">
           <span class="font-small">收货信息</span>
@@ -285,6 +291,20 @@ export default {
         this.serviceTypeOptions = response.data;
     });
   },
+  computed: {
+    isRefundOrder() {
+      return this.order != null && (this.order.status === -1 || this.order.status === -2);
+    },
+    financeAuditReasonText() {
+      if (!this.afterSales) return '';
+      const parts = [this.afterSales.reasonValue1, this.afterSales.reasonValue2].filter(Boolean);
+      if (parts.length) return parts.join(' / ');
+      return this.afterSales.auditReasonName || '';
+    },
+    financeAuditRemarkText() {
+      return this.afterSales ? (this.afterSales.auditRemark || '') : '';
+    }
+  },
   methods: {
     submitForm() {
       var id=this.afterSales.id;

+ 3 - 0
src/views/live/liveAfteraSales/index.vue

@@ -152,6 +152,9 @@
           <div prop="serviceType" v-for="(item, index) in serviceTypeOptions"    v-if="scope.row.serviceType==item.dictValue">{{item.dictLabel}}</div>
         </template>
       </el-table-column>
+      <el-table-column label="售后原因一级" align="center" prop="reasonValue1" min-width="120" show-overflow-tooltip />
+      <el-table-column label="售后原因二级" align="center" prop="reasonValue2" min-width="120" show-overflow-tooltip />
+      <el-table-column label="售后备注" align="center" prop="auditRemark" min-width="140" show-overflow-tooltip />
       <el-table-column label="申请原因" align="center" prop="reasons" />
       <el-table-column label="说明" align="center" prop="explains" />
       <el-table-column label="状态" align="center" prop="status" >

+ 3 - 0
src/views/live/liveOrder/index.vue

@@ -218,6 +218,9 @@
           <span>{{ formatDateTime(scope.row.createTime) }}</span>
         </template>
       </el-table-column>
+      <el-table-column label="售后原因一级" align="center" prop="reasonValue1" min-width="120" show-overflow-tooltip />
+      <el-table-column label="售后原因二级" align="center" prop="reasonValue2" min-width="120" show-overflow-tooltip />
+      <el-table-column label="售后备注" align="center" prop="auditRemark" min-width="140" show-overflow-tooltip />
       <el-table-column label="订单状态" align="center" prop="status">
         <template slot-scope="scope">
           <dict-tag :options="orderStatusOptions" :value="scope.row.status"/>

+ 16 - 0
src/views/live/liveOrder/liveOrderDetails.vue

@@ -106,6 +106,8 @@
           <el-descriptions-item label=" 公众号/渠道" ><span v-if="item!=null">{{item.channel}}</span></el-descriptions-item>
           <el-descriptions-item label=" 渠道" ><span v-if="item!=null"><dict-tag :options="channelOptions" :value="item.orderChannel"/></span></el-descriptions-item>
           <el-descriptions-item label=" 企微主体" ><span v-if="item!=null"><dict-tag :options="qwSubjectOptions" :value="item.qwSubject"/></span></el-descriptions-item>
+          <el-descriptions-item label="财务审核原因" v-if="isRefundOrder"><span>{{ financeAuditReasonText }}</span></el-descriptions-item>
+          <el-descriptions-item label="财务审核备注" v-if="isRefundOrder"><span>{{ financeAuditRemarkText }}</span></el-descriptions-item>
         </el-descriptions>
       </el-card>
     </div>
@@ -430,6 +432,20 @@ export default {
       this.deliveryTypeOptions = response.data;
     });
   },
+  computed: {
+    isRefundOrder() {
+      return this.item != null && (this.item.status === -1 || this.item.status === -2);
+    },
+    financeAuditReasonText() {
+      if (!this.item) return '';
+      const parts = [this.item.reasonValue1, this.item.reasonValue2].filter(Boolean);
+      if (parts.length) return parts.join(' / ');
+      return this.item.auditReasonName || '';
+    },
+    financeAuditRemarkText() {
+      return this.item ? (this.item.auditRemark || '') : '';
+    }
+  },
   methods: {
 
     followMsg(row){

+ 3 - 0
src/views/store/storeAfterSales/list.vue

@@ -99,6 +99,9 @@
               <dict-tag :options="refundTypeOptions" :value="scope.row.refundType"/>
             </template>
       </el-table-column>
+      <el-table-column label="售后原因一级" align="center" prop="reasonValue1" min-width="120" show-overflow-tooltip />
+      <el-table-column label="售后原因二级" align="center" prop="reasonValue2" min-width="120" show-overflow-tooltip />
+      <el-table-column label="售后备注" align="center" prop="auditRemark" min-width="140" show-overflow-tooltip />
       <el-table-column label="状态" align="center" prop="status"  width="130px">
         <template slot-scope="scope">
           <dict-tag :options="salesStatusOptions" :value="scope.row.status"/>

+ 3 - 0
src/views/store/storeAfterSales/myList.vue

@@ -98,6 +98,9 @@
               <dict-tag :options="refundTypeOptions" :value="scope.row.refundType"/>
             </template>
       </el-table-column>
+      <el-table-column label="售后原因一级" align="center" prop="reasonValue1" min-width="120" show-overflow-tooltip />
+      <el-table-column label="售后原因二级" align="center" prop="reasonValue2" min-width="120" show-overflow-tooltip />
+      <el-table-column label="售后备注" align="center" prop="auditRemark" min-width="140" show-overflow-tooltip />
       <el-table-column label="状态" align="center" prop="status"  width="130px">
         <template slot-scope="scope">
           <dict-tag :options="salesStatusOptions" :value="scope.row.status"/>