|
@@ -38,9 +38,10 @@ function AddObject1() {
|
|
|
const res = await object1AddAPI();
|
|
|
setAddInfoTop({
|
|
|
...res.data,
|
|
|
- sourceName: options[0].name ? options[0].name : "",
|
|
|
+ sourceName:null
|
|
|
+ // sourceName: options[0].name ? options[0].name : "",
|
|
|
});
|
|
|
- }, [options]);
|
|
|
+ }, []);
|
|
|
|
|
|
// 通过id获取详情函数
|
|
|
const object1infoOutAPIFu = useCallback(
|
|
@@ -191,6 +192,8 @@ function AddObject1() {
|
|
|
// 点击提交
|
|
|
const submitFu = useCallback(
|
|
|
async (val: number) => {
|
|
|
+ if (!addInfoTop.sourceName) return MessageFu.warning("请选择藏品来源!");
|
|
|
+
|
|
|
if (results.length === 0)
|
|
|
return MessageFu.warning("至少需要添加一条藏品信息!");
|
|
|
const obj = {
|