20261008
This commit is contained in:
@@ -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>
|
||||
@@ -0,0 +1,138 @@
|
||||
<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="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>
|
||||
</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: {
|
||||
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>
|
||||
@@ -0,0 +1,207 @@
|
||||
<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="isPayTypeDisabled(item)"
|
||||
>
|
||||
</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)
|
||||
},
|
||||
isNotaryPaidOrder() {
|
||||
return Number(this.orderInfo.signMethod) === 0
|
||||
&& Number(this.orderInfo.type) > 3
|
||||
&& Number(this.orderInfo.notaryPayStatus) === 1
|
||||
},
|
||||
isPayTypeDisabled(item) {
|
||||
if (this.isNotaryPaidOrder()) return false
|
||||
return (!['预付款', '货到付款', '全款'].includes(item) && this.orderInfo.payStatus === 0)
|
||||
|| (['预付款', '货到付款', '全款'].includes(item) && this.orderInfo.payStatus > 0)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getOrderInfo()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,451 @@
|
||||
<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">
|
||||
<template v-if="item.type !== '尾款'">
|
||||
<el-button plain type="primary" size="mini" @click="showNotaryPayWithConfirm(item)"
|
||||
v-if="canShowPayButton(item)">{{ isNotaryOrder() ? '公证支付' : '立即支付' }}
|
||||
</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button plain type="primary" size="mini" @click="showPayWithConfirm(item)"
|
||||
v-if="item.status === 0 && item.isBuyer && !item.hasPaid">同意授权支付
|
||||
</el-button>
|
||||
</template>
|
||||
<el-button type="primary" size="mini" class="mx-20" @click="confirmPay(item)"
|
||||
v-if="canShowConfirmButton(item)">
|
||||
{{ isNotaryOrder() ? '通过申请' : '确认收款' }}
|
||||
</el-button>
|
||||
<el-button plain type="primary" size="mini" class="mx-20" @click="paidRefuse(item)"
|
||||
v-if="canShowRefuseButton(item)">
|
||||
驳回
|
||||
</el-button>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
<el-descriptions-item v-if="item.type !== '尾款'" label="支付金额">{{ item.amount }}</el-descriptions-item>
|
||||
<template v-else>
|
||||
<template v-if="item.status === 0">
|
||||
<el-descriptions-item label="卖家申请金额">{{ item.amount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="卖家备注">{{ item.sellerRemark }}</el-descriptions-item>
|
||||
<el-descriptions-item label="买家授权金额">{{ item.amount }}</el-descriptions-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-descriptions-item label="支付金额">{{ item.amount }}</el-descriptions-item>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
<el-descriptions-item label="支付凭证">
|
||||
<template v-if="!item.buyerRefuse">
|
||||
<span v-if="item.isNotaryFullPay && !item.hasPaid">待买方公证支付</span>
|
||||
<span v-else-if="item.isNotaryFullPay && item.hasPaid">已支付到公证平台</span>
|
||||
<span v-else-if="item.isNotaryApply">{{ item.sellerConfirm ? '买家已通过,已划付' : '无需二次支付,待买家通过申请' }}</span>
|
||||
<span v-else-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>
|
||||
<template v-else>
|
||||
<div>
|
||||
<span class="text-main">买家已拒绝: {{ item.refuseReason }}</span>
|
||||
</div>
|
||||
<div class="mt-10" v-if="!item.isNotaryApply">
|
||||
<el-button
|
||||
plain
|
||||
type="warning"
|
||||
size="mini"
|
||||
@click="refundQuery(item)"
|
||||
>
|
||||
退款查询
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</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.isNotaryFullPay && !item.hasPaid">待公证支付</span>
|
||||
<span v-else-if="item.isNotaryFullPay && item.hasPaid">已支付到公证平台</span>
|
||||
<span v-else-if="!item.hasPaid && !item.buyerRefuse">待买方支付</span>
|
||||
<span v-else-if="!item.sellerConfirm && item.hasPaid">{{ isNotaryOrder() && item.isNotaryApply ? '待买家通过申请' : '待确认收款' }}</span>
|
||||
<span v-else-if="item.sellerConfirm && item.hasPaid">{{ isNotaryOrder() && item.isNotaryApply ? '已划付' : '已完成' }}</span>
|
||||
</template>
|
||||
<template v-if="item.isBuyer">
|
||||
<span v-if="item.isNotaryFullPay && !item.hasPaid">待公证支付</span>
|
||||
<span v-else-if="item.isNotaryFullPay && item.hasPaid">已支付到公证平台</span>
|
||||
<span v-else-if="!item.hasPaid && !item.buyerRefuse">待支付</span>
|
||||
<span v-else-if="!item.sellerConfirm && item.hasPaid">{{ isNotaryOrder() && item.isNotaryApply ? '待通过申请' : '完成支付' }}</span>
|
||||
<span v-else-if="item.sellerConfirm && item.hasPaid">{{ isNotaryOrder() && item.isNotaryApply ? '已划付' : '已完成' }}</span>
|
||||
</template>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="对方状态">
|
||||
<!-- 自己是卖家则对方是买家-->
|
||||
<template v-if="item.isSeller">
|
||||
<span v-if="item.isNotaryFullPay && !item.hasPaid">待公证支付</span>
|
||||
<span v-else-if="item.isNotaryFullPay && item.hasPaid">已支付到公证平台</span>
|
||||
<span v-else-if="!item.hasPaid && !item.buyerRefuse">待支付</span>
|
||||
<span v-else-if="!item.sellerConfirm && item.hasPaid">{{ isNotaryOrder() && item.isNotaryApply ? '待通过申请' : '完成支付' }}</span>
|
||||
<span v-else-if="item.sellerConfirm && item.hasPaid">{{ isNotaryOrder() && item.isNotaryApply ? '已划付' : '已完成' }}</span>
|
||||
</template>
|
||||
<template v-if="item.isBuyer">
|
||||
<span v-if="item.isNotaryFullPay && !item.hasPaid">待公证支付</span>
|
||||
<span v-else-if="item.isNotaryFullPay && item.hasPaid">已支付到公证平台</span>
|
||||
<span v-else-if="!item.hasPaid && !item.buyerRefuse">待买方支付</span>
|
||||
<span v-else-if="!item.sellerConfirm && item.hasPaid">{{ isNotaryOrder() && item.isNotaryApply ? '待买家通过申请' : '待确认收款' }}</span>
|
||||
<span v-else-if="item.sellerConfirm && item.hasPaid">{{ isNotaryOrder() && item.isNotaryApply ? '已划付' : '已完成' }}</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";
|
||||
import {Loading} from "element-ui";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const NOTARY_PAY_CONFIRM_CONTENT = `1、您已充分知悉、了解并认可本订单及合同的全部内容,以及各方的权利义务;<br>2、您需将本订单全部货款支付至金久信平台银联监管账户;<br>3、供货或服务提供方提起付款申请后,在满足双方约定条款的前提下,您应及时批准划付申请款项;若您未及时处理,系统将在7个工作日内自动默认您无异议,并自动同意该付款申请。如您对供货或服务提供存在异议,请及时在供货或服务提供方平台申请单中驳回申请,并说明驳回意见并及时与对方沟通原因;若您支付合同金额与实际交易应付金额存在差额,您可办理补付或申请退款。`
|
||||
|
||||
const OpenSdk = require('../../user/lib/base').default;
|
||||
const sdk = new OpenSdk({
|
||||
// appId: '10037e6f6823b20801682b6a5e5a0006',
|
||||
// appKey: '1c4e3b16066244ae9b236a09e5b312e8'
|
||||
// 正式
|
||||
appId: '8a81c1db8fc5238d01910b9e312d0692',
|
||||
appKey: 'a15ceac60f5b464eb758c4fe7800ee9f'
|
||||
// 测试分账
|
||||
// appId: 'f0ec96ad2c3848b5b810e7aadf369e2f',
|
||||
// appKey: '775481e2556e4564985f5439a5e6a277'
|
||||
})
|
||||
// 正式
|
||||
// const mid = '898450108428573'
|
||||
// const tid = 'ZDUL21ZA'
|
||||
const mid = '898450100002303'
|
||||
const tid = 'G5SBN2XJ'
|
||||
|
||||
export default {
|
||||
name: "payList",
|
||||
components: {MakePay, SetExpress, Goods, ExpressInfo},
|
||||
props: {
|
||||
payList: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
orderInfo: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
dialogType: '',
|
||||
dialogTitle: '',
|
||||
payInfo: null,
|
||||
rate: 0,
|
||||
subMerchantIdMain: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getPlatformRate()
|
||||
this.getSubMerchantIdMain()
|
||||
console.log('this.orderInfo', this.orderInfo)
|
||||
},
|
||||
methods: {
|
||||
isNotaryOrder() {
|
||||
return !!(this.orderInfo && Number(this.orderInfo.signMethod) === 0 && Number(this.orderInfo.type) > 3)
|
||||
},
|
||||
canShowPayButton(item) {
|
||||
console.log('canShowPayButton this.isNotaryOrder()', item.isNotaryFullPay, item.status, item.isBuyer)
|
||||
if (this.isNotaryOrder()) return item.isNotaryFullPay && item.status === 0 && item.isBuyer && !item.hasPaid
|
||||
return item.status === 0 && item.isBuyer && !item.hasPaid
|
||||
},
|
||||
canShowConfirmButton(item) {
|
||||
// console.log('canShowConfirmButton this.isNotaryOrder()', item.isNotaryApply , item.hasPaid , item.isBuyer , !item.sellerConfirm , !item.buyerRefuse)
|
||||
if (this.isNotaryOrder()) return item.isNotaryApply && item.hasPaid && item.isBuyer && !item.sellerConfirm && !item.buyerRefuse
|
||||
return item.hasPaid && item.isSeller && !item.sellerConfirm
|
||||
},
|
||||
canShowRefuseButton(item) {
|
||||
if (this.isNotaryOrder()) return item.isNotaryApply && item.isBuyer && item.status === 0 && !item.sellerConfirm && !item.buyerRefuse
|
||||
return item.isBuyer && item.status === 0 && !item.sellerConfirm && !item.hasPaid
|
||||
},
|
||||
getSellerMid(item) {
|
||||
const seller = (item && item.seller) || (this.orderInfo && this.orderInfo.seller) || {}
|
||||
return String(seller.mid || '').trim()
|
||||
},
|
||||
async getPlatformRate() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'd84694f2696818f20c28f55f36764783'
|
||||
},
|
||||
})
|
||||
this.rate = res.content
|
||||
},
|
||||
async getSubMerchantIdMain() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '345cf9926ab107ad00db527f06fdbb6e'
|
||||
},
|
||||
})
|
||||
this.subMerchantIdMain = String((res && res.content) || '').trim()
|
||||
},
|
||||
async unionPay(item) {
|
||||
const subMerchantId = this.getSellerMid(item)
|
||||
if (!subMerchantId) {
|
||||
return this.$message.error('乙方未配置商户号,无法支付')
|
||||
}
|
||||
if (!this.subMerchantIdMain) {
|
||||
await this.getSubMerchantIdMain()
|
||||
}
|
||||
if (!this.subMerchantIdMain) {
|
||||
return this.$message.error('平台分账商户号未配置,无法支付')
|
||||
}
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/order/kh/resetPayListOrderNo',
|
||||
data: {
|
||||
id: item._id
|
||||
},
|
||||
})
|
||||
let rate = this.rate
|
||||
if (this.orderInfo.sheet && this.orderInfo.sheet.notaryServiceRate)
|
||||
rate = this.orderInfo.sheet.notaryServiceRate
|
||||
const orderNo = res.data
|
||||
let subAmount = parseInt(item.amount * 100 * ((100 - parseFloat(rate)) / 100)).toFixed(0)
|
||||
let platformAmount = parseInt(item.amount * 100 * (parseFloat(rate) / 100)).toFixed(0)
|
||||
// let subAmount = parseInt(item.amount * (100 - parseFloat(this.rate))).toFixed(0)
|
||||
const requestTimestamp = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
||||
const timestamp = dayjs().format('YYYYMMDDHHmmss')
|
||||
console.log('subAmount', subAmount, subMerchantId)
|
||||
console.log('subAmountMain', platformAmount, this.subMerchantIdMain)
|
||||
// const goodsList = [{
|
||||
// goodsId: item._id,
|
||||
// goodsName: item.type,
|
||||
// quantity: 1,
|
||||
// price: parseInt(item.amount * 100).toFixed(0),
|
||||
// }]
|
||||
let data = {
|
||||
queryUrl: 'https://api-mop.chinaums.com/v1/netpay/upg/order',
|
||||
timestamp,
|
||||
authorization: 'OPEN-FORM-PARAM',
|
||||
nonce: 'rp84ufhfn20yneo3tp',
|
||||
content: {
|
||||
merOrderId: orderNo,
|
||||
requestTimestamp,
|
||||
mid,
|
||||
tid,
|
||||
instMid: 'WGDEFAULT',
|
||||
chnlType: 'PC',
|
||||
totalAmount: parseInt(item.amount * 100).toFixed(0),
|
||||
notifyUrl: 'https://tcb-n44byxi8bmrfrki-d4bn1c4a206d.service.tcloudbase.com/pay_notify',
|
||||
// transType: vk.getVuex('$user.userInfo.accountType') === 1 ? 'UPG_PERSONAL' : 'UPG_BUSINESS',
|
||||
transType: 'UPG_BUSINESS',
|
||||
bizType: '100003',
|
||||
feeRatio: 'aaa',
|
||||
// notifyUrl: 'https://www.jinjiuxinzg.cn/pay_notify',
|
||||
// goods: goodsList,
|
||||
}
|
||||
}
|
||||
data['content']['divisionFlag'] = true
|
||||
data['content']['platformAmount'] = 0
|
||||
data['content']['subOrders'] = [
|
||||
{
|
||||
mid: subMerchantId,
|
||||
totalAmount: subAmount,
|
||||
},
|
||||
{
|
||||
mid: this.subMerchantIdMain,
|
||||
totalAmount: platformAmount,
|
||||
},
|
||||
]
|
||||
console.log(data)
|
||||
/**
|
||||
* 调用函数
|
||||
*/
|
||||
const loadingInstance = Loading.service({fullscreen: true, text: '请求中'});
|
||||
|
||||
// const res = sdk.exec(data)
|
||||
window.open(await sdk.exec(data))
|
||||
loadingInstance.close()
|
||||
this.showPayResultConfirm()
|
||||
},
|
||||
showNotaryPayWithConfirm(item) {
|
||||
if (!this.isNotaryOrder()) return this.unionPay(item)
|
||||
this.$confirm(NOTARY_PAY_CONFIRM_CONTENT, '公证支付', {
|
||||
confirmButtonText: '我已知晓',
|
||||
cancelButtonText: '取消',
|
||||
showCancelButton: true,
|
||||
type: 'warning',
|
||||
dangerouslyUseHTMLString: true
|
||||
}).then(() => {
|
||||
this.unionPay(item)
|
||||
}).catch(() => {})
|
||||
},
|
||||
showPayResultConfirm() {
|
||||
this.$confirm('您是否已支付成功', '提示', {
|
||||
confirmButtonText: '已支付成功',
|
||||
cancelButtonText: '未支付成功',
|
||||
showCancelButton: true,
|
||||
distinguishCancelAndClose: true,
|
||||
closeOnClickModal: false,
|
||||
closeOnPressEscape: false,
|
||||
}).then(() => {
|
||||
this.$emit('refresh')
|
||||
}).catch(() => {
|
||||
this.$emit('refresh')
|
||||
})
|
||||
},
|
||||
showPay(item) {
|
||||
this.payInfo = item;
|
||||
this.dialogTitle = '支付'
|
||||
this.dialogType = 'do-pay';
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
showPayWithConfirm(item) {
|
||||
this.$confirm('尾款为双方交易最后一次结算,请交易双方协商共同确定最终结算金额后进行,结算完毕将默认此订单结束,无法再次系统发起请款或付款动作,如您已知晓并双方已经协商确认最终结算金额,请进行确认后进入尾款流程',
|
||||
'温馨提示', {
|
||||
showCancelButton: true,
|
||||
}).then(async ({value}) => {
|
||||
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: this.isNotaryOrder() ? '确认划付成功' : '确认成功'
|
||||
})
|
||||
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 refundQuery(item) {
|
||||
try {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/order/kh/refundQuery',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
id: item._id
|
||||
}
|
||||
})
|
||||
const result = res.data || {}
|
||||
const msg = result.errMsg || result.msg || res.msg || '查询完成'
|
||||
this.$alert(
|
||||
`退款单号: ${item.refundApplyPayload && item.refundApplyPayload.refundOrderId ? item.refundApplyPayload.refundOrderId : '无'}\n状态码: ${result.errCode || '无'}\n信息: ${msg}`,
|
||||
'退款查询结果',
|
||||
{
|
||||
confirmButtonText: '确定'
|
||||
}
|
||||
)
|
||||
this.$emit('refresh')
|
||||
} catch (err) {
|
||||
this.$message.error((err && err.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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
+1137
-778
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user