update: change the type
This commit is contained in:
@@ -45,12 +45,28 @@
|
||||
<el-table-column prop="full_name" label="نام" width=""> </el-table-column>
|
||||
|
||||
<el-table-column prop="mobile_number" label="شماره موبایل" width=""> </el-table-column>
|
||||
|
||||
<el-table-column label="نوع نماینده" width="300">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.representation_type === 'both'">نماینده هر دو نوع لوازم</span>
|
||||
<span v-if="scope.row.representation_type === 'verity'">نماینده لوازم جانبی کامپیوتر و موبایل</span>
|
||||
<span v-if="scope.row.representation_type === 'panatech'">نماینده لوازم صوتی تصویری خودرو</span>
|
||||
<!-- Handle new representation_type format (array) -->
|
||||
<div v-if="Array.isArray(scope.row.representation_type) && scope.row.representation_type.length > 0">
|
||||
<span v-if="scope.row.representation_type.includes('mobile_accessories')">محصولات جانبی موبایل</span>
|
||||
<span v-if="scope.row.representation_type.includes('computer_accessories')"
|
||||
>، محصولات جانبی کامپیوتر</span
|
||||
>
|
||||
<span v-if="scope.row.representation_type.includes('memory_products')">، محصولات حافظه</span>
|
||||
<span v-if="scope.row.representation_type.includes('car_audio_video')"
|
||||
>، محصولات صوتی و تصویری خودرو</span
|
||||
>
|
||||
<span v-if="scope.row.representation_type.includes('home_products')">، محصولات خانگی</span>
|
||||
<!-- Handle legacy data -->
|
||||
<span v-else-if="scope.row.representation_type.includes('both')">نماینده هر دو نوع لوازم (قدیمی)</span>
|
||||
<span v-else-if="scope.row.representation_type.includes('verity')">
|
||||
نماینده لوازم جانبی کامپیوتر و موبایل (قدیمی)</span
|
||||
>
|
||||
<span v-else-if="scope.row.representation_type.includes('panatech')">
|
||||
نماینده لوازم صوتی تصویری خودرو (قدیمی)</span
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -105,6 +121,13 @@
|
||||
:description="validation.first_name ? validation.first_name.msg : null"
|
||||
:class="validation.first_name ? 'err' : null"
|
||||
/>
|
||||
<CInput
|
||||
v-model="registerData.representation_code"
|
||||
label="کد نماینده"
|
||||
horizontal
|
||||
:description="validation.representation_code ? validation.representation_code.msg : null"
|
||||
:class="validation.representation_code ? 'err' : null"
|
||||
/>
|
||||
<CInput
|
||||
v-model="registerData.last_name"
|
||||
label="نام خانوادگی"
|
||||
|
||||
Reference in New Issue
Block a user