@@ -0,0 +1,44 @@ | |||
import request from '@/utils/request' | |||
// 查询收款账户列表 | |||
export function listPayee(query) { | |||
return request({ | |||
url: '/yinnong/payee/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 新增收款账户 | |||
export function addPayee(data) { | |||
return request({ | |||
url: '/yinnong/payee/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 查询收款账户详细 | |||
export function getPayee(id) { | |||
return request({ | |||
url: '/yinnong/payee/get/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 修改收款账户 | |||
export function updatePayee(data) { | |||
return request({ | |||
url: '/yinnong/payee/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除收款账户 | |||
export function delPayee(id) { | |||
return request({ | |||
url: '/yinnong/payee/remove/' + id, | |||
method: 'get' | |||
}) | |||
} |
@@ -12,48 +12,67 @@ | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field label="收款方" placeholder="请输入收款方" input-align="right" label-width="auto"/> | |||
<van-field label="收款账户" placeholder="请输入收款账户" input-align="right" label-width="auto"/> | |||
<van-field label="收款方" v-model="form.payee" placeholder="请输入收款方" input-align="right" label-width="auto"/> | |||
<van-field label="收款账户" v-model="form.payeeAccount" placeholder="请输入收款账户" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="所属银行" | |||
placeholder="请选择" | |||
v-model="sfzjjzw" | |||
@click="showSys = true" | |||
v-model="bankType" | |||
@click="showBankType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
/> | |||
<van-popup v-model="showSys" position="bottom"> | |||
<van-popup v-model="showBankType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="sysDictionaries" | |||
@confirm="onConfirmSys" | |||
@cancel="showSys = false" | |||
:columns="bankTypeOptions" | |||
@confirm="onConfirmBankType" | |||
@cancel="showBankType = false" | |||
/> | |||
</van-popup> | |||
<van-field label="开户银行" placeholder="请输入开户银行" input-align="right" label-width="auto"/> | |||
<van-field label="开户银行" v-model="form.bankDeposit" placeholder="请输入开户银行" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field label="备注" type="textarea" placeholder="请输入备注" input-align="right" rows="3" label-width="auto"/> | |||
<van-field label="备注" v-model="form.remark" type="textarea" placeholder="请输入备注" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-cell title="账户类型"> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal"> | |||
<van-radio-group direction="horizontal" v-model="form.accountType"> | |||
<van-radio name="1">公户</van-radio> | |||
<van-radio name="2">私户</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
<van-field | |||
readonly | |||
clickable | |||
label="收款人类型" | |||
placeholder="请选择" | |||
v-model="payeeType" | |||
@click="showPayeeType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
/> | |||
<van-popup v-model="showPayeeType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="payeeTypeOptions" | |||
@confirm="onConfirmPayeeType" | |||
@cancel="showPayeeType = false" | |||
/> | |||
</van-popup> | |||
<van-cell title="数据状态"> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal"> | |||
<van-radio name="1">正常</van-radio> | |||
<van-radio name="2">停用</van-radio> | |||
<van-radio-group direction="horizontal" v-model="form.status"> | |||
<van-radio name="0">正常</van-radio> | |||
<van-radio name="1">停用</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
@@ -61,7 +80,7 @@ | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" @click="goBack" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
<van-button type="info" native-type="submit" @click="goAdd" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
@@ -70,30 +89,22 @@ | |||
</template> | |||
<script> | |||
import { jgAdd } from "@/api/onlineHome/homestead/reporting"; | |||
import { addPayee } from "@/api/onlineHome/bankAgriculture/collectionAccount"; | |||
export default { | |||
name: "approvalAdd", | |||
name: "collectionAdd", | |||
data() { | |||
return { | |||
showSys:false, | |||
showjglx:false, | |||
showlasj:false, | |||
showinspectorTime:false, | |||
showwfydlx:false, | |||
showReformDeadline:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
jgList:{}, | |||
showBankType:false, | |||
showPayeeType:false, | |||
form:{}, | |||
sfzjjzw:'', | |||
jglx:'', | |||
wfydlx:'', | |||
bankType:'', | |||
payeeType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
bankTypeOptions:[], | |||
statusOptions:[], | |||
accountTypeOptions:[], | |||
payeeTypeOptions:[], | |||
}; | |||
}, | |||
@@ -102,58 +113,45 @@ | |||
}, | |||
methods: { | |||
getDictionaries(){ | |||
//违法用地类型 | |||
this.houseGetDicts("villations_type").then((res) => { | |||
this.houseGetDicts("bank_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.bankTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
this.houseGetDicts("sys_normal_disable").then((res) => { | |||
console.log(res) | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.wfydlxDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
this.statusOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
//监管类型 | |||
this.houseGetDicts("jglx").then((res) => { | |||
this.houseGetDicts("bank_account_type").then((res) => { | |||
console.log(res) | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.jglxDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
this.accountTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
//是否在建建筑物 | |||
this.houseGetDicts("sys_yes_no").then((res) => { | |||
this.houseGetDicts("payee_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.sysDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
this.payeeTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
}, | |||
onConfirmSys(data){ | |||
this.sfzjjzw = data.text; | |||
this.jgList.sfzjjzw = data.value; | |||
this.showSys = false; | |||
}, | |||
onConfirmJglx(data){ | |||
this.jglx = data.text; | |||
this.jgList.jglx = data.value; | |||
this.showjglx = false; | |||
}, | |||
onConfirmWfydlx(data){ | |||
this.wfydlx = data.text; | |||
this.jgList.wfydlx = data.value; | |||
this.showwfydlx = false; | |||
}, | |||
onConfirmLasj(data){ | |||
this.jgList.lasj = this.getNowFormatDate(data).substr(0,10); | |||
this.showlasj = false; | |||
}, | |||
onConfirmInspectorTime(data){ | |||
this.jgList.inspectorTime = this.getNowFormatDate(data).substr(0,10); | |||
this.showinspectorTime = false; | |||
onConfirmBankType(data){ | |||
this.bankType = data.text; | |||
this.form.bankType = data.value; | |||
this.showBankType = false; | |||
}, | |||
onConfirmReformDeadline(data){ | |||
this.jgList.reformDeadline = this.getNowFormatDate(data).substr(0,10); | |||
this.showReformDeadline = false; | |||
onConfirmPayeeType(data){ | |||
this.payeeType = data.text; | |||
this.form.payeeType = data.value; | |||
this.showPayeeType = false; | |||
}, | |||
goAdd(){ | |||
console.log(this.jgList) | |||
jgAdd(this.jgList).then(response => { | |||
console.log(this.form) | |||
addPayee(this.form).then(response => { | |||
console.log(response); | |||
this.$toast.success('保存成功'); | |||
this.$toast.success('新增成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
@@ -7,93 +7,52 @@ | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">添加支付收款账户</p> | |||
<p style="font-weight: bold;">查看支付收款账户</p> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field label="收款方" placeholder="请输入收款方" input-align="right" label-width="auto"/> | |||
<van-field label="收款账户" placeholder="请输入收款账户" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="所属银行" | |||
placeholder="请选择" | |||
v-model="sfzjjzw" | |||
@click="showSys = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
/> | |||
<van-popup v-model="showSys" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="sysDictionaries" | |||
@confirm="onConfirmSys" | |||
@cancel="showSys = false" | |||
/> | |||
</van-popup> | |||
<van-field label="开户银行" placeholder="请输入开户银行" input-align="right" label-width="auto"/> | |||
<van-field readonly label="收款方" v-model="form.payee" input-align="right" label-width="auto"/> | |||
<van-field readonly label="收款账户" v-model="form.payeeAccount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="所属银行" v-model="bankType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="开户银行" v-model="form.bankDeposit" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field label="备注" type="textarea" placeholder="请输入备注" input-align="right" rows="3" label-width="auto"/> | |||
<van-field readonly label="备注" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-cell title="账户类型"> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal"> | |||
<van-radio name="1">公户</van-radio> | |||
<van-radio name="2">私户</van-radio> | |||
</van-radio-group> | |||
{{form.accountType == '1' ? '公户' : '私户' }} | |||
</template> | |||
</van-cell> | |||
<van-field readonly label="收款人类型" v-model="payeeType" input-align="right" label-width="auto" /> | |||
<van-cell title="数据状态"> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal"> | |||
<van-radio name="1">正常</van-radio> | |||
<van-radio name="2">停用</van-radio> | |||
</van-radio-group> | |||
{{form.accountType == '0' ? '正常' : '停用' }} | |||
</template> | |||
</van-cell> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" @click="goBack" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { jgAdd } from "@/api/onlineHome/homestead/reporting"; | |||
import { getPayee , updatePayee } from "@/api/onlineHome/bankAgriculture/collectionAccount"; | |||
export default { | |||
name: "approvalAdd", | |||
name: "collectionModify", | |||
data() { | |||
return { | |||
showSys:false, | |||
showjglx:false, | |||
showlasj:false, | |||
showinspectorTime:false, | |||
showwfydlx:false, | |||
showReformDeadline:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
jgList:{}, | |||
showBankType:false, | |||
showPayeeType:false, | |||
form:{}, | |||
sfzjjzw:'', | |||
jglx:'', | |||
wfydlx:'', | |||
bankType:'', | |||
payeeType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
bankTypeOptions:[], | |||
payeeTypeOptions:[], | |||
}; | |||
}, | |||
@@ -102,58 +61,37 @@ | |||
}, | |||
methods: { | |||
getDictionaries(){ | |||
//违法用地类型 | |||
this.houseGetDicts("villations_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.wfydlxDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
//监管类型 | |||
this.houseGetDicts("jglx").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.jglxDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
//是否在建建筑物 | |||
this.houseGetDicts("sys_yes_no").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.sysDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
getPayee(this.$route.query.id).then((response) => { | |||
this.houseGetDicts("bank_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.bankTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
this.bankType = this.selectDictLabel(res.data, response.data.bankType); | |||
}); | |||
this.houseGetDicts("payee_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.payeeTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
this.payeeType = this.selectDictLabel(res.data, response.data.payeeType); | |||
}); | |||
this.form = response.data; | |||
}); | |||
}, | |||
onConfirmSys(data){ | |||
this.sfzjjzw = data.text; | |||
this.jgList.sfzjjzw = data.value; | |||
this.showSys = false; | |||
}, | |||
onConfirmJglx(data){ | |||
this.jglx = data.text; | |||
this.jgList.jglx = data.value; | |||
this.showjglx = false; | |||
}, | |||
onConfirmWfydlx(data){ | |||
this.wfydlx = data.text; | |||
this.jgList.wfydlx = data.value; | |||
this.showwfydlx = false; | |||
}, | |||
onConfirmLasj(data){ | |||
this.jgList.lasj = this.getNowFormatDate(data).substr(0,10); | |||
this.showlasj = false; | |||
}, | |||
onConfirmInspectorTime(data){ | |||
this.jgList.inspectorTime = this.getNowFormatDate(data).substr(0,10); | |||
this.showinspectorTime = false; | |||
onConfirmBankType(data){ | |||
this.bankType = data.text; | |||
this.form.bankType = data.value; | |||
this.showBankType = false; | |||
}, | |||
onConfirmReformDeadline(data){ | |||
this.jgList.reformDeadline = this.getNowFormatDate(data).substr(0,10); | |||
this.showReformDeadline = false; | |||
onConfirmPayeeType(data){ | |||
this.payeeType = data.text; | |||
this.form.payeeType = data.value; | |||
this.showPayeeType = false; | |||
}, | |||
goAdd(){ | |||
console.log(this.jgList) | |||
jgAdd(this.jgList).then(response => { | |||
console.log(response); | |||
this.$toast.success('保存成功'); | |||
console.log(this.form) | |||
updatePayee(this.form).then(response => { | |||
this.$toast.success('修改成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
@@ -22,22 +22,25 @@ | |||
@load="getList" | |||
> | |||
<van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
<van-cell title="名家合作社有限公司" center :to="{name:'applicationForm', query: {id:item.id,type:'modify'}}"> | |||
<van-cell center :to="{name:'collectionDetail', query: {id:item.id}}"> | |||
<template #icon> | |||
<van-icon name="../../../static/images/icon/icon_yl.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||
</template> | |||
<template #label> | |||
<p>3215 4658 7894 156</p> | |||
<p>{{item.payeeAccount}}</p> | |||
</template> | |||
<template #title> | |||
<p class="van-ellipsis">{{item.payee}}</p> | |||
</template> | |||
<template #default> | |||
<p>草稿</p> | |||
<p style="font-size: 12px;font-weight: normal;color: #878787;">中国银行</p> | |||
<p>{{item.accountType}}</p> | |||
<p style="font-size: 12px;font-weight: normal;color: #878787;">{{item.bankType}}</p> | |||
</template> | |||
</van-cell> | |||
<template #right> | |||
<van-row> | |||
<van-col> | |||
<van-button square text="修改" type="info" :to="{name:'applicationForm', query: {id:item.id}}" class="delete-button" /> | |||
<van-button square text="修改" type="info" :to="{name:'collectionModify', query: {id:item.id}}" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
@@ -50,27 +53,32 @@ | |||
</template> | |||
<script> | |||
import { getList , removeList } from "@/api/onlineHome/homestead/application"; | |||
import { listPayee , delPayee } from "@/api/onlineHome/bankAgriculture/collectionAccount"; | |||
export default { | |||
name: "approvalList", | |||
name: "collectionList", | |||
data() { | |||
return { | |||
applicationList:[], | |||
houseApplyStatus:[], | |||
loading: false, | |||
finished: false, | |||
queryParams:{ | |||
pageNum:1, | |||
pageSize:10, | |||
orderByColumn:'createTime', | |||
isAsc:'desc' | |||
} | |||
}; | |||
}, | |||
created() { | |||
this.houseGetDicts("house_apply_status").then((response) => { | |||
console.log(response) | |||
this.houseApplyStatus = response.data; | |||
this.getDicts("bank_type").then(response => { | |||
this.bankTypeOptions = response.data; | |||
}); | |||
this.getDicts("sys_normal_disable").then(response => { | |||
this.statusOptions = response.data; | |||
}); | |||
this.getDicts("bank_account_type").then(response => { | |||
this.accountTypeOptions = response.data; | |||
}); | |||
this.getDicts("payee_type").then(response => { | |||
this.payeeTypeOptions = response.data; | |||
}); | |||
}, | |||
methods: { | |||
@@ -79,14 +87,14 @@ export default { | |||
}, | |||
getList(){ | |||
setTimeout(() => { | |||
getList(this.queryParams).then(response => { | |||
listPayee(this.queryParams).then(response => { | |||
console.log(response) | |||
for (var i = 0; i < response.rows.length; i++) { | |||
var houseApplyStatus = this.selectDictLabel(this.houseApplyStatus, response.rows[i].houseApplyStatus); | |||
response.rows[i].houseApplyStatus = houseApplyStatus; | |||
response.rows[i].accountType = this.selectDictLabel(this.accountTypeOptions, response.rows[i].accountType); | |||
response.rows[i].bankType = this.selectDictLabel(this.bankTypeOptions, response.rows[i].bankType); | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
console.log(this.applicationList.length >= response.total) | |||
if(this.applicationList.length >= response.total){ | |||
this.finished = true; | |||
return; | |||
@@ -99,12 +107,12 @@ export default { | |||
}, | |||
deleteList(id,index){ | |||
this.$dialog.confirm({ | |||
message: '您确认删除申请草稿?', | |||
message: '您确认删除收款账户?', | |||
}) | |||
.then(() => { | |||
// on confirm | |||
this.applicationList.splice(index,1) | |||
removeList(id).then(res => { | |||
delPayee(id).then(res => { | |||
if(res.code = 200){ | |||
this.$toast.success('删除成功'); | |||
} | |||
@@ -124,6 +132,7 @@ export default { | |||
} | |||
/deep/.van-cell__title{ | |||
flex: 0.7; | |||
width: 70%; | |||
} | |||
/deep/.van-cell__title span{ | |||
font-family: Arial; | |||
@@ -7,53 +7,72 @@ | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">添加支付收款账户</p> | |||
<p style="font-weight: bold;">修改支付收款账户</p> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field label="收款方" placeholder="请输入收款方" input-align="right" label-width="auto"/> | |||
<van-field label="收款账户" placeholder="请输入收款账户" input-align="right" label-width="auto"/> | |||
<van-field label="收款方" v-model="form.payee" placeholder="请输入收款方" input-align="right" label-width="auto"/> | |||
<van-field label="收款账户" v-model="form.payeeAccount" placeholder="请输入收款账户" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="所属银行" | |||
placeholder="请选择" | |||
v-model="sfzjjzw" | |||
@click="showSys = true" | |||
v-model="bankType" | |||
@click="showBankType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
/> | |||
<van-popup v-model="showSys" position="bottom"> | |||
<van-popup v-model="showBankType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="sysDictionaries" | |||
@confirm="onConfirmSys" | |||
@cancel="showSys = false" | |||
:columns="bankTypeOptions" | |||
@confirm="onConfirmBankType" | |||
@cancel="showBankType = false" | |||
/> | |||
</van-popup> | |||
<van-field label="开户银行" placeholder="请输入开户银行" input-align="right" label-width="auto"/> | |||
<van-field label="开户银行" v-model="form.bankDeposit" placeholder="请输入开户银行" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field label="备注" type="textarea" placeholder="请输入备注" input-align="right" rows="3" label-width="auto"/> | |||
<van-field label="备注" v-model="form.remark" type="textarea" placeholder="请输入备注" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-cell title="账户类型"> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal"> | |||
<van-radio-group direction="horizontal" v-model="form.accountType"> | |||
<van-radio name="1">公户</van-radio> | |||
<van-radio name="2">私户</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
<van-field | |||
readonly | |||
clickable | |||
label="收款人类型" | |||
placeholder="请选择" | |||
v-model="payeeType" | |||
@click="showPayeeType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
/> | |||
<van-popup v-model="showPayeeType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="payeeTypeOptions" | |||
@confirm="onConfirmPayeeType" | |||
@cancel="showPayeeType = false" | |||
/> | |||
</van-popup> | |||
<van-cell title="数据状态"> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal"> | |||
<van-radio name="1">正常</van-radio> | |||
<van-radio name="2">停用</van-radio> | |||
<van-radio-group direction="horizontal" v-model="form.status"> | |||
<van-radio name="0">正常</van-radio> | |||
<van-radio name="1">停用</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
@@ -61,7 +80,7 @@ | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" @click="goBack" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
<van-button type="info" native-type="submit" @click="goAdd" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
@@ -70,30 +89,20 @@ | |||
</template> | |||
<script> | |||
import { jgAdd } from "@/api/onlineHome/homestead/reporting"; | |||
import { getPayee , updatePayee } from "@/api/onlineHome/bankAgriculture/collectionAccount"; | |||
export default { | |||
name: "approvalAdd", | |||
name: "collectionModify", | |||
data() { | |||
return { | |||
showSys:false, | |||
showjglx:false, | |||
showlasj:false, | |||
showinspectorTime:false, | |||
showwfydlx:false, | |||
showReformDeadline:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
jgList:{}, | |||
showBankType:false, | |||
showPayeeType:false, | |||
form:{}, | |||
sfzjjzw:'', | |||
jglx:'', | |||
wfydlx:'', | |||
bankType:'', | |||
payeeType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
bankTypeOptions:[], | |||
payeeTypeOptions:[], | |||
}; | |||
}, | |||
@@ -102,58 +111,37 @@ | |||
}, | |||
methods: { | |||
getDictionaries(){ | |||
//违法用地类型 | |||
this.houseGetDicts("villations_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.wfydlxDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
//监管类型 | |||
this.houseGetDicts("jglx").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.jglxDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
//是否在建建筑物 | |||
this.houseGetDicts("sys_yes_no").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.sysDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
getPayee(this.$route.query.id).then((response) => { | |||
this.houseGetDicts("bank_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.bankTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
this.bankType = this.selectDictLabel(res.data, response.data.bankType); | |||
}); | |||
this.houseGetDicts("payee_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.payeeTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
this.payeeType = this.selectDictLabel(res.data, response.data.payeeType); | |||
}); | |||
this.form = response.data; | |||
}); | |||
}, | |||
onConfirmSys(data){ | |||
this.sfzjjzw = data.text; | |||
this.jgList.sfzjjzw = data.value; | |||
this.showSys = false; | |||
}, | |||
onConfirmJglx(data){ | |||
this.jglx = data.text; | |||
this.jgList.jglx = data.value; | |||
this.showjglx = false; | |||
}, | |||
onConfirmWfydlx(data){ | |||
this.wfydlx = data.text; | |||
this.jgList.wfydlx = data.value; | |||
this.showwfydlx = false; | |||
}, | |||
onConfirmLasj(data){ | |||
this.jgList.lasj = this.getNowFormatDate(data).substr(0,10); | |||
this.showlasj = false; | |||
}, | |||
onConfirmInspectorTime(data){ | |||
this.jgList.inspectorTime = this.getNowFormatDate(data).substr(0,10); | |||
this.showinspectorTime = false; | |||
onConfirmBankType(data){ | |||
this.bankType = data.text; | |||
this.form.bankType = data.value; | |||
this.showBankType = false; | |||
}, | |||
onConfirmReformDeadline(data){ | |||
this.jgList.reformDeadline = this.getNowFormatDate(data).substr(0,10); | |||
this.showReformDeadline = false; | |||
onConfirmPayeeType(data){ | |||
this.payeeType = data.text; | |||
this.form.payeeType = data.value; | |||
this.showPayeeType = false; | |||
}, | |||
goAdd(){ | |||
console.log(this.jgList) | |||
jgAdd(this.jgList).then(response => { | |||
console.log(response); | |||
this.$toast.success('保存成功'); | |||
console.log(this.form) | |||
updatePayee(this.form).then(response => { | |||
this.$toast.success('修改成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||