update: remove dollor from wallet and unit

This commit is contained in:
mahyargdz
2024-12-30 16:03:02 +03:30
parent 0d8ba394b1
commit cd61741d06
13 changed files with 462 additions and 490 deletions
+11 -15
View File
@@ -2,9 +2,7 @@
<div>
<CustomSubHeader>
<CBreadcrumb class="border-0 mb-0"> دستگاه ها</CBreadcrumb>
<CButton size="sm" color="success" @click="download" class="mr-auto"
>خروجی اکسل</CButton
>
<CButton size="sm" color="success" class="mr-auto" @click="download">خروجی اکسل</CButton>
</CustomSubHeader>
<CRow>
@@ -19,13 +17,14 @@
<el-button type="success" class="mt-3" size="small" @click="post">افزودن</el-button>
</CCol>
<CCol xl="4">
<h3> دستور عمل </h3>
<h3>دستور عمل</h3>
<el-divider></el-divider>
<p>
برای اضافه کردن دستگاه جدید فقط کافی است فایل نمونه رو دانلود کنید و به ترتیب مقادیر رو وارد کنید .
<br>
برای به روزرسانی یک دستگاه به صورت تکی یا عمده داخل فایل نمونه IMEI را قرار داده و مقادیر جدید آن را ثبت کنید و آپلود کنید
</p>
برای اضافه کردن دستگاه جدید فقط کافی است فایل نمونه رو دانلود کنید و به ترتیب مقادیر رو وارد کنید .
<br />
برای به روزرسانی یک دستگاه به صورت تکی یا عمده داخل فایل نمونه IMEI را قرار داده و مقادیر جدید آن را
ثبت کنید و آپلود کنید
</p>
<a
download
target="_blank"
@@ -72,7 +71,6 @@
<CIcon name="cil-grid" />
دستگاه ها
</slot>
</CCardHeader>
<CCardBody>
@@ -83,7 +81,7 @@
<el-table-column prop="IMEI" label=" IMEI" width="150px"> </el-table-column>
<el-table-column prop="tomanPrice" label="قیمت دستگاه(تومان)" width=""> </el-table-column>
<el-table-column prop="dollarProfit" label="سود دلاری فروشنده" width=""> </el-table-column>
<!-- <el-table-column prop="dollarProfit" label="سود دلاری فروشنده" width=""> </el-table-column> -->
<el-table-column prop="score" label="امتیاز فروش" width=""> </el-table-column>
<el-table-column prop="renewalProfit" label="سود تمدید" width=""> </el-table-column>
@@ -166,11 +164,9 @@ export default {
else console.log(err)
})
},
async download(){
const x = await this.$axios
.get('/api/admin/gps/device/exel')
FileDownload(x.data, 'device.csv');
async download() {
const x = await this.$axios.get('/api/admin/gps/device/exel')
FileDownload(x.data, 'device.csv')
}
}
}
+17 -21
View File
@@ -24,10 +24,7 @@
<CButton color="danger" :class="filterType === 'rej' && 'selected'" @click="filterType = 'rej'"
>رد شده</CButton
>
<CButton
color="success"
:class="filterType === 'accept' && 'selected'"
@click="filterType = 'accept'"
<CButton color="success" :class="filterType === 'accept' && 'selected'" @click="filterType = 'accept'"
>تایید شده</CButton
>
<CButton color="warning" :class="filterType === 'pend' && 'selected'" @click="filterType = 'pend'"
@@ -67,63 +64,63 @@
<el-table-column label="مدل" width="150px">
<template slot-scope="scope">
{{ scope.row.deviceId.model }}
{{ scope?.row?.deviceId?.model }}
</template>
</el-table-column>
<el-table-column prop="IMEI" label=" IMEI" width="150px"> </el-table-column>
<el-table-column label="نام فروشگاه" width="">
<template slot-scope="scope">
{{ scope.row.userId.shopName }}
{{ scope?.row?.userId?.shopName }}
</template>
</el-table-column>
<el-table-column label="کدملی فروشنده" width="">
<template slot-scope="scope">
{{ scope.row.userId.national_code }}
{{ scope?.row?.userId?.national_code }}
</template>
</el-table-column>
<el-table-column label=" نام و نام خانوادگی" width="">
<template slot-scope="scope">
{{ scope.row.userId.first_name + " " + scope.row.userId.last_name }}
{{ scope?.row?.userId?.first_name + ' ' + scope?.row?.userId?.last_name }}
</template>
</el-table-column>
<el-table-column label=" شماره همراه" width="">
<template slot-scope="scope">
{{ scope.row.userId.mobile_number }}
{{ scope?.row?.userId?.mobile_number }}
</template>
</el-table-column>
<el-table-column label="محل سکونت" width="">
<template slot-scope="scope">
{{ scope.row.userId.province_name + ", "+ scope.row.userId.city_name }}
{{ scope?.row?.userId?.province_name + ', ' + scope?.row?.userId?.city_name }}
</template>
</el-table-column>
<el-table-column label="وضعیت" width="">
<template slot-scope="scope">
<el-tag v-if="scope.row.status == 2" type="danger"> رد شده</el-tag>
<el-tag v-if="scope.row.status == 1" type="success">تایید شده</el-tag>
<el-tag v-if="scope?.row?.status == 2" type="danger"> رد شده</el-tag>
<el-tag v-if="scope?.row?.status == 1" type="success">تایید شده</el-tag>
<el-tag v-if="scope.row.status == 0" type="warning"> درانتظار تایید</el-tag>
<el-tag v-if="scope?.row?.status == 0" type="warning"> درانتظار تایید</el-tag>
</template>
</el-table-column>
<el-table-column label="تایید" width="110" align="center">
<template slot-scope="scope">
<CButton
v-if="scope.row.status == 0 || scope.row.status == 2"
:key="scope.row._id"
v-if="scope?.row?.status == 0 || scope?.row?.status == 2"
:key="scope?.row?._id"
color="success"
variant="outline"
@click="post(scope.row._id, 'accept')"
@click="post(scope?.row?._id, 'accept')"
>
<i class="fa fa-check-square"></i>
</CButton>
<CButton
v-if="scope.row.status == 0 || scope.row.status == 1"
:key="scope.row._id"
v-if="scope?.row?.status == 0 || scope?.row?.status == 1"
:key="scope?.row?._id"
color="danger"
variant="outline"
@click="post(scope.row._id, 'reject')"
@click="post(scope?.row?._id, 'reject')"
>
<i class="fa fa-window-close"></i>
</CButton>
@@ -155,8 +152,7 @@ export default {
devices: [],
device: {},
filterText: '',
filterText: ''
}
},
+16 -9
View File
@@ -10,7 +10,9 @@
<el-descriptions-item label="شهر">{{ requestData.userId?.city_name }}</el-descriptions-item>
<el-descriptions-item label="کد ملی ">{{ requestData.userId?.national_code }}</el-descriptions-item>
<el-descriptions-item label="نام فروشگاه">{{ requestData.userId?.shopName }}</el-descriptions-item>
<el-descriptions-item v-if=" requestData.status == 2" label="شماره پیگیری ">{{ requestData.trackingNumber }}</el-descriptions-item>
<el-descriptions-item v-if="requestData.status == 2" label="شماره پیگیری ">{{
requestData.trackingNumber
}}</el-descriptions-item>
</el-descriptions>
<CCardBody>
<el-table :data="[requestData?.card]" style="width: 100%">
@@ -29,9 +31,12 @@
></el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false">بستن</el-button>
<el-button v-if=" requestData.status !== 2" type="primary" @click="patchIt(requestData._id, requestData.status, { trackingNumber })">{{
requestData.status == 1 ? 'تایید واریز' : 'تایید'
}}</el-button>
<el-button
v-if="requestData.status !== 2"
type="primary"
@click="patchIt(requestData._id, requestData.status, { trackingNumber })"
>{{ requestData.status == 1 ? 'تایید واریز' : 'تایید' }}</el-button
>
</span>
</el-dialog>
@@ -102,7 +107,7 @@
{{ scope.row.amount }}
</template>
</el-table-column>
<el-table-column prop="dollarAmount" label=" مبلغ دلاری" width="150px"> </el-table-column>
<!-- <el-table-column prop="dollarAmount" label=" مبلغ دلاری" width="150px"> </el-table-column> -->
<el-table-column label="نام فروشگاه" width="">
<template slot-scope="scope">
@@ -195,10 +200,12 @@ export default {
if (!this.filterText.length) return filterUsersByType
else {
return this.requestsData.filter(item => {
return item.userId.mobile_number.includes(filterText) ||
item.userId.national_code.includes(filterText) ||
item.userId.last_name.includes(filterText) ||
item.userId.first_name.includes(filterText)
return (
item.userId.mobile_number.includes(filterText) ||
item.userId.national_code.includes(filterText) ||
item.userId.last_name.includes(filterText) ||
item.userId.first_name.includes(filterText)
)
})
}
},