123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382 |
- <template>
- <div class="AssociatedInvitees-all">
- <el-dialog title="邀请方列表" :visible.sync="dialogTableVisible" :close-on-click-modal="false">
- <el-table height="600px" :border="true" :data="invitingInfos">
- <el-table-column property="country" label="国家" width="150"></el-table-column>
- <el-table-column property="area" label="地区" width="200"></el-table-column>
- <el-table-column property="client" label="单位" width="200"></el-table-column>
- <el-table-column property="contact" label="名称" width="200"></el-table-column>
- <el-table-column property="job" label="职位"></el-table-column>
- </el-table>
- </el-dialog>
-
- <div class="AssociatedInvitees-search-head">
- <el-form label-width="75px">
- <el-form-item label="国家:">
- <el-select @change="Countryswitching" clearable filterable v-model="nation" placeholder="请选择国家">
- <el-option v-for="(item,index) in nationarr" :key="index" :label="item.name" :value="item.name"></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <el-form label-width="75px">
- <el-form-item label="地区:">
- <el-select @change="Cityswitching" :disabled='disabled' clearable filterable v-model="district" placeholder="请选择地区">
- <el-option v-for="(item,index) in districtarr" :key="index" :label="item.name" :value="item.name"></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <el-form label-width="75px">
- <el-form-item label="团组名:">
- <el-select @change="Groupswitching" clearable filterable v-model="GroupName" placeholder="请选择团组名">
- <el-option v-for="(item,index) in GroupNamearr" :key="index" :label="item.name" :value="item.name"></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <el-form label-width="90px">
- <el-form-item label="邀请方名称:">
- <el-select @change="Invitingswitching" clearable filterable v-model="Invitingparty" placeholder="请选择邀请方名称">
- <el-option v-for="(item,index) in Invitingpartyarr" :key="index" :label="item.unitName" :value="item.unitName"></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <!-- <div style="margin-left: 20px;">
- <el-button type="primary">查询</el-button>
- </div> -->
- </div>
- <div class="AssociatedInvitees-table">
- <el-table
- :data="tableData"
- border
- style="width: 100%">
- <el-table-column
- prop="teamName"
- label="团组名称">
- </el-table-column>
- <el-table-column
- prop="clientUnit"
- label="客户单位">
- </el-table-column>
- <el-table-column
- prop="clientName"
- label="客户名称"
- width="80">
- </el-table-column>
- <el-table-column
- prop="visitStartDate"
- :formatter="filteryear"
- label="开始时间"
- width="110">
- </el-table-column>
- <el-table-column
- prop="visitEndDate"
- :formatter="filteryears"
- label="结束时间"
- width="110">
- </el-table-column>
- <el-table-column
- prop="visitDays"
- label="天数"
- width="50">
- </el-table-column>
- <el-table-column
- prop="visitPNumber"
- label="人数"
- width="50">
- </el-table-column>
- <el-table-column
- prop="visitCountry"
- label="国家"
- width="150">
- </el-table-column>
- <el-table-column
- prop="jietuanOperator"
- label="接团人"
- width="80">
- </el-table-column>
- <el-table-column label="操作" width="200">
- <template slot-scope="scope">
- <el-button
- @click="clickInviting(scope.row)"
- size="mini"
- title="查看邀请方"
- type="primary"
- >查看邀请方</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div class="block">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="pageIndex"
- :page-sizes="[10, 12, 20, 50]"
- :page-size="pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="totals">
- </el-pagination>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- data () {
- return {
- pageIndex:1,
- pageSize:12,
- tableData: [] ,
- Invitingparty:'',
- Invitingpartyarr:[],
- GroupName:'',
- GroupNamearr:[],
- district:'',
- districtarr:[],
- nation:'',
- nationarr:[],
- totals:0,
- countiesId:0,
- disabled:true,
- invitingInfos:[],
- dialogTableVisible:false,
- }
- },
- methods: {
- handleSizeChange(val) {
- this.pageSize=val;
- this.PostGroupLinkInvitingPageList();
- },
- handleCurrentChange(val) {
- this.pageIndex=val;
- this.PostGroupLinkInvitingPageList();
- },
- filteryear(val){
- let gstime=val.visitStartDate.split(' ')[0]
- return gstime;
- },
- filteryears(val){
- let gstime=val.visitEndDate.split(' ')[0]
- return gstime;
- },
- //获取基础数据(邀请方)
- PostGroupLinkInvitingUnitNameInit() {
- var url = "/api/Groups/PostGroupLinkInvitingUnitNameInit"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer '
- },
- data:{
- portType:1,
- pageIndex:1,
- pageSize:9999,
- search:'',
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.Invitingpartyarr=res.data.data;
- }else{
- that.$message({
- message:res.data.msg,
- duration:1000,
- type:"error"
- });
- }
- }).catch(function (error) {
- that.$message.error('请联系信息部!');
- });
- },
- //获取基础数据(国家)
- PostGroupLinkInvitingCountryInit() {
- var url = "/api/Groups/PostGroupLinkInvitingCountryInit"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer '
- },
- data:{
- portType:1,
- pageIndex:1,
- pageSize:9999,
- search:'',
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.nationarr=res.data.data;
- }else{
- that.$message({
- message:res.data.msg,
- duration:1000,
- type:"error"
- });
- }
- }).catch(function (error) {
- that.$message.error('请联系信息部!');
- });
- },
- //获取基础数据(团组名称)
- PostGroupLinkInvitingGroupInit() {
- var url = "/api/Groups/PostGroupLinkInvitingGroupInit"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer '
- },
- data:{
- portType:1,
- pageIndex:1,
- pageSize:9999,
- search:'',
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.GroupNamearr=res.data.data;
- }else{
- that.$message({
- message:res.data.msg,
- duration:1000,
- type:"error"
- });
- }
- }).catch(function (error) {
- that.$message.error('请联系信息部!');
- });
- },
- //获取基础数据(地区)
- PostGroupLinkInvitingCityInit() {
- var url = "/api/Groups/PostGroupLinkInvitingCityInit"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer '
- },
- data:{
- portType:1,
- pageIndex:1,
- pageSize:9999,
- search:'',
- countiesId:that.countiesId
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.districtarr=res.data.data;
- if(that.districtarr.length>0){
- that.disabled=false
- }
- }else{
- that.$message({
- message:res.data.msg,
- duration:1000,
- type:"error"
- });
- }
- }).catch(function (error) {
- that.$message.error('请联系信息部!');
- });
- },
- //获取表格
- PostGroupLinkInvitingPageList() {
- var url = "/api/Groups/PostGroupLinkInvitingPageList"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer '
- },
- data:{
- portType:1,
- pageIndex:that.pageIndex,
- pageSize:that.pageSize,
- counrty:that.nation,
- area:that.district,
- teamName:that.GroupName,
- unitName:that.Invitingparty,
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.totals=res.data.count;
- that.tableData=res.data.data;
- }else{
- that.$message({
- message:res.data.msg,
- duration:1000,
- type:"error"
- });
- }
- }).catch(function (error) {
- that.$message.error('请联系信息部!');
- });
- },
- //国家切换
- Countryswitching(val){
- this.pageIndex=1;
- for(let i=0;i<this.nationarr.length;i++){
- if(this.nationarr[i].name==val){
- this.countiesId=this.nationarr[i].id;
- }
- }
- this.PostGroupLinkInvitingCityInit();
- this.PostGroupLinkInvitingPageList();
- },
- //城市切换
- Cityswitching(){
- this.pageIndex=1;
- this.PostGroupLinkInvitingPageList();
- },
- //团组切换
- Groupswitching(){
- this.pageIndex=1;
- this.PostGroupLinkInvitingPageList();
- },
- //邀请方切换
- Invitingswitching(){
- this.pageIndex=1;
- this.PostGroupLinkInvitingPageList();
- },
- //查看邀请方
- clickInviting(val){
- console.log(val);
- this.invitingInfos=[];
- this.dialogTableVisible=true;
- this.invitingInfos=val.invitingInfos;
- }
- },
- mounted(){
- this.PostGroupLinkInvitingPageList();
- this.PostGroupLinkInvitingUnitNameInit();
- this.PostGroupLinkInvitingCountryInit();
- this.PostGroupLinkInvitingGroupInit();
- }
- }
- </script>
- <style>
- .AssociatedInvitees-all{
- background-color: #fff;
- padding: 10px;
- box-shadow: 0 0 5px #0005;
- border-radius: 10px;
- min-height: 830px;
-
- }
- .AssociatedInvitees-search-head{
- display: flex;
- }
- .AssociatedInvitees-search-head .el-form{
- width: 300px;
- }
- .AssociatedInvitees-search-head .el-select{
- width: 100%;
- }
- .AssociatedInvitees-table .block{
- text-align: center;
- }
- </style>
|