This commit is contained in:
2026-10-08 18:34:09 +08:00
commit 2933904f4c
905 changed files with 112129 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
<template>
<el-form ref="form" label-width="80px">
<el-form-item label="物流公司">
{{ info.expressName }}
</el-form-item>
<el-form-item label="物流单号">
{{ info.expressNo }}
</el-form-item>
<el-form-item label="发货单">
<el-image v-for="(item, index) in info.expressPhoto" :key="index" :src="item"
class="mr-10 mb-10"
:preview-src-list="info.expressPhoto" style="width: 100px;height: 100px"/>
</el-form-item>
<el-form-item label="备注">
{{ info.remark }}
</el-form-item>
<div class="mt-20 flex justify-center items-center text-center">
<el-button type="primary" size="small" plain @click.native="close">关闭</el-button>
</div>
</el-form>
</template>
<script>
export default {
name: "expressInfo",
props: {
info: Object
},
data() {
return {}
},
methods: {
close() {
this.$emit('close')
},
}
}
</script>
+108
View File
@@ -0,0 +1,108 @@
<template>
<view>
<view class="py-20">
<view class="py-20 mb-20 flex justify-between items-center w-100p border-bottom" v-for="(item, index) in goods"
:key="index">
<view class="flex justify-start items-start">
<view class="flex justify-start items-start">
<el-image :src="getGoodsImage(item)" class="cover ml-20" fit="cover" v-if="getGoodsImage(item)"/>
<view class="flex flex-col justify-start items-start ml-20">
<text class="font-bold mb-15">{{ item.goodsName }}</text>
<text class="text-gray" v-if="order.type === 0">{{ item.sku.label }}</text>
<view class="flex justify-start items-center mt-20">
<text class="text-25 font-bold" v-if="order.type === 0">¥{{
item.sku.values
}}
</text>
<text class="text-25 font-bold" v-else>¥{{ item.goodsPrice }}</text>
<text class="text-25 ml-35">x{{ item.num }}</text>
</view>
</view>
</view>
</view>
<view>
<text class="text-35 font-bold flex-1 text-main" v-if="order.type === 0">¥{{
parseFloat(item.sku.values) * item.num
}}
</text>
<text class="text-35 font-bold flex-1 text-main" v-else>¥{{
parseFloat(item.goodsPrice) * item.num
}}
</text>
</view>
</view>
<view v-if="order.type === 1">
<p class="text-35 font-bold mb-25">服务详情</p>
<el-descriptions border :column="2">
<el-descriptions-item label="考察对象" v-if="selfProduct.type === 0">
<p style="margin-bottom: .5rem" v-for="(item, index) in selfProduct.contentList" :key="index">
{{ item.name }}({{
item.code
}})--{{ item.addressRegion.province.name }}{{
item.addressRegion.city.name
}}{{ item.addressRegion.area.name }}{{ item.address }}</p>
</el-descriptions-item>
<el-descriptions-item label="考察产品" v-else>
<p style="margin-bottom: .5rem" v-for="(item, index) in selfProduct.contentList" :key="index">
{{ item.name }}--{{ item.addressRegion.province.name }}{{
item.addressRegion.city.name
}}{{ item.addressRegion.area.name }}{{ item.address }}</p>
</el-descriptions-item>
<el-descriptions-item label="接收文件电子邮箱">
<span>{{ selfProduct.email }}</span>
</el-descriptions-item>
<el-descriptions-item label="接收文件微信">
<span>{{ selfProduct.wechat }}</span>
</el-descriptions-item>
<el-descriptions-item label="接收文件寄件地址">
<span v-if="selfProduct.receiveAddressRegion.province">{{
selfProduct.receiveAddressRegion.province.name
}}{{
selfProduct.receiveAddressRegion.city.name
}}{{ selfProduct.receiveAddressRegion.area.name }}{{ selfProduct.receiveAddress }}</span>
</el-descriptions-item>
<el-descriptions-item label="申请人">
<span>{{ selfProduct.requestName }}</span>
</el-descriptions-item>
<el-descriptions-item label="业务联系人">
<span>{{ selfProduct.contactName }}</span>
</el-descriptions-item>
<el-descriptions-item label="业务联系方式">
<span>{{ selfProduct.contact }}</span>
</el-descriptions-item>
</el-descriptions>
</view>
</view>
</view>
</template>
<script>
export default {
name: "goods",
props: {
goods: Array,
order: Object,
selfProduct: Object,
},
data() {
return {}
},
methods: {
getGoodsImage(item) {
if (!item) return ''
if (item.sku && item.sku.image) return item.sku.image
if (item.goods && item.goods.cover) return item.goods.cover
return ''
}
}
}
</script>
<style lang="scss" scoped>
.cover {
width: 80px;
height: 80px;
}
</style>
+234
View File
@@ -0,0 +1,234 @@
<template>
<view>
<div class="font-bold">
<span>订单编号: {{ orderInfo.orderNo }}</span>
<span class="ml-20 text-main" v-if="orderInfo.orderStatus > 1">(已发货)</span>
</div>
<div class="font-bold my-25">订单总额: {{ orderInfo.amount }}元</div>
<div class="text-main text-25 my-25" style="line-height: 1.9;">
<p>情况1、如遇有大额多车次,多批次交易,应涉及进度款,如100万合同,前期到两车,可以申请进度款;</p>
<p>情况2、如果单次可一次性送达则实行全款。</p>
<p>情况3、如为定制产品,双方协商可给协商比例的进度款。</p>
<p>情况4、有可能有剩余款项,交易完成可申请平台退款。</p>
<p>情况5、有可能实际发货量大于订货量,货款不足。</p>
</div>
<el-form ref="form" label-width="80px">
<el-form-item label="支付类型" required>
<el-select v-model="payInfo.type" @change="changeType">
<el-option
v-for="item in payTypeList"
:key="item"
:label="item"
:value="item"
:disabled="(!['预付款', '货到付款', '全款'].includes(item) && orderInfo.payStatus === 0)
|| (['预付款', '货到付款', '全款'].includes(item) && orderInfo.payStatus > 0)"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="payInfo.type" required>
<el-input v-model="payInfo.amount" placeholder="请输入金额"/>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="payInfo.remark"/>
</el-form-item>
<template v-if="[0, 1].includes(orderInfo.orderStatus)">
<el-row :gutter="10">
<el-col :span="6">
<el-form-item label="是否发货">
<el-radio-group v-model="payInfo.isExpress"
:disabled="['货到付款', '全款'].includes(payInfo.type)">
<el-radio :label="true">是</el-radio>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="物流公司" required>-->
<!-- <el-input v-model="payInfo.expressName" placeholder="请输入物流公司"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="物流单号" required>-->
<!-- <el-input v-model="payInfo.expressNo" placeholder="请输入物流单号"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-form-item label="凭证" v-if="!payInfo.isExpress">
<u-upload
multiple
:fileList="payInfo.photos"
@afterRead="afterRead($event, 'photos')"
@delete="deletePic($event, 'photos')"
width="120rpx"
height="120rpx"
></u-upload>
<!-- <vk-data-upload v-model="payInfo.photos"></vk-data-upload>-->
</el-form-item>
<el-form-item label="凭证" v-else required>
<u-upload
multiple
:fileList="payInfo.expressPhoto"
@afterRead="afterRead($event, 'expressPhoto')"
@delete="deletePic($event, 'expressPhoto')"
height="120rpx"
></u-upload>
<!-- <vk-data-upload v-model="payInfo.expressPhoto"></vk-data-upload>-->
</el-form-item>
</template>
</el-form>
<el-row>
<el-col :span="24" class="text-center">
<el-button type="primary" size="mini" @click="setPayList">提交</el-button>
<el-button type="warning" size="mini" @click="close">取消
</el-button>
</el-col>
</el-row>
</view>
</template>
<script>
import dayjs from "dayjs";
export default {
name: "makePay",
props: {
info: {
type: Object,
default: () => {
return {}
}
},
payTypeList: {
type: Array,
default: () => {
return []
}
},
},
data() {
return {
payInfo: {
orderId: this.info._id,
amount: null,
type: null,
remark: '',
buyerRemark: '',
photos: [],
payerUid: null,
hasPaid: false,
paidVoucher: '',
paidAt: '',
sellerConfirm: false,
confirmAt: '',
buyerUid: this.info.uid,
sellerUid: this.info.sellerUid,
status: 0,
buyerRefuse: false,
refuseReason: null,
buyerPhotos: [],
expressPhoto: [],
isExpress: false,
expressName: null,
expressNo: null,
},
orderInfo: {
payStatus: 0
}
}
},
methods: {
close() {
this.$emit("close")
},
async getOrderInfo() {
this.orderInfo = await vk.callFunction({
url: 'client/order/kh/getInfo',
data: {
id: this.info._id
}
})
},
async setPayList() {
if (!this.payInfo.type) return this.$message({
type: 'error',
message: '请选择支付类型'
})
if (!this.payInfo.amount) return this.$message({
type: 'error',
message: '请输入支付金额'
})
if (this.payInfo.isExpress && this.payInfo.expressPhoto.length === 0) return this.$message({
type: 'error',
message: '请上传凭证'
})
// if (this.payInfo.isExpress && !this.payInfo.expressName) return this.$message({
// type: 'error',
// message: '请输入物流公司'
// })
// if (this.payInfo.isExpress && !this.payInfo.expressNo) return this.$message({
// type: 'error',
// message: '请输入物流单号'
// })
if (this.payInfo.photos && this.payInfo.photos.length > 0) this.payInfo.photos = this.payInfo.photos.map(i => i.url)
if (this.payInfo.expressPhoto && this.payInfo.expressPhoto.length > 0) this.payInfo.expressPhoto = this.payInfo.expressPhoto.map(i => i.url)
if (this.payInfo.isExpress) {
uni.showModal({
title: '提示',
content: '发货状态一旦确定无法修改,请谨慎操作',
success: async res => {
if (res.confirm) {
await vk.callFunction({
url: 'client/order/kh/makePay',
title: '请求中...',
data: {payInfo: this.payInfo}
})
this.$message({
type: 'success',
message: '支付单创建成功'
})
this.close()
}
}
})
} else {
await vk.callFunction({
url: 'client/order/kh/makePay',
title: '请求中...',
data: {payInfo: this.payInfo}
})
this.$message({
type: 'success',
message: '支付单创建成功'
})
this.close()
}
},
changeType() {
this.payInfo.isExpress = ['货到付款', '全款'].includes(this.payInfo.type)
},
afterRead({file}, field) {
file.forEach(item => {
console.log(item)
uniCloud.uploadFile({
filePath: item.url,
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + item.name,
success: ({fileID}) => {
uniCloud.getTempFileURL({
fileList: [fileID]
}).then(res => {
this.payInfo[field].push({url: res.fileList[0].tempFileURL})
console.log(this.payInfo[field])
})
}
})
})
},
deletePic({index}, field) {
this.payInfo[field].splice(index, 1)
},
},
mounted() {
this.getOrderInfo()
}
}
</script>
+250
View File
@@ -0,0 +1,250 @@
<template>
<view>
<view style="margin-bottom: 16px; padding: 12px; background: #fff8e8; color: #8a5a00; line-height: 1.7;">
<view>服务提供方(卖家):请于系统确认支付方已依照协议或约定支付对应订单款项后,再启动对应服务。申请款项付款方在系统端完成划款授权确认操作后,款项到账时间约为工作日T+1,请届时查询确认。</view>
<view style="margin-top: 8px;">服务需求方(买家):请于依照交易规则和协议完成对应服务验收后,再在系统端完成对应申请款项的授权确认操作,系统默认确认时限为72小时(含工作日,届时系统仅提供信息提醒服务),请及时完成该项确认。若您届时未确认且未提出正当异议,系统将默认您已收货或同意支付申请。</view>
</view>
<view class="rounded shadow p-10 mb-40" v-for="(item, index) in payList" :key="index">
<view class="mb-10">支付类目: {{ item.type }}</view>
<view class="mb-10">支付金额: {{ item.amount }}元</view>
<view class="mb-10">
<template v-if="!item.buyerRefuse">
<text v-if="item.isSeller && !item.hasPaid">待买方支付</text>
<view v-else-if="item.paidVoucher">
<el-image :src="item.paidVoucher[0]" style="width: 120rpx; height: 120rpx" fit="cover"
:preview-src-list="item.paidVoucher"/>
</view>
<view v-else-if="!item.paidVoucher">
<text>未上传凭证</text>
</view>
</template>
<text v-else class="text-main">买家已拒绝: {{ item.refuseReason }}</text>
</view>
<view class="mb-10">
<view>物流凭证:</view>
<el-image v-for="(photo, photoIndex) in item.expressPhoto" :key="photoIndex" :src="photo"
style="width: 120rpx; height: 120rpx" fit="cover"
:preview-src-list="item.expressPhoto"/>
</view>
<view class="mb-10">备注: {{ item.remark ? item.remark : '无' }}</view>
<view class="mb-10">买家备注: {{ item.buyerRemark ? item.buyerRemark : '无' }}</view>
<view class="mb-10">图片:
<template v-if="item.photos && item.photos.length > 0">
<el-image v-for="(photo, photoIndex) in item.photos" :key="photoIndex" :src="photo"
style="width: 80px; height: 80px" fit="cover"
:preview-src-list="item.photos"/>
</template>
<text v-else>无</text>
</view>
<view class="mb-10">状态:
<text v-if="!item.hasPaid && !item.buyerRefuse">待上传凭证</text>
<text v-if="!item.sellerConfirm && item.hasPaid">待确认收款</text>
<text v-if="item.sellerConfirm && item.hasPaid">已完成</text>
</view>
<view v-if="!item.buyerRefuse" class="flex justify-end items-center">
<view class="mx-15">
<u-button plain type="primary" size="mini" @click="showPay(item)"
v-if="item.status === 0 && item.isBuyer && !item.hasPaid">上传支付凭证
</u-button>
</view>
<view class="mx-15">
<u-button type="primary" size="mini" class="mx-20" @click="confirmPay(item)"
v-if="item.hasPaid && item.isSeller && !item.sellerConfirm">
确认收款
</u-button>
</view>
<view class="mx-15">
<u-button plain type="primary" size="mini" class="mx-20" @click="paidRefuse(item)"
v-if="item.isBuyer && item.status === 0 && item.paidVoucher.length === 0">
驳回
</u-button>
</view>
</view>
<view>
<span>我方状态:</span>
<template v-if="item.isSeller">
<span v-if="!item.hasPaid && !item.buyerRefuse">待上传凭证</span>
<span v-if="!item.sellerConfirm && item.hasPaid">待确认收款</span>
<span v-if="item.sellerConfirm && item.hasPaid">已完成</span>
</template>
<template v-if="item.isBuyer">
<span v-if="!item.hasPaid && !item.buyerRefuse">待上传凭证</span>
<span v-if="!item.sellerConfirm && item.hasPaid">完成支付</span>
<span v-if="item.sellerConfirm && item.hasPaid">已完成</span>
</template>
</view>
<view>
<span>对方状态:</span>
<!-- 自己是卖家则对方是买家-->
<template v-if="item.isSeller">
<span v-if="!item.hasPaid && !item.buyerRefuse">待上传凭证</span>
<span v-if="!item.sellerConfirm && item.hasPaid">完成支付</span>
<span v-if="item.sellerConfirm && item.hasPaid">已完成</span>
</template>
<template v-if="item.isBuyer">
<span v-if="!item.hasPaid && !item.buyerRefuse">待上传凭证</span>
<span v-if="!item.sellerConfirm && item.hasPaid">待确认收款</span>
<span v-if="item.sellerConfirm && item.hasPaid">已完成</span>
</template>
</view>
</view>
<u-button @click="close()">关闭</u-button>
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="100%" append-to-body="">
<template v-if="dialogVisible && dialogType === 'do-pay'">
<div class="font-bold">支付金额: {{ payInfo.amount }}元</div>
<el-form ref="form" label-width="80px">
<el-form-item label="支付凭证" required>
<u-upload
multiple
:fileList="payInfo.paidVoucher"
@afterRead="afterRead($event, 'paidVoucher')"
@delete="deletePic($event, 'paidVoucher')"
width="120rpx"
height="120rpx"
></u-upload>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="payInfo.buyerRemark"/>
</el-form-item>
<el-form-item label="图片">
<u-upload
multiple
:fileList="payInfo.buyerPhotos"
@afterRead="afterRead($event, 'buyerPhotos')"
@delete="deletePic($event, 'buyerPhotos')"
width="120rpx"
height="120rpx"
></u-upload>
</el-form-item>
</el-form>
<el-row>
<el-col :text="24" class="text-center">
<el-button type="primary" size="mini" @click="uploadPayVoucher">提交</el-button>
<el-button type="warning" size="mini" @click="dialogVisible = false">取消
</el-button>
</el-col>
</el-row>
</template>
</el-dialog>
</view>
</template>
<script>
import ExpressInfo from "./expressInfo.vue";
import Goods from "./goods.vue";
import SetExpress from "./setExpress.vue";
import MakePay from "./makePay.vue";
import dayjs from "dayjs";
export default {
name: "payList",
components: {MakePay, SetExpress, Goods, ExpressInfo},
props: {
payList: {
type: Array,
default: []
}
},
data() {
return {
dialogVisible: false,
dialogType: '',
dialogTitle: '',
payInfo: {
amount: '',
paidVoucher: [],
buyerRemark: '',
buyerPhotos: []
}
}
},
methods: {
showPay(item) {
this.payInfo = item;
this.payInfo.amount = ''
this.payInfo.paidVoucher = []
this.payInfo.buyerRemark = ''
this.payInfo.buyerPhotos = []
this.dialogTitle = '支付'
this.dialogType = 'do-pay';
this.dialogVisible = true;
},
async confirmPay({_id, type}) {
await vk.callFunction({
url: 'client/order/kh/paidConfirm',
title: '请求中...',
data: {
id: _id
}
})
this.$message({
type: 'success',
message: '确认成功'
})
if (['尾款', '货到付款'].includes(type)) this.$emit('refresh', '4')
else this.$emit('refresh')
},
paidRefuse({_id}) {
uni.showModal({
title: '请输入驳回理由',
content: '',
editable: true,
success: async res => {
if (res.confirm) {
await vk.callFunction({
url: 'client/order/kh/payRefuse',
title: '请求中...',
data: {
id: _id,
refuseReason: res.content,
}
})
this.$emit('refresh')
this.$message({
type: 'success',
message: '驳回成功'
})
}
}
})
},
async uploadPayVoucher() {
if (this.payInfo.paidVoucher.length === 0) return this.$message.error('请上传支付凭证')
if (this.payInfo.paidVoucher && this.payInfo.paidVoucher.length > 0) this.payInfo.paidVoucher = this.payInfo.paidVoucher.map(i => i.url)
if (this.payInfo.buyerPhotos && this.payInfo.buyerPhotos.length > 0) this.payInfo.buyerPhotos = this.payInfo.buyerPhotos.map(i => i.url)
await vk.callFunction({
url: 'client/order/kh/uploadPayVoucher',
title: '请求中...',
data: this.payInfo
})
this.$message({
type: 'success',
message: '上传成功'
})
this.$emit('refresh')
this.dialogVisible = false
},
close() {
this.$emit('close')
},
afterRead({file}, field) {
file.forEach(item => {
uniCloud.uploadFile({
filePath: item.url,
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + item.name,
success: ({fileID}) => {
uniCloud.getTempFileURL({
fileList: [fileID]
}).then(res => {
this.payInfo[field].push({url: res.fileList[0].tempFileURL})
})
}
})
})
},
deletePic({index}, field) {
this.payInfo[field].splice(index, 1)
},
}
}
</script>
+115
View File
@@ -0,0 +1,115 @@
<template>
<el-form ref="form" label-width="80px">
<el-form-item label="客户信息" required>
<p>收件人: {{ info.name }}</p>
<p>收件人联系方式: {{ info.phone }}</p>
<p>收件地址: {{ info.addressRegion.province.name }}{{ info.addressRegion.city.name }}{{ info.addressRegion.area.name }}{{ info.addressDetail }}</p>
</el-form-item>
<el-form-item label="物流公司" required>
<el-input v-model="expressName" placeholder="请输入物流公司"/>
</el-form-item>
<el-form-item label="物流单号" required>
<el-input v-model="expressNo" placeholder="请输入物流单号"/>
</el-form-item>
<el-form-item label="发货单" required>
<u-upload
multiple
:fileList="expressPhotoList"
@afterRead="afterRead"
@delete="deletePic"
width="120rpx"
height="120rpx"
></u-upload>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="remark" placeholder="请输入备注"/>
</el-form-item>
<div class="mt-20 flex justify-center items-center text-center">
<el-button type="primary" size="small" plain @click.native="cancel">取消</el-button>
<el-button type="primary" size="small" @click.native="confirm">确定</el-button>
</div>
</el-form>
</template>
<script>
import dayjs from "dayjs";
import md5 from "js-md5";
export default {
name: "setExpress",
props: {
id: Number | String,
info: Object
},
data() {
return {
expressName: null,
expressNo: null,
remark: null,
expressPhoto: [],
expressPhotoList: [],
}
},
methods: {
afterRead({file}) {
file.forEach(item => {
const suffix = item.name.split('.').pop()
uniCloud.uploadFile({
filePath: item.url,
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(item.name + Date.now().toString()) + `.${suffix}`,
success: ({fileID}) => {
uniCloud.getTempFileURL({
fileList: [fileID]
}).then(res => {
this.expressPhotoList.push({url: res.fileList[0].tempFileURL})
this.expressPhoto.push(res.fileList[0].tempFileURL)
})
}
})
})
},
deletePic({index}) {
this.expressPhoto.splice(index, 1)
},
close() {
this.$emit('close')
},
cancel() {
this.expressName = null
this.expressNo = null
this.remark = null
this.expressPhoto = []
this.$emit('close')
},
async confirm() {
if (!this.expressName) return this.$message({
type: 'error',
message: '请填写物流公司'
})
if (!this.expressNo) return this.$message({
type: 'error',
message: '请填写物流单号'
})
if (this.expressPhoto.length === 0) return this.$message({
type: 'error',
message: '请上传发货单'
})
await vk.callFunction({
url: 'client/order/kh/setExpress',
data: {
id: this.id,
expressName: this.expressName,
expressNo: this.expressNo,
remark: this.remark,
expressPhoto: this.expressPhoto
}
})
this.$emit('close')
this.$message({
type: 'success',
message: '发货成功'
})
}
}
}
</script>
+89
View File
@@ -0,0 +1,89 @@
<template>
<el-form ref="form" label-width="80px">
<el-form-item label="退款原因" required>
<el-input v-model="refundReason" placeholder="请输入退款原因"/>
</el-form-item>
<el-form-item label="图片">
<u-upload
multiple
:fileList="refundPhotos"
@afterRead="afterRead"
@delete="deletePic"
width="120rpx"
height="120rpx"
></u-upload>
</el-form-item>
<div class="mt-20 flex justify-center items-center text-center">
<el-button type="primary" size="small" plain @click.native="cancel">取消</el-button>
<el-button type="primary" size="small" @click.native="confirm">确定</el-button>
</div>
</el-form>
</template>
<script>
import dayjs from "dayjs";
import md5 from "js-md5";
export default {
name: "setRefund",
props: {
id: Number | String
},
data() {
return {
refundReason: null,
refundPhotos: [],
}
},
methods: {
afterRead({file}) {
file.forEach(item => {
const suffix = item.name.split('.').pop()
uniCloud.uploadFile({
filePath: item.url,
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(item.name + Date.now().toString()) + `.${suffix}`,
success: ({fileID}) => {
uniCloud.getTempFileURL({
fileList: [fileID]
}).then(res => {
this.refundPhotos.push({url: res.fileList[0].tempFileURL})
})
}
})
})
},
deletePic({index}) {
this.refundPhotos.splice(index, 1)
},
close() {
this.$emit('close')
},
cancel() {
this.refundReason = null
this.refundPhotos = []
this.close()
},
async confirm() {
if (!this.refundReason) return this.$message({
type: 'error',
message: '请填写退款原因'
})
const res = await vk.callFunction({
url: 'client/order/kh/refund',
data: {
id: this.id,
refundReason: this.refundReason,
refundPhotos: this.refundPhotos,
}
}).catch(err => false)
if (res) {
this.$emit('close')
this.$message({
type: 'success',
message: '平台将在2个工作日内审核,请您耐心等待'
})
}
}
}
}
</script>
+119
View File
@@ -0,0 +1,119 @@
<template>
<view>
<el-table :data="tableData.rows" style="width: 100%" border stripe>
<el-table-column prop="orderNo" label="订单号" width="200"/>
<el-table-column label="订单类型">
<template v-slot="{ row }">
<span>{{ row.type === 0 ? '普通订单' : '金久信自营订单' }}</span>
</template>
</el-table-column>
<el-table-column label="商品列表" width="250">
<template v-slot="{ row }">
<view class="flex flex-col justify-start items-start">
<view v-for="(item, index) in row.goods" :key="index"
class="flex justify-start items-start">
<image :src="item.goodsCover" class="goods-cover" v-if="row.type === 0"/>
<view class="ml-20 flex flex-col justify-start items-start">
<text class="text-main font-bold">{{ item.goodsName }}</text>
<text class="mt-20">¥{{ item.goodsPrice }}</text>
<text class="mt-20">x{{ item.num }}</text>
</view>
</view>
</view>
</template>
</el-table-column>
<el-table-column prop="amount" label="订单金额"/>
<el-table-column prop="payAmount" label="支付金额"/>
<el-table-column label="订单状态">
<template v-slot="{ row }">
<span v-if="row.orderStatus === 0">待支付</span>
<span v-if="row.orderStatus === 1">已支付</span>
<span v-if="row.orderStatus === 2">待收货</span>
<span v-if="row.orderStatus === 3">已完成</span>
</template>
</el-table-column>
<el-table-column prop="_add_time_str" label="下单时间"/>
<el-table-column label="操作">
<template v-slot="{ row }">
<text v-if="row.orderStatus === 0" class="text-main pointer" @click="repay(row)">去支付</text>
</template>
</el-table-column>
</el-table>
<view class="text-center mt-20">
<el-pagination
:page-size="pageSize"
@current-change="getOrderList"
background
layout="prev, pager, next"
:total="tableData.total">
</el-pagination>
</view>
</view>
</template>
<script>
export default {
name: "shopOrder",
props: {
tableData: Object
},
data() {
return {
tableData: [],
activeIndex: 0,
pageSize: 20,
total: 0,
}
},
methods: {
async repay(row) {
await vk.callFunction({
url: 'client/order/kh/resetOrderNo',
data: {
id: row._id,
}
})
vk.navigateTo({
url: `/pages/shop/pay?id=${row._id}`
})
},
getOrderList(index){
this.$emit('change-page', index)
}
},
onLoad(options) {
}
}
</script>
<style lang="scss" scoped>
.main-wrap {
width: 1200px;
margin: 20px auto;
position: relative;
.left-wrap {
position: absolute;
width: 220px;
left: -240px;
top: 0;
view {
padding: 20px;
}
.active {
background-color: #a92924;
color: white;
}
}
}
.goods-cover {
width: 80px;
height: 80px;
}
</style>