소스 검색

bug 修复

lilei 2 년 전
부모
커밋
e543b6886f

+ 1 - 14
src/views/reportData/allocationDetails/list.vue

@@ -243,7 +243,6 @@ export default {
         }
       },
       allocateTypeList: [], //  调拨类型
-      productBrandList: [], //  品牌下拉数据
       productTypeList: [], //  分类下拉数据
       operatorList: [], //  操作员下拉数据
       totalData: null //  合计
@@ -398,16 +397,6 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      productBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
     //  产品分类  列表
     getProductType () {
       productTypeQuery({}).then(res => {
@@ -439,23 +428,21 @@ export default {
       })
     },
     pageInit () {
-      this.getProductBrand()
       this.getProductType()
       this.getAllocateTypeAllList()
       this.getUserList()
+      this.resetSearchForm()
     }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {

+ 3 - 50
src/views/salesManagement/shortageStatisticsC/list.vue

@@ -34,9 +34,7 @@
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="省份">
                   <a-form-model-item prop="provinceSn">
-                    <a-select id="shortageStatisticsCList-provinceSn" allowClear v-model="queryParam.provinceSn" placeholder="请选择省">
-                      <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
-                    </a-select>
+                    <Area id="shortageStatisticsCList-provinceSn" v-model="queryParam.provinceSn" placeholder="请选择省"></Area>
                   </a-form-model-item>
                 </a-form-model-item>
               </a-col>
@@ -132,8 +130,6 @@
         bordered>
         <!-- 单号 -->
         <template slot="salesBillNo" slot-scope="text, record">
-          <!-- <span style="color: #ed1c24;cursor: pointer;" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
-          <span v-else>{{ record.salesBillNo }}</span> -->
           {{ record.salesBillNo }}
         </template>
       </s-table>
@@ -149,15 +145,14 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import custList from '@/views/common/custList.vue'
 import subarea from '@/views/common/subarea.js'
-import { getArea } from '@/api/data'
+import Area from '@/views/common/area.js'
 import { productTypeQuery } from '@/api/productType'
-import { productBrandQuery } from '@/api/productBrand'
 import ProductBrand from '@/views/common/productBrand.js'
 import { oosBuyerList, oosBuyerDetailCount, oosBuyerDetailPageCount, oosDetailExport } from '@/api/oos'
 export default {
   name: 'ShortageStatisticsCList',
   mixins: [commonMixin],
-  components: { STable, VSelect, custList, subarea, rangeDate, ProductBrand },
+  components: { STable, VSelect, custList, subarea, Area, rangeDate, ProductBrand },
   data () {
     return {
       spinning: false,
@@ -208,8 +203,6 @@ export default {
           return data
         })
       },
-      addrProvinceList: [], //  省下拉
-      productBrandList: [], //  品牌下拉数据
       productType: [],
       productTypeList: [], //  分类下拉数据
       productTotal: null,
@@ -361,52 +354,12 @@ export default {
         }
       })
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      productBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  省/市/区
-    getArea (leve, sn) {
-      let params
-      if (leve == 'province') {
-        params = { type: '2' }
-      } else {
-        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
-      }
-      getArea(params).then(res => {
-        if (res.status == 200) {
-          if (leve == 'province') {
-            this.addrProvinceList = res.data || []
-          } else if (leve == 'city') {
-            this.addrCityList = res.data || []
-          } else if (leve == 'district') {
-            this.addrDistrictList = res.data || []
-          }
-        } else {
-          if (leve == 'province') {
-            this.addrProvinceList = []
-          } else if (leve == 'city') {
-            this.addrCityList = []
-          } else if (leve == 'district') {
-            this.addrDistrictList = []
-          }
-        }
-      })
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
       this.getProductType()
-      this.getProductBrand()
-      this.getArea('province')
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 3 - 34
src/views/salesReturnManagement/salesReturn/list.vue

@@ -72,9 +72,7 @@
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
                   <a-form-model-item prop="shippingAddrProvinceSn">
-                    <a-select id="salesReturn-shippingAddrProvinceSn" allowClear v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省">
-                      <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
-                    </a-select>
+                    <Area id="salesReturn-provinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
                   </a-form-model-item>
                 </a-form-model-item>
               </a-col>
@@ -204,7 +202,7 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import subarea from '@/views/common/subarea.js'
-import { getArea } from '@/api/data'
+import Area from '@/views/common/area.js'
 import chooseCustomModal from './chooseCustomModal.vue'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import verifyModal from './verifyModal.vue'
@@ -224,6 +222,7 @@ export default {
     rangeDate,
     verifyModal,
     chooseDepartUserModal,
+    Area,
     subarea
   },
   data () {
@@ -275,7 +274,6 @@ export default {
           return data
         })
       },
-      addrProvinceList: [], //  省下拉
       visibleAudit: false,
       auditInfo: null,
       spinningAudit: false,
@@ -412,40 +410,11 @@ export default {
       this.queryParam.shippingAddrProvinceSn = undefined
       this.$refs.table.refresh(true)
     },
-    //  省/市/区
-    getArea (leve, sn) {
-      let params
-      if (leve == 'province') {
-        params = { type: '2' }
-      } else {
-        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
-      }
-      getArea(params).then(res => {
-        if (res.status == 200) {
-          if (leve == 'province') {
-            this.addrProvinceList = res.data || []
-          } else if (leve == 'city') {
-            this.addrCityList = res.data || []
-          } else if (leve == 'district') {
-            this.addrDistrictList = res.data || []
-          }
-        } else {
-          if (leve == 'province') {
-            this.addrProvinceList = []
-          } else if (leve == 'city') {
-            this.addrCityList = []
-          } else if (leve == 'district') {
-            this.addrDistrictList = []
-          }
-        }
-      })
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
-      this.getArea('province')
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 2 - 2
vue.config.js

@@ -107,9 +107,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.0.216/ocs-admin',
+        // target: 'http://192.168.0.216/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        // target: 'http://p.ocs.360arrow.com/ocs-admin', //  预发布
+        target: 'http://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,
         changeOrigin: true,
         pathRewrite: {