fix
This commit is contained in:
parent
990681e240
commit
22ebbc6366
5 changed files with 9 additions and 6 deletions
|
|
@ -80,6 +80,7 @@ function onSubmit() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
() => {
|
() => {
|
||||||
|
showLoader();
|
||||||
const body = {
|
const body = {
|
||||||
organizationPositionOld: organizationPositionOld.value,
|
organizationPositionOld: organizationPositionOld.value,
|
||||||
organization: organization.value,
|
organization: organization.value,
|
||||||
|
|
@ -87,7 +88,6 @@ function onSubmit() {
|
||||||
dateEnd: dateEnd.value,
|
dateEnd: dateEnd.value,
|
||||||
reason: reason.value,
|
reason: reason.value,
|
||||||
};
|
};
|
||||||
showLoader();
|
|
||||||
http
|
http
|
||||||
.put(config.API.officerMainEdit(dataId), body)
|
.put(config.API.officerMainEdit(dataId), body)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,7 @@ function onSubmit() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
|
showLoader();
|
||||||
let data = {
|
let data = {
|
||||||
educationOld: educationOld.value,
|
educationOld: educationOld.value,
|
||||||
organizationPositionOld: organizationPositionOld.value,
|
organizationPositionOld: organizationPositionOld.value,
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,8 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
*/
|
*/
|
||||||
function createCommand(isRedirect: boolean) {
|
function createCommand(isRedirect: boolean) {
|
||||||
dialogConfirm($q, async () => {
|
dialogConfirm($q, async () => {
|
||||||
const data = props?.persons?.map((e: any) => ({
|
showLoader();
|
||||||
|
const data = await props?.persons?.map((e: any) => ({
|
||||||
refId: e.id,
|
refId: e.id,
|
||||||
prefix: e.prefix,
|
prefix: e.prefix,
|
||||||
firstName: e.firstName,
|
firstName: e.firstName,
|
||||||
|
|
@ -144,16 +145,15 @@ function createCommand(isRedirect: boolean) {
|
||||||
commandTypeId: commandType.value,
|
commandTypeId: commandType.value,
|
||||||
persons: data,
|
persons: data,
|
||||||
};
|
};
|
||||||
|
|
||||||
showLoader();
|
|
||||||
await http
|
await http
|
||||||
.post(config.API.command + `/person`, body)
|
.post(config.API.command + `/person`, body)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const id = await res.data.result;
|
const id = await res.data.result;
|
||||||
|
modal.value = false;
|
||||||
if (isRedirect) {
|
if (isRedirect) {
|
||||||
router.push(`/command/edit/${id}`);
|
router.push(`/command/edit/${id}`);
|
||||||
} else {
|
} else {
|
||||||
modal.value = false;
|
// modal.value = false;
|
||||||
clearValue();
|
clearValue();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -242,9 +242,9 @@ async function getPersonList() {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
await getPersonList();
|
||||||
if (props.commandSysId) {
|
if (props.commandSysId) {
|
||||||
await getCommandSalaryList(props.commandSysId);
|
await getCommandSalaryList(props.commandSysId);
|
||||||
await getPersonList();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@ export const useCommandDetail = defineStore("commandDetailStore", () => {
|
||||||
return 3;
|
return 3;
|
||||||
case "REPORTED":
|
case "REPORTED":
|
||||||
return 5;
|
return 5;
|
||||||
|
case "NEW":
|
||||||
|
return 1;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue