Merge branch 'develop' into devTee
This commit is contained in:
commit
3365e1b6ff
2 changed files with 26 additions and 2 deletions
|
|
@ -1356,6 +1356,7 @@ const selectData = async (props: DataProps) => {
|
|||
refCommandDateInput.value = props.row.refCommandDate
|
||||
? convertDateDisplay(props.row.refCommandDate as Date)
|
||||
: "";
|
||||
note.value = props.row.note;
|
||||
await checkRowPage();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -281,7 +281,9 @@
|
|||
map-options
|
||||
option-label="name"
|
||||
:options="opLevel"
|
||||
@input-value="inputPositionLevel"
|
||||
@new-value="createValue"
|
||||
@blur.stop="inputPositionLevelBlur"
|
||||
option-value="name"
|
||||
hide-bottom-space
|
||||
use-input
|
||||
|
|
@ -1268,6 +1270,27 @@ const formDataSalary = reactive<FormSalaryNew>({
|
|||
doc: "",
|
||||
});
|
||||
|
||||
const tempPositionLevelInput = ref("");
|
||||
|
||||
function inputPositionLevel(v: string) {
|
||||
if (!!v) tempPositionLevelInput.value = v;
|
||||
}
|
||||
|
||||
function inputPositionLevelBlur() {
|
||||
if (tempPositionLevelInput.value === formDataSalary.levelPosition) return;
|
||||
|
||||
if (
|
||||
!optionStore.optipnLevel.some(
|
||||
(v) => v.name === tempPositionLevelInput.value
|
||||
)
|
||||
) {
|
||||
createValue(tempPositionLevelInput.value);
|
||||
}
|
||||
|
||||
formDataSalary.levelPosition = tempPositionLevelInput.value;
|
||||
tempPositionLevelInput.value = "";
|
||||
}
|
||||
|
||||
const opPos = ref<any>([]);
|
||||
const opType = ref<any>([]);
|
||||
const opLevel = ref<any>([]);
|
||||
|
|
@ -2115,7 +2138,7 @@ function coppyForm() {
|
|||
formDataSalary.doc = formDataSalary.doc;
|
||||
}
|
||||
|
||||
function createValue(val: any, done: any) {
|
||||
function createValue(val: any, done?: any) {
|
||||
if (val.length > 0) {
|
||||
const maxId = optionStore.optipnLevel.reduce((max: any, item: any) => {
|
||||
const itemId = typeof item.id === "number" ? item.id : parseInt(item.id);
|
||||
|
|
@ -2130,7 +2153,7 @@ function createValue(val: any, done: any) {
|
|||
optionStore.optipnLevel.push(newObj);
|
||||
}
|
||||
|
||||
done(newObj, "toggle");
|
||||
done?.(newObj, "toggle");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue