zhangdan 4 gadi atpakaļ
vecāks
revīzija
f5d8f95d58

+ 51 - 16
src/views/recoveryManage/riderOrderModal.vue

@@ -3,7 +3,7 @@
     <a-modal
       class="modalBox"
       title="详情"
-      v-model="isShow"
+      v-model="isshow"
       @cancle="cancel"
       width="70%"
       :centered="true">
@@ -30,10 +30,10 @@
 
         <a-col :span="8" class="item-cont">
           <p class="item-label">预约时间:</p>
-          <p class="item-main">{{pageInfo.reserveDateBegin.substring(0,10)}} {{pageInfo.reserveTimeTypeDictValue}}</p>
+          <p class="item-main">{{pageInfo.reserveDateBegin ? pageInfo.reserveDateBegin.substring(0,10) :''}} {{pageInfo.reserveTimeTypeDictValue}}</p>
           <p v-if="!pageInfo.reserveDateBegin && !pageInfo.reserveTimeTypeDictValue">--</p>
         </a-col>
-        <a-col :span="8" class="item-cont">
+        <a-col :span="8" class="item-cont" v-if="pageInfo.orderStatus=='FINISH'">
           <p class="item-label">服务时间:</p>
           <p class="item-main">{{ pageInfo.finishDate ? pageInfo.finishDate : '--' }}</p>
         </a-col>
@@ -48,9 +48,9 @@
           <p class="item-label">回收重量(kg):</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">
+        <a-col :span="8" class="item-cont" v-if="pageInfo.orderStatus=='FINISH'">
           <p class="item-label">支付金额(元):</p>
-          <p class="item-main">{{ pageInfo.PAY_AMOUNT ? pageInfo.PAY_AMOUNT : '0' }}</p>
+          <p class="item-main">{{ pageInfo.originalAmount ? pageInfo.originalAmount : '0' }}</p>
         </a-col>
       </a-row>
       <a-row :gutter="48" >
@@ -65,7 +65,9 @@
         </a-col>
         <a-col :span="8" class="item-cont">
           <p class="item-label">门头照:</p>
-          <img src="" alt=""/>
+          <viewer :image="pageInfo.imageHeader ? pageInfo.imageHeader :[]" class="viewer" ref="viewer" @inited="inited" rebuild>
+            <img v-for="src in pageInfo.imageHeader" :src="src" :key="src" class="image1">
+          </viewer>
         </a-col>
       </a-row>
       <a-row :gutter="48" >
@@ -73,13 +75,17 @@
           <p class="item-label">类型:</p>
           <p class="item-main">{{ pageInfo.addressTypeDictValue ? pageInfo.addressTypeDictValue : '--' }}</p>
         </a-col>
-        <a-col :span="8" class="item-cont" v-if="pageInfo.orderStatus==CANCEL">
+        <a-col :span="8" class="item-cont" v-if="pageInfo.cencelReason=='CANCEL'">
           <p class="item-label">取消原因:</p>
           <p class="item-main">{{ pageInfo.cencelReason ? pageInfo.cencelReason : '--' }}</p>
         </a-col>
         <a-col :span="8" class="item-cont">
           <p class="item-label">图片:</p>
-          <img src="" alt=""/>
+          <viewer :images="pageInfo.imageList? pageInfo.imageList:[]" class="viewer" ref="viewer" @inited="inited" rebuild>
+            <img v-for="src in pageInfo.imageList" :src="src" :key="src" class="image">
+          </viewer>
+          <P style="margin-bottom: 0;">{{ pageInfo.imageList ? pageInfo.imageList.length+' 张' :'0 张' }}</P>
+          <!-- <img :src="item" alt="" v-for="item in pageInfo.imageList" style="width: 40px;height: 40px;"/> -->
         </a-col>
       </a-row>
       <a-row :gutter="48" >
@@ -124,15 +130,17 @@ export default {
   },
   data () {
     return {
-      isShow: this.visible,
+      isshow: this.visible,
       tableData: [], // 列表数据
+      image:[],
+      images:[],
       pageInfo: {},
       columns: [{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
-        { 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 } }]
+        { title: '回收类别', dataIndex: 'rubbishTypeDictValue', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '回收名称', dataIndex: 'typeName', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '回收价格', dataIndex: 'rubbishPrice', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '回收重量(kg)', dataIndex: 'rubbishWeight', width: 150, align: 'center', customRender: (text) => { return (text / 1000).toFixed(3) / 1 || '0' } },
+        { title: '交易金额(元)', dataIndex: 'totalAmount', width: 150, align: 'center', customRender: (text) => { return text || 0 } }]
     }
   },
   methods: {
@@ -141,6 +149,10 @@ export default {
       orderDetails({ orderReserveNo: this.itemOrderNo }).then(res => {
         if (res.status == 200) {
           this.pageInfo = res.data
+          if(res.data.imageHeader){
+           this.pageInfo.imageHeader=this.pageInfo.imageHeader.split()
+          }
+        console.log( this.pageInfo.imageHeader,'---------------v')
           this.tableData = res.data.orderReserveItemEntityList || []
           this.tableData.forEach((item,index)=>{
              item.no=index+1
@@ -148,6 +160,12 @@ export default {
         }
       })
     },
+    inited (viewer) {
+      this.$viewer = viewer
+    },
+    isShow () {
+      this.$viewer.update()
+    },
     cancel (e) {
       this.clear()
       this.$emit('close')
@@ -160,9 +178,9 @@ export default {
   },
   watch: {
     visible (newValue, oldValue) {
-      this.isShow = newValue
+      this.isshow = newValue
     },
-    isShow (newValue, oldValue) {
+    isshow (newValue, oldValue) {
       if (newValue) {
         if (this.itemOrderNo) {
           this.getPageData()
@@ -188,4 +206,21 @@ export default {
   .item-cont{
     display: flex;
   }
+  .image1 {
+    width:25px;
+    height: 25px;
+    cursor: pointer;
+    margin: 5px;
+    display: inline-block;
+  }
+  .image {
+    width:25px;
+    height: 25px;
+    cursor: pointer;
+    margin: 5px;
+    display: inline-block;
+  }
+  .image:not(:first-child){
+    display: none;
+  }
 </style>

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

@@ -28,7 +28,7 @@
           </a-col>
           <a-col :xs="24" :sm="12" :md="6" >
             <a-form-model-item label="联系人信息" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-input allowClear v-model.trim="queryParam.UserphoneOrName" placeholder="请输入名称或电话" @pressEnter="$refs.table.refresh(true)"/>
+              <a-input allowClear v-model.trim="queryParam.userPhoneOrName" placeholder="请输入名称或电话" @pressEnter="$refs.table.refresh(true)"/>
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="12" :md="6" >
@@ -111,7 +111,7 @@ export default {
         orderReserveNo: '', // 骑手信息
         orderStatus: '', // 骑手信息
         phoneOrName: '', // 骑手信息
-        UserphoneOrName: ''
+        userPhoneOrName: ''
       },
       totalNum: 0, // 总条数
       weightTotal: 0, // 回收物总计
@@ -213,7 +213,7 @@ export default {
         orderReserveNo: '', // 骑手信息
         orderStatus: '', // 骑手信息
         phoneOrName: '', // 骑手信息
-        UserphoneOrName: ''
+        userPhoneOrName: ''
       }
       this.time = []
       this.refreshSearch()