Compare commits
64
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96416490bc | ||
|
|
cf014e1f6c | ||
|
|
55856cac89 | ||
|
|
e26dddebd9 | ||
|
|
ea987b708f | ||
|
|
5b6207cd4f | ||
|
|
d6d33d31c3 | ||
|
|
5a30024548 | ||
|
|
c1b3e90b9b | ||
|
|
0a2466ca0c | ||
|
|
28b0a4be38 | ||
|
|
6ccdbc06f0 | ||
|
|
8b74c85a2a | ||
|
|
9fc0886a57 | ||
|
|
cbb93dec5d | ||
|
|
bfbac92df5 | ||
|
|
ddcc8c5649 | ||
|
|
c518f9995b | ||
|
|
89e2d7937e | ||
|
|
fd9191eca8 | ||
|
|
83e5d2868b | ||
|
|
759625d2a1 | ||
|
|
c04505fbd8 | ||
|
|
025d223dac | ||
|
|
e4924a28f5 | ||
|
|
2e21758c2c | ||
|
|
574fa1b4aa | ||
|
|
561addc676 | ||
|
|
8faf4a7209 | ||
|
|
bd3bc09b84 | ||
|
|
d613d16c82 | ||
|
|
f124a69e76 | ||
|
|
4d635cb89a | ||
|
|
48da4cb4c7 | ||
|
|
b3dae57f0b | ||
|
|
840311a2a0 | ||
|
|
797d030e67 | ||
|
|
c34bf80e6f | ||
|
|
4336ec4a62 | ||
|
|
7f851676b5 | ||
|
|
c47d02d377 | ||
|
|
dbead8a6ba | ||
|
|
2bbd9408dd | ||
|
|
8ff805a11c | ||
|
|
1bc3739e78 | ||
|
|
9d3b5388ba | ||
|
|
d91dcf197b | ||
|
|
7bb5c2e00f | ||
|
|
2d74f53d0a | ||
|
|
fbe4f38e06 | ||
|
|
fbe7b98ada | ||
|
|
699657e483 | ||
|
|
4b7b2473fc | ||
|
|
1c850216e9 | ||
|
|
fb25b2251b | ||
|
|
5d386bf752 | ||
|
|
5480398a93 | ||
|
|
53b61ae80d | ||
|
|
38ce3d2488 | ||
|
|
29084904e9 | ||
|
|
dcb74603ad | ||
|
|
1b02780881 | ||
|
|
40a28d5605 | ||
|
|
5223de313a |
@@ -8,7 +8,7 @@ alwaysApply: true
|
|||||||
|
|
||||||
مستندها:
|
مستندها:
|
||||||
- `docs/iam-connection.md` — **نحوه ارتباط**: سه کانال داده و رفتار در خطا
|
- `docs/iam-connection.md` — **نحوه ارتباط**: سه کانال داده و رفتار در خطا
|
||||||
- `docs/iam-sso.md` — پیکربندی، ابطال نشست، محدودیتها
|
- `docs/iam-sso.md` — پیکربندی، ورود مشترک با همکار، ابطال نشست
|
||||||
- مرجع تصویری اندپوینتهای IAM: `<IAM>/docs` (Scalar)
|
- مرجع تصویری اندپوینتهای IAM: `<IAM>/docs` (Scalar)
|
||||||
|
|
||||||
## اصل غیرقابلمذاکره
|
## اصل غیرقابلمذاکره
|
||||||
@@ -16,10 +16,15 @@ alwaysApply: true
|
|||||||
این قابلیت **افزایشی** است. با `IAM_ENABLED=false` (پیشفرض) سامانه باید دقیقاً
|
این قابلیت **افزایشی** است. با `IAM_ENABLED=false` (پیشفرض) سامانه باید دقیقاً
|
||||||
مثل قبل رفتار کند: یک `bcrypt.compare` محلی و هیچ درخواست شبکهای.
|
مثل قبل رفتار کند: یک `bcrypt.compare` محلی و هیچ درخواست شبکهای.
|
||||||
|
|
||||||
- **هیچ تغییری در رابط کاربری نیست.** نه دکمه SSO، نه ریدایرکت، نه صفحه جدید.
|
- فرم ورود عوض نمیشود. پاسخ ورود همان `api_token` قبلی است، بهاضافهٔ
|
||||||
ادمین مثل همیشه موبایل و رمز را در همین پنل وارد میکند.
|
`iamBootstrapUrl` فقط وقتی IAM بلیت مرورگر داده باشد.
|
||||||
- پاسخ `POST /api/admin/auth/login` در هر دو حالت یکسان است (`api_token`,
|
- وقتی IAM روشن است و `IAM_ADMIN_REDIRECT_URI` (یا یکی از
|
||||||
`roles`, …) پس پنل ادمین تفاوتی نمیبیند.
|
`IAM_ADMIN_REDIRECT_URIS`) با آدرس خودِ پنل یکی است، بار اول بدون توکن یک
|
||||||
|
پرش `prompt=none` به `/auth/iam/callback` میرود. اپ کاربر همین کار را با
|
||||||
|
`IAM_REDIRECT_URI` و `IAM_REDIRECT_URIS` میکند. آدرس ناشناس جایگزین آدرس
|
||||||
|
ثبتشده نمیشود و پاسخ `enabled: false` میماند.
|
||||||
|
- IAM خاموش، یا redirect ادمین خالی، یعنی این پرش شروع نمیشود و خروج آدرس
|
||||||
|
مرکزی برنمیگرداند.
|
||||||
|
|
||||||
## نقشه فایلها
|
## نقشه فایلها
|
||||||
|
|
||||||
|
|||||||
+25
-2
@@ -73,6 +73,22 @@ IAM_TENANT_SLUG=
|
|||||||
# off | fallback (default, safest) | exclusive (local password no longer accepted)
|
# off | fallback (default, safest) | exclusive (local password no longer accepted)
|
||||||
IAM_LOGIN_DELEGATION=fallback
|
IAM_LOGIN_DELEGATION=fallback
|
||||||
IAM_HTTP_TIMEOUT_MS=8000
|
IAM_HTTP_TIMEOUT_MS=8000
|
||||||
|
# صفحه callback اپ کاربر. باید در کلاینت IAM دقیقاً ثبت شود.
|
||||||
|
IAM_REDIRECT_URI=
|
||||||
|
# callbackهای اضافه (دولوپ و دامنه دیگر) با کاما. آدرس ناشناس جایگزین نمیشود.
|
||||||
|
IAM_REDIRECT_URIS=
|
||||||
|
# بعد از ورود محلی، مرورگر برای کوکی نشست مشترک به اینجا برمیگردد.
|
||||||
|
IAM_BROWSER_RETURN_URL=
|
||||||
|
# خروج سراسری فقط اگر این آدرس در post_logout کلاینت ثبت شده باشد برمیگردد.
|
||||||
|
IAM_POST_LOGOUT_REDIRECT_URI=
|
||||||
|
# مقصدهای مجاز خروج اپ کاربر، با کاما. باید عیناً در post_logout کلاینت باشند.
|
||||||
|
IAM_ALLOWED_RETURN_URLS=
|
||||||
|
# پنل ادمین. خالی یعنی بررسی بیصدای ورود در پنل انجام نمیشود.
|
||||||
|
IAM_ADMIN_REDIRECT_URI=
|
||||||
|
IAM_ADMIN_REDIRECT_URIS=
|
||||||
|
IAM_ADMIN_BROWSER_RETURN_URL=
|
||||||
|
IAM_ADMIN_POST_LOGOUT_REDIRECT_URI=
|
||||||
|
IAM_ADMIN_ALLOWED_RETURN_URLS=
|
||||||
|
|
||||||
# Revocable admin sessions (AdminSession table).
|
# Revocable admin sessions (AdminSession table).
|
||||||
#
|
#
|
||||||
@@ -114,8 +130,6 @@ SMS_RELAY_SECRET=
|
|||||||
# The "host" field. Blank sends this machine's first external IPv4 — inside
|
# The "host" field. Blank sends this machine's first external IPv4 — inside
|
||||||
# Docker that is the container's address.
|
# Docker that is the container's address.
|
||||||
SMS_RELAY_HOST=
|
SMS_RELAY_HOST=
|
||||||
# "kave" (default, Kavenegar) or "default" to let the gateway pick the line.
|
|
||||||
SMS_RELAY_PLATFORM=
|
|
||||||
# trez — only used with SMS_PROVIDER=trez. Never commit real values.
|
# trez — only used with SMS_PROVIDER=trez. Never commit real values.
|
||||||
# Override only for staging; defaults to the provider's live endpoint.
|
# Override only for staging; defaults to the provider's live endpoint.
|
||||||
SMS_TREZ_URL=
|
SMS_TREZ_URL=
|
||||||
@@ -138,3 +152,12 @@ UPLOAD_DIR=
|
|||||||
# instead so no personal number is committed. Blank means nobody is notified —
|
# instead so no personal number is committed. Blank means nobody is notified —
|
||||||
# the upload and the customer's own SMS still go through (D20).
|
# the upload and the customer's own SMS still go through (D20).
|
||||||
PROFILE_ADMIN_MOBILES=
|
PROFILE_ADMIN_MOBILES=
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Order placement
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Comma-separated admin mobiles told when a customer places an order. The
|
||||||
|
# reference hardcoded four numbers (henza_server
|
||||||
|
# Api/ApiMobileController::setOrder:740-743). Blank means nobody is notified —
|
||||||
|
# the order, the customer's SMS and the sales expert's SMS still go through.
|
||||||
|
ORDER_ADMIN_MOBILES=
|
||||||
|
|||||||
+1
-1
@@ -16,6 +16,6 @@ apps/api/storage/uploads/*
|
|||||||
# apps/admin-panel/dist/
|
# apps/admin-panel/dist/
|
||||||
# apps/user-app/dist/
|
# apps/user-app/dist/
|
||||||
|
|
||||||
# Live henza data dump (customers' personal data). Never commit.
|
# Live legacy data dump (customers' personal data). Never commit.
|
||||||
# Only the structure-only oapi-struncture.sql belongs in the repo.
|
# Only the structure-only oapi-struncture.sql belongs in the repo.
|
||||||
/oapi.sql
|
/oapi.sql
|
||||||
|
|||||||
+16
-7
@@ -25,10 +25,17 @@ DATABASE_URL=postgresql://postgres:<the same password>@db:5432/goldbank?schema=p
|
|||||||
|
|
||||||
# Auth — two DIFFERENT random values. Generate each with:
|
# Auth — two DIFFERENT random values. Generate each with:
|
||||||
# node -e "console.log(require('crypto').randomBytes(48).toString('base64url'))"
|
# node -e "console.log(require('crypto').randomBytes(48).toString('base64url'))"
|
||||||
JWT_SECRET=<random value 1>
|
JWT_SECRET=<random value 1, 32+ characters>
|
||||||
JWT_CUSTOMER_SECRET=<random value 2, NOT the same as above>
|
JWT_CUSTOMER_SECRET=<random value 2, 32+ characters, NOT the same as above>
|
||||||
|
# Every origin the panel and the two apps are opened from, comma-separated.
|
||||||
|
CORS_ORIGINS=https://adm.example.ir,https://app.example.ir,https://app2.example.ir
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The API **refuses to start** in production until all three are right, and
|
||||||
|
prints every problem at once (REL-01, REL-03, SEC-04 —
|
||||||
|
docs/SERVER-SETUP-CHECKLIST.md). A random value:
|
||||||
|
`node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"`.
|
||||||
|
|
||||||
Inside Docker the database host is `db`, not `localhost`.
|
Inside Docker the database host is `db`, not `localhost`.
|
||||||
|
|
||||||
Everything else is optional and may be left blank. Two you may want now:
|
Everything else is optional and may be left blank. Two you may want now:
|
||||||
@@ -36,8 +43,10 @@ Everything else is optional and may be left blank. Two you may want now:
|
|||||||
```dotenv
|
```dotenv
|
||||||
# Delivery only — a fixed OTP that signs in ANY active customer.
|
# Delivery only — a fixed OTP that signs in ANY active customer.
|
||||||
# Exactly 4 digits, or it cannot be typed into the apps. REMOVE before the
|
# Exactly 4 digits, or it cannot be typed into the apps. REMOVE before the
|
||||||
# real release (see "Before the real release" below).
|
# real release (see "Before the real release" below). The production image
|
||||||
|
# refuses to start with it unless the server is marked as a test server:
|
||||||
OTP_MASTER_CODE=1379
|
OTP_MASTER_CODE=1379
|
||||||
|
TEST_SERVER_ALLOW_MASTER_CODE=yes
|
||||||
|
|
||||||
# SMS goes through the "relay" gateway with nothing to set (D26).
|
# SMS goes through the "relay" gateway with nothing to set (D26).
|
||||||
# SMS_PROVIDER=none turns sending off; the server still starts either way.
|
# SMS_PROVIDER=none turns sending off; the server still starts either way.
|
||||||
@@ -112,8 +121,8 @@ before it is a production release. The first three are blocking.
|
|||||||
| # | Do this | Why it matters |
|
| # | Do this | Why it matters |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| **1** | **Set `JWT_CUSTOMER_SECRET` to its own random value**, different from `JWT_SECRET`. | Not a cosmetic default. Unset, the API signs customer and sales-expert **app** tokens with `JWT_SECRET` — *the same key admin tokens use* — and the two token realms stop being cryptographically separate. The only remaining barrier is the `typ` check in `jwt.strategy.ts`, and a sales expert's app token carries their **AdminUser id** in `sub`. Two independent defences collapse into one. A loud boot banner fires while it is missing. **REL-03 (Critical).** |
|
| **1** | **Set `JWT_CUSTOMER_SECRET` to its own random value**, different from `JWT_SECRET`. | Not a cosmetic default. Unset, the API signs customer and sales-expert **app** tokens with `JWT_SECRET` — *the same key admin tokens use* — and the two token realms stop being cryptographically separate. The only remaining barrier is the `typ` check in `jwt.strategy.ts`, and a sales expert's app token carries their **AdminUser id** in `sub`. Two independent defences collapse into one. A loud boot banner fires while it is missing. **REL-03 (Critical).** |
|
||||||
| **2** | **Remove `OTP_MASTER_CODE` from the environment.** | While set, **any active customer signs in with that one fixed code**. Unset or empty disables it completely; the API prints a banner at boot for as long as it is armed. **REL-01 (Critical).** |
|
| **2** | **Remove `OTP_MASTER_CODE` and `TEST_SERVER_ALLOW_MASTER_CODE` from the environment.** The API now refuses to start with the code set unless that flag says this is a test server. | While set, **any active customer signs in with that one fixed code**. Unset or empty disables it completely; the API prints a banner at boot for as long as it is armed. **REL-01 (Critical).** |
|
||||||
| **3** | **Set real `JWT_SECRET`.** | Without it the API falls back to a well-known development string, so anyone can forge an admin token. |
|
| **3** | **Set real `JWT_SECRET` and `CORS_ORIGINS`.** The API refuses to start without them. | Without the key anyone could forge an admin token; without the origin list any website could call the API from a visitor's browser. |
|
||||||
| **4** | **Confirm SMS is going out.** The default `relay` gateway needs no credentials (D26); check `docker compose logs api` for `SMS provider: relay` and send yourself a login code. | If the gateway refuses the `host` value (inside Docker it is the container's IP), set `SMS_RELAY_HOST`. A failed send is only a log line — the server still boots (D20). **REL-02.** |
|
| **4** | **Confirm SMS is going out.** The default `relay` gateway needs no credentials (D26); check `docker compose logs api` for `SMS provider: relay` and send yourself a login code. | If the gateway refuses the `host` value (inside Docker it is the container's IP), set `SMS_RELAY_HOST`. A failed send is only a log line — the server still boots (D20). **REL-02.** |
|
||||||
|
|
||||||
| **5** | **Accounting integration (D27), only if it will be switched on:** set `ACCOUNTING_SECRET_KEY`; count products with no image (they disappear from the app — query in ISSUES ACC-05) and photograph them first; for Zarrin, run the trial on temporary documents first (ACC-01). | The integration itself is off until an admin turns it on in «اتصال حسابداری»; nothing changes before that except the no-image rule, which applies to every product. |
|
| **5** | **Accounting integration (D27), only if it will be switched on:** set `ACCOUNTING_SECRET_KEY`; count products with no image (they disappear from the app — query in ISSUES ACC-05) and photograph them first; for Zarrin, run the trial on temporary documents first (ACC-01). | The integration itself is off until an admin turns it on in «اتصال حسابداری»; nothing changes before that except the no-image rule, which applies to every product. |
|
||||||
@@ -199,8 +208,8 @@ container.
|
|||||||
`SMS_PROVIDER`: `relay` (default), `trez`, or `none` (D26).
|
`SMS_PROVIDER`: `relay` (default), `trez`, or `none` (D26).
|
||||||
|
|
||||||
- **relay**: `SMS_RELAY_URL`, `SMS_RELAY_SECRET` (both have built-in
|
- **relay**: `SMS_RELAY_URL`, `SMS_RELAY_SECRET` (both have built-in
|
||||||
defaults), `SMS_RELAY_HOST` (blank = the machine's first external IPv4),
|
defaults), `SMS_RELAY_HOST` (blank = the machine's first external IPv4).
|
||||||
`SMS_RELAY_PLATFORM` (`kave` default, or `default` to let the gateway pick).
|
No `platform` is sent; the gateway picks the line.
|
||||||
- **trez**: `SMS_TREZ_URL`, `SMS_TREZ_USERNAME`, `SMS_TREZ_PASSWORD`,
|
- **trez**: `SMS_TREZ_URL`, `SMS_TREZ_USERNAME`, `SMS_TREZ_PASSWORD`,
|
||||||
`SMS_TREZ_SENDER_LINE`.
|
`SMS_TREZ_SENDER_LINE`.
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
import{c as O,I as x,d as B,v as j,x as m,o as C,a as A,w as v,f as $,t as E,h as P,i as L,l as u,a7 as y,M as b,B as M,r as N}from"./index-CJkJkMFX.js";var V={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};function g(o){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable}))),r.forEach(function(c){z(o,c,n[c])})}return o}function z(o,t,n){return t in o?Object.defineProperty(o,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[t]=n,o}var d=function(t,n){var r=g({},t,n.attrs);return O(x,g({},r,{icon:V}),null)};d.displayName="SyncOutlined";d.inheritAttrs=!1;const I=B({__name:"AccountingSyncButton",props:{endpoint:{}},emits:["done"],setup(o,{emit:t}){const n=o,r=t,c=u(!1),p=u(null),i=u(!1),h={customers:"مشتریان",balances:"ماندهها",products:"کارساختهها و موجودی"},_={scanned:"بررسیشده",inScope:"در گروههای انتخابی",refreshed:"بهروز",linked:"لینکشده",imported:"وارد شده",issues:"مغایرت",updated:"بهروز",items:"کارساخته",stockErrors:"خطای موجودی"},S=e=>e&&typeof e=="object"?Object.entries(e).map(([s,a])=>`${_[s]??s}: ${a}`).join("، "):"";j(async()=>{try{const{data:e}=await m.get("admin/accounting-status");c.value=!!(e!=null&&e.connected),p.value=(e==null?void 0:e.provider)??null}catch{c.value=!1}});async function w(){var e,s;i.value=!0;try{const{data:a}=await m.post(n.endpoint),k=Object.entries(a.results).map(([f,l])=>y("p",{style:l.ok?"":"color:#d4380d"},`${h[f]??f}: ${l.ok?S(l.summary)||"انجام شد":`خطا — ${l.error}`}`));(a.ok?b.success:b.warning)({title:a.ok?"سینک با حسابداری انجام شد":"سینک با حسابداری کامل انجام نشد",content:y("div",k),okText:"باشه"}),r("done")}catch(a){M.error(((s=(e=a==null?void 0:a.response)==null?void 0:e.data)==null?void 0:s.message)||"سینک با حسابداری انجام نشد")}finally{i.value=!1}}return(e,s)=>{const a=N("a-button");return c.value?(C(),A(a,{key:0,loading:i.value,onClick:w},{icon:v(()=>[O(P(d))]),default:v(()=>[$(" سینک با "+E(p.value||"حسابداری"),1)]),_:1},8,["loading"])):L("",!0)}}});export{I as _};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{_ as o}from"./Add.vue_vue_type_script_setup_true_lang-DkYNhITX.js";import"./index-CaCGCy-S.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CKkGO86U.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-Av3ruB17.js";export{o as default};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{_ as o}from"./Add.vue_vue_type_script_setup_true_lang-CWLQwHa7.js";import"./index-CJkJkMFX.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DJoKJ02i.js";export{o as default};
|
||||||
+1
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
import{_ as o}from"./AddBranches.vue_vue_type_script_setup_true_lang-VDOAiW3Y.js";import"./index-CaCGCy-S.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CKkGO86U.js";export{o as default};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{_ as o}from"./AddBranches.vue_vue_type_script_setup_true_lang-X9erv2LY.js";import"./index-CJkJkMFX.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";export{o as default};
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
import{d as q,v as G,x as c,a as v,w as l,h as R,j as H,l as S,y as j,r as i,o as p,n as C,c as n,b as O,e as $,F as z,f as g,A as I,z as M,k as J,t as N}from"./index-CaCGCy-S.js";import{_ as K}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-CKkGO86U.js";const P={class:"grid-2"},Q={class:"grid-2"},Y=q({__name:"AddBranches",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(h,{emit:V}){const y=h,w=V,f=y.open!==void 0,A=H(),E=J(),d=f?y.id:A.params.id,m=S(!1),_=S([]),t=j({name:"",phone:"",address:"",user_id:void 0}),r=j({});function k(s,e){var o,u;return String(((u=(o=e==null?void 0:e.children)==null?void 0:o[0])==null?void 0:u.children)??"").includes(s)}async function b(){var s,e;if(Object.keys(r).forEach(o=>delete r[o]),!t.name){r.name="لطفا مقدار را وارد کنید";return}try{m.value=!0,d?await c.put(`branch/${d}`,t):await c.post("branch",t),M.info("اطلاعات با موفقیت به ثبت رسید."),d||Object.assign(t,{name:"",phone:"",address:"",user_id:void 0}),f?(w("success"),w("update:open",!1)):E.push("/branch/list")}catch(o){M.error(((e=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{m.value=!1}}return G(async()=>{try{const{data:s}=await c.get("user/list");_.value=s}catch(s){console.log(s)}if(d)try{const{data:s}=await c.get(`branch/${d}`);Object.assign(t,{name:s.name??"",phone:s.phone??"",address:s.address??"",user_id:s.user_id??void 0})}catch(s){console.log(s)}}),(s,e)=>{const o=i("a-input"),u=i("a-form-item"),U=i("a-select-option"),x=i("a-select"),B=i("a-textarea"),F=i("a-button"),D=i("a-card"),L=i("a-form"),T=i("a-spin");return f?(p(),v(K,{key:0,open:!!h.open,id:R(d),"add-title":"افزودن شعبه","edit-title":"ویرایش شعبه",loading:m.value,submitting:m.value,"onUpdate:open":e[4]||(e[4]=a=>s.$emit("update:open",a)),onSubmit:b},{default:l(()=>[C("div",P,[n(u,{label:"نام شعبه","validate-status":r.name?"error":"",help:r.name},{default:l(()=>[n(o,{value:t.name,"onUpdate:value":e[0]||(e[0]=a=>t.name=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),n(u,{label:"تلفن شعبه"},{default:l(()=>[n(o,{value:t.phone,"onUpdate:value":e[1]||(e[1]=a=>t.phone=a)},null,8,["value"])]),_:1}),n(u,{label:"مدیر"},{default:l(()=>[n(x,{value:t.user_id,"onUpdate:value":e[2]||(e[2]=a=>t.user_id=a),"show-search":"","allow-clear":"",placeholder:"انتخاب کنید","filter-option":k},{default:l(()=>[(p(!0),O(z,null,$(_.value,a=>(p(),v(U,{key:a.id,value:a.id},{default:l(()=>[g(N(a.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),n(u,{label:"آدرس"},{default:l(()=>[n(B,{value:t.address,"onUpdate:value":e[3]||(e[3]=a=>t.address=a),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1})]),_:1},8,["open","id","loading","submitting"])):(p(),v(T,{key:1,spinning:m.value},{default:l(()=>[n(L,{layout:"vertical",onSubmit:I(b,["prevent"])},{default:l(()=>[n(D,{title:R(d)?"ویرایش شعبه":"افزودن شعبه",class:"mb-base"},{default:l(()=>[C("div",Q,[n(u,{label:"نام شعبه","validate-status":r.name?"error":"",help:r.name},{default:l(()=>[n(o,{value:t.name,"onUpdate:value":e[5]||(e[5]=a=>t.name=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),n(u,{label:"تلفن شعبه"},{default:l(()=>[n(o,{value:t.phone,"onUpdate:value":e[6]||(e[6]=a=>t.phone=a)},null,8,["value"])]),_:1}),n(u,{label:"مدیر"},{default:l(()=>[n(x,{value:t.user_id,"onUpdate:value":e[7]||(e[7]=a=>t.user_id=a),"show-search":"","allow-clear":"",placeholder:"انتخاب کنید","filter-option":k},{default:l(()=>[(p(!0),O(z,null,$(_.value,a=>(p(),v(U,{key:a.id,value:a.id},{default:l(()=>[g(N(a.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),n(u,{label:"آدرس"},{default:l(()=>[n(B,{value:t.address,"onUpdate:value":e[8]||(e[8]=a=>t.address=a),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1}),n(F,{type:"primary",onClick:b},{default:l(()=>[...e[9]||(e[9]=[g("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{Y as _};
|
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
import{d as T,v as q,x as c,a as v,w as l,h as R,j as H,l as S,y as j,r as i,o as p,n as C,c as n,b as O,e as $,f as g,t as M,F as N,G as I,B as V,k as J}from"./index-CJkJkMFX.js";import{_ as K}from"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";const P={class:"grid-2"},Q={class:"grid-2"},Y=T({__name:"AddBranches",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(h,{emit:z}){const y=h,w=z,f=y.open!==void 0,E=H(),F=J(),r=f?y.id:E.params.id,m=S(!1),_=S([]),t=j({name:"",phone:"",address:"",user_id:void 0}),d=j({});function k(s,e){var o,u;return String(((u=(o=e==null?void 0:e.children)==null?void 0:o[0])==null?void 0:u.children)??"").includes(s)}async function b(){var s,e;if(Object.keys(d).forEach(o=>delete d[o]),!t.name){d.name="لطفا مقدار را وارد کنید";return}try{m.value=!0,r?await c.put(`branch/${r}`,t):await c.post("branch",t),V.info("اطلاعات با موفقیت به ثبت رسید."),r||Object.assign(t,{name:"",phone:"",address:"",user_id:void 0}),f?(w("success"),w("update:open",!1)):F.push("/branch/list")}catch(o){V.error(((e=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{m.value=!1}}return q(async()=>{try{const{data:s}=await c.get("user/list");_.value=s}catch(s){console.log(s)}if(r)try{const{data:s}=await c.get(`branch/${r}`);Object.assign(t,{name:s.name??"",phone:s.phone??"",address:s.address??"",user_id:s.user_id??void 0})}catch(s){console.log(s)}}),(s,e)=>{const o=i("a-input"),u=i("a-form-item"),U=i("a-select-option"),x=i("a-select"),B=i("a-textarea"),A=i("a-button"),D=i("a-card"),G=i("a-form"),L=i("a-spin");return f?(p(),v(K,{key:0,open:!!h.open,id:R(r),"add-title":"افزودن شعبه","edit-title":"ویرایش شعبه",loading:m.value,submitting:m.value,"onUpdate:open":e[4]||(e[4]=a=>s.$emit("update:open",a)),onSubmit:b},{default:l(()=>[C("div",P,[n(u,{label:"نام شعبه","validate-status":d.name?"error":"",help:d.name},{default:l(()=>[n(o,{value:t.name,"onUpdate:value":e[0]||(e[0]=a=>t.name=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),n(u,{label:"تلفن شعبه"},{default:l(()=>[n(o,{value:t.phone,"onUpdate:value":e[1]||(e[1]=a=>t.phone=a)},null,8,["value"])]),_:1}),n(u,{label:"مدیر"},{default:l(()=>[n(x,{value:t.user_id,"onUpdate:value":e[2]||(e[2]=a=>t.user_id=a),"show-search":"","allow-clear":"",placeholder:"انتخاب کنید","filter-option":k},{default:l(()=>[(p(!0),O(N,null,$(_.value,a=>(p(),v(U,{key:a.id,value:a.id},{default:l(()=>[g(M(a.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),n(u,{label:"آدرس"},{default:l(()=>[n(B,{value:t.address,"onUpdate:value":e[3]||(e[3]=a=>t.address=a),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1})]),_:1},8,["open","id","loading","submitting"])):(p(),v(L,{key:1,spinning:m.value},{default:l(()=>[n(G,{layout:"vertical",onSubmit:I(b,["prevent"])},{default:l(()=>[n(D,{title:R(r)?"ویرایش شعبه":"افزودن شعبه",class:"mb-base page-card"},{default:l(()=>[C("div",Q,[n(u,{label:"نام شعبه","validate-status":d.name?"error":"",help:d.name},{default:l(()=>[n(o,{value:t.name,"onUpdate:value":e[5]||(e[5]=a=>t.name=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),n(u,{label:"تلفن شعبه"},{default:l(()=>[n(o,{value:t.phone,"onUpdate:value":e[6]||(e[6]=a=>t.phone=a)},null,8,["value"])]),_:1}),n(u,{label:"مدیر"},{default:l(()=>[n(x,{value:t.user_id,"onUpdate:value":e[7]||(e[7]=a=>t.user_id=a),"show-search":"","allow-clear":"",placeholder:"انتخاب کنید","filter-option":k},{default:l(()=>[(p(!0),O(N,null,$(_.value,a=>(p(),v(U,{key:a.id,value:a.id},{default:l(()=>[g(M(a.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),n(u,{label:"آدرس"},{default:l(()=>[n(B,{value:t.address,"onUpdate:value":e[8]||(e[8]=a=>t.address=a),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1}),n(A,{type:"primary",class:"form-submit",onClick:b},{default:l(()=>[...e[9]||(e[9]=[g("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{Y as _};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
b[data-v-dbdf9683]{font-weight:500}.kind-picker[data-v-dbdf9683]{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-bottom:20px}.kind-card[data-v-dbdf9683]{position:relative;display:flex;align-items:center;gap:12px;padding:14px 16px;border:1.5px solid #eef0f5;border-radius:16px;background:#fff;text-align:start;cursor:pointer;font:inherit;transition:border-color .2s ease,box-shadow .2s ease,background .2s ease}.kind-card[data-v-dbdf9683]:hover{border-color:#c9d0dd}.kind-card.is-on[data-v-dbdf9683]{border-color:#1c2d56;background:#1c2d5608;box-shadow:0 0 0 3px #1c2d5614}.kind-card__icon[data-v-dbdf9683]{width:42px;height:42px;flex-shrink:0;display:grid;place-items:center;border-radius:12px;font-size:16px;color:#8a94a6;background:#f2f4f7;transition:color .2s ease,background .2s ease}.kind-card.is-on .kind-card__icon[data-v-dbdf9683]{color:#fff;background:#1c2d56}.kind-card__text[data-v-dbdf9683]{display:flex;flex-direction:column;gap:2px;min-width:0}.kind-card__text b[data-v-dbdf9683]{font-size:14px;color:#101828}.kind-card__text small[data-v-dbdf9683]{font-size:12px;color:#8a94a6}.kind-card__check[data-v-dbdf9683]{margin-inline-start:auto;font-size:16px;color:#1c2d56}@media (max-width: 575px){.kind-picker[data-v-dbdf9683]{grid-template-columns:minmax(0,1fr);gap:8px;margin-bottom:12px}.kind-card[data-v-dbdf9683]{padding:10px 12px}.kind-card__icon[data-v-dbdf9683]{width:36px;height:36px;font-size:16px}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{c as h,I as w,d as P,u as x,l as z,b as l,n,w as B,F as v,e as I,a as u,g as k,i as p,aa as A,j as R,q as j,r as F,o as c,h as b,P as H,k as V,p as M,t as y,K as N,_ as D}from"./index-CJkJkMFX.js";import{_ as U}from"./bulkCustomer.vue_vue_type_script_setup_true_lang-Oqr_La0l.js";import{R as $}from"./ReagentCustomer-DWOpEaGE.js";import{S as q}from"./singleCustomer-Bl29UTYy.js";import{S as E}from"./ShopOutlined-CLnJ_zq6.js";import{U as L}from"./UserOutlined-B6p2SzcN.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DJoKJ02i.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-C-XoiP-s.js";import"./DateInput-Bd3GkdF5.js";import"./index-CcPs5_14.js";import"./PercentageOutlined-BDHjAjTy.js";import"./SafetyCertificateOutlined-Dpqr0GGL.js";import"./CameraOutlined-DaIK8Qbh.js";var T={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z"}}]},name:"idcard",theme:"outlined"};function g(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable}))),o.forEach(function(s){G(r,s,t[s])})}return r}function G(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var _=function(e,t){var o=g({},e,t.attrs);return h(w,g({},o,{icon:T}),null)};_.displayName="IdcardOutlined";_.inheritAttrs=!1;const J={id:"page-user-view",class:"pf-page"},K={class:"pf-head"},Q={class:"kind-picker",role:"tablist"},W=["aria-selected","onClick"],X={class:"kind-card__icon"},Y={class:"kind-card__text"},Z=P({__name:"AddCustomer",setup(r){const e=R(),t=V(),o=x(),s=z(e.query.tab||"omde"),d=i=>!!o.hasPermission(i),m=j(()=>{const i=[];return d("persons.create.client")&&i.push({key:"omde",title:"مشتری عمده",hint:"مغازهدار، بنکدار و خریدار عمده",icon:E}),d("persons.create.seller")&&i.push({key:"reagent",title:"کارشناس فروش",hint:"کارشناس با کمیسیون و سقف اعتبار",icon:_}),o.isSuperAdmin&&i.push({key:"tak",title:"مشتری تک",hint:"مشتری خردهفروشی حضوری",icon:L}),i}),O={omde:U,reagent:$,tak:q};function C(){window.history.length>1?t.back():t.push("/customer/omde-list")}return(i,f)=>{const S=F("a-button");return c(),l("div",J,[n("header",K,[h(S,{class:"pf-head__back",shape:"circle",onClick:C},{icon:B(()=>[h(b(H))]),_:1}),f[0]||(f[0]=n("div",{class:"pf-head__text"},[n("h1",null,"افزودن شخص"),n("p",null,"نوع شخص را انتخاب و اطلاعات او را تکمیل کنید.")],-1))]),d("persons.create")&&m.value.length?(c(),l(v,{key:0},[n("div",Q,[(c(!0),l(v,null,I(m.value,a=>(c(),l("button",{key:a.key,type:"button",role:"tab",class:M(["kind-card",{"is-on":s.value===a.key}]),"aria-selected":s.value===a.key,onClick:ee=>s.value=a.key},[n("span",X,[(c(),u(k(a.icon)))]),n("span",Y,[n("b",null,y(a.title),1),n("small",null,y(a.hint),1)]),s.value===a.key?(c(),u(b(N),{key:0,class:"kind-card__check"})):p("",!0)],10,W))),128))]),(c(),u(A,null,[m.value.some(a=>a.key===s.value)?(c(),u(k(O[s.value]),{key:s.value})):p("",!0)],1024))],64)):p("",!0)])}}}),_e=D(Z,[["__scopeId","data-v-dbdf9683"]]);export{_e as default};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{_ as p}from"./bulkCustomer.vue_vue_type_script_setup_true_lang-lNpQ9uTu.js";import{R as u}from"./ReagentCustomer--RuiFYxp.js";import{_ as l}from"./singleCustomer.vue_vue_type_script_setup_true_lang-tiiMc7wU.js";import{d as f,u as b,b as k,n as h,c as e,w as a,r,o as t,a as n,i as c}from"./index-CaCGCy-S.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CKkGO86U.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-Av3ruB17.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const C={id:"page-user-view"},B={id:"user-data"},$=f({__name:"AddCustomer",setup(v){const m=b(),s=_=>!!m.hasPermission(_);return(_,y)=>{const o=r("a-tab-pane"),i=r("a-tabs"),d=r("a-card");return t(),k("div",C,[h("div",B,[e(d,{class:"mb-base"},{default:a(()=>[s("persons.create")?(t(),n(i,{key:0},{default:a(()=>[s("persons.create.client")?(t(),n(o,{key:"omde",tab:"مشتری عمده"},{default:a(()=>[e(p)]),_:1})):c("",!0),s("persons.create.seller")?(t(),n(o,{key:"reagent",tab:"کارشناس فروش"},{default:a(()=>[e(u)]),_:1})):c("",!0),e(o,{key:"tak",tab:"مشتری تک"},{default:a(()=>[e(l)]),_:1})]),_:1})):c("",!0)]),_:1})])])}}});export{$ as default};
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
.mt-4[data-v-f195ac0c]{margin-top:1rem}.mt-5[data-v-f195ac0c]{margin-top:1.25rem}
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
.mt-4[data-v-a752a6ce]{margin-top:1rem}.mt-5[data-v-a752a6ce]{margin-top:1.25rem}
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
.grid-1[data-v-d501144a]{display:grid;grid-template-columns:1fr}.image-grid[data-v-d501144a]{display:flex;flex-wrap:wrap;gap:8px}.variant-thumb[data-v-d501144a]{width:40px;height:40px;object-fit:cover;border-radius:4px;display:inline-block}.variant-thumb--empty[data-v-d501144a]{display:inline-flex;align-items:center;justify-content:center;border:1px dashed #d9d9d9;color:#bfbfbf}.variant-picker[data-v-d501144a]{display:flex;flex-wrap:wrap;gap:8px}.variant-picker__item[data-v-d501144a]{width:64px;height:64px;padding:2px;border:2px solid #d9d9d9;border-radius:6px;background:#fff;cursor:pointer;overflow:hidden}.variant-picker__item img[data-v-d501144a]{width:100%;height:100%;object-fit:cover;border-radius:4px;display:block}.variant-picker__item.is-on[data-v-d501144a]{border-color:#1890ff}.variant-picker__none[data-v-d501144a]{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:11px;color:#8c8c8c;line-height:1.3}.flex-1[data-v-d501144a]{flex:1}.mb-8[data-v-d501144a]{margin-bottom:2rem}.overflow-auto[data-v-d501144a]{overflow:auto}
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
import{_ as o}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-UT1HZ3uS.js";import"./index-CaCGCy-S.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CKkGO86U.js";export{o as default};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{_ as o}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-8Mvjpt5a.js";import"./index-CJkJkMFX.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";export{o as default};
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
import{d as O,v as S,x as v,a as b,w as n,h as g,j as V,l as z,y,r as p,o as U,n as x,c as o,f as A,G as E,B as c,k as G}from"./index-CJkJkMFX.js";import{_ as T}from"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";const W={class:"grid-3"},q={class:"grid-3"},H=O({__name:"AddWorkshop",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(f,{emit:B}){const h=f,w=B,_=h.open!==void 0,R=V(),j=G(),d=_?h.id:R.params.id,i=z(!1),e=y({workshop_name:"",workshop_phone:"",workshop_address:"",user_fname:"",user_lname:"",user_phone:""}),u=y({});async function m(){var t,a;if(Object.keys(u).forEach(l=>delete u[l]),e.workshop_name||(u.workshop_name="لطفا مقدار را وارد کنید"),(e.user_fname||e.user_lname)&&!e.user_phone&&(u.user_phone="موبایل سرپرست کارگاه الزامی است"),!Object.keys(u).length)try{i.value=!0,d?await v.put(`workshop/${d}`,e):await v.post("workshop",e),c.info("اطلاعات با موفقیت به ثبت رسید."),_?(w("success"),w("update:open",!1)):j.push("/workshop/list")}catch(l){c.error(((a=(t=l==null?void 0:l.response)==null?void 0:t.data)==null?void 0:a.message)??"خطا در ثبت اطلاعات.")}finally{i.value=!1}}return S(async()=>{if(d)try{const{data:t}=await v.get(`workshop/${d}`);Object.assign(e,{workshop_name:t.workshop_name??t.name??"",workshop_phone:t.workshop_phone??t.phone??"",workshop_address:t.workshop_address??t.address??"",user_fname:t.user_fname??"",user_lname:t.user_lname??"",user_phone:t.user_phone??""})}catch(t){console.log(t)}}),(t,a)=>{const l=p("a-input"),r=p("a-form-item"),k=p("a-textarea"),C=p("a-button"),$=p("a-card"),M=p("a-form"),N=p("a-spin");return _?(U(),b(T,{key:0,open:!!f.open,id:g(d),"add-title":"افزودن کارگاه","edit-title":"ویرایش کارگاه",loading:i.value,submitting:i.value,width:"lg","onUpdate:open":a[6]||(a[6]=s=>t.$emit("update:open",s)),onSubmit:m},{default:n(()=>[x("div",W,[o(r,{label:"نام کارگاه","validate-status":u.workshop_name?"error":"",help:u.workshop_name},{default:n(()=>[o(l,{value:e.workshop_name,"onUpdate:value":a[0]||(a[0]=s=>e.workshop_name=s)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"تلفن کارگاه"},{default:n(()=>[o(l,{value:e.workshop_phone,"onUpdate:value":a[1]||(a[1]=s=>e.workshop_phone=s)},null,8,["value"])]),_:1}),o(r,{label:"نام سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_fname,"onUpdate:value":a[2]||(a[2]=s=>e.user_fname=s)},null,8,["value"])]),_:1}),o(r,{label:"نام خانوادگی سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_lname,"onUpdate:value":a[3]||(a[3]=s=>e.user_lname=s)},null,8,["value"])]),_:1}),o(r,{label:"موبایل سرپرست کارگاه","validate-status":u.user_phone?"error":"",help:u.user_phone},{default:n(()=>[o(l,{value:e.user_phone,"onUpdate:value":a[4]||(a[4]=s=>e.user_phone=s)},null,8,["value"])]),_:1},8,["validate-status","help"])]),o(r,{label:"آدرس"},{default:n(()=>[o(k,{value:e.workshop_address,"onUpdate:value":a[5]||(a[5]=s=>e.workshop_address=s),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1})]),_:1},8,["open","id","loading","submitting"])):(U(),b(N,{key:1,spinning:i.value},{default:n(()=>[o(M,{layout:"vertical",onSubmit:E(m,["prevent"])},{default:n(()=>[o($,{title:g(d)?"ویرایش کارگاه":"افزودن کارگاه",class:"mb-base page-card"},{default:n(()=>[x("div",q,[o(r,{label:"نام کارگاه","validate-status":u.workshop_name?"error":"",help:u.workshop_name},{default:n(()=>[o(l,{value:e.workshop_name,"onUpdate:value":a[7]||(a[7]=s=>e.workshop_name=s)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"تلفن کارگاه"},{default:n(()=>[o(l,{value:e.workshop_phone,"onUpdate:value":a[8]||(a[8]=s=>e.workshop_phone=s)},null,8,["value"])]),_:1}),o(r,{label:"نام سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_fname,"onUpdate:value":a[9]||(a[9]=s=>e.user_fname=s)},null,8,["value"])]),_:1}),o(r,{label:"نام خانوادگی سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_lname,"onUpdate:value":a[10]||(a[10]=s=>e.user_lname=s)},null,8,["value"])]),_:1}),o(r,{label:"موبایل سرپرست کارگاه","validate-status":u.user_phone?"error":"",help:u.user_phone},{default:n(()=>[o(l,{value:e.user_phone,"onUpdate:value":a[11]||(a[11]=s=>e.user_phone=s)},null,8,["value"])]),_:1},8,["validate-status","help"])]),o(r,{label:"آدرس"},{default:n(()=>[o(k,{value:e.workshop_address,"onUpdate:value":a[12]||(a[12]=s=>e.workshop_address=s),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1}),o(C,{type:"primary",class:"form-submit",onClick:m},{default:n(()=>[...a[13]||(a[13]=[A("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{H as _};
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
import{d as N,v as O,x as v,a as b,w as n,h as g,j as S,l as V,y,r as p,o as U,n as x,c as o,f as A,A as E,z as c,k as T}from"./index-CaCGCy-S.js";import{_ as W}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-CKkGO86U.js";const q={class:"grid-3"},D={class:"grid-3"},H=N({__name:"AddWorkshop",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(f,{emit:R}){const h=f,w=R,_=h.open!==void 0,B=S(),j=T(),d=_?h.id:B.params.id,i=V(!1),e=y({workshop_name:"",workshop_phone:"",workshop_address:"",user_fname:"",user_lname:"",user_phone:""}),u=y({});async function m(){var t,a;if(Object.keys(u).forEach(l=>delete u[l]),e.workshop_name||(u.workshop_name="لطفا مقدار را وارد کنید"),(e.user_fname||e.user_lname)&&!e.user_phone&&(u.user_phone="موبایل سرپرست کارگاه الزامی است"),!Object.keys(u).length)try{i.value=!0,d?await v.put(`workshop/${d}`,e):await v.post("workshop",e),c.info("اطلاعات با موفقیت به ثبت رسید."),_?(w("success"),w("update:open",!1)):j.push("/workshop/list")}catch(l){c.error(((a=(t=l==null?void 0:l.response)==null?void 0:t.data)==null?void 0:a.message)??"خطا در ثبت اطلاعات.")}finally{i.value=!1}}return O(async()=>{if(d)try{const{data:t}=await v.get(`workshop/${d}`);Object.assign(e,{workshop_name:t.workshop_name??t.name??"",workshop_phone:t.workshop_phone??t.phone??"",workshop_address:t.workshop_address??t.address??"",user_fname:t.user_fname??"",user_lname:t.user_lname??"",user_phone:t.user_phone??""})}catch(t){console.log(t)}}),(t,a)=>{const l=p("a-input"),r=p("a-form-item"),k=p("a-textarea"),C=p("a-button"),$=p("a-card"),z=p("a-form"),M=p("a-spin");return _?(U(),b(W,{key:0,open:!!f.open,id:g(d),"add-title":"افزودن کارگاه","edit-title":"ویرایش کارگاه",loading:i.value,submitting:i.value,width:"lg","onUpdate:open":a[6]||(a[6]=s=>t.$emit("update:open",s)),onSubmit:m},{default:n(()=>[x("div",q,[o(r,{label:"نام کارگاه","validate-status":u.workshop_name?"error":"",help:u.workshop_name},{default:n(()=>[o(l,{value:e.workshop_name,"onUpdate:value":a[0]||(a[0]=s=>e.workshop_name=s)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"تلفن کارگاه"},{default:n(()=>[o(l,{value:e.workshop_phone,"onUpdate:value":a[1]||(a[1]=s=>e.workshop_phone=s)},null,8,["value"])]),_:1}),o(r,{label:"نام سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_fname,"onUpdate:value":a[2]||(a[2]=s=>e.user_fname=s)},null,8,["value"])]),_:1}),o(r,{label:"نام خانوادگی سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_lname,"onUpdate:value":a[3]||(a[3]=s=>e.user_lname=s)},null,8,["value"])]),_:1}),o(r,{label:"موبایل سرپرست کارگاه","validate-status":u.user_phone?"error":"",help:u.user_phone},{default:n(()=>[o(l,{value:e.user_phone,"onUpdate:value":a[4]||(a[4]=s=>e.user_phone=s)},null,8,["value"])]),_:1},8,["validate-status","help"])]),o(r,{label:"آدرس"},{default:n(()=>[o(k,{value:e.workshop_address,"onUpdate:value":a[5]||(a[5]=s=>e.workshop_address=s),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1})]),_:1},8,["open","id","loading","submitting"])):(U(),b(M,{key:1,spinning:i.value},{default:n(()=>[o(z,{layout:"vertical",onSubmit:E(m,["prevent"])},{default:n(()=>[o($,{title:g(d)?"ویرایش کارگاه":"افزودن کارگاه",class:"mb-base"},{default:n(()=>[x("div",D,[o(r,{label:"نام کارگاه","validate-status":u.workshop_name?"error":"",help:u.workshop_name},{default:n(()=>[o(l,{value:e.workshop_name,"onUpdate:value":a[7]||(a[7]=s=>e.workshop_name=s)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"تلفن کارگاه"},{default:n(()=>[o(l,{value:e.workshop_phone,"onUpdate:value":a[8]||(a[8]=s=>e.workshop_phone=s)},null,8,["value"])]),_:1}),o(r,{label:"نام سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_fname,"onUpdate:value":a[9]||(a[9]=s=>e.user_fname=s)},null,8,["value"])]),_:1}),o(r,{label:"نام خانوادگی سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_lname,"onUpdate:value":a[10]||(a[10]=s=>e.user_lname=s)},null,8,["value"])]),_:1}),o(r,{label:"موبایل سرپرست کارگاه","validate-status":u.user_phone?"error":"",help:u.user_phone},{default:n(()=>[o(l,{value:e.user_phone,"onUpdate:value":a[11]||(a[11]=s=>e.user_phone=s)},null,8,["value"])]),_:1},8,["validate-status","help"])]),o(r,{label:"آدرس"},{default:n(()=>[o(k,{value:e.workshop_address,"onUpdate:value":a[12]||(a[12]=s=>e.workshop_address=s),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1}),o(C,{type:"primary",onClick:m},{default:n(()=>[...a[13]||(a[13]=[A("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{H as _};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.stats[data-v-eef9d79c]{display:flex;flex-wrap:wrap;gap:.5rem}.mt-4[data-v-eef9d79c]{margin-top:1rem}@media (max-width: 575px){.mt-4[data-v-eef9d79c]{margin-top:12px}.stats[data-v-eef9d79c] .ant-tag{margin:0}.detail-tabs[data-v-eef9d79c] .ant-tabs-nav{margin-bottom:8px}.detail-tabs[data-v-eef9d79c] .ant-table-content{overflow-x:auto}.detail-tabs[data-v-eef9d79c] .ant-table-content>table{min-width:max-content}}
|
||||||
@@ -1 +0,0 @@
|
|||||||
.stats[data-v-726ef090]{display:flex;gap:.5rem}.mt-4[data-v-726ef090]{margin-top:1rem}
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{d as D,v as S,x as A,a as b,w as a,j as F,l as y,r as d,o as i,c as l,f as o,t as s,n as E,b as p,F as f,h as I,i as k,_ as M}from"./index-CJkJkMFX.js";import{j}from"./filters-Bg3NuEZs.js";import"./index-CcPs5_14.js";const R={class:"stats mt-4"},T=D({__name:"AgentDetail",setup($){const h=F().params.id,m=y(!1),n=y(void 0),C=[{title:"نام",dataIndex:"name"},{title:"موبایل",dataIndex:"mobile"},{title:"شهر",dataIndex:"city"},{title:"نوع",dataIndex:"type_str"},{title:"وضعیت",dataIndex:"active"},{title:"تاریخ ثبت",dataIndex:"caj"}],w=[{title:"شماره سفارش",dataIndex:"name"},{title:"مشتری",dataIndex:"customer"},{title:"وزن",dataIndex:"w"},{title:"وضعیت",dataIndex:"status"},{title:"تاریخ",dataIndex:"caj"}];return S(async()=>{try{m.value=!0;const{data:_}=await A.get(`admin/customers-omde/reagent/${h}`);n.value=_}catch(_){console.log(_)}finally{m.value=!1}}),(_,G)=>{const c=d("a-descriptions-item"),u=d("a-tag"),z=d("a-descriptions"),B=d("a-card"),v=d("a-table"),x=d("a-tab-pane"),N=d("a-tabs"),V=d("a-spin");return i(),b(V,{spinning:m.value},{default:a(()=>[l(B,{title:"مشاهده اطلاعات کارشناس فروش",class:"page-card"},{default:a(()=>[l(z,{bordered:"",size:"small",column:{xxl:3,xl:3,lg:3,md:2,sm:2,xs:1}},{default:a(()=>[l(c,{label:"نام"},{default:a(()=>{var e;return[o(s(((e=n.value)==null?void 0:e.name)??"-"),1)]}),_:1}),l(c,{label:"موبایل"},{default:a(()=>{var e;return[o(s(((e=n.value)==null?void 0:e.mobile)??"-"),1)]}),_:1}),l(c,{label:"شعبه"},{default:a(()=>{var e,t;return[o(s(((t=(e=n.value)==null?void 0:e.branch)==null?void 0:t.name)??"-"),1)]}),_:1}),l(c,{label:"درصد کمیسیون"},{default:a(()=>{var e;return[o(s(((e=n.value)==null?void 0:e.percent)??"-"),1)]}),_:1}),l(c,{label:"وضعیت"},{default:a(()=>{var e;return[l(u,{color:((e=n.value)==null?void 0:e.active)===1?"green":"red"},{default:a(()=>{var t;return[o(s(((t=n.value)==null?void 0:t.active)===1?"فعال":"غیر فعال"),1)]}),_:1},8,["color"])]}),_:1}),l(c,{label:"میزان فروش (گرم)"},{default:a(()=>{var e;return[o(s(((e=n.value)==null?void 0:e.grams_sell)??0),1)]}),_:1})]),_:1}),E("div",R,[l(u,{color:"blue"},{default:a(()=>{var e,t;return[o("مشتریان معرفیشده: "+s(((t=(e=n.value)==null?void 0:e.referred_customers)==null?void 0:t.length)??0),1)]}),_:1}),l(u,{color:"green"},{default:a(()=>{var e,t;return[o("سفارشهای ثبتشده: "+s(((t=(e=n.value)==null?void 0:e.orders)==null?void 0:t.length)??0),1)]}),_:1})])]),_:1}),l(N,{class:"mt-4 detail-tabs","default-active-key":"referred"},{default:a(()=>[l(x,{key:"referred",tab:"مشتریان معرفیشده"},{default:a(()=>{var e;return[l(v,{size:"small","data-source":(e=n.value)==null?void 0:e.referred_customers,columns:C,pagination:{pageSize:10},"row-key":"id"},{bodyCell:a(({column:t,record:r})=>{var g;return[t.dataIndex==="active"?(i(),b(u,{key:0,color:r.active===1?"green":"red"},{default:a(()=>[o(s(r.active===1?"فعال":"غیر فعال"),1)]),_:2},1032,["color"])):t.dataIndex==="city"?(i(),p(f,{key:1},[o(s(((g=r.city)==null?void 0:g.title)??"-"),1)],64)):t.dataIndex==="caj"?(i(),p(f,{key:2},[o(s(I(j)(r.caj)),1)],64)):k("",!0)]}),_:1},8,["data-source"])]}),_:1}),l(x,{key:"orders",tab:"سفارشهای مشتریان"},{default:a(()=>{var e;return[l(v,{size:"small","data-source":(e=n.value)==null?void 0:e.orders,columns:w,pagination:{pageSize:10},"row-key":"id"},{bodyCell:a(({column:t,record:r})=>[t.dataIndex==="caj"?(i(),p(f,{key:0},[o(s(I(j)(r.caj)),1)],64)):k("",!0)]),_:1},8,["data-source"])]}),_:1})]),_:1})]),_:1},8,["spinning"])}}}),L=M(T,[["__scopeId","data-v-eef9d79c"]]);export{L as default};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{d as D,v as S,x as A,a as x,w as a,j as F,l as y,r as d,o as i,c as o,f as l,t as s,n as E,b as p,F as f,h as I,i as k}from"./index-CaCGCy-S.js";import{j}from"./filters-C93Q9hM6.js";import{_ as M}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./index-Bi0xiLCU.js";const R={class:"stats mt-4"},T=D({__name:"AgentDetail",setup($){const h=F().params.id,m=y(!1),n=y(void 0),C=[{title:"نام",dataIndex:"name"},{title:"موبایل",dataIndex:"mobile"},{title:"شهر",dataIndex:"city"},{title:"نوع",dataIndex:"type_str"},{title:"وضعیت",dataIndex:"active"},{title:"تاریخ ثبت",dataIndex:"caj"}],w=[{title:"شماره سفارش",dataIndex:"name"},{title:"مشتری",dataIndex:"customer"},{title:"وزن",dataIndex:"w"},{title:"وضعیت",dataIndex:"status"},{title:"تاریخ",dataIndex:"caj"}];return S(async()=>{try{m.value=!0;const{data:_}=await A.get(`admin/customers-omde/reagent/${h}`);n.value=_}catch(_){console.log(_)}finally{m.value=!1}}),(_,G)=>{const c=d("a-descriptions-item"),u=d("a-tag"),z=d("a-descriptions"),B=d("a-card"),v=d("a-table"),g=d("a-tab-pane"),N=d("a-tabs"),V=d("a-spin");return i(),x(V,{spinning:m.value},{default:a(()=>[o(B,{title:"مشاهده اطلاعات کارشناس فروش"},{default:a(()=>[o(z,{bordered:"",size:"small",column:3},{default:a(()=>[o(c,{label:"نام"},{default:a(()=>{var e;return[l(s(((e=n.value)==null?void 0:e.name)??"-"),1)]}),_:1}),o(c,{label:"موبایل"},{default:a(()=>{var e;return[l(s(((e=n.value)==null?void 0:e.mobile)??"-"),1)]}),_:1}),o(c,{label:"شعبه"},{default:a(()=>{var e,t;return[l(s(((t=(e=n.value)==null?void 0:e.branch)==null?void 0:t.name)??"-"),1)]}),_:1}),o(c,{label:"درصد کمیسیون"},{default:a(()=>{var e;return[l(s(((e=n.value)==null?void 0:e.percent)??"-"),1)]}),_:1}),o(c,{label:"وضعیت"},{default:a(()=>{var e;return[o(u,{color:((e=n.value)==null?void 0:e.active)===1?"green":"red"},{default:a(()=>{var t;return[l(s(((t=n.value)==null?void 0:t.active)===1?"فعال":"غیر فعال"),1)]}),_:1},8,["color"])]}),_:1}),o(c,{label:"میزان فروش (گرم)"},{default:a(()=>{var e;return[l(s(((e=n.value)==null?void 0:e.grams_sell)??0),1)]}),_:1})]),_:1}),E("div",R,[o(u,{color:"blue"},{default:a(()=>{var e,t;return[l("مشتریان معرفیشده: "+s(((t=(e=n.value)==null?void 0:e.referred_customers)==null?void 0:t.length)??0),1)]}),_:1}),o(u,{color:"green"},{default:a(()=>{var e,t;return[l("سفارشهای ثبتشده: "+s(((t=(e=n.value)==null?void 0:e.orders)==null?void 0:t.length)??0),1)]}),_:1})])]),_:1}),o(N,{class:"mt-4","default-active-key":"referred"},{default:a(()=>[o(g,{key:"referred",tab:"مشتریان معرفیشده"},{default:a(()=>{var e;return[o(v,{size:"small","data-source":(e=n.value)==null?void 0:e.referred_customers,columns:C,pagination:{pageSize:10},"row-key":"id"},{bodyCell:a(({column:t,record:r})=>{var b;return[t.dataIndex==="active"?(i(),x(u,{key:0,color:r.active===1?"green":"red"},{default:a(()=>[l(s(r.active===1?"فعال":"غیر فعال"),1)]),_:2},1032,["color"])):t.dataIndex==="city"?(i(),p(f,{key:1},[l(s(((b=r.city)==null?void 0:b.title)??"-"),1)],64)):t.dataIndex==="caj"?(i(),p(f,{key:2},[l(s(I(j)(r.caj)),1)],64)):k("",!0)]}),_:1},8,["data-source"])]}),_:1}),o(g,{key:"orders",tab:"سفارشهای مشتریان"},{default:a(()=>{var e;return[o(v,{size:"small","data-source":(e=n.value)==null?void 0:e.orders,columns:w,pagination:{pageSize:10},"row-key":"id"},{bodyCell:a(({column:t,record:r})=>[t.dataIndex==="caj"?(i(),p(f,{key:0},[l(s(I(j)(r.caj)),1)],64)):k("",!0)]),_:1},8,["data-source"])]}),_:1})]),_:1})]),_:1},8,["spinning"])}}}),O=M(T,[["__scopeId","data-v-726ef090"]]);export{O as default};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{c as i,I as u}from"./index-CJkJkMFX.js";var l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"};function a(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),n.forEach(function(c){p(r,c,e[c])})}return r}function p(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var o=function(t,e){var n=a({},t,e.attrs);return i(u,a({},n,{icon:l}),null)};o.displayName="AppstoreOutlined";o.inheritAttrs=!1;export{o as A};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{b as m,O as e,a as i}from"./omdeListModel-DAVtaYo3.js";import{d as p,a,h as t,o as s}from"./index-CJkJkMFX.js";import"./model-Dhlo-7J6.js";import"./filters-Bg3NuEZs.js";import"./index-CcPs5_14.js";import"./SettingOutlined-M4ZHugxj.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-Df3Sf6qU.js";import"./AccountingSyncButton.vue_vue_type_script_setup_true_lang-D0sRb0mO.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-Oqr_La0l.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DJoKJ02i.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-C-XoiP-s.js";import"./DateInput-Bd3GkdF5.js";import"./UserOutlined-B6p2SzcN.js";import"./ShopOutlined-CLnJ_zq6.js";import"./PercentageOutlined-BDHjAjTy.js";import"./SafetyCertificateOutlined-Dpqr0GGL.js";import"./UnorderedListOutlined-BzWwCg94.js";const g=p({__name:"BankerList",setup(n){const o=e.banker.title,r=m("banker");return(l,c)=>(s(),a(i,{title:t(o),model:t(r)},null,8,["title","model"]))}});export{g as default};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{b as r,O as i,_ as m}from"./omdeListModel-WMsOvXcD.js";import{d as a,a as n,h as t,o as s}from"./index-CaCGCy-S.js";import"./model-Cu9jLjyk.js";import"./SettingOutlined-BBHg-1Oy.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-VldxzPkI.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-lNpQ9uTu.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CKkGO86U.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-Av3ruB17.js";import"./UnorderedListOutlined-DlwDSU5E.js";const C=a({__name:"BankerList",setup(p){const o=i.banker.title,e=r("banker");return(l,_)=>(s(),n(m,{title:t(o),model:t(e)},null,8,["title","model"]))}});export{C as default};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
@media (max-width: 575px){.base-form-modal .ant-modal{width:100vw!important;max-width:100vw;top:0;margin:0;padding-bottom:0}.base-form-modal .ant-modal-content{display:flex;flex-direction:column;min-height:calc(var(--vh, 1vh) * 100);border-radius:0;padding:14px 16px 0}.base-form-modal .ant-modal-header{margin-bottom:12px}.base-form-modal .ant-modal-body{flex:1}.base-form-modal .ant-modal-footer{position:sticky;bottom:0;display:flex;gap:8px;margin:0 -16px;padding:10px 16px;background:#fff;border-top:1px solid #f0f0f0}.base-form-modal .ant-modal-footer>.ant-btn{flex:1;margin:0!important}}
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
import{d as r,a as g,w as o,r as a,o as k,c as l,V as x}from"./index-CaCGCy-S.js";const B=r({__name:"BaseFormModal",props:{open:{type:Boolean},id:{default:void 0},addTitle:{},editTitle:{},loading:{type:Boolean,default:!1},submitting:{type:Boolean,default:!1},width:{default:"md"},okText:{default:"ثبت اطلاعات"}},emits:["update:open","submit","cancel"],setup(e,{emit:d}){const n=d,s={sm:520,md:720,lg:900,xl:1140};function m(t){n("update:open",t)}function c(){n("update:open",!1),n("cancel")}return(t,i)=>{const f=a("a-form"),u=a("a-spin"),p=a("a-modal");return k(),g(p,{open:e.open,title:e.id?e.editTitle:e.addTitle,width:s[e.width],"confirm-loading":e.submitting,"ok-text":e.okText,"cancel-text":"انصراف","mask-closable":!1,"onUpdate:open":m,onOk:i[0]||(i[0]=T=>t.$emit("submit")),onCancel:c},{default:o(()=>[l(u,{spinning:e.loading},{default:o(()=>[l(f,{layout:"vertical"},{default:o(()=>[x(t.$slots,"default")]),_:3})]),_:3},8,["spinning"])]),_:3},8,["open","title","width","confirm-loading","ok-text"])}}});export{B as _};
|
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
import{d as r,a as g,w as a,r as o,o as k,c as i,a6 as w}from"./index-CJkJkMFX.js";const b=r({__name:"BaseFormModal",props:{open:{type:Boolean},id:{default:void 0},addTitle:{},editTitle:{},loading:{type:Boolean,default:!1},submitting:{type:Boolean,default:!1},width:{default:"md"},okText:{default:"ثبت اطلاعات"}},emits:["update:open","submit","cancel"],setup(e,{emit:d}){const n=d,s={sm:520,md:720,lg:900,xl:1140};function m(t){n("update:open",t)}function c(){n("update:open",!1),n("cancel")}return(t,l)=>{const f=o("a-form"),u=o("a-spin"),p=o("a-modal");return k(),g(p,{open:e.open,title:e.id?e.editTitle:e.addTitle,width:s[e.width],"confirm-loading":e.submitting,"ok-text":e.okText,"cancel-text":"انصراف","mask-closable":!1,"wrap-class-name":"base-form-modal","onUpdate:open":m,onOk:l[0]||(l[0]=x=>t.$emit("submit")),onCancel:c},{default:a(()=>[i(u,{spinning:e.loading},{default:a(()=>[i(f,{layout:"vertical"},{default:a(()=>[w(t.$slots,"default")]),_:3})]),_:3},8,["spinning"])]),_:3},8,["open","title","width","confirm-loading","ok-text"])}}});export{b as _};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{c as i,I as u}from"./index-CJkJkMFX.js";var o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 248H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-47.8 22.9-64.2h250.5l22.9 64.2 17.1 47.8H864c4.4 0 8 3.6 8 8v456zM512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z"}}]},name:"camera",theme:"outlined"};function c(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},a=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(t).filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),a.forEach(function(n){f(r,n,t[n])})}return r}function f(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var l=function(e,t){var a=c({},e,t.attrs);return i(u,c({},a,{icon:o}),null)};l.displayName="CameraOutlined";l.inheritAttrs=!1;export{l as C};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{d as P,v as S,x as u,b as m,c as o,w as l,l as _,r as s,y as T,o as d,n as $,F as w,e as C,f as g,B as D,M as k,a as x,t as B}from"./index-CJkJkMFX.js";const E={id:"page-user-list"},j={class:"grid-3"},A=P({__name:"ChangePercent",setup(q){const y=_([]),b=_([]),p=_("-"),f=_(!1),a=T({category_id:void 0,brand_id:void 0,percent:void 0});function h(t,e){var r,c;return String(((c=(r=e==null?void 0:e.children)==null?void 0:r[0])==null?void 0:c.children)??"").toLowerCase().indexOf(t.toLowerCase())>=0}async function v(){try{const{data:t}=await u.post("change/percent/count",{category_id:a.category_id,brand_id:a.brand_id});p.value=t.count}catch(t){console.log("e ==> ",t)}}async function L(){if(a.percent===void 0||a.percent===null){D.error("لطفا اجرت درصدی را وارد کنید");return}try{f.value=!0;const{data:t}=await u.post("change/all",{percent:a.percent,category_id:a.category_id,brand_id:a.brand_id});k.success({title:"تغییرات با موفقیت اعمال شد",okText:"بستن"}),p.value=t.updated}catch(t){k.success({title:"خطا در اعمال تغییرات"}),console.log(t)}finally{f.value=!1}}return S(async()=>{try{const[t,e]=await Promise.all([u.get("brand"),u.post("category")]);y.value=t.data,b.value=(e.data.rows??e.data).map(r=>({id:r.id,title:r.type_str?`${r.title} (${r.type_str}) `:r.title}))}catch(t){console.log(t)}v()}),(t,e)=>{const r=s("a-select-option"),c=s("a-select"),i=s("a-form-item"),M=s("a-input"),N=s("a-input-number"),U=s("a-button"),V=s("a-popconfirm"),F=s("a-form"),O=s("a-card");return d(),m("div",E,[o(O,{title:"تغییر درصد محصولات",class:"page-card"},{default:l(()=>[o(F,{layout:"vertical"},{default:l(()=>[$("div",j,[o(i,{label:"دسته بندی"},{default:l(()=>[o(c,{value:a.category_id,"onUpdate:value":e[0]||(e[0]=n=>a.category_id=n),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":h,onChange:v},{default:l(()=>[(d(!0),m(w,null,C(b.value,n=>(d(),x(r,{key:n.id,value:n.id},{default:l(()=>[g(B(n.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),o(i,{label:"برند"},{default:l(()=>[o(c,{value:a.brand_id,"onUpdate:value":e[1]||(e[1]=n=>a.brand_id=n),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":h,onChange:v},{default:l(()=>[(d(!0),m(w,null,C(y.value,n=>(d(),x(r,{key:n.id,value:n.id},{default:l(()=>[g(B(n.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),o(i,{label:"تعداد یافت شده"},{default:l(()=>[o(M,{value:p.value,disabled:""},null,8,["value"])]),_:1}),o(i,{label:"اجرت درصدی"},{default:l(()=>[o(N,{value:a.percent,"onUpdate:value":e[2]||(e[2]=n=>a.percent=n),class:"w-full",step:.1},null,8,["value"])]),_:1})]),o(V,{title:"آیا از اعمال تغییرات مطمئن هستید؟","ok-text":"بله","cancel-text":"خیر",onConfirm:L},{default:l(()=>[o(U,{type:"primary",class:"form-submit",loading:f.value},{default:l(()=>[...e[3]||(e[3]=[g("اعمال تغییرات",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1})])}}});export{A as default};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{d as P,v as S,x as u,b as m,c as o,w as l,l as _,r as c,y as T,o as d,n as $,F as w,e as C,f as g,z,M as k,a as x,t as B}from"./index-CaCGCy-S.js";const D={id:"page-user-list"},E={class:"grid-3"},A=P({__name:"ChangePercent",setup(j){const y=_([]),b=_([]),p=_("-"),f=_(!1),a=T({category_id:void 0,brand_id:void 0,percent:void 0});function h(t,e){var r,s;return String(((s=(r=e==null?void 0:e.children)==null?void 0:r[0])==null?void 0:s.children)??"").toLowerCase().indexOf(t.toLowerCase())>=0}async function v(){try{const{data:t}=await u.post("change/percent/count",{category_id:a.category_id,brand_id:a.brand_id});p.value=t.count}catch(t){console.log("e ==> ",t)}}async function L(){if(a.percent===void 0||a.percent===null){z.error("لطفا اجرت درصدی را وارد کنید");return}try{f.value=!0;const{data:t}=await u.post("change/all",{percent:a.percent,category_id:a.category_id,brand_id:a.brand_id});k.success({title:"تغییرات با موفقیت اعمال شد",okText:"بستن"}),p.value=t.updated}catch(t){k.success({title:"خطا در اعمال تغییرات"}),console.log(t)}finally{f.value=!1}}return S(async()=>{try{const[t,e]=await Promise.all([u.get("brand"),u.post("category")]);y.value=t.data,b.value=(e.data.rows??e.data).map(r=>({id:r.id,title:r.type_str?`${r.title} (${r.type_str}) `:r.title}))}catch(t){console.log(t)}v()}),(t,e)=>{const r=c("a-select-option"),s=c("a-select"),i=c("a-form-item"),M=c("a-input"),N=c("a-input-number"),U=c("a-button"),V=c("a-popconfirm"),F=c("a-form"),O=c("a-card");return d(),m("div",D,[o(O,{title:"تغییر درصد محصولات"},{default:l(()=>[o(F,{layout:"vertical"},{default:l(()=>[$("div",E,[o(i,{label:"دسته بندی"},{default:l(()=>[o(s,{value:a.category_id,"onUpdate:value":e[0]||(e[0]=n=>a.category_id=n),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":h,onChange:v},{default:l(()=>[(d(!0),m(w,null,C(b.value,n=>(d(),x(r,{key:n.id,value:n.id},{default:l(()=>[g(B(n.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),o(i,{label:"برند"},{default:l(()=>[o(s,{value:a.brand_id,"onUpdate:value":e[1]||(e[1]=n=>a.brand_id=n),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":h,onChange:v},{default:l(()=>[(d(!0),m(w,null,C(y.value,n=>(d(),x(r,{key:n.id,value:n.id},{default:l(()=>[g(B(n.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),o(i,{label:"تعداد یافت شده"},{default:l(()=>[o(M,{value:p.value,disabled:""},null,8,["value"])]),_:1}),o(i,{label:"اجرت درصدی"},{default:l(()=>[o(N,{value:a.percent,"onUpdate:value":e[2]||(e[2]=n=>a.percent=n),class:"w-full",step:.1},null,8,["value"])]),_:1})]),o(V,{title:"آیا از اعمال تغییرات مطمئن هستید؟","ok-text":"بله","cancel-text":"خیر",onConfirm:L},{default:l(()=>[o(U,{type:"primary",loading:f.value},{default:l(()=>[...e[3]||(e[3]=[g("اعمال تغییرات",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1})])}}});export{A as default};
|
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
import{d as m,o as v,a as g,q as w,r as k}from"./index-CJkJkMFX.js";const _=m({__name:"CityTreeSelect",props:{value:{},cities:{},parentPicker:{type:Boolean},excludeId:{},placeholder:{}},emits:["update:value","change"],setup(i,{emit:u}){const n=i,d=u,h=w(()=>{const l=new Set(n.cities.map(e=>e.id)),o=new Map;for(const e of n.cities){const a=e.parent&&l.has(e.parent)&&e.parent!==e.id?e.parent:null;o.has(a)||o.set(a,[]),o.get(a).push(e)}const r=new Set,p=(e,a)=>(o.get(e)??[]).filter(t=>!r.has(t.id)&&!(n.parentPicker&&t.id===n.excludeId)).map(t=>{r.add(t.id);const s=p(t.id,a+1),c={value:t.id,key:t.id,title:t.title};return s.length&&(c.children=s),!n.parentPicker&&a===0&&s.length&&(c.disabled=!0),c});return p(null,0)});function f(l){d("update:value",l??void 0),d("change",l??void 0)}return(l,o)=>{const r=k("a-tree-select");return v(),g(r,{value:i.value??void 0,"tree-data":h.value,"show-search":"","allow-clear":"","tree-default-expand-all":"","tree-node-filter-prop":"title","dropdown-style":{maxHeight:"400px",overflow:"auto"},placeholder:i.placeholder??"شهر را انتخاب کنید",class:"w-full","onUpdate:value":f},null,8,["value","tree-data","placeholder"])}}});export{_};
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
.mr-3[data-v-6332a204]{margin-left:.75rem}.comments-list ul[data-v-6332a204]{list-style:none;padding-right:0}.comment-item[data-v-6332a204]{display:flex;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}.comment-item .img[data-v-6332a204]{width:65px;height:65px;display:flex;align-items:center;justify-content:center}.comment-body[data-v-6332a204]{flex:1;min-width:240px}.comment-body .time[data-v-6332a204]{font-size:12px;color:#888}.border[data-v-6332a204]{border:1px solid grey;border-radius:50%}
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
.mr-3[data-v-e1f6f0e2]{margin-left:.75rem}.comments-list ul[data-v-e1f6f0e2]{list-style:none;padding-right:0}.comment-item[data-v-e1f6f0e2]{display:flex;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}.comment-item .img[data-v-e1f6f0e2]{width:65px;height:65px;display:flex;align-items:center;justify-content:center}.comment-body[data-v-e1f6f0e2]{flex:1;min-width:240px}.comment-body .time[data-v-e1f6f0e2]{font-size:12px;color:#888}.border[data-v-e1f6f0e2]{border:1px solid grey;border-radius:50%}@media (max-width: 575px){.comment-item[data-v-e1f6f0e2]{gap:10px;flex-wrap:nowrap;margin-bottom:12px}.comment-item .img[data-v-e1f6f0e2]{width:40px;height:40px;flex-shrink:0}.comment-body[data-v-e1f6f0e2]{min-width:0}}
|
||||||
@@ -1 +0,0 @@
|
|||||||
.row[data-v-580880e4]{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.tags[data-v-580880e4]{display:flex;gap:.5rem;flex-wrap:wrap}.slide[data-v-580880e4]{border:1px solid #f0f0f0;border-radius:6px;padding:.75rem;margin-bottom:.75rem}.mobile-c[data-v-580880e4]{margin:0 0 .5rem}.mt-4[data-v-580880e4]{margin-top:1rem}
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
.row[data-v-e791ba95]{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.tags[data-v-e791ba95]{display:flex;gap:.5rem;flex-wrap:wrap}.slide[data-v-e791ba95]{border:1px solid #f0f0f0;border-radius:6px;padding:.75rem;margin-bottom:.75rem}.mobile-c[data-v-e791ba95]{margin:0 0 .5rem}.mt-4[data-v-e791ba95]{margin-top:1rem}@media (max-width: 575px){.row>.ant-input[data-v-e791ba95]{flex:1 1 140px;max-width:none!important}.slide[data-v-e791ba95]{padding:10px}.slide .row[data-v-e791ba95]>*{flex:1 1 100%}.mt-4[data-v-e791ba95]{margin-top:12px}}
|
||||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
|||||||
import{c as u,I as l}from"./index-CaCGCy-S.js";var d={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"};function c(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.forEach(function(a){o(r,a,e[a])})}return r}function o(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var i=function(t,e){var n=c({},t,e.attrs);return u(l,c({},n,{icon:d}),null)};i.displayName="CreditCardOutlined";i.inheritAttrs=!1;export{i as C};
|
import{c as u,I as l}from"./index-CJkJkMFX.js";var d={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"};function c(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.forEach(function(a){o(r,a,e[a])})}return r}function o(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var i=function(t,e){var n=c({},t,e.attrs);return u(l,c({},n,{icon:d}),null)};i.displayName="CreditCardOutlined";i.inheritAttrs=!1;export{i as C};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.mt-4[data-v-3185cd59]{margin-top:1rem}.mt-2[data-v-3185cd59]{margin-top:.5rem}.ms-2[data-v-3185cd59]{margin-inline-start:.5rem}.muted[data-v-3185cd59]{color:#888}.small[data-v-3185cd59]{font-size:12px}.warn[data-v-3185cd59]{color:#d4380d}.debt[data-v-3185cd59]{color:#cf1322}.credit[data-v-3185cd59]{color:#389e0d}.stats[data-v-445a9145]{display:flex;flex-wrap:wrap;gap:.5rem}.mt-4[data-v-445a9145]{margin-top:1rem}@media (max-width: 575px){.mt-4[data-v-445a9145]{margin-top:12px}.stats[data-v-445a9145] .ant-tag{margin:0}.detail-tabs[data-v-445a9145] .ant-tabs-nav{margin-bottom:8px}.detail-tabs[data-v-445a9145] .ant-table-content{overflow-x:auto}.detail-tabs[data-v-445a9145] .ant-table-content>table{min-width:max-content}}
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
.stats[data-v-9dee124b]{display:flex;gap:.5rem}.mt-4[data-v-9dee124b]{margin-top:1rem}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
.stat-card[data-v-2ccaa937]{height:100%}.stat-row[data-v-2ccaa937]{display:flex;align-items:center;gap:1rem}.stat-icon[data-v-2ccaa937]{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;font-size:22px;flex-shrink:0}.icon-primary[data-v-2ccaa937]{background:#1c2d561a;color:#1c2d56}.icon-warning[data-v-2ccaa937]{background:#ff9f431f;color:#ff9f43}.icon-success[data-v-2ccaa937]{background:#28c76f1f;color:#28c76f}.icon-danger[data-v-2ccaa937]{background:#ea54551f;color:#ea5455}.stat-value[data-v-2ccaa937]{margin:0;font-size:20px;color:#1c2d56}.stat-title[data-v-2ccaa937]{font-size:12px;color:#888}.mt-4[data-v-585a18f1]{margin-top:1rem}.mt-3[data-v-585a18f1]{margin-top:.75rem}
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
.hint[data-v-3863c3bc]{color:#ea5455;font-size:11px}
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{m}from"./index-CcPs5_14.js";import{d as _,m as V,o as r,a as Y,w as h,c as D,b,t as j,i as M,l as d,q as x,r as i,_ as y}from"./index-CJkJkMFX.js";const k={key:0,class:"hint"},C=_({__name:"DateInput",props:{label:{},modelValue:{},placeholder:{default:"مثال: ۱۴۰۳/۰۵/۱۲"}},emits:["update:modelValue"],setup(o,{emit:p}){const n=o,u=p,t=d(void 0),a=d(""),v=x(()=>{if(t.value!==void 0)return t.value;if(!n.modelValue)return"";const e=m(n.modelValue);return e.isValid()?e.format("jYYYY/jMM/jDD"):""});V(()=>n.modelValue,()=>{t.value=void 0});function f(e){if(t.value=e,!e){a.value="",u("update:modelValue",void 0);return}const c=e.replace(/[۰-۹]/g,s=>String("۰۱۲۳۴۵۶۷۸۹".indexOf(s))),l=m(c,"jYYYY/jMM/jDD");l.isValid()?(a.value="",u("update:modelValue",l.format("YYYY-MM-DD"))):a.value="تاریخ معتبر نیست"}return(e,c)=>{const l=i("a-input"),s=i("a-form-item");return r(),Y(s,{label:o.label},{default:h(()=>[D(l,{value:v.value,placeholder:o.placeholder,"allow-clear":"","onUpdate:value":f},null,8,["value","placeholder"]),a.value?(r(),b("small",k,j(a.value),1)):M("",!0)]),_:1},8,["label"])}}}),I=y(C,[["__scopeId","data-v-42b77d70"]]);export{I as D};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.hint[data-v-42b77d70]{color:#ea5455;font-size:11px}
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{m}from"./index-Bi0xiLCU.js";import{d as _,m as V,o as r,a as Y,w as h,c as D,b,t as j,i as M,l as i,p as x,r as d}from"./index-CaCGCy-S.js";import{_ as y}from"./_plugin-vue_export-helper-DlAUqK2U.js";const k={key:0,class:"hint"},C=_({__name:"DateInput",props:{label:{},modelValue:{},placeholder:{default:"مثال: ۱۴۰۳/۰۵/۱۲"}},emits:["update:modelValue"],setup(o,{emit:p}){const n=o,c=p,t=i(void 0),a=i(""),f=x(()=>{if(t.value!==void 0)return t.value;if(!n.modelValue)return"";const e=m(n.modelValue);return e.isValid()?e.format("jYYYY/jMM/jDD"):""});V(()=>n.modelValue,()=>{t.value=void 0});function v(e){if(t.value=e,!e){a.value="",c("update:modelValue",void 0);return}const u=e.replace(/[۰-۹]/g,s=>String("۰۱۲۳۴۵۶۷۸۹".indexOf(s))),l=m(u,"jYYYY/jMM/jDD");l.isValid()?(a.value="",c("update:modelValue",l.format("YYYY-MM-DD"))):a.value="تاریخ معتبر نیست"}return(e,u)=>{const l=d("a-input"),s=d("a-form-item");return r(),Y(s,{label:o.label},{default:h(()=>[D(l,{value:f.value,placeholder:o.placeholder,"allow-clear":"","onUpdate:value":v},null,8,["value","placeholder"]),a.value?(r(),b("small",k,j(a.value),1)):M("",!0)]),_:1},8,["label"])}}}),w=y(C,[["__scopeId","data-v-3863c3bc"]]);export{w as D};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{_ as o}from"./Add.vue_vue_type_script_setup_true_lang-CWLQwHa7.js";import{d as t,a as e,o as r}from"./index-CJkJkMFX.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DJoKJ02i.js";const i=t({__name:"Edit",setup(a){return(_,m)=>(r(),e(o))}});export{i as default};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{_ as o}from"./Add.vue_vue_type_script_setup_true_lang-DkYNhITX.js";import{d as t,a as e,o as r}from"./index-CaCGCy-S.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CKkGO86U.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-Av3ruB17.js";const i=t({__name:"Edit",setup(a){return(_,m)=>(r(),e(o))}});export{i as default};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{_ as e}from"./AddBranches.vue_vue_type_script_setup_true_lang-X9erv2LY.js";import{d as o,a,o as r}from"./index-CJkJkMFX.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";const p=o({__name:"EditBranches",setup(t){return(n,s)=>(r(),a(e))}});export{p as default};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{_ as e}from"./AddBranches.vue_vue_type_script_setup_true_lang-VDOAiW3Y.js";import{d as o,a,o as r}from"./index-CaCGCy-S.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CKkGO86U.js";const p=o({__name:"EditBranches",setup(t){return(n,s)=>(r(),a(e))}});export{p as default};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{_ as o}from"./bulkCustomer.vue_vue_type_script_setup_true_lang-Oqr_La0l.js";import{d as r,a as t,o as m}from"./index-CJkJkMFX.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DJoKJ02i.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-C-XoiP-s.js";import"./DateInput-Bd3GkdF5.js";import"./index-CcPs5_14.js";import"./UserOutlined-B6p2SzcN.js";import"./ShopOutlined-CLnJ_zq6.js";import"./PercentageOutlined-BDHjAjTy.js";import"./SafetyCertificateOutlined-Dpqr0GGL.js";const x=r({__name:"EditBulkCustomer",setup(p){return(a,e)=>(m(),t(o,{class:"page-card"}))}});export{x as default};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{_ as o}from"./bulkCustomer.vue_vue_type_script_setup_true_lang-lNpQ9uTu.js";import{d as t,a as e,o as r}from"./index-CaCGCy-S.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CKkGO86U.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-Av3ruB17.js";const i=t({__name:"EditBulkCustomer",setup(a){return(m,s)=>(r(),e(o))}});export{i as default};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import o from"./AddInvoice-DB3DcjKd.js";import{d as t,a as r,o as e}from"./index-CJkJkMFX.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";import"./model-Dhlo-7J6.js";import"./filters-Bg3NuEZs.js";import"./index-CcPs5_14.js";import"./SettingOutlined-M4ZHugxj.js";const u=t({__name:"EditInvoice",setup(p){return(i,m)=>(e(),r(o))}});export{u as default};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import o from"./AddInvoice--nhrZZUP.js";import{d as t,a as e,o as r}from"./index-CaCGCy-S.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CKkGO86U.js";import"./model-Cu9jLjyk.js";import"./SettingOutlined-BBHg-1Oy.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const f=t({__name:"EditInvoice",setup(p){return(i,m)=>(r(),e(o))}});export{f as default};
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
import e from"./AddProduct-B7klcXVo.js";import{d as o,b as t,c as r,o as c}from"./index-CaCGCy-S.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-Av3ruB17.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const _=o({__name:"EditProduct",setup(a){return(n,d)=>(c(),t("div",null,[r(e)]))}});export{_ as default};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import e from"./AddProduct-B0xAXjAX.js";import{d as o,b as t,c as r,o as c}from"./index-CJkJkMFX.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DJoKJ02i.js";import"./AppstoreOutlined-rx9lO6v2.js";const _=o({__name:"EditProduct",setup(a){return(n,d)=>(c(),t("div",null,[r(e)]))}});export{_ as default};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{R as t}from"./ReagentCustomer-DWOpEaGE.js";import{d as o,a as e,o as r}from"./index-CJkJkMFX.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-C-XoiP-s.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DJoKJ02i.js";import"./UserOutlined-B6p2SzcN.js";import"./ShopOutlined-CLnJ_zq6.js";import"./CameraOutlined-DaIK8Qbh.js";import"./PercentageOutlined-BDHjAjTy.js";const l=o({__name:"EditReagent",setup(a){return(p,m)=>(r(),e(t,{class:"page-card"}))}});export{l as default};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{R as e}from"./ReagentCustomer--RuiFYxp.js";import{d as t,a as o,o as r}from"./index-CaCGCy-S.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-Av3ruB17.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const i=t({__name:"EditReagent",setup(a){return(n,m)=>(r(),o(e))}});export{i as default};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{S as o}from"./singleCustomer-Bl29UTYy.js";import{d as r,a as e,o as t}from"./index-CJkJkMFX.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-C-XoiP-s.js";import"./DateInput-Bd3GkdF5.js";import"./index-CcPs5_14.js";import"./UserOutlined-B6p2SzcN.js";const u=r({__name:"EditSingleCustomer",setup(a){return(m,p)=>(t(),e(o,{class:"page-card"}))}});export{u as default};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{_ as e}from"./singleCustomer.vue_vue_type_script_setup_true_lang-tiiMc7wU.js";import{d as o,a as t,o as a}from"./index-CaCGCy-S.js";const m=o({__name:"EditSingleCustomer",setup(r){return(n,s)=>(a(),t(e))}});export{m as default};
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{_ as o}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-UT1HZ3uS.js";import{d as e,a as r,o as t}from"./index-CaCGCy-S.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CKkGO86U.js";const m=e({__name:"EditWorkshop",setup(a){return(s,_)=>(t(),r(o))}});export{m as default};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{_ as o}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-8Mvjpt5a.js";import{d as e,a as r,o as t}from"./index-CJkJkMFX.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";const m=e({__name:"EditWorkshop",setup(a){return(s,_)=>(t(),r(o))}});export{m as default};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.full-page-msg[data-v-4851d61e]{min-height:100vh;display:flex;align-items:center;justify-content:center}
|
||||||
@@ -1 +0,0 @@
|
|||||||
.full-page-msg[data-v-82a95474]{min-height:100vh;display:flex;align-items:center;justify-content:center}
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{_,b as c,c as e,w as o,f as l,r as s,o as u}from"./index-CJkJkMFX.js";const p={},d={class:"full-page-msg"};function i(r,t){const n=s("a-button"),a=s("a-result");return u(),c("div",d,[e(a,{status:"404",title:"صفحه مورد نظر یافت نشد","sub-title":"آدرسی که وارد کردهاید وجود ندارد."},{extra:o(()=>[e(n,{type:"primary",onClick:t[0]||(t[0]=f=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const x=_(p,[["render",i],["__scopeId","data-v-4851d61e"]]);export{x as default};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{b as c,c as e,w as o,f as l,r as s,o as p}from"./index-CaCGCy-S.js";const u={},i={class:"full-page-msg"};function m(r,t){const a=s("a-button"),n=s("a-result");return p(),c("div",i,[e(n,{status:"404",title:"صفحه مورد نظر یافت نشد","sub-title":"آدرسی که وارد کردهاید وجود ندارد."},{extra:o(()=>[e(a,{type:"primary",onClick:t[0]||(t[0]=d=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const b=_(u,[["render",m],["__scopeId","data-v-82a95474"]]);export{b as default};
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{b as c,c as e,w as o,f as l,r as s,o as p}from"./index-CaCGCy-S.js";const u={},i={class:"full-page-msg"};function m(r,t){const a=s("a-button"),n=s("a-result");return p(),c("div",i,[e(n,{status:"500",title:"خطای سرور","sub-title":"مشکلی در سرور رخ داده است. لطفاً بعداً تلاش کنید."},{extra:o(()=>[e(a,{type:"primary",onClick:t[0]||(t[0]=d=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const b=_(u,[["render",m],["__scopeId","data-v-1080291a"]]);export{b as default};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{_,b as c,c as e,w as o,f as l,r as s,o as u}from"./index-CJkJkMFX.js";const p={},d={class:"full-page-msg"};function i(r,t){const a=s("a-button"),n=s("a-result");return u(),c("div",d,[e(n,{status:"500",title:"خطای سرور","sub-title":"مشکلی در سرور رخ داده است. لطفاً بعداً تلاش کنید."},{extra:o(()=>[e(a,{type:"primary",onClick:t[0]||(t[0]=f=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const b=_(p,[["render",i],["__scopeId","data-v-abbac884"]]);export{b as default};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.full-page-msg[data-v-abbac884]{min-height:100vh;display:flex;align-items:center;justify-content:center}
|
||||||
@@ -1 +0,0 @@
|
|||||||
.full-page-msg[data-v-1080291a]{min-height:100vh;display:flex;align-items:center;justify-content:center}
|
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
import{d as B,a as i,w as l,r as C,o as s,c as d,a8 as E,n as P,h as u,E as h,V as w,Z as L,a6 as S,l as p,x as V,B as y,k as A}from"./index-CJkJkMFX.js";import{X as I}from"./model-Dhlo-7J6.js";import{_ as N}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-Df3Sf6qU.js";const X={class:"flex gap-2"},Z=B({__name:"FacilityList",props:{title:{},model:{},editPath:{},activePath:{},addRid:{},addLabel:{}},setup(a){const k=a,$=A(),f=p(null),c=p(!1),m=p(void 0);function _(){m.value=void 0,c.value=!0}function b(e){m.value=e,c.value=!0}function g(e){c.value=e}function O(){var e;(e=f.value)==null||e.fetch()}function R(e){$.push(`${k.editPath}/${e}`)}async function x(e){var o,n,r;try{await V.get(`${k.activePath}/${e}`),y.success("تغییرات ثبت شد"),(o=f.value)==null||o.fetch()}catch(t){y.error(((r=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:r.message)??"خطا در تغییر وضعیت")}}return(e,o)=>{const n=C("a-tooltip"),r=C("a-card");return s(),i(r,{title:a.title,class:"page-card"},{default:l(()=>[d(I,{ref_key:"tbl",ref:f,model:a.model,"mobile-cards":""},E({actions:l(({record:t})=>[P("div",X,[a.addRid?(s(),i(n,{key:0,title:"ویرایش"},{default:l(()=>[d(u(h),{class:"cursor-pointer mx-1 text-primary",onClick:v=>b(t.id)},null,8,["onClick"])]),_:2},1024)):(s(),i(n,{key:1,title:"ویرایش"},{default:l(()=>[d(u(h),{class:"cursor-pointer mx-1 text-primary",onClick:v=>R(t.id)},null,8,["onClick"])]),_:2},1024)),d(n,{title:"وضعیت"},{default:l(()=>[t.is_active?(s(),i(u(w),{key:0,class:"cursor-pointer mx-1 text-success",onClick:v=>x(t.id)},null,8,["onClick"])):(s(),i(u(L),{key:1,class:"cursor-pointer mx-1 text-danger",onClick:v=>x(t.id)},null,8,["onClick"]))]),_:2},1024)])]),_:2},[a.addRid?{name:"add",fn:l(()=>[d(N,{rid:a.addRid,"add-label":a.addLabel,onAdd:o[0]||(o[0]=t=>_())},null,8,["rid","add-label"])]),key:"0"}:void 0]),1032,["model"]),S(e.$slots,"form",{open:c.value,editingId:m.value,onUpdateOpen:g,onSuccess:O})]),_:3},8,["title"])}}});export{Z as _};
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
import{d as E,a as i,w as l,r as C,o as s,c as d,W as P,n as w,h as r,E as h,K as B,J as L,V as S,l as p,x as V,z as y,k as A}from"./index-CaCGCy-S.js";import{X as I}from"./model-Cu9jLjyk.js";import{_ as N}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-VldxzPkI.js";const X={class:"flex gap-2"},K=E({__name:"FacilityList",props:{title:{},model:{},editPath:{},activePath:{},addRid:{},addLabel:{}},setup(a){const k=a,$=A(),f=p(null),c=p(!1),m=p(void 0);function _(){m.value=void 0,c.value=!0}function b(e){m.value=e,c.value=!0}function g(e){c.value=e}function O(){var e;(e=f.value)==null||e.fetch()}function R(e){$.push(`${k.editPath}/${e}`)}async function x(e){var o,n,u;try{await V.get(`${k.activePath}/${e}`),y.success("تغییرات ثبت شد"),(o=f.value)==null||o.fetch()}catch(t){y.error(((u=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:u.message)??"خطا در تغییر وضعیت")}}return(e,o)=>{const n=C("a-tooltip"),u=C("a-card");return s(),i(u,{title:a.title},{default:l(()=>[d(I,{ref_key:"tbl",ref:f,model:a.model},P({actions:l(({record:t})=>[w("div",X,[a.addRid?(s(),i(n,{key:0,title:"ویرایش"},{default:l(()=>[d(r(h),{class:"cursor-pointer mx-1 text-primary",onClick:v=>b(t.id)},null,8,["onClick"])]),_:2},1024)):(s(),i(n,{key:1,title:"ویرایش"},{default:l(()=>[d(r(h),{class:"cursor-pointer mx-1 text-primary",onClick:v=>R(t.id)},null,8,["onClick"])]),_:2},1024)),d(n,{title:"وضعیت"},{default:l(()=>[t.is_active?(s(),i(r(B),{key:0,class:"cursor-pointer mx-1 text-success",onClick:v=>x(t.id)},null,8,["onClick"])):(s(),i(r(L),{key:1,class:"cursor-pointer mx-1 text-danger",onClick:v=>x(t.id)},null,8,["onClick"]))]),_:2},1024)])]),_:2},[a.addRid?{name:"add",fn:l(()=>[d(N,{rid:a.addRid,"add-label":a.addLabel,onAdd:o[0]||(o[0]=t=>_())},null,8,["rid","add-label"])]),key:"0"}:void 0]),1032,["model"]),S(e.$slots,"form",{open:c.value,editingId:m.value,onUpdateOpen:g,onSuccess:O})]),_:3},8,["title"])}}});export{K as _};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{_ as o,b as t,c,r,o as s}from"./index-CJkJkMFX.js";const n={},a={class:"layout--full-page"};function _(l,u){const e=r("router-view");return s(),t("div",a,[c(e)])}const i=o(n,[["render",_]]);export{i as default};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{_ as o}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{b as t,c as r,r as c,o as s}from"./index-CaCGCy-S.js";const n={},a={class:"layout--full-page"};function _(l,f){const e=c("router-view");return s(),t("div",a,[r(e)])}const p=o(n,[["render",_]]);export{p as default};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{d as r,v as c,x as n,b as i,k as m,o as d}from"./index-CJkJkMFX.js";import{u as _}from"./auth-SCFNR-pz.js";const l={style:{"min-height":"100vh",display:"grid","place-items":"center"}},h=r({__name:"IamCallback",setup(p){const t=m(),o=_();return c(async()=>{const e=new URLSearchParams(window.location.search);if(sessionStorage.removeItem("gb_admin_iam_sso_checked"),e.get("error")||!e.get("code")||!e.get("state")){sessionStorage.setItem("gb_admin_iam_sso_skip","1"),await t.replace("/auth/login");return}try{const{data:s}=await n.post("admin/auth/sso/callback",{code:e.get("code"),state:e.get("state")}),a={...s};delete a.roles,delete a.ut,o.inject(a),await t.replace("/dashboard/ecommerce")}catch{sessionStorage.setItem("gb_admin_iam_sso_skip","1"),await t.replace("/auth/login")}}),(e,s)=>(d(),i("div",l,"در حال ورود..."))}});export{h as default};
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
import{d as B,m as P,o as u,b as r,c as m,w as h,a as N,h as b,P as z,n as g,t as D,i as I,l as i,p as R,x as S,z as U,r as f}from"./index-CaCGCy-S.js";const q={class:"image-upload"},E={key:0},F={key:1},L={style:{"margin-top":"8px"}},O=["src"],j=B({__name:"ImageUploadInput",props:{modelValue:{default:null},purpose:{default:void 0},placeholder:{default:"بارگذاری"}},emits:["update:modelValue","ok"],setup(w,{emit:y}){const l=w,p=y,c=i(!1),d=i(!1),v=i(""),o=i([]);P(()=>l.modelValue,e=>{var a;e?((a=o.value[0])==null?void 0:a.url)!==e&&(o.value=[{uid:e,name:e.split("/").pop()??"file",status:"done",url:e}]):o.value=[]},{immediate:!0});const V=R(()=>l.placeholder);async function k({file:e}){var s,n;const a=new FormData;a.append("file",e),l.purpose&&a.append("purpose",l.purpose),c.value=!0;try{const{data:t}=await S.post("file/create",a);p("update:modelValue",t.url),p("ok",t)}catch(t){const _=((n=(s=t==null?void 0:t.response)==null?void 0:s.data)==null?void 0:n.message)??"بارگذاری فایل ناموفق بود";U.error(_)}finally{c.value=!1}}function x(){return p("update:modelValue",null),!0}function C(e){v.value=e.url,d.value=!0}return(e,a)=>{const s=f("a-spin"),n=f("a-upload"),t=f("a-modal");return u(),r("div",q,[m(n,{"file-list":o.value,"list-type":"picture-card","max-count":1,accept:"image/*","custom-request":k,onRemove:x,onPreview:C},{default:h(()=>[o.value.length===0?(u(),r("div",E,[c.value?(u(),N(s,{key:0,size:"small"})):(u(),r("div",F,[m(b(z)),g("div",L,D(V.value),1)]))])):I("",!0)]),_:1},8,["file-list"]),m(t,{open:d.value,footer:null,onCancel:a[0]||(a[0]=_=>d.value=!1)},{default:h(()=>[g("img",{src:v.value,style:{width:"100%"},alt:""},null,8,O)]),_:1},8,["open"])])}}});export{j as _};
|
import{d as C,m as N,o as u,b as r,c as m,w as h,a as P,h as R,R as b,n as g,t as q,i as D,l as i,q as I,x as S,B as U,r as f}from"./index-CJkJkMFX.js";const z={class:"image-upload"},E={key:0},F={key:1},L={style:{"margin-top":"8px"}},O=["src"],j=C({__name:"ImageUploadInput",props:{modelValue:{default:null},purpose:{default:void 0},placeholder:{default:"بارگذاری"}},emits:["update:modelValue","ok"],setup(w,{emit:y}){const l=w,p=y,c=i(!1),d=i(!1),v=i(""),o=i([]);N(()=>l.modelValue,e=>{var a;e?((a=o.value[0])==null?void 0:a.url)!==e&&(o.value=[{uid:e,name:e.split("/").pop()??"file",status:"done",url:e}]):o.value=[]},{immediate:!0});const V=I(()=>l.placeholder);async function k({file:e}){var s,n;const a=new FormData;a.append("file",e),l.purpose&&a.append("purpose",l.purpose),c.value=!0;try{const{data:t}=await S.post("file/create",a);p("update:modelValue",t.url),p("ok",t)}catch(t){const _=((n=(s=t==null?void 0:t.response)==null?void 0:s.data)==null?void 0:n.message)??"بارگذاری فایل ناموفق بود";U.error(_)}finally{c.value=!1}}function x(){return p("update:modelValue",null),!0}function B(e){v.value=e.url,d.value=!0}return(e,a)=>{const s=f("a-spin"),n=f("a-upload"),t=f("a-modal");return u(),r("div",z,[m(n,{"file-list":o.value,"list-type":"picture-card","max-count":1,accept:"image/*","custom-request":k,onRemove:x,onPreview:B},{default:h(()=>[o.value.length===0?(u(),r("div",E,[c.value?(u(),P(s,{key:0,size:"small"})):(u(),r("div",F,[m(R(b)),g("div",L,q(V.value),1)]))])):D("",!0)]),_:1},8,["file-list"]),m(t,{open:d.value,footer:null,onCancel:a[0]||(a[0]=_=>d.value=!1)},{default:h(()=>[g("img",{src:v.value,style:{width:"100%"},alt:""},null,8,O)]),_:1},8,["open"])])}}});export{j as _};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{a as $,b as s,X as B}from"./model-Cu9jLjyk.js";import{_ as E}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-VldxzPkI.js";import{_ as D}from"./Add.vue_vue_type_script_setup_true_lang-DkYNhITX.js";import{d as X,u as M,b as O,c as i,w as o,r as p,o as c,h as m,a as f,E as T,i as b,D as V,n as w,l as _}from"./index-CaCGCy-S.js";import{u as A}from"./useDeleteHandler-Dgy2n3zj.js";import"./SettingOutlined-BBHg-1Oy.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CKkGO86U.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-Av3ruB17.js";function I(){const t=new $("admin/categories/list","لیست دسته بندی");return t.add(new s("id","شماره").filterNumber()),t.add(new s("image","تصویر").noSort().renderSlot("image")),t.add(new s("type_str","نوع نمایش")),t.add(new s("title","عنوان دسته").filterNumber()),t.add(new s("parent.title","پدر دسته").filterNumber()),t.add(new s("opt","عملیات").noSort().renderSlot("opt")),t}const P={id:"page-user-list"},U=["src"],j="/img/no-items.png",R=X({__name:"List",setup(t){const k=M(),v=n=>!!k.hasPermission(n),y=I(),u=_(null),l=_(!1),r=_(void 0),{remove:x}=A({onSuccess:()=>{var n;return(n=u.value)==null?void 0:n.fetch()},successMessage:"دسته حذف شد",successType:"info",fallbackErrorMessage:"خطا در حذف دسته"});function C(){r.value=void 0,l.value=!0}function S(n){r.value=n,l.value=!0}return(n,a)=>{const g=p("a-tooltip"),h=p("a-popconfirm"),N=p("a-card");return c(),O("div",P,[i(N,{title:"لیست دسته بندی ها"},{default:o(()=>[i(B,{ref_key:"tbl",ref:u,model:m(y)},{add:o(()=>[i(E,{rid:"collection.create","add-label":"افزودن دسته",onAdd:C})]),image:o(({text:e})=>[w("img",{width:"90px",height:"90px",style:{"object-fit":"scale-down"},src:e&&e.image?e.image:j},null,8,U)]),opt:o(({record:e})=>[v("collection.list.edit")?(c(),f(g,{key:0,title:"ویرایش"},{default:o(()=>[i(m(T),{class:"cursor-pointer mx-1 text-primary",onClick:d=>S(e.id)},null,8,["onClick"])]),_:2},1024)):b("",!0),v("collection.list.remove")?(c(),f(g,{key:1,title:"حذف"},{default:o(()=>[i(h,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:d=>m(x)(`category/${e.id}`)},{title:o(()=>[...a[2]||(a[2]=[w("p",null,"آیا مطمئن به حذف دسته مورد نظر هستید ؟",-1)])]),default:o(()=>[i(m(V),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):b("",!0)]),_:1},8,["model"]),(c(),f(D,{key:r.value??"new",open:l.value,id:r.value,"onUpdate:open":a[0]||(a[0]=e=>l.value=e),onSuccess:a[1]||(a[1]=e=>{var d;return(d=u.value)==null?void 0:d.fetch()})},null,8,["open","id"]))]),_:1})])}}});export{R as default};
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
.flex-col[data-v-d7104f94]{flex-direction:column}.flex-1[data-v-d7104f94]{flex:1}.justify-between[data-v-d7104f94]{justify-content:space-between}.mr-3[data-v-d7104f94]{margin-left:.75rem}
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
import{a as $,b as s,X as B}from"./model-Dhlo-7J6.js";import{_ as E}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-Df3Sf6qU.js";import{_ as D}from"./Add.vue_vue_type_script_setup_true_lang-CWLQwHa7.js";import{d as X,u as M,b as O,c as i,w as o,r as u,o as c,h as m,a as f,E as T,i as b,D as V,n as w,l as _}from"./index-CJkJkMFX.js";import{u as A}from"./useDeleteHandler-DdDkD9hE.js";import"./filters-Bg3NuEZs.js";import"./index-CcPs5_14.js";import"./SettingOutlined-M4ZHugxj.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DJoKJ02i.js";function I(){const t=new $("admin/categories/list","لیست دسته بندی");return t.add(new s("id","شماره").filterNumber()),t.add(new s("image","تصویر").noSort().renderSlot("image")),t.add(new s("type_str","نوع نمایش")),t.add(new s("title","عنوان دسته").filterNumber()),t.add(new s("parent.title","پدر دسته").filterNumber()),t.add(new s("opt","عملیات").noSort().renderSlot("opt")),t}const P={id:"page-user-list"},U=["src"],j="/img/no-items.png",W=X({__name:"List",setup(t){const k=M(),g=n=>!!k.hasPermission(n),y=I(),p=_(null),l=_(!1),r=_(void 0),{remove:x}=A({onSuccess:()=>{var n;return(n=p.value)==null?void 0:n.fetch()},successMessage:"دسته حذف شد",successType:"info",fallbackErrorMessage:"خطا در حذف دسته"});function C(){r.value=void 0,l.value=!0}function S(n){r.value=n,l.value=!0}return(n,a)=>{const v=u("a-tooltip"),h=u("a-popconfirm"),N=u("a-card");return c(),O("div",P,[i(N,{title:"لیست دسته بندی ها",class:"page-card"},{default:o(()=>[i(B,{ref_key:"tbl",ref:p,model:m(y),"mobile-cards":""},{add:o(()=>[i(E,{rid:"collection.create","add-label":"افزودن دسته",onAdd:C})]),image:o(({text:e})=>[w("img",{width:"90px",height:"90px",style:{"object-fit":"scale-down"},src:e&&e.image?e.image:j},null,8,U)]),opt:o(({record:e})=>[g("collection.list.edit")?(c(),f(v,{key:0,title:"ویرایش"},{default:o(()=>[i(m(T),{class:"cursor-pointer mx-1 text-primary",onClick:d=>S(e.id)},null,8,["onClick"])]),_:2},1024)):b("",!0),g("collection.list.remove")?(c(),f(v,{key:1,title:"حذف"},{default:o(()=>[i(h,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:d=>m(x)(`category/${e.id}`)},{title:o(()=>[...a[2]||(a[2]=[w("p",null,"آیا مطمئن به حذف دسته مورد نظر هستید ؟",-1)])]),default:o(()=>[i(m(V),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):b("",!0)]),_:1},8,["model"]),(c(),f(D,{key:r.value??"new",open:l.value,id:r.value,"onUpdate:open":a[0]||(a[0]=e=>l.value=e),onSuccess:a[1]||(a[1]=e=>{var d;return(d=p.value)==null?void 0:d.fetch()})},null,8,["open","id"]))]),_:1})])}}});export{W as default};
|
||||||
@@ -1 +0,0 @@
|
|||||||
.flex-col[data-v-a0837a14]{flex-direction:column}.flex-1[data-v-a0837a14]{flex:1}.justify-between[data-v-a0837a14]{justify-content:space-between}.mr-3[data-v-a0837a14]{margin-left:.75rem}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{_ as c}from"./FacilityList.vue_vue_type_script_setup_true_lang-T8r5C9K3.js";import{_ as m}from"./AddBranches.vue_vue_type_script_setup_true_lang-VDOAiW3Y.js";import{a as p,b as t}from"./model-Cu9jLjyk.js";import{d as l,a as n,w as f,h as _,o}from"./index-CaCGCy-S.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-VldxzPkI.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CKkGO86U.js";import"./SettingOutlined-BBHg-1Oy.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";function u(){const e=new p("admin/branches/list","لیست شعب");return e.add(new t("name","نام").filterText()),e.add(new t("address","آدرس").filterText()),e.add(new t("phone","شماره تلفن").filterNumber()),e.add(new t("user.name","مدیر شعبه").filterNumber().noSort()),e.add(new t("op","عملیات").noSort().renderSlot("actions")),e}const L=l({__name:"ListBranches",setup(e){const r=u();return(h,b)=>(o(),n(c,{title:"لیست شعب",model:_(r),"edit-path":"/branch/edit","active-path":"branch/active","add-rid":"branch.create","add-label":"افزودن شعبه"},{form:f(({open:d,editingId:a,onUpdateOpen:i,onSuccess:s})=>[(o(),n(m,{key:a??"new",open:d,id:a,"onUpdate:open":i,onSuccess:s},null,8,["open","id","onUpdate:open","onSuccess"]))]),_:1},8,["model"]))}});export{L as default};
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user