1. 诊所管理
This commit is contained in:
@@ -33,6 +33,10 @@ export function reportStoreBankCard(data) {
|
||||
return bizRequest({ path: '/report', method: 'POST', data });
|
||||
}
|
||||
|
||||
export function updateStoreBankCard(data) {
|
||||
return bizRequest({ path: '/update', method: 'POST', data });
|
||||
}
|
||||
|
||||
export function syncStoreBankCardStatusByStore(storeId) {
|
||||
return bizRequest({ path: '/sync-status-by-store', method: 'POST', data: { store_id: storeId } });
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- 头部信息卡片 -->
|
||||
<view class="card hero-card">
|
||||
<view class="image-wrapper">
|
||||
<image class="hero" :src="display.imageUrl" mode="aspectFill" />
|
||||
<image class="hero" :src="display.imageUrl || 'https://xiaokang88.oss-cn-hangzhou.aliyuncs.com/xk_upload_20250510/cd470ebf97e31c4048ba502ba71b66a3.jpg'" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="main-info">
|
||||
<text class="drug-name">{{ display.drugName }}</text>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
@click="goDetail(item)"
|
||||
>
|
||||
<!-- 左侧缩略图 -->
|
||||
<image class="thumb" :src="rowDisplay(item).imageUrl" mode="aspectFill" />
|
||||
<image class="thumb" :src="rowDisplay(item).imageUrl || 'https://xiaokang88.oss-cn-hangzhou.aliyuncs.com/xk_upload_20250510/cd470ebf97e31c4048ba502ba71b66a3.jpg'" mode="aspectFill" />
|
||||
|
||||
<!-- 右侧内容区 -->
|
||||
<view class="content">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { formatMoney } from './format.js'
|
||||
|
||||
const DEFAULT_DRUG_IMAGE =
|
||||
'https://xkyp-web2.obs.cn-south-1.myhuaweicloud.com/buy/public/drug_no_mage.png'
|
||||
'https://xiaokang88.oss-cn-hangzhou.aliyuncs.com/xk_upload_20250510/cd470ebf97e31c4048ba502ba71b66a3.jpg'
|
||||
|
||||
/** 兼容 int 时间戳 / datetime 字符串 */
|
||||
export function formatDateTime(v) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- 头部信息卡片 -->
|
||||
<view class="card hero-card">
|
||||
<view class="image-wrapper">
|
||||
<image class="hero" :src="display.imageUrl" mode="aspectFill" />
|
||||
<image class="hero" :src="display.imageUrl || 'https://xiaokang88.oss-cn-hangzhou.aliyuncs.com/xk_upload_20250510/cd470ebf97e31c4048ba502ba71b66a3.jpg'" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="main-info">
|
||||
<text class="drug-name">{{ display.drugName }}</text>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
@click="goDetail(item)"
|
||||
>
|
||||
<!-- 左侧缩略图 -->
|
||||
<image class="thumb" :src="rowDisplay(item).imageUrl" mode="aspectFill" />
|
||||
<image class="thumb" :src="rowDisplay(item).imageUrl || 'https://xiaokang88.oss-cn-hangzhou.aliyuncs.com/xk_upload_20250510/cd470ebf97e31c4048ba502ba71b66a3.jpg'" mode="aspectFill" />
|
||||
|
||||
<!-- 右侧内容区 -->
|
||||
<view class="content">
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
<view v-if="!list.length" class="empty">暂无分成记录</view>
|
||||
<view v-for="item in list" :key="item.id" class="row">
|
||||
<view>
|
||||
<text class="order">{{ item.order_no }}</text>
|
||||
<text class="order">{{ item.order_no }} <text class="status" style="margin-left: 20rpx">{{ item.settlement_id > 0 ? '已结算' : '待结算' }}</text></text>
|
||||
<text class="drug">{{ item.drug_name }} ×{{ item.qty }}</text>
|
||||
</view>
|
||||
<view class="right">
|
||||
<text class="amount">¥{{ item.commission_amount }}</text>
|
||||
<text class="status">{{ item.settlement_id > 0 ? '已结算' : '待结算' }}</text>
|
||||
<text class="status">{{ item.created_at }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -123,7 +123,7 @@ export default {
|
||||
profileInfo: null,
|
||||
stats: {},
|
||||
menuItems: [
|
||||
{ key: 'transfer', label: '传方', path: '/subPackages/sub_workbench/prescription_v2/index?salesperson_transfer=1&initial_category=1' },
|
||||
// { key: 'transfer', label: '传方', path: '/subPackages/sub_workbench/prescription_v2/index?salesperson_transfer=1&initial_category=1' },
|
||||
// { key: 'transfer-list', label: '传方记录', path: `${ROOT}/transfer-prescription/list` },
|
||||
// { key: 'earnings', label: '我的收益', path: `${ROOT}/earnings/index` },
|
||||
{ key: 'leads', label: '获客记录', path: `${ROOT}/leads/index` },
|
||||
|
||||
@@ -8,9 +8,15 @@
|
||||
<text class="status-value">{{ reportStatusText }}</text>
|
||||
<u-button size="mini" class="sync-btn" @click="syncStatus">刷新状态</u-button>
|
||||
</view>
|
||||
<view v-if="reportInfo && reportInfo.audit_remarks" class="reject-tip">
|
||||
驳回原因:{{ reportInfo.audit_remarks }}
|
||||
</view>
|
||||
<view v-if="showPendingSyncHint" class="pending-tip">
|
||||
当前为待审核,如审核结果已久未更新,请先点击「刷新状态」
|
||||
</view>
|
||||
|
||||
<view v-if="!hasReport || canSubmitNew" class="form-wrap">
|
||||
<view class="tip">新报备需上传合同附件,字段与 PC 端一致</view>
|
||||
<view class="tip">{{ formTip }}</view>
|
||||
<u-form :model="form" label-width="180">
|
||||
<u-form-item label="开户人姓名" :required="true">
|
||||
<u-input v-model="form.bank_user_name" placeholder="请输入开户人姓名" />
|
||||
@@ -45,7 +51,7 @@
|
||||
<u-input v-model="form.summary" placeholder="选填" />
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<u-button type="primary" :custom-style="primaryStyle" :loading="submitting" @click="submit">提交报备</u-button>
|
||||
<u-button type="primary" :custom-style="primaryStyle" :loading="submitting" @click="submit">{{ submitButtonText }}</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -54,7 +60,7 @@
|
||||
|
||||
<script>
|
||||
import BusinessPageLayout from '@/subPackages/sub_salesperson/components/business-page-layout.vue'
|
||||
import { getStoreBankCardReportDetail, reportStoreBankCard, syncStoreBankCardStatusByStore } from '@/api/bankCardReport.js'
|
||||
import { getStoreBankCardReportDetail, reportStoreBankCard, syncStoreBankCardStatusByStore, updateStoreBankCard } from '@/api/bankCardReport.js'
|
||||
import { pickAndUploadImage } from '@/subPackages/sub_salesperson/common/inputFormHelpers.js'
|
||||
import { uploadToOss } from '@/common/js/oss-upload.js'
|
||||
import { prepareImagePath } from '@/common/js/image-compress.js'
|
||||
@@ -111,6 +117,21 @@ export default {
|
||||
if (!this.hasReport) return true
|
||||
return [3, 4].includes(Number(this.reportInfo.report_status))
|
||||
},
|
||||
isRejectedResubmit() {
|
||||
return this.hasReport && [3, 4].includes(Number(this.reportInfo.report_status))
|
||||
},
|
||||
showPendingSyncHint() {
|
||||
return this.hasReport && Number(this.reportInfo.report_status) === 1
|
||||
},
|
||||
formTip() {
|
||||
if (this.isRejectedResubmit) {
|
||||
return '审核未通过,请修改信息后重新上传合同附件并提交'
|
||||
}
|
||||
return '新报备需上传合同附件,字段与 PC 端一致'
|
||||
},
|
||||
submitButtonText() {
|
||||
return this.isRejectedResubmit ? '重新提交报备' : '提交报备'
|
||||
},
|
||||
reportStatusText() {
|
||||
const s = Number(this.reportInfo?.report_status)
|
||||
if (s === 2) return '有效'
|
||||
@@ -141,6 +162,9 @@ export default {
|
||||
if (w.ok && w.data) {
|
||||
this.reportInfo = w.data
|
||||
this.applyDraft(w.data)
|
||||
if (Number(w.data.report_status) === 1 && w.data.id) {
|
||||
this.syncStatus({ silent: true })
|
||||
}
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
@@ -148,13 +172,18 @@ export default {
|
||||
})
|
||||
},
|
||||
applyDraft(data) {
|
||||
if (!data || data.id) return
|
||||
if (!data) return
|
||||
const rejectedResubmit = data.id && [3, 4].includes(Number(data.report_status))
|
||||
if (data.id && !rejectedResubmit) return
|
||||
this.form.bank_user_name = data.bank_user_name || ''
|
||||
this.form.bank_card = data.bank_card || ''
|
||||
this.form.bank_name = data.bank_name || ''
|
||||
this.form.account_type = String(data.account_type || data.bank_account_type || '2')
|
||||
this.form.bank_no = data.bank_no || ''
|
||||
this.form.cert_no = data.cert_no || ''
|
||||
this.form.remark = data.remark || ''
|
||||
this.form.summary = data.summary || ''
|
||||
this.form.attachment = rejectedResubmit ? '' : (data.attachment || '')
|
||||
},
|
||||
onAccountTypeConfirm(e) {
|
||||
const item = e[0]
|
||||
@@ -221,15 +250,22 @@ export default {
|
||||
submit() {
|
||||
if (!this.validateForm()) return
|
||||
this.submitting = true
|
||||
reportStoreBankCard({
|
||||
const payload = {
|
||||
store_id: this.storeId,
|
||||
store_input_id: this.storeInputId,
|
||||
...this.form,
|
||||
bank_account_type: this.mapAccountTypeToStore(this.form.account_type),
|
||||
})
|
||||
}
|
||||
const request = this.isRejectedResubmit
|
||||
? updateStoreBankCard({ ...payload, id: this.reportInfo.id })
|
||||
: reportStoreBankCard(payload)
|
||||
request
|
||||
.then((w) => {
|
||||
if (w.ok) {
|
||||
uni.showToast({ title: '报备已提交', icon: 'success' })
|
||||
uni.showToast({
|
||||
title: this.isRejectedResubmit ? '报备已重新提交' : '报备已提交',
|
||||
icon: 'success',
|
||||
})
|
||||
setTimeout(() => this.loadDetail(), 500)
|
||||
} else {
|
||||
uni.showToast({ title: (w.res && w.res.msg) || '提交失败', icon: 'none' })
|
||||
@@ -243,11 +279,14 @@ export default {
|
||||
const map = { '1': 1, '2': 2, '3': 1, '4': 2 }
|
||||
return map[String(accountType)] || 2
|
||||
},
|
||||
syncStatus() {
|
||||
syncStatus(options = {}) {
|
||||
syncStoreBankCardStatusByStore(this.storeId).then((w) => {
|
||||
if (w.ok) {
|
||||
this.reportInfo = w.data
|
||||
uni.showToast({ title: '已刷新', icon: 'success' })
|
||||
this.applyDraft(w.data)
|
||||
if (!options.silent) {
|
||||
uni.showToast({ title: '已刷新', icon: 'success' })
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -270,6 +309,24 @@ export default {
|
||||
}
|
||||
.status-label { color: #86909c; font-size: 26rpx; }
|
||||
.status-value { color: #1d2129; font-size: 30rpx; font-weight: 600; flex: 1; }
|
||||
.reject-tip {
|
||||
background: #fff2f0;
|
||||
border-radius: 12rpx;
|
||||
color: #cf1322;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 24rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
}
|
||||
.pending-tip {
|
||||
background: #fffbe6;
|
||||
border-radius: 12rpx;
|
||||
color: #ad6800;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 24rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
}
|
||||
.form-wrap { background: #fff; border-radius: 16rpx; padding: 24rpx; }
|
||||
.tip { font-size: 24rpx; color: #86909c; margin-bottom: 24rpx; line-height: 1.5; }
|
||||
.attachment-row { display: flex; align-items: center; gap: 16rpx; width: 100%; }
|
||||
|
||||
@@ -6,8 +6,8 @@ export function checkDev(key = '') {
|
||||
// 判断某些模块是否开启
|
||||
switch (key) {
|
||||
case 'dev':
|
||||
// return false;
|
||||
return true;
|
||||
return false;
|
||||
// return true;
|
||||
case 'open-im':
|
||||
// return false;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user