8/4 更新 输入限制,修复收银台
This commit is contained in:
@@ -116,7 +116,6 @@ const uploadUrl = import.meta.env.VITE_APP_BASE_API + '/car/uploadImage';
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const formRef = ref();
|
||||
const carNumInputRef = ref();
|
||||
const form = ref({
|
||||
id: null,
|
||||
areaId: null, // 区域id
|
||||
@@ -158,9 +157,6 @@ const rules = ref({
|
||||
],
|
||||
carBrand: [{ required: false, message: '请输入车辆品牌', trigger: 'blur' }]
|
||||
});
|
||||
function handleValidate() {
|
||||
formRef.value.validateField('carNum');
|
||||
}
|
||||
function headerToken() {
|
||||
const useStore = useUserStore();
|
||||
return {
|
||||
@@ -168,7 +164,7 @@ function headerToken() {
|
||||
};
|
||||
}
|
||||
const userid = ref('');
|
||||
const allowImgSuffix = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'heic'];
|
||||
const allowImgSuffix = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];
|
||||
const beforeAvatarUpload: UploadProps['beforeUpload'] = (rawFile: UploadRawFile) => {
|
||||
const type = rawFile.type.split('/').pop();
|
||||
if (allowImgSuffix.includes(type)) {
|
||||
@@ -224,12 +220,6 @@ function changeAreaList(val: string) {
|
||||
// !== 提交 =============================================================================
|
||||
// 提交
|
||||
const submitForm = () => {
|
||||
const plateResult = carNumInputRef.value.validate();
|
||||
if (!plateResult.valid) {
|
||||
// 自动聚焦到错误字段
|
||||
carNumInputRef.value.focus();
|
||||
return;
|
||||
}
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
if (userid.value.trim() !== '') {
|
||||
|
||||
Reference in New Issue
Block a user