From e95ed065f37467962a940f3f58d7d78db34af331 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 2 Sep 2024 11:06:25 +0700 Subject: [PATCH 1/4] =?UTF-8?q?=E0=B8=97=E0=B8=B8=E0=B8=99=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=A8=E0=B8=B6=E0=B8=81=E0=B8=A9=E0=B8=B2?= =?UTF-8?q?/=E0=B8=9D=E0=B8=B6=E0=B8=81=E0=B8=AD=E0=B8=9A=E0=B8=A3?= =?UTF-8?q?=E0=B8=A1=20=3D=3D>=20=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20pa?= =?UTF-8?q?th=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/15_development/api.development.ts | 2 +- .../components/scholarship/DetailView.vue | 181 ++++++++++-------- 2 files changed, 97 insertions(+), 86 deletions(-) diff --git a/src/api/15_development/api.development.ts b/src/api/15_development/api.development.ts index 5bc9fab8d..ef86028b3 100644 --- a/src/api/15_development/api.development.ts +++ b/src/api/15_development/api.development.ts @@ -28,7 +28,7 @@ export default { /** ทุนการศึกษา/ฝึกอบรม*/ devScholarship, - devScholarshipByid: (id: string) => `${devScholarship}/${id}`, + devScholarshipByid: (id: string) => `${devScholarship}/admin/${id}`, devScholarshipStatus: (id: string, status: string) => `${devScholarship}/status/${id}/${status}`, diff --git a/src/modules/15_development/components/scholarship/DetailView.vue b/src/modules/15_development/components/scholarship/DetailView.vue index 0f3f08748..9d9fbe855 100644 --- a/src/modules/15_development/components/scholarship/DetailView.vue +++ b/src/modules/15_development/components/scholarship/DetailView.vue @@ -171,9 +171,9 @@ function fetchDataDetail(id: string) { showLoader(); http .get(config.API.devScholarshipByid(id)) - .then((res) => { - const data: DataSholarship = res.data.result; - console.log(data); + .then(async (res) => { + const data: DataSholarship = await res.data.result; + formBody.profileId = data.profileId; formBody.rank = data.rank; formBody.prefix = data.prefix; @@ -295,11 +295,11 @@ function onSubmit() { : config.API.devScholarship; const method = scholarshipId.value ? "put" : "post"; await http[method](url, formBody); - success($q, "บันทึกข้อมูลสำเร็จ"); scholarshipId.value ? fetchDataDetail(scholarshipId.value) : router.push("/development/scholarship"); + success($q, "บันทึกข้อมูลสำเร็จ"); } catch (e) { messageError($q, e); } finally { @@ -508,6 +508,17 @@ function downloadFileBackReceived() { } } +/** + * class inputgreen + * @param val + */ +const classInput = (val: boolean) => { + return { + "full-width inputgreen cursor-pointer": val, + "full-width cursor-pointer": !val, + }; +}; + /** ดึงข้อมูลเมื่อคอมโพเนนต์โหลดเสร็จสมบูรณ์ */ onMounted(() => { if (scholarshipId.value) { @@ -571,7 +582,7 @@ onMounted(() => { - +
@@ -636,6 +647,7 @@ onMounted(() => {
{ option-value="id" emit-value map-options - class="inputgreen" label="เลือกประเภททุน" :rules="[ (val: string) => @@ -669,7 +680,7 @@ onMounted(() => { outlined hide-bottom-space lazy-rules - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.fundType" :options="fundTypeOp" option-label="name" @@ -726,7 +737,7 @@ onMounted(() => { :readonly="checkRouteDetail" dense outlined - class="inputgreen" + :class="classInput(!checkRouteDetail)" :model-value=" formBody.scholarshipYear ? Number(formBody.scholarshipYear) + 543 @@ -759,7 +770,7 @@ onMounted(() => { :readonly="checkRouteDetail" dense outlined - class="inputgreen" + :class="classInput(!checkRouteDetail)" label="แหล่งงบประมาณ" hide-bottom-space v-model="formBody.budgetSource" @@ -780,7 +791,7 @@ onMounted(() => { dense outlined hide-bottom-space - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.budgetApprove" label="งบประมาณที่ได้รับอนุมัติตลอดหลักสูตร" mask="###,###,###,###,###,###" @@ -812,7 +823,7 @@ onMounted(() => { :readonly="checkRouteDetail" dense outlined - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.bookNo" label="เลขที่หนังสืออนุมัติ" hide-bottom-space @@ -840,7 +851,7 @@ onMounted(() => { :readonly="checkRouteDetail" dense outlined - class="inputgreen" + :class="classInput(!checkRouteDetail)" :model-value=" formBody.bookNoDate ? date2Thai(formBody.bookNoDate) : null " @@ -881,7 +892,7 @@ onMounted(() => { dense :readonly="checkRouteDetail" outlined - class="inputgreen" + :class="classInput(!checkRouteDetail)" :model-value=" formBody.bookApproveDate ? date2Thai(formBody.bookApproveDate) @@ -922,7 +933,7 @@ onMounted(() => { :readonly="checkRouteDetail" outlined dense - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.changeDetail" label="เปลี่ยนแปลงรายละเอียด" rows="3" @@ -945,7 +956,7 @@ onMounted(() => { lazy-rules hide-bottom-space label="เลขที่สัญญา" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.contractNo" :rules="[ (val: string) => @@ -971,7 +982,7 @@ onMounted(() => { dense :readonly="checkRouteDetail" outlined - class="inputgreen" + :class="classInput(!checkRouteDetail)" :model-value=" formBody.contractDate ? date2Thai(formBody.contractDate) @@ -1003,7 +1014,7 @@ onMounted(() => { outlined hide-bottom-space lazy-rules - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.reportBackNo" label="เลขที่หนังสือรายงานตัวกลับ" :rules="[ @@ -1029,7 +1040,7 @@ onMounted(() => { :readonly="checkRouteDetail" dense outlined - class="inputgreen" + :class="classInput(!checkRouteDetail)" :model-value=" formBody.reportBackNoDate ? date2Thai(formBody.reportBackNoDate) @@ -1072,7 +1083,7 @@ onMounted(() => { :readonly="checkRouteDetail" dense outlined - class="inputgreen" + :class="classInput(!checkRouteDetail)" :model-value=" formBody.reportBackDate ? date2Thai(formBody.reportBackDate) @@ -1163,13 +1174,13 @@ onMounted(() => {
{ lazy-rules hide-bottom-space label="สถานที่ไปศึกษาดูงาน" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.studyPlace" :rules="[ (val: string) => @@ -1353,7 +1364,7 @@ onMounted(() => { lazy-rules hide-bottom-space label="หัวข้อการไปศึกษาดูงาน" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.studyTopic" :rules="[ (val: string) => @@ -1381,7 +1392,7 @@ onMounted(() => { dense outlined :readonly="checkRouteDetail" - class="inputgreen" + :class="classInput(!checkRouteDetail)" :model-value=" formBody.studyStartDate ? date2Thai(formBody.studyStartDate) @@ -1426,7 +1437,7 @@ onMounted(() => { dense outlined :readonly="checkRouteDetail" - class="inputgreen" + :class="classInput(!checkRouteDetail)" :model-value=" formBody.studyEndDate ? date2Thai(formBody.studyEndDate) @@ -1460,7 +1471,7 @@ onMounted(() => { lazy-rules hide-bottom-space label="ประเทศที่ไปศึกษาดูงาน" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.studyCountry" :rules="[ (val: string) => @@ -1476,7 +1487,7 @@ onMounted(() => { lazy-rules hide-bottom-space label="หัวข้อการไปศึกษาดูงานต่างประเทศ" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.studyAbroadTopic" :rules="[ (val: string) => @@ -1505,7 +1516,7 @@ onMounted(() => { { :readonly="checkRouteDetail" hide-bottom-space label="สถานที่ไปศึกษาดูงาน" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.studyPlace" :rules="[ (val: string) => @@ -1767,7 +1778,7 @@ onMounted(() => { lazy-rules hide-bottom-space label="หัวข้อการไปศึกษาดูงาน" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.studyTopic" :rules="[ (val: string) => @@ -1795,7 +1806,7 @@ onMounted(() => { dense :readonly="checkRouteDetail" outlined - class="inputgreen" + :class="classInput(!checkRouteDetail)" :model-value=" formBody.studyStartDate ? date2Thai(formBody.studyStartDate) @@ -1846,7 +1857,7 @@ onMounted(() => { dense :readonly="checkRouteDetail" outlined - class="inputgreen" + :class="classInput(!checkRouteDetail)" :model-value=" formBody.studyEndDate ? date2Thai(formBody.studyEndDate) @@ -1879,7 +1890,7 @@ onMounted(() => { :readonly="checkRouteDetail" hide-bottom-space label="รวมระยะเวลาในการฝึกอบรม" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.totalPeriod" :rules="[ (val: string) => @@ -1904,7 +1915,7 @@ onMounted(() => { lazy-rules hide-bottom-space label="หลักสูตรการฝึกอบรม" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.course" :rules="[ (val: string) => @@ -1920,7 +1931,7 @@ onMounted(() => { :readonly="checkRouteDetail" hide-bottom-space label="สาขา" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.field" :rules="[ (val: string) => @@ -1936,7 +1947,7 @@ onMounted(() => { :readonly="checkRouteDetail" hide-bottom-space label="สถาบันการศึกษา/หน่วยงานผู้จัดการฝึกอบรม" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.educationalInstitution" :rules="[ (val: string) => @@ -1964,7 +1975,7 @@ onMounted(() => { dense outlined :readonly="checkRouteDetail" - class="inputgreen" + :class="classInput(!checkRouteDetail)" :model-value=" formBody.startDate ? date2Thai(formBody.startDate) @@ -2009,7 +2020,7 @@ onMounted(() => { dense :readonly="checkRouteDetail" outlined - class="inputgreen" + :class="classInput(!checkRouteDetail)" :model-value=" formBody.endDate ? date2Thai(formBody.endDate) : null " @@ -2040,7 +2051,7 @@ onMounted(() => { lazy-rules hide-bottom-space label="สถานที่ไปศึกษาดูงานในประเทศ" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.studyPlace" :rules="[ (val: string) => @@ -2056,7 +2067,7 @@ onMounted(() => { :readonly="checkRouteDetail" hide-bottom-space label="หัวข้อการไปศึกษาดูงานในประเทศ" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.studyTopic" :rules="[ (val: string) => @@ -2083,7 +2094,7 @@ onMounted(() => { { :readonly="checkRouteDetail" hide-bottom-space label="ประเทศที่ไปศึกษา ฝึกอบรม ประชุม ดูงาน และปฏิบัติการวิจัย" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.studyCountry" :rules="[ (val: string) => @@ -2548,7 +2559,7 @@ onMounted(() => { lazy-rules :readonly="checkRouteDetail" hide-bottom-space - class="inputgreen" + :class="classInput(!checkRouteDetail)" label="หลักสูตรการฝึกอบรม" v-model="formBody.course" :rules="[ @@ -2564,7 +2575,7 @@ onMounted(() => { lazy-rules :readonly="checkRouteDetail" hide-bottom-space - class="inputgreen" + :class="classInput(!checkRouteDetail)" label="สถาบันการศึกษา/หน่วยงานผู้จัดการฝึกอบรม" v-model="formBody.educationalInstitution" :rules="[ @@ -2593,7 +2604,7 @@ onMounted(() => { { :readonly="checkRouteDetail" hide-bottom-space label="สถานที่ไปศึกษาดูงานในประเทศ" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.studyPlace" :rules="[ (val: string) => @@ -2685,7 +2696,7 @@ onMounted(() => { lazy-rules hide-bottom-space label="หัวข้อการไปศึกษาดูงานในประเทศ" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.studyTopic" :rules="[ (val: string) => @@ -2713,7 +2724,7 @@ onMounted(() => { dense outlined :readonly="checkRouteDetail" - class="inputgreen" + :class="classInput(!checkRouteDetail)" :model-value=" formBody.studyStartDate ? date2Thai(formBody.studyStartDate) @@ -2764,7 +2775,7 @@ onMounted(() => { dense outlined :readonly="checkRouteDetail" - class="inputgreen" + :class="classInput(!checkRouteDetail)" :model-value=" formBody.studyEndDate ? date2Thai(formBody.studyEndDate) @@ -2798,7 +2809,7 @@ onMounted(() => { :readonly="checkRouteDetail" hide-bottom-space label="ประเทศที่ไปศึกษาดูงาน" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.studyCountry" :rules="[ (val: string) => @@ -2814,7 +2825,7 @@ onMounted(() => { :readonly="checkRouteDetail" hide-bottom-space label="หัวข้อการไปศึกษาดูงานต่างประเทศ" - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.studyAbroadTopic" :rules="[ (val: string) => @@ -2842,7 +2853,7 @@ onMounted(() => { dense outlined :readonly="checkRouteDetail" - class="inputgreen" + :class="classInput(!checkRouteDetail)" :model-value=" formBody.studyAbroadStartDate ? date2Thai(formBody.studyAbroadStartDate) @@ -2893,7 +2904,7 @@ onMounted(() => { dense outlined :readonly="checkRouteDetail" - class="inputgreen" + :class="classInput(!checkRouteDetail)" :model-value=" formBody.studyAbroadEndDate ? date2Thai(formBody.studyAbroadEndDate) @@ -2926,7 +2937,7 @@ onMounted(() => { :readonly="checkRouteDetail" hide-bottom-space label="รวมระยะเวลาในการฝึกอบรม " - class="inputgreen" + :class="classInput(!checkRouteDetail)" v-model="formBody.totalPeriod" :rules="[ (val: string) => @@ -2944,7 +2955,7 @@ onMounted(() => { > - + From ab0f84a60506eda078d6914f2916e1b189a381bb Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Mon, 2 Sep 2024 14:02:48 +0700 Subject: [PATCH 2/4] change path run format & fixing bug file config --- package.json | 3 ++- tsconfig.app.json | 4 +++- tsconfig.config.json | 11 +++++++++-- tsconfig.vitest.json | 4 +++- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0254e8d15..ae2227feb 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "test:e2e:dev": "start-server-and-test 'vite dev --port 4173' :4173 'cypress open --e2e'", "build-only": "vite build", "type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false", - "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore" + "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", + "format": "prettier ./src --write" }, "dependencies": { "@arcgis/core": "^4.28.10", diff --git a/tsconfig.app.json b/tsconfig.app.json index a4299392b..6c08e6884 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -8,6 +8,8 @@ "paths": { "@/*": ["./src/*"] }, - "lib": ["dom", "es2015", "es2018", "es2018.promise"] + "lib": ["dom", "es2015", "es2018", "es2018.promise"], + "ignoreDeprecations": "5.0", + "verbatimModuleSyntax": true } } diff --git a/tsconfig.config.json b/tsconfig.config.json index 424084aa5..47bd2ee27 100644 --- a/tsconfig.config.json +++ b/tsconfig.config.json @@ -1,8 +1,15 @@ { "extends": "@vue/tsconfig/tsconfig.node.json", - "include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"], + "include": [ + "vite.config.*", + "vitest.config.*", + "cypress.config.*", + "playwright.config.*" + ], "compilerOptions": { "composite": true, - "types": ["node"] + "types": ["node"], + "ignoreDeprecations": "5.0", + "verbatimModuleSyntax": true } } diff --git a/tsconfig.vitest.json b/tsconfig.vitest.json index d080d611e..60f9b9a8d 100644 --- a/tsconfig.vitest.json +++ b/tsconfig.vitest.json @@ -4,6 +4,8 @@ "compilerOptions": { "composite": true, "lib": [], - "types": ["node", "jsdom"] + "types": ["node", "jsdom"], + "ignoreDeprecations": "5.0", + "verbatimModuleSyntax": true } } From 27b3a9e446c1df3ce7885894d8814d49095cee85 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 2 Sep 2024 14:16:24 +0700 Subject: [PATCH 3/4] =?UTF-8?q?=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A?= =?UTF-8?q?=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7?= =?UTF-8?q?=E0=B8=B1=E0=B8=95=E0=B8=B7=20=3D=3D>=20=E0=B8=A5=E0=B8=B9?= =?UTF-8?q?=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=9B=E0=B8=A3?= =?UTF-8?q?=E0=B8=B0=E0=B8=88=E0=B8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/Employee/01_DataEmployee.vue | 164 +++++++++--------- 1 file changed, 79 insertions(+), 85 deletions(-) diff --git a/src/modules/04_registryPerson/components/detail/Employee/01_DataEmployee.vue b/src/modules/04_registryPerson/components/detail/Employee/01_DataEmployee.vue index c735774be..e0550404a 100644 --- a/src/modules/04_registryPerson/components/detail/Employee/01_DataEmployee.vue +++ b/src/modules/04_registryPerson/components/detail/Employee/01_DataEmployee.vue @@ -193,7 +193,6 @@ const columns = ref([ label: "ค่าจ้าง", sortable: true, field: "employeeWage", - format: (v) => (v ? Number(v).toLocaleString() : ""), headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -203,7 +202,6 @@ const columns = ref([ label: "เงินเพิ่มการครองชีพชั่วคราว", sortable: true, field: "employeeMoneyIncrease", - format: (v) => (v ? Number(v).toLocaleString() : ""), headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -213,7 +211,6 @@ const columns = ref([ label: "เงินช่วยเหลือการครองชีพชั่วคราว", sortable: true, field: "employeeMoneyAllowance", - format: (v) => (v ? Number(v).toLocaleString() : ""), headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -223,7 +220,6 @@ const columns = ref([ label: "เงินสมทบประกันสังคม(ลูกจ้าง)", sortable: true, field: "employeeMoneyEmployee", - format: (v) => (v ? Number(v).toLocaleString() : ""), headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -233,7 +229,6 @@ const columns = ref([ label: "เงินสมทบประกันสังคม(นายจ้าง)", sortable: true, field: "employeeMoneyEmployer", - format: (v) => (v ? Number(v).toLocaleString() : ""), headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -323,92 +318,91 @@ onMounted(() => {
- - -
-
-
-
กลุ่มงาน
+ +
+
+
+
กลุ่มงาน
+
+
+ {{ dataEmployee.positionEmployeeGroupId ?? "-" }} +
-
- {{ dataEmployee.positionEmployeeGroupId ?? "-" }} +
+
+
สายงาน
+
+
+ {{ dataEmployee.positionEmployeeLineId ?? "-" }} +
+
+
+
+
ตำแหน่งทางสายงาน
+
+
+ {{ dataEmployee.positionEmployeePositionId ?? "-" }} +
+
+
+
+
สังกัด
+
+
+ {{ dataEmployee.employeeOc ?? "-" }} +
+
+
+
+
ประเภทบุคคล
+
+
+ {{ dataEmployee.employeeTypeIndividual ?? "-" }} +
-
-
-
สายงาน
+
+
+
+
ค่าจ้าง
+
+
+ {{ dataEmployee.employeeWage ?? "-" }} +
-
- {{ dataEmployee.positionEmployeeLineId ?? "-" }} +
+
+
เงินเพิ่มการครองชีพชั่วคราว
+
+
+ {{ dataEmployee.employeeMoneyIncrease ?? "-" }} +
+
+
+
+
เงินช่วยเหลือการครองชีพชั่วคราว
+
+
+ {{ dataEmployee.employeeMoneyAllowance ?? "-" }} +
+
+
+
+
เงินสมทบประกันสังคม (ลูกจ้าง)
+
+
+ {{ dataEmployee.employeeMoneyEmployee ?? "-" }} +
+
+
+
+
เงินสมทบประกันสังคม (นายจ้าง)
+
+
+ {{ dataEmployee.employeeMoneyEmployer ?? "-" }} +
-
-
-
ตำแหน่งทางสายงาน
-
-
- {{ dataEmployee.positionEmployeePositionId ?? "-" }} -
-
-
-
-
สังกัด
-
-
- {{ dataEmployee.employeeOc ?? "-" }} -
-
-
-
-
ประเภทบุคคล
-
-
- {{ dataEmployee.employeeTypeIndividual ?? "-" }} -
-
-
-
-
-
-
ค่าจ้าง
-
-
- {{ dataEmployee.employeeWage ?? "-" }} -
-
-
-
-
เงินเพิ่มการครองชีพชั่วคราว
-
-
- {{ dataEmployee.employeeMoneyIncrease ?? "-" }} -
-
-
-
-
เงินช่วยเหลือการครองชีพชั่วคราว
-
-
- {{ dataEmployee.employeeMoneyAllowance ?? "-" }} -
-
-
-
-
เงินสมทบประกันสังคม (ลูกจ้าง)
-
-
- {{ dataEmployee.employeeMoneyEmployee ?? "-" }} -
-
-
-
-
เงินสมทบประกันสังคม (นายจ้าง)
-
-
- {{ dataEmployee.employeeMoneyEmployer ?? "-" }} -
-
-
From f395ae40d6c952125031a1fea880cc854ec9723c Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 2 Sep 2024 14:48:23 +0700 Subject: [PATCH 4/4] =?UTF-8?q?=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84?= =?UTF-8?q?=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87=20=3D=3D>=20?= =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20route.meta.Key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dialogs/DialogOrgSelectOneStep.vue | 1 - .../10_order/components/step/step03.vue | 42 +++++++------------ src/modules/10_order/router.ts | 6 +-- 3 files changed, 17 insertions(+), 32 deletions(-) diff --git a/src/components/Dialogs/DialogOrgSelectOneStep.vue b/src/components/Dialogs/DialogOrgSelectOneStep.vue index 12e44f743..6fbf932c1 100644 --- a/src/components/Dialogs/DialogOrgSelectOneStep.vue +++ b/src/components/Dialogs/DialogOrgSelectOneStep.vue @@ -234,7 +234,6 @@ async function getActive() { .get(config.API.activeOrganization) .then(async (res) => { const data = res.data.result; - formActive.activeId = data.activeId; formActive.activeName = data.activeName; formActive.draftId = data.draftId; diff --git a/src/modules/10_order/components/step/step03.vue b/src/modules/10_order/components/step/step03.vue index 58ffe69a2..d9996cef3 100644 --- a/src/modules/10_order/components/step/step03.vue +++ b/src/modules/10_order/components/step/step03.vue @@ -47,7 +47,9 @@ const mixin = useCounterMixin(); //เรียกฟังก์ชันกล const { dialogRemove, messageError, showLoader, hideLoader, success } = mixin; const route = useRoute(); -const checkRoutePermisson = ref(route.name == "disciplineOrderDatailOnly"); +const checkRoutePermisson = ref( + route.name == "disciplineOrderDatailOnly" +); const myForm = ref(null); const filterRef = ref(); const filter = ref(""); @@ -256,7 +258,6 @@ const clickClose = async () => { }; // เปิด popup เพิ่มข้อมูล const clickAdd = async () => { - await nodeTree(); selected.value = ""; rowsModal.value = []; selectedModal.value = []; @@ -269,29 +270,7 @@ const clickAdd = async () => { const clickDelete = (id: string) => { dialogRemove($q, () => deleteData(id)); }; -// โหลดโครงสร้าง tree -const nodeTree = async () => { - showLoader(); - await http - .get(config.API.profileOrganizRoot) - .then((res) => { - const data = res.data.result; - nodesTree.value = data; - if (data.length > 0) { - expanded.value = [data[0].id]; - } - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => { - hideLoader(); - }); -}; -// เลือกหน่วยงาน -const onSelected = async (id: string) => { - await listModal(id); -}; + // ลบข้อมูลรายชื่อ const deleteData = async (id: string) => { await http @@ -365,7 +344,14 @@ const fetchOrder = async (id: string) => {
- + เพิ่มข้อมูล @@ -429,7 +415,7 @@ const fetchOrder = async (id: string) => { { - +