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