Fldcb.vue 8.99 KB
<template>
    <div >
        <table border="1">
            <thead>
            <tr rowspan="2">
                <th colspan="4">
                    <h2> 集体土地所有权宗地分类面积调查表</h2><br/>
                    <div class="dw">
                        单位:
                        <el-radio-group v-model="flmjData.mjdw ">
                            <el-radio :label="3">平方米</el-radio>
                            <el-radio :label="6">公顷</el-radio>
                            <el-radio :label="9"></el-radio>
                        </el-radio-group>
                    </div>
                </th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <th>权利人</th>
                <td colspan="3">
                   <el-input v-model="qlr" disabled></el-input>
                </td>
            </tr>
            <tr>
                <th>宗地代码</th>
                <td colspan="3">
                    <el-input v-model="zddm" disabled></el-input>
                </td>
            </tr>
            <tr>
                <th>不动产单元号</th>
                <td colspan="3">
                    <el-input v-model="bdcdyh" disabled></el-input>
                </td>
            </tr>
            <tr >
                <th rowspan="7">
                   分类面积
                </th>
                <th colspan="2">农用地</th>
                <td>
                    <el-input v-model="flmjData.nyd" oninput="value = (value.match(/^\d{0,8}(\.?\d{0,3})/g)[0]) || null"></el-input>
                </td>
            </tr>
            <tr>
                <th rowspan="4">
                    其他
                </th>
                <th>
                    耕地
                </th>
                <th colspan="2">
                    <el-input v-model="flmjData.nydgd" oninput="value = (value.match(/^\d{0,8}(\.?\d{0,3})/g)[0]) || null"></el-input>
                </th>
            </tr>
            <tr>
                <th>林地</th>
                <td colspan="2">
                    <el-input v-model="flmjData.nydld" oninput="value = (value.match(/^\d{0,8}(\.?\d{0,3})/g)[0]) || null"></el-input>
                </td>
            </tr>
            <tr>
                <th>
                    草地
                </th>
                <td colspan="2">
                    <el-input v-model="flmjData.nydcd" oninput="value = (value.match(/^\d{0,8}(\.?\d{0,3})/g)[0]) || null"></el-input>
                </td>
            </tr>
            <tr>
                <th>其他</th>
                <td colspan="2">
                    <el-input v-model="flmjData.nydqt " oninput="value = (value.match(/^\d{0,8}(\.?\d{0,3})/g)[0]) || null"></el-input>
                </td>
            </tr>
            <tr>
                <th>建设用地</th>
                <td colspan="3">
                    <el-input v-model="flmjData.jzyd" oninput="value = (value.match(/^\d{0,8}(\.?\d{0,3})/g)[0]) || null"></el-input>
                </td>
            </tr>
            <tr>
                <th>
                    未利用地
                </th>
                <td colspan="3">
                    <el-input v-model="flmjData.wlyd" oninput="value = (value.match(/^\d{0,8}(\.?\d{0,3})/g)[0]) || null"></el-input>
                </td>
            </tr>
            <tr>
                <th rowspan="2">调查记事</th>
                <td colspan="3">
                    <el-input  type="textarea"
                               :autosize="{ minRows: 2, maxRows: 4}" v-model="flmjData.dcjs"></el-input>
                </td>
            </tr>
            <tr>
                <td colspan="3">

                    <el-form :inline="true" :model="flmjData" class="demo-form-inline">
                        <el-form-item label="调查员:">
                            <el-input v-model="flmjData.dcy" ></el-input>
                        </el-form-item>
                        <el-form-item label="日期:">
                            <el-input
                                    placeholder="请选择日期"
                                    title="调查日期"
                                    type="date"
                                    v-model="flmjData.dcrq">
                            </el-input>
                        </el-form-item>
                    </el-form>
                </td>
            </tr>
            <tr>
                <th rowspan="2">审核意见</th>
                <td colspan="3">
                    <el-input  type="textarea"
                               :autosize="{ minRows: 2, maxRows: 4}" v-model="flmjData.shyj"></el-input>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <el-form :inline="true" :model="flmjData" class="demo-form-inline">
                        <el-form-item label="审核员:">
                            <el-input v-model="flmjData.shy" ></el-input>
                        </el-form-item>
                        <el-form-item label="日期:">
                            <el-input
                                    placeholder="请选择日期"
                                    title="调查日期"
                                    type="date"
                                    v-model="flmjData.shrq">
                            </el-input>
                        </el-form-item>
                    </el-form>
                </td>
            </tr>
            <tr>
                <td colspan="4" style="text-align: center">
                    <el-button type="primary" @click="save">保存</el-button>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</template>

<script>
    import {getFlDc,updateFldc} from '@api/zd'
    export default {
        name: "Fldcb",
        props:{
            qlr:{
                type:String
            },
            bdcdyh:{
                type:String
            },
            zddm:{
                type:String
            }
        },
        data(){
            return{
                // zdbsm:'',
                flmjData:{
                    zdbsm:'',
                    mjdw :'',      // 单位
                    zddm:'',    // 宗地代码
                    nyd :'',     // 农用地
                    nydgd :'',      // 耕地
                    nydld :'',      // 林地
                    nydcd :'',       // 草地
                    nydqt :'',         //其他
                    jsyd:'',      // 建设用地
                    wlyd:'',      // 未利用地
                    dcjs :"",     // 调查记事
                    dcy:'',        // 调查员
                    dcrq:'',      // 调查日期
                    shyj:'',      // 审核意见
                    shr :'',       // 审核员
                    shrq:''        // 审核日期
                }
            }
        },
        mounted(){
            console.log(this.$route.query.bsm,'分类bsm')
            this.info(this.$route.query.bsm)
        },
        methods:{
            info(zdbsm){
                getFlDc(zdbsm).then(res=>{
                    if (res.success) {
                        console.log(res,'获取信息')
                        this.flmjData=res.result[0]
                    }
                })
            },
            save(){
                updateFldc(this.flmjData).then(res=>{
                    if (res.success) {
                        console.log(res,"保存成功")
                        this.$message.success("保存成功")
                    }
                })
            },
            result(){
                this.flmjData={
                    dw:'',      // 单位
                    qlr:'',     // 权利人
                    zddm:'',    // 宗地代码
                    bdcdyh:'',  // 不动产单元号
                    lyd:'',     // 农用地
                    gd:'',      // 耕地
                    ld:'',      // 林地
                    cd:'',       // 草地
                    qt:'',         //其他
                    jzyd:'',      // 建设用地
                    wlyd:'',      // 未利用地
                    dcjs:"",     // 调查记事
                    dcy:'',        // 调查员
                    dcrq:'',      // 调查日期
                    shyj:'',      // 审核意见
                    shy:'',       // 审核员
                    shrq:''        // 审核日期
                }
            }
        },
        watch:{
            "$store.state.zddm": function (zddm) {
                this.zddm = zddm
            },
            "$store.state.zdbsm": function (bsm) {
                this.mjftData.zdbsm = bsm
                this.info(bsm);
            },
        }
    }
</script>

<style scoped lang="less">
    table{
        margin-top: 20px;
        background-color: #fff;
        font-size: 14px;
        width: 100%;
        cursor: pointer;
        th{
            height: 36px;
        }
    }
    .dw{
        float: right;
    }
    .demo-form-inline{
        float: right;
    }
</style>