物业之前,新工作台
This commit is contained in:
@@ -103,6 +103,7 @@ const formRef = ref();
|
||||
const form = ref({
|
||||
id: null,
|
||||
cardCode: '', // 月卡编号
|
||||
villageId: Number(localStorage.getItem('villageid')), // 月卡编号
|
||||
cardName: null, // 持卡人姓名
|
||||
phone: '', // 手机号
|
||||
carNum: null, // 绑定车牌号
|
||||
@@ -170,18 +171,17 @@ if (route.query.id) {
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
form.value.villageId = Number(localStorage.getItem('villageid'));
|
||||
if (!form.value.startTime.trim() || !form.value.endTime.trim()) {
|
||||
ElMessage.warning('请选择有效日期');
|
||||
}
|
||||
if (userid.value) {
|
||||
updateMonthCard(form.value).then((res) => {
|
||||
console.log(res);
|
||||
ElMessage.success('编辑成功');
|
||||
cancelForm();
|
||||
});
|
||||
} else {
|
||||
addMonthCard(form.value).then((res) => {
|
||||
console.log(res);
|
||||
ElMessage.success('添加成功');
|
||||
|
||||
cancelForm();
|
||||
|
||||
Reference in New Issue
Block a user