zhangdan 4 lat temu
rodzic
commit
f6e0d49228

+ 9 - 9
src/api/recoveryManage.js

@@ -98,12 +98,12 @@ export const getOrderTotalNum = (params) => {
     method: 'post'
   })
 }
-// 编辑查详情
-// export const slelerDetails = (params) => {
-//   const url = `sleler/user/findById/${params.id}`
-//   return axios({
-//     url: url,
-//     data: params,
-//     method: 'get'
-//   })
-// }
+// 订单详情
+export const orderDetails = (params) => {
+  const url = `dto/reserve/orderReserveInfo`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 75 - 24
src/views/recoveryManage/riderOrderModal.vue

@@ -10,57 +10,84 @@
       <a-row :gutter="48" >
         <a-col :span="8" class="item-cont">
           <p class="item-label">单号:</p>
-          <p class="item-main">{{ }}</p>
+          <p class="item-main">{{ pageInfo.orderReserveNo ? pageInfo.orderReserveNo : '--' }}</p>
         </a-col>
 
         <a-col :span="8" class="item-cont">
           <p class="item-label">状态:</p>
-          <p class="item-main">{{ }}</p>
+          <p class="item-main">{{ pageInfo.orderStatusDictValue ? pageInfo.orderStatusDictValue : '--' }}</p>
         </a-col>
         <a-col :span="8" class="item-cont">
           <p class="item-label">支付方式:</p>
-          <p class="item-main">{{ }}</p>
+          <p class="item-main">{{ pageInfo.payTypeDictValue ? pageInfo.payTypeDictValue : '--' }}</p>
         </a-col>
       </a-row>
       <a-row :gutter="48" >
         <a-col :span="8" class="item-cont">
           <p class="item-label">下单时间:</p>
-          <p class="item-main">{{ }}</p>
+          <p class="item-main">{{ pageInfo.createDate ? pageInfo.createDate : '--' }}</p>
         </a-col>
 
         <a-col :span="8" class="item-cont">
           <p class="item-label">预约时间:</p>
-          <p class="item-main">{{ }}</p>
+          <p class="item-main">{{ pageInfo.RESERVE_DATE_BEGIN ? pageInfo.RESERVE_DATE_BEGIN : '' }} {{ pageInfo.RESERVE_DATE_END ? pageInfo.RESERVE_DATE_END : '' }}</p>
+          <p v-if="!pageInfo.RESERVE_DATE_BEGIN && !pageInfo.RESERVE_DATE_END">--</p>
         </a-col>
         <a-col :span="8" class="item-cont">
           <p class="item-label">服务时间:</p>
-          <p class="item-main">{{ }}</p>
+          <p class="item-main">{{ pageInfo.FINISH_DATE ? pageInfo.FINISH_DATE : '--' }}</p>
         </a-col>
       </a-row>
       <a-row :gutter="48" >
         <a-col :span="8" class="item-cont">
           <p class="item-label">服务骑手:</p>
-          <p class="item-main">{{ }}</p>
+          <p class="item-main">{{ pageInfo.name ? pageInfo.name+'-' : '' }}{{ pageInfo.phone? pageInfo.phone :'' }}</p>
+          <p v-if="!pageInfo.name && !pageInfo.phone">--</p>
         </a-col>
         <a-col :span="8" class="item-cont">
           <p class="item-label">回收重量(kg):</p>
-          <p class="item-main">{{ }}</p>
+          <p class="item-main">{{ pageInfo.TOTAL_WEIGHT ? (pageInfo.TOTAL_WEIGHT/1000).toFixed(3)/1 : '0' }}</p>
         </a-col>
         <a-col :span="8" class="item-cont">
           <p class="item-label">支付金额(元):</p>
-          <p class="item-main">{{ }}</p>
+          <p class="item-main">{{ pageInfo.PAY_AMOUNT ? pageInfo.PAY_AMOUNT : '0' }}</p>
         </a-col>
       </a-row>
       <a-row :gutter="48" >
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">联系人信息:</p>
+          <p class="item-main">{{ pageInfo.CONTACT_NAME ? pageInfo.CONTACT_NAME+'-' : '' }} {{ pageInfo. CONTACT_MOBILE ? pageInfo. CONTACT_MOBILE : '' }}</p>
+          <p class="item-main" v-if="!pageInfo.CONTACT_NAME && !pageInfo. CONTACT_MOBILE">--</p>
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">地址:</p>
+          <p class="item-main">{{ pageInfo.CONTACT_ADDRESS ? pageInfo.CONTACT_ADDRESS : '--' }}</p>
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">门头照:</p>
+          <img src="" alt=""/>
+        </a-col>
+      </a-row>
+      <a-row :gutter="48" >
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">类型:</p>
+          <p class="item-main">{{ pageInfo.addressTypeDictValue ? pageInfo.addressTypeDictValue : '--' }}</p>
+        </a-col>
         <a-col :span="8" class="item-cont">
           <p class="item-label">取消原因:</p>
-          <p class="item-main">{{ }}</p>
+          <p class="item-main">{{ pageInfo.CANCEL_REASON ? pageInfo.CANCEL_REASON : '--' }}</p>
         </a-col>
         <a-col :span="8" class="item-cont">
           <p class="item-label">图片:</p>
           <img src="" alt=""/>
         </a-col>
       </a-row>
+      <a-row :gutter="48" >
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">下单账号:</p>
+          <p class="item-main">{{ pageInfo.mobile ? pageInfo.mobile : '--' }}</p>
+        </a-col>
+      </a-row>
       <!-- 列表 -->
       <div class="table-title">回收明细</div>
       <!-- 列表 -->
@@ -69,8 +96,13 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data-source="tableData"
+        :pagination="false"
+        :scroll="{ y: 450 }"
         bordered
       >
+        <template slot="no">
+        <!-- <span>{{tableData[i]}}</span> -->
+        </template>
       </a-table>
     </a-modal>
   </div>
@@ -78,7 +110,7 @@
 
 <script>
 // import {  VSelect } from '@/components'
-// import { getRoleList } from '@/api/power-user.js'
+import { orderDetails } from '@/api/recoveryManage.js'
 export default {
   name: 'RiderOrderModal',
   components: {
@@ -89,7 +121,7 @@ export default {
       type: Boolean,
       default: false
     },
-    itemId: {
+    itemOrderNo: {
       type: [String, Number],
       default: ''
     }
@@ -98,24 +130,36 @@ export default {
     return {
       isShow: this.visible,
       tableData: [], // 列表数据
-      columns: [{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
-        { title: '回收类别', dataIndex: '', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
-        { title: '回收名称', dataIndex: '', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
-        { title: '回收价格', dataIndex: 'stationName', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
-        { title: '回收重量(kg)', dataIndex: 'cleanTimes', width: 150, align: 'center', sorter: true },
-        { title: '交易金额(元)', dataIndex: 'cleanWeight', width: 150, align: 'center', sorter: true, customRender: (text) => { return text || 0 } }]
+      pageInfo: {},
+      columns: [{ title: '序号', dataIndex: 'no', width: 60, align: 'center', scopedSlots: { customRender: 'no' } },
+        { title: '回收类别', dataIndex: 'RUBBISH_TYPE', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '回收名称', dataIndex: 'RUBBISH_TYPE_ITEM', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '回收价格', dataIndex: 'RUBBISH_PRICE', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '回收重量(kg)', dataIndex: 'RUBBISH_WEIGHT', width: 150, align: 'center', customRender: (text) => { return (text / 1000).toFixed(3) / 1 || '0' } },
+        { title: '交易金额(元)', dataIndex: 'TOTAL_AMOUNT', width: 150, align: 'center', customRender: (text) => { return text || 0 } }]
     }
   },
   methods: {
-    // 列表数据
-    getListData () {
-
+    // 详情数据
+    getPageData () {
+      // const params = {}
+      // if (this.itemOrderNo) {
+      //   // params.OrderReserveEntity = {
+      //   //   orderReserveNo: this.itemOrderNo
+      //   // }
+      // }
+      orderDetails({ orderReserveNo: this.itemOrderNo }).then(res => {
+        if (res.status == 200) {
+          this.pageInfo = res.data
+          this.tableData = res.data.orderReserveItemEntityList || []
+          console.log(res, '------------详情数据')
+        }
+      })
     },
     cancel (e) {
       this.clear()
       this.$emit('close')
     },
-
     // 取消
     handleCancel () {
       this.cancel()
@@ -128,10 +172,14 @@ export default {
     },
     isShow (newValue, oldValue) {
       if (newValue) {
-        if (this.itemId) {
+        if (this.itemOrderNo) {
+          this.getPageData()
         }
+      } else {
+        this.$emit('close')
       }
-    } }
+    }
+  }
 }
 </script>
 
@@ -145,4 +193,7 @@ export default {
   .table-title{
     margin-bottom: 10px;
   }
+  .item-cont{
+    display: flex;
+  }
 </style>

+ 6 - 6
src/views/recoveryManage/riderOrderRecord.vue

@@ -85,7 +85,7 @@
       </template>
     </s-table>
     <!-- 详情弹窗 -->
-    <riderOrderModal :visible="isOpenModal" :itemId="recordId" @close="isOpenModal=false"></riderOrderModal>
+    <riderOrderModal :visible="isOpenModal" :itemOrderNo="recordOrderNo" @close="isOpenModal=false"></riderOrderModal>
   </a-card>
 </template>
 
@@ -119,7 +119,7 @@ export default {
       weightTotal: 0, // 回收物总计
       moneyTotal: 0, // 金额总计
       isOpenModal: false,
-      recordId: '', // 行id
+      recordOrderNo: '', // 行订单编号
       // 将默认近一周时间日期回显在时间选择框中
       time: [],
       dateFormat: 'YYYY-MM-DD',
@@ -131,7 +131,7 @@ export default {
         { title: '骑手信息', dataIndex: 'rider', width: 200, align: 'center', scopedSlots: { customRender: 'rider' } },
         { title: '回收重量(kg)', dataIndex: 'totalWeight', width: 150, align: 'center', customRender: (text) => { return (text / 1000).toFixed(3) / 1 || 0 } },
         { title: '交易金额(元)', dataIndex: 'originalAmount', width: 150, align: 'center', customRender: (text) => { return text || 0 } },
-        { title: '状态', dataIndex: 'orderStatus', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '状态', dataIndex: 'orderStatusDictValue', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
         { title: '详情', width: 80, align: 'center', scopedSlots: { customRender: 'detail' } }],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -191,15 +191,15 @@ export default {
         if (res.status == 200) {
           if (res.data) {
             this.totalNum = res.data.orderCount || 0 // 总条数
-            this.weightTotal = (res.data.totalWeight / 1000).toFixed(3) / 1 // 回收物总计
-            this.moneyTotal = res.data.originalAmount || 0 // 金额总计
+            this.weightTotal = (res.data.totalWeight / 1000).toFixed(3) / 1 || 0// 回收物总计
+            this.moneyTotal = res.data.originalAllAmount || 0 // 金额总计
           }
         }
       })
     },
     // 查看详情
     handelDetail (row) {
-      this.recordId = row.id
+      this.recordOrderNo = row.orderReserveNo
       this.isOpenModal = true
     },
     // 查询