Commit 8e5292e9 authored by 张冬's avatar 张冬

询价公告地区回显

parent 1cdf0a55
<template>
<div>
<el-select v-model="provinceId1" style="width: 167px; margin-right: 25px" @change="getProvince">
<el-select v-model="provinceId1" style="width: 167px; margin-right: 25px" @change="getProvince" :disabled="type">
<el-option v-for="item in provinceArr" :value="item.id" :key="item.id" :label="item.name"> </el-option>
</el-select>
<el-select v-model="cityId1" style="width: 167px; margin-right: 25px" @change="getCity">
<el-select v-model="cityId1" style="width: 167px; margin-right: 25px" @change="getCity" :disabled="type">
<el-option v-for="item in cityArr" :value="item.id" :key="item.id" :label="item.name"> </el-option>
</el-select>
<el-select v-model="districtId1" style="width: 167px; margin-right: 25px" @change="getDistrict">
<el-select v-model="districtId1" style="width: 167px; margin-right: 25px" @change="getDistrict" :disabled="type">
<el-option v-for="item in districtArr" :value="item.id" :key="item.id" :label="item.name"> </el-option>
</el-select>
</div>
......@@ -26,7 +26,7 @@ export default {
districtId1:""
};
},
props: ['provinceId', 'cityId', 'districtId'],
props: ['provinceId', 'cityId', 'districtId',"type"],
watch: {
provinceId(newName, oldName) {
this.provinceId1=this.provinceId
......
<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 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 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 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: []
};
},
props: ['provinceId', 'cityId', 'districtId'],
watch: {
provinceId(newName, oldName) {
this.getcityArr(newName);
},
cityId(newName, oldName) {
this.getdistrictArr(newName);
districtArr: [],
}
},
created() {
this.getProvinceArr();
// this.getcityArr(this.provinceId);
// this.getdistrictArr(this.cityId);
this.getProvinceArr()
},
methods: {
// 获取省列表
async getProvinceArr() {
console.log('请求省————————————————————');
const { code, data } = await cityList(0);
const {
code,
data
} = await cityList(0)
if (code === 200) {
this.provinceArr = data;
this.provinceArr = data
}
},
// 获取市列表
async getcityArr(id) {
console.log(id);
const { code, data } = await cityList(id);
const {
code,
data
} = await cityList(id)
if (code === 200) {
this.cityArr = data;
this.cityArr = data
}
},
// 获取区列表
async getdistrictArr(id) {
const { code, data } = await cityList(id);
const {
code,
data
} = await cityList(id)
if (code === 200) {
this.districtArr = data;
this.districtArr = data
}
},
getProvince() {
this.getcityArr(this.provinceId);
this.cityId = '';
this.districtId = '';
this.$emit('sendprovinceId', this.provinceId);
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);
this.getdistrictArr(this.cityId)
this.districtId = ''
this.$emit('sendcityId', this.cityId)
},
getDistrict() {
this.$emit('senddistrictId', this.districtId);
this.$emit('senddistrictId', this.districtId)
}
}
......@@ -91,7 +98,7 @@ export default {
// getDistrict() {
// this.$emit('getCity', this.county)
// }
};
}
</script>
<style>
......
......@@ -37,6 +37,7 @@
@sendprovinceId="getprovinceId"
@sendcityId="getcityId"
@senddistrictId="getdistrictId"
:type='false'
></citySelect>
</el-form-item>
<el-form-item label="最小投标单位数:" prop="minTender">
......
......@@ -4,7 +4,7 @@
<dataBreadcrumb :breads="breads"></dataBreadcrumb>
<h3>{{ type == 1 ? '编辑' : '发布' }}询价公告</h3>
<h5>{{ type == 1 ? '编辑' : '发布' }}询价公告</h5>
<div v-if="type == 1" class="abs" style="width:400px">
<div v-if="type == 1" class="abs" style="width: 400px">
<div>拒绝原因:{{ ruleForm.reason }}</div>
</div>
</div>
......@@ -22,10 +22,21 @@
<el-input v-model.trim="ruleForm.title" placeholder="请输入" style="width: 50%" maxlength="30"></el-input>
</el-form-item>
<el-form-item label="询价所在地" prop="address">
<cityEdit
:provinceId="ruleForm.provinceId"
:cityId="ruleForm.cityId"
:districtId="ruleForm.districtId"
@sendprovinceId="getprovinceId"
@sendcityId="getcityId"
@senddistrictId="getdistrictId"
:type="false"
v-if="type == 1"
></cityEdit>
<citySelect
@sendprovinceId="getprovinceId"
@sendcityId="getcityId"
@senddistrictId="getdistrictId"
v-else
></citySelect>
</el-form-item>
<el-form-item label="项目优先级" prop="priority">
......@@ -135,8 +146,12 @@
<dataTable :table-data="tableData" :columns="columns" :is-pageobj="false"></dataTable>
<div class="flex" style="margin-top: 20px">
<div class="adjustment">上传文件</div>
<singleUpload :limit="1" tip="支持扩展名:.rar .zip .doc .docx .pdf .jpg..." @input="getfile"
:fileList = "ruleForm.accessoryPOList" ></singleUpload>
<singleUpload
:limit="1"
tip="支持扩展名:.rar .zip .doc .docx .pdf .jpg..."
@input="getfile"
:fileList="ruleForm.accessoryPOList"
></singleUpload>
</div>
</div>
</div>
......@@ -171,9 +186,11 @@
import { generateNumber, enquiryProjectId } from '@/api/common/list';
import dataTable from '@components/nopageTable.vue';
import dataBreadcrumb from '@components/dataBreadcrumb.vue';
import cityEdit from '@components/citySelect/cityEdit.vue';
import citySelect from '@components/citySelect/citySelect.vue';
import singleUpload from '@components/Upload/Upload.vue';
import { createEnquiry,editEnquiry } from '@api/purchaser/bid';
import { createEnquiry, editEnquiry } from '@api/purchaser/bid';
import { getTime } from '@utils/time';
import { commoditylist, inqueryinfo } from '@api/common/list';
......@@ -182,7 +199,8 @@ export default {
dataTable,
dataBreadcrumb,
citySelect,
singleUpload
singleUpload,
cityEdit
},
data() {
// 测试省份
......@@ -246,7 +264,7 @@ export default {
cityId: '',
districtId: '',
inquiryCode: '',
priority:0,
priority: 0,
startTime: '',
endTime: '',
purchaseAgent: '1',
......@@ -393,7 +411,7 @@ export default {
item.name = item.fileName;
item.url = item.accessoryUrl;
}
data.accessoryPOList=data.accessoryVOList
data.accessoryPOList = data.accessoryVOList;
this.ruleForm = data;
let userInfo = JSON.parse(localStorage.getItem('userInfo'));
this.ruleForm.purchaseAgent = userInfo.companyName;
......
......@@ -33,7 +33,7 @@
<citySelect
@sendprovinceId="getprovinceId"
@sendcityId="getcityId"
@senddistrictId="getdistrictId"
@senddistrictId="getdistriccitySelecttId"
:provinceId="ruleForm.provinceId"
:cityId="ruleForm.cityId"
:districtId="ruleForm.districtId"
......@@ -236,7 +236,7 @@ import dataTable from '@components/nopageTable.vue';
import dataTableList from '@components/dataTable.vue';
import upload from '@components/Upload/Upload.vue';
import changeNav from '@components/changeNav.vue';
import citySelect from '@components/citySelect/citySelect.vue';
import citySelect from '@components/citySelect/cityEdit.vue';
// const bidMethods = [{
// value: '公开',
......
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