tangning %!s(int64=2) %!d(string=hai) anos
pai
achega
03e1c7d216

+ 4 - 3
src/api/index.ts

@@ -49,12 +49,13 @@ export function repairList(params) {
  * 工单详情
  * @returns UseAxiosReturn
  */
+
 export const repairDetails = (repairId) =>
-  useAxiosApi(`/service/sale/repairInfo/details`, {
-    method: 'GET',
+  request({
+    url: '/service/sale/repairInfo/details',
+    method: 'get',
     params: { repairId },
   });
-
 /**
  * 工单流程
  * @returns UseAxiosReturn

+ 3 - 3
src/store/modules/home.ts

@@ -27,9 +27,9 @@ export const useHomeStore = defineStore({
                 8: '待测试',
                 9: '待支付',
                 10: '待发货',
-                11: '已发货',
-                12: '已评价',
-                13: '待评价',
+                11: '已完结',//'已发货',
+                12: '已完结',//'已评价',
+                13: '已完结',//'待评价',
                 21: '待跟进',
                 22: '维修完成',
                 23: '已完结',

+ 6 - 8
src/views/detail/index.vue

@@ -4,11 +4,10 @@
     <div class="stepList item_content" :key="stepShow+'123'">
       <div class="item_content_top">
         <div class="stepList_title">维修单号 {{id}}</div>
-        <!-- <van-button class="top_but" type="primary" size="small">去支付</van-button> -->
         <van-button v-if="detailData.repairerVo?.status == 3" size="small" @click="goRoute(`/repair/${id}`)" color="#00B3EC" type="primary" >待确认</van-button>
         <van-button v-if="detailData.repairerVo?.status == 9 || detailData.repairerVo?.status == 4" size="small" @click="goRoute(`/payment/${id}`)" color="#00B3EC" type="primary" >支付</van-button>
-        <van-button v-if="detailData.repairerVo?.status == 13" size="small" @click="goRoute(`/evaluate/${id}`)" color="#00B3EC" type="primary" >评价</van-button>
-        <van-button v-if="detailData.repairerVo?.status == 10" size="small" @click="goRoute(`/invoice/${id}`)" color="#00B3EC" type="primary" >申请开票</van-button>
+        <van-button v-if="detailData.repairerVo?.status  > 11 && detailData.repairerVo?.commentStatus == 0" size="small" @click="goRoute(`/evaluate/${id}`)" color="#00B3EC" type="primary" >评价</van-button>
+        <van-button v-if="detailData.repairerVo?.status  > 9 && detailData.applyInvoice == 0" size="small" @click="goRoute(`/invoice/${id}`)" color="#00B3EC" type="primary" >申请开票</van-button>
       </div>
       <transition-group name="van-fade">
         <!-- <div v-show="stepShow">Slide Right</div> -->
@@ -65,7 +64,7 @@
         </div>
       </div>
     </div>
-    <div class="page_custinfo item_content" v-if="detailData.priceList.length">
+    <div class="page_custinfo item_content" v-if="detailData.priceList.length && detailData.repairerVo?.status  > 3">
       <div class="title">费用明细</div>
       <div class="content">
         <div class="cost_list">
@@ -158,6 +157,7 @@ let detailData = ref({
   repairPay:<any>{},
   RepairComment:<any>{},
   priceList:<any>[],
+  applyInvoice:0,
 });
 let processList = ref<any>([])
 onMounted(() => {
@@ -177,14 +177,12 @@ function priceCount(list){
   return price.toFixed(2)
 }
 const getDetaile = async () => {
-  const { response } = await repairDetails(id);
-  let detaile = unref(response)?.data;
-  detailData.value = detaile
+  const { data } = await repairDetails(id);
+  detailData.value = data
   const resProcess = await repairProcess(id);
   console.log('resProcess',resProcess)
   let process = unref(resProcess?.response)?.data;
   processList.value = process
-  console.log('getDetaile',detaile,process)
 };
 const handleShow = () => {
   stepShow.value = !stepShow.value;

+ 2 - 9
src/views/detail/payment.vue

@@ -33,15 +33,8 @@ const detail = ref({
   amount: 0,
 });
 onMounted(async () => {
-  const { response } = await repairDetails(id);
-  let detaile = unref(response)?.data,
-    amount = 0;
-  // detail.value.priceList =
-  detaile.priceList.map((ele) => {
-    amount = amount + ele.price * ele.count;
-    // return ele
-  });
-  detail.value.amount = amount;
+  const { data } = await repairDetails(id);
+  detail.value.amount = data.payAmount;
 });
 
 function payOrder() {

+ 2 - 2
src/views/detail/repair.vue

@@ -50,8 +50,8 @@ const detail = ref({
   repairRegisterVo: <any>{},
 });
 onMounted(async () => {
-  const { response } = await repairDetails(id);
-  let detaile = unref(response)?.data,
+  const { data } = await repairDetails(id);
+  let detaile = data,
     amount = 0;
   detail.value.repairerVo = <any>detaile.repairerVo;
   detail.value.repairRegisterVo = <any>detaile.repairRegisterVo;

+ 2 - 2
src/views/home/list.vue

@@ -23,8 +23,8 @@
             <!-- <van-button @click.stop="goRoute(`payment/${item}`)" hairline size="small" type="primary" >支付</van-button> -->
             <van-button v-if="item.status == 3" @click.stop="goRoute(`repair/${item.repairId}`)" color="#00B3EC" plain hairline size="small">待确认</van-button>
             <van-button v-if="item.status == 9 || item.status == 4" @click.stop="goRoute(`payment/${item.repairId}`)" color="#00B3EC" hairline size="small">支付</van-button>
-            <van-button v-if="item.status == 13" @click.stop="goRoute(`evaluate/${item.repairId}`)" color="#00B3EC" plain hairline size="small">评价</van-button>
-            <van-button v-if="item.status == 10" @click.stop="goRoute(`invoice/${item.repairId}`)" color="#00B3EC" hairline size="small">申请开票</van-button>
+            <van-button v-if="item.status > 11 && item.commentStatus == 0" @click.stop="goRoute(`evaluate/${item.repairId}`)" color="#00B3EC" plain hairline size="small">评价</van-button>
+            <van-button v-if="item.status > 9 && item.invoiceStatus == 0" @click.stop="goRoute(`invoice/${item.repairId}`)" color="#00B3EC" hairline size="small">申请开票</van-button>
           </div>
         </div>
       </div>