|
|
@@ -4,7 +4,7 @@
|
|
|
wrapClassName=""
|
|
|
title="新增现货品种"
|
|
|
v-model:visible="visible"
|
|
|
- @cancel="cancel"
|
|
|
+ @cancel="closeAction"
|
|
|
centered
|
|
|
:maskClosable="maskClosableFlag"
|
|
|
width="850px">
|
|
|
@@ -349,9 +349,7 @@ export default defineComponent({
|
|
|
}),
|
|
|
};
|
|
|
requestResultLoadingAndInfo(addDeliveryGoodsApply, reqParam, loading, ['新增现货品种成功', '新增现货品种失败:']).then(() => {
|
|
|
- // 清空数据
|
|
|
- Object.assign(formState, initFormData());
|
|
|
- cancel();
|
|
|
+ closeAction();
|
|
|
context.emit('refresh');
|
|
|
});
|
|
|
});
|
|
|
@@ -388,12 +386,17 @@ export default defineComponent({
|
|
|
value.unitid = obj.agreeunit;
|
|
|
}
|
|
|
}
|
|
|
+ function closeAction() {
|
|
|
+ //清空添加成功后的数据,确保在此新增打开是个空数据
|
|
|
+ Object.assign(formState, initFormData());
|
|
|
+ cancel();
|
|
|
+ }
|
|
|
initData(() => {
|
|
|
getGoodsGroup();
|
|
|
});
|
|
|
return {
|
|
|
visible,
|
|
|
- cancel,
|
|
|
+ closeAction,
|
|
|
formRef,
|
|
|
formState,
|
|
|
addOne,
|