Compare commits
2 Commits
fbd51dc0d7
...
c3add8079c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3add8079c | ||
| 37b79742f3 |
@ -238,12 +238,15 @@ async function save() {
|
|||||||
|
|
||||||
// sortTime:使用模板中的时间字段
|
// sortTime:使用模板中的时间字段
|
||||||
const sortTimeKey = temp.value?.service?.timeTitle || '';
|
const sortTimeKey = temp.value?.service?.timeTitle || '';
|
||||||
if (sortTimeKey && form[sortTimeKey] && dayjs(form[sortTimeKey]).isValid()) {
|
if (sortTimeKey) {
|
||||||
params.sortTime = dayjs(form[sortTimeKey]).valueOf();
|
const sortTimeValue = forms.value?.[sortTimeKey];
|
||||||
} else {
|
if (sortTimeValue && dayjs(sortTimeValue).isValid()) {
|
||||||
|
params.sortTime = dayjs(sortTimeValue).valueOf();
|
||||||
|
} else if (!recordId.value) {
|
||||||
|
// 新增时兜底到当前时间;编辑时不要用当前时间覆盖历史 sortTime
|
||||||
params.sortTime = Date.now();
|
params.sortTime = Date.now();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
uniLoading('保存中...');
|
uniLoading('保存中...');
|
||||||
try {
|
try {
|
||||||
const res = await api(
|
const res = await api(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user