|
@@ -21,16 +21,52 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
const config = common_vendor.ref({});
|
|
const config = common_vendor.ref({});
|
|
const agree = common_vendor.ref(false);
|
|
const agree = common_vendor.ref(false);
|
|
common_vendor.ref({});
|
|
common_vendor.ref({});
|
|
- const form = common_vendor.ref({ phone: "" });
|
|
|
|
- const rules = common_vendor.ref({
|
|
|
|
- phone: [
|
|
|
|
- {
|
|
|
|
- required: true,
|
|
|
|
- message: "请输入手机号",
|
|
|
|
- trigger: ["blur", "change"]
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
- });
|
|
|
|
|
|
+ const form = common_vendor.reactive({ bank: "", type: "", start: "", course: "", place: "", city: "", tel: "" });
|
|
|
|
+ const rules = {
|
|
|
|
+ "bank": {
|
|
|
|
+ type: "string",
|
|
|
|
+ required: true,
|
|
|
|
+ message: "请输入车辆车系",
|
|
|
|
+ trigger: ["blur", "change"]
|
|
|
|
+ },
|
|
|
|
+ "type": {
|
|
|
|
+ type: "string",
|
|
|
|
+ required: true,
|
|
|
|
+ message: "请输入车辆车型",
|
|
|
|
+ trigger: ["blur", "change"]
|
|
|
|
+ },
|
|
|
|
+ "start": {
|
|
|
|
+ type: "string",
|
|
|
|
+ required: true,
|
|
|
|
+ message: "请选择上牌日期",
|
|
|
|
+ trigger: ["blur", "change"]
|
|
|
|
+ },
|
|
|
|
+ "course": {
|
|
|
|
+ type: "string",
|
|
|
|
+ required: true,
|
|
|
|
+ message: "请选择行驶里程",
|
|
|
|
+ trigger: ["blur", "change"]
|
|
|
|
+ },
|
|
|
|
+ "place": {
|
|
|
|
+ type: "string",
|
|
|
|
+ required: true,
|
|
|
|
+ message: "请选择估值地区",
|
|
|
|
+ trigger: ["blur", "change"]
|
|
|
|
+ },
|
|
|
|
+ "city": {
|
|
|
|
+ type: "string",
|
|
|
|
+ required: true,
|
|
|
|
+ message: "请选择上牌城市",
|
|
|
|
+ trigger: ["blur", "change"]
|
|
|
|
+ },
|
|
|
|
+ "tel": {
|
|
|
|
+ type: "string",
|
|
|
|
+ required: true,
|
|
|
|
+ message: "请输入手机号",
|
|
|
|
+ trigger: ["blur", "change"]
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ const uForm = common_vendor.ref(null);
|
|
const courseList = common_vendor.ref([{ value: "1", label: "1万公里" }, { value: "2", label: "2万公里" }, { value: "3", label: "3万公里" }, { value: "4", label: "4万公里" }, { value: "5", label: "5万公里" }]);
|
|
const courseList = common_vendor.ref([{ value: "1", label: "1万公里" }, { value: "2", label: "2万公里" }, { value: "3", label: "3万公里" }, { value: "4", label: "4万公里" }, { value: "5", label: "5万公里" }]);
|
|
common_vendor.onLoad(async () => {
|
|
common_vendor.onLoad(async () => {
|
|
await searchConfig();
|
|
await searchConfig();
|
|
@@ -40,7 +76,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
form.value.brand = data;
|
|
form.value.brand = data;
|
|
});
|
|
});
|
|
common_vendor.index.$on("toCity", function(data) {
|
|
common_vendor.index.$on("toCity", function(data) {
|
|
- form.value.city = data;
|
|
|
|
|
|
+ form.value[data.field] = data;
|
|
});
|
|
});
|
|
});
|
|
});
|
|
const searchConfig = async () => {
|
|
const searchConfig = async () => {
|
|
@@ -56,7 +92,12 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
};
|
|
};
|
|
const toCity = () => {
|
|
const toCity = () => {
|
|
common_vendor.index.navigateTo({
|
|
common_vendor.index.navigateTo({
|
|
- url: `/pagesHome/city/index`
|
|
|
|
|
|
+ url: `/pagesHome/city/index?field=${"city"}`
|
|
|
|
+ });
|
|
|
|
+ };
|
|
|
|
+ const toPlace = () => {
|
|
|
|
+ common_vendor.index.navigateTo({
|
|
|
|
+ url: `/pagesHome/city/index?field=${"place"}`
|
|
});
|
|
});
|
|
};
|
|
};
|
|
const toSelect = () => {
|
|
const toSelect = () => {
|
|
@@ -66,10 +107,10 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
};
|
|
};
|
|
const toEvaluate = async () => {
|
|
const toEvaluate = async () => {
|
|
if (agree.value) {
|
|
if (agree.value) {
|
|
- $refs.form.validate().then((res) => {
|
|
|
|
- common_vendor.index.$u.toast("校验通过");
|
|
|
|
- }).catch((errors) => {
|
|
|
|
- common_vendor.index.$u.toast("校验失败");
|
|
|
|
|
|
+ uForm.value.validate().then((res) => {
|
|
|
|
+ console.log(res, "成功");
|
|
|
|
+ }).catch((err) => {
|
|
|
|
+ console.log(err, "校验失败");
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
common_vendor.index.showToast({
|
|
common_vendor.index.showToast({
|
|
@@ -89,8 +130,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
return (_ctx, _cache) => {
|
|
return (_ctx, _cache) => {
|
|
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
return common_vendor.e({
|
|
return common_vendor.e({
|
|
- a: !form.value.brand && !((_a2 = form.value.brand) == null ? void 0 : _a2.title)
|
|
|
|
- }, !form.value.brand && !((_b2 = form.value.brand) == null ? void 0 : _b2.title) ? {
|
|
|
|
|
|
+ a: !form.brand && !((_a2 = form.brand) == null ? void 0 : _a2.title)
|
|
|
|
+ }, !form.brand && !((_b2 = form.brand) == null ? void 0 : _b2.title) ? {
|
|
b: common_vendor.p({
|
|
b: common_vendor.p({
|
|
name: "plus-circle-fill",
|
|
name: "plus-circle-fill",
|
|
size: "20",
|
|
size: "20",
|
|
@@ -98,15 +139,15 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
}),
|
|
}),
|
|
c: common_vendor.o(toSelect)
|
|
c: common_vendor.o(toSelect)
|
|
} : {
|
|
} : {
|
|
- d: ((_c = form.value.brand) == null ? void 0 : _c.url) && ((_d = form.value.brand) == null ? void 0 : _d.url.length) > 0 ? (_e = form.value.brand) == null ? void 0 : _e.url[0].url : "/static/logo.png",
|
|
|
|
- e: common_vendor.t((_f = form.value.brand) == null ? void 0 : _f.title),
|
|
|
|
|
|
+ d: ((_c = form.brand) == null ? void 0 : _c.url) && ((_d = form.brand) == null ? void 0 : _d.url.length) > 0 ? (_e = form.brand) == null ? void 0 : _e.url[0].url : "/static/logo.png",
|
|
|
|
+ e: common_vendor.t((_f = form.brand) == null ? void 0 : _f.title),
|
|
f: common_vendor.p({
|
|
f: common_vendor.p({
|
|
name: "arrow-right"
|
|
name: "arrow-right"
|
|
}),
|
|
}),
|
|
g: common_vendor.o(toSelect)
|
|
g: common_vendor.o(toSelect)
|
|
}, {
|
|
}, {
|
|
- h: form.value.bank,
|
|
|
|
- i: common_vendor.o(($event) => form.value.bank = $event.detail.value),
|
|
|
|
|
|
+ h: form.bank,
|
|
|
|
+ i: common_vendor.o(($event) => form.bank = $event.detail.value),
|
|
j: common_vendor.p({
|
|
j: common_vendor.p({
|
|
name: "arrow-right"
|
|
name: "arrow-right"
|
|
}),
|
|
}),
|
|
@@ -114,8 +155,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
label: "车辆车系",
|
|
label: "车辆车系",
|
|
prop: "bank"
|
|
prop: "bank"
|
|
}),
|
|
}),
|
|
- l: form.value.type,
|
|
|
|
- m: common_vendor.o(($event) => form.value.type = $event.detail.value),
|
|
|
|
|
|
+ l: form.type,
|
|
|
|
+ m: common_vendor.o(($event) => form.type = $event.detail.value),
|
|
n: common_vendor.p({
|
|
n: common_vendor.p({
|
|
name: "arrow-right"
|
|
name: "arrow-right"
|
|
}),
|
|
}),
|
|
@@ -123,7 +164,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
label: "车辆车型",
|
|
label: "车辆车型",
|
|
prop: "type"
|
|
prop: "type"
|
|
}),
|
|
}),
|
|
- p: common_vendor.t(form.value.start || "请选择"),
|
|
|
|
|
|
+ p: common_vendor.t(form.start || "请选择"),
|
|
q: common_vendor.o(dateChange),
|
|
q: common_vendor.o(dateChange),
|
|
r: common_vendor.p({
|
|
r: common_vendor.p({
|
|
name: "arrow-right"
|
|
name: "arrow-right"
|
|
@@ -132,7 +173,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
label: "上牌日期",
|
|
label: "上牌日期",
|
|
prop: "start"
|
|
prop: "start"
|
|
}),
|
|
}),
|
|
- t: common_vendor.t(form.value.course || "请选择"),
|
|
|
|
|
|
+ t: common_vendor.t(form.course || "请选择"),
|
|
v: common_vendor.o(courseChange),
|
|
v: common_vendor.o(courseChange),
|
|
w: _ctx.index,
|
|
w: _ctx.index,
|
|
x: courseList.value,
|
|
x: courseList.value,
|
|
@@ -143,7 +184,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
label: "行驶里程",
|
|
label: "行驶里程",
|
|
prop: "course"
|
|
prop: "course"
|
|
}),
|
|
}),
|
|
- A: common_vendor.t(((_g = form.value.city) == null ? void 0 : _g.name) || "请选择"),
|
|
|
|
|
|
+ A: common_vendor.t(((_g = form.city) == null ? void 0 : _g.name) || "请选择"),
|
|
B: common_vendor.o(toCity),
|
|
B: common_vendor.o(toCity),
|
|
C: common_vendor.p({
|
|
C: common_vendor.p({
|
|
name: "arrow-right"
|
|
name: "arrow-right"
|
|
@@ -152,8 +193,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
label: "上牌城市",
|
|
label: "上牌城市",
|
|
prop: "city"
|
|
prop: "city"
|
|
}),
|
|
}),
|
|
- E: common_vendor.t(((_h = form.value.place) == null ? void 0 : _h.name) || "请选择"),
|
|
|
|
- F: common_vendor.o(toCity),
|
|
|
|
|
|
+ E: common_vendor.t(((_h = form.place) == null ? void 0 : _h.name) || "请选择"),
|
|
|
|
+ F: common_vendor.o(toPlace),
|
|
G: common_vendor.p({
|
|
G: common_vendor.p({
|
|
name: "arrow-right"
|
|
name: "arrow-right"
|
|
}),
|
|
}),
|
|
@@ -161,22 +202,24 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
label: "估值地区",
|
|
label: "估值地区",
|
|
prop: "place"
|
|
prop: "place"
|
|
}),
|
|
}),
|
|
- I: form.value.contacts,
|
|
|
|
- J: common_vendor.o(($event) => form.value.contacts = $event.detail.value),
|
|
|
|
|
|
+ I: form.contacts,
|
|
|
|
+ J: common_vendor.o(($event) => form.contacts = $event.detail.value),
|
|
K: common_vendor.p({
|
|
K: common_vendor.p({
|
|
label: "联系人",
|
|
label: "联系人",
|
|
prop: "contacts"
|
|
prop: "contacts"
|
|
}),
|
|
}),
|
|
- L: form.value.tel,
|
|
|
|
- M: common_vendor.o(($event) => form.value.tel = $event.detail.value),
|
|
|
|
|
|
+ L: form.tel,
|
|
|
|
+ M: common_vendor.o(($event) => form.tel = $event.detail.value),
|
|
N: common_vendor.p({
|
|
N: common_vendor.p({
|
|
label: "联系电话",
|
|
label: "联系电话",
|
|
prop: "tel"
|
|
prop: "tel"
|
|
}),
|
|
}),
|
|
- O: common_vendor.sr("uForm", "1d378803-2"),
|
|
|
|
|
|
+ O: common_vendor.sr(uForm, "1d378803-2", {
|
|
|
|
+ "k": "uForm"
|
|
|
|
+ }),
|
|
P: common_vendor.p({
|
|
P: common_vendor.p({
|
|
- model: form.value,
|
|
|
|
- rules: rules.value,
|
|
|
|
|
|
+ model: form,
|
|
|
|
+ rules,
|
|
labelWidth: "65",
|
|
labelWidth: "65",
|
|
["border-bottom"]: true
|
|
["border-bottom"]: true
|
|
}),
|
|
}),
|