Compare commits
10
Commits
5a4de3c870
...
kashkool
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
668becae9d | ||
|
|
e5503f8864 | ||
|
|
e5a76193b7 | ||
|
|
d4db3e4e95 | ||
|
|
57dfb44396 | ||
|
|
6fb5bb763b | ||
|
|
9bf89cf938 | ||
|
|
3eaeb7bc07 | ||
|
|
6b918237fc | ||
|
|
15e3e3e6c1 |
Vendored
+1
@@ -58,6 +58,7 @@ declare module '@vue/runtime-core' {
|
||||
BaseTable: typeof import('./src/core/components/BaseTable/index.ts')['default']
|
||||
BaseTableOld: typeof import('./src/core/components/BaseTableOld/index.ts')['default']
|
||||
BasicCard: typeof import('./src/components/BasicCard.vue')['default']
|
||||
BasicImageUploader: typeof import('./src/components/BasicImageUploader.vue')['default']
|
||||
BasicInfoItem: typeof import('./src/components/BasicInfoItem.vue')['default']
|
||||
BasicInput: typeof import('./src/components/BasicInput.vue')['default']
|
||||
BasicMainCard: typeof import('./src/components/BasicMainCard.vue')['default']
|
||||
|
||||
@@ -5,7 +5,7 @@ import pkg from './package.json'
|
||||
|
||||
const baseURL: string = 'https://ghatreh.gold/server/'
|
||||
|
||||
const uploadURL = `${baseURL}/site/file`
|
||||
const uploadURL = `${baseURL}admin/file`
|
||||
const baseURLStorage = baseURL
|
||||
const prefixCls = 'hr-tamin'
|
||||
const version = pkg.version
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ export const createProduct = async (obj: Customer) =>
|
||||
await useAxios.post<AddId>(`/admin/product`, obj)
|
||||
|
||||
export const deleteCustomer = async (id: number) => await useAxios.delete(`/admin/product/${id}`)
|
||||
export const updateCustomer = async (id: number, obj: Customer) =>
|
||||
export const updateProduct = async (id: number, obj: Customer) =>
|
||||
await useAxios.put<AddId>(`/admin/product/${id}`, obj)
|
||||
|
||||
export const getCustomerTable = async (params: TableInput) =>
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
<template>
|
||||
<div class="clearfix">
|
||||
<a-upload
|
||||
v-model:file-list="fileList"
|
||||
:action="props.url"
|
||||
list-type="picture-card"
|
||||
:headers="props.headers"
|
||||
:maxCount="props.maxCount"
|
||||
@preview="handlePreview"
|
||||
@change="handleChange"
|
||||
>
|
||||
<div v-if="fileList.length < maxCount">
|
||||
<plus-outlined/>
|
||||
<div style="margin-top: 8px">بارگذاری</div>
|
||||
</div>
|
||||
</a-upload>
|
||||
<a-modal :visible="previewVisible" :title="previewTitle" :footer="null" @cancel="handleCancel">
|
||||
<img alt="example" style="width: 100%" :src="previewImage"/>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {PlusOutlined} from '@ant-design/icons-vue';
|
||||
import {defineComponent, ref} from 'vue';
|
||||
|
||||
import {message, type UploadChangeParam, type UploadProps} from 'ant-design-vue';
|
||||
|
||||
function getBase64(file: File) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const reader = new FileReader();
|
||||
reader.readAsDataURL(file);
|
||||
reader.onload = () => resolve(reader.result);
|
||||
reader.onerror = error => reject(error);
|
||||
});
|
||||
}
|
||||
|
||||
const previewVisible = ref(false);
|
||||
const previewImage = ref('');
|
||||
const previewTitle = ref('');
|
||||
|
||||
interface Prop {
|
||||
url: string
|
||||
multiple?: boolean
|
||||
fileList?: Array<FileList>
|
||||
maxCount?: number
|
||||
headers?: any
|
||||
}
|
||||
|
||||
const props = defineProps<Prop>()
|
||||
|
||||
//emits
|
||||
const emits = defineEmits(['update:fileList', 'ok', 'delete'])
|
||||
const fileList = computed({
|
||||
get() {
|
||||
return props.fileList || ([] as Array<FileList>)
|
||||
},
|
||||
set(value) {
|
||||
emits('update:fileList', value)
|
||||
}
|
||||
})
|
||||
|
||||
const handleChange = (info: UploadChangeParam) => {
|
||||
// console.log(info)
|
||||
const status = info.file.status
|
||||
if (status !== 'uploading') {
|
||||
// console.log(info.file, info.fileList)
|
||||
/*emits('ok', info.file.response.id)*/
|
||||
}
|
||||
if (status === 'done') {
|
||||
// message.success(`${info.file.name} file uploaded successfully.`)
|
||||
console.log(fileList)
|
||||
emits('ok', info.file.response.id)
|
||||
} else if (status === 'error') {
|
||||
message.error(`خطا در بارگذاری فایل`)
|
||||
} else if (status === 'removed') {
|
||||
emits('delete', info.file.uid)
|
||||
}
|
||||
}
|
||||
|
||||
const handleCancel = () => {
|
||||
previewVisible.value = false;
|
||||
previewTitle.value = '';
|
||||
};
|
||||
const handlePreview = async (file: UploadProps['fileList'][number]) => {
|
||||
if (!file.url && !file.preview) {
|
||||
file.preview = (await getBase64(file.originFileObj)) as string;
|
||||
}
|
||||
previewImage.value = file.url || file.preview;
|
||||
previewVisible.value = true;
|
||||
previewTitle.value = file.name || file.url.substring(file.url.lastIndexOf('/') + 1);
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
/* you can make up upload button and sample style by using stylesheets */
|
||||
.ant-upload-select-picture-card i {
|
||||
font-size: 32px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.ant-upload-select-picture-card .ant-upload-text {
|
||||
margin-top: 8px;
|
||||
color: #666;
|
||||
}
|
||||
</style>
|
||||
@@ -76,9 +76,9 @@ const handleCancel = () => {
|
||||
}
|
||||
|
||||
const beforeUpload = (file: UploadProps['fileList'][number]) => {
|
||||
const isLt100k = file.size / 1024 / 1024 < 0.2
|
||||
const isLt100k = file.size / 1024 / 1024 < 0.4
|
||||
if (!isLt100k) {
|
||||
message.error('حداکثر حجم بارگذاری 200 کیلو بایت میباشد')
|
||||
message.error('حداکثر حجم بارگذاری 400 کیلو بایت میباشد')
|
||||
}
|
||||
return isLt100k
|
||||
}
|
||||
|
||||
@@ -6,6 +6,14 @@ export function usePrice(price: number, digit = true, unit = 'ریال') {
|
||||
return `${_price} ${unit}`
|
||||
}
|
||||
|
||||
export function usePriceWithoutType(price?: number, digit = true, unit = 'ریال') {
|
||||
let _price = price?.toString()
|
||||
if (digit) {
|
||||
_price = _price?.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')
|
||||
}
|
||||
return `${_price}`
|
||||
}
|
||||
|
||||
export function useTowDecimal(num: string | number): string | number {
|
||||
const temp = num.toString().match(/^-?\d+(?:\.\d{0,2})?/)
|
||||
if (temp && temp.length > 0) return temp[0]
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { User } from '@/model/user'
|
||||
import type { Wallet } from '@/model/wallet'
|
||||
import type {User} from '@/model/user'
|
||||
import type {Wallet} from '@/model/wallet'
|
||||
|
||||
export interface AddId {
|
||||
id: number
|
||||
}
|
||||
|
||||
export interface Product{
|
||||
export interface Product {
|
||||
id: number,
|
||||
amount: number,
|
||||
percent_fee_buy: number,
|
||||
@@ -28,6 +28,9 @@ export interface Product{
|
||||
weight: number
|
||||
auto_open_at: string
|
||||
auto_close_at: string
|
||||
description: string
|
||||
file_id: number | null
|
||||
inventory: number
|
||||
}
|
||||
|
||||
export interface MethodePrices {
|
||||
@@ -36,6 +39,7 @@ export interface MethodePrices {
|
||||
price: number
|
||||
profit: number
|
||||
}
|
||||
|
||||
export interface SetActiveTime {
|
||||
auto_open_at: string
|
||||
auto_close_at: string
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</BaseCard>
|
||||
<BaseCard class="h-full md:col-span-7">
|
||||
<BaseCard class="h-full w-full md:col-span-7">
|
||||
<ASpin :spinning="tarazLoading">
|
||||
<div class="grid md:grid-cols-3 gap-3 mt-2">
|
||||
<div>
|
||||
@@ -199,12 +199,13 @@
|
||||
</div>
|
||||
</ASpin>
|
||||
</BaseCard>
|
||||
|
||||
<BaseCard class="w-full md:w-none md:col-span-2">
|
||||
<div class="text-lg font-bold">تراز بدهی</div>
|
||||
<div ref="main" class="w-full aspect-square"></div>
|
||||
</BaseCard>
|
||||
|
||||
<BaseCard class="md:col-span-5">
|
||||
<BaseCard class="w-full md:col-span-5">
|
||||
<div id="chart">
|
||||
<div class="font-bold text-lg mt-2 text-center md:text-right mb-2">مقایسه قیمت ها</div>
|
||||
<apexchart
|
||||
@@ -257,9 +258,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</BaseCard>
|
||||
<div class="md:col-span-7 md:grid gap-4">
|
||||
|
||||
<div class="md:col-span-7 w-full grid gap-4">
|
||||
<BaseCard>
|
||||
<div class=" ">
|
||||
<div>
|
||||
<div class="flex flex-col md:flex-row justify-between items-center">
|
||||
<div class="flex items-end">
|
||||
<div class="text-2xl font-bold ml-2">{{ usePrice(123456789123, true, '') }}</div>
|
||||
|
||||
@@ -28,8 +28,9 @@
|
||||
<Collapse class="grid grid-cols-1 gap-2" v-model:activeKey="activeKey_">
|
||||
<BaseCollapse title="اطلاعات محصول" active-key="0" :actives="activeKey_">
|
||||
<template #content>
|
||||
<!-- <div class="flex justify-between h-full w-full">-->
|
||||
<!-- <div class="flex justify-between h-full w-full">-->
|
||||
<div
|
||||
v-if="form.group_type === '' || form.group_type !== 'آبشده'"
|
||||
class="md:flex justify-between border-1 border-solid rounded-lg border-gray-200 p-2"
|
||||
>
|
||||
<div class="items-center">
|
||||
@@ -83,7 +84,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md:flex justify-between p-2 border-1 border-solid rounded-lg border-gray-200 mt-2">
|
||||
<div v-if="form.group_type === '' || form.group_type !== 'آبشده'"
|
||||
class="md:flex justify-between p-2 border-1 border-solid rounded-lg border-gray-200 mt-2">
|
||||
<div>
|
||||
<span class="ml-4">وزن :</span>
|
||||
<a-radio-group v-model:value="weightOption" name="radioGroup" class="">
|
||||
@@ -97,7 +99,7 @@
|
||||
<BasicInput v-model:value="form.amount" type="number" />
|
||||
</div>
|
||||
<div class="mt-1 mr-4" v-if="form.amount && form.amount < 1 && 0 < form.amount">
|
||||
معادل {{form.amount * 1000}} سوت
|
||||
معادل {{ form.amount * 1000 }} سوت
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -122,19 +124,27 @@
|
||||
keyName="value"
|
||||
/>
|
||||
</a-form-item>
|
||||
<!-- <a-form-item v-if="weightOption === '1'" label="وزن به گرم" name="amount" :rules="inputRules()">
|
||||
<a-form-item v-if="form?.group_type !== 'آبشده'"
|
||||
label="تعداد موجودی" name="inventory" :rules="inputRules()">
|
||||
<BasicInput v-model:value="form.inventory" type="number" />
|
||||
</a-form-item>
|
||||
<!-- <a-form-item v-if="weightOption === '1'" label="وزن به گرم" name="amount" :rules="inputRules()">
|
||||
<BasicInput v-model:value="form.amount" type="number" />
|
||||
</a-form-item>-->
|
||||
<a-form-item label="کارمزد درصدی موقع خرید" name="percent_fee_buy" :rules="inputRules()">
|
||||
<a-form-item v-if="form?.group_type !== 'آبشده'"
|
||||
label="کارمزد درصدی موقع خرید" name="percent_fee_buy" :rules="inputRules()">
|
||||
<BasicInput v-model:value="form.percent_fee_buy" type="number" />
|
||||
</a-form-item>
|
||||
<a-form-item label="هزینه نقدی موقع خرید" name="cash_fee_buy" :rules="inputRules()">
|
||||
<a-form-item v-if="form?.group_type !== 'آبشده'"
|
||||
label="هزینه نقدی موقع خرید" name="cash_fee_buy" :rules="inputRules()">
|
||||
<BasicInput v-model:value="form.cash_fee_buy" type="number" />
|
||||
</a-form-item>
|
||||
<a-form-item label="کارمزد درصدی موقع فروش" name="percent_fee_sell" :rules="inputRules()">
|
||||
<a-form-item v-if="form?.group_type !== 'آبشده'"
|
||||
label="کارمزد درصدی موقع فروش" name="percent_fee_sell" :rules="inputRules()">
|
||||
<BasicInput v-model:value="form.percent_fee_sell" type="number" />
|
||||
</a-form-item>
|
||||
<a-form-item label="هزینه نقدی موقع فروش" name="cash_fee_sell" :rules="inputRules()">
|
||||
<a-form-item v-if="form?.group_type !== 'آبشده'"
|
||||
label="هزینه نقدی موقع فروش" name="cash_fee_sell" :rules="inputRules()">
|
||||
<BasicInput v-model:value="form.cash_fee_sell" type="number" />
|
||||
</a-form-item>
|
||||
<a-form-item label="زمان شروع فعال سازی" name="auto_open_at">
|
||||
@@ -144,7 +154,7 @@
|
||||
placeholder="انتخاب زمان"
|
||||
:defaultValue="dayjs('00:00:00', 'HH:mm:ss')"
|
||||
/>
|
||||
<!-- <a-time-picker v-model:value="form.auto_open_at"/>-->
|
||||
<!-- <a-time-picker v-model:value="form.auto_open_at"/>-->
|
||||
</a-form-item>
|
||||
<a-form-item label="زمان پایان فعال سازی" name="auto_close_at">
|
||||
<TimePicker
|
||||
@@ -153,7 +163,10 @@
|
||||
placeholder="انتخاب زمان"
|
||||
:defaultValue="dayjs('00:00:00', 'HH:mm:ss')"
|
||||
/>
|
||||
<!-- <a-time-picker v-model:value="form.auto_close_at"/>-->
|
||||
<!-- <a-time-picker v-model:value="form.auto_close_at"/>-->
|
||||
</a-form-item>
|
||||
<a-form-item label="توضیحات" name="description" >
|
||||
<BasicTextArea v-model:value="form.description" />
|
||||
</a-form-item>
|
||||
</div>
|
||||
</a-form>
|
||||
@@ -219,7 +232,7 @@
|
||||
:bgColor="userInfo?.active ? '#E3F4E9' : '#FECACA'"
|
||||
class="font-bold px-6"
|
||||
>
|
||||
{{ userInfo?.active ? 'فعال' : 'غیرفعال' }}
|
||||
{{ userInfo?.active ? "فعال" : "غیرفعال" }}
|
||||
</CustomTag>
|
||||
</div>
|
||||
</div>
|
||||
@@ -261,7 +274,7 @@
|
||||
:bgColor="userInfo?.trade_active === 1 ? '#E3F4E9' : '#FECACA'"
|
||||
class="font-bold px-6"
|
||||
>
|
||||
{{ userInfo?.trade_active === 1 ? 'مجاز' : 'غیر مجاز' }}
|
||||
{{ userInfo?.trade_active === 1 ? "مجاز" : "غیر مجاز" }}
|
||||
</CustomTag>
|
||||
</BasicInfoItem>
|
||||
<div class="col-span-4 grid grid-cols-2 gap-3">
|
||||
@@ -308,7 +321,7 @@
|
||||
<a-form-item label="مقدار شارژ " name="value" :rules="inputRules()">
|
||||
<BasicInput addon-before="ریال" v-model:value="formCharge.value" type="price" />
|
||||
<div v-show="formCharge.value > 10">
|
||||
معادل {{ usePrice(formCharge.value / 10, true, 'تومان') }}
|
||||
معادل {{ usePrice(formCharge.value / 10, true, "تومان") }}
|
||||
</div>
|
||||
</a-form-item>
|
||||
<a-form-item label="علت شارژ " name="value" :rules="inputRules()">
|
||||
@@ -352,125 +365,131 @@
|
||||
<script setup lang="ts">
|
||||
// import BasicInfoModal from '@/components/BasicInfoModal'
|
||||
import { Collapse, FormItem, message, Textarea, Form, TimePicker } from "ant-design-vue";
|
||||
import { inputLenRules, inputRules } from '@/utils/inputRules'
|
||||
import { useStaticApiListsStore } from '@/store/staticApisStore'
|
||||
import { ref, watch } from 'vue'
|
||||
import tbl from './components/table.vue'
|
||||
import type { FormInstance } from 'ant-design-vue'
|
||||
import BasicInfoModal from '@/components/BasicInfoModal/index.vue'
|
||||
import type { Info } from '@/components/BasicInfoModal/model/Info'
|
||||
import { toJalali, toJalaliNoTime, toTime } from '@core/utils/useDataTime'
|
||||
import { confirmDeleteItem } from '@/utils/confirmModal'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import type { Item } from '@/model/Item'
|
||||
import type { Customer } from '@/model/customer'
|
||||
import { createProduct, deleteCustomer, updateCustomer } from "@/api/product";
|
||||
import type { Charge } from '@/model/wallet'
|
||||
import customers from '@/router/routes/products'
|
||||
import { chargeWallet } from '@/api/wallet'
|
||||
import { usePrice } from '@core/utils/usePrice'
|
||||
import jalaliday from 'jalaliday'
|
||||
import ordersTbl from '@/pages/menuPages/orders/components/table.vue'
|
||||
import transactionsTbl from '@/pages/menuPages/transactions/components/table.vue'
|
||||
import smsTbl from '@/pages/menuPages/sms/components/table.vue'
|
||||
import FundsTable from '@/pages/menuPages/customers/base/components/fundsTable.vue'
|
||||
import ReferralsTable from '@/pages/menuPages/customers/base/components/referralsTable.vue'
|
||||
import type { Order } from '@/model/order'
|
||||
import Icon from '@core/components/BaseIcon/src/Icon.vue'
|
||||
import { inputLenRules, inputRules } from "@/utils/inputRules";
|
||||
import { useStaticApiListsStore } from "@/store/staticApisStore";
|
||||
import { ref, watch } from "vue";
|
||||
import tbl from "./components/table.vue";
|
||||
import type { FormInstance } from "ant-design-vue";
|
||||
import BasicInfoModal from "@/components/BasicInfoModal/index.vue";
|
||||
import type { Info } from "@/components/BasicInfoModal/model/Info";
|
||||
import { toJalali, toJalaliNoTime, toTime } from "@core/utils/useDataTime";
|
||||
import { confirmDeleteItem } from "@/utils/confirmModal";
|
||||
import { cloneDeep } from "lodash";
|
||||
import type { Item } from "@/model/Item";
|
||||
import type { Customer } from "@/model/customer";
|
||||
import {createProduct, deleteCustomer, updateProduct} from "@/api/product";
|
||||
import type { Charge } from "@/model/wallet";
|
||||
import customers from "@/router/routes/products";
|
||||
import { chargeWallet } from "@/api/wallet";
|
||||
import { usePrice } from "@core/utils/usePrice";
|
||||
import jalaliday from "jalaliday";
|
||||
import ordersTbl from "@/pages/menuPages/orders/components/table.vue";
|
||||
import transactionsTbl from "@/pages/menuPages/transactions/components/table.vue";
|
||||
import smsTbl from "@/pages/menuPages/sms/components/table.vue";
|
||||
import FundsTable from "@/pages/menuPages/customers/base/components/fundsTable.vue";
|
||||
import ReferralsTable from "@/pages/menuPages/customers/base/components/referralsTable.vue";
|
||||
import type { Order } from "@/model/order";
|
||||
import Icon from "@core/components/BaseIcon/src/Icon.vue";
|
||||
import type { MethodePrices, Product } from "@/model/product";
|
||||
import IndexImageUploader from '@/components/ProductUploader/IndexImageUploader.vue'
|
||||
import ProductImageUploader from '@/components/ProductUploader/ProductImageUploader.vue'
|
||||
import IndexImageUploader from "@/components/ProductUploader/IndexImageUploader.vue";
|
||||
import ProductImageUploader from "@/components/ProductUploader/ProductImageUploader.vue";
|
||||
|
||||
//tabs
|
||||
const activeKey = ref('اطلاعات جامع')
|
||||
const activeKey = ref("اطلاعات جامع");
|
||||
|
||||
//loading
|
||||
const loading = ref<boolean>(false)
|
||||
const loading = ref<boolean>(false);
|
||||
|
||||
//define store
|
||||
const store = useStaticApiListsStore()
|
||||
const store = useStaticApiListsStore();
|
||||
|
||||
//define tbl
|
||||
const table = ref(null)
|
||||
const orderTable = ref(null)
|
||||
const transactionTable = ref(null)
|
||||
const smsTable = ref(null)
|
||||
const referralTable = ref(null)
|
||||
const fundTable = ref(null)
|
||||
const refreshTable = () => table?.value?.fetch()
|
||||
const refreshOrderTable = () => orderTable?.value?.fetch()
|
||||
const refreshTransactionTable = () => transactionTable?.value?.fetch()
|
||||
const refreshSMSTable = () => smsTable?.value?.fetch()
|
||||
const refreshReferralTable = () => referralTable?.value?.fetch()
|
||||
const refreshFundTable = () => fundTable?.value?.fetch()
|
||||
const methodOption = ref<string>('1')
|
||||
const weightOption = ref<string>('1')
|
||||
const table = ref(null);
|
||||
const orderTable = ref(null);
|
||||
const transactionTable = ref(null);
|
||||
const smsTable = ref(null);
|
||||
const referralTable = ref(null);
|
||||
const fundTable = ref(null);
|
||||
const refreshTable = () => table?.value?.fetch();
|
||||
const refreshOrderTable = () => orderTable?.value?.fetch();
|
||||
const refreshTransactionTable = () => transactionTable?.value?.fetch();
|
||||
const refreshSMSTable = () => smsTable?.value?.fetch();
|
||||
const refreshReferralTable = () => referralTable?.value?.fetch();
|
||||
const refreshFundTable = () => fundTable?.value?.fetch();
|
||||
const methodOption = ref<string>("1");
|
||||
const weightOption = ref<string>("1");
|
||||
|
||||
const activeKey_ = ref(["0"]);
|
||||
const ImageFileList = ref<Array<FileList>>([]);
|
||||
|
||||
const activeKey_ = ref(['0'])
|
||||
const ImageFileList = ref<Array<FileList>>([])
|
||||
function uploadedFile(id: number) {
|
||||
// console.log(id)
|
||||
let arr: number[] | undefined = form.value.image_ids
|
||||
arr?.push(id)
|
||||
form.value.image_ids = arr
|
||||
let arr: number[] | undefined = form.value.image_ids;
|
||||
arr?.push(id);
|
||||
form.value.image_ids = arr;
|
||||
}
|
||||
|
||||
function deleteFile() {
|
||||
form.value.image_ids = ImageFileList?.value.map((x: FileList) => x.uid)
|
||||
form.value.image_ids = ImageFileList?.value.map((x: FileList) => x.uid);
|
||||
}
|
||||
import BaseCollapse from '@/pages/menuPages/products/base/components/BaseCollapse.vue'
|
||||
|
||||
import BaseCollapse from "@/pages/menuPages/products/base/components/BaseCollapse.vue";
|
||||
import { methodePrices } from "@/api/price";
|
||||
import { getAllPrices } from "@/api/dashboard";
|
||||
import dayjs from "dayjs";
|
||||
const ProductIndexImage = ref<Array<FileList>>([])
|
||||
|
||||
const ProductIndexImage = ref<Array<FileList>>([]);
|
||||
|
||||
function uploadedIndexFile(id: number) {
|
||||
// console.log(id)
|
||||
form.value.original_image_id = id
|
||||
}
|
||||
function deleteIndexFile() {
|
||||
form.value.original_image_id = null
|
||||
form.value.original_image = null
|
||||
ProductIndexImage.value = []
|
||||
form.value.file_id = id;
|
||||
}
|
||||
|
||||
let updateKey = ref<number>(0)
|
||||
function deleteIndexFile() {
|
||||
form.value.file_id = null;
|
||||
form.value.file_id = null;
|
||||
ProductIndexImage.value = [];
|
||||
}
|
||||
|
||||
let updateKey = ref<number>(0);
|
||||
|
||||
|
||||
//role confirm items
|
||||
const confirmItems: Array<Item> = [
|
||||
{
|
||||
value: 'بله',
|
||||
value: "بله",
|
||||
key: true
|
||||
},
|
||||
{
|
||||
value: 'خیر',
|
||||
value: "خیر",
|
||||
key: false
|
||||
}
|
||||
]
|
||||
];
|
||||
const customerItems: Array<Item> = [
|
||||
{
|
||||
value: 'همکار',
|
||||
value: "همکار",
|
||||
key: 1
|
||||
},
|
||||
{
|
||||
value: 'خانگی',
|
||||
value: "خانگی",
|
||||
key: 2
|
||||
},
|
||||
{
|
||||
value: 'سرمایه گذار',
|
||||
value: "سرمایه گذار",
|
||||
key: 3
|
||||
}
|
||||
]
|
||||
];
|
||||
|
||||
//wallet
|
||||
const showMoneyWalletCharge = ref<boolean>(false)
|
||||
const showGoldWalletCharge = ref<boolean>(false)
|
||||
const userInfoOrderVisible = ref<boolean>(false)
|
||||
const showMoneyWalletCharge = ref<boolean>(false);
|
||||
const showGoldWalletCharge = ref<boolean>(false);
|
||||
const userInfoOrderVisible = ref<boolean>(false);
|
||||
|
||||
//form
|
||||
const form = ref<Partial<Product>>({
|
||||
auto_close_at: dayjs('00:00:00', 'HH:mm:ss'),
|
||||
auto_open_at: dayjs('00:00:00', 'HH:mm:ss')
|
||||
})
|
||||
auto_close_at: dayjs("00:00:00", "HH:mm:ss"),
|
||||
auto_open_at: dayjs("00:00:00", "HH:mm:ss")
|
||||
});
|
||||
|
||||
// const form = ref<Order>({
|
||||
// direction: 1,
|
||||
@@ -482,63 +501,63 @@ const form = ref<Partial<Product>>({
|
||||
// goldCash: undefined,
|
||||
// goldValue: undefined
|
||||
// })
|
||||
const formCharge = ref<Charge>({})
|
||||
const formRef = ref<FormInstance>()
|
||||
const formChargeRef = ref<FormInstance>()
|
||||
const formCharge = ref<Charge>({});
|
||||
const formRef = ref<FormInstance>();
|
||||
const formChargeRef = ref<FormInstance>();
|
||||
|
||||
//info
|
||||
let infoParams = reactive<Info>({})
|
||||
let infoParams = reactive<Info>({});
|
||||
|
||||
function infoOrder(val: Order) {
|
||||
infoParams.name = val.customer.name
|
||||
infoParams.type = val.customer.mobile
|
||||
infoParams.date = toJalaliNoTime(val.created_at)
|
||||
infoParams.time = toTime(val.created_at)
|
||||
infoParams.itemsTitle = 'اطلاعات کاربری'
|
||||
infoParams.name = val.customer.name;
|
||||
infoParams.type = val.customer.mobile;
|
||||
infoParams.date = toJalaliNoTime(val.created_at);
|
||||
infoParams.time = toTime(val.created_at);
|
||||
infoParams.itemsTitle = "اطلاعات کاربری";
|
||||
infoParams.items = [
|
||||
{
|
||||
key: 'مقدار (گرم)',
|
||||
value: val.amount ?? '-'
|
||||
key: "مقدار (گرم)",
|
||||
value: val.amount ?? "-"
|
||||
},
|
||||
{
|
||||
key: 'قیمت هر گرم طلا برای مشتری (ریال)',
|
||||
value: usePrice(val.price ?? 0) ?? '-'
|
||||
key: "قیمت هر گرم طلا برای مشتری (ریال)",
|
||||
value: usePrice(val.price ?? 0) ?? "-"
|
||||
},
|
||||
{
|
||||
key: 'قیمت کل برای مشتری (ریال)',
|
||||
value: usePrice(val.total_price ?? 0) ?? '-'
|
||||
key: "قیمت کل برای مشتری (ریال)",
|
||||
value: usePrice(val.total_price ?? 0) ?? "-"
|
||||
},
|
||||
{
|
||||
key: '/قیمت هر گرم طلا بدون سود (ریال)',
|
||||
value: usePrice(val.price_original ?? 0) ?? '-'
|
||||
key: "/قیمت هر گرم طلا بدون سود (ریال)",
|
||||
value: usePrice(val.price_original ?? 0) ?? "-"
|
||||
},
|
||||
{
|
||||
key: 'قیمت کل بدون سود (ریال)',
|
||||
value: usePrice(val.total_price_original ?? 0) ?? '-'
|
||||
key: "قیمت کل بدون سود (ریال)",
|
||||
value: usePrice(val.total_price_original ?? 0) ?? "-"
|
||||
},
|
||||
{
|
||||
key: 'سود هر گرم (ریال)',
|
||||
value: usePrice(val.fee ?? 0) ?? '-'
|
||||
key: "سود هر گرم (ریال)",
|
||||
value: usePrice(val.fee ?? 0) ?? "-"
|
||||
},
|
||||
{
|
||||
key: 'سود کل (ریال)',
|
||||
value: usePrice(val.total_fee ?? 0) ?? '-'
|
||||
key: "سود کل (ریال)",
|
||||
value: usePrice(val.total_fee ?? 0) ?? "-"
|
||||
},
|
||||
{
|
||||
key: 'کد کاربری',
|
||||
value: val.customer.id ?? '-'
|
||||
key: "کد کاربری",
|
||||
value: val.customer.id ?? "-"
|
||||
},
|
||||
{
|
||||
key: 'شماره ملی',
|
||||
value: val.customer.n_code ?? '-'
|
||||
key: "شماره ملی",
|
||||
value: val.customer.n_code ?? "-"
|
||||
},
|
||||
{
|
||||
key: 'کارمزد ریالی',
|
||||
key: "کارمزد ریالی",
|
||||
value: usePrice(val.service_charge_price ?? 0)
|
||||
},
|
||||
{
|
||||
key: 'کارمزد طلایی',
|
||||
value: val.service_charge ?? '-' + ' گرم'
|
||||
key: "کارمزد طلایی",
|
||||
value: val.service_charge ?? "-" + " گرم"
|
||||
},
|
||||
/* {
|
||||
key: 'تاریخ تولد',
|
||||
@@ -549,230 +568,262 @@ function infoOrder(val: Order) {
|
||||
value: val.customer.shop_name ?? '-'
|
||||
},*/
|
||||
{
|
||||
key: 'شماره تلفن',
|
||||
value: val.customer.phone_number ?? '-'
|
||||
key: "شماره تلفن",
|
||||
value: val.customer.phone_number ?? "-"
|
||||
},
|
||||
{
|
||||
key: 'نام استان',
|
||||
value: val.customer.province ?? '-'
|
||||
key: "نام استان",
|
||||
value: val.customer.province ?? "-"
|
||||
},
|
||||
{
|
||||
key: 'نام شهر',
|
||||
value: val.customer.city ?? '-'
|
||||
key: "نام شهر",
|
||||
value: val.customer.city ?? "-"
|
||||
}
|
||||
/* {
|
||||
key: 'نام چاپی',
|
||||
value: val.print_name ?? '-'
|
||||
}*/
|
||||
]
|
||||
userInfoOrderVisible.value = true
|
||||
];
|
||||
userInfoOrderVisible.value = true;
|
||||
}
|
||||
|
||||
async function info(val: Customer) {
|
||||
activeKey.value = 'اطلاعات جامع'
|
||||
userInfo.value = cloneDeep(val)
|
||||
userInfoVisible.value = true
|
||||
activeKey.value = "اطلاعات جامع";
|
||||
userInfo.value = cloneDeep(val);
|
||||
userInfoVisible.value = true;
|
||||
await nextTick(() => {
|
||||
loading.value = true
|
||||
refreshFundTable()
|
||||
refreshReferralTable()
|
||||
refreshSMSTable()
|
||||
refreshTransactionTable()
|
||||
refreshOrderTable()
|
||||
loading.value = false
|
||||
})
|
||||
loading.value = true;
|
||||
refreshFundTable();
|
||||
refreshReferralTable();
|
||||
refreshSMSTable();
|
||||
refreshTransactionTable();
|
||||
refreshOrderTable();
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
//edit
|
||||
let editId: number | undefined = undefined
|
||||
let editId: number | undefined = undefined;
|
||||
|
||||
async function edit(record: Customer) {
|
||||
addUserVisible.value = true
|
||||
editId = record.id
|
||||
const customForm = cloneDeep(record)
|
||||
addUserVisible.value = true;
|
||||
editId = record.id;
|
||||
const customForm = cloneDeep(record);
|
||||
|
||||
form.value = cloneDeep(customForm)
|
||||
form.value = cloneDeep(customForm);
|
||||
|
||||
form.value.auto_open_at = dayjs(customForm.auto_open_at, 'HH:mm:ss')
|
||||
form.value.auto_close_at = dayjs(customForm.auto_close_at, 'HH:mm:ss')
|
||||
form.value.auto_open_at = dayjs(customForm.auto_open_at, "HH:mm:ss");
|
||||
form.value.auto_close_at = dayjs(customForm.auto_close_at, "HH:mm:ss");
|
||||
|
||||
// نمایش فایل موجود اگر وجود داشته باشد
|
||||
const file = (record as any).file;
|
||||
if (file && file.src) {
|
||||
ProductIndexImage.value = [{
|
||||
uid: `file-${file.id}`,
|
||||
name: file.original_name || `index-image-${file.id}`,
|
||||
url: file.src,
|
||||
src: file.src,
|
||||
status: 'done' as const
|
||||
}] as any;
|
||||
} else {
|
||||
ProductIndexImage.value = [];
|
||||
}
|
||||
}
|
||||
|
||||
//add
|
||||
async function add() {
|
||||
loading.value = true
|
||||
editId = undefined
|
||||
loading.value = true;
|
||||
editId = undefined;
|
||||
// await store.getUsersList()
|
||||
addUserVisible.value = true
|
||||
updateKey.value++
|
||||
resetData()
|
||||
loading.value = false
|
||||
addUserVisible.value = true;
|
||||
updateKey.value++;
|
||||
resetData();
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
async function walletMoneyCharge(val: Customer) {
|
||||
showMoneyWalletCharge.value = true
|
||||
formCharge.value.customer_id = val.id
|
||||
showMoneyWalletCharge.value = true;
|
||||
formCharge.value.customer_id = val.id;
|
||||
}
|
||||
|
||||
async function walletGoldCharge(val: Customer) {
|
||||
showGoldWalletCharge.value = true
|
||||
formCharge.value.customer_id = val.id
|
||||
showGoldWalletCharge.value = true;
|
||||
formCharge.value.customer_id = val.id;
|
||||
}
|
||||
|
||||
async function chargeMoneyWallet() {
|
||||
formChargeRef.value?.validateFields().then(async () => {
|
||||
try {
|
||||
loading.value = true
|
||||
await chargeWallet(formCharge.value, 'money')
|
||||
formCharge.value.value = undefined
|
||||
message.success('افزایش اعتبار با موفقیت انجام شد')
|
||||
showMoneyWalletCharge.value = false
|
||||
loading.value = true;
|
||||
await chargeWallet(formCharge.value, "money");
|
||||
formCharge.value.value = undefined;
|
||||
message.success("افزایش اعتبار با موفقیت انجام شد");
|
||||
showMoneyWalletCharge.value = false;
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
console.log(e);
|
||||
} finally {
|
||||
loading.value = false
|
||||
loading.value = false;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
async function chargeGoldWallet() {
|
||||
formChargeRef.value?.validateFields().then(async () => {
|
||||
try {
|
||||
loading.value = true
|
||||
await chargeWallet(formCharge.value, 'gold')
|
||||
formCharge.value.value = undefined
|
||||
message.success('افزایش اعتبار با موفقیت انجام شد')
|
||||
showMoneyWalletCharge.value = false
|
||||
loading.value = true;
|
||||
await chargeWallet(formCharge.value, "gold");
|
||||
formCharge.value.value = undefined;
|
||||
message.success("افزایش اعتبار با موفقیت انجام شد");
|
||||
showMoneyWalletCharge.value = false;
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
console.log(e);
|
||||
} finally {
|
||||
loading.value = false
|
||||
loading.value = false;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
//reset data
|
||||
const resetData = () => {
|
||||
formRef.value?.resetFields()
|
||||
formRef.value?.resetFields();
|
||||
form.value = {
|
||||
unit: '',
|
||||
group_type: '',
|
||||
unit: "",
|
||||
group_type: "",
|
||||
amount: undefined,
|
||||
percent_fee_buy: 0,
|
||||
cash_fee_buy: 0,
|
||||
percent_fee_sell: 0,
|
||||
cash_fee_sell: 0,
|
||||
}
|
||||
}
|
||||
cash_fee_sell: 0
|
||||
};
|
||||
ProductIndexImage.value = [];
|
||||
ImageFileList.value = [];
|
||||
};
|
||||
|
||||
//delete
|
||||
const deleteItem = (id: number) => confirmDeleteItem('کاربر', id, deleteCustomer, refreshTable)
|
||||
const deleteItem = (id: number) => confirmDeleteItem("کاربر", id, deleteCustomer, refreshTable);
|
||||
|
||||
//define selects
|
||||
onMounted(async () => {
|
||||
loading.value = true
|
||||
loading.value = true;
|
||||
// await getResponsible()
|
||||
// await getQC()
|
||||
// await getManager()
|
||||
loading.value = false
|
||||
})
|
||||
loading.value = false;
|
||||
});
|
||||
|
||||
//add project modal
|
||||
const addUserVisible = ref<boolean>(false)
|
||||
const userInfoVisible = ref<boolean>(false)
|
||||
const userInfo = ref<Customer>()
|
||||
const addUserVisible = ref<boolean>(false);
|
||||
const userInfoVisible = ref<boolean>(false);
|
||||
const userInfo = ref<Customer>();
|
||||
|
||||
//submit user
|
||||
async function ok() {
|
||||
formRef.value?.validateFields().then(async () => {
|
||||
// console.log('salam', form.value)
|
||||
// return
|
||||
loading.value = true
|
||||
|
||||
loading.value = true;
|
||||
try {
|
||||
if (methodOption.value === '1') delete form.value.reading_method
|
||||
else delete form.value.price
|
||||
if(weightOption.value === '2')
|
||||
form.value.amount = 1
|
||||
form.value.auto_open_at = dayjs(form.value.auto_open_at).format('HH:mm:ss')
|
||||
form.value.auto_close_at = dayjs(form.value.auto_close_at).format('HH:mm:ss')
|
||||
await methodePrices(form.value)
|
||||
if (methodOption.value === "1") delete form.value.reading_method;
|
||||
else delete form.value.price;
|
||||
if (weightOption.value === "2")
|
||||
form.value.amount = 1;
|
||||
const payload = cloneDeep(form.value);
|
||||
payload.auto_open_at = dayjs(payload.auto_open_at).format("HH:mm:ss");
|
||||
payload.auto_close_at = dayjs(payload.auto_close_at).format("HH:mm:ss");
|
||||
// await methodePrices();
|
||||
if (editId) {
|
||||
await updateCustomer(editId, form.value)
|
||||
await updateProduct(editId, payload);
|
||||
} else {
|
||||
await createProduct(form.value)
|
||||
await createProduct(payload);
|
||||
}
|
||||
addUserVisible.value = false
|
||||
refreshTable()
|
||||
resetData()
|
||||
message.success('عملیات با موفقیت انجام شد')
|
||||
|
||||
addUserVisible.value = false;
|
||||
refreshTable();
|
||||
|
||||
message.success("عملیات با موفقیت انجام شد");
|
||||
resetData();
|
||||
// await getResponsible()
|
||||
// await getQC()
|
||||
// await getManager()
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e);
|
||||
// message.error('خطا در بارگذاری اطلاعات')
|
||||
} finally {
|
||||
loading.value = false
|
||||
loading.value = false;
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
const result = {
|
||||
title: ''
|
||||
}
|
||||
title: ""
|
||||
};
|
||||
const userStatus = (status: number) => {
|
||||
switch (status) {
|
||||
case 0:
|
||||
result.title = 'احراز هویت نشده'
|
||||
break
|
||||
result.title = "احراز هویت نشده";
|
||||
break;
|
||||
case 1:
|
||||
result.title = 'احراز هویت شده توسط سامانه هوشمند'
|
||||
break
|
||||
result.title = "احراز هویت شده توسط سامانه هوشمند";
|
||||
break;
|
||||
case 2:
|
||||
result.title = 'احراز هویت شده توسط کارشناس'
|
||||
break
|
||||
result.title = "احراز هویت شده توسط کارشناس";
|
||||
break;
|
||||
}
|
||||
return result
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
const unitItems: Array<Item> = [
|
||||
{
|
||||
value: 'عدد',
|
||||
value: "عدد"
|
||||
},
|
||||
{
|
||||
value: 'گرم',
|
||||
},
|
||||
]
|
||||
value: "گرم"
|
||||
}
|
||||
];
|
||||
|
||||
const categoryItems: Array<Item> = [
|
||||
{
|
||||
value: 'آبشده',
|
||||
value: "آبشده"
|
||||
},
|
||||
{
|
||||
value: 'مکعب',
|
||||
value: "مکعب"
|
||||
},
|
||||
{
|
||||
value: 'گوی',
|
||||
value: "گوی"
|
||||
},
|
||||
{
|
||||
value: 'سکه',
|
||||
value: "سکه"
|
||||
},
|
||||
{
|
||||
value: 'سکه پارسیان',
|
||||
value: "سکه پارسیان"
|
||||
},
|
||||
{
|
||||
value: 'شمش ونوس',
|
||||
value: "شمش"
|
||||
},
|
||||
]
|
||||
{
|
||||
value: "شمش ونوس"
|
||||
},
|
||||
{
|
||||
value: "شمش پرنیا"
|
||||
},
|
||||
{
|
||||
value: "نقره"
|
||||
}
|
||||
|
||||
const data = ref<MethodePrices[]>([])
|
||||
];
|
||||
|
||||
const data = ref<MethodePrices[]>([]);
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
data.value = await methodePrices()
|
||||
data.value = await methodePrices();
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
console.error(err);
|
||||
} finally {
|
||||
loading.value = false
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const pricesList = computed(() => {
|
||||
return data.value.map((x) => {
|
||||
@@ -780,44 +831,47 @@ const pricesList = computed(() => {
|
||||
id: `${x.name}`,
|
||||
// id: x.id,
|
||||
name: `${x.name}(${usePrice(x.price)})`
|
||||
}
|
||||
})
|
||||
})
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
fetchData()
|
||||
})
|
||||
fetchData();
|
||||
});
|
||||
|
||||
const addPrice = () => {
|
||||
if (form.value.price) form.value.price = parseInt(form.value.price) + 10000
|
||||
else form.value.price = 0 + 10000
|
||||
}
|
||||
if (form.value.price) form.value.price = parseInt(form.value.price) + 10000;
|
||||
else form.value.price = 0 + 10000;
|
||||
};
|
||||
|
||||
const minusPrice = () => {
|
||||
if (form.value.price) form.value.price = parseInt(form.value.price) - 10000
|
||||
else form.value.price = 0 - 10000
|
||||
}
|
||||
if (form.value.price) form.value.price = parseInt(form.value.price) - 10000;
|
||||
else form.value.price = 0 - 10000;
|
||||
};
|
||||
|
||||
import customParseFormat from 'dayjs/plugin/customParseFormat'
|
||||
import locale from 'ant-design-vue/es/date-picker/locale/fa_IR'
|
||||
dayjs.extend(customParseFormat)
|
||||
import customParseFormat from "dayjs/plugin/customParseFormat";
|
||||
import locale from "ant-design-vue/es/date-picker/locale/fa_IR";
|
||||
|
||||
dayjs.extend(customParseFormat);
|
||||
const customLocale = ref({
|
||||
...locale,
|
||||
lang: {
|
||||
...locale.lang,
|
||||
now: "اکنون",
|
||||
ok: "ثبت",
|
||||
},
|
||||
})
|
||||
ok: "ثبت"
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.reject {
|
||||
color: #ff0000 !important;
|
||||
}
|
||||
|
||||
.success {
|
||||
color: #008000 !important;
|
||||
}
|
||||
|
||||
.method_style .ant-select-selector {
|
||||
width: 15rem !important;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type {BaseTableColumn} from '@core/type/baseTable'
|
||||
import {toJalaliNoTime, toTime} from '@core/utils/useDataTime'
|
||||
import CustomTag from '@/components/CustomTag.vue'
|
||||
import {usePrice} from '@core/utils/usePrice'
|
||||
import { usePrice, usePriceWithoutType } from "@core/utils/usePrice";
|
||||
/*import BudgetSelect from '@/components/BudgetSelect.vue'
|
||||
import { useStaticApiListsStore } from '@/store/staticApisStore'
|
||||
import type { FilterSelect } from '@/model/filterSelect'
|
||||
@@ -84,6 +84,40 @@ export const cols: BaseTableColumn[] = [
|
||||
key: 'customer.name',
|
||||
type: 'Text'
|
||||
},
|
||||
{
|
||||
title: 'موجودی طلایی بعد تراکنش (گرم)',
|
||||
dataIndex: 'balance_gold',
|
||||
key: 'balance_gold',
|
||||
type: 'Number',
|
||||
customRender: ({record}) => {
|
||||
return record.balance_gold > 0 ? (
|
||||
<div class="flex justify-center">
|
||||
<div class={'font-bold px-6 text-green'}>{record?.balance_gold ?? '_'}</div>
|
||||
</div>
|
||||
) : (
|
||||
<div class="flex justify-center">
|
||||
<div class={'font-bold px-6 text-red'}>{record?.balance_gold ?? '_'}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'موجودی ریالی بعد تراکنش (ریال)',
|
||||
dataIndex: 'balance_cash',
|
||||
key: 'balance_cash',
|
||||
type: 'Number',
|
||||
customRender: ({record}) => {
|
||||
return record?.balance_cash > 0 ? (
|
||||
<div class="flex justify-center">
|
||||
<div class={'font-bold px-6 text-green'}>{usePriceWithoutType(record?.balance_cash) ?? '_'}</div>
|
||||
</div>
|
||||
) : (
|
||||
<div class="flex justify-center">
|
||||
<div class={'font-bold px-6 text-red'}>{usePriceWithoutType(record?.balance_cash) ?? '_'}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'مقدار طلا طی تراکنش (گرم)',
|
||||
dataIndex: 'gold',
|
||||
|
||||
@@ -55,9 +55,9 @@
|
||||
@close="confirmWeightVisible = false"
|
||||
>
|
||||
<div class=" bg-gray-100 rounded-lg p-2">
|
||||
<div class="mb-4">برداشت فیزیکی ({{ confirmWithdraw.title }})</div>
|
||||
<div class="mb-4 mr-1"> به وزن ({{ confirmWithdraw.amount }})</div>
|
||||
<div class="mb-4 mr-1"> و قیمت ({{ usePrice(confirmWithdraw.price ?? 0, true, '') }})</div>
|
||||
<div class="mb-4">برداشت فیزیکی ({{ confirmWithdraw?.title }})</div>
|
||||
<div class="mb-4 mr-1"> به وزن ({{ confirmWithdraw?.amount }})</div>
|
||||
<div class="mb-4 mr-1"> و قیمت ({{ usePrice(confirmWithdraw?.price ?? 0, true, '') }})</div>
|
||||
</div>
|
||||
</BasicModal>
|
||||
</div>
|
||||
@@ -261,18 +261,6 @@ function openWeight(val) {
|
||||
confirmWeightVisible.value = true
|
||||
}
|
||||
|
||||
function ok(i) {
|
||||
try {
|
||||
// await sendWeights()
|
||||
message.success('با موفقیت ثبت شد')
|
||||
} catch (e) {
|
||||
// message.error('خطا در بارگذاری اطلاعات')
|
||||
console.error(e)
|
||||
} finally {
|
||||
console.log()
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user