Merge remote-tracking branch 'origin/dev-hjf' into dev-wdb
This commit is contained in:
commit
c3add8079c
@ -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 = Date.now();
|
params.sortTime = dayjs(sortTimeValue).valueOf();
|
||||||
|
} else if (!recordId.value) {
|
||||||
|
// 新增时兜底到当前时间;编辑时不要用当前时间覆盖历史 sortTime
|
||||||
|
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