AssociatedInvitees.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. <template>
  2. <div class="AssociatedInvitees-all">
  3. <el-dialog title="邀请方列表" :visible.sync="dialogTableVisible" :close-on-click-modal="false">
  4. <el-table height="600px" :border="true" :data="invitingInfos">
  5. <el-table-column property="country" label="国家" width="150"></el-table-column>
  6. <el-table-column property="area" label="地区" width="200"></el-table-column>
  7. <el-table-column property="client" label="单位" width="200"></el-table-column>
  8. <el-table-column property="contact" label="名称" width="200"></el-table-column>
  9. <el-table-column property="job" label="职位"></el-table-column>
  10. </el-table>
  11. </el-dialog>
  12. <div class="AssociatedInvitees-search-head">
  13. <el-form label-width="75px">
  14. <el-form-item label="国家:">
  15. <el-select @change="Countryswitching" clearable filterable v-model="nation" placeholder="请选择国家">
  16. <el-option v-for="(item,index) in nationarr" :key="index" :label="item.name" :value="item.name"></el-option>
  17. </el-select>
  18. </el-form-item>
  19. </el-form>
  20. <el-form label-width="75px">
  21. <el-form-item label="地区:">
  22. <el-select @change="Cityswitching" :disabled='disabled' clearable filterable v-model="district" placeholder="请选择地区">
  23. <el-option v-for="(item,index) in districtarr" :key="index" :label="item.name" :value="item.name"></el-option>
  24. </el-select>
  25. </el-form-item>
  26. </el-form>
  27. <el-form label-width="75px">
  28. <el-form-item label="团组名:">
  29. <el-select @change="Groupswitching" clearable filterable v-model="GroupName" placeholder="请选择团组名">
  30. <el-option v-for="(item,index) in GroupNamearr" :key="index" :label="item.name" :value="item.name"></el-option>
  31. </el-select>
  32. </el-form-item>
  33. </el-form>
  34. <el-form label-width="90px">
  35. <el-form-item label="邀请方名称:">
  36. <el-select @change="Invitingswitching" clearable filterable v-model="Invitingparty" placeholder="请选择邀请方名称">
  37. <el-option v-for="(item,index) in Invitingpartyarr" :key="index" :label="item.unitName" :value="item.unitName"></el-option>
  38. </el-select>
  39. </el-form-item>
  40. </el-form>
  41. <!-- <div style="margin-left: 20px;">
  42. <el-button type="primary">查询</el-button>
  43. </div> -->
  44. </div>
  45. <div class="AssociatedInvitees-table">
  46. <el-table
  47. :data="tableData"
  48. border
  49. style="width: 100%">
  50. <el-table-column
  51. prop="teamName"
  52. label="团组名称">
  53. </el-table-column>
  54. <el-table-column
  55. prop="clientUnit"
  56. label="客户单位">
  57. </el-table-column>
  58. <el-table-column
  59. prop="clientName"
  60. label="客户名称"
  61. width="80">
  62. </el-table-column>
  63. <el-table-column
  64. prop="visitStartDate"
  65. :formatter="filteryear"
  66. label="开始时间"
  67. width="110">
  68. </el-table-column>
  69. <el-table-column
  70. prop="visitEndDate"
  71. :formatter="filteryears"
  72. label="结束时间"
  73. width="110">
  74. </el-table-column>
  75. <el-table-column
  76. prop="visitDays"
  77. label="天数"
  78. width="50">
  79. </el-table-column>
  80. <el-table-column
  81. prop="visitPNumber"
  82. label="人数"
  83. width="50">
  84. </el-table-column>
  85. <el-table-column
  86. prop="visitCountry"
  87. label="国家"
  88. width="150">
  89. </el-table-column>
  90. <el-table-column
  91. prop="jietuanOperator"
  92. label="接团人"
  93. width="80">
  94. </el-table-column>
  95. <el-table-column label="操作" width="200">
  96. <template slot-scope="scope">
  97. <el-button
  98. @click="clickInviting(scope.row)"
  99. size="mini"
  100. title="查看邀请方"
  101. type="primary"
  102. >查看邀请方</el-button>
  103. </template>
  104. </el-table-column>
  105. </el-table>
  106. <div class="block">
  107. <el-pagination
  108. @size-change="handleSizeChange"
  109. @current-change="handleCurrentChange"
  110. :current-page="pageIndex"
  111. :page-sizes="[10, 12, 20, 50]"
  112. :page-size="pageSize"
  113. layout="total, sizes, prev, pager, next, jumper"
  114. :total="totals">
  115. </el-pagination>
  116. </div>
  117. </div>
  118. </div>
  119. </template>
  120. <script>
  121. export default {
  122. data () {
  123. return {
  124. pageIndex:1,
  125. pageSize:12,
  126. tableData: [] ,
  127. Invitingparty:'',
  128. Invitingpartyarr:[],
  129. GroupName:'',
  130. GroupNamearr:[],
  131. district:'',
  132. districtarr:[],
  133. nation:'',
  134. nationarr:[],
  135. totals:0,
  136. countiesId:0,
  137. disabled:true,
  138. invitingInfos:[],
  139. dialogTableVisible:false,
  140. }
  141. },
  142. methods: {
  143. handleSizeChange(val) {
  144. this.pageSize=val;
  145. this.PostGroupLinkInvitingPageList();
  146. },
  147. handleCurrentChange(val) {
  148. this.pageIndex=val;
  149. this.PostGroupLinkInvitingPageList();
  150. },
  151. filteryear(val){
  152. let gstime=val.visitStartDate.split(' ')[0]
  153. return gstime;
  154. },
  155. filteryears(val){
  156. let gstime=val.visitEndDate.split(' ')[0]
  157. return gstime;
  158. },
  159. //获取基础数据(邀请方)
  160. PostGroupLinkInvitingUnitNameInit() {
  161. var url = "/api/Groups/PostGroupLinkInvitingUnitNameInit"
  162. var that = this
  163. this.$axios({
  164. method: 'post',
  165. url: url,
  166. headers: {
  167. Authorization: 'Bearer '
  168. },
  169. data:{
  170. portType:1,
  171. pageIndex:1,
  172. pageSize:9999,
  173. search:'',
  174. }
  175. }).then(function (res) {
  176. if (res.data.code == 200) {
  177. that.Invitingpartyarr=res.data.data;
  178. }else{
  179. that.$message({
  180. message:res.data.msg,
  181. duration:1000,
  182. type:"error"
  183. });
  184. }
  185. }).catch(function (error) {
  186. that.$message.error('请联系信息部!');
  187. });
  188. },
  189. //获取基础数据(国家)
  190. PostGroupLinkInvitingCountryInit() {
  191. var url = "/api/Groups/PostGroupLinkInvitingCountryInit"
  192. var that = this
  193. this.$axios({
  194. method: 'post',
  195. url: url,
  196. headers: {
  197. Authorization: 'Bearer '
  198. },
  199. data:{
  200. portType:1,
  201. pageIndex:1,
  202. pageSize:9999,
  203. search:'',
  204. }
  205. }).then(function (res) {
  206. if (res.data.code == 200) {
  207. that.nationarr=res.data.data;
  208. }else{
  209. that.$message({
  210. message:res.data.msg,
  211. duration:1000,
  212. type:"error"
  213. });
  214. }
  215. }).catch(function (error) {
  216. that.$message.error('请联系信息部!');
  217. });
  218. },
  219. //获取基础数据(团组名称)
  220. PostGroupLinkInvitingGroupInit() {
  221. var url = "/api/Groups/PostGroupLinkInvitingGroupInit"
  222. var that = this
  223. this.$axios({
  224. method: 'post',
  225. url: url,
  226. headers: {
  227. Authorization: 'Bearer '
  228. },
  229. data:{
  230. portType:1,
  231. pageIndex:1,
  232. pageSize:9999,
  233. search:'',
  234. }
  235. }).then(function (res) {
  236. if (res.data.code == 200) {
  237. that.GroupNamearr=res.data.data;
  238. }else{
  239. that.$message({
  240. message:res.data.msg,
  241. duration:1000,
  242. type:"error"
  243. });
  244. }
  245. }).catch(function (error) {
  246. that.$message.error('请联系信息部!');
  247. });
  248. },
  249. //获取基础数据(地区)
  250. PostGroupLinkInvitingCityInit() {
  251. var url = "/api/Groups/PostGroupLinkInvitingCityInit"
  252. var that = this
  253. this.$axios({
  254. method: 'post',
  255. url: url,
  256. headers: {
  257. Authorization: 'Bearer '
  258. },
  259. data:{
  260. portType:1,
  261. pageIndex:1,
  262. pageSize:9999,
  263. search:'',
  264. countiesId:that.countiesId
  265. }
  266. }).then(function (res) {
  267. if (res.data.code == 200) {
  268. that.districtarr=res.data.data;
  269. if(that.districtarr.length>0){
  270. that.disabled=false
  271. }
  272. }else{
  273. that.$message({
  274. message:res.data.msg,
  275. duration:1000,
  276. type:"error"
  277. });
  278. }
  279. }).catch(function (error) {
  280. that.$message.error('请联系信息部!');
  281. });
  282. },
  283. //获取表格
  284. PostGroupLinkInvitingPageList() {
  285. var url = "/api/Groups/PostGroupLinkInvitingPageList"
  286. var that = this
  287. this.$axios({
  288. method: 'post',
  289. url: url,
  290. headers: {
  291. Authorization: 'Bearer '
  292. },
  293. data:{
  294. portType:1,
  295. pageIndex:that.pageIndex,
  296. pageSize:that.pageSize,
  297. counrty:that.nation,
  298. area:that.district,
  299. teamName:that.GroupName,
  300. unitName:that.Invitingparty,
  301. }
  302. }).then(function (res) {
  303. if (res.data.code == 200) {
  304. that.totals=res.data.count;
  305. that.tableData=res.data.data;
  306. }else{
  307. that.$message({
  308. message:res.data.msg,
  309. duration:1000,
  310. type:"error"
  311. });
  312. }
  313. }).catch(function (error) {
  314. that.$message.error('请联系信息部!');
  315. });
  316. },
  317. //国家切换
  318. Countryswitching(val){
  319. this.pageIndex=1;
  320. for(let i=0;i<this.nationarr.length;i++){
  321. if(this.nationarr[i].name==val){
  322. this.countiesId=this.nationarr[i].id;
  323. }
  324. }
  325. this.PostGroupLinkInvitingCityInit();
  326. this.PostGroupLinkInvitingPageList();
  327. },
  328. //城市切换
  329. Cityswitching(){
  330. this.pageIndex=1;
  331. this.PostGroupLinkInvitingPageList();
  332. },
  333. //团组切换
  334. Groupswitching(){
  335. this.pageIndex=1;
  336. this.PostGroupLinkInvitingPageList();
  337. },
  338. //邀请方切换
  339. Invitingswitching(){
  340. this.pageIndex=1;
  341. this.PostGroupLinkInvitingPageList();
  342. },
  343. //查看邀请方
  344. clickInviting(val){
  345. console.log(val);
  346. this.invitingInfos=[];
  347. this.dialogTableVisible=true;
  348. this.invitingInfos=val.invitingInfos;
  349. }
  350. },
  351. mounted(){
  352. this.PostGroupLinkInvitingPageList();
  353. this.PostGroupLinkInvitingUnitNameInit();
  354. this.PostGroupLinkInvitingCountryInit();
  355. this.PostGroupLinkInvitingGroupInit();
  356. }
  357. }
  358. </script>
  359. <style>
  360. .AssociatedInvitees-all{
  361. background-color: #fff;
  362. padding: 10px;
  363. box-shadow: 0 0 5px #0005;
  364. border-radius: 10px;
  365. min-height: 830px;
  366. }
  367. .AssociatedInvitees-search-head{
  368. display: flex;
  369. }
  370. .AssociatedInvitees-search-head .el-form{
  371. width: 300px;
  372. }
  373. .AssociatedInvitees-search-head .el-select{
  374. width: 100%;
  375. }
  376. .AssociatedInvitees-table .block{
  377. text-align: center;
  378. }
  379. </style>