CarTouristGuideGroundId.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. <template>
  2. <div>
  3. <div class="communal-list">
  4. <div>
  5. <div class="communal-title">
  6. <div>车导地接费用录入</div>
  7. </div>
  8. <div style="display: flex;justify-content: space-between;">
  9. <div style="width: 80%;display: flex;">
  10. <div style="width: 25%;">
  11. <el-select v-model="DiId" placeholder="团组选择" clearable filterable @change="deleSelectChange"
  12. style="width: 100%;">
  13. <el-option v-for="item in delegationInfoList" :key="item.id" :label="item.teamName"
  14. :value="item.id">
  15. </el-option>
  16. </el-select>
  17. </div>
  18. </div>
  19. <div style="width: 20%">
  20. <el-button type="primary" style="" @click="addIf">新增</el-button>
  21. </div>
  22. </div>
  23. </div>
  24. <div style="margin:10px 0;color:#606266;">
  25. <span style="font-weight: bold;font-size:17px;">团队名称:</span>
  26. <span style="color:#606266;">{{ delegationInfo.teamName }}&nbsp;&nbsp;&nbsp;</span>
  27. <span style="font-weight: bold;font-size:17px;">客户:</span>
  28. <span style="color:#606266;">{{ delegationInfo.clientName }}&nbsp;&nbsp;&nbsp; {{
  29. }}&nbsp;&nbsp;&nbsp;</span>
  30. <span style="font-weight: bold;font-size:17px;">出访国家:</span>
  31. <span style="color:#606266;">{{ delegationInfo.visitCountry }}&nbsp;&nbsp;&nbsp;</span>
  32. <span style="font-weight: bold;font-size:17px;">起止日期:</span>
  33. <span style="color:#606266;">{{ delegationInfo.visitStartDate }}—{{ delegationInfo.visitEndDate
  34. }}&nbsp;&nbsp;&nbsp;</span>
  35. <span style="font-weight: bold;font-size:17px;">天数/人数:</span>
  36. <span style="color:#606266;">{{ delegationInfo.visitDays }}天/{{ delegationInfo.visitPNumber }}人</span>
  37. </div>
  38. <template>
  39. <el-table :data="tableDatas.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border
  40. style="width: 100%" v-loading="loading" element-loading-text="拼命加载中...">
  41. <el-table-column prop="num" label="序 号">
  42. <template slot-scope="scope">
  43. {{ (currentPage - 1) * pageSize + scope.$index + 1 }}
  44. </template>
  45. </el-table-column>
  46. <el-table-column prop="area" label="地区">
  47. </el-table-column>
  48. <el-table-column prop="serviceGuide" label="服务导游">
  49. </el-table-column>
  50. <el-table-column prop="serviceTel" label="导游联系电话">
  51. </el-table-column>
  52. <el-table-column prop="busName" label="Bus名称">
  53. </el-table-column>
  54. <el-table-column prop="busTel" label="Bus联系电话">
  55. </el-table-column>
  56. <el-table-column prop="serviceStartTime" label="服务时间起止">
  57. <template slot-scope="scope">
  58. {{ scope.row.serviceStartTime }}至{{ scope.row.serviceEndTime }}
  59. </template>
  60. </el-table-column>
  61. <el-table-column prop="serviceQuotedPrice" label="服务报价">
  62. <template slot-scope="scope">
  63. {{ scope.row.serviceQuotedPrice }} {{ scope.row.currencyStr }}
  64. </template>
  65. </el-table-column>
  66. <el-table-column prop="payPercentage" label="付款百分比">
  67. <template slot-scope="scope">
  68. {{ scope.row.payPercentage }}%
  69. </template>
  70. </el-table-column>
  71. <el-table-column prop="payThenMoney" label="此次付款金额">
  72. <template slot-scope="scope">
  73. {{ scope.row.payThenMoney }} {{ scope.row.currencyStr }}
  74. </template>
  75. </el-table-column>
  76. <el-table-column prop="remainingBalance" label="尾款金额">
  77. <template slot-scope="scope">
  78. {{ scope.row.remainingBalance }} {{ scope.row.currencyStr }}
  79. </template>
  80. </el-table-column>
  81. <el-table-column prop="isAuditGM" label="是否审核">
  82. <template slot-scope="isAuditGM">
  83. <span v-if="isAuditGM.row.isAuditGM == 1">已通过</span>
  84. <span v-else-if="isAuditGM.row.isAuditGM == 0">未审核</span>
  85. <span v-else-if="isAuditGM.row.isAuditGM == 2">未通过</span>
  86. <span v-else>自动审核通过</span>
  87. </template>
  88. </el-table-column>
  89. <el-table-column prop="id" label="详细费用">
  90. <template slot-scope="scope">
  91. <el-button @click="AddDetails(scope.row.id)" size="small">点击填写</el-button>
  92. </template>
  93. </el-table-column>
  94. <el-table-column label="操作">
  95. <template slot-scope="scope">
  96. <el-button-group>
  97. <el-button type="primary" size="mini" icon="el-icon-edit"
  98. @click="upDate(scope.$index, scope.row)"></el-button>
  99. <el-button type="danger" size="mini" icon="el-icon-delete"
  100. @click="del(scope.$index, scope.row)"></el-button>
  101. </el-button-group>
  102. </template>
  103. </el-table-column>
  104. </el-table>
  105. </template>
  106. <div class="block">
  107. <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
  108. :current-page="currentPage" :page-sizes="[10, 12, 15, 20]" :page-size="pageSize"
  109. layout="total, sizes, prev, pager, next" :total="tableDatas.length">
  110. </el-pagination>
  111. </div>
  112. </div>
  113. </div>
  114. </template>
  115. <script>
  116. import { el } from '@fullcalendar/core/internal-common';
  117. export default {
  118. data() {
  119. return {
  120. loading: false,
  121. tableDatas: [],
  122. tableData: [],
  123. currentPage: 1, // 当前页码
  124. pageSize: 12,// 每页的数据条数
  125. input: '',
  126. token: '',
  127. userId: 0,
  128. DiId: '',
  129. VisaSelectList: [],
  130. VisaClient: '',
  131. delegationInfoList: [],
  132. delegationInfo: {},
  133. }
  134. },
  135. methods: {
  136. //每页条数改变时触发 选择一页显示多少行
  137. handleSizeChange(val) {
  138. this.currentPage = 1;
  139. this.pageSize = val;
  140. },
  141. //当前页改变时触发 跳转其他页
  142. handleCurrentChange(val) {
  143. this.currentPage = val;
  144. },
  145. //团组下拉框
  146. deleSelect() {
  147. var url = "/api/Groups/DecreasePaymentsSelect"
  148. var that = this
  149. this.$axios({
  150. method: 'post',
  151. url: url,
  152. headers: {
  153. Authorization: 'Bearer ' + this.token
  154. },
  155. data: {
  156. UserId: that.userId,
  157. CTId: 79
  158. }
  159. }).then(function (res) {
  160. if (res.data.code == 200) {
  161. debugger
  162. debugger
  163. that.delegationInfoList = res.data.data.groupName;
  164. that.DiId = that.$route.query.diId
  165. if (that.DiId == undefined) {
  166. that.delegationInfo = that.delegationInfoList[0]
  167. that.DiId = that.delegationInfoList[0].id;
  168. } else {
  169. for (let index = 0; index < that.delegationInfoList.length; index++) {
  170. debugger
  171. if (that.delegationInfoList[index].id == that.DiId) {
  172. that.delegationInfo = that.delegationInfoList[index];
  173. that.DiId = that.delegationInfoList[index].id;
  174. break;
  175. }
  176. }
  177. }
  178. that.QueryCarTouristGuideGroundByDiId()
  179. }
  180. }).catch(function (error) {
  181. that.$message.error("网络错误,请稍后重试");
  182. });
  183. },
  184. deleSelectChange() {
  185. if (this.DiId != "") {
  186. this.QueryCarTouristGuideGroundByDiId();
  187. } else {
  188. this.tableDatas = [];
  189. this.tableData = [];
  190. }
  191. },
  192. //团组信息绑定
  193. QueryCarTouristGuideGroundByDiId() {
  194. var url = "/api/Groups/QueryCarTouristGuideGroundByDiId"
  195. var that = this
  196. this.$axios({
  197. method: 'post',
  198. url: url,
  199. headers: {
  200. Authorization: 'Bearer ' + this.token
  201. },
  202. data: {
  203. pageIndex: 0,
  204. pageSize: 0,
  205. portType: 1,
  206. diID: that.DiId,
  207. }
  208. }).then(function (res) {
  209. if (res.data.code == 200) {
  210. debugger
  211. that.tableDatas = res.data.data;
  212. that.tableData = that.tableDatas
  213. if (that.tableDatas.length != 0) {
  214. if (that.tableDatas.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize).length == 0) {
  215. if (that.currentPage > 1) {
  216. that.currentPage = that.currentPage - 1;
  217. }
  218. }
  219. }
  220. }
  221. }).catch(function (error) {
  222. that.$message.error("网络错误,请稍后重试");
  223. });
  224. },
  225. //填写详细费用
  226. AddDetails(id) {
  227. this.$router.push({
  228. path: "/home/CarTouristGuideGrounContent",
  229. query: {
  230. id: id,
  231. diId: this.DiId,
  232. }
  233. })
  234. },
  235. upDate(index, row) {
  236. this.$router.push({
  237. path: "/home/OpCarTouristGuideGroundId",
  238. query: {
  239. DiId: this.DiId,
  240. id: row.id
  241. }
  242. })
  243. },
  244. addIf() {
  245. debugger
  246. if (this.DiId != 0 && this.DiId != '' && this.DiId != undefined) {
  247. this.$router.push({
  248. path: "/home/OpCarTouristGuideGroundId",
  249. query: {
  250. DiId: this.DiId,
  251. }
  252. })
  253. } else {
  254. this.$message('请选择团组在进行添加');
  255. }
  256. },
  257. del(index, row) {
  258. this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
  259. confirmButtonText: '确定',
  260. cancelButtonText: '取消',
  261. type: 'warning'
  262. }).then(() => {
  263. var url = "/api/Groups/DelCarTouristGuideGround"
  264. var that = this
  265. this.$axios({
  266. method: 'post',
  267. url: url,
  268. headers: {
  269. Authorization: 'Bearer ' + this.token
  270. },
  271. data: {
  272. Id: row.id,
  273. DeleteUserId: this.userId
  274. }
  275. }).then(function (res) {
  276. console.log(res)
  277. if (res.data.code == 200) {
  278. that.$message({
  279. message: '删除成功',
  280. type: 'success'
  281. });
  282. that.PostVisaByDiId();
  283. } else {
  284. that.$message.error('删除失败!');
  285. }
  286. that.loading = false
  287. }).catch(function (error) {
  288. that.loading = false
  289. that.$message.error("网络错误,请稍后重试");
  290. });
  291. }).catch(() => {
  292. this.$message({
  293. type: 'info',
  294. message: '操作已取消!'
  295. });
  296. });
  297. },
  298. },
  299. mounted() {
  300. this.token = JSON.parse(localStorage.getItem('userinif')).token;
  301. this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
  302. this.deleSelect();
  303. //this.AirTicketResList()
  304. }
  305. }
  306. </script>
  307. <style>
  308. .communal-list {
  309. background-color: #fff;
  310. padding: 10px;
  311. box-shadow: 0 0 5px #0005;
  312. border-radius: 10px;
  313. }
  314. .communal-title {
  315. display: flex;
  316. font-size: 17px;
  317. font-weight: 600;
  318. color: #555;
  319. margin-top: 8px;
  320. margin-bottom: 10px;
  321. justify-content: space-between;
  322. align-items: center;
  323. }
  324. .communal-box {
  325. display: flex;
  326. }
  327. .communal-box>button {
  328. margin-left: 10px;
  329. padding: 8px 20px;
  330. }
  331. </style>