提交
This commit is contained in:
1 parent
c137b46939
commit
b6c63591ea
126 files changed
+41593
-22990
No files matched your search
@@ -36,8 +36,8 @@
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint"
|
||||
>支持协议号、客户姓名、身份证号、新生儿姓名、新生儿身份证号模糊检索;默认展示近 30
|
||||
天内应缴费的明细。</span
|
||||
>支持协议号、客户姓名、身份证号、新生儿姓名、新生儿身份证号模糊检索;默认展示应缴费时间前
|
||||
15 天至后 15 天内的明细。</span
|
||||
>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
@@ -418,9 +418,11 @@
|
||||
}
|
||||
|
||||
function getDefaultInstallmentDueDateRange(): [string, string] {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setDate(start.getDate() - 30)
|
||||
const today = new Date()
|
||||
const start = new Date(today)
|
||||
const end = new Date(today)
|
||||
start.setDate(start.getDate() - 15)
|
||||
end.setDate(end.getDate() + 15)
|
||||
return [formatLocalDate(start), formatLocalDate(end)]
|
||||
}
|
||||
|
||||
|
||||
@@ -69,8 +69,8 @@
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint"
|
||||
>支持协议号、客户姓名、身份证号、新生儿姓名、新生儿身份证号模糊检索;默认展示近 30
|
||||
天内应缴费的明细。</span
|
||||
>支持协议号、客户姓名、身份证号、新生儿姓名、新生儿身份证号模糊检索;默认展示应缴费时间前
|
||||
15 天至后 15 天内的明细。</span
|
||||
>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
@@ -436,9 +436,11 @@
|
||||
}
|
||||
|
||||
function getDefaultInstallmentDueDateRange(): [string, string] {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setDate(start.getDate() - 30)
|
||||
const today = new Date()
|
||||
const start = new Date(today)
|
||||
const end = new Date(today)
|
||||
start.setDate(start.getDate() - 15)
|
||||
end.setDate(end.getDate() + 15)
|
||||
return [formatLocalDate(start), formatLocalDate(end)]
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</el-tabs>
|
||||
|
||||
<div class="filter-block">
|
||||
<el-form :model="searchForm" class="filter-form" label-position="top" @submit.prevent>
|
||||
<el-form :model="searchForm" class="filter-form filter-form--inline-label" @submit.prevent>
|
||||
<div class="filter-grid">
|
||||
<el-form-item label="关键词">
|
||||
<el-input
|
||||
@@ -47,7 +47,9 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">支持按协议号模糊检索;默认展示近 30 天内应缴费的明细。</span>
|
||||
<span class="filter-hint"
|
||||
>支持按协议号模糊检索;默认展示应缴费时间为当天前 10 天至后 20 天的明细。</span
|
||||
>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -458,9 +460,10 @@
|
||||
}
|
||||
|
||||
function getDefaultInstallmentDueDateRange(): [string, string] {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setDate(start.getDate() - 30)
|
||||
const end = new Date()
|
||||
start.setDate(start.getDate() - 10)
|
||||
end.setDate(end.getDate() + 20)
|
||||
return [formatLocalDate(start), formatLocalDate(end)]
|
||||
}
|
||||
|
||||
@@ -736,17 +739,24 @@
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.filter-form :deep(.el-form-item) {
|
||||
.filter-form--inline-label :deep(.el-form-item) {
|
||||
margin-bottom: 0;
|
||||
min-width: 0;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.filter-form :deep(.el-form-item__label) {
|
||||
.filter-form--inline-label :deep(.el-form-item__label) {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
padding: 0 0 4px;
|
||||
line-height: 1.2;
|
||||
padding-right: 8px;
|
||||
line-height: 36px;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.filter-form--inline-label :deep(.el-form-item__content) {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.attachment-upload {
|
||||
|
||||
@@ -37,28 +37,13 @@
|
||||
<div class="section-title-left"><h3>基本信息</h3></div>
|
||||
</div>
|
||||
<div class="form-grid form-grid--col4">
|
||||
<el-form-item label="协议号" prop="protocolNo">
|
||||
<el-select
|
||||
v-model="formData.protocolNoId"
|
||||
<el-form-item label="协议号">
|
||||
<el-input
|
||||
:model-value="isEdit ? formData.protocolNo : ''"
|
||||
class="w-full"
|
||||
filterable
|
||||
remote
|
||||
clearable
|
||||
reserve-keyword
|
||||
:remote-method="remoteSearchProtocolNos"
|
||||
:loading="protocolNoLoading"
|
||||
placeholder="输入协议号检索"
|
||||
@change="onProtocolNoChange"
|
||||
@clear="onProtocolNoClear"
|
||||
>
|
||||
<el-option
|
||||
v-for="p in protocolNoOptions"
|
||||
:key="p.id"
|
||||
:label="protocolNoOptionLabel(p)"
|
||||
:value="p.id"
|
||||
:disabled="isProtocolNoOptionDisabled(p)"
|
||||
/>
|
||||
</el-select>
|
||||
disabled
|
||||
:placeholder="isEdit ? '' : '保存后自动生成'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="协议状态" prop="protocolStatus">
|
||||
<el-select
|
||||
@@ -1171,7 +1156,6 @@
|
||||
fetchItemUnitList,
|
||||
fetchCollectionRegionList,
|
||||
fetchHospitalList,
|
||||
fetchCollectionProtocolNoList,
|
||||
fetchSampleCodeList,
|
||||
fetchExpressCompanyList,
|
||||
fetchSiteList
|
||||
@@ -1236,8 +1220,6 @@
|
||||
}>
|
||||
>([])
|
||||
const unitOptions = ref<Array<{ id: string; unitName: string; unitCode: string }>>([])
|
||||
const protocolNoOptions = ref<Api.BizCollectionProtocolNo.ProtocolNoItem[]>([])
|
||||
const protocolNoLoading = ref(false)
|
||||
const sampleCodeOptions = ref<Api.BizSampleCode.SampleCodeItem[]>([])
|
||||
const sampleCodeLoading = ref(false)
|
||||
const expressCompanyOptions = ref<Api.ExpressCompany.ExpressCompanyItem[]>([])
|
||||
@@ -1480,7 +1462,6 @@
|
||||
})
|
||||
|
||||
const formRules = {
|
||||
protocolNo: [{ required: true, message: '请输入协议号', trigger: 'blur' }],
|
||||
protocolStatus: [{ required: true, message: '请选择协议状态', trigger: 'change' }]
|
||||
}
|
||||
|
||||
@@ -1539,7 +1520,6 @@
|
||||
salesSnapshot.value = null
|
||||
regionOptions.value = []
|
||||
hospitalOptions.value = []
|
||||
protocolNoOptions.value = []
|
||||
selectedSamples.value = []
|
||||
batchTransportVisible.value = false
|
||||
Object.assign(batchTransport, createEmptyTransport())
|
||||
@@ -1799,27 +1779,9 @@
|
||||
if (prot) {
|
||||
formData.collectorUserId = String(prot.collectorUserId || formData.collectorUserId || '')
|
||||
formData.protocolNo = String(prot.protocolNo || formData.protocolNo || '')
|
||||
formData.protocolNoId = String(prot.protocolNoId || formData.protocolNoId || '')
|
||||
formData.protocolStatus = String(prot.protocolStatus || formData.protocolStatus || 'dsx')
|
||||
formData.registerDate = String(prot.registerDate || formData.registerDate || '')
|
||||
formData.remark = String(prot.remark ?? formData.remark ?? '')
|
||||
if (formData.protocolNoId) {
|
||||
protocolNoOptions.value = [
|
||||
{
|
||||
id: formData.protocolNoId,
|
||||
protocolNo: formData.protocolNo,
|
||||
issued: 0,
|
||||
issuedUserId: '',
|
||||
issuedUserName: '',
|
||||
issuedTime: '',
|
||||
tenantNo: '',
|
||||
orderNum: 0,
|
||||
remark: '',
|
||||
createTime: '',
|
||||
updateTime: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
const pc = bundle.partyCustomer as Record<string, any> | null
|
||||
@@ -1905,27 +1867,9 @@
|
||||
resetForm()
|
||||
|
||||
formData.protocolNo = String(row.protocolNo || '')
|
||||
formData.protocolNoId = String((row as any).protocolNoId || '')
|
||||
formData.protocolStatus = String(row.protocolStatus || 'dsx')
|
||||
formData.registerDate = String(row.registerDate || '')
|
||||
formData.collectorUserId = String(row.collectorUserId || '')
|
||||
if (formData.protocolNoId) {
|
||||
protocolNoOptions.value = [
|
||||
{
|
||||
id: formData.protocolNoId,
|
||||
protocolNo: formData.protocolNo,
|
||||
issued: 0,
|
||||
issuedUserId: '',
|
||||
issuedUserName: '',
|
||||
issuedTime: '',
|
||||
tenantNo: '',
|
||||
orderNum: 0,
|
||||
remark: '',
|
||||
createTime: '',
|
||||
updateTime: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
formData.protocolAttachments = String((row as any).protocolAttachments || '')
|
||||
formData.remark = String(row.remark || '')
|
||||
|
||||
@@ -1982,13 +1926,6 @@
|
||||
async function handleSubmit() {
|
||||
if (!formRef.value) return
|
||||
await formRef.value.validate()
|
||||
if (!isEdit.value && formData.protocolNoId) {
|
||||
const picked = protocolNoOptions.value.find((x) => x.id === formData.protocolNoId)
|
||||
if (picked?.usedInProtocol) {
|
||||
ElMessage.warning(`协议号「${formData.protocolNo}」已被占用,请更换其他协议号`)
|
||||
return
|
||||
}
|
||||
}
|
||||
if (!isEdit.value) {
|
||||
for (const sampleRow of formData.samples) {
|
||||
if (!sampleRow.sampleCodeId) continue
|
||||
@@ -2007,9 +1944,7 @@
|
||||
.map((a) => a.fileUrl)
|
||||
.filter(Boolean)
|
||||
.join(',')
|
||||
const payload = {
|
||||
protocolNo: formData.protocolNo,
|
||||
protocolNoId: formData.protocolNoId || undefined,
|
||||
const payload: Record<string, unknown> = {
|
||||
protocolStatus: formData.protocolStatus,
|
||||
registerDate: formData.registerDate || undefined,
|
||||
collectorUserId: formData.collectorUserId || undefined,
|
||||
@@ -2585,52 +2520,6 @@
|
||||
syncContractAmount()
|
||||
}
|
||||
|
||||
/* ====== 协议号下拉检索 ====== */
|
||||
function protocolNoOptionLabel(p: Api.BizCollectionProtocolNo.ProtocolNoItem) {
|
||||
if (p.usedInProtocol) return `${p.protocolNo}(已占用)`
|
||||
if (p.issued) return `${p.protocolNo}(已下发)`
|
||||
return p.protocolNo
|
||||
}
|
||||
|
||||
function isProtocolNoOptionDisabled(p: Api.BizCollectionProtocolNo.ProtocolNoItem) {
|
||||
if (!p.usedInProtocol) return false
|
||||
return !(isEdit.value && p.id === formData.protocolNoId)
|
||||
}
|
||||
|
||||
async function remoteSearchProtocolNos(query: string) {
|
||||
protocolNoLoading.value = true
|
||||
try {
|
||||
const res = await fetchCollectionProtocolNoList({
|
||||
page: 1,
|
||||
pageSize: 100,
|
||||
keyword: query || undefined
|
||||
})
|
||||
protocolNoOptions.value = res.list || []
|
||||
} catch {
|
||||
protocolNoOptions.value = []
|
||||
} finally {
|
||||
protocolNoLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function onProtocolNoChange(val: string | null | undefined) {
|
||||
if (!val) {
|
||||
formData.protocolNo = ''
|
||||
formData.protocolNoId = ''
|
||||
return
|
||||
}
|
||||
const p = protocolNoOptions.value.find((x) => x.id === val)
|
||||
if (p) {
|
||||
formData.protocolNo = p.protocolNo
|
||||
formData.protocolNoId = p.id
|
||||
}
|
||||
}
|
||||
|
||||
function onProtocolNoClear() {
|
||||
formData.protocolNo = ''
|
||||
formData.protocolNoId = ''
|
||||
}
|
||||
|
||||
/* ====== 样本编码选择 ====== */
|
||||
function sampleCodeOptionLabel(sc: Api.BizSampleCode.SampleCodeItem) {
|
||||
if (sc.usedInProtocol) return `${sc.sampleCode}(已占用)`
|
||||
|
||||
Reference in new issue
Block a user