YangJian0701 1 year ago
parent
commit
67e579e3d0

+ 1 - 1
src/views/stockcontrol/storagePut/index.vue

@@ -35,7 +35,7 @@
         </searchAdd>
         <bg istitle="基本信息">
             <template #btn>
-                <Labour style="margin-right: 20px;"></Labour>
+                <Labour @scanCode="scanCodeFun" style="margin-right: 20px;"></Labour>
                 <scanCode @scanCode="scanCodeFun"></scanCode>
             </template>
             <template #bg>

+ 3 - 1
src/views/stockcontrol/storagePut/scanCode.vue

@@ -123,7 +123,7 @@ const medicListStockFun = async () => {
         dialogFormVisible.value = true
     }
 }
-
+const emit: any = defineEmits(['scanCode'])
 const subStock = async ()=>{
     const ab = data.tableData.every((item:any) => item.quantity != '' && item.operator != '')
     if(!ab){ElMessage.error('缺少数据提示:【数量】与【经办人】是必填项哦!');return;}
@@ -132,6 +132,8 @@ const subStock = async ()=>{
         console.log('添加成功')
         if(reslut.code==200){
             ElMessage.success(reslut.msg)
+            dialogFormVisible.value = false
+            emit('scanCode', '')
         }
     }
 }