UI => ส่งคนไประบบออกคำสั่ง
This commit is contained in:
parent
3ca0390b87
commit
fc75e315f5
19 changed files with 816 additions and 842 deletions
|
|
@ -9,6 +9,8 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import { useTransferDataStore } from "@/modules/05_placement/store";
|
||||
|
||||
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
|
||||
|
||||
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
|
||||
import DialogHeader from "@/modules/06_retirement/components/DialogHeader.vue";
|
||||
|
||||
/** use */
|
||||
|
|
@ -98,7 +100,6 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
format: (val) => statusText(val),
|
||||
},
|
||||
]);
|
||||
|
||||
/** คอลัมน์ที่แสดง */
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
"no",
|
||||
|
|
@ -118,6 +119,8 @@ const props = defineProps({
|
|||
filterKeyword2: String,
|
||||
});
|
||||
|
||||
const modalCommand = ref<boolean>(false);
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่นการ Selected Data
|
||||
*/
|
||||
|
|
@ -131,34 +134,15 @@ const checkSelected = computed(() => {
|
|||
function saveOrder() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => Ordersave(),
|
||||
() => {
|
||||
modalCommand.value = true;
|
||||
props.closeModal?.();
|
||||
},
|
||||
"ยืนยันส่งไปออกคำสั่ง",
|
||||
"ต้องการยืนยันส่งไปออกคำสั่งใช่หรือไม่?"
|
||||
);
|
||||
}
|
||||
|
||||
//ส่งไปออกคำสั่ง
|
||||
async function Ordersave() {
|
||||
const id = selected.value.map((r) => r.id);
|
||||
const body = {
|
||||
id,
|
||||
};
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.outReport, body)
|
||||
.then((res: any) => {
|
||||
success($q, "ส่งไปออกคำสั่งสำเร็จ");
|
||||
props.closeModal?.();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
props.fecthlistRecevice?.();
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
const emit = defineEmits(["update:filterKeyword2", "update:selected"]);
|
||||
function updateInput(value: any) {
|
||||
emit("update:filterKeyword2", value);
|
||||
|
|
@ -275,4 +259,10 @@ watchEffect(() => {
|
|||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<DialogCreateCommand
|
||||
v-model:modal="modalCommand"
|
||||
:command-type-code="'C-PM-18'"
|
||||
:persons-id="selected.map((r) => r.id)"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ onMounted(async () => {
|
|||
lazy-rules
|
||||
mask="###,###,###,###"
|
||||
reverse-fill-mask
|
||||
class="inputgreen"
|
||||
:class="getClass(edit)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue