fix: 调整支付申请与报价查看权限
去掉货到付款和发货凭证,尾款或全款时提示交易已完结;已购单据报价次数也可查看买家信息。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+1
-72
@@ -5,75 +5,4 @@
|
||||
/.idea
|
||||
/uniCloud-aliyun/cloudfunctions/router/node_modules/
|
||||
/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
|
||||
/金久信源码/
|
||||
@@ -111,6 +111,7 @@ export default {
|
||||
},
|
||||
enquiryId: null,
|
||||
reloaded: false,
|
||||
sheetQuoteNum: 0,
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
@@ -175,6 +176,7 @@ export default {
|
||||
this.enquiryId = enquiryId
|
||||
this.form1.data.sheetId = enquiryId
|
||||
this.userInfo = vk.getVuex('$user.userInfo') || {userLevel: 0}
|
||||
this.refreshUserQuotePrivilege()
|
||||
this.getEnquiryDetail()
|
||||
},
|
||||
computed: {
|
||||
@@ -184,6 +186,7 @@ export default {
|
||||
|
||||
canViewBuyerInfo() {
|
||||
const remainQuoteNum = Number(this.userInfo && this.userInfo.remainQuoteNum) || 0
|
||||
const sheetQuoteNum = Number(this.sheetQuoteNum) || 0
|
||||
const quoteExpiredAt = this.userInfo && this.userInfo.quoteExpiredAt
|
||||
const monthlyQuoteActive = !!(quoteExpiredAt && dayjs(quoteExpiredAt).isAfter(dayjs()))
|
||||
return this.isLoggedIn && (
|
||||
@@ -191,6 +194,7 @@ export default {
|
||||
this.sheet.hasQuote ||
|
||||
Number(this.userInfo.userLevel) > 0 ||
|
||||
remainQuoteNum > 0 ||
|
||||
sheetQuoteNum > 0 ||
|
||||
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() {
|
||||
|
||||
@@ -308,6 +333,7 @@ export default {
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.refreshUserQuotePrivilege()
|
||||
this.reloaded = false
|
||||
setTimeout(() => {
|
||||
this.reloaded = true
|
||||
|
||||
@@ -31,33 +31,9 @@
|
||||
<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.photos"></vk-data-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件">
|
||||
<vk-data-upload v-model="payInfo.ext"></vk-data-upload>
|
||||
</el-form-item>
|
||||
@@ -143,51 +119,29 @@ export default {
|
||||
type: 'error',
|
||||
message: '请输入支付金额'
|
||||
})
|
||||
if (this.payInfo.isExpress && this.payInfo.expressPhoto.length === 0) return this.$message({
|
||||
type: 'error',
|
||||
message: '请上传凭证'
|
||||
await vk.callFunction({
|
||||
url: 'client/order/kh/makePay',
|
||||
title: '请求中...',
|
||||
data: {payInfo: this.payInfo}
|
||||
})
|
||||
// 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()
|
||||
}
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '支付单创建成功'
|
||||
})
|
||||
this.close()
|
||||
},
|
||||
changeType() {
|
||||
this.payInfo.isExpress = ['货到付款', '全款'].includes(this.payInfo.type)
|
||||
console.log(this.payInfo.isExpress, this.payInfo.type)
|
||||
if (['尾款', '全款'].includes(this.payInfo.type)) {
|
||||
this.$confirm(
|
||||
'选择尾款或全款支付申请,均代表本次交易已完结,对应本次交易最终货款的结算完成。提交申请后,系统无法再次发起付款申请;若发生误申请情形,仅可通过交易双方协商线下渠道协商办理支付,请您谨慎选择。',
|
||||
'重要提示',
|
||||
{
|
||||
confirmButtonText: '确认为最终结算',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
}
|
||||
},
|
||||
isNotaryPaidOrder() {
|
||||
return Number(this.orderInfo.signMethod) === 0
|
||||
@@ -196,8 +150,8 @@ export default {
|
||||
},
|
||||
isPayTypeDisabled(item) {
|
||||
if (this.isNotaryPaidOrder()) return false
|
||||
return (!['预付款', '货到付款', '全款'].includes(item) && this.orderInfo.payStatus === 0)
|
||||
|| (['预付款', '货到付款', '全款'].includes(item) && this.orderInfo.payStatus > 0)
|
||||
return (!['预付款', '全款'].includes(item) && this.orderInfo.payStatus === 0)
|
||||
|| (['预付款', '全款'].includes(item) && this.orderInfo.payStatus > 0)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -72,22 +72,27 @@
|
||||
</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="图片">
|
||||
<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"/>
|
||||
<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>
|
||||
<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>
|
||||
<span v-else>无</span>
|
||||
</el-descriptions-item>
|
||||
|
||||
@@ -427,7 +427,7 @@ export default {
|
||||
keyword: '',
|
||||
orderPayList: [],
|
||||
payInfo: {},
|
||||
payTypeList: ['预付款', '进度款', '尾款', '货到付款', '全款'],
|
||||
payTypeList: ['预付款', '进度款', '尾款', '全款'],
|
||||
topExpiredAt: '',
|
||||
userInfo: null,
|
||||
rate: 0,
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<template>
|
||||
<el-card shadow="never" class="balance-log">
|
||||
<div slot="header" class="flex justify-between items-center">
|
||||
<span>余额记录</span>
|
||||
<div class="flex justify-end items-center">
|
||||
<div class="query-date mr-20">
|
||||
<span class="query-date-label">查询日期:</span>
|
||||
<el-date-picker
|
||||
v-model="queryDate"
|
||||
type="date"
|
||||
size="small"
|
||||
value-format="yyyyMMdd"
|
||||
format="yyyy-MM-dd"
|
||||
:clearable="false"
|
||||
:editable="false"
|
||||
placeholder="选择日期"
|
||||
@change="onQueryDateChange">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="balance-text mr-20">当前余额:<span class="amount">{{ balanceLoading ? '加载中...' : formatBalance(balance) }}</span></div>
|
||||
<div slot="header" class="header-bar">
|
||||
<span class="header-title">余额记录</span>
|
||||
<div class="query-date">
|
||||
<span class="query-date-label">查询日期:</span>
|
||||
<el-date-picker
|
||||
v-model="queryDate"
|
||||
type="date"
|
||||
size="small"
|
||||
value-format="yyyyMMdd"
|
||||
format="yyyy-MM-dd"
|
||||
:clearable="false"
|
||||
:editable="false"
|
||||
placeholder="选择日期"
|
||||
@change="onQueryDateChange">
|
||||
</el-date-picker>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -328,18 +328,35 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.balance-log {
|
||||
.header-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.query-date {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
.query-date-label {
|
||||
color: #666;
|
||||
white-space: nowrap;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.balance-text {
|
||||
color: #666;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.header-right {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.amount,
|
||||
|
||||
@@ -260,7 +260,7 @@ module.exports = {
|
||||
if (item.pricingForm) detail += ` ,${item.pricingForm}`
|
||||
if (item.loadPaidBy) detail += ` ,${item.loadPaidBy}`
|
||||
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'
|
||||
})
|
||||
|
||||
@@ -94,6 +94,7 @@ module.exports = {
|
||||
needPermission,
|
||||
queryField
|
||||
});
|
||||
console.log('login res', res)
|
||||
}
|
||||
if (res.token) {
|
||||
if (!res.msg) {
|
||||
|
||||
Reference in New Issue
Block a user