移动端
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

3 роки тому
2 роки тому
3 роки тому
2 роки тому
2 роки тому
2 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
2 роки тому
3 роки тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <template>
  2. <div class="app-container">
  3. <div class="header_main">
  4. 有偿使用
  5. <div class="return_btn" @click="onClickLeft"></div>
  6. <div class="add_btn" @click="goAdd"></div>
  7. </div>
  8. <van-list
  9. v-model="loading"
  10. :finished="finished"
  11. finished-text="没有更多了"
  12. @load="getList"
  13. >
  14. <van-swipe-cell v-for="(item,index) in applicationList" :key="index">
  15. <van-cell :title="item.shyqrdbxm" center :to="{name:'paidUtilizeDteail', query: {id:item.id}}" >
  16. <template #icon>
  17. <van-icon name="../../../static/images/onlineHome/icon_zjd9.png" size="30" color="#539FFD" style="margin-right: 10px;" />
  18. </template>
  19. <span>{{item.ycsyfy}}元</span>
  20. <br/>
  21. <span v-if="item.syStatus == '1'" style="color:black;font-weight: 500;">正常</span>
  22. <span v-if="item.syStatus == '3'" style="color: red;">终止</span>
  23. <template #label>
  24. <p><b style="color: #539FFD;">{{item.sqrzjhm}}</b><i style="margin-right: 0.5rem;"></i></p>
  25. </template>
  26. </van-cell>
  27. <template #right>
  28. <van-row>
  29. <van-col>
  30. <van-button square text="生成收费计划" v-if="item.syStatus == '1' && item.isDetail == '0'" @click="generateFeePlanClick(item)" type="info" class="add_btn" />
  31. </van-col>
  32. <van-col>
  33. <van-button square text="收费计划" v-if="item.syStatus == '1' && item.isDetail == '1'" @click="handleSfjh(item)" type="info" class="delete-button" />
  34. </van-col>
  35. <van-col>
  36. <van-button square text="终止" v-if="item.syStatus == '1'" @click="handleTermination(item)" type="danger" class="delete-button" />
  37. </van-col>
  38. <van-col>
  39. <van-button square text="修改" :to="{name:'paidUtilizeModify', query: {id:item.id}}" type="info" class="delete-button" />
  40. </van-col>
  41. <van-col>
  42. <van-button square text="删除" @click="deleteList(item.id,index)" type="danger" class="delete-button" />
  43. </van-col>
  44. </van-row>
  45. </template>
  46. </van-swipe-cell>
  47. </van-list>
  48. <van-dialog v-model="showSfjh" title="收费计划" show-cancel-button :show-confirm-button="false" cancelButtonText="关闭" @cancel="showSfjh = false" >
  49. <div style="background:#fff;padding:10px 2.5%;display: flex;justify-content: space-between;">
  50. <van-button type="primary" style="width:150px;height: 30px;font-size: 12px;" round @click="cxscsfjhClick">重新生成收费计划</van-button>
  51. </div>
  52. <paidUtilizeFeeplanList :ycsyId="ycsyId" style="height: 600px;overflow: auto;" ref="sfjh"/>
  53. </van-dialog>
  54. </div>
  55. </template>
  56. <script>
  57. import { getList , getYcsy,ycsyEdit,removeList,generateFeePlan } from "@/api/onlineHome/homestead/paidUtilize";
  58. import paidUtilizeFeeplanList from "@/views/yinnong/homestead/paidUtilizeFeeplan/paidUtilizeFeeplanList";
  59. import {getGeoServerConfigKey} from "@/api/system/config";
  60. export default {
  61. name: "paidUtilizeList",
  62. components: {paidUtilizeFeeplanList},
  63. data() {
  64. return {
  65. applicationList:[],
  66. houseApplyStatus:[],
  67. tcqllxStatus:[],
  68. tclxStatus:[],
  69. tcfsStatus:[],
  70. auditStatus:[],
  71. loading: false,
  72. finished: false,
  73. showSfjh:false,
  74. ycsyId:null,
  75. queryParams:{
  76. pageNum:1,
  77. pageSize:10,
  78. orderByColumn:'id',
  79. isAsc:'desc'
  80. },
  81. //地图服务地址
  82. mapGeoServerUrl:"",
  83. };
  84. },
  85. created() {
  86. this.houseGetDicts("tcqllx").then((res) => {
  87. this.tcqllxStatus = res.data;
  88. });
  89. this.houseGetDicts("tclx").then((res) => {
  90. this.tclxStatus = res.data;
  91. });
  92. this.houseGetDicts("tcfs").then((res) => {
  93. this.tcfsStatus = res.data;
  94. });
  95. this.houseGetDicts("audit_status").then((res) => {
  96. this.auditStatus = res.data;
  97. });
  98. },
  99. methods: {
  100. goAdd(){
  101. window.location = 'paidUtilizeAdd';
  102. },
  103. cxscsfjhClick(){
  104. let _this = this;
  105. this.$dialog.confirm({
  106. message: '是否重新生成收费计划?',
  107. })
  108. .then(() => {
  109. // on confirm
  110. getYcsy(_this.ycsyId).then(response => {
  111. generateFeePlan(response.data).then((response) => {
  112. if(response.code != 200) throw response.msg;
  113. this.$toast.success("收费计划已生成");
  114. _this.$refs.sfjh.getList();
  115. });
  116. });
  117. })
  118. .catch(() => {
  119. // on cancel
  120. });
  121. },
  122. getList(){
  123. setTimeout(() => {
  124. getList(this.queryParams).then(response => {
  125. console.log(response)
  126. // for (var i = 0; i < response.rows.length; i++) {
  127. // response.rows[i].tclx = this.selectDictLabel(this.tcqllxStatus, response.rows[i].tclx)
  128. // response.rows[i].tclx = this.selectDictLabel(this.tclxStatus, response.rows[i].tclx)
  129. // response.rows[i].tcfs = this.selectDictLabel(this.tcfsStatus, response.rows[i].tcfs)
  130. // response.rows[i].auditStatus = this.selectDictLabel(this.auditStatus, response.rows[i].auditStatus)
  131. // this.applicationList.push(response.rows[i]);
  132. // }
  133. this.applicationList = response.rows;
  134. if(this.applicationList.length >= response.total){
  135. this.finished = true;
  136. return;
  137. }else{
  138. this.loading = false;
  139. this.finished = false;
  140. this.queryParams.pageNum += 1 ;
  141. }
  142. });
  143. }, 1000);
  144. },
  145. /** 生成收费计划 */
  146. generateFeePlanClick(row){
  147. generateFeePlan(row).then((response) => {
  148. this.$toast.success("收费计划已生成");
  149. this.getList();
  150. });
  151. },
  152. /** 收费计划信息 */
  153. handleSfjh(row){
  154. this.title = "收费计划";
  155. const id = row.id;
  156. this.ycsyId = id;
  157. this.showSfjh = true;
  158. },
  159. /** 终止 */
  160. handleTermination(row){
  161. let _this = this;
  162. let data = row;
  163. this.$dialog.confirm({
  164. message: '是否确认终止此条有偿使用数据?',
  165. }).then(function() {
  166. _this.loading = true;
  167. if(row.syStatus === "1"){
  168. _this.$set(data, "syStatus", "3");
  169. }else{
  170. _this.$set(data, "syStatus", "1");
  171. }
  172. ycsyEdit(data).then(response => {
  173. _this.$toast.success("操作成功");
  174. _this.loading = false;
  175. _this.getList();
  176. });
  177. });
  178. },
  179. deleteList(id,index){
  180. this.$dialog.confirm({
  181. message: '您确认删除申请草稿?',
  182. })
  183. .then(() => {
  184. // on confirm
  185. this.applicationList.splice(index,1)
  186. removeList(id).then(res => {
  187. if(res.code = 200){
  188. this.$toast.success('删除成功');
  189. }
  190. });
  191. })
  192. .catch(() => {
  193. // on cancel
  194. });
  195. },
  196. },
  197. }
  198. </script>
  199. <style scoped lang="scss">
  200. .app-container {
  201. .header_main{
  202. height: 116px;
  203. background: url('../../../../assets/images/sunVillage_info/list_head.png') no-repeat;
  204. background-size: 100% 100%;
  205. position: fixed;
  206. top: 0;
  207. left: 0;
  208. width: 100%;
  209. font-size: 36px;
  210. line-height: 116px;
  211. text-align: center;
  212. color: #fff;
  213. position: relative;
  214. .return_btn{
  215. width: 24px;
  216. height: 43.2px;
  217. background: url('../../../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  218. background-size: 20px 36px;
  219. position: absolute;
  220. left: 38px;
  221. top: 36px;
  222. }
  223. .add_btn{
  224. width: 56.4px;
  225. height: 40.8px;
  226. background: url('../../../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  227. background-size: 47px 34px;
  228. position: absolute;
  229. right: 38px;
  230. top: 36px;
  231. }
  232. }
  233. }
  234. /deep/.van-cell__title{
  235. flex: 0.7;
  236. }
  237. /deep/.van-cell__title span{
  238. font-family: Arial;
  239. font-size: 0.4rem;
  240. font-weight: normal;
  241. }
  242. /deep/.van-cell__value{
  243. flex: 0.3;
  244. color: #1D6FE9;
  245. font-weight: bold;
  246. }
  247. /deep/.van-swipe-cell{
  248. margin-bottom: 0.2rem;
  249. border-radius: 0.2rem;
  250. overflow: hidden;
  251. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  252. }
  253. /deep/van-ellipsis{
  254. font-weight: bold;
  255. }
  256. .delete-button {
  257. height: 100%;
  258. }
  259. .van-row{
  260. height: 100%;
  261. }
  262. .van-col{
  263. height: 100%;
  264. }
  265. </style>