somewhere
This commit is contained in:
@@ -0,0 +1,400 @@
|
||||
<template>
|
||||
<div>
|
||||
<CustomSubHeader>
|
||||
<CBreadcrumb class="border-0 mb-0">{{ title }}</CBreadcrumb>
|
||||
<CButton size="sm" color="primary" class="mr-auto" @click="$router.go(-1)">برگشت به صفحه قبل</CButton>
|
||||
</CustomSubHeader>
|
||||
|
||||
<CRow>
|
||||
<CCol v-if="!representation.archived && representation.status !== 'rejected'" lg="12">
|
||||
<CCard>
|
||||
<CCardBody>
|
||||
<CRow>
|
||||
<CCol v-if="!representation.archived" lg="6">
|
||||
<h6>تغییر وضعیت فرم</h6>
|
||||
<el-divider></el-divider>
|
||||
<CButtonGroup>
|
||||
<!-- <CButton :color="filterType === 'registered' ? 'primary' : 'light'">
|
||||
ثبت شده
|
||||
</CButton>
|
||||
|
||||
<CButton di :color="filterType === 'ongoing' ? 'primary' : 'light'">
|
||||
در دست اقدام
|
||||
</CButton> -->
|
||||
|
||||
<CButton
|
||||
:color="representation.status === 'verification' ? 'warning' : 'light'"
|
||||
@click="updateStatus('verification')"
|
||||
>
|
||||
بررسی مدارک
|
||||
</CButton>
|
||||
|
||||
<CButton
|
||||
:color="representation.status === 'accepted' ? 'success' : 'light'"
|
||||
@click="updateStatus('accepted')"
|
||||
>
|
||||
تایید شده
|
||||
</CButton>
|
||||
|
||||
<CButton
|
||||
:color="representation.status === 'rejected' ? 'danger' : 'light'"
|
||||
@click="updateStatus('rejected')"
|
||||
>
|
||||
رد شده
|
||||
</CButton>
|
||||
</CButtonGroup>
|
||||
</CCol>
|
||||
|
||||
<CCol v-if="representation.status !== 'rejected'" lg="6">
|
||||
<h6>تغییر وضعیت آپلود مدارک</h6>
|
||||
<el-divider></el-divider>
|
||||
<CButtonGroup>
|
||||
<CButton :color="representation.upload ? 'primary' : 'light'" @click="updateStatus('uploadOn')">
|
||||
دسترسی آپلود
|
||||
</CButton>
|
||||
|
||||
<CButton :color="!representation.upload ? 'primary' : 'light'" @click="updateStatus('uploadOff')">
|
||||
عدم دسترسی آپلود
|
||||
</CButton>
|
||||
</CButtonGroup>
|
||||
</CCol>
|
||||
</CRow>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
|
||||
<CCol lg="6">
|
||||
<CCard>
|
||||
<CCardBody>
|
||||
<h6>مشخصات فردی متقاضی:</h6>
|
||||
<el-divider></el-divider>
|
||||
<nuxt-link :to="{ name: 'admin-customers-customer', params: { customer: representation.user_id } }"
|
||||
>مشاهده اکانت متقاضی</nuxt-link
|
||||
>
|
||||
<el-divider></el-divider>
|
||||
<CForm>
|
||||
<CInput label="نام مشتری" horizontal disabled :value="representation.full_name" />
|
||||
<CInput label="کد ملی" horizontal disabled :value="representation.national_code" />
|
||||
<CInput label="شماره شناسنامه" horizontal disabled :value="representation.id_number" />
|
||||
<CInput label="محل صدور" horizontal disabled :value="representation.place_of_issue" />
|
||||
<CInput label="تاریخ تولد" horizontal disabled :value="representation.birth_date" />
|
||||
<CInput label="نام پدر" horizontal disabled :value="representation.fathers_name" />
|
||||
<CInput label="میزان تحصیلات" horizontal disabled :value="representation.education_level" />
|
||||
<CInput label="وضعیت نظام وظیفه" horizontal disabled :value="representation.military_status" />
|
||||
<CTextarea
|
||||
label="گواهینامه های تخصصی اخذ شده"
|
||||
horizontal
|
||||
disabled
|
||||
rows="5"
|
||||
:value="representation.certificates"
|
||||
/>
|
||||
</CForm>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
|
||||
<CCol lg="6">
|
||||
<CCard>
|
||||
<CCardBody>
|
||||
<h6>اطلاعات تماس:</h6>
|
||||
<el-divider></el-divider>
|
||||
|
||||
<CForm>
|
||||
<CInput label="استان" horizontal disabled :value="representation.province_name" />
|
||||
<CInput label="شهر" horizontal disabled :value="representation.city_name" />
|
||||
<CInput label="نام شرکت/تعمیرگاه" horizontal disabled :value="representation.store_name" />
|
||||
<CInput label="کد پستی" horizontal disabled :value="representation.postal_code" />
|
||||
<CInput label="تلفن همراه" horizontal disabled :value="representation.mobile_number" />
|
||||
<CInput label="تلفن شرکت/تعمیرگاه" horizontal disabled :value="representation.tel_number" />
|
||||
<CInput label="فکس شرکت/تعمیرگاه" horizontal disabled :value="representation.fax_number" />
|
||||
<CInput label="کد اقتصادی" horizontal disabled :value="representation.economic_code" />
|
||||
<CInput label="ایمیل" horizontal disabled :value="representation.email" />
|
||||
<CTextarea label="آدرس" horizontal disabled rows="5" :value="representation.address" />
|
||||
</CForm>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
|
||||
<CCol lg="6">
|
||||
<CCard>
|
||||
<CCardBody>
|
||||
<h6>مشخصات مکان نماینده:</h6>
|
||||
<el-divider></el-divider>
|
||||
<CForm>
|
||||
<CInput label="جواز کسب" horizontal disabled :value="business_license" />
|
||||
<CInput label="نوع مالکیت" horizontal disabled :value="ownership_type" />
|
||||
<CInput label="متراژ کل (متر)" horizontal disabled :value="representation.total_area" />
|
||||
<CInput label="متراژ محل تعمیرات (متر)" horizontal disabled :value="representation.repair_area" />
|
||||
<CInput label="متراژ انبار (متر)" horizontal disabled :value="representation.stock_area" />
|
||||
<CInput
|
||||
label="طبقه محل مراجعه مشتریان"
|
||||
horizontal
|
||||
disabled
|
||||
:value="representation.customer_reference_floor"
|
||||
/>
|
||||
|
||||
<CInput label="موقعیت مکانی" horizontal disabled :value="place_location" />
|
||||
<CInput label="موقعیت جغرافیایی" horizontal disabled :value="geo_location" />
|
||||
<CInput label="تعداد و ابعاد تابلو" horizontal disabled :value="representation.banner_info" />
|
||||
<CInput
|
||||
label="تعداد تکنسین های تعمیرگاه"
|
||||
horizontal
|
||||
disabled
|
||||
:value="representation.repair_technicians"
|
||||
/>
|
||||
<CInput label="تعداد استادکار تعمیرگاه" horizontal disabled :value="representation.repair_masters" />
|
||||
<CInput label="تعداد کارکنان اداری" horizontal disabled :value="representation.office_workers" />
|
||||
<CInput label="تعداد پیک موتوری" horizontal disabled :value="representation.bike_deliveries" />
|
||||
</CForm>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
|
||||
<CCol lg="6">
|
||||
<CCard>
|
||||
<CCardBody>
|
||||
<h6>آشنایی با آسان سرویس:</h6>
|
||||
<el-divider></el-divider>
|
||||
<CForm>
|
||||
<CInput label="نحوه آشنایی با شرکت" horizontal disabled :value="know_asanServ_from" />
|
||||
<CTextarea
|
||||
label="در صورتیکه معرف دارید مشخصات ایشان را ذکر کنید"
|
||||
horizontal
|
||||
disabled
|
||||
rows="5"
|
||||
:value="representation.introducer_info"
|
||||
/>
|
||||
|
||||
<CInput
|
||||
label="میزان آشنایی با محصولات آسان سرویس"
|
||||
horizontal
|
||||
disabled
|
||||
:value="asanServ_products_knowledge"
|
||||
/>
|
||||
<CInput
|
||||
label="آیا در زمینه فروش لوازم جانبی موبایل و کامپیوتر فعالیت دارید؟"
|
||||
horizontal
|
||||
disabled
|
||||
:value="computer_saling_exp"
|
||||
/>
|
||||
<CTextarea
|
||||
label="در صورت فعالیت فروش، نام شرکت و نوع محصول را نام ببرید"
|
||||
horizontal
|
||||
disabled
|
||||
rows="5"
|
||||
:value="representation.computer_saling_description"
|
||||
/>
|
||||
</CForm>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
|
||||
<CCol lg="6">
|
||||
<CCard>
|
||||
<CCardBody>
|
||||
<h6>سابقه فعالیت:</h6>
|
||||
<el-divider></el-divider>
|
||||
<CForm>
|
||||
<CInput
|
||||
label="سابقه فعالیت در تعمیر ابزار جانبی موبایل و کامپیوتر (سال)"
|
||||
horizontal
|
||||
disabled
|
||||
:value="representation.computer_repair_exp"
|
||||
/>
|
||||
<CInput
|
||||
label="سابقه فعالیت در تعمیر لوزام صوتی و تصویری (سال)"
|
||||
horizontal
|
||||
disabled
|
||||
:value="representation.multimedia_repair_exp"
|
||||
/>
|
||||
<CInput label="سابقه در محل کسب (سال)" horizontal disabled :value="representation.business_exp" />
|
||||
</CForm>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
|
||||
<CCol lg="6">
|
||||
<CCard>
|
||||
<CCardBody>
|
||||
<h6>سایر توضیحات:</h6>
|
||||
<el-divider></el-divider>
|
||||
<CForm>
|
||||
<CTextarea label="سایر توضیحات" horizontal disabled rows="5" :value="representation.more_descriptions" />
|
||||
</CForm>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
|
||||
<CCol lg="12">
|
||||
<CCard>
|
||||
<CCardBody>
|
||||
<h6>نمایندگی نشان تجاری دیگر:</h6>
|
||||
<el-divider></el-divider>
|
||||
<el-table :data="representation.other_representations" style="width: 100%">
|
||||
<el-table-column type="index" label="#"> </el-table-column>
|
||||
|
||||
<el-table-column prop="trademark" label="نشان تجاری" width=""> </el-table-column>
|
||||
|
||||
<el-table-column prop="company_name" label="نام شرکت" width=""> </el-table-column>
|
||||
|
||||
<el-table-column prop="cooperation_history" label="سابقه همکاری (سال)" width=""> </el-table-column>
|
||||
|
||||
<el-table-column prop="cooperation_start_year" label="سال شروع همکاری" width=""> </el-table-column>
|
||||
</el-table>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
|
||||
<CCol v-for="item in agentAssetCategories" :key="item.fieldName" lg="12">
|
||||
<CCard>
|
||||
<CCardBody>
|
||||
<CRow>
|
||||
<CCol>
|
||||
<h6>
|
||||
{{ item.title }}
|
||||
(عکس های آپلود شده)
|
||||
</h6>
|
||||
<el-divider></el-divider>
|
||||
|
||||
<el-image
|
||||
v-for="image in representation[item.fieldName] || []"
|
||||
:key="image._id"
|
||||
style="width: 100px; height: 100px"
|
||||
:src="image.url"
|
||||
:preview-src-list="getImagePreviewList(representation[item.fieldName] || [])"
|
||||
fit="cover"
|
||||
class="ml-2"
|
||||
>
|
||||
</el-image>
|
||||
</CCol>
|
||||
</CRow>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
</CRow>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'AddminRepresentationDetails',
|
||||
layout: 'admin',
|
||||
async asyncData({ $axios, params, error }) {
|
||||
try {
|
||||
const representation = await $axios.get(`/api/admin/representation/${params.representation}`)
|
||||
return {
|
||||
representation: representation.data
|
||||
}
|
||||
} catch (e) {
|
||||
error({ status: 404, message: 'Page not found' })
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: 'مشاهده درخواست نمایندگی',
|
||||
representation: null,
|
||||
validation: {}
|
||||
}
|
||||
},
|
||||
head() {
|
||||
return {
|
||||
title: this.title
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
agentAssetCategories: 'front/agentAssetCategories'
|
||||
}),
|
||||
business_license() {
|
||||
if (this.representation.business_license) return 'دارد'
|
||||
else return 'ندارد'
|
||||
},
|
||||
ownership_type() {
|
||||
if (this.representation.ownership_type === 'owner') return 'مالک'
|
||||
else if (this.representation.ownership_type === 'rent') return 'استیجاری'
|
||||
else return 'سرقفلی'
|
||||
},
|
||||
place_location() {
|
||||
if (this.representation.place_location === 'tech_passage') return 'مرکز صنف موبایل و کامپیوتر'
|
||||
else return 'سایر'
|
||||
},
|
||||
geo_location() {
|
||||
if (this.representation.geo_location === 'main_street') return 'خیابان اصلی'
|
||||
else if (this.representation.geo_location === 'side_street') return 'خیابان فرعی'
|
||||
else if (this.representation.geo_location === 'alley') return 'کوچه'
|
||||
else if (this.representation.geo_location === 'inside_passage') return 'داخل پاساژ'
|
||||
else return 'بر پاساژ'
|
||||
},
|
||||
know_asanServ_from() {
|
||||
if (this.representation.know_asanServ_from === 'company_agents') return 'نماینده فروش'
|
||||
else if (this.representation.know_asanServ_from === 'website') return 'وب سایت'
|
||||
else if (this.representation.know_asanServ_from === 'company_workers') return 'پرسنل سازمان'
|
||||
else if (this.representation.know_asanServ_from === 'exhibition') return 'نمایشگاه'
|
||||
else if (this.representation.know_asanServ_from === 'introduced') return 'معرفی'
|
||||
else return 'سایر'
|
||||
},
|
||||
asanServ_products_knowledge() {
|
||||
if (this.representation.asanServ_products_knowledge === 4) return 'زیاد'
|
||||
else if (this.representation.asanServ_products_knowledge === 3) return 'نسبتاً خوب'
|
||||
else if (this.representation.asanServ_products_knowledge === 2) return 'متوسط'
|
||||
else if (this.representation.asanServ_products_knowledge === 1) return 'کم'
|
||||
else return 'خیلی کم'
|
||||
},
|
||||
computer_saling_exp() {
|
||||
if (this.representation.computer_saling_exp) return 'دارد'
|
||||
else return 'ندارد'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateStatus(status) {
|
||||
if (status === this.representation.status) return
|
||||
const title = 'هشدار'
|
||||
function getMsg() {
|
||||
const msg1 = 'با تغییر وضعیت فرم به بررسی مدارک بلافاصله پیامک اطلاع رسانی برای متقاضی ارسال خواهد شد'
|
||||
const msg2 =
|
||||
'با تغییر وضعیت به رد شده یا تایید شده دیگر امکان تغییر وضعیت نخواهید داشت و پیامک تغییر وضعیت بلافاصله برای متقاضی ارسال خواهد شد، ادامه میدهید؟'
|
||||
const msg3 = 'پیامک ایجاد دسرترسی آپلود برای متقاضی ارسال خواهد شد، ادامه میدهید؟'
|
||||
const msg4 = 'با برداشتن دسترسی آپلود پیامکی برای متقاضی ارسال نخواهد شد'
|
||||
|
||||
if (status === 'verification') return msg1
|
||||
else if (status === 'rejected' || status === 'accepted') return msg2
|
||||
else if (status === 'uploadOn') return msg3
|
||||
else return msg4
|
||||
}
|
||||
|
||||
this.$confirm(getMsg(), title, {
|
||||
confirmButtonText: 'ادامه',
|
||||
cancelButtonText: 'لغو',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios
|
||||
.put(`/api/admin/representationStatus/${this.representation._id}`, { status })
|
||||
.then(response => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: response.data.message
|
||||
})
|
||||
this.$nuxt.refresh()
|
||||
})
|
||||
.catch(err => {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: err.response.data.message
|
||||
})
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: 'عملیات لغو شد'
|
||||
})
|
||||
})
|
||||
},
|
||||
getImagePreviewList(images) {
|
||||
return images.map(item => item.url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user