update: change the type

This commit is contained in:
mahyargdz
2025-05-27 16:43:26 +03:30
parent a771f7e199
commit d24481b598
8 changed files with 384 additions and 207 deletions
+44 -12
View File
@@ -20,17 +20,50 @@
<div class="formRow selectable full" :class="validation.representation_type && 'err'">
<span>نمایندگی:</span>
<div class="options">
<label for="representation_type2">
<span>لوازم جانبی کامپیوتر و موبایل</span>
<input id="representation_type2" v-model="formData.representation_type" type="radio" value="verity" />
</label>
<label for="representation_type1">
<span>لوازم صوتی و تصویری خودرو</span>
<input id="representation_type1" v-model="formData.representation_type" type="radio" value="panatech" />
<span>محصولات جانبی موبایل</span>
<input
id="representation_type1"
v-model="formData.representation_type"
type="checkbox"
value="mobile_accessories"
/>
</label>
<label for="representation_type2">
<span>محصولات جانبی کامپیوتر</span>
<input
id="representation_type2"
v-model="formData.representation_type"
type="checkbox"
value="computer_accessories"
/>
</label>
<label for="representation_type3">
<span>هر دو گزینه</span>
<input id="representation_type3" v-model="formData.representation_type" type="radio" value="both" />
<span>محصولات حافظه</span>
<input
id="representation_type3"
v-model="formData.representation_type"
type="checkbox"
value="memory_products"
/>
</label>
<label for="representation_type4">
<span>محصولات صوتی و تصویری خودرو</span>
<input
id="representation_type4"
v-model="formData.representation_type"
type="checkbox"
value="car_audio_video"
/>
</label>
<label for="representation_type5">
<span>محصولات خانگی</span>
<input
id="representation_type5"
v-model="formData.representation_type"
type="checkbox"
value="home_products"
/>
</label>
</div>
<p v-if="validation.representation_type">{{ validation.representation_type.msg }}</p>
@@ -240,7 +273,7 @@
<span>تلفن همراه:</span>
<input
id="mobile_number"
v-model=" formData.mobile_number "
v-model="formData.mobile_number"
type="text"
name="mobile_number"
autocomplete="false"
@@ -892,9 +925,9 @@ export default {
}
},
methods: {
initForm(){
initForm() {
const rawForm = {
representation_type: '',
representation_type: [],
// personal info
// full_name: '',
birth_date: '',
@@ -999,7 +1032,6 @@ export default {
data.province_id = this.user.province_id
data.city_name = this.user.city_name
data.city_id = this.user.city_id
this.$axios
.post(`/api/user/representation`, data)