소스 검색

设置仓库非空判断

chenrui 5 달 전
부모
커밋
5a3bed76ef
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      src/views/salesManagement/salesQueryNew/comps/productNormalList.vue

+ 6 - 3
src/views/salesManagement/salesQueryNew/comps/productNormalList.vue

@@ -493,11 +493,14 @@ export default {
     },
     // 全部或批量仓库设置确认
     chooseWarehouseOk (sn) {
+      console.log('111111:', sn)
       const _this = this
       const snArr = []
-      _this.rowSelectionInfo.selectedRows.forEach(item => {
-        snArr.push(item.salesBillDetailSn)
-      })
+      if (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows && _this.rowSelectionInfo.selectedRows.length > 0) {
+        _this.rowSelectionInfo.selectedRows.forEach(item => {
+          snArr.push(item.salesBillDetailSn)
+        })
+      }
       const ajax_data = {
         warehouseSn: sn,
         salesBillDetailSnList: snArr,