CarTouristGuideGroundId.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  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="deleSelect"
  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%;text-align: right;">
  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:16px;">团队名称:</span>
  26. <span style="color:#606266;">{{ delegationInfo.teamName }}&nbsp;&nbsp;&nbsp;</span>
  27. <span style="font-weight: bold;font-size:16px;">客户:</span>
  28. <span style="color:#606266;">{{ delegationInfo.clientName }}&nbsp;&nbsp;&nbsp; {{
  29. }}&nbsp;&nbsp;&nbsp;</span>
  30. <span style="font-weight: bold;font-size:16px;">出访国家:</span>
  31. <span style="color:#606266;">{{ delegationInfo.visitCountry }}&nbsp;&nbsp;&nbsp;</span>
  32. <span style="font-weight: bold;font-size:16px;">起止日期:</span>
  33. <span style="color:#606266;">{{ delegationInfo.visitStartDate }}—{{ delegationInfo.visitEndDate
  34. }}&nbsp;&nbsp;&nbsp;</span>
  35. <span style="font-weight: bold;font-size:16px;">天数/人数:</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 style="margin-left: 0px;" 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. that.delegationInfoList = res.data.data.groupName;
  162. if (that.DiId == undefined) {
  163. that.delegationInfo = that.delegationInfoList[0]
  164. that.DiId = that.delegationInfoList[0].id;
  165. } else {
  166. for (let index = 0; index < that.delegationInfoList.length; index++) {
  167. if (that.delegationInfoList[index].id == that.DiId) {
  168. that.delegationInfo = that.delegationInfoList[index];
  169. that.DiId = that.delegationInfoList[index].id;
  170. }
  171. }
  172. }
  173. that.QueryCarTouristGuideGroundByDiId()
  174. }
  175. }).catch(function (error) {
  176. that.$message.error("网络错误,请稍后重试");
  177. });
  178. },
  179. deleSelectChange() {
  180. if (this.DiId != "") {
  181. this.QueryCarTouristGuideGroundByDiId();
  182. } else {
  183. this.tableDatas = [];
  184. this.tableData = [];
  185. }
  186. },
  187. //团组信息绑定
  188. QueryCarTouristGuideGroundByDiId() {
  189. var url = "/api/Groups/QueryCarTouristGuideGroundByDiId"
  190. var that = this
  191. this.$axios({
  192. method: 'post',
  193. url: url,
  194. headers: {
  195. Authorization: 'Bearer ' + this.token
  196. },
  197. data: {
  198. pageIndex: 0,
  199. pageSize: 0,
  200. portType: 1,
  201. diID: that.DiId,
  202. }
  203. }).then(function (res) {
  204. if (res.data.code == 200) {
  205. that.tableDatas = res.data.data;
  206. that.tableData = that.tableDatas
  207. if (that.tableDatas.length != 0) {
  208. if (that.tableDatas.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize).length == 0) {
  209. if (that.currentPage > 1) {
  210. that.currentPage = that.currentPage - 1;
  211. }
  212. }
  213. }
  214. }
  215. }).catch(function (error) {
  216. that.$message.error("网络错误,请稍后重试");
  217. });
  218. },
  219. //填写详细费用
  220. AddDetails(id) {
  221. this.$router.push({
  222. path: "/home/CarTouristGuideGrounContent",
  223. query: {
  224. id: id,
  225. diId: this.DiId,
  226. }
  227. })
  228. },
  229. upDate(index, row) {
  230. this.$router.push({
  231. path: "/home/OpCarTouristGuideGroundId",
  232. query: {
  233. DiId: this.DiId,
  234. id: row.id
  235. }
  236. })
  237. },
  238. addIf() {
  239. if (this.DiId != 0 && this.DiId != '' && this.DiId != undefined) {
  240. this.$router.push({
  241. path: "/home/OpCarTouristGuideGroundId",
  242. query: {
  243. DiId: this.DiId,
  244. }
  245. })
  246. } else {
  247. this.$message('请选择团组在进行添加');
  248. }
  249. },
  250. del(index, row) {
  251. this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
  252. confirmButtonText: '确定',
  253. cancelButtonText: '取消',
  254. type: 'warning'
  255. }).then(() => {
  256. var url = "/api/Groups/DelCarTouristGuideGround"
  257. var that = this
  258. this.$axios({
  259. method: 'post',
  260. url: url,
  261. headers: {
  262. Authorization: 'Bearer ' + this.token
  263. },
  264. data: {
  265. Id: row.id,
  266. DeleteUserId: this.userId
  267. }
  268. }).then(function (res) {
  269. console.log(res)
  270. if (res.data.code == 200) {
  271. that.$message({
  272. message: '删除成功',
  273. type: 'success'
  274. });
  275. that.tableDatas.splice(index,1);
  276. } else {
  277. that.$message.error('删除失败!');
  278. }
  279. that.loading = false
  280. }).catch(function (error) {
  281. that.loading = false
  282. that.$message.error("网络错误,请稍后重试");
  283. });
  284. }).catch(() => {
  285. this.$message({
  286. type: 'info',
  287. message: '操作已取消!'
  288. });
  289. });
  290. },
  291. },
  292. mounted() {
  293. this.DiId = this.$route.query.diId
  294. this.token = JSON.parse(localStorage.getItem('userinif')).token;
  295. this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
  296. this.deleSelect();
  297. //this.AirTicketResList()
  298. }
  299. }
  300. </script>
  301. <style>
  302. .communal-list {
  303. background-color: #fff;
  304. padding: 10px;
  305. box-shadow: 0 0 5px #0005;
  306. border-radius: 10px;
  307. min-height: 830px;
  308. }
  309. .communal-title {
  310. display: flex;
  311. font-size: 17px;
  312. font-weight: 600;
  313. color: #555;
  314. margin-top: 8px;
  315. margin-bottom: 10px;
  316. justify-content: space-between;
  317. align-items: center;
  318. }
  319. .communal-box {
  320. display: flex;
  321. }
  322. .communal-box>button {
  323. margin-left: 10px;
  324. padding: 8px 20px;
  325. }
  326. </style>