瀏覽代碼

no message

aXin-0810 9 月之前
父節點
當前提交
0f34601fcf
共有 1 個文件被更改,包括 9 次插入20 次删除
  1. 9 20
      src/views/auxiliaryFittings/salesManagement/auxiliarySalesReturnOrder/index.vue

+ 9 - 20
src/views/auxiliaryFittings/salesManagement/auxiliarySalesReturnOrder/index.vue

@@ -65,9 +65,9 @@ export default {
       formDialogTitles: ['新增', '编辑', '详情'],
       formDialog: false,
       id: '',
-      retState: this?.$route?.params?.pageCode || '',
       isShowTab: true,
-      orderEnginBaseId: ''
+      retState: this?.$route?.params?.pageName == '审核通过数量' ? this?.$route?.params?.pageCode : '',
+      orderEnginBaseId: this?.$route?.params?.pageName != '审核通过数量' ? this?.$route?.params?.pageCode : ''
     }
   },
   computed: {
@@ -89,19 +89,6 @@ export default {
     },
     formItems() {}
   },
-  created() {
-    if (this.pageCode) {
-      this.orderEnginBaseId = this.pageCode
-    }
-  },
-  watch: {
-    retState() {
-      this.isShowTab = false
-      this.$nextTick(() => {
-        this.isShowTab = true
-      })
-    }
-  },
   methods: {
     // 切换状态
     changeType(val) {
@@ -116,11 +103,13 @@ export default {
     getList(p, cb) {
       try {
         var pam = JSON.parse(JSON.stringify(p))
-        pam.params.push(
-          { param: 'a.goods_type', compare: '=', value: 'M' },
-          { param: 'a.ret_state', compare: '=', value: this.retState },
-          { param: 'a.order_engin_base_id', compare: '=', value: this.orderEnginBaseId }
-        )
+        pam.params.push({ param: 'a.goods_type', compare: '=', value: 'M' })
+        if (this.retState) {
+          pam.params.push({ param: 'a.ret_state', compare: '=', value: this.retState })
+        }
+        if (this.orderEnginBaseId) {
+          pam.params.push({ param: 'a.order_engin_base_id', compare: '=', value: this.orderEnginBaseId })
+        }
         cb && cb(pam)
         return listPageV2(pam)
       } catch (error) {