Bladeren bron

表单验证

wulanhaote
zhao 3 jaren geleden
bovenliggende
commit
7ad7b0828c
7 gewijzigde bestanden met toevoegingen van 83 en 47 verwijderingen
  1. +11
    -5
      src/views/onlineHome/homestead/homesteadUtilize/homesteadUtilizeAdd.vue
  2. +11
    -5
      src/views/onlineHome/homestead/homesteadUtilize/homesteadUtilizeModify.vue
  3. +17
    -10
      src/views/onlineHome/homestead/paidUtilize/paidUtilizeAdd.vue
  4. +17
    -10
      src/views/onlineHome/homestead/paidUtilize/paidUtilizeModify.vue
  5. +1
    -1
      src/views/onlineHome/homestead/reporting/taskReportingList.vue
  6. +13
    -10
      src/views/onlineHome/homestead/utilization/utilizationAdd.vue
  7. +13
    -6
      src/views/onlineHome/homestead/utilization/utilizationModify.vue

+ 11
- 5
src/views/onlineHome/homestead/homesteadUtilize/homesteadUtilizeAdd.vue Bestand weergeven

@@ -10,6 +10,7 @@
<p style="font-weight: bold;">宅基地利用情况</p>
</template>
</van-nav-bar>
<van-form ref="_Form">
<div class="main_box">
<van-field
readonly
@@ -19,7 +20,7 @@
placeholder="请选择"
@click="showzjddm = true"
input-align="right"
right-icon="arrow-down"
right-icon="arrow-down" :rules="[{ required: true }]" required
/>
<van-popup v-model="showzjddm" position="bottom">
<van-picker
@@ -38,7 +39,7 @@
@click="showzjdlyzk = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
label-width="auto" :rules="[{ required: true }]" required
/>
<van-popup v-model="showzjdlyzk" position="bottom">
<van-picker
@@ -58,7 +59,7 @@
@click="showzjdxzqssj = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
label-width="auto" :rules="[{ required: true }]" required
/>
<van-popup v-model="showzjdxzqssj" position="bottom">
<van-datetime-picker
@@ -93,11 +94,12 @@
</van-popup>
<van-field v-model="circulation.bz" label="备注" type="textarea" placeholder="请输入内容" input-align="right" label-width="auto"/>
</div>
</van-form>

<div style="padding: 16px 0;">
<van-row>
<van-col span="12" align="center">
<van-button type="info" color="#B4B0B0" native-type="submit" class="submitButton">关闭</van-button>
<van-button type="info" color="#B4B0B0" native-type="submit" class="submitButton" @click="$router.back()">关闭</van-button>
</van-col>
<van-col span="12" align="center">
<van-button type="info" native-type="submit" class="submitButton" @click="goSubmit">保存</van-button>
@@ -111,6 +113,7 @@
<script>
import { zjdzd } from "@/api/onlineHome/homestead/circulation";
import { zjdlyAdd } from "@/api/onlineHome/homestead/homesteadUtilize";
import {Notify} from "vant";
export default {
name: "homesteadUtilizeAdd",
data() {
@@ -119,7 +122,6 @@ export default {
zjdlyzkDictionaries:[],//宅基地利用状况 字典
circulation:{},
zjdDictionaries:[],
zjdlyzkDictionaries: [],//宅基地利用状况 字典 zjdlyzk
showzjddm : false ,
showzjdlyzk : false ,
showzjdxzqssj : false ,
@@ -164,11 +166,15 @@ export default {
},
goSubmit(){
console.log(this.circulation);
this.$refs._Form.validate().then(() => {
zjdlyAdd(this.circulation).then(response => {
if(response.code = 200){
this.$toast.success('保存成功');
}
});
}).catch((e) => {
Notify({ type: 'danger', message: '请填写完整的表单项' });
});
}
},
}


+ 11
- 5
src/views/onlineHome/homestead/homesteadUtilize/homesteadUtilizeModify.vue Bestand weergeven

@@ -10,6 +10,7 @@
<p style="font-weight: bold;">宅基地利用情况</p>
</template>
</van-nav-bar>
<van-form ref="_Form">
<div class="main_box">
<van-field
readonly
@@ -19,7 +20,7 @@
placeholder="请选择"
@click="showzjddm = true"
input-align="right"
right-icon="arrow-down"
right-icon="arrow-down" :rules="[{ required: true }]" required
/>
<van-popup v-model="showzjddm" position="bottom">
<van-picker
@@ -38,7 +39,7 @@
@click="showzjdlyzk = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
label-width="auto" :rules="[{ required: true }]" required
/>
<van-popup v-model="showzjdlyzk" position="bottom">
<van-picker
@@ -79,7 +80,7 @@
@click="showdcsj = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
label-width="auto" :rules="[{ required: true }]" required
/>
<van-popup v-model="showdcsj" position="bottom">
<van-datetime-picker
@@ -93,11 +94,12 @@
</van-popup>
<van-field v-model="circulation.bz" label="备注" type="textarea" placeholder="请输入内容" input-align="right" label-width="auto"/>
</div>
</van-form>

<div style="padding: 16px 0;">
<van-row>
<van-col span="12" align="center">
<van-button type="info" color="#B4B0B0" native-type="submit" class="submitButton">关闭</van-button>
<van-button type="info" color="#B4B0B0" native-type="submit" class="submitButton" @click="$router.back()">关闭</van-button>
</van-col>
<van-col span="12" align="center">
<van-button type="info" native-type="submit" class="submitButton" @click="goSubmit">保存</van-button>
@@ -111,6 +113,7 @@
<script>
import { zjdzd } from "@/api/onlineHome/homestead/circulation";
import { zjdlyEdit , getZjdly } from "@/api/onlineHome/homestead/homesteadUtilize";
import {Notify} from "vant";
export default {
name: "homesteadUtilizeModify",
data() {
@@ -119,7 +122,6 @@ export default {
zjdlyzkDictionaries:[],//宅基地利用状况 字典
circulation:{},
zjdDictionaries:[],
zjdlyzkDictionaries: [],//宅基地利用状况 字典 zjdlyzk
showzjddm : false ,
showzjdlyzk : false ,
showzjdxzqssj : false ,
@@ -173,11 +175,15 @@ export default {
},
goSubmit(){
console.log(this.circulation);
this.$refs._Form.validate().then(() => {
zjdlyEdit(this.circulation).then(response => {
if(response.code = 200){
this.$toast.success('保存成功');
}
});
}).catch((e) => {
Notify({ type: 'danger', message: '请填写完整的表单项' });
});
}
},
}


+ 17
- 10
src/views/onlineHome/homestead/paidUtilize/paidUtilizeAdd.vue Bestand weergeven

@@ -10,6 +10,7 @@
<p style="font-weight: bold;">添加有偿使用</p>
</template>
</van-nav-bar>
<van-form ref="_Form">
<div class="main_box">
<van-field
readonly
@@ -19,7 +20,7 @@
placeholder="请选择"
@click="showshyqrdm = true"
input-align="right"
right-icon="arrow-down"
right-icon="arrow-down" :rules="[{ required: true }]" required
/>
<van-popup v-model="showshyqrdm" position="bottom">
<van-picker
@@ -37,7 +38,7 @@
placeholder="请选择"
@click="showzjddm = true"
input-align="right"
right-icon="arrow-down"
right-icon="arrow-down" :rules="[{ required: true }]" required
/>
<van-popup v-model="showzjddm" position="bottom">
<van-picker
@@ -57,7 +58,7 @@
@click="showzjlx = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
label-width="auto" :rules="[{ required: true }]" required
/>
<van-popup v-model="showzjlx" position="bottom">
<van-picker
@@ -67,8 +68,8 @@
@cancel="showzjlx = false"
/>
</van-popup>
<van-field v-model="circulation.sqrzjhm" label="申请人证件号码" placeholder="申请人证件号码" input-align="right" label-width="auto"/>
<van-field v-model="circulation.ycsyfs" label="有偿使用方式" placeholder="有偿使用方式" input-align="right" label-width="auto"/>
<van-field v-model="circulation.sqrzjhm" label="申请人证件号码" placeholder="申请人证件号码" input-align="right" label-width="auto" :rules="[{ required: true }]" required/>
<van-field v-model="circulation.ycsyfs" label="有偿使用方式" placeholder="有偿使用方式" input-align="right" label-width="auto" :rules="[{ required: true }]" required/>


<van-cell title="是否一户多宅">
@@ -91,7 +92,7 @@
@click="showycsykssj = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
label-width="auto" :rules="[{ required: true }]" required
/>
<van-popup v-model="showycsykssj" position="bottom">
<van-datetime-picker
@@ -114,7 +115,7 @@
@click="showycsydqsj = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
label-width="auto" :rules="[{ required: true }]" required
/>
<van-popup v-model="showycsydqsj" position="bottom">
<van-datetime-picker
@@ -127,13 +128,14 @@
/>
</van-popup>

<van-field v-model="circulation.ycsymj" label="有偿使用面积(㎡)" placeholder="请输入有偿使用面积㎡" input-align="right" label-width="auto"/>
<van-field v-model="circulation.ycsymjdj" label="有偿使用面积单价(元)" placeholder="请输入有偿使用面积单价" input-align="right" label-width="auto"/>
<van-field v-model="circulation.ycsyfy" label="有偿使用费用(元)" placeholder="请输入有偿使用费用" input-align="right" label-width="auto"/>
<van-field v-model="circulation.ycsymj" label="有偿使用面积(㎡)" placeholder="请输入有偿使用面积㎡" input-align="right" label-width="auto" type="number"/>
<van-field v-model="circulation.ycsymjdj" label="有偿使用面积单价(元)" placeholder="请输入有偿使用面积单价" input-align="right" label-width="auto" type="number"/>
<van-field v-model="circulation.ycsyfy" label="有偿使用费用(元)" placeholder="请输入有偿使用费用" input-align="right" label-width="auto" type="number"/>
<van-field v-model="circulation.fkfs" label="付款方式" placeholder="请输入付款方式" input-align="right" label-width="auto"/>
<van-field v-model="circulation.bz" label="备注" placeholder="请输入内容" input-align="right" label-width="auto"/>

</div>
</van-form>

<div style="padding: 16px 0;">
<van-row>
@@ -152,6 +154,7 @@
<script>
import { zjdzd } from "@/api/onlineHome/homestead/circulation";
import { ycsyAdd , listByDeptId } from "@/api/onlineHome/homestead/paidUtilize";
import {Notify} from "vant";
export default {
name: "paidUtilizeAdd",
data() {
@@ -281,6 +284,7 @@
window.location.replace("paidUtilizeList")
},
goSubmit(){
this.$refs._Form.validate().then(() => {
ycsyAdd(this.circulation).then(response => {
if(response.code = 200){
this.$toast.success('新增成功');
@@ -289,6 +293,9 @@
},1000)
}
});
}).catch((e) => {
Notify({ type: 'danger', message: '请填写完整的表单项' });
});
}
},
}


+ 17
- 10
src/views/onlineHome/homestead/paidUtilize/paidUtilizeModify.vue Bestand weergeven

@@ -10,6 +10,7 @@
<p style="font-weight: bold;">修改有偿使用</p>
</template>
</van-nav-bar>
<van-form ref="_Form">
<div class="main_box">
<van-field
readonly
@@ -19,7 +20,7 @@
placeholder="请选择"
@click="showshyqrdm = true"
input-align="right"
right-icon="arrow-down"
right-icon="arrow-down" :rules="[{ required: true }]" required
/>
<van-popup v-model="showshyqrdm" position="bottom">
<van-picker
@@ -37,7 +38,7 @@
placeholder="请选择"
@click="showzjddm = true"
input-align="right"
right-icon="arrow-down"
right-icon="arrow-down" :rules="[{ required: true }]" required
/>
<van-popup v-model="showzjddm" position="bottom">
<van-picker
@@ -57,7 +58,7 @@
@click="showzjlx = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
label-width="auto" :rules="[{ required: true }]" required
/>
<van-popup v-model="showzjlx" position="bottom">
<van-picker
@@ -67,8 +68,8 @@
@cancel="showzjlx = false"
/>
</van-popup>
<van-field v-model="circulation.sqrzjhm" label="申请人证件号码" placeholder="申请人证件号码" input-align="right" label-width="auto"/>
<van-field v-model="circulation.ycsyfs" label="有偿使用方式" placeholder="有偿使用方式" input-align="right" label-width="auto"/>
<van-field v-model="circulation.sqrzjhm" label="申请人证件号码" placeholder="申请人证件号码" input-align="right" label-width="auto" :rules="[{ required: true }]" required/>
<van-field v-model="circulation.ycsyfs" label="有偿使用方式" placeholder="有偿使用方式" input-align="right" label-width="auto" :rules="[{ required: true }]" required/>


<van-cell title="是否一户多宅">
@@ -91,7 +92,7 @@
@click="showycsykssj = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
label-width="auto" :rules="[{ required: true }]" required
/>
<van-popup v-model="showycsykssj" position="bottom">
<van-datetime-picker
@@ -114,7 +115,7 @@
@click="showycsydqsj = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
label-width="auto" :rules="[{ required: true }]" required
/>
<van-popup v-model="showycsydqsj" position="bottom">
<van-datetime-picker
@@ -127,13 +128,14 @@
/>
</van-popup>

<van-field v-model="circulation.ycsymj" label="有偿使用面积(㎡)" placeholder="请输入有偿使用面积㎡" input-align="right" label-width="auto"/>
<van-field v-model="circulation.ycsymjdj" label="有偿使用面积单价(元)" placeholder="请输入有偿使用面积单价" input-align="right" label-width="auto"/>
<van-field v-model="circulation.ycsyfy" label="有偿使用费用(元)" placeholder="请输入有偿使用费用" input-align="right" label-width="auto"/>
<van-field v-model="circulation.ycsymj" label="有偿使用面积(㎡)" placeholder="请输入有偿使用面积㎡" input-align="right" label-width="auto" type="number"/>
<van-field v-model="circulation.ycsymjdj" label="有偿使用面积单价(元)" placeholder="请输入有偿使用面积单价" input-align="right" label-width="auto" type="number"/>
<van-field v-model="circulation.ycsyfy" label="有偿使用费用(元)" placeholder="请输入有偿使用费用" input-align="right" label-width="auto" type="number"/>
<van-field v-model="circulation.fkfs" label="付款方式" placeholder="请输入付款方式" input-align="right" label-width="auto"/>
<van-field v-model="circulation.bz" label="备注" placeholder="请输入内容" input-align="right" label-width="auto"/>

</div>
</van-form>

<div style="padding: 16px 0;">
<van-row>
@@ -152,6 +154,7 @@
<script>
import { zjdzd } from "@/api/onlineHome/homestead/circulation";
import { listByDeptId , getYcsy , ycsyEdit } from "@/api/onlineHome/homestead/paidUtilize";
import {Notify} from "vant";
export default {
name: "paidUtilizeModify",
data() {
@@ -289,6 +292,7 @@
window.location.replace("paidUtilizeList")
},
goSubmit(){
this.$refs._Form.validate().then(() => {
ycsyEdit(this.circulation).then(response => {
if(response.code = 200){
this.$toast.success('修改成功');
@@ -297,6 +301,9 @@
},1000)
}
});
}).catch((e) => {
Notify({ type: 'danger', message: '请填写完整的表单项' });
});
}
},
}


+ 1
- 1
src/views/onlineHome/homestead/reporting/taskReportingList.vue Bestand weergeven

@@ -67,7 +67,7 @@ export default {
queryParams:{
pageNum:1,
pageSize:10,
orderByColumn:'create_time',
orderByColumn:'createTime',
isAsc:'desc',
taskStatus: null,
taskSubjectStatus: '2'


+ 13
- 10
src/views/onlineHome/homestead/utilization/utilizationAdd.vue Bestand weergeven

@@ -10,6 +10,7 @@
<p style="font-weight: bold;">农民房屋利用情况调查</p>
</template>
</van-nav-bar>
<van-form ref="_Form">
<div class="main_box">
<van-field
readonly
@@ -20,7 +21,7 @@
placeholder="请选择"
@click="showzjddm = true"
input-align="right"
right-icon="arrow-down"
right-icon="arrow-down" :rules="[{ required: true }]" required
/>
<van-popup v-model="showzjddm" position="bottom">
<van-picker
@@ -40,7 +41,7 @@
@click="showfwzt = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
label-width="auto" :rules="[{ required: true }]" required
/>
<van-popup v-model="showfwzt" position="bottom">
<van-picker
@@ -80,7 +81,7 @@
@click="showlyzk = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
label-width="auto" :rules="[{ required: true }]" required
/>
<van-popup v-model="showlyzk" position="bottom">
<van-picker
@@ -100,7 +101,7 @@
@click="showfwsfxz = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
label-width="auto" :rules="[{ required: true }]" required
/>
<van-popup v-model="showfwsfxz" position="bottom">
<van-picker
@@ -162,7 +163,7 @@
placeholder="选择调查时间"
@click="showdcsj = true"
input-align="right"
right-icon="arrow-down"
right-icon="arrow-down" :rules="[{ required: true }]" required
/>
<van-popup v-model="showdcsj" position="bottom">
<van-datetime-picker
@@ -205,11 +206,12 @@
<div class="main_box">
<van-field v-model="circulation.bz" label="备注" type="textarea" placeholder="请输入内容" input-align="right" label-width="auto"/>
</div>
</van-form>

<div style="padding: 16px 0;">
<van-row>
<van-col span="12" align="center">
<van-button type="info" color="#B4B0B0" native-type="submit" class="submitButton">关闭</van-button>
<van-button type="info" color="#B4B0B0" native-type="submit" class="submitButton" @click="$router.back()">关闭</van-button>
</van-col>
<van-col span="12" align="center">
<van-button type="info" native-type="submit" class="submitButton" @click="goSubmit">保存</van-button>
@@ -223,6 +225,7 @@
<script>
import { nmfwlyAdd } from "@/api/onlineHome/homestead/utilization";
import { zjdzd } from "@/api/onlineHome/homestead/circulation";
import {Notify} from "vant";
export default {
name: "circulationAdd",
data() {
@@ -329,21 +332,21 @@ export default {
this.circulation.fwxzqssj = this.getNowFormatDate(data).substr(0,10);;
this.showfwxzqssj = false;
},
onConfirmFwxzqssj(data){
this.circulation.fwxzqssj = this.getNowFormatDate(data).substr(0,10);;
this.showfwxzqssj = false;
},
onConfirmDcsj(data){
this.circulation.dcsj = this.getNowFormatDate(data).substr(0,10);;
this.showdcsj = false;
},
goSubmit(){
console.log(this.circulation)
this.$refs._Form.validate().then(() => {
nmfwlyAdd(this.circulation).then(response => {
if(response.code = 200){
this.$toast.success('保存成功');
}
});
}).catch((e) => {
Notify({ type: 'danger', message: '请填写完整的表单项' });
});
}

},


+ 13
- 6
src/views/onlineHome/homestead/utilization/utilizationModify.vue Bestand weergeven

@@ -10,6 +10,7 @@
<p style="font-weight: bold;">宅基地利用情况</p>
</template>
</van-nav-bar>
<van-form ref="_Form">
<div class="main_box">
<van-field
readonly
@@ -20,7 +21,7 @@
placeholder="请选择"
@click="showzjddm = true"
input-align="right"
right-icon="arrow-down"
right-icon="arrow-down" :rules="[{ required: true }]" required
/>
<van-popup v-model="showzjddm" position="bottom">
<van-picker
@@ -40,7 +41,7 @@
@click="showfwzt = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
label-width="auto" :rules="[{ required: true }]" required
/>
<van-popup v-model="showfwzt" position="bottom">
<van-picker
@@ -80,7 +81,7 @@
@click="showlyzk = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
label-width="auto" :rules="[{ required: true }]" required
/>
<van-popup v-model="showlyzk" position="bottom">
<van-picker
@@ -100,7 +101,7 @@
@click="showfwsfxz = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
label-width="auto" :rules="[{ required: true }]" required
/>
<van-popup v-model="showfwsfxz" position="bottom">
<van-picker
@@ -162,7 +163,7 @@
placeholder="选择调查时间"
@click="showdcsj = true"
input-align="right"
right-icon="arrow-down"
right-icon="arrow-down" :rules="[{ required: true }]" required
/>
<van-popup v-model="showdcsj" position="bottom">
<van-datetime-picker
@@ -205,11 +206,12 @@
<div class="main_box">
<van-field v-model="circulation.bz" label="备注" type="textarea" placeholder="请输入内容" input-align="right" label-width="auto"/>
</div>
</van-form>

<div style="padding: 16px 0;">
<van-row>
<van-col span="12" align="center">
<van-button type="info" color="#B4B0B0" native-type="submit" class="submitButton">关闭</van-button>
<van-button type="info" color="#B4B0B0" native-type="submit" class="submitButton" @click="$router.back()">关闭</van-button>
</van-col>
<van-col span="12" align="center">
<van-button type="info" native-type="submit" class="submitButton" @click="goSubmit">保存</van-button>
@@ -223,6 +225,7 @@
<script>
import { zjdzd } from "@/api/onlineHome/homestead/circulation";
import { getZjdly , nmfwlyEdit , upload} from "@/api/onlineHome/homestead/utilization";
import {Notify} from "vant";
export default {
name: "utilizationModify",
data() {
@@ -365,6 +368,7 @@ export default {
});
},
goSubmit(){
this.$refs._Form.validate().then(() => {
if(this.findListD != '' && this.findListD[0].content != undefined){
console.log('1111')
const params = new FormData()
@@ -406,6 +410,9 @@ export default {
}
});
},2000);
}).catch((e) => {
Notify({ type: 'danger', message: '请填写完整的表单项' });
});
},
deleteFileD(elIndex){
this.circulation.xczpd = null ;


Laden…
Annuleren
Opslaan