CarTouristGuideGroundId.vue 19 KB

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