浏览代码

fix:调整默认值

zh 2 年之前
父节点
当前提交
e53853967c

+ 17 - 0
src/views/commercialEngineering/components/base.vue

@@ -553,6 +553,21 @@ export default {
     }
   },
   created() {
+    const districtSearchOptions = {
+      level: 'country',
+      //  显示下级行政区级数,1表示返回下一级行政区
+      subdistrict: 1
+    }
+    const amapDistrictSearch = new AMap.DistrictSearch(districtSearchOptions)
+    amapDistrictSearch.setLevel('province') // 行政区级别
+    amapDistrictSearch.setExtensions('all')
+    amapDistrictSearch.search('410000', (status, result) => {
+      console.log(result)
+      if (status == 'complete') {
+        console.log(result)
+      }
+    })
+
     this.getTradeConfigList()
     if (this.module === 'add') {
       this.getRegion()
@@ -770,6 +785,7 @@ export default {
       this.formData.positionAddress = data.name
       this.formData.address = data.name
       var { province, city, district, township } = data.data.addressComponent
+      console.log(province, city, district, township)
       const area = district
       const street = township
       await this.getCallbackPosition(0, province, 'province')
@@ -788,6 +804,7 @@ export default {
       const { data } = await getRegion({ pid: id })
       this[name + 'List'] = data
       const temp = data.find(k => k[way] == value)
+      console.log(temp, 999, value)
       this.formData[name] = temp && temp.name
       this.formData[name + 'Id'] = temp && temp.id
     },

+ 1 - 1
src/views/commercialEngineering/components/model.vue

@@ -207,7 +207,7 @@ export default {
         materialOldNumber: '',
         orderId: '',
         projectNo: '',
-        qty: 0,
+        qty: null,
         specification: '',
         unit: ''
       })

+ 1 - 1
src/views/commercialEngineering/mixin/index.js

@@ -74,7 +74,7 @@ export default {
         partyA: '',
         partyAId: '',
         positionAddress: '',
-        preDeviceAmount: 0,
+        preDeviceAmount: null,
         preSignDate: '',
         projectArea: '',
         projectCategory: 'COMMON',