visaform.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  1. <template>
  2. <div class="visa-box">
  3. <div class="search-ul">
  4. <div class="search-li">
  5. <el-select @change="changeOption()" v-model="gnamevalue" filterable placeholder="请输入团组名称">
  6. <el-option v-for="item in gnameoption" :key="item.id" :label="item.groupName" :value="item.id">
  7. </el-option>
  8. </el-select>
  9. </div>
  10. <div class="search-li">
  11. <div class="country-box">
  12. <label>签证表国别: </label>
  13. <el-select v-model="groupvalues" filterable placeholder="请选择">
  14. <el-option v-for="item in optionsgroup" :key="item.id" :label="item.name" :value="item.id">
  15. </el-option>
  16. </el-select>
  17. </div>
  18. <div class="interpret-box">
  19. <label>翻译语种: </label>
  20. <el-select v-model="value" filterable placeholder="请选择">
  21. <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
  22. </el-option>
  23. </el-select>
  24. </div>
  25. <router-link :to="{ path: '/home/visaEdit', query: { DiId: gnamevalue } }">
  26. <el-button type="primary">新增数据</el-button>
  27. </router-link>
  28. <el-button type="primary" style="margin-left: 5px;">新增简单数据</el-button>
  29. </div>
  30. </div>
  31. <el-row>
  32. <el-button type="primary">一键导出签证</el-button>
  33. <el-button type="primary">一键导省外办</el-button>
  34. <el-button type="primary">一键导市外办</el-button>
  35. <el-button type="primary">签证事项表</el-button>
  36. <el-button type="primary">照 会</el-button>
  37. <el-button type="primary">印度名单表</el-button>
  38. <el-button type="primary">马来西亚名单表</el-button>
  39. </el-row>
  40. <div class="form-box">
  41. <template>
  42. <el-table :data="tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border
  43. style="width: 100%">
  44. <el-table-column label="序 号" width="55">
  45. <template slot-scope="scope">
  46. {{ (currentPage - 1) * pageSize + scope.$index + 1 }}
  47. </template>
  48. </el-table-column>
  49. <el-table-column prop="clientName" width="200" label="姓 名">
  50. </el-table-column>
  51. <el-table-column prop="tel" label="手 机" width="220">
  52. </el-table-column>
  53. <el-table-column prop="cerdNo" label="身份证" width="200">
  54. </el-table-column>
  55. <el-table-column prop="ext" label="签证表" width="100">
  56. <el-link type="primary">导 出</el-link>
  57. </el-table-column>
  58. <el-table-column prop="phone" label="派遣函" width="200">
  59. <el-link type="primary">市外办</el-link>
  60. <el-link type="primary">省外办</el-link>
  61. </el-table-column>
  62. <el-table-column prop="urgentPhone" label="操 作">
  63. <el-link type="primary">检索资料</el-link>
  64. <el-link type="primary">美加表</el-link>
  65. <el-link type="primary">非美加表</el-link>
  66. <el-link type="danger">删除</el-link>
  67. </el-table-column>
  68. </el-table>
  69. </template>
  70. <div class="block">
  71. <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
  72. :current-page="currentPage" :page-sizes="[5, 10, 15, 20]" :page-size="pageSize"
  73. layout="total, sizes, prev, pager, next" :total="tableData.length">
  74. </el-pagination>
  75. </div>
  76. </div>
  77. <div class="form-box">
  78. <div class="visas-title">
  79. <div>历史用户信息处</div>
  80. <div class="visas-box">
  81. <el-input @input="clickUsers()" placeholder="请输入内容" v-model="input" clearable>
  82. </el-input>
  83. <el-button @click="Inquireclick()" type="primary">勾选项入团</el-button>
  84. </div>
  85. </div>
  86. <template>
  87. <el-table :data="externalDatas.slice((currentPageUser - 1) * pageSizeUser, currentPageUser * pageSizeUser)"
  88. border tooltip-effect="dark" ref="multipleTable" :row-key="getRowKeys"
  89. @selection-change="handleSelectionChange" style="width: 100%">
  90. <el-table-column :reserve-selection="true" type="selection" width="55">
  91. </el-table-column>
  92. <el-table-column label="序 号" width="55">
  93. <template slot-scope="scope">
  94. {{ (currentPage - 1) * pageSize + scope.$index + 1 }}
  95. </template>
  96. </el-table-column>
  97. <el-table-column width="100" prop="clientName" label="姓 名">
  98. </el-table-column>
  99. <el-table-column prop="landlinePhone" label="手 机" width="180">
  100. </el-table-column>
  101. <!-- <el-table-column
  102. prop="companyName"
  103. label="地 址"
  104. width="180">
  105. </el-table-column> -->
  106. <el-table-column prop="idNo" label="身份证" width="250">
  107. </el-table-column>
  108. <el-table-column label="操 作">
  109. <template slot-scope="scope">
  110. <el-link type="primary">增加入此团</el-link>
  111. <el-link type="primary" @click="upDate(scope.$index, scope.row)">编辑</el-link>
  112. <el-link type="danger">删除</el-link>
  113. </template>
  114. </el-table-column>
  115. </el-table>
  116. </template>
  117. <div class="block">
  118. <el-pagination align='center' @size-change="handleSizeChanges" @current-change="handleCurrentChanges"
  119. :current-page="currentPageUser" :page-sizes="[5, 10, 15, 20]" :page-size="pageSizeUser"
  120. layout="total, sizes, prev, pager, next" :total="externalDatas.length">
  121. </el-pagination>
  122. </div>
  123. </div>
  124. </div>
  125. </template>
  126. <script>
  127. export default {
  128. data() {
  129. return {
  130. input: '',
  131. gnameoption: [],
  132. gnamevalue: '',
  133. externalData: [],
  134. externalDatas: [],
  135. optionsgroup: [],
  136. options: [
  137. {
  138. value: '0',
  139. label: '中文'
  140. },
  141. {
  142. value: '1',
  143. label: '英语'
  144. }
  145. ],
  146. groupvalues: '',
  147. value: '0',
  148. tableData: [],
  149. currentPage: 1, // 当前页码
  150. pageSize: 5,// 每页的数据条数
  151. currentPageUser: 1, // 当前页码
  152. pageSizeUser: 5,// 每页的数据条数
  153. multipleTable: [],
  154. token: ''
  155. }
  156. },
  157. methods: {
  158. //每页条数改变时触发 选择一页显示多少行
  159. handleSizeChange(val) {
  160. this.currentPage = 1;
  161. this.pageSize = val;
  162. },
  163. //当前页改变时触发 跳转其他页
  164. handleCurrentChange(val) {
  165. this.currentPage = val;
  166. },
  167. //每页条数改变时触发 选择一页显示多少行
  168. handleSizeChanges(val) {
  169. this.currentPageUser = 1;
  170. this.pageSizeUser = val;
  171. },
  172. //当前页改变时触发 跳转其他页
  173. handleCurrentChanges(val) {
  174. this.currentPageUser = val;
  175. },
  176. handleSelectionChange(val) {
  177. this.multipleSelection = val;
  178. console.log(this.multipleSelection)
  179. },
  180. getRowKeys(row) {
  181. return row.num
  182. },
  183. getgroupsname() {
  184. var url = "/api/Groups/GetGroupNameAndVisaNationality"
  185. var that = this
  186. this.$axios({
  187. method: 'post',
  188. url: url,
  189. headers: {
  190. Authorization: 'Bearer ' + this.token
  191. },
  192. data: {
  193. portType: 1,
  194. }
  195. }).then(function (res) {
  196. console.log(res)
  197. if (res.data.code == 200) {
  198. that.gnameoption = res.data.data.groupNameData;
  199. that.gnamevalue = that.gnameoption[0].id;
  200. that.optionsgroup = res.data.data.visaNationalityData;
  201. that.groupvalues = that.optionsgroup[0].id;
  202. }
  203. that.getCrm()
  204. })
  205. },
  206. getCrm() {
  207. this.tableData = [];
  208. var url = "/api/Groups/GetCrmByGroupId"
  209. var that = this
  210. this.$axios({
  211. method: 'post',
  212. url: url,
  213. headers: {
  214. Authorization: 'Bearer ' + this.token
  215. },
  216. data: {
  217. portType: 1,
  218. groupId: that.gnamevalue
  219. }
  220. }).then(function (res) {
  221. console.log(res)
  222. if (res.data.code == 200) {
  223. that.tableData = res.data.data;
  224. }
  225. })
  226. },
  227. changeOption() {
  228. console.log(this.gnamevalue)
  229. this.getCrm()
  230. },
  231. getExternalusers() {
  232. var url = "/api/CRM/GetClientList"
  233. var that = this
  234. this.$axios({
  235. method: 'post',
  236. url: url,
  237. headers: {
  238. Authorization: 'Bearer ' + this.token
  239. },
  240. data: {
  241. portType: 1,
  242. }
  243. }).then(function (res) {
  244. console.log(res)
  245. if (res.data.code == 200) {
  246. that.externalData = res.data.data;
  247. that.externalDatas = that.externalData;
  248. }
  249. })
  250. },
  251. clickUsers() {
  252. var newarr = [];
  253. if (this.input == "") {
  254. newarr = this.externalData;
  255. } else {
  256. for (var i = 0; i < this.externalData.length; i++) {
  257. if (this.externalData[i].clientName.indexOf(this.input) != -1) {
  258. newarr.push(this.externalData[i]);
  259. }
  260. else if (this.externalData[i].idNo.indexOf(this.input) != -1) {
  261. newarr.push(this.externalData[i]);
  262. }
  263. else if (this.externalData[i].landlinePhone.indexOf(this.input) != -1) {
  264. newarr.push(this.externalData[i]);
  265. }
  266. // else if (this.externalData[i].companyName.indexOf(this.input) != -1) {
  267. // newarr.push(this.externalData[i]);
  268. // }
  269. }
  270. }
  271. this.externalDatas = newarr;
  272. this.currentPageUser = 1;
  273. },
  274. upDate(index, row) {
  275. this.$router.push({
  276. path: "/home/visaEdit",
  277. query: {
  278. DiId: this.gnamevalue,
  279. id: row.id
  280. }
  281. })
  282. }
  283. },
  284. mounted() {
  285. this.token = JSON.parse(localStorage.getItem('userinif')).token;
  286. this.getgroupsname();
  287. this.getExternalusers();
  288. }
  289. }
  290. </script>
  291. <style>
  292. .visa-box {
  293. background-color: #fff;
  294. padding: 10px;
  295. box-shadow: 0 0 5px #0005;
  296. border-radius: 10px;
  297. }
  298. .search-li:nth-child(1) {
  299. width: 20%;
  300. }
  301. .search-li:nth-child(1) .el-select {
  302. width: 100%;
  303. margin: 0;
  304. }
  305. .search-li:nth-child(2) {
  306. width: 80%;
  307. justify-content: end;
  308. }
  309. .search-ul {
  310. display: flex;
  311. justify-content: space-between;
  312. margin-bottom: 10px;
  313. }
  314. .search-li label {
  315. color: #606266;
  316. }
  317. .search-li {
  318. display: flex;
  319. }
  320. .search-li>div {
  321. margin-right: 10px;
  322. }
  323. .form-box .el-table th.el-table__cell>.cell {
  324. text-align: center;
  325. }
  326. .form-box .el-table td.el-table__cell div {
  327. text-align: center;
  328. }
  329. .form-box .block {
  330. margin-top: 10px;
  331. }
  332. .visa-box .el-row {
  333. text-align: right;
  334. margin-bottom: 5px;
  335. }
  336. .visas-list {
  337. background-color: #fff;
  338. padding: 10px;
  339. box-shadow: 0 0 5px #0005;
  340. border-radius: 10px;
  341. }
  342. .visas-title {
  343. display: flex;
  344. font-size: 17px;
  345. font-weight: 600;
  346. color: #555;
  347. margin-top: 8px;
  348. margin-bottom: 2px;
  349. justify-content: space-between;
  350. align-items: center;
  351. }
  352. .visas-box {
  353. display: flex;
  354. }
  355. .visas-box>button {
  356. margin-left: 10px;
  357. padding: 8px 20px;
  358. }
  359. .country-box {
  360. display: flex;
  361. justify-content: space-between;
  362. align-items: center;
  363. }
  364. .interpret-box {
  365. display: flex;
  366. justify-content: space-between;
  367. align-items: center;
  368. }
  369. </style>