fix: 调整支付申请与报价查看权限

去掉货到付款和发货凭证,尾款或全款时提示交易已完结;已购单据报价次数也可查看买家信息。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-19 14:20:42 +08:00
parent 429513ad8d
commit c6fea1cc0d
8 changed files with 104 additions and 172 deletions
+1 -72
View File
@@ -5,75 +5,4 @@
/.idea /.idea
/uniCloud-aliyun/cloudfunctions/router/node_modules/ /uniCloud-aliyun/cloudfunctions/router/node_modules/
/pnpm-lock.yaml /pnpm-lock.yaml
/金久信源码/金久信数据库/fadada-verify-record.json /金久信源码/
/金久信源码/金久信数据库/jjx-account.json
/金久信源码/金久信数据库/jjx-ad.json
/金久信源码/金久信数据库/jjx-album.json
/金久信源码/金久信数据库/jjx-article.json
/金久信源码/金久信数据库/jjx-article-category.json
/金久信源码/金久信数据库/jjx-article-collect.json
/金久信源码/金久信数据库/jjx-article-download.json
/金久信源码/金久信数据库/jjx-balance.json
/金久信源码/金久信数据库/jjx-balance-log.json
/金久信源码/金久信数据库/jjx-business-card.json
/金久信源码/金久信数据库/jjx-business-contact.json
/金久信源码/金久信数据库/jjx-cart.json
/金久信源码/金久信数据库/jjx-certificate.json
/金久信源码/金久信数据库/jjx-company-manage-change-log.json
/金久信源码/金久信数据库/jjx-contract.json
/金久信源码/金久信数据库/jjx-contract-template.json
/金久信源码/金久信数据库/jjx-coop-config.json
/金久信源码/金久信数据库/jjx-dict.json
/金久信源码/金久信数据库/jjx-enquiry-attributes.json
/金久信源码/金久信数据库/jjx-enquiry-category.json
/金久信源码/金久信数据库/jjx-enquiry-package.json
/金久信源码/金久信数据库/jjx-enquiry-quote.json
/金久信源码/金久信数据库/jjx-enquiry-sheet.json
/金久信源码/金久信数据库/jjx-enquiry-template.json
/金久信源码/金久信数据库/jjx-ensure-config.json
/金久信源码/金久信数据库/jjx-factory.json
/金久信源码/金久信数据库/jjx-goods.json
/金久信源码/金久信数据库/jjx-goods-category.json
/金久信源码/金久信数据库/jjx-goods-cooperate.json
/金久信源码/金久信数据库/jjx-industry.json
/金久信源码/金久信数据库/jjx-message.json
/金久信源码/金久信数据库/jjx-message-config.json
/金久信源码/金久信数据库/jjx-old.json
/金久信源码/金久信数据库/jjx-old-category.json
/金久信源码/金久信数据库/jjx-old-quote.json
/金久信源码/金久信数据库/jjx-order.json
/金久信源码/金久信数据库/jjx-order-goods.json
/金久信源码/金久信数据库/jjx-order-pay-list.json
/金久信源码/金久信数据库/jjx-order-selfProduct.json
/金久信源码/金久信数据库/jjx-other-article.json
/金久信源码/金久信数据库/jjx-other-article-category.json
/金久信源码/金久信数据库/jjx-process-category.json
/金久信源码/金久信数据库/jjx-process-quote.json
/金久信源码/金久信数据库/jjx-process-sheet.json
/金久信源码/金久信数据库/jjx-quote-num-config.json
/金久信源码/金久信数据库/jjx-qyb.json
/金久信源码/金久信数据库/jjx-self-support.json
/金久信源码/金久信数据库/jjx-self-support-quote-list.json
/金久信源码/金久信数据库/jjx-sign-pay_list.json
/金久信源码/金久信数据库/jjx-site-config.json
/金久信源码/金久信数据库/jjx-spot-ad.json
/金久信源码/金久信数据库/jjx-spot-amount.json
/金久信源码/金久信数据库/jjx-spot-category.json
/金久信源码/金久信数据库/jjx-spot-goods.json
/金久信源码/金久信数据库/jjx-steal-factory.json
/金久信源码/金久信数据库/jjx-user-address.json
/金久信源码/金久信数据库/jjx-user-article.json
/金久信源码/金久信数据库/jjx-user-contract.json
/金久信源码/金久信数据库/jjx-user-level.json
/金久信源码/金久信数据库/jjx-user-quote-num.json
/金久信源码/金久信数据库/opendb-admin-log.json
/金久信源码/金久信数据库/opendb-admin-menus.json
/金久信源码/金久信数据库/opendb-app-list.json
/金久信源码/金久信数据库/opendb-verify-codes.json
/金久信源码/金久信数据库/uni-id-log.json
/金久信源码/金久信数据库/uni-id-permissions.json
/金久信源码/金久信数据库/uni-id-roles.json
/金久信源码/金久信数据库/uni-id-users.json
/金久信源码/金久信数据库/vk-files.json
/金久信源码/金久信数据库/vk-files-categories.json
/金久信源码/金久信数据库/vk-global-data.json
+26
View File
@@ -111,6 +111,7 @@ export default {
}, },
enquiryId: null, enquiryId: null,
reloaded: false, reloaded: false,
sheetQuoteNum: 0,
// 表单相关开始----------------------------------------------------------- // 表单相关开始-----------------------------------------------------------
form1: { form1: {
// 表单请求数据,此处可以设置默认值 // 表单请求数据,此处可以设置默认值
@@ -175,6 +176,7 @@ export default {
this.enquiryId = enquiryId this.enquiryId = enquiryId
this.form1.data.sheetId = enquiryId this.form1.data.sheetId = enquiryId
this.userInfo = vk.getVuex('$user.userInfo') || {userLevel: 0} this.userInfo = vk.getVuex('$user.userInfo') || {userLevel: 0}
this.refreshUserQuotePrivilege()
this.getEnquiryDetail() this.getEnquiryDetail()
}, },
computed: { computed: {
@@ -184,6 +186,7 @@ export default {
canViewBuyerInfo() { canViewBuyerInfo() {
const remainQuoteNum = Number(this.userInfo && this.userInfo.remainQuoteNum) || 0 const remainQuoteNum = Number(this.userInfo && this.userInfo.remainQuoteNum) || 0
const sheetQuoteNum = Number(this.sheetQuoteNum) || 0
const quoteExpiredAt = this.userInfo && this.userInfo.quoteExpiredAt const quoteExpiredAt = this.userInfo && this.userInfo.quoteExpiredAt
const monthlyQuoteActive = !!(quoteExpiredAt && dayjs(quoteExpiredAt).isAfter(dayjs())) const monthlyQuoteActive = !!(quoteExpiredAt && dayjs(quoteExpiredAt).isAfter(dayjs()))
return this.isLoggedIn && ( return this.isLoggedIn && (
@@ -191,6 +194,7 @@ export default {
this.sheet.hasQuote || this.sheet.hasQuote ||
Number(this.userInfo.userLevel) > 0 || Number(this.userInfo.userLevel) > 0 ||
remainQuoteNum > 0 || remainQuoteNum > 0 ||
sheetQuoteNum > 0 ||
monthlyQuoteActive monthlyQuoteActive
) )
}, },
@@ -245,6 +249,27 @@ export default {
} }
}, },
async refreshUserQuotePrivilege() {
if (!this.isLoggedIn) return
try {
const {userInfo} = await vk.userCenter.getCurrentUserInfo()
this.userInfo = userInfo || {userLevel: 0}
let sheetQuoteNum = 0
if (this.enquiryId) {
const res = await vk.callFunction({
url: 'client/user/kh/getUserQuoteNumList',
data: {
type: 'enquiry',
sheetId: this.enquiryId,
},
})
if (res && res.data && res.data.num) sheetQuoteNum = Number(res.data.num) || 0
}
this.sheetQuoteNum = sheetQuoteNum
} catch (e) {
// ignore
}
},
// 提交报价单 // 提交报价单
async submit() { async submit() {
@@ -308,6 +333,7 @@ export default {
} }
}, },
onShow() { onShow() {
this.refreshUserQuotePrivilege()
this.reloaded = false this.reloaded = false
setTimeout(() => { setTimeout(() => {
this.reloaded = true this.reloaded = true
+14 -60
View File
@@ -31,33 +31,9 @@
<el-form-item label="备注"> <el-form-item label="备注">
<el-input v-model="payInfo.remark"/> <el-input v-model="payInfo.remark"/>
</el-form-item> </el-form-item>
<template v-if="[0, 1].includes(orderInfo.orderStatus)"> <el-form-item label="凭证">
<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> <vk-data-upload v-model="payInfo.photos"></vk-data-upload>
</el-form-item> </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="附件"> <el-form-item label="附件">
<vk-data-upload v-model="payInfo.ext"></vk-data-upload> <vk-data-upload v-model="payInfo.ext"></vk-data-upload>
</el-form-item> </el-form-item>
@@ -143,24 +119,6 @@ export default {
type: 'error', type: 'error',
message: '请输入支付金额' 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({ await vk.callFunction({
url: 'client/order/kh/makePay', url: 'client/order/kh/makePay',
title: '请求中...', title: '请求中...',
@@ -171,23 +129,19 @@ export default {
message: '支付单创建成功' message: '支付单创建成功'
}) })
this.close() this.close()
})
} else {
await vk.callFunction({
url: 'client/order/kh/makePay',
title: '请求中...',
data: {payInfo: this.payInfo}
})
this.$message({
type: 'success',
message: '支付单创建成功'
})
this.close()
}
}, },
changeType() { changeType() {
this.payInfo.isExpress = ['货到付款', '全款'].includes(this.payInfo.type) if (['尾款', '全款'].includes(this.payInfo.type)) {
console.log(this.payInfo.isExpress, this.payInfo.type) this.$confirm(
'选择尾款或全款支付申请,均代表本次交易已完结,对应本次交易最终货款的结算完成。提交申请后,系统无法再次发起付款申请;若发生误申请情形,仅可通过交易双方协商线下渠道协商办理支付,请您谨慎选择。',
'重要提示',
{
confirmButtonText: '确认为最终结算',
showCancelButton: false,
type: 'warning'
}
)
}
}, },
isNotaryPaidOrder() { isNotaryPaidOrder() {
return Number(this.orderInfo.signMethod) === 0 return Number(this.orderInfo.signMethod) === 0
@@ -196,8 +150,8 @@ export default {
}, },
isPayTypeDisabled(item) { isPayTypeDisabled(item) {
if (this.isNotaryPaidOrder()) return false if (this.isNotaryPaidOrder()) return false
return (!['预付款', '货到付款', '全款'].includes(item) && this.orderInfo.payStatus === 0) return (!['预付款', '全款'].includes(item) && this.orderInfo.payStatus === 0)
|| (['预付款', '货到付款', '全款'].includes(item) && this.orderInfo.payStatus > 0) || (['预付款', '全款'].includes(item) && this.orderInfo.payStatus > 0)
} }
}, },
mounted() { mounted() {
+14 -9
View File
@@ -72,22 +72,27 @@
</div> </div>
</template> </template>
</el-descriptions-item> </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="备注"> <el-descriptions-item label="备注">
<text>{{ item.remark ? item.remark : '无' }}</text> <text>{{ item.remark ? item.remark : '无' }}</text>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="买家备注"> <el-descriptions-item label="买家备注">
<text>{{ item.buyerRemark ? item.buyerRemark : '无' }}</text> <text>{{ item.buyerRemark ? item.buyerRemark : '无' }}</text>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="图片"> <el-descriptions-item label="凭证">
<template v-if="item.photos && item.photos.length > 0"> <template v-if="item.photos && item.photos.length > 0">
<el-image v-for="(photo, photoIndex) in item.photos" :key="photoIndex" :src="photo" <el-image v-for="(photo, photoIndex) in item.photos" :key="photoIndex"
style="width: 80px; height: 80px" fit="cover" :src="typeof photo === 'string' ? photo : photo.url"
:preview-src-list="item.photos"/> style="width: 80px; height: 80px; margin-right: 8px;" fit="cover"
:preview-src-list="item.photos.map(p => typeof p === 'string' ? p : p.url)"/>
</template>
<span v-else>无</span>
</el-descriptions-item>
<el-descriptions-item label="附件">
<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> </template>
<span v-else>无</span> <span v-else>无</span>
</el-descriptions-item> </el-descriptions-item>
+1 -1
View File
@@ -427,7 +427,7 @@ export default {
keyword: '', keyword: '',
orderPayList: [], orderPayList: [],
payInfo: {}, payInfo: {},
payTypeList: ['预付款', '进度款', '尾款', '货到付款', '全款'], payTypeList: ['预付款', '进度款', '尾款', '全款'],
topExpiredAt: '', topExpiredAt: '',
userInfo: null, userInfo: null,
rate: 0, rate: 0,
+22 -5
View File
@@ -1,9 +1,8 @@
<template> <template>
<el-card shadow="never" class="balance-log"> <el-card shadow="never" class="balance-log">
<div slot="header" class="flex justify-between items-center"> <div slot="header" class="header-bar">
<span>余额记录</span> <span class="header-title">余额记录</span>
<div class="flex justify-end items-center"> <div class="query-date">
<div class="query-date mr-20">
<span class="query-date-label">查询日期:</span> <span class="query-date-label">查询日期:</span>
<el-date-picker <el-date-picker
v-model="queryDate" v-model="queryDate"
@@ -17,7 +16,8 @@
@change="onQueryDateChange"> @change="onQueryDateChange">
</el-date-picker> </el-date-picker>
</div> </div>
<div class="balance-text mr-20">当前余额:<span class="amount">{{ balanceLoading ? '加载中...' : formatBalance(balance) }}</span></div> <div class="balance-text">当前余额:<span class="amount">{{ balanceLoading ? '加载中...' : formatBalance(balance) }}</span></div>
<div class="header-right">
<el-button type="primary" size="small" :loading="withdrawLoading" @click="openWithdrawDialog">提现</el-button> <el-button type="primary" size="small" :loading="withdrawLoading" @click="openWithdrawDialog">提现</el-button>
</div> </div>
</div> </div>
@@ -328,18 +328,35 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.balance-log { .balance-log {
.header-bar {
display: flex;
align-items: center;
gap: 24px;
}
.header-title {
flex-shrink: 0;
}
.query-date { .query-date {
display: flex; display: flex;
align-items: center; align-items: center;
margin-left: 12px;
} }
.query-date-label { .query-date-label {
color: #666; color: #666;
white-space: nowrap; white-space: nowrap;
margin-right: 8px;
} }
.balance-text { .balance-text {
color: #666; color: #666;
white-space: nowrap;
}
.header-right {
margin-left: auto;
} }
.amount, .amount,
@@ -260,7 +260,7 @@ module.exports = {
if (item.pricingForm) detail += ` ,${item.pricingForm}` if (item.pricingForm) detail += ` ,${item.pricingForm}`
if (item.loadPaidBy) detail += ` ,${item.loadPaidBy}` if (item.loadPaidBy) detail += ` ,${item.loadPaidBy}`
item.model.forEach((model) => { item.model.forEach((model) => {
detail += `,${model.label}:${model.value}` if (model.label && model.value && model.value !== 'null') detail += `,${model.label}:${model.value}`
}) })
if (index < sheet.productList.length - 1) detail += '\r\n' if (index < sheet.productList.length - 1) detail += '\r\n'
}) })
@@ -94,6 +94,7 @@ module.exports = {
needPermission, needPermission,
queryField queryField
}); });
console.log('login res', res)
} }
if (res.token) { if (res.token) {
if (!res.msg) { if (!res.msg) {