修改
客户/供应商 子表分开,id改回自增
This commit is contained in:
@@ -33,8 +33,8 @@
|
||||
clearable
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option label="正常" :value="0" />
|
||||
<el-option label="停用" :value="1" />
|
||||
<el-option label="正常" value="0" />
|
||||
<el-option label="停用" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
@@ -101,7 +101,6 @@
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['customersupplier:supplierinfo:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -143,7 +142,9 @@
|
||||
<el-table-column label="供应商名称" align="center" prop="supplierName" />
|
||||
<el-table-column label="对外代码" align="center" prop="supplierCodeDw" />
|
||||
<el-table-column label="统一社会信用代码" align="center" prop="creditCode" />
|
||||
<el-table-column label="供应商类型" align="center" prop="supplierType" />
|
||||
<el-table-column label="供应商类型" align="center" prop="supplierType">
|
||||
<template #default="scope">{{ formatOption(supplierTypeOptions, scope.row.supplierType) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="启用状态" align="center" prop="isEnable">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_normal_disable" :value="scope.row.isEnable" />
|
||||
@@ -154,15 +155,21 @@
|
||||
<el-table-column label="应付账期" align="center" prop="zq" />
|
||||
<el-table-column label="结算员姓名" align="center" prop="settlementUser" />
|
||||
<el-table-column label="跟单员姓名" align="center" prop="serviceUser" />
|
||||
<el-table-column label="结算方式" align="center" prop="settlementType" />
|
||||
<el-table-column label="结算方式" align="center" prop="settlementType">
|
||||
<template #default="scope">{{ formatOption(settlementTypeOptions, scope.row.settlementType) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="临时额度" align="center" prop="tempEd" />
|
||||
<el-table-column label="应付余额" align="center" prop="accountBalance" />
|
||||
<el-table-column label="外币应付余额" align="center" prop="foreignCurrencyBalance" />
|
||||
<el-table-column label="信用额度" align="center" prop="creditEd" />
|
||||
<el-table-column label="重量阈值" align="center" prop="weightThreshold" />
|
||||
<el-table-column label="抛比" align="center" prop="throwRatio" />
|
||||
<el-table-column label="合作开始日期" align="center" prop="cooperationStartDate" />
|
||||
<el-table-column label="合作状态" align="center" prop="cooperationStatus" />
|
||||
<el-table-column label="合作开始日期" align="center" prop="cooperationStartDate">
|
||||
<template #default="scope">{{ formatDateOnly(scope.row.cooperationStartDate) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合作状态" align="center" prop="cooperationStatus">
|
||||
<template #default="scope">{{ formatOption(cooperationStatusOptions, scope.row.cooperationStatus) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="绑定渠道ID" align="center" prop="channelIds" />
|
||||
<el-table-column label="备注说明" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
@@ -659,6 +666,36 @@ const attachmentTypeOptions = ref([
|
||||
{ value: "2", label: "合同文件" },
|
||||
{ value: "3", label: "其他" }
|
||||
])
|
||||
const supplierTypeOptions = ref([
|
||||
{ value: "0", label: "生产商" },
|
||||
{ value: "1", label: "代理商" },
|
||||
{ value: "2", label: "个人" },
|
||||
{ value: "3", label: "物流商" },
|
||||
{ value: "4", label: "其他" }
|
||||
])
|
||||
const settlementTypeOptions = ref([
|
||||
{ value: "0", label: "月结" },
|
||||
{ value: "1", label: "周结" },
|
||||
{ value: "2", label: "日结" },
|
||||
{ value: "3", label: "票结" }
|
||||
])
|
||||
const cooperationStatusOptions = ref([
|
||||
{ value: "0", label: "正常" },
|
||||
{ value: "1", label: "暂停" },
|
||||
{ value: "2", label: "终止" }
|
||||
])
|
||||
|
||||
function formatOption(options, value) {
|
||||
if (value === null || value === undefined || value === '') return ''
|
||||
const opt = options.find(o => String(o.value) === String(value))
|
||||
return opt ? opt.label : value
|
||||
}
|
||||
|
||||
function formatDateOnly(value) {
|
||||
if (!value) return ''
|
||||
const s = String(value)
|
||||
return s.length > 10 ? s.substring(0, 10) : s
|
||||
}
|
||||
const ATTACHMENT_SIZE_LIMIT = 50
|
||||
const ATTACHMENT_EXTENSIONS = ["pdf", "jpg", "jpeg", "png", "doc", "docx", "xls", "xlsx", "zip", "rar"]
|
||||
|
||||
@@ -696,7 +733,7 @@ function handleAttachmentUploadSuccess(res, file) {
|
||||
if (res.code === 200) {
|
||||
form.value.attachmentList.push({
|
||||
attachmentId: null,
|
||||
customerId: form.value.supplierId || null,
|
||||
supplierId: form.value.supplierId || null,
|
||||
fileName: file.name,
|
||||
filePath: res.fileName,
|
||||
fileSize: file.size,
|
||||
@@ -913,7 +950,7 @@ const companyEditingIndex = ref(-1)
|
||||
function resetCompanyForm() {
|
||||
companyForm.value = {
|
||||
companyId: null,
|
||||
customerId: null,
|
||||
supplierId: null,
|
||||
companyNameFull: '',
|
||||
englishName: '',
|
||||
creditCode: '',
|
||||
|
||||
Reference in New Issue
Block a user