somewhere
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<div>
|
||||
<CustomSubHeader>
|
||||
<CBreadcrumb class="border-0 mb-0">{{ title }}</CBreadcrumb>
|
||||
<el-tag v-if="guaranteeReport._openedBy && guaranteeReport._openedBy.first_name" type="primary" class="ml-1">
|
||||
<span>اولین مشاهده توسط: </span>
|
||||
<span> {{ guaranteeReport._openedBy.first_name + ' ' + guaranteeReport._openedBy.last_name }} </span>
|
||||
</el-tag>
|
||||
<el-tag v-if="guaranteeReport._updatedBy && guaranteeReport._updatedBy.first_name" type="primary" class="ml-1">
|
||||
<span>تغییر وضعیت توسط: </span>
|
||||
<span> {{ guaranteeReport._updatedBy.first_name + ' ' + guaranteeReport._updatedBy.last_name }} </span>
|
||||
</el-tag>
|
||||
<CButton size="sm" color="primary" class="mr-auto" @click="$router.go(-1)">برگشت به صفحه قبل</CButton>
|
||||
</CustomSubHeader>
|
||||
|
||||
<CRow>
|
||||
<CCol lg="12">
|
||||
<CCard>
|
||||
<CCardBody>
|
||||
<el-collapse>
|
||||
<el-collapse-item title="مشخصات نماینده">
|
||||
<CForm>
|
||||
<CInput label="نام و نام خانوادگی" horizontal disabled :value="guaranteeReport.agent_id.full_name" />
|
||||
<CInput label="کد ملی" horizontal disabled :value="guaranteeReport.agent_id.national_code" />
|
||||
|
||||
<CInput label="تلفن همراه" horizontal disabled :value="guaranteeReport.agent_id.mobile_number" />
|
||||
<CInput label="تلفن شرکت/تعمیرگاه" horizontal disabled :value="guaranteeReport.agent_id.tel_number" />
|
||||
<CInput label="فکس شرکت/تعمیرگاه" horizontal disabled :value="guaranteeReport.agent_id.fax_number" />
|
||||
|
||||
<CInput label="استان" horizontal disabled :value="guaranteeReport.agent_id.province_name" />
|
||||
<CInput label="شهر" horizontal disabled :value="guaranteeReport.agent_id.city_name" />
|
||||
<CInput label="آدرس" horizontal disabled :value="guaranteeReport.agent_id.address" />
|
||||
<CInput label="کد پستی" horizontal disabled :value="guaranteeReport.agent_id.postal_code" />
|
||||
<CInput label="نام شرکت/تعمیرگاه" horizontal disabled :value="guaranteeReport.agent_id.store_name" />
|
||||
</CForm>
|
||||
<el-divider></el-divider>
|
||||
<div style="text-align: center">
|
||||
<nuxt-link :to="{ name: 'admin-agents-agent', params: { agent: guaranteeReport.user_id } }"
|
||||
>مشاهده اکانت نماینده</nuxt-link
|
||||
>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
|
||||
<CCol lg="12">
|
||||
<CCard>
|
||||
<CCardBody>
|
||||
<CRow>
|
||||
<CCol>
|
||||
<CForm>
|
||||
<CTextarea label="توضیحات فرم" horizontal disabled rows="5" :value="guaranteeReport.description" />
|
||||
</CForm>
|
||||
<h6>لیست گزارش ها:</h6>
|
||||
<el-divider></el-divider>
|
||||
<el-table :data="guaranteeReport.items" style="width: 100%" stripe>
|
||||
<el-table-column type="index" label="#"> </el-table-column>
|
||||
|
||||
<el-table-column prop="customerName" label="نام مشتری" width="120px"></el-table-column>
|
||||
<el-table-column prop="customerTel" label="تلفن مشتری" width="110px"></el-table-column>
|
||||
|
||||
<el-table-column prop="ItemName" label="نام کالا" width="300px"></el-table-column>
|
||||
<el-table-column prop="SerialNo1" label="سریال کالا" width="150px"></el-table-column>
|
||||
|
||||
<el-table-column prop="productIssue" label="ایراد کالا" width="350px"></el-table-column>
|
||||
<el-table-column prop="usedPieces" label="قطعات صرفی" width="350px"></el-table-column>
|
||||
|
||||
<el-table-column prop="ItemName" label="تاریخ دریافت" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<span> {{ $jDate(scope.row.recieveDate) }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="ItemName" label="تاریخ تحویل" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<span> {{ $jDate(scope.row.deliverDate) }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</CCol>
|
||||
</CRow>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
</CRow>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'AdminGuaranteeReportDetails',
|
||||
layout: 'admin',
|
||||
async asyncData({ $axios, params, error }) {
|
||||
try {
|
||||
const guaranteeReport = await $axios.get(`/api/admin/gr/${params.grId}`)
|
||||
return {
|
||||
guaranteeReport: guaranteeReport.data
|
||||
}
|
||||
} catch (e) {
|
||||
error({ status: 404, message: 'Page not found' })
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: 'مشاهده فرم گزارش گارانتی',
|
||||
guaranteeReport: null,
|
||||
validation: {}
|
||||
}
|
||||
},
|
||||
head() {
|
||||
return {
|
||||
title: this.title
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<div>
|
||||
<CustomSubHeader>
|
||||
<CBreadcrumb class="border-0 mb-0">{{ title }}</CBreadcrumb>
|
||||
</CustomSubHeader>
|
||||
|
||||
<CCard>
|
||||
<CCardHeader>
|
||||
<slot name="header">
|
||||
<i class="fas fa-filter"></i>
|
||||
<b>فیلتر ها</b>
|
||||
</slot>
|
||||
</CCardHeader>
|
||||
|
||||
<CCardBody>
|
||||
<CRow>
|
||||
<CCol sm="12">
|
||||
<h4>جستجو در لیست:</h4>
|
||||
<el-input
|
||||
v-model="filterText"
|
||||
clearable
|
||||
placeholder="کد نماینده - شماره موبایل - استان - شهر"
|
||||
style="display: inline-block; max-width: 500px; margin-top: 8px"
|
||||
></el-input>
|
||||
</CCol>
|
||||
</CRow>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
|
||||
<CCard>
|
||||
<CCardHeader>
|
||||
<slot name="header">
|
||||
<CIcon name="cil-grid" />
|
||||
{{ list_title }}
|
||||
</slot>
|
||||
</CCardHeader>
|
||||
|
||||
<CCardBody>
|
||||
<el-table
|
||||
:data="filteredItems"
|
||||
:row-class-name="({ row, rowIndex }) => !row.seen && 'unread'"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" label="#"> </el-table-column>
|
||||
|
||||
<el-table-column prop="trackingCode" label="کد پیگیری" width=""> </el-table-column>
|
||||
|
||||
<el-table-column prop="description" label="توضیحات" width=""> </el-table-column>
|
||||
|
||||
<el-table-column prop="agent_id.full_name" label="نام" width=""> </el-table-column>
|
||||
|
||||
<el-table-column prop="agent_id.mobile_number" label="شماره موبایل" width=""> </el-table-column>
|
||||
|
||||
<el-table-column prop="agent_id.agent_code" label="کد نماینده" width=""> </el-table-column>
|
||||
|
||||
<el-table-column prop="agent_id.province_name" label="استان" width=""> </el-table-column>
|
||||
|
||||
<el-table-column prop="agent_id.city_name" label="شهر" width=""> </el-table-column>
|
||||
|
||||
<el-table-column label="مشاهده" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
<CButton
|
||||
:key="scope.row._id"
|
||||
color="success"
|
||||
variant="outline"
|
||||
:to="{ name: 'admin-guarantee-reports-grId', params: { grId: scope.row._id } }"
|
||||
>
|
||||
<i class="fal fa-eye"></i>
|
||||
</CButton>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'AdminGuaranteeReportsList',
|
||||
layout: 'admin',
|
||||
async asyncData({ $axios, error }) {
|
||||
try {
|
||||
const grList = await $axios.get('/api/admin/grList')
|
||||
return {
|
||||
grList: grList.data
|
||||
}
|
||||
} catch (err) {
|
||||
error({ status: 404, message: 'There is a problem here' })
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: 'لیست گزارش عملکرد گارانتی نمایندگان',
|
||||
list_title: 'لیست',
|
||||
grList: null,
|
||||
filterText: ''
|
||||
}
|
||||
},
|
||||
head() {
|
||||
return {
|
||||
title: this.title
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
filteredItems() {
|
||||
const filterText = this.filterText.toLowerCase()
|
||||
if (!filterText.length) return this.grList
|
||||
else
|
||||
return this.grList.filter(item => {
|
||||
return (
|
||||
item.agent_id.agent_code.toLowerCase().includes(filterText) ||
|
||||
item.agent_id.full_name.toLowerCase().includes(filterText) ||
|
||||
item.agent_id.mobile_number.toLowerCase().includes(filterText) ||
|
||||
item.agent_id.province_name.toLowerCase().includes(filterText) ||
|
||||
item.agent_id.city_name.toLowerCase().includes(filterText)
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scopped lang="scss">
|
||||
.unread {
|
||||
background: rgba(orange, 0.1) !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user