CarTouristGuideGroundId.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  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: 50%;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: 50%;display: flex;align-items: flex-start;justify-content: end;">
  20. <el-button size="small" type="primary" style="" @click="exportPriceDetail">导出费用明细</el-button>
  21. <el-button style="margin-right: 10px;" size="small" type="primary" @click="addIf">新增</el-button>
  22. <!-- <el-upload
  23. class="upload-demo"
  24. action="http://132.232.92.186:8888/api/Groups/CommonSaveFile"
  25. :on-preview="handlePreview"
  26. :on-remove="handleRemove"
  27. :before-remove="beforeRemove"
  28. multiple
  29. :limit="3"
  30. :data="datas"
  31. :on-exceed="handleExceed"
  32. :file-list="fileList"
  33. name="files">
  34. <el-button size="small" type="primary">点击上传</el-button>
  35. <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
  36. </el-upload> -->
  37. </div>
  38. </div>
  39. </div>
  40. <div :style="delegationInfo.teamLevSId=='VIP'||delegationInfo.teamLevSId=='VVIP'?'margin:10px 0;color:red;':'margin:10px 0;color:#606266;'">
  41. <span style="font-weight: bold;font-size:14px;">团队名称:</span>
  42. <span style="font-size:14px;">{{ delegationInfo.teamName }}&nbsp;&nbsp;&nbsp;</span>
  43. <span style="font-weight: bold;font-size:14px;">客户级别:</span>
  44. <span style="font-size:14px;">{{ delegationInfo.teamLevSId }}&nbsp;&nbsp;&nbsp;</span>
  45. <span style="font-weight: bold;font-size:14px;">客户:</span>
  46. <span style="font-size:14px;">{{ delegationInfo.clientName }}&nbsp;&nbsp;&nbsp; {{
  47. }}&nbsp;&nbsp;&nbsp;</span>
  48. <span style="font-weight: bold;font-size:14px;">出访国家:</span>
  49. <span style="font-size:14px;">{{ delegationInfo.visitCountry }}&nbsp;&nbsp;&nbsp;</span>
  50. <span style="font-weight: bold;font-size:14px;">起止日期:</span>
  51. <span style="font-size:14px;">{{ delegationInfo.visitStartDate }}—{{ delegationInfo.visitEndDate
  52. }}&nbsp;&nbsp;&nbsp;</span>
  53. <span style="font-weight: bold;font-size:14px;">天数/人数:</span>
  54. <span style="font-size:14px;">{{ delegationInfo.visitDays }}天/{{ delegationInfo.visitPNumber }}人</span>
  55. </div>
  56. <template>
  57. <el-table :data="tableDatas.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border
  58. style="width: 100%" v-loading="loading" element-loading-text="拼命加载中...">
  59. <el-table-column prop="num" label="序 号" width="55">
  60. <template slot-scope="scope">
  61. {{ (currentPage - 1) * pageSize + scope.$index + 1 }}
  62. </template>
  63. </el-table-column>
  64. <el-table-column prop="area" label="地区">
  65. </el-table-column>
  66. <el-table-column prop="priceName" label="费用名称">
  67. </el-table-column>
  68. <el-table-column prop="priceTypeStr" label="款项类型">
  69. </el-table-column>
  70. <el-table-column prop="serviceGuide" label="服务导游">
  71. </el-table-column>
  72. <el-table-column prop="serviceTel" label="导游联系电话">
  73. </el-table-column>
  74. <el-table-column prop="busName" label="Bus名称">
  75. </el-table-column>
  76. <el-table-column prop="busTel" label="Bus联系电话">
  77. </el-table-column>
  78. <el-table-column prop="serviceStartTime" label="服务时间起止">
  79. <template slot-scope="scope">
  80. {{ scope.row.serviceStartTime }}至{{ scope.row.serviceEndTime }}
  81. </template>
  82. </el-table-column>
  83. <el-table-column prop="serviceQuotedPrice" label="服务报价">
  84. <template slot-scope="scope">
  85. {{ scope.row.serviceQuotedPrice }} {{ scope.row.currencyStr }}
  86. </template>
  87. </el-table-column>
  88. <el-table-column prop="payPercentage" label="付款百分比">
  89. <template slot-scope="scope">
  90. {{ scope.row.payPercentage }}%
  91. </template>
  92. </el-table-column>
  93. <el-table-column prop="payThenMoney" label="此次付款金额">
  94. <template slot-scope="scope">
  95. {{ scope.row.payThenMoney }} {{ scope.row.currencyStr }}
  96. </template>
  97. </el-table-column>
  98. <el-table-column prop="remainingBalance" label="尾款金额">
  99. <template slot-scope="scope">
  100. {{ scope.row.remainingBalance }} {{ scope.row.currencyStr }}
  101. </template>
  102. </el-table-column>
  103. <el-table-column prop="isAuditGM" label="是否审核" width="80">
  104. <template slot-scope="isAuditGM">
  105. <span v-if="isAuditGM.row.isAuditGM == 1">已通过</span>
  106. <span v-else-if="isAuditGM.row.isAuditGM == 0">未审核</span>
  107. <span v-else-if="isAuditGM.row.isAuditGM == 2">未通过</span>
  108. <span v-else>自动审核通过</span>
  109. </template>
  110. </el-table-column>
  111. <el-table-column prop="isPay" label="是否支付" width="80">
  112. <template slot-scope="isPay">
  113. <span v-if="isPay.row.isPay == 1">已支付</span>
  114. <span v-else-if="isPay.row.isPay == 0">未支付</span>
  115. </template>
  116. </el-table-column>
  117. <el-table-column prop="id" label="详细费用" width="110">
  118. <template slot-scope="scope">
  119. <el-button @click="AddDetails(scope.row.id)" size="small">点击填写</el-button>
  120. </template>
  121. </el-table-column>
  122. <el-table-column label="操作" width="120">
  123. <template slot-scope="scope">
  124. <!-- <el-button-group> -->
  125. <el-button type="primary" size="mini" icon="el-icon-edit"
  126. @click="upDate(scope.$index, scope.row)"></el-button>
  127. <el-button style="margin-left: 0px;" type="danger" size="mini" icon="el-icon-delete"
  128. @click="del(scope.$index, scope.row)"></el-button>
  129. <!-- </el-button-group> -->
  130. </template>
  131. </el-table-column>
  132. </el-table>
  133. </template>
  134. <div class="block">
  135. <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
  136. :current-page="currentPage" :page-sizes="[10, 12, 15, 20]" :page-size="pageSize"
  137. layout="total, sizes, prev, pager, next" :total="tableDatas.length">
  138. </el-pagination>
  139. </div>
  140. </div>
  141. </div>
  142. </template>
  143. <script>
  144. import { el } from '@fullcalendar/core/internal-common';
  145. export default {
  146. data() {
  147. return {
  148. loading: false,
  149. tableDatas: [],
  150. tableData: [],
  151. currentPage: 1, // 当前页码
  152. pageSize: 12,// 每页的数据条数
  153. input: '',
  154. token: '',
  155. userId: 0,
  156. DiId: '',
  157. VisaSelectList: [],
  158. VisaClient: '',
  159. delegationInfoList: [],
  160. delegationInfo: {},
  161. datas:{},
  162. fileList: [
  163. // {name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'},
  164. // {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}
  165. ]
  166. }
  167. },
  168. methods: {
  169. //每页条数改变时触发 选择一页显示多少行
  170. handleSizeChange(val) {
  171. this.currentPage = 1;
  172. this.pageSize = val;
  173. },
  174. //当前页改变时触发 跳转其他页
  175. handleCurrentChange(val) {
  176. this.currentPage = val;
  177. },
  178. //团组下拉框
  179. deleSelect() {
  180. var url = "/api/Groups/DecreasePaymentsSelect"
  181. var that = this
  182. this.$axios({
  183. method: 'post',
  184. url: url,
  185. headers: {
  186. Authorization: 'Bearer ' + this.token
  187. },
  188. data: {
  189. UserId: that.userId,
  190. CTId: 79
  191. }
  192. }).then(function (res) {
  193. if (res.data.code == 200) {
  194. that.delegationInfoList = res.data.data.groupName;
  195. if (that.DiId == undefined) {
  196. that.delegationInfo = that.delegationInfoList[0]
  197. that.DiId = that.delegationInfoList[0].id;
  198. } else {
  199. for (let index = 0; index < that.delegationInfoList.length; index++) {
  200. if (that.delegationInfoList[index].id == that.DiId) {
  201. that.delegationInfo = that.delegationInfoList[index];
  202. that.DiId = that.delegationInfoList[index].id;
  203. }
  204. }
  205. }
  206. that.QueryCarTouristGuideGroundByDiId();
  207. that.handledatas();
  208. }
  209. }).catch(function (error) {
  210. that.$message.error("网络错误,请稍后重试");
  211. });
  212. },
  213. deleSelectChange() {
  214. if (this.DiId != "") {
  215. this.QueryCarTouristGuideGroundByDiId();
  216. } else {
  217. this.tableDatas = [];
  218. this.tableData = [];
  219. }
  220. },
  221. //团组信息绑定
  222. QueryCarTouristGuideGroundByDiId() {
  223. var url = "/api/Groups/QueryCarTouristGuideGroundByDiId"
  224. var that = this
  225. this.$axios({
  226. method: 'post',
  227. url: url,
  228. headers: {
  229. Authorization: 'Bearer ' + this.token
  230. },
  231. data: {
  232. pageIndex: 0,
  233. pageSize: 0,
  234. portType: 1,
  235. diID: that.DiId,
  236. }
  237. }).then(function (res) {
  238. if (res.data.code == 200) {
  239. that.tableDatas = res.data.data;
  240. that.tableData = that.tableDatas
  241. if (that.tableDatas.length != 0) {
  242. if (that.tableDatas.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize).length == 0) {
  243. if (that.currentPage > 1) {
  244. that.currentPage = that.currentPage - 1;
  245. }
  246. }
  247. }
  248. }
  249. }).catch(function (error) {
  250. that.$message.error("网络错误,请稍后重试");
  251. });
  252. },
  253. //填写详细费用
  254. AddDetails(id) {
  255. this.$router.push({
  256. path: "/home/CarTouristGuideGrounContent",
  257. query: {
  258. id: id,
  259. diId: this.DiId,
  260. }
  261. })
  262. },
  263. upDate(index, row) {
  264. this.$router.push({
  265. path: "/home/OpCarTouristGuideGroundId",
  266. query: {
  267. DiId: this.DiId,
  268. id: row.id
  269. }
  270. })
  271. },
  272. addIf() {
  273. if (this.DiId != 0 && this.DiId != '' && this.DiId != undefined) {
  274. this.$router.push({
  275. path: "/home/OpCarTouristGuideGroundId",
  276. query: {
  277. DiId: this.DiId,
  278. }
  279. })
  280. } else {
  281. this.$message('请选择团组在进行添加');
  282. }
  283. },
  284. del(index, row) {
  285. this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
  286. confirmButtonText: '确定',
  287. cancelButtonText: '取消',
  288. type: 'warning'
  289. }).then(() => {
  290. var url = "/api/Groups/DelCarTouristGuideGround"
  291. var that = this
  292. this.$axios({
  293. method: 'post',
  294. url: url,
  295. headers: {
  296. Authorization: 'Bearer ' + this.token
  297. },
  298. data: {
  299. Id: row.id,
  300. DeleteUserId: this.userId
  301. }
  302. }).then(function (res) {
  303. console.log(res)
  304. if (res.data.code == 200) {
  305. that.$message({
  306. message: '删除成功',
  307. type: 'success'
  308. });
  309. that.tableDatas.splice(index, 1);
  310. } else {
  311. that.$message.error('删除失败!');
  312. }
  313. that.loading = false
  314. }).catch(function (error) {
  315. that.loading = false
  316. that.$message.error("网络错误,请稍后重试");
  317. });
  318. }).catch(() => {
  319. this.$message({
  320. type: 'info',
  321. message: '操作已取消!'
  322. });
  323. });
  324. },
  325. exportPriceDetail() {
  326. var url = "/api/Groups/ExportLocalGuidePriceDetail"
  327. var that = this
  328. this.$axios({
  329. method: 'post',
  330. url: url,
  331. headers: {
  332. Authorization: 'Bearer ' + this.token
  333. },
  334. data: {
  335. "diid": this.DiId,
  336. }
  337. }).then(function (res) {
  338. console.log(res)
  339. if (res.data.code == 200) {
  340. window.open(res.data.data.url);
  341. } else {
  342. that.$message.error('导出失败!' + res.data.msg);
  343. }
  344. }).catch(function (error) {
  345. that.$message.error("网络错误,请稍后重试");
  346. });
  347. },
  348. //票据上传
  349. handleRemove(file, fileList) {
  350. console.log(file, fileList);
  351. },
  352. handlePreview(file) {
  353. console.log(file);
  354. },
  355. handleExceed(files, fileList) {
  356. this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
  357. },
  358. beforeRemove(file, fileList) {
  359. return this.$confirm(`确定移除 ${ file.name }?`);
  360. },
  361. //处理datas
  362. handledatas(){
  363. this.datas={
  364. Ctable:79,
  365. Diid:this.DiId,
  366. Cid:0,
  367. Userid:this.userId
  368. }
  369. }
  370. },
  371. mounted() {
  372. this.DiId = this.$route.query.diId
  373. this.token = JSON.parse(localStorage.getItem('userinif')).token;
  374. this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
  375. this.deleSelect();
  376. //this.AirTicketResList()
  377. }
  378. }
  379. </script>
  380. <style>
  381. .communal-list {
  382. background-color: #fff;
  383. padding: 10px;
  384. box-shadow: 0 0 5px #0005;
  385. border-radius: 10px;
  386. min-height: 830px;
  387. }
  388. .communal-title {
  389. display: flex;
  390. font-size: 17px;
  391. font-weight: 600;
  392. color: #555;
  393. margin-top: 8px;
  394. margin-bottom: 10px;
  395. justify-content: space-between;
  396. align-items: center;
  397. }
  398. .communal-box {
  399. display: flex;
  400. }
  401. .communal-box>button {
  402. margin-left: 10px;
  403. padding: 8px 20px;
  404. }
  405. </style>