CarTouristGuideGroundId.vue 14 KB

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