Commit 77e24cfb authored by 张冬's avatar 张冬

修改

parent 0f2b53cf
<template>
<div>
<el-select v-model="provinceId" style="width:167px;margin-right: 25px;" @change="getProvince">
<el-option v-for="item in provinceArr" :value="item.id" :key="item.id" :label="item.name">
</el-option>
</el-select>
<el-select v-model="cityId" style="width:167px;margin-right: 25px;" @change="getCity">
<el-option v-for="item in cityArr" :value="item.id" :key="item.id" :label="item.name">
</el-option>
</el-select>
<el-select v-model="districtId" style="width:167px;margin-right: 25px;" @change="getDistrict">
<el-option v-for="item in districtArr" :value="item.id" :key="item.id" :label="item.name">
</el-option>
</el-select>
</div>
<div>
<el-select v-model="provinceId" style="width: 167px; margin-right: 25px" @change="getProvince">
<el-option v-for="item in provinceArr" :value="item.id" :key="item.id" :label="item.name"> </el-option>
</el-select>
<el-select v-model="cityId" style="width: 167px; margin-right: 25px" @change="getCity">
<el-option v-for="item in cityArr" :value="item.id" :key="item.id" :label="item.name"> </el-option>
</el-select>
<el-select v-model="districtId" style="width: 167px; margin-right: 25px" @change="getDistrict">
<el-option v-for="item in districtArr" :value="item.id" :key="item.id" :label="item.name"> </el-option>
</el-select>
</div>
</template>
<script>
import {
cityList
} from '@/api/common/list'
import { cityList } from '@/api/common/list';
// import arrAll from './area.js'
export default {
data() {
return {
provinceId: '',
cityId: '',
districtId: '',
provinceArr: [],
cityArr: [],
districtArr: []
}
},
created() {
this.getProvinceArr()
},
methods: {
// 获取省列表
async getProvinceArr() {
const {
code,
data
} = await cityList(0)
if (code === 200) {
this.provinceArr = data
}
props: {
provinceId: {
type: Number,
default: ''
},
cityId: {
type: Number,
default: ''
},
districtId: {
type: Number,
default: ''
}
},
// 获取市列表
async getcityArr(id) {
const {
code,
data
} = await cityList(id)
if (code === 200) {
this.cityArr = data
}
data() {
return {
provinceArr: [],
cityArr: [],
districtArr: []
};
},
// 获取区列表
async getdistrictArr(id) {
const {
code,
data
} = await cityList(id)
if (code === 200) {
this.districtArr = data
}
created() {
this.getProvinceArr();
if(this.provinceId){
this.getcityArr(this.provinceId);
}
if(this.cityId){
this.getdistrictArr(this.cityId);
}
},
methods: {
// 获取省列表
async getProvinceArr() {
const { code, data } = await cityList(0);
if (code === 200) {
this.provinceArr = data;
}
},
// 获取市列表
async getcityArr(id) {
const { code, data } = await cityList(id);
if (code === 200) {
this.cityArr = data;
}
},
// 获取区列表
async getdistrictArr(id) {
const { code, data } = await cityList(id);
if (code === 200) {
this.districtArr = data;
}
},
getProvince() {
this.getcityArr(this.provinceId)
this.cityId = ''
this.districtId = ''
this.$emit('sendprovinceId', this.provinceId)
},
getCity() {
this.getdistrictArr(this.cityId)
this.districtId = ''
this.$emit('sendcityId', this.cityId)
},
getDistrict() {
this.$emit('senddistrictId', this.districtId)
getProvince() {
this.getcityArr(this.provinceId);
this.cityId = '';
this.districtId = '';
this.$emit('sendprovinceId', this.provinceId);
},
getCity() {
this.getdistrictArr(this.cityId);
this.districtId = '';
this.$emit('sendcityId', this.cityId);
},
getDistrict() {
this.$emit('senddistrictId', this.districtId);
}
}
}
// getCounty() {
// for (var i = 0; i < this.cityArr.length; i++) {
// var obj = this.cityArr[i]
// if (this.city == obj.name) {
// this.countyArr = obj.sub
// this.county = ''
// this.$emit('getCounty', this.city)
// }
// }
// },
// getDistrict() {
// this.$emit('getCity', this.county)
// }
}
// getCounty() {
// for (var i = 0; i < this.cityArr.length; i++) {
// var obj = this.cityArr[i]
// if (this.city == obj.name) {
// this.countyArr = obj.sub
// this.county = ''
// this.$emit('getCounty', this.city)
// }
// }
// },
// getDistrict() {
// this.$emit('getCity', this.county)
// }
};
</script>
<style>
......
......@@ -196,7 +196,6 @@ export default {
} else {
var { code, msg } = await bidderEarnestpayment(message);
}
if (code == 200) {
this.$message({
message: msg,
......
......@@ -112,7 +112,13 @@
</el-input>
</el-form-item>
<el-form-item label="上传缴费凭证:" prop="voucherList">
<Upload :limit="5" :max="10" tip="完成上传5份文件,每份不超过10M" @input="getfile" :fileList="ruleForm.voucherList"></Upload>
<Upload
:limit="5"
:max="10"
tip="完成上传5份文件,每份不超过10M"
@input="getfile"
:fileList="ruleForm.voucherList"
></Upload>
</el-form-item>
</div>
</div>
......@@ -265,9 +271,10 @@ export default {
message.projectId = localStorage.getItem('projectId');
let type = this.type;
if (type == 1) {
var { code, msg } = await editBidBook(message);
var { code, msg } = await editBidBook(message);
} else {
var { code, msg } = await bidBookpayment(message);
}
var { code, msg } = await bidBookpayment(message);
if (code == 200) {
this.$message({
message: msg,
......@@ -290,7 +297,7 @@ export default {
try {
const { data, code } = await bidbookDetail(projectId);
if (code == 200) {
data.companyName = JSON.parse(localStorage.getItem('userInfo')).companyName;
data.companyName = JSON.parse(localStorage.getItem('userInfo')).companyName;
for (let item of data.voucherList) {
item.name = item.fileName;
item.url = item.fileUrl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment