소스 검색

子组件赠品修改

cgp 1 주 전
부모
커밋
d84f920ebe
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      src/views/hisStore/components/erpProductSelect.vue

+ 6 - 4
src/views/hisStore/components/erpProductSelect.vue

@@ -83,10 +83,12 @@ export default {
       this.queryParams.pageNum = 1;
       this.getList();
     },
-    getDetails(erpType,isGift){
-      this.queryParams.erpType=erpType;
-      if(isGift){
-        this.queryParams.isGift=isGift;
+    getDetails(erpType, isGift) {
+      this.queryParams.erpType = erpType;
+      if (isGift !== undefined && isGift !== null) {
+        this.queryParams.isGift = isGift;
+      } else {
+        delete this.queryParams.isGift;
       }
       this.getList();
     },