linwenxin il y a 7 mois
Parent
commit
640b13373f

+ 8 - 0
src/api/workOrderPool.js

@@ -12,6 +12,14 @@ export function orderBaseImport3(data) {
   return handleImport('/order/base/import3', data.formdata, data.id || '')
 }
 
+export function orderBaseUpdate(data) {
+  return request({
+    url: `/order/base/update`,
+    method: 'post',
+    data
+  })
+}
+
 export function orderBaseSettleNormConfirm(data) {
   return request({
     url: `/order/base/settle/norm/confirm`,

+ 33 - 1
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/basicInfo.js

@@ -1,6 +1,7 @@
 import { lbsAmapRegion } from '@/api/common.js'
 import { listPageV2, getDetail } from '@/api/engineeringMaintenance/basicData'
 import { orderEnginbaseList } from '@/api/basicEngineeringData'
+import { orderBaseUpdate } from '@/api/workOrderPool'
 import geographicalPosi from '@/components/geographicalPosi/index.vue'
 export default {
   data() {
@@ -386,9 +387,40 @@ export default {
                         // 赋值GPS详细地址
                         this.orderInfo.gpsAddress = data.name
                         // if (!this.orderInfo.address) {
-                        this.orderInfo.address = '' //data.name
+                        // this.orderInfo.address = '' //data.name
                         // }
                         if (this.orderInfo.id) {
+                          var {
+                            lng,
+                            lat,
+                            provinceId,
+                            province,
+                            cityId,
+                            city,
+                            areaId,
+                            area,
+                            streetId,
+                            street,
+                            gpsAddress
+                          } = this.orderInfo
+                          orderBaseUpdate({
+                            lng,
+                            lat,
+                            provinceId,
+                            province,
+                            cityId,
+                            city,
+                            areaId,
+                            area,
+                            streetId,
+                            street,
+                            gpsAddress
+                          }).then(res => {
+                            this.$message({
+                              type: 'success',
+                              message: 'GPS地址修改成功'
+                            })
+                          })
                         }
                       })
                     })