chenrui 4 年 前
コミット
15cabb9c8a

+ 4 - 3
src/views/salesManagement/pushOrderManagement/chooseTypeModal.vue

@@ -81,11 +81,12 @@ export default {
     },
     // 获取该销售单产品二级分类
     getTypeData () {
+      this.typeList = [{ productTypeSn2: 'all', productTypeName2: '全部' }]
       dispatchDetailType({ dispatchBillSn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
-          this.typeList = res.data
-        } else {
-          this.typeList = []
+          if (res.data && res.data.length > 0) {
+            this.typeList = [...this.typeList, ...res.data]
+          }
         }
       })
     }