This commit is contained in:
zlwu committed 2026-08-21 16:50:47 +08:00
1 parent 6dc8cfb2c1
commit d26fb23fcf
181 files changed
+25727 -24557

No files matched your search

@@ -252,7 +252,7 @@
v-model:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next"
:page-sizes="[10, 20, 30]"
:page-sizes="[10, 20, 100, 500]"
@size-change="onSizeChange"
/>
</div>
@@ -182,7 +182,7 @@
v-model:page-size="pendingPageSize"
:total="pendingTotal"
layout="total, sizes, prev, pager, next"
:page-sizes="[10, 20, 30]"
:page-sizes="[10, 20, 100, 500]"
@size-change="onPendingSizeChange"
/>
</div>
@@ -364,7 +364,7 @@
v-model:page-size="approvedPageSize"
:total="approvedTotal"
layout="total, sizes, prev, pager, next"
:page-sizes="[10, 20, 30]"
:page-sizes="[10, 20, 100, 500]"
@size-change="onApprovedSizeChange"
/>
</div>
@@ -201,7 +201,7 @@
v-model:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next"
:page-sizes="[10, 20, 30]"
:page-sizes="[10, 20, 100, 500]"
@size-change="onSizeChange"
/>
</div>
@@ -399,7 +399,7 @@
v-model:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next"
:page-sizes="[10, 20, 30]"
:page-sizes="[10, 20, 100, 500]"
@size-change="onSizeChange"
/>
</div>
@@ -93,7 +93,7 @@
v-model:current-page="page"
v-model:page-size="pageSize"
:total="total"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
background
@size-change="handleSearch"
+3 -3
View File
@@ -194,7 +194,7 @@
v-model:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next"
:page-sizes="[10, 20, 30]"
:page-sizes="[10, 20, 100, 500]"
@size-change="onSizeChange"
/>
</div>
@@ -409,7 +409,7 @@
v-model:page-size="processedPageSize"
:total="processedTotal"
layout="total, sizes, prev, pager, next"
:page-sizes="[10, 20, 30]"
:page-sizes="[10, 20, 100, 500]"
@size-change="processedOnSizeChange"
/>
</div>
@@ -581,7 +581,7 @@
v-model:page-size="offsetAdvancePageSize"
:total="offsetAdvanceTotal"
layout="total, sizes, prev, pager, next"
:page-sizes="[5, 10, 20]"
:page-sizes="[10, 20, 100, 500]"
@current-change="fetchOffsetAdvances"
@size-change="handleOffsetAdvanceSizeChange"
/>
@@ -341,7 +341,7 @@
v-model:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next"
:page-sizes="[10, 20, 30, 50, 100, 200, 500]"
:page-sizes="[10, 20, 100, 500]"
@size-change="onSizeChange"
/>
</div>
@@ -231,7 +231,7 @@
v-model:page-size="pendingPageSize"
:total="pendingTotal"
layout="total, sizes, prev, pager, next"
:page-sizes="[10, 20, 30]"
:page-sizes="[10, 20, 100, 500]"
@size-change="onPendingSizeChange"
/>
</div>
@@ -462,7 +462,7 @@
v-model:page-size="approvedPageSize"
:total="approvedTotal"
layout="total, sizes, prev, pager, next"
:page-sizes="[10, 20, 30]"
:page-sizes="[10, 20, 100, 500]"
@size-change="onApprovedSizeChange"
/>
</div>
+1 -1
View File
@@ -227,7 +227,7 @@
v-model:page-size="pager.pageSize.value"
:total="pager.total.value"
layout="total, sizes, prev, pager, next"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
@size-change="pager.onSizeChange"
/>
</div>
+1 -1
View File
@@ -216,7 +216,7 @@
v-model:page-size="pageSize"
:total="filteredTotal"
layout="total, sizes, prev, pager, next"
:page-sizes="[10, 20, 30]"
:page-sizes="[10, 20, 100, 500]"
@size-change="onSizeChange"
/>
</div>
+1 -1
View File
@@ -231,7 +231,7 @@
v-model:page-size="pageSize"
:total="filteredTotal"
layout="total, sizes, prev, pager, next"
:page-sizes="[10, 20, 30]"
:page-sizes="[10, 20, 100, 500]"
@size-change="onSizeChange"
/>
</div>
@@ -117,7 +117,7 @@
v-model:current-page="followQuery.pageNum"
v-model:page-size="followQuery.pageSize"
:total="followTotal"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="getFollowList"
@current-change="getFollowList"
+6 -47
View File
@@ -84,21 +84,11 @@
</el-select>
</el-form-item>
<el-form-item label="所在园区" prop="parkArea">
<el-select
<DictSelect
v-model="form.parkArea"
dict-type="crm_customer_park"
placeholder="请选择或输入所在园区"
clearable
filterable
allow-create
default-first-option
>
<el-option
v-for="opt in parkAreaOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value"
/>
</el-select>
/>
</el-form-item>
<el-form-item label="省份" prop="province">
<el-input v-model="form.province" placeholder="请输入省份" maxlength="50" />
@@ -176,10 +166,11 @@
<script setup lang="ts">
import { Close, Check } from '@element-plus/icons-vue'
import { getClue, addClue, updateClue, checkDuplicateClue, getParkAreaList } from '@/api/crm/clue'
import { getClue, addClue, updateClue, checkDuplicateClue } from '@/api/crm/clue'
import type { ClueForm as ClueFormType } from '@/api/crm/clue/types'
import { fetchUserOptions } from '@/api/admin'
import { useDictStore } from '@/store/modules/dict'
import DictSelect from '@/components/DictSelect/index.vue'
import { useUserStore } from '@/store/modules/user'
const dictStore = useDictStore()
@@ -224,27 +215,6 @@
})
const userList = ref<any[]>([])
const extraParkAreas = ref<string[]>([])
const parkAreaOptions = computed(() => {
const dictOpts = dictStore.getOptions('crm_customer_park')
const seen = new Set(dictOpts.map((opt) => opt.value))
const options = [...dictOpts]
for (const area of extraParkAreas.value) {
if (area && !seen.has(area)) {
options.push({ label: area, value: area, tagType: 'info' })
seen.add(area)
}
}
const current = form.value.parkArea?.trim()
if (current && !seen.has(current)) {
options.push({ label: current, value: current, tagType: 'info' })
}
return options
})
const dialog = reactive({ visible: false, title: '' })
const submitting = ref(false)
@@ -266,7 +236,7 @@
const open = async (id?: string | number) => {
reset()
dialog.visible = true
await Promise.all([loadUserList(), loadParkAreaList()])
await loadUserList()
if (id) {
dialog.title = '修改线索'
@@ -301,16 +271,6 @@
}
}
const loadParkAreaList = async () => {
try {
const res = await getParkAreaList()
const list = (res as any)?.data ?? res ?? []
extraParkAreas.value = Array.isArray(list) ? list.filter(Boolean) : []
} catch (error) {
console.error(error)
extraParkAreas.value = []
}
}
const submitForm = () => {
formRef.value?.validate(async (valid: boolean) => {
@@ -385,7 +345,6 @@
remark: undefined
}
submitting.value = false
extraParkAreas.value = []
formRef.value?.resetFields()
}
+1 -1
View File
@@ -402,7 +402,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
background
@size-change="getList"
@@ -478,7 +478,7 @@
v-model:current-page="queryParams.pageNum"
v-model:page-size="queryParams.pageSize"
:total="total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
@size-change="getList"
@current-change="getList"
@@ -173,7 +173,7 @@
<el-pagination
v-model:current-page="queryParams.pageNum"
v-model:page-size="queryParams.pageSize"
:page-sizes="[10, 20, 30, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
@size-change="getList"
@@ -241,7 +241,7 @@
<el-pagination
v-model:current-page="queryParams.pageNum"
v-model:page-size="queryParams.pageSize"
:page-sizes="[10, 20, 30, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
@size-change="getList"
@@ -426,16 +426,13 @@
</el-table-column>
<el-table-column label="单位" prop="unit" width="100" align="center">
<template #default="scope">
<el-select
<DictSelect
v-model="scope.row.unit"
dict-type="crm_product_unit"
placeholder="请选择单位"
clearable
size="small"
style="width: 100%"
@change="handleUnitChange(scope.row)"
>
<el-option v-for="dict in dictStore.getOptions('crm_product_unit')" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
/>
</template>
</el-table-column>
<el-table-column prop="quantity" width="130">
@@ -574,27 +571,25 @@
<el-table-column prop="packageSpec" min-width="150">
<template #header> <span style="color: #f56c6c">*</span> 包装规格</template>
<template #default="scope">
<el-select
<DictSelect
v-model="scope.row.packageSpec"
dict-type="crm_product_gg"
placeholder="请选择包装规格"
filterable
allow-create
default-first-option
clearable
size="small"
style="width: 100%"
@change="handlePackageSpecChange(scope.row, $event)"
>
<el-option v-for="dict in dictStore.getOptions('crm_product_gg')" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
/>
</template>
</el-table-column>
<el-table-column prop="deliveryMethod" min-width="150">
<template #header> <span style="color: #f56c6c">*</span> 送货方式</template>
<template #default="scope">
<el-select v-model="scope.row.deliveryMethod" placeholder="请选择送货方式" clearable size="small" style="width: 100%">
<el-option v-for="dict in dictStore.getOptions('crm_shfs')" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
<DictSelect
v-model="scope.row.deliveryMethod"
dict-type="crm_shfs"
placeholder="请选择送货方式"
size="small"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" min-width="160">
@@ -831,7 +826,7 @@ import {
type ContractProductForm,
type ContractProductPriceTierForm
} from '@/api/crm/contract/index'
import { isFrameworkContractType } from '../contractType'
import { isFrameworkContractType, isPurchaseLikeContractType } from '../contractType'
import {
FRAMEWORK_QUANTITY_LABEL,
FRAMEWORK_PRICE_LABEL,
@@ -879,6 +874,7 @@ import { getOpportunity } from '@/api/crm/opportunity'
import { getQuote } from '@/api/crm/quote'
import ProductSelector from '@/components/business/product-selector/index.vue'
import ProductAliasBrandDialog from '@/components/business/product-alias-brand-dialog/index.vue'
import DictSelect from '@/components/DictSelect/index.vue'
import CustomerSelector from '@/components/CustomerSelector.vue'
import ContactSelector from '@/components/ContactSelector.vue'
import ContactFormDialog from '@/views/crm/customer/components/ContactFormDialog.vue'
@@ -2268,9 +2264,9 @@ const handleContractTypeChange = (value: string) => {
})
calculateTotalAmount()
}
if (value === 'purchase' && !isPartiesSwapped.value) {
if (isPurchaseLikeContractType(value) && !isPartiesSwapped.value) {
$modal
.confirm('检测到您选择了采购合同,系统将自动调换供需方信息,是否继续?')
.confirm('检测到您选择了采购类合同,系统将自动调换供需方信息,是否继续?')
.then(async () => {
await handleSwapParties()
})
@@ -2502,16 +2498,6 @@ const handleTaxRateChange = (row: ExtendedContractProductForm) => {
calculateTotalAmount()
}
/** 单位变化 */
const handleUnitChange = (_row: ExtendedContractProductForm) => {
// 单位变化通常不需要重新计算金额
}
/** 包装规格变更处理 */
const handlePackageSpecChange = (product: ExtendedContractProductForm, value: string) => {
product.packageSpec = value
}
const handleEnableFrameworkQuantityFixed = (row: ExtendedContractProductForm) => {
enableFrameworkQuantityFixed(row)
calculateProductAmount(row)
@@ -11,6 +11,15 @@ export function isFrameworkContractType(type?: string | null): boolean {
return FRAMEWORK_CONTRACT_TYPES.includes((type || '').trim() as FrameworkContractType)
}
/** 采购类合同(含框架采购):选择后需提示并调换供需方 */
export const PURCHASE_LIKE_CONTRACT_TYPES = ['purchase', 'framework_purchase'] as const
export type PurchaseLikeContractType = (typeof PURCHASE_LIKE_CONTRACT_TYPES)[number]
export function isPurchaseLikeContractType(type?: string | null): boolean {
return PURCHASE_LIKE_CONTRACT_TYPES.includes((type || '').trim() as PurchaseLikeContractType)
}
/** 允许打开编辑的合同状态(保存后回草稿) */
export const CONTRACT_EDITABLE_STATUSES = ['draft', 'approving', 'approved'] as const
+18 -33
View File
@@ -292,16 +292,13 @@
</el-table-column>
<el-table-column label="单位" prop="unit" width="100" align="center">
<template #default="scope">
<el-select
<DictSelect
v-model="scope.row.unit"
dict-type="crm_product_unit"
placeholder="请选择单位"
clearable
size="small"
style="width: 100%"
@change="handleUnitChange(scope.row)"
>
<el-option v-for="dict in dictStore.getOptions('crm_product_unit')" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
/>
</template>
</el-table-column>
<el-table-column prop="quantity" width="130">
@@ -370,27 +367,25 @@
<el-table-column prop="packageSpec" min-width="150">
<template #header> <span style="color: #f56c6c">*</span> 包装规格</template>
<template #default="scope">
<el-select
<DictSelect
v-model="scope.row.packageSpec"
dict-type="crm_product_gg"
placeholder="请选择包装规格"
filterable
allow-create
default-first-option
clearable
size="small"
style="width: 100%"
@change="(val) => handlePackageSpecChange(scope.row, val)"
>
<el-option v-for="dict in dictStore.getOptions('crm_product_gg')" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
/>
</template>
</el-table-column>
<el-table-column prop="deliveryMethod" min-width="150">
<template #header> <span style="color: #f56c6c">*</span> 送货方式</template>
<template #default="scope">
<el-select v-model="scope.row.deliveryMethod" placeholder="请选择送货方式" clearable size="small" style="width: 100%">
<el-option v-for="dict in dictStore.getOptions('crm_shfs')" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
<DictSelect
v-model="scope.row.deliveryMethod"
dict-type="crm_shfs"
placeholder="请选择送货方式"
size="small"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" min-width="160">
@@ -546,7 +541,7 @@ import {
type ContractProductForm,
type ContractProductPriceTierForm
} from '@/api/crm/contract/index';
import { isFrameworkContractType } from './contractType';
import { isFrameworkContractType, isPurchaseLikeContractType } from './contractType';
import {
FRAMEWORK_QUANTITY_LABEL,
FRAMEWORK_PRICE_LABEL,
@@ -579,6 +574,7 @@ import AttachmentUploadField from '@/components/business/attachment-upload-field
import { getOpportunity } from '@/api/crm/opportunity';
import { getQuote } from '@/api/crm/quote';
import ProductSelector from '@/components/business/product-selector/index.vue';
import DictSelect from '@/components/DictSelect/index.vue'
import CustomerSelector from '@/components/CustomerSelector.vue';
import ContactSelector from '@/components/ContactSelector.vue';
import QuoteSelector from '@/components/QuoteSelector.vue';
@@ -1409,10 +1405,10 @@ const handleContractTypeChange = (value: string) => {
});
calculateTotalAmount();
}
// 当选择采购合同时,自动调换供需方
if (value === 'purchase' && !isPartiesSwapped.value) {
// 当选择采购类合同时,自动调换供需方
if (isPurchaseLikeContractType(value) && !isPartiesSwapped.value) {
$modal
.confirm('检测到您选择了采购合同,系统将自动调换供需方信息,是否继续?')
.confirm('检测到您选择了采购类合同,系统将自动调换供需方信息,是否继续?')
.then(() => {
handleSwapParties();
})
@@ -1596,17 +1592,6 @@ const handleTaxRateChange = (row: ExtendedContractProductForm) => {
calculateTotalAmount();
};
/** 单位变化 */
const handleUnitChange = (row: ExtendedContractProductForm) => {
// 单位变化通常不需要重新计算金额,但可以在这里添加其他逻辑
// 例如:记录变更日志、验证单位有效性等
};
/** 包装规格变更处理(支持自由输入并写入字典) */
const handlePackageSpecChange = (product: ExtendedContractProductForm, value: string) => {
product.packageSpec = value;
};
const handleEnableFrameworkQuantityFixed = (row: ExtendedContractProductForm) => {
enableFrameworkQuantityFixed(row);
calculateProductAmount(row);
@@ -186,7 +186,7 @@
<el-pagination
v-model:current-page="queryParams.pageNum"
v-model:page-size="queryParams.pageSize"
:page-sizes="[10, 20, 30, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
@size-change="getList"
@@ -100,7 +100,7 @@
v-model:current-page="followQuery.pageNum"
v-model:page-size="followQuery.pageSize"
:total="followTotal"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="getFollowList"
@current-change="getFollowList"
@@ -430,7 +430,7 @@
v-model:current-page="logQuery.pageNum"
v-model:page-size="logQuery.pageSize"
:total="logTotal"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="() => getOperLogList(false)"
@current-change="() => getOperLogList(false)"
@@ -104,21 +104,11 @@
</el-select>
</el-form-item>
<el-form-item label="所在园区" prop="parkArea">
<el-select
<DictSelect
v-model="form.parkArea"
dict-type="crm_customer_park"
placeholder="请选择或输入所在园区"
clearable
filterable
allow-create
default-first-option
>
<el-option
v-for="opt in parkAreaOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value"
/>
</el-select>
/>
</el-form-item>
<el-form-item label="企业规模" prop="scale">
<el-select v-model="form.scale" placeholder="请选择企业规模" clearable>
@@ -323,15 +313,14 @@
</template>
<script setup lang="ts">
import { ref, reactive, computed, nextTick } from 'vue'
import { ref, reactive, nextTick } from 'vue'
import { Close, Check, Refresh, DocumentCopy, Delete } from '@element-plus/icons-vue'
import type { FormItemRule } from 'element-plus'
import { ElMessage } from 'element-plus'
import {
fetchCustomerDetail,
fetchCreateCustomer,
fetchUpdateCustomer,
fetchParkAreaList
fetchUpdateCustomer
} from '@/api/crm/customer'
import type { CustomerForm as CustomerFormType } from '@/api/crm/customerTypes'
import { addInvoiceInfo } from '@/api/crm/invoiceInfo'
@@ -341,6 +330,7 @@ import {
mergeInvoiceRemark
} from '@/utils/crm-invoice-paste-recognize'
import { useDictStore } from '@/store/modules/dict'
import DictSelect from '@/components/DictSelect/index.vue'
import { useUserStore } from '@/store/modules/user'
import { fetchUserOptions } from '@/api/admin'
import AttachmentUploadField from '@/components/business/attachment-upload-field/index.vue'
@@ -402,7 +392,6 @@ const rules = ref<Record<string, FormItemRule[]>>({
// 用户列表
const userList = ref<any[]>([])
const extraParkAreas = ref<string[]>([])
const invoiceForm = ref<InvoiceInfoForm>({
companyName: '',
@@ -416,25 +405,6 @@ const invoiceForm = ref<InvoiceInfoForm>({
remark: ''
})
const parkAreaOptions = computed(() => {
const dictOpts = dictStore.getOptions('crm_customer_park')
const seen = new Set(dictOpts.map((opt) => opt.value))
const options = [...dictOpts]
for (const area of extraParkAreas.value) {
if (area && !seen.has(area)) {
options.push({ label: area, value: area, tagType: 'info' })
seen.add(area)
}
}
const current = form.value.parkArea?.trim()
if (current && !seen.has(current)) {
options.push({ label: current, value: current, tagType: 'info' })
}
return options
})
// 对话框
const dialog = reactive({
@@ -482,17 +452,6 @@ const applyDefaultOwnerUserId = async () => {
form.value.ownerUserId = defaultOwnerUserId as CustomerFormType['ownerUserId']
}
/** 加载历史园区列表 */
const loadParkAreaList = async () => {
try {
const res = await fetchParkAreaList()
const list = unwrapApiData(res as string[] | { data?: string[] })
extraParkAreas.value = Array.isArray(list) ? list.filter(Boolean) : []
} catch (error) {
console.error(error)
extraParkAreas.value = []
}
}
function hasInvoiceInfoFilled() {
const inv = invoiceForm.value
@@ -601,7 +560,7 @@ const open = async (id?: number | string) => {
reset()
dialog.visible = true
await Promise.all([loadUserList(), loadParkAreaList()])
await loadUserList()
if (id) {
dialog.title = '修改客户'
+1 -1
View File
@@ -615,7 +615,7 @@
<el-pagination
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:page-sizes="[10, 20, 30, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total"
@size-change="getList"
@@ -210,7 +210,7 @@
<el-pagination
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:page-sizes="[10, 20, 30, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total"
@size-change="getList"
@@ -506,7 +506,7 @@
<el-pagination
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:page-sizes="[10, 20, 30, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total"
@size-change="getList"
@@ -454,7 +454,7 @@
v-model:current-page="queryParams.pageNum"
v-model:page-size="queryParams.pageSize"
:total="total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
background
@size-change="getList"
@@ -249,7 +249,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
background
@size-change="getList"
+1 -1
View File
@@ -275,7 +275,7 @@
<el-pagination
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:page-sizes="[10, 20, 30, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total"
@size-change="handlePageSizeChange"
@@ -443,7 +443,7 @@
v-model:current-page="queryParams.pageNum"
v-model:page-size="queryParams.pageSize"
:total="total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
@size-change="getList"
@current-change="getList"
@@ -275,18 +275,13 @@
</el-table-column>
<el-table-column label="单位" prop="unit" width="100" align="center">
<template #default="scope">
<el-select
<DictSelect
v-model="scope.row.unit"
dict-type="crm_product_unit"
placeholder="请选择单位"
filterable
allow-create
default-first-option
size="small"
style="width: 100%"
@change="(val) => handleUnitChange(scope.row, val)"
>
<el-option v-for="dict in dictStore.getOptions('crm_product_unit')" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
/>
</template>
</el-table-column>
<el-table-column prop="quantity" width="110">
@@ -321,27 +316,25 @@
<el-table-column prop="packageSpec" min-width="150">
<template #header> <span style="color: #f56c6c">*</span> 包装规格</template>
<template #default="scope">
<el-select
<DictSelect
v-model="scope.row.packageSpec"
dict-type="crm_product_gg"
placeholder="请选择包装规格"
filterable
allow-create
default-first-option
clearable
size="small"
style="width: 100%"
@change="(val) => handlePackageSpecChange(scope.row, val)"
>
<el-option v-for="dict in dictStore.getOptions('crm_product_gg')" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
/>
</template>
</el-table-column>
<el-table-column prop="deliveryMethod" min-width="150">
<template #header> <span style="color: #f56c6c">*</span> 送货方式</template>
<template #default="scope">
<el-select v-model="scope.row.deliveryMethod" placeholder="请选择送货方式" clearable size="small" style="width: 100%">
<el-option v-for="dict in dictStore.getOptions('crm_shfs')" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
<DictSelect
v-model="scope.row.deliveryMethod"
dict-type="crm_shfs"
placeholder="请选择送货方式"
size="small"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column label="操作" min-width="80" align="center" header-align="center" fixed="right" class-name="col-actions">
@@ -654,6 +647,7 @@ import {
import ImagePreview from '@/components/ImagePreview/index.vue';
import ProductSelector from '@/components/business/product-selector/index.vue';
import ProductAliasBrandDialog from '@/components/business/product-alias-brand-dialog/index.vue'
import DictSelect from '@/components/DictSelect/index.vue'
import CustomerSelector from '@/components/CustomerSelector.vue';
import ContactSelector from '@/components/ContactSelector.vue';
import ContactFormDialog from '@/views/crm/customer/components/ContactFormDialog.vue'
@@ -1833,16 +1827,6 @@ const normalizeTaxRateDisplay = (value: any, defaultValue = 0): number => {
return Number.isInteger(num) ? num : parseFloat(num.toString());
};
/** 单位变更处理(支持自由输入并写入字典) */
const handleUnitChange = (product: QuoteProductForm, value: string) => {
product.unit = value;
};
/** 包装规格变更处理(支持自由输入并写入字典) */
const handlePackageSpecChange = (product: QuoteProductForm, value: string) => {
product.packageSpec = value;
};
/** 单价变更 */
const handlePriceChange = (product: QuoteProductForm) => {
calculateProductAmount(product);
@@ -67,7 +67,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
background
@size-change="loadData"
+1 -1
View File
@@ -376,7 +376,7 @@
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:total="total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handlePageChange"
@size-change="handleSizeChange"
+1 -1
View File
@@ -310,7 +310,7 @@
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:total="total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
@current-change="loadData"
@size-change="loadData"
+1 -1
View File
@@ -326,7 +326,7 @@
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:total="total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handlePageChange"
@size-change="handleSizeChange"
+1 -1
View File
@@ -303,7 +303,7 @@
:current-page="pagination.page"
:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
@update:current-page="
(v) => {
+1 -1
View File
@@ -228,7 +228,7 @@
:current-page="pagination.page"
:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
@update:current-page="(val) => (pagination.page = val)"
@update:page-size="(val) => (pagination.pageSize = val)"
+1 -1
View File
@@ -134,7 +134,7 @@
:current-page="pagination.page"
:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="(val) => ((pagination.page = 1), (pagination.pageSize = val), loadData())"
@current-change="(val) => ((pagination.page = val), loadData())"
@@ -223,7 +223,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
@current-change="fetchData"
@size-change="fetchData"
+1 -1
View File
@@ -189,7 +189,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handlePageChange"
+1 -1
View File
@@ -163,7 +163,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handlePageChange"
@@ -154,7 +154,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handlePageChange"
@@ -166,7 +166,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handlePageChange"
@@ -143,7 +143,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handlePageChange"
@@ -136,7 +136,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handlePageChange"
@@ -256,7 +256,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handlePageChange"
@@ -199,7 +199,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handlePageChange"
+1 -1
View File
@@ -163,7 +163,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handlePageChange"
+1 -1
View File
@@ -262,7 +262,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handlePageChange"
@@ -175,9 +175,7 @@
align="center"
>
<template #default="{ row }">
<el-tag :type="getPlanTypeTagType(row.planType)" size="small">
{{ getPlanTypeLabel(row.planType) }}
</el-tag>
{{ getPlanTypeLabel(row.planType) }}
</template>
</el-table-column>
<el-table-column
@@ -316,7 +314,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handlePageChange"
@@ -517,11 +515,6 @@ const pagination = reactive({
total: 0
})
function getPlanTypeTagType(type: string) {
const map: Record<string, string> = { direct: 'primary', inbound: 'success', outbound: 'warning' }
return map[type] || 'info'
}
function getPlanTypeLabel(type: string) {
const map: Record<string, string> = { direct: '直销单', inbound: '入库单', outbound: '出库单' }
return map[type] || type
+2 -9
View File
@@ -209,9 +209,7 @@
align="center"
>
<template #default="{ row }">
<el-tag :type="getPlanTypeTagType(row.planType)" size="small">
{{ getPlanTypeLabel(row.planType) }}
</el-tag>
{{ getPlanTypeLabel(row.planType) }}
</template>
</el-table-column>
<el-table-column
@@ -351,7 +349,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handlePageChange"
@@ -499,11 +497,6 @@ const pagination = reactive({
total: 0
})
function getPlanTypeTagType(type: string) {
const map: Record<string, string> = { direct: 'primary', inbound: 'success', outbound: 'warning' }
return map[type] || 'info'
}
function getPlanTypeLabel(type: string) {
const map: Record<string, string> = { direct: '直销单', inbound: '入库单', outbound: '出库单' }
return map[type] || type
@@ -318,7 +318,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
background
@current-change="handlePageChange"
+1 -1
View File
@@ -431,7 +431,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handlePageChange"
@@ -237,7 +237,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handlePageChange"
@@ -160,7 +160,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handlePageChange"
@size-change="handleSizeChange"
+1 -1
View File
@@ -204,7 +204,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handlePageChange"
@@ -219,7 +219,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="fetchData"
@current-change="fetchData"
@@ -265,7 +265,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="fetchData"
@current-change="fetchData"
@@ -189,7 +189,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="fetchData"
@current-change="fetchData"
@@ -270,7 +270,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="fetchData"
@current-change="fetchData"
@@ -204,7 +204,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="fetchData"
@current-change="fetchData"
@@ -250,7 +250,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="fetchData"
@current-change="fetchData"
+1 -1
View File
@@ -244,7 +244,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handlePageChange"
+2 -2
View File
@@ -148,7 +148,7 @@
:current-page="pagination.page"
:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="(val) => ((pagination.page = 1), (pagination.pageSize = val), loadData())"
@current-change="(val) => ((pagination.page = val), loadData())"
@@ -419,7 +419,7 @@
:current-page="dictDataPagination.page"
:page-size="dictDataPagination.pageSize"
:total="dictDataPagination.total"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="
(val) => (
+1 -1
View File
@@ -181,7 +181,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="loadData"
@current-change="loadData"
+1 -1
View File
@@ -166,7 +166,7 @@
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
@size-change="fetchList"
@current-change="fetchList"
+1 -1
View File
@@ -155,7 +155,7 @@
:current-page="pagination.page"
:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="(val) => ((pagination.page = 1), (pagination.pageSize = val), loadData())"
@current-change="(val) => ((pagination.page = val), loadData())"
+1 -1
View File
@@ -172,7 +172,7 @@
:current-page="pagination.page"
:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="
(val: number) => ((pagination.page = 1), (pagination.pageSize = val), loadData())
+1 -1
View File
@@ -172,7 +172,7 @@
:current-page="pagination.page"
:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="(val) => ((pagination.page = 1), (pagination.pageSize = val), loadData())"
@current-change="(val) => ((pagination.page = val), loadData())"
+1 -1
View File
@@ -177,7 +177,7 @@
:current-page="pagination.page"
:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="(val) => ((pagination.page = 1), (pagination.pageSize = val), loadData())"
@current-change="(val) => ((pagination.page = val), loadData())"
+1 -1
View File
@@ -229,7 +229,7 @@
:current-page="pagination.page"
:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="
(val: number) => ((pagination.page = 1), (pagination.pageSize = val), loadData())
@@ -134,7 +134,7 @@
:current-page="pagination.page"
:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="(val) => ((pagination.page = 1), (pagination.pageSize = val), loadData())"
@current-change="(val) => ((pagination.page = val), loadData())"
@@ -174,7 +174,7 @@
:current-page="pagination.page"
:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="(val) => ((pagination.page = 1), (pagination.pageSize = val), loadData())"
@current-change="(val) => ((pagination.page = val), loadData())"
@@ -137,7 +137,7 @@
:current-page="pagination.page"
:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="(val) => ((pagination.page = 1), (pagination.pageSize = val), loadData())"
@current-change="(val) => ((pagination.page = val), loadData())"
@@ -132,7 +132,7 @@
:current-page="pagination.page"
:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 50]"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next"
@size-change="(val) => ((pagination.page = 1), (pagination.pageSize = val), loadData())"
@current-change="(val) => ((pagination.page = val), loadData())"