移动端
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

239 linhas
7.0 KiB

  1. <template>
  2. <div class="app-container">
  3. <!-- <van-nav-bar-->
  4. <!-- left-arrow-->
  5. <!-- fixed-->
  6. <!-- placeholder-->
  7. <!-- @click-left="$router.back(-1)"-->
  8. <!-- @click-right="goAdd"-->
  9. <!-- >-->
  10. <!-- <template #title>-->
  11. <!-- <p style="font-weight: bold;">有偿退出</p>-->
  12. <!-- </template>-->
  13. <!-- <template #right>-->
  14. <!-- <van-icon name="add" size="18" />-->
  15. <!-- </template>-->
  16. <!-- </van-nav-bar>-->
  17. <div class="header_main">
  18. 有偿退出
  19. <div class="return_btn" @click="onClickLeft"></div>
  20. <div class="add_btn" @click="goAdd"></div>
  21. </div>
  22. <van-list
  23. v-model="loading"
  24. :finished="finished"
  25. finished-text="没有更多了"
  26. @load="getList"
  27. >
  28. <van-swipe-cell v-for="(item,index) in applicationList" :key="index">
  29. <van-cell :title="item.zjddm" :value="selectDictLabel(auditStatus, item.auditStatus)" center :to="{name:'sunVillageInfoPaidExitDetail', query: {id:item.id}}" >
  30. <template #icon>
  31. <van-icon name="../../../static/images/onlineHome/icon_zjd3.png" size="30" color="#539FFD" style="margin-right: 10px;" />
  32. </template>
  33. <template #label>
  34. <p><b style="color: #539FFD;">{{item.tcfs}}</b><i style="margin-right: 0.5rem;"></i><b style="color: #333333;">{{item.sqrxm}}</b><i style="margin-right: 0.5rem;"></i>{{item.tcmj}}㎡</p>
  35. </template>
  36. </van-cell>
  37. <template #right>
  38. <van-row>
  39. <van-col>
  40. <van-button square text="修改" v-if="item.auditStatus=='0'" :to="{name:'sunVillageInfoPaidExitModify', query: {id:item.id}}" type="info" class="delete-button" />
  41. </van-col>
  42. <van-col>
  43. <van-button square text="提交" type="primary" v-if="item.auditStatus=='0'" class="delete-button" @click="goSubmit(item)" />
  44. </van-col>
  45. <van-col>
  46. <van-button square text="删除" v-if="item.auditStatus=='0'" @click="deleteList(item.id,index)" type="danger" class="delete-button" />
  47. </van-col>
  48. </van-row>
  49. </template>
  50. </van-swipe-cell>
  51. </van-list>
  52. </div>
  53. </template>
  54. <script>
  55. import { getList, removeList, zyyctcApply } from "@/api/sunVillage_info/homestead/paidExit";
  56. import Cookies from "js-cookie";
  57. export default {
  58. name: "paidExit",
  59. data() {
  60. return {
  61. applicationList:[],
  62. houseApplyStatus:[],
  63. tcqllxStatus:[],
  64. tclxStatus:[],
  65. tcfsStatus:[],
  66. auditStatus:[],
  67. loading: false,
  68. finished: false,
  69. idcard:null,
  70. queryParams:{
  71. pageNum:1,
  72. pageSize:10,
  73. deptId: Cookies.get('deptId'),
  74. orderByColumn:'createTime',
  75. isAsc:'desc',
  76. // 申请类型 1-宅基地退出
  77. sqlx: '1',
  78. // 退出类型 01-有偿退出 02-无偿退出
  79. tclx: '01',
  80. }
  81. };
  82. },
  83. created() {
  84. this.houseGetDicts("tcqllx").then((res) => {
  85. this.tcqllxStatus = res.data;
  86. });
  87. this.houseGetDicts("tclx").then((res) => {
  88. this.tclxStatus = res.data;
  89. });
  90. this.houseGetDicts("tcfs").then((res) => {
  91. this.tcfsStatus = res.data;
  92. });
  93. this.idcard = Cookies.get('idcard');
  94. this.$set(this.queryParams, "sqrzjhm", this.idcard);
  95. this.houseGetDicts("yctcsp_status").then((res) => {
  96. // this.auditStatus = res.data;
  97. let _this = this;
  98. res.data.forEach((item) => {
  99. if (item.dictValue < 5) {
  100. _this.auditStatus.push(item);
  101. } else if (item.dictValue == 5) {
  102. item.dictLabel = "审核通过";
  103. _this.auditStatus.push(item);
  104. }
  105. });
  106. });
  107. },
  108. methods: {
  109. goAdd(){
  110. window.location = '/sunVillage_info/paidExitAdd';
  111. },
  112. getList(){
  113. setTimeout(() => {
  114. getList(this.queryParams).then(response => {
  115. for (var i = 0; i < response.rows.length; i++) {
  116. response.rows[i].tclx = this.selectDictLabel(this.tcqllxStatus, response.rows[i].tclx)
  117. response.rows[i].tclx = this.selectDictLabel(this.tclxStatus, response.rows[i].tclx)
  118. response.rows[i].tcfs = this.selectDictLabel(this.tcfsStatus, response.rows[i].tcfs)
  119. response.rows[i].auditStatus = this.selectDictLabel(this.auditStatus, response.rows[i].auditStatus)
  120. this.applicationList.push(response.rows[i]);
  121. }
  122. if(this.applicationList.length >= response.total){
  123. this.finished = true;
  124. return;
  125. }else{
  126. this.loading = false;
  127. this.queryParams.pageNum += 1 ;
  128. }
  129. });
  130. }, 1000);
  131. },
  132. deleteList(id,index){
  133. this.$dialog.confirm({
  134. message: '您确认删除此申请草稿?',
  135. })
  136. .then(() => {
  137. // on confirm
  138. this.applicationList.splice(index,1)
  139. removeList(id).then(res => {
  140. if(res.code = 200){
  141. this.$toast.success('删除成功');
  142. }
  143. });
  144. })
  145. .catch(() => {
  146. // on cancel
  147. });
  148. },
  149. goSubmit(item) {
  150. zyyctcApply(item.id).then(response => {
  151. if (response.code = 200) {
  152. this.$toast.success('提交成功');
  153. setTimeout(function () {
  154. window.location.replace("/sunVillage_info/paidExit/paidExitList")
  155. }, 1000)
  156. }
  157. })
  158. },
  159. },
  160. }
  161. </script>
  162. <style scoped lang="scss">
  163. .app-container {
  164. .header_main{
  165. height: 116px;
  166. background: url('../../../assets/images/sunVillage_info/list_head_green.png') no-repeat;
  167. background-size: 100% 100%;
  168. position: fixed;
  169. top: 0;
  170. left: 0;
  171. width: 100%;
  172. font-size: 36px;
  173. line-height: 116px;
  174. text-align: center;
  175. color: #fff;
  176. position: relative;
  177. .return_btn{
  178. width: 24px;
  179. height: 43.2px;
  180. background: url('../../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  181. background-size: 20px 36px;
  182. position: absolute;
  183. left: 38px;
  184. top: 36px;
  185. }
  186. .add_btn{
  187. width: 56.4px;
  188. height: 40.8px;
  189. background: url('../../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  190. background-size: 47px 34px;
  191. position: absolute;
  192. right: 38px;
  193. top: 36px;
  194. }
  195. }
  196. }
  197. /deep/.van-list{
  198. padding: 0.2rem 3%;
  199. }
  200. /deep/.van-cell__title{
  201. flex: 0.7;
  202. }
  203. /deep/.van-cell__title span{
  204. font-family: Arial;
  205. font-size: 0.4rem;
  206. font-weight: normal;
  207. }
  208. /deep/.van-cell__value{
  209. flex: 0.3;
  210. color: #1D6FE9;
  211. font-weight: bold;
  212. text-align: center;
  213. position: relative;
  214. left: 20px;
  215. }
  216. /deep/.van-swipe-cell{
  217. margin-bottom: 0.2rem;
  218. border-radius: 0.2rem;
  219. overflow: hidden;
  220. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  221. }
  222. /deep/van-ellipsis{
  223. font-weight: bold;
  224. }
  225. .delete-button {
  226. height: 100%;
  227. }
  228. .van-row{
  229. height: 100%;
  230. }
  231. .van-col{
  232. height: 100%;
  233. }
  234. </style>