后台接口对接
This commit is contained in:
parent
235c38dc47
commit
62ed2aa6b9
|
|
@ -11,7 +11,7 @@ export default {
|
|||
})
|
||||
// request 触发前拼接 url
|
||||
args.url = 'https://www.opsoul.com' + args.url;
|
||||
// args.url = 'http://10.45.137.214:80' + args.url;
|
||||
// args.url = 'http://192.168.2.42:80' + args.url;
|
||||
// args.url = 'http://127.0.0.1:80' + args.url;
|
||||
if (args.data) {
|
||||
args.data.deptId = globalData.deptId;
|
||||
|
|
@ -396,5 +396,13 @@ export default {
|
|||
}
|
||||
})
|
||||
return res[1].data;
|
||||
}
|
||||
},
|
||||
async getOrderMasterDetail(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/order/master/app/detail',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="flex justify-start">
|
||||
<view class="cu-avatar xxl-view" :style="'background-image:url(' + product.goodsImgUrl + ');'">
|
||||
</view>
|
||||
<view v-if="product.goodsImgUrl" class="cu-avatar xxl-view" :style="'background-image:url(' + product.goodsImgUrl + ');'"></view>
|
||||
<view v-else-if="product.goodsLogoUrl" class="cu-avatar xxl-view" :style="'background-image:url(' + product.goodsLogoUrl + ');'"></view>
|
||||
<view class="margin-left-sm product-content">
|
||||
<view>
|
||||
<view class="text-black">{{product.goodsName}}</view>
|
||||
|
|
@ -24,6 +24,9 @@
|
|||
<text class="text-price text-red text-bold text-xl">{{product.goodsStandardList[0].goodsPrice}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else-if="product.payMoney" class="flex justify-start align-center">
|
||||
<text class="text-price text-red text-bold text-xl">{{product.payMoney}}</text>
|
||||
</view>
|
||||
<view class="padding-xs" v-if="product.type">
|
||||
<view class='cu-tag light bg-blue'>{{product.type}}</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,63 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="bg-white padding-bottom">
|
||||
<horizontal-goods-card v-if="product" :ifShowServArea="true" :product="product"></horizontal-goods-card>
|
||||
<view v-if="columnTitleArr.length" class="flex justify-between margin-tb-sm">
|
||||
<view class="basis-df">{{columnTitleArr[0]}}</view>
|
||||
<view class="flex justify-end text-center basis-sm">
|
||||
<view v-for="(title, index) in columnTitleArr" v-if="index >= 1" class="basis-df">{{title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="flex justify-between margin-tb-xs align-center" v-for="(item,index) in pickedList" :key="index">
|
||||
<view class='cu-tag padding line-main-color basis-df'>{{item[valFieldArr[0]]}}</view>
|
||||
<view class="flex justify-end basis-sm text-center">
|
||||
<view class="basis-df">{{item[valFieldArr[1]]}}</view>
|
||||
<view class="basis-df">{{item[valFieldArr[2]]}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import horizontalGoodsCard from '@/components/goods-card/horizontal-goods-card.vue';
|
||||
|
||||
export default {
|
||||
name: "simple-product-picked",
|
||||
props: {
|
||||
product: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
pickedList: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
columnTitleArr: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
valFieldArr: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
horizontalGoodsCard
|
||||
},
|
||||
methods: {
|
||||
changePiecesNum(curNum, curItem) {
|
||||
uni.$emit('changePickedNum', curNum, curItem)
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.certern-height-with-scroll {
|
||||
max-height: 300rpx;
|
||||
overflow: scroll;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -248,6 +248,7 @@
|
|||
curUserInfo: {},
|
||||
myInfo: {},
|
||||
servOrderTabList: [{
|
||||
type: 1,
|
||||
name: '待付款'
|
||||
}, {
|
||||
type: 1,
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@
|
|||
<view class="flex justify-end" v-if="tabCur === 2">
|
||||
<button class="cu-btn bg-gray margin-right-sm shadow-blur">取消订单</button>
|
||||
<button class="cu-btn bg-gray margin-right-sm shadow-blur">撤换师傅</button>
|
||||
<button class="cu-btn bg-main-color margin-right-sm shadow-blur" @click="showServDetail(shopOrder)">查看</button>
|
||||
</view>
|
||||
<view class="flex justify-end" v-if="tabCur === 3">
|
||||
<!-- <button class="cu-btn bg-gray margin-right-sm shadow-blur">申请售后</button> -->
|
||||
|
|
@ -88,7 +89,7 @@
|
|||
class="padding-tb-sm solid-top">
|
||||
<view>约定服务时间:</view>
|
||||
<view class="flex justify-between align-end">
|
||||
<view>{{shopOrder.agreedServTime.time}}</view>
|
||||
<view>{{shopOrder.serverTime}}</view>
|
||||
<view>
|
||||
<button v-if="shopOrder.agreedServTime.customerAgreeStatus === 1"
|
||||
class="cu-btn sm bg-yellow margin-right-sm"
|
||||
|
|
@ -211,9 +212,9 @@
|
|||
updateFinisheStatus(status, index) {
|
||||
this.myOrders[index].finishOrder.finishStatus = status;
|
||||
},
|
||||
showServDetail(shopOrder) {
|
||||
showServDetail(order) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/serv-detail'
|
||||
url: '/pages/my/serv-detail?order=' + encodeURIComponent(JSON.stringify(order))
|
||||
})
|
||||
},
|
||||
showModalByRef(refName, curOrder) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<block slot="content">服务订单详情</block>
|
||||
</cu-custom>
|
||||
<!-- 任务进度跟踪 -->
|
||||
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm">
|
||||
<view v-if="servDetail.orderStatus === 3" class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm">
|
||||
<uni-collapse v-model="value">
|
||||
<uni-collapse-item :open="true">
|
||||
<template v-slot:title>
|
||||
|
|
@ -31,43 +31,44 @@
|
|||
<!-- 服务单概况 -->
|
||||
<view class="bg-white margin-lr-sm margin-top-sm padding">
|
||||
<view class="flex align-center">
|
||||
<text class="text-xl margin-right">{{servDetail.mainServOrder.servTitle}}</text>
|
||||
<view class='cu-tag bg-purple radius light margin-right-sm'>服务中</view>
|
||||
<text class="text-xl margin-right">{{servDetail.goodsName}}</text>
|
||||
<view class='cu-tag bg-purple radius light margin-right-sm' v-if="servDetail.orderStatus === 3">服务中</view>
|
||||
<view class='cu-tag bg-purple radius light margin-right-sm' v-if="servDetail.orderStatus === 2">待上门</view>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<!-- <view class="margin-top-sm">
|
||||
<view v-for="(item, index) in servDetail.mainServOrder.orderTag" class='cu-tag radius margin-right-sm'>
|
||||
{{item}}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="margin-top-sm">
|
||||
<text class="cuIcon-location text-main-color margin-right-xs"></text>
|
||||
<text>{{servDetail.mainServOrder.address}}</text>
|
||||
<text>{{servDetail.address}}</text>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<text class="cuIcon-people text-main-color margin-right-xs"></text>
|
||||
<text>{{servDetail.mainServOrder.person2Contact.name}}</text>
|
||||
<text>{{servDetail.mainServOrder.person2Contact.phone}}</text>
|
||||
<text class="margin-right-sm">{{servDetail.workerName}}</text>
|
||||
<text>{{servDetail.workerPhone}}</text>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<text class="cuIcon-time text-main-color margin-right-xs"></text>
|
||||
<text>预约时间:{{servDetail.mainServOrder.bookTime}}</text>
|
||||
<text>预约时间:{{servDetail.serverTime}}</text>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<!-- <view class="margin-top-sm">
|
||||
<text class="cuIcon-time text-main-color margin-right-xs"></text>
|
||||
<text>排单时间:{{servDetail.mainServOrder.boodTime}}</text>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
</view> -->
|
||||
<view class="margin-top-sm" v-if="servDetail.orderStatus === 3">
|
||||
<text class="cuIcon-time text-main-color margin-right-xs"></text>
|
||||
<text>上门时间:{{servDetail.mainServOrder.doorTime}}</text>
|
||||
<text>上门时间:{{servDetail.workBeginTime}}</text>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<text class="cuIcon-moneybag text-main-color margin-right-xs"></text>
|
||||
<text>任务金额:</text>
|
||||
<text class="text-price">{{servDetail.mainServOrder.taskPrice}}</text>
|
||||
<text class="text-price">{{servDetail.payMoney}}</text>
|
||||
</view>
|
||||
<view class="margin-top-xs text-sm text-gray"
|
||||
<!-- <view class="margin-top-xs text-sm text-gray"
|
||||
v-for="(item, index) in servDetail.mainServOrder.gratuityRecord">
|
||||
追加费用:<text class="text-price">{{item.price}}</text>[{{item.type}}]
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 待服务列 -->
|
||||
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm">
|
||||
|
|
@ -77,24 +78,29 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<product-picked :product="servDetail.product" :pickedList="servDetail.product.pickedList" :columnTitleArr="servingColumnHeaders" :showToServNum="true"></product-picked>
|
||||
<simple-product-picked :product="servDetail" :pickedList="servDetail.standardList" :columnTitleArr="servingColumnHeaders" :valFieldArr="servingValFields"></simple-product-picked>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 完成记录 -->
|
||||
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm" v-for="(item, index) in servDetail.finishRecord">
|
||||
<!-- 子单完成记录 -->
|
||||
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm" v-for="(item, index) in servDetail.orderStandardDetailList">
|
||||
<view class="cu-bar solid-bottom">
|
||||
<view class="action bar-first-action">
|
||||
<text class="cuIcon-titles text-main-color"></text> 完成记录({{item.finishList.length}})
|
||||
<text class="cuIcon-titles text-main-color"></text> 实施单完成记录
|
||||
</view>
|
||||
<view class='cu-tag bg-purple radius light margin-right-sm'>{{item.finishTime}}</view>
|
||||
<view class='cu-tag bg-purple radius light margin-right-sm'>编码:{{item.orderDetailCode}}</view>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<product-picked :pickedList="item.finishList" :columnTitleArr="servedColumnHeaders" :showToServNum="true"></product-picked>
|
||||
<view>师傅:{{item.workerName}}</view>
|
||||
<view class="margin-top-sm">联系方式:{{item.workerPhone}}</view>
|
||||
<view class="margin-top-sm">预约时间:{{item.revTime}}</view>
|
||||
<view class="margin-top-sm" v-if="servDetail.orderStatus === 2">上门时间:{{item.workBeginTime}}</view>
|
||||
<view class="margin-top-sm" v-if="item.workFinishTime">完成时间:{{item.workFinishTime}}</view>
|
||||
<simple-product-picked :pickedList="item.orderStandardList" :columnTitleArr="servedColumnHeaders" :valFieldArr="servedValFields"></simple-product-picked>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 订单编码和时间 -->
|
||||
<view class="bg-white margin-top-sm padding margin-lr-sm margin-bottom-with-bar">
|
||||
<view>订单编码:{{servDetail.serialCode}}</view>
|
||||
<view>订单编码:{{servDetail.orderMasterCode}}</view>
|
||||
<view class="margin-top-xs">订单时间:{{servDetail.createTime}}</view>
|
||||
</view>
|
||||
<!-- 底部操作栏 -->
|
||||
|
|
@ -126,21 +132,24 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import productPicked from '@/components/goods-card/product-picked.vue';
|
||||
import simpleProductPicked from '@/components/goods-card/simple-product-picked.vue';
|
||||
import urgentMsg from '@/pages/my/components/modal/urgent-msg.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
productPicked,
|
||||
simpleProductPicked,
|
||||
urgentMsg
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
value: ['0'],
|
||||
order: {},
|
||||
servDetail: {},
|
||||
finishRecord4Show: [],
|
||||
servingColumnHeaders: ['购买型号', '购买量', '待服务'],
|
||||
servedColumnHeaders: ['购买型号', '购买量', '已服务'],
|
||||
servingValFields: ['standardName', 'standardNum', 'waitServerNum'],
|
||||
servedValFields: ['standardName', 'standardNum', 'serverNum'],
|
||||
process: '',
|
||||
ifShowPageMeta: false,
|
||||
orderManageMenu: [{
|
||||
|
|
@ -150,20 +159,27 @@
|
|||
sendUrgentMsgModal: false
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.loadData();
|
||||
onLoad(options) {
|
||||
if (options && options.order) {
|
||||
this.order = JSON.parse(decodeURIComponent(options.order));
|
||||
}
|
||||
this.loadData(this.order.orderMasterId);
|
||||
},
|
||||
methods: {
|
||||
async loadData() {
|
||||
this.servDetail = await this.$api.data('servDetail');
|
||||
this.finishList4Show = this.servDetail.finishRecord;
|
||||
for (let i = 0; i < this.finishList4Show.length; i++) {
|
||||
let finishList = this.finishList4Show[i].finishList;
|
||||
for (let j = 0; j < finishList.length; j++) {
|
||||
finishList[j].secondColumnNum = finishList[j].servedNum;
|
||||
}
|
||||
this.finishList4Show[i].finishList = finishList;
|
||||
}
|
||||
async loadData(orderMasterId) {
|
||||
// this.servDetail = await this.$api.data('servDetail');
|
||||
// this.finishList4Show = this.servDetail.finishRecord;
|
||||
// for (let i = 0; i < this.finishList4Show.length; i++) {
|
||||
// let finishList = this.finishList4Show[i].finishList;
|
||||
// for (let j = 0; j < finishList.length; j++) {
|
||||
// finishList[j].secondColumnNum = finishList[j].servedNum;
|
||||
// }
|
||||
// this.finishList4Show[i].finishList = finishList;
|
||||
// }
|
||||
let servDetailRes = await this.$request.getOrderMasterDetail({
|
||||
id: orderMasterId
|
||||
});
|
||||
this.servDetail = servDetailRes.data;
|
||||
},
|
||||
changePopupState(e) {
|
||||
this.ifShowPageMeta = e.show;
|
||||
|
|
|
|||
Loading…
Reference in New Issue