- 添加 AppSellApply 组件作为出栏申请的主入口 - 实现出栏申请列表页面,包括筛选、导出等功能 - 实现出栏申请详情和编辑页面,包括基础信息、标的信息、解押材料等 - 集成耳标选择器组件,用于选择投保标的
		
			
				
	
	
		
			104 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			104 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
| <script>
 | |
| import {mapState} from "vuex"
 | |
| 
 | |
| const columns = [
 | |
|   {label: "序号", type: "index"},
 | |
|   {label: "贷款合同号", prop: "contractNo"},
 | |
|   {label: "所属养殖户", prop: "applyName"},
 | |
|   {label: "所属养殖场", prop: "farmName"},
 | |
|   {label: "贷款金额(万元)", prop: "loanAmount"},
 | |
|   {label: "贷款状态", prop: "status", dict: "loanStatus"},
 | |
|   {label: "贷款时间", prop: "createTime", width: 160},
 | |
|   {label: "说明", prop: "remarks"},
 | |
| ]
 | |
| export default {
 | |
|   name: "sellList",
 | |
|   props: {
 | |
|     instance: Function,
 | |
|     dict: Object,
 | |
|     permissions: Function
 | |
|   },
 | |
|   data() {
 | |
|     return {
 | |
|       columns,
 | |
|       tableData: [],
 | |
|       page: {pageNum: 1, pageSize: 10, total: 0},
 | |
|       search: {},
 | |
|       dialog: false,
 | |
|       form: {}
 | |
|     }
 | |
|   },
 | |
|   computed: {
 | |
|     ...mapState(['user']),
 | |
|     userinfo: v => v.user.info || {},
 | |
|     pageTitle: v => v.$parent.menuName || v.$parent.$options.label
 | |
|   },
 | |
|   watch: {
 | |
|     search: {
 | |
|       deep: true,
 | |
|       handler() {
 | |
|         this.page.pageNum = 1
 | |
|         this.getTableData()
 | |
|       }
 | |
|     }
 | |
|   },
 | |
|   methods: {
 | |
|     getTableData() {
 | |
|       this.instance.post("/api/sell/apply/page", {...this.page, ...this.search}).then(res => {
 | |
|         if (res?.data) {
 | |
|           this.tableData = res.data?.records.map(e => ({...e, permit: `${e.status}` + e.auditStatus}))
 | |
|           this.page.total = res.data.total
 | |
|         }
 | |
|       })
 | |
|     },
 | |
|   },
 | |
|   created() {
 | |
|     this.getTableData()
 | |
|   }
 | |
| }
 | |
| </script>
 | |
| 
 | |
| <template>
 | |
|   <ai-page class="sellList" :title="pageTitle">
 | |
|     <ai-search-bar>
 | |
|       <template #left>
 | |
|         <ai-input placeholder="贷款合同号" v-model="search.contractNo"/>
 | |
|         <ai-search label="贷款日期">
 | |
|           <el-date-picker v-model="search.beginDate" type="datetime" placeholder="开始日期" size="small"/>
 | |
|           <el-date-picker v-model="search.endDate" type="datetime" placeholder="结束日期" size="small"/>
 | |
|         </ai-search>
 | |
|         <ai-input placeholder="养殖户" v-model="search.applyName"/>
 | |
|         <ai-input placeholder="养殖场" v-model="search.farmName"/>
 | |
|       </template>
 | |
|     </ai-search-bar>
 | |
|     <ai-search-bar>
 | |
|       <template #left>
 | |
|         <ai-download :instance="instance" url="/api/sell/apply/export" :params="{...search,...page}" :fileName="`${pageTitle}导出表-${Date.now()}`"/>
 | |
|       </template>
 | |
|     </ai-search-bar>
 | |
|     <ai-table :tableData="tableData" :colConfigs="columns" :dict="dict" @getList="getTableData"
 | |
|               :total="page.total" :current.sync="page.pageNum" :size.sync="page.pageSize">
 | |
|       <el-table-column slot="options" label="操作" fixed="right" align="center">
 | |
|         <template slot-scope="{row}">
 | |
|           <div class="table-options">
 | |
|             <template v-if="['1'].includes(row.status)">
 | |
|               <el-button type="text" @click="$router.push({hash:'#edit',query:{id:row.contractNo}})">出栏申请</el-button>
 | |
|             </template>
 | |
|             <el-button v-else type="text" @click="$router.push({hash:'#add',query:{id:row.contractNo}})">查看</el-button>
 | |
|           </div>
 | |
|         </template>
 | |
|       </el-table-column>
 | |
|     </ai-table>
 | |
|   </ai-page>
 | |
| </template>
 | |
| 
 | |
| <style scoped lang="scss">
 | |
| .sellList {
 | |
|   height: 100%;
 | |
| 
 | |
|   .deleteBtn {
 | |
|     color: $errorColor;
 | |
|   }
 | |
| }
 | |
| </style>
 |