domesticTrainFee.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <!-- 国产矿火运7-->
  3. <div class="contract_price">
  4. <div class="sache">
  5. <el-input placeholder="请输入内容" v-model="inputText" clearable>
  6. </el-input>
  7. <el-button type="primary" class="btn" @click="onclick">
  8. <i class="el-icon-search"></i>查询
  9. </el-button>
  10. <el-button type="primary" class="btn" @click="toInsert">
  11. <i class="el-icon-plus"></i>新增
  12. </el-button>
  13. </div>
  14. <div class="table">
  15. <dilTable v-bind.sync="options">
  16. <el-table-column fixed="right" label="操作" width="100">
  17. <template slot-scope="scope">
  18. <el-button type="text" size="small" @click="update(scope)">
  19. 修改
  20. </el-button>
  21. <el-button type="text" size="mini" @click="deleteOne(scope)">
  22. 删除
  23. </el-button>
  24. <el-button @click="toPhotoClick(scope.row.resultId)" type="text" size="small">
  25. 票据图片
  26. </el-button>
  27. </template>
  28. </el-table-column>
  29. </dilTable>
  30. </div>
  31. <vxe-modal width="549px" height="731px" v-model="isShow" show-footer>
  32. <div class="demo-image__preview">
  33. <el-image
  34. style=" height:731px;text-align:center"
  35. :src="src"
  36. :preview-src-list="srcList">
  37. </el-image>
  38. </div>
  39. </vxe-modal>
  40. </div>
  41. </template>
  42. <script>
  43. export default {
  44. data() {
  45. return {
  46. inputText: "",
  47. isShow:false,
  48. options: {
  49. // first请求数据的地址
  50. requestUrl: "/api/v1/bms/selectPortFeeSecondList?apiId=503&feeType=7",
  51. },
  52. };
  53. },
  54. methods: {
  55. //查询
  56. onclick() {
  57. this.options.requestUrl =
  58. "/api/v1/bms/selectPortFeeSecondList?apiId=503&feeType=7&con=" + this.inputText;
  59. },
  60. //新增
  61. toInsert() {
  62. this.$router.push("/addDomesticTrainFee");
  63. },
  64. update(scope) {
  65. console.log(scope.row.resultId);
  66. this.$router.push("/editDomesticTrainFee/" + scope.row.resultId);
  67. },
  68. showCarrier(scope) {
  69. console.log(scope.row.resultId);
  70. this.$router.push("/showTwoSectionFee/" + scope.row.resultId);
  71. },
  72. deleteOne(scope) {
  73. this.$confirm("是否删除", "提示", {
  74. confirmButtonText: "确定",
  75. cancelButtonText: "取消",
  76. type: "warning",
  77. center: true,
  78. })
  79. .then(() => {
  80. let map={
  81. resultId:scope.row.resultId
  82. }
  83. this.axios
  84. .post("/api/v1/bms/deletePortHandlingFeeSecond/"+scope.row.resultId)
  85. .then((res) => {
  86. if (res.data.code == 200) {
  87. this.$message({
  88. type: "success",
  89. message: "删除成功!",
  90. });
  91. this.$router.go(0);
  92. } else {
  93. this.$message({
  94. message: "删除失败",
  95. type: "warning",
  96. });
  97. }
  98. });
  99. })
  100. .catch(() => {
  101. this.$message({
  102. type: "info",
  103. message: "删除操作已取消!",
  104. });
  105. });
  106. },
  107. toPhotoClick(resultId) {
  108. this.axios
  109. .post("/api/v1/bms/downloadBmsshipOrder?resultId=" + resultId)
  110. .then(res => {
  111. console.log("res",res.data.data);
  112. this.srcList = [];
  113. this.src = res.data.data;
  114. this.isShow = true;
  115. this.srcList.push(res.data.data);
  116. });
  117. },
  118. },
  119. };
  120. </script>
  121. <style lang="scss" scode>
  122. .contract_price{
  123. .sache {
  124. padding: 1.25rem 0.375rem;
  125. .el-input {
  126. width: 20%;
  127. margin-right: 1.25rem;
  128. }
  129. }
  130. }
  131. </style>