|
@@ -276,7 +276,7 @@
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
<ws-form-item label="货源所在地区" span="1" prop="sourceGoods">
|
|
|
- <el-cascader
|
|
|
+ <!-- <el-cascader
|
|
|
:options="options_"
|
|
|
v-model="selectedOptions"
|
|
|
clearable
|
|
@@ -284,7 +284,10 @@
|
|
|
placeholder="请选择货源所在地区"
|
|
|
style="width: 200%"
|
|
|
@change="handleChange"
|
|
|
- />
|
|
|
+ /> -->
|
|
|
+ <el-button @click="mapInputClick('source')" class='address-btn'>
|
|
|
+ {{newSelectedOptions}}
|
|
|
+ </el-button>
|
|
|
</ws-form-item>
|
|
|
<ws-form-item label="货源详细地址" span="1" prop="sourceGoods">
|
|
|
<ws-input
|
|
@@ -295,7 +298,7 @@
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
<ws-form-item label="交货所在地区" span="1" prop="sourceGoods">
|
|
|
- <el-cascader
|
|
|
+ <!-- <el-cascader
|
|
|
:options="options_"
|
|
|
v-model="selectedOptions1"
|
|
|
clearable
|
|
@@ -303,7 +306,10 @@
|
|
|
placeholder="请选择交货所在地区"
|
|
|
style="width: 200%"
|
|
|
@change="handleChange1"
|
|
|
- />
|
|
|
+ /> -->
|
|
|
+ <el-button @click="mapInputClick('deliveryProv')" class='address-btn'>
|
|
|
+ {{newSelectedOptions1}}
|
|
|
+ </el-button>
|
|
|
</ws-form-item>
|
|
|
<ws-form-item label="交货详细地址" span="1" prop="placeDelivery">
|
|
|
<ws-input
|
|
@@ -552,6 +558,9 @@
|
|
|
accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
|
|
|
/>
|
|
|
</ws-form>
|
|
|
+ <div v-if="dialogVisible" class="map">
|
|
|
+ <map-drag @marker="marker" :isShowaddress='true' v-on:addressListen='getAddress' :type="type"></map-drag>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div style="text-align: right; padding: 10px" class="center">
|
|
|
<el-button
|
|
@@ -576,11 +585,11 @@ import {
|
|
|
import WsUpload from '@/components/WsUpload'
|
|
|
import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
|
|
|
import thirdPartyInspectionReportAddVue from '../system/shipInspection/thirdPartyInspectionReportAdd.vue'
|
|
|
-
|
|
|
+import mapDrag from '@/components/mapdrag/mapdrag'
|
|
|
export default {
|
|
|
name: 'viewSpareMoney',
|
|
|
components: {
|
|
|
- WsUpload,
|
|
|
+ WsUpload,mapDrag
|
|
|
},
|
|
|
watch: {
|
|
|
vesselId(val) {
|
|
@@ -603,9 +612,13 @@ export default {
|
|
|
showType: true,
|
|
|
// 年
|
|
|
year: '',
|
|
|
+ type:"",
|
|
|
+ dialogVisible:false,
|
|
|
options_: regionData,
|
|
|
selectedOptions: [],
|
|
|
+ newSelectedOptions:'请选择货源所在地',
|
|
|
selectedOptions1: [],
|
|
|
+ newSelectedOptions1:'请选择交货所在地区',
|
|
|
// 提交类型
|
|
|
submitType: true,
|
|
|
tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
|
|
@@ -666,6 +679,26 @@ export default {
|
|
|
this.showType = this.isShow
|
|
|
},
|
|
|
methods: {
|
|
|
+ getAddress(data){
|
|
|
+ console.log("getAddress",data)
|
|
|
+ if(data[4]=='source'){
|
|
|
+ this.newSelectedOptions = data[0]+'/'+data[1]+'/'+data[2]
|
|
|
+ this.deptBudgetList.sourceProvince = data[0]
|
|
|
+ this.deptBudgetList.sourceCity = data[1]
|
|
|
+ this.deptBudgetList.sourceArea = data[2]
|
|
|
+ this.deptBudgetList.sourceGoods = data[3]
|
|
|
+ }else{
|
|
|
+ this.newSelectedOptions1 = data[0]+'/'+data[1]+'/'+data[2]
|
|
|
+ this.deptBudgetList.deliveryProvince =data[0]
|
|
|
+ this.deptBudgetList.deliveryCity =data[1]
|
|
|
+ this.deptBudgetList.deliveryArea =data[2]
|
|
|
+ this.deptBudgetList.placeDelivery =data[3]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mapInputClick(type){
|
|
|
+ this.dialogVisible = true
|
|
|
+ this.type=type
|
|
|
+ },
|
|
|
// 关闭 dialog时 处理文件url 初始化upload组件
|
|
|
handleClose() {
|
|
|
this.dialogViewSpareMoney = false
|
|
@@ -988,7 +1021,7 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (this.selectedOptions.length == 0) {
|
|
|
+ if (!this.newSelectedOptions) {
|
|
|
this.$message({
|
|
|
message: '请选择货源所在地区!',
|
|
|
type: 'warning',
|
|
@@ -1002,7 +1035,7 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (this.selectedOptions1.length == 0) {
|
|
|
+ if (!this.newSelectedOptions1) {
|
|
|
this.$message({
|
|
|
message: '请选择交货所在地区!',
|
|
|
type: 'warning',
|
|
@@ -1742,4 +1775,26 @@ export default {
|
|
|
line-height: inherit;
|
|
|
display: none;
|
|
|
}
|
|
|
+.map{
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ margin: auto;
|
|
|
+ width: 800px;
|
|
|
+ height: 400px;
|
|
|
+ background: gainsboro;
|
|
|
+ border-radius: 20px;
|
|
|
+ padding: 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ z-index: 99;
|
|
|
+}
|
|
|
+.amap-container{
|
|
|
+ width: 100%!important;
|
|
|
+}
|
|
|
+.address-btn{
|
|
|
+ width:100%;
|
|
|
+ text-align:left;
|
|
|
+}
|
|
|
</style>
|