|
@@ -192,6 +192,15 @@ const esopList = ref([]);
|
|
|
const checkItem = ref({});
|
|
|
const checkList = ref([]);
|
|
|
const onSelectedFinish = (itemValue) => {
|
|
|
+ if(Object.keys(itemValue).length==0){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ itemRecordList.value = [];
|
|
|
+ itemRecord.value.itemRecordList=[];
|
|
|
+ checkList.value = [];
|
|
|
+ checkItem.value.checkList = [];
|
|
|
+ esopItem.value.esopList = [];
|
|
|
+ esopList.value = [];
|
|
|
if (props.tableType === "wuliaocaiji") {
|
|
|
itemValue?.forEach((item,index)=>{
|
|
|
const recordItem = ref({});
|
|
@@ -212,7 +221,6 @@ const onSelectedFinish = (itemValue) => {
|
|
|
itemRecord.value.itemRecordList = Array.from(itemRecordList.value);
|
|
|
addBatch(itemRecord.value).then(
|
|
|
(data)=>{
|
|
|
- itemRecordList.value = [];
|
|
|
if(data.code=="200"){
|
|
|
dataList();
|
|
|
ElMessage({
|
|
@@ -254,7 +262,7 @@ const onSelectedFinish = (itemValue) => {
|
|
|
checkItem.value.checkList = Array.from(checkList.value);
|
|
|
addCheckBatch(checkItem.value).then(
|
|
|
(data)=>{
|
|
|
- checkList.value = [];
|
|
|
+
|
|
|
if(data.code=="200"){
|
|
|
dataList();
|
|
|
commonTableRef.value?.mergeOption({
|
|
@@ -297,7 +305,6 @@ const onSelectedFinish = (itemValue) => {
|
|
|
esopItem.value.esopList = Array.from(esopList.value);
|
|
|
addEsopBatch(esopItem.value).then(
|
|
|
(data)=>{
|
|
|
- esopList.value = [];
|
|
|
if(data.code=="200"){
|
|
|
dataList();
|
|
|
ElMessage({
|