This commit is contained in:
2026-10-08 18:20:51 +08:00
parent dec4ebc773
commit 6f1b2dc03a
621 changed files with 47117 additions and 43176 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>
+131
View File
@@ -0,0 +1,131 @@
<template>
<view>
<view class="py-20">
<el-row :gutter="10">
<el-col :span="12">
<text class="text-35 font-bold">商品信息</text>
</el-col>
<el-col :span="4">
<text class="text-35 font-bold flex-1">单价</text>
</el-col>
<el-col :span="4">
<text class="text-35 font-bold flex-1">数量</text>
</el-col>
<el-col :span="4">
<text class="text-35 font-bold flex-1">金额</text>
</el-col>
</el-row>
</view>
<view class="p-20 mb-20" v-for="(item, index) in goods" :key="index">
<el-row :gutter="10">
<el-col :span="12">
<view class="flex justify-start items-start">
<el-image :src="item.goods.cover" class="cover ml-20" fit="fit" v-if="item.goods"/>
<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>
</view>
</el-col>
<el-col :span="4">
<text class="text-35 font-bold flex-1" v-if="order.type === 0">¥{{ item.sku.values }}</text>
<text class="text-35 font-bold flex-1" v-else>¥{{ item.goodsPrice }}</text>
</el-col>
<el-col :span="4">
<text class="text-35 font-bold flex-1">
x{{ item.num }}
</text>
</el-col>
<el-col :span="4">
<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>
</el-col>
</el-row>
</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">
<div style="margin-bottom: .5rem" v-for="(item, index) in selfProduct.contentList" :key="index">
<span>{{ item.name }}</span>
<template v-if="item.type && item.type === '个人'">
({{
item.code
}})--{{ item.addressRegion.province.name }}{{
item.addressRegion.city.name
}}{{ item.addressRegion.area.name }}{{ item.address }}
</template>
</div>
</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-item label="结果文件" v-if="order && order.resultFiles">
<div v-for="(item, index) in order.resultFiles" :key="index">
<a :href="item"
target="_blank">预览:文件{{ index + 1 }}</a>
</div>
</el-descriptions-item>
<el-descriptions-item label="发送途径" v-if="order && order.sendMethod">{{ order.sendMethod }}
</el-descriptions-item>
</el-descriptions>
</view>
</view>
</template>
<script>
export default {
name: "goods",
props: {
goods: Array,
order: Object,
selfProduct: Object,
},
data() {
return {}
},
methods: {}
}
</script>
<style lang="scss" scoped>
.cover {
width: 80px;
height: 80px;
}
</style>
+191
View File
@@ -0,0 +1,191 @@
<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>
<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">
<vk-data-upload v-model="payInfo.photos"></vk-data-upload>
</el-form-item>
<el-form-item label="凭证" v-else required>
<vk-data-upload v-model="payInfo.expressPhoto"></vk-data-upload>
</el-form-item>
</template>
<el-form-item label="附件">
<vk-data-upload v-model="payInfo.ext"></vk-data-upload>
</el-form-item>
</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>
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,
ext: [],
},
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.isExpress) {
this.$confirm('发货状态一旦确定无法修改,请谨慎操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
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)
console.log(this.payInfo.isExpress, this.payInfo.type)
}
},
mounted() {
this.getOrderInfo()
}
}
</script>
+195
View File
@@ -0,0 +1,195 @@
<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 v-for="(item, index) in payList" :key="index" class="py-20 border-bottom">
<el-descriptions :title="item.type" :column="2" border :labelStyle="{width: '120px'}">
<template slot="extra">
<div class="flex justify-start items-center">
<template v-if="!item.buyerRefuse">
<el-button plain type="primary" size="mini" @click="showPay(item)"
v-if="item.status === 0 && item.isBuyer && !item.hasPaid">上传支付凭证
</el-button>
<el-button type="primary" size="mini" class="mx-20" @click="confirmPay(item)"
v-if="item.hasPaid && item.isSeller && !item.sellerConfirm">
确认收款
</el-button>
<el-button plain type="primary" size="mini" class="mx-20" @click="paidRefuse(item)"
v-if="item.isBuyer && item.status === 0 && !item.paidVoucher">
驳回
</el-button>
</template>
</div>
</template>
<el-descriptions-item label="支付金额">{{ item.amount }}</el-descriptions-item>
<el-descriptions-item label="支付凭证">
<template v-if="!item.buyerRefuse">
<span v-if="item.isSeller && !item.hasPaid">待买方支付</span>
<view v-else-if="item.paidVoucher">
<el-image :src="item.paidVoucher[0]" style="width: 80px; height: 80px" fit="cover"
:preview-src-list="item.paidVoucher"/>
</view>
<view v-else-if="!item.paidVoucher">
<span>未上传凭证</span>
</view>
</template>
<span v-else class="text-main">买家已拒绝: {{ item.refuseReason }}</span>
</el-descriptions-item>
<el-descriptions-item label="交货凭证">
<el-image v-for="(photo, photoIndex) in item.expressPhoto" :key="photoIndex" :src="photo"
style="width: 80px; height: 80px" fit="cover"
:preview-src-list="item.expressPhoto"/>
</el-descriptions-item>
<el-descriptions-item label="备注">
<text>{{ item.remark ? item.remark : '无' }}</text>
</el-descriptions-item>
<el-descriptions-item label="买家备注">
<text>{{ item.buyerRemark ? item.buyerRemark : '无' }}</text>
</el-descriptions-item>
<el-descriptions-item label="图片">
<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>
<span v-else>无</span>
</el-descriptions-item>
<el-descriptions-item label="我方状态">
<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>
</el-descriptions-item>
<el-descriptions-item label="对方状态">
<!-- 自己是卖家则对方是买家-->
<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>
</el-descriptions-item>
</el-descriptions>
</view>
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="50%" 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>
<vk-data-upload v-model="payInfo.paidVoucher"></vk-data-upload>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="payInfo.buyerRemark"/>
</el-form-item>
<el-form-item label="图片">
<vk-data-upload v-model="payInfo.buyerPhotos"></vk-data-upload>
</el-form-item>
</el-form>
<el-row>
<el-col :span="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";
export default {
name: "payList",
components: {MakePay, SetExpress, Goods, ExpressInfo},
props: {
payList: {
type: Array,
default: []
}
},
data() {
return {
dialogVisible: false,
dialogType: '',
dialogTitle: '',
payInfo: null
}
},
methods: {
showPay(item) {
this.payInfo = item;
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}) {
this.$prompt('请输入驳回理由', '提示', {
showCancelButton: true,
showInput: true,
}).then(async ({value}) => {
await vk.callFunction({
url: 'client/order/kh/payRefuse',
title: '请求中...',
data: {
id: _id,
refuseReason: value,
}
})
this.$emit('refresh')
this.$message({
type: 'success',
message: '驳回成功'
})
})
},
async uploadPayVoucher() {
if (this.payInfo.paidVoucher.length === 0) return this.$message.error()
await vk.callFunction({
url: 'client/order/kh/uploadPayVoucher',
title: '请求中...',
data: this.payInfo
})
this.$message({
type: 'success',
message: '上传成功'
})
this.$emit('refresh')
this.dialogVisible = false
},
}
}
</script>
+84
View File
@@ -0,0 +1,84 @@
<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>
<vk-data-upload v-model="expressPhoto"></vk-data-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>
export default {
name: "setExpress",
props: {
id: Number | String,
info: Object
},
data() {
return {
expressName: null,
expressNo: null,
remark: null,
expressPhoto: [],
}
},
methods: {
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>
+60
View File
@@ -0,0 +1,60 @@
<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="图片">
<vk-data-upload v-model="refundPhotos"></vk-data-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>
export default {
name: "setRefund",
props: {
id: Number | String
},
data() {
return {
refundReason: null,
refundPhotos: [],
}
},
methods: {
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>
+141
View File
@@ -0,0 +1,141 @@
<template>
<view>
<el-descriptions title="金久信自营订单详情" :column="2" border :labelStyle="{width: '120px'}" v-if="info">
<el-descriptions-item label="服务">
<p v-for="(item, index) in orderInfo.goods" :key="index">{{ item.goodsName }}</p>
</el-descriptions-item>
<el-descriptions-item label="考察对象" v-if="info.type === 0">
<div style="margin-bottom: .5rem" v-for="(item, index) in info.contentList" :key="index">
<span>{{ item.name }}</span>
<template v-if="item.type && item.type === '个人' && item.addressRegion">
({{
item.code
}})--{{ item.addressRegion.province.name }}{{
item.addressRegion.city.name
}}{{ item.addressRegion.area.name }}{{ item.address }}
</template>
</div>
</el-descriptions-item>
<el-descriptions-item label="考察产品" v-else>
<p style="margin-bottom: .5rem" v-for="(item, index) in info.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="文档">
<div v-for="(item, index) in info.contentList" :key="index">
<template v-if="item.files">
<a v-for="(file, fileIndex) in item.files" :key="fileIndex" :href="file"
target="_blank">预览:文件{{ fileIndex + 1 }}</a>
</template>
</div>
</el-descriptions-item>
<el-descriptions-item label="接收文件电子邮箱">
<span>{{ info.email }}</span>
</el-descriptions-item>
<el-descriptions-item label="接收文件微信">
<span>{{ info.wechat }}</span>
</el-descriptions-item>
<el-descriptions-item label="接收文件寄件地址">
<span v-if="info.receiveAddressRegion.province">{{
info.receiveAddressRegion.province.name
}}{{ info.receiveAddressRegion.city.name }}{{
info.receiveAddressRegion.area.name
}}{{ info.receiveAddress }}</span>
</el-descriptions-item>
<el-descriptions-item label="申请人">
<span>{{ info.requestName }}</span>
</el-descriptions-item>
<el-descriptions-item label="业务联系人">
<span>{{ info.contactName }}</span>
</el-descriptions-item>
<el-descriptions-item label="业务联系方式">
<span>{{ info.contact }}</span>
</el-descriptions-item>
<el-descriptions-item label="接单公司" v-if="info.companyId">
<span>{{ info.company.company.companyName }}</span>
</el-descriptions-item>
<el-descriptions-item label="文件上传">
<vk-data-upload v-model="resultFiles"
:limit="9"
:on-preview="previewUpload"
accept=".jpg,.jpeg,.png,.xlsx,.doc,.docx,.pdf" list-type="text">
</vk-data-upload>
</el-descriptions-item>
<el-descriptions-item label="发送途径">
<el-select v-model="sendMethod" placeholder="请选择发送途径">
<el-option label="接收文件电子邮箱" value="接收文件电子邮箱"/>
<el-option label="接收文件微信" value="接收文件微信"/>
<el-option label="邮寄接收文件地址" value="邮寄接收文件地址"/>
</el-select>
</el-descriptions-item>
<template slot="extra">
<div class="flex justify-start items-center">
<el-button type="primary" size="mini" @click="setSend">确认完成
</el-button>
<el-button plain type="primary" size="mini" class="mx-20" @click="close">
关闭
</el-button>
</div>
</template>
</el-descriptions>
</view>
</template>
<script>
export default {
name: "setSend",
props: {
orderInfo: Object
},
data() {
return {
info: null,
sendMethod: null,
resultFiles: []
}
},
methods: {
async getInfo() {
const {data} = await vk.callFunction({
url: 'client/selfSupport/kh/getDetailByOrder',
data: {
orderId: this.orderInfo._id
}
})
this.info = data
},
async setSend() {
if (this.resultFiles.length === 0) {
vk.toast("请上传文件")
return
}
if (!this.sendMethod) {
vk.toast("请选择发送途径")
return
}
await vk.callFunction({
url: 'client/order/kh/changeOrderStatus',
data: {
id: this.orderInfo._id,
orderStatus: 3,
sendMethod: this.sendMethod,
resultFiles: this.resultFiles,
}
})
this.close()
},
close() {
this.$emit("close")
},
previewUpload({url}) {
window.open(url)
}
},
mounted() {
console.log(this.orderInfo)
this.getInfo()
}
}
</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/index/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>
+959 -778
View File
File diff suppressed because it is too large Load Diff