fix: 支付去掉货到付款,样式穿透改为 ::v-deep

支付单改为上传凭证和附件,尾款或全款时提示交易已完结。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-19 14:20:43 +08:00
parent 55bcf96889
commit c8e651b7a6
12 changed files with 84 additions and 124 deletions
+45 -89
View File
@@ -20,8 +20,8 @@
:key="item"
:label="item"
:value="item"
:disabled="(!['预付款', '货到付款', '全款'].includes(item) && orderInfo.payStatus === 0)
|| (['预付款', '货到付款', '全款'].includes(item) && orderInfo.payStatus > 0)"
:disabled="(!['预付款', '全款'].includes(item) && orderInfo.payStatus === 0)
|| (['预付款', '全款'].includes(item) && orderInfo.payStatus > 0)"
>
</el-option>
</el-select>
@@ -32,48 +32,26 @@
<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-item label="凭证">
<u-upload
multiple
:fileList="payInfo.photos"
@afterRead="afterRead($event, 'photos')"
@delete="deletePic($event, 'photos')"
width="120rpx"
height="120rpx"
></u-upload>
</el-form-item>
<el-form-item label="附件">
<u-upload
multiple
:fileList="payInfo.ext"
@afterRead="afterRead($event, 'ext')"
@delete="deletePic($event, 'ext')"
width="120rpx"
height="120rpx"
></u-upload>
</el-form-item>
</el-form>
<el-row>
<el-col :span="24" class="text-center">
@@ -130,6 +108,7 @@ export default {
isExpress: false,
expressName: null,
expressNo: null,
ext: [],
},
orderInfo: {
payStatus: 0
@@ -157,54 +136,31 @@ export default {
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()
}
if (this.payInfo.ext && this.payInfo.ext.length > 0) this.payInfo.ext = this.payInfo.ext.map(i => i.url)
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)
if (['尾款', '全款'].includes(this.payInfo.type)) {
this.$confirm(
'选择尾款或全款支付申请,均代表本次交易已完结,对应本次交易最终货款的结算完成。提交申请后,系统无法再次发起付款申请;若发生误申请情形,仅可通过交易双方协商线下渠道协商办理支付,请您谨慎选择。',
'重要提示',
{
confirmButtonText: '确认为最终结算',
showCancelButton: false,
type: 'warning'
}
)
}
},
afterRead({file}, field) {
file.forEach(item => {
+14 -10
View File
@@ -20,19 +20,23 @@
</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">图片:
<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"/>
<el-image v-for="(photo, photoIndex) in item.photos" :key="photoIndex"
:src="typeof photo === 'string' ? photo : photo.url"
style="width: 80px; height: 80px; margin-right: 8px;" fit="cover"
:preview-src-list="item.photos.map(p => typeof p === 'string' ? p : p.url)"/>
</template>
<text v-else>无</text>
</view>
<view class="mb-10">附件:
<template v-if="item.ext && item.ext.length > 0">
<el-image v-for="(file, fileIndex) in item.ext" :key="fileIndex"
:src="typeof file === 'string' ? file : file.url"
style="width: 80px; height: 80px; margin-right: 8px;" fit="cover"
:preview-src-list="item.ext.map(p => typeof p === 'string' ? p : p.url)"/>
</template>
<text v-else>无</text>
</view>