| @@ -0,0 +1,53 @@ | |||
| import request from '@/utils/request' | |||
| //查询列表 | |||
| export function getList(data){ | |||
| return request({ | |||
| url:'/cashier/account/list', | |||
| method:'get', | |||
| params:data | |||
| }) | |||
| } | |||
| // 查询出纳账户设置详细 | |||
| export function getAccount(id) { | |||
| return request({ | |||
| url: '/cashier/account/get/' + id, | |||
| method: 'get' | |||
| }) | |||
| } | |||
| //科目编码明细 | |||
| export function getSubjectDetail() { | |||
| return request({ | |||
| url: '/finance/subject/list101And102', | |||
| method: 'get', | |||
| // data: data | |||
| }) | |||
| } | |||
| // 修改出纳账户设置 | |||
| export function updateAccount(data) { | |||
| return request({ | |||
| url: '/cashier/account/edit', | |||
| method: 'post', | |||
| data: data | |||
| }) | |||
| } | |||
| // 新增出纳账户设置 | |||
| export function addAccount(data) { | |||
| return request({ | |||
| url: '/cashier/account/add', | |||
| method: 'post', | |||
| data: data | |||
| }) | |||
| } | |||
| // 删除出纳账户设置 | |||
| export function delAccount(id) { | |||
| return request({ | |||
| url: '/cashier/account/remove/' + id, | |||
| method: 'get' | |||
| }) | |||
| } | |||
| @@ -1049,6 +1049,24 @@ export const constantRoutes = [ | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountAdd'], resolve) | |||
| }, | |||
| { | |||
| path: '/paymentAccountModify', | |||
| name: 'paymentAccountModify', | |||
| meta: { | |||
| title: '修改出纳账户设置', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountModify'], resolve) | |||
| }, | |||
| { | |||
| path: '/paymentAccountDetail', | |||
| name: 'paymentAccountDetail', | |||
| meta: { | |||
| title: '付款账户详情', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountDetail'], resolve) | |||
| } | |||
| ]; | |||
| @@ -12,40 +12,58 @@ | |||
| </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="accountType" | |||
| @click="showAccountType = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| /> | |||
| <van-popup v-model="showAccountType" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="typeDictionaries" | |||
| @confirm="onConfirmType" | |||
| @cancel="showAccountType = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field label="账户名称" v-model="form.accountName" placeholder="请输入账户名称" input-align="right" label-width="auto"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="关联科目" | |||
| placeholder="请选择" | |||
| v-model="sfzjjzw" | |||
| @click="showSys = true" | |||
| v-model="subjectDeatil" | |||
| @click="showSubjectId = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| /> | |||
| <van-popup v-model="showSys" position="bottom"> | |||
| <van-popup v-model="showSubjectId" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="sysDictionaries" | |||
| @confirm="onConfirmSys" | |||
| @cancel="showSys = false" | |||
| :columns="subjectDictionaries" | |||
| @confirm="onConfirmSubject" | |||
| @cancel="showSubjectId = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field label="银行账户" placeholder="请输入银行账户" input-align="right" label-width="auto"/> | |||
| <van-field label="开户银行" placeholder="请输入开户银行" input-align="right" label-width="auto"/> | |||
| <van-field label="联行号" placeholder="请输入联行号" input-align="right" label-width="auto"/> | |||
| <van-field label="操作员代码" placeholder="请输入操作员代码" input-align="right" label-width="auto"/> | |||
| <van-field label="企业编码" placeholder="请输入企业编码" input-align="right" label-width="auto"/> | |||
| <van-field label="开户银行地址" placeholder="请输入开户银行地址" input-align="right" label-width="auto"/> | |||
| <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.bankAccountNumber" placeholder="请输入银行账户" input-align="right" label-width="auto"/> | |||
| <van-field label="开户银行" v-model="form.bankName" placeholder="请输入开户银行" input-align="right" label-width="auto"/> | |||
| <van-field label="联行号" v-model="form.paymentLines" placeholder="请输入联行号" input-align="right" label-width="auto"/> | |||
| <van-field label="操作员代码" v-model="form.operatorCode" placeholder="请输入操作员代码" input-align="right" label-width="auto"/> | |||
| <van-field label="企业编码" v-model="form.enterpriseCode" placeholder="请输入企业编码" input-align="right" label-width="auto"/> | |||
| <van-field label="开户银行地址" v-model="form.site" placeholder="请输入开户银行地址" input-align="right" label-width="auto"/> | |||
| <van-field label="账户密码" v-model="form.accountPassword" placeholder="请输入账户密码" input-align="right" label-width="auto"/> | |||
| <van-field label="初始余额" v-model="form.initialBalance" placeholder="请输入初始余额" 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 direction="horizontal" v-model="form.status"> | |||
| <van-radio name="Y">是</van-radio> | |||
| <van-radio name="N">否</van-radio> | |||
| </van-radio-group> | |||
| </template> | |||
| </van-cell> | |||
| @@ -53,7 +71,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="goModify" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
| </van-col> | |||
| </van-row> | |||
| <div class="clear"></div> | |||
| @@ -62,90 +80,75 @@ | |||
| </template> | |||
| <script> | |||
| import { jgAdd } from "@/api/onlineHome/homestead/reporting"; | |||
| import { getSubjectDetail , addAccount } from "@/api/onlineHome/bankAgriculture/paymentAccount"; | |||
| export default { | |||
| name: "paymentAccountAdd", | |||
| data() { | |||
| return { | |||
| showSys:false, | |||
| showjglx:false, | |||
| showlasj:false, | |||
| showinspectorTime:false, | |||
| showwfydlx:false, | |||
| showReformDeadline:false, | |||
| showAccountType:false, | |||
| showSubjectId:false, | |||
| minDate: new Date(), | |||
| maxDate: new Date(2025, 10, 1), | |||
| currentDate: new Date(), | |||
| jgList:{}, | |||
| sfzjjzw:'', | |||
| accountType:'', | |||
| jglx:'', | |||
| wfydlx:'', | |||
| wfydlxDictionaries:[], | |||
| jglxDictionaries:[], | |||
| sysDictionaries:[], | |||
| subjectDictionaries:[], | |||
| typeDictionaries:[], | |||
| subjectDeatil:[], | |||
| form:{} | |||
| }; | |||
| }, | |||
| created() { | |||
| this.getDictionaries(); | |||
| this.getDetail(); | |||
| }, | |||
| 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}); | |||
| } | |||
| }); | |||
| }, | |||
| 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; | |||
| getDetail(){ | |||
| // 账户类型 | |||
| this.houseGetDicts("account_type_cashier").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.typeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| }); | |||
| getSubjectDetail().then((res) => { | |||
| for (var i = 0; i < res.rows.length; i++) { | |||
| this.subjectDictionaries.push({text: res.rows[i].subjectNameAll, value: res.rows[i].subjectId}); | |||
| } | |||
| }); | |||
| }, | |||
| 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; | |||
| selectSubject(datas, value) { | |||
| var actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].subjectId == ('' + value)) { | |||
| actions.push(datas[key].subjectNameAll); | |||
| return true; | |||
| } | |||
| }) | |||
| return actions.join(''); | |||
| }, | |||
| onConfirmInspectorTime(data){ | |||
| this.jgList.inspectorTime = this.getNowFormatDate(data).substr(0,10); | |||
| this.showinspectorTime = false; | |||
| onConfirmSubject(data){ | |||
| this.subjectDeatil = data.text; | |||
| this.form.subjectId = data.value; | |||
| this.form.subjectNameAll = data.text; | |||
| this.showSubjectId = false; | |||
| }, | |||
| onConfirmReformDeadline(data){ | |||
| this.jgList.reformDeadline = this.getNowFormatDate(data).substr(0,10); | |||
| this.showReformDeadline = false; | |||
| onConfirmType(data){ | |||
| this.accountType = data.text; | |||
| this.form.accountType = data.value; | |||
| this.showAccountType = false; | |||
| }, | |||
| goAdd(){ | |||
| console.log(this.jgList) | |||
| jgAdd(this.jgList).then(response => { | |||
| console.log(response); | |||
| this.$toast.success('保存成功'); | |||
| goModify(){ | |||
| console.log(this.form) | |||
| this.form.balance = this.form.initialBalance; | |||
| addAccount(this.form).then((response) => { | |||
| this.$toast.success('添加成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| @@ -0,0 +1,129 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <van-nav-bar | |||
| left-arrow | |||
| fixed | |||
| placeholder | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">出纳账户查看</p> | |||
| </template> | |||
| </van-nav-bar> | |||
| <p class="main_title">基础信息</p> | |||
| <div class="main_box" v-if="form"> | |||
| <van-field readonly label="账户类型" v-model="accountType" input-align="right" label-width="auto" /> | |||
| <van-field readonly label="账户名称" v-model="form.accountName" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="关联科目" v-model="subjectValue" input-align="right" label-width="auto" /> | |||
| <van-field readonly label="银行账户" v-model="form.bankAccountNumber" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="开户银行" v-model="form.bankName" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="联行号" v-model="form.paymentLines" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="操作员代码" v-model="form.operatorCode" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="企业编码" v-model="form.enterpriseCode" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="开户银行地址" v-model="form.site" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="账户密码" v-model="form.accountPassword" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="初始余额" v-model="form.initialBalance" input-align="right" label-width="auto"/> | |||
| <van-cell title="是否停用"> | |||
| <template #right-icon> | |||
| {{form.status == 'Y' ? '是':'否'}} | |||
| </template> | |||
| </van-cell> | |||
| </div> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { getAccount , getSubjectDetail } from "@/api/onlineHome/bankAgriculture/paymentAccount"; | |||
| export default { | |||
| name: "paymentAccountDetail", | |||
| data() { | |||
| return { | |||
| showAccountType:false, | |||
| showSubjectId:false, | |||
| minDate: new Date(), | |||
| maxDate: new Date(2025, 10, 1), | |||
| currentDate: new Date(), | |||
| jgList:{}, | |||
| accountType:'', | |||
| subjectValue:'', | |||
| wfydlx:'', | |||
| wfydlxDictionaries:[], | |||
| jglxDictionaries:[], | |||
| subjectDictionaries:[], | |||
| typeDictionaries:[], | |||
| subjectDeatil:[], | |||
| form:{} | |||
| }; | |||
| }, | |||
| created() { | |||
| this.getDetail(); | |||
| }, | |||
| methods: { | |||
| getDetail(){ | |||
| getAccount(this.$route.query.id).then((response) => { | |||
| // 账户类型 | |||
| this.houseGetDicts("account_type_cashier").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.typeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| this.accountType = this.selectDictLabel(res.data, response.data.accountType); | |||
| }); | |||
| getSubjectDetail().then((res) => { | |||
| for (var i = 0; i < res.rows.length; i++) { | |||
| this.subjectDictionaries.push({text: res.rows[i].subjectNameAll, value: res.rows[i].subjectId}); | |||
| } | |||
| this.subjectValue = this.selectSubject(res.rows , response.data.subjectId); | |||
| }); | |||
| this.form = response.data; | |||
| }); | |||
| }, | |||
| selectSubject(datas, value) { | |||
| var actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].subjectId == ('' + value)) { | |||
| actions.push(datas[key].subjectNameAll); | |||
| return true; | |||
| } | |||
| }) | |||
| return actions.join(''); | |||
| }, | |||
| }, | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| .app-container { | |||
| padding: 2% 0; | |||
| } | |||
| .main_title{ | |||
| font-size: 0.4rem; | |||
| color: #1D6FE9; | |||
| margin: 0.2rem 6%; | |||
| margin-top: 0; | |||
| position: relative; | |||
| } | |||
| .main_box{ | |||
| width: 96%; | |||
| margin: 0 auto; | |||
| border-radius: 6px; | |||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
| overflow: hidden; | |||
| background-color: #FFF; | |||
| } | |||
| .submitButton{ | |||
| width: 80%; | |||
| margin: 0 auto; | |||
| background-color: #1D6FE9; | |||
| } | |||
| .addFamily{ | |||
| position: absolute; | |||
| top: -2px; | |||
| right: 0; | |||
| border-radius: 50%; | |||
| } | |||
| </style> | |||
| @@ -22,22 +22,26 @@ | |||
| @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 :title="item.accountType" center :to="{name:'paymentAccountDetail', query: {id:item.id,type:'modify'}}"> | |||
| <template #icon> | |||
| <van-icon name="../../../static/images/icon/icon_yl.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||
| </template> | |||
| <template #label> | |||
| <p><span><i>¥</i>3056.00</span></p> | |||
| <p><span><i>¥</i>{{item.balance}}</span></p> | |||
| </template> | |||
| <template #default> | |||
| <p>3215 4658 7894 156</p> | |||
| <p style="font-size: 12px;font-weight: normal;color: #878787;">中国银行<i style="margin-right: 1rem;"></i><span style="color: #1D6FE9">否 停用</span></p> | |||
| <p>{{item.bankAccountNumber}}</p> | |||
| <p style="font-size: 12px;font-weight: normal;color: #878787;"> | |||
| {{item.accountName}} | |||
| <i style="margin-right: 1rem;"></i> | |||
| <span :style="{color: item.status == '否' ? '#1D6FE9' : '#FF4646'}">{{item.status == '否' ? '未' : '已'}}停用</span> | |||
| </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:'paymentAccountModify', 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,26 +54,42 @@ | |||
| </template> | |||
| <script> | |||
| import { getList , removeList } from "@/api/onlineHome/homestead/application"; | |||
| import { getList , delAccount } from "@/api/onlineHome/bankAgriculture/paymentAccount"; | |||
| export default { | |||
| name: "approvalList", | |||
| name: "paymentAccountList", | |||
| data() { | |||
| return { | |||
| applicationList:[], | |||
| houseApplyStatus:[], | |||
| // 账户类型 字典字典 | |||
| accountTypeOptions: [], | |||
| // 是否停用 字典 sys_yes_no字典 | |||
| statusOptions: [], | |||
| // 查询类型字典 | |||
| selectTypeOptions: [], | |||
| // 来往账标识字典 | |||
| directionOptions: [], | |||
| loading: false, | |||
| finished: false, | |||
| queryParams:{ | |||
| pageNum:1, | |||
| pageSize:10, | |||
| orderByColumn:'createTime', | |||
| isAsc:'desc' | |||
| } | |||
| pageNum: 1, | |||
| pageSize: 10, | |||
| }, | |||
| statusColor:'#1D6FE9' | |||
| }; | |||
| }, | |||
| created() { | |||
| this.houseGetDicts("house_apply_status").then((response) => { | |||
| this.houseApplyStatus = response.data; | |||
| this.getDicts("account_type_cashier").then((response) => { | |||
| this.accountTypeOptions = response.data; | |||
| }); | |||
| this.getDicts("sys_yes_no").then((response) => { | |||
| this.statusOptions = response.data; | |||
| }); | |||
| this.getDicts("select_type").then((response) => { | |||
| this.selectTypeOptions = response.data; | |||
| }); | |||
| this.getDicts("direction").then(response => { | |||
| this.directionOptions = response.data; | |||
| }); | |||
| }, | |||
| methods: { | |||
| @@ -79,9 +99,10 @@ export default { | |||
| getList(){ | |||
| setTimeout(() => { | |||
| getList(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].status = this.selectDictLabel(this.statusOptions, response.rows[i].status); | |||
| this.applicationList.push(response.rows[i]); | |||
| } | |||
| if(this.applicationList.length >= response.total){ | |||
| @@ -96,12 +117,12 @@ export default { | |||
| }, | |||
| deleteList(id,index){ | |||
| this.$dialog.confirm({ | |||
| message: '您确认删除申请草稿?', | |||
| message: '您确认删除账户信息?', | |||
| }) | |||
| .then(() => { | |||
| // on confirm | |||
| this.applicationList.splice(index,1) | |||
| removeList(id).then(res => { | |||
| delAccount(id).then(res => { | |||
| if(res.code = 200){ | |||
| this.$toast.success('删除成功'); | |||
| } | |||
| @@ -0,0 +1,200 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <van-nav-bar | |||
| left-arrow | |||
| fixed | |||
| placeholder | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">添加出纳账户设置</p> | |||
| </template> | |||
| </van-nav-bar> | |||
| <p class="main_title">基础信息</p> | |||
| <div class="main_box"> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="账户类型" | |||
| placeholder="请选择" | |||
| v-model="accountType" | |||
| @click="showAccountType = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| /> | |||
| <van-popup v-model="showAccountType" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="typeDictionaries" | |||
| @confirm="onConfirmType" | |||
| @cancel="showAccountType = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field label="账户名称" v-model="form.accountName" placeholder="请输入账户名称" input-align="right" label-width="auto"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="关联科目" | |||
| placeholder="请选择" | |||
| v-model="subjectDeatil" | |||
| @click="showSubjectId = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| /> | |||
| <van-popup v-model="showSubjectId" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="subjectDictionaries" | |||
| @confirm="onConfirmSubject" | |||
| @cancel="showSubjectId = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field label="银行账户" v-model="form.bankAccountNumber" placeholder="请输入银行账户" input-align="right" label-width="auto"/> | |||
| <van-field label="开户银行" v-model="form.bankName" placeholder="请输入开户银行" input-align="right" label-width="auto"/> | |||
| <van-field label="联行号" v-model="form.paymentLines" placeholder="请输入联行号" input-align="right" label-width="auto"/> | |||
| <van-field label="操作员代码" v-model="form.operatorCode" placeholder="请输入操作员代码" input-align="right" label-width="auto"/> | |||
| <van-field label="企业编码" v-model="form.enterpriseCode" placeholder="请输入企业编码" input-align="right" label-width="auto"/> | |||
| <van-field label="开户银行地址" v-model="form.site" placeholder="请输入开户银行地址" input-align="right" label-width="auto"/> | |||
| <van-field label="账户密码" v-model="form.accountPassword" placeholder="请输入账户密码" input-align="right" label-width="auto"/> | |||
| <van-field label="初始余额" v-model="form.initialBalance" placeholder="请输入初始余额" input-align="right" label-width="auto"/> | |||
| <van-cell title="是否停用"> | |||
| <template #right-icon> | |||
| <van-radio-group direction="horizontal" v-model="form.status"> | |||
| <van-radio name="Y">是</van-radio> | |||
| <van-radio name="N">否</van-radio> | |||
| </van-radio-group> | |||
| </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="goModify" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
| </van-col> | |||
| </van-row> | |||
| <div class="clear"></div> | |||
| </div> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { getAccount , getSubjectDetail , updateAccount } from "@/api/onlineHome/bankAgriculture/paymentAccount"; | |||
| export default { | |||
| name: "paymentAccountModify", | |||
| data() { | |||
| return { | |||
| showAccountType:false, | |||
| showSubjectId:false, | |||
| minDate: new Date(), | |||
| maxDate: new Date(2025, 10, 1), | |||
| currentDate: new Date(), | |||
| jgList:{}, | |||
| accountType:'', | |||
| jglx:'', | |||
| wfydlx:'', | |||
| wfydlxDictionaries:[], | |||
| jglxDictionaries:[], | |||
| subjectDictionaries:[], | |||
| typeDictionaries:[], | |||
| subjectDeatil:'', | |||
| form:{} | |||
| }; | |||
| }, | |||
| created() { | |||
| this.getDetail(); | |||
| }, | |||
| methods: { | |||
| getDetail(){ | |||
| getAccount(this.$route.query.id).then((response) => { | |||
| // 账户类型 | |||
| this.houseGetDicts("account_type_cashier").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.typeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| this.accountType = this.selectDictLabel(res.data, response.data.accountType); | |||
| }); | |||
| getSubjectDetail().then((res) => { | |||
| for (var i = 0; i < res.rows.length; i++) { | |||
| this.subjectDictionaries.push({text: res.rows[i].subjectNameAll, value: res.rows[i].subjectId}); | |||
| } | |||
| this.subjectDeatil = this.selectSubject(res.rows , response.data.subjectId); | |||
| }); | |||
| this.form = response.data; | |||
| }); | |||
| }, | |||
| selectSubject(datas, value) { | |||
| var actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].subjectId == ('' + value)) { | |||
| actions.push(datas[key].subjectNameAll); | |||
| return true; | |||
| } | |||
| }) | |||
| return actions.join(''); | |||
| }, | |||
| onConfirmSubject(data){ | |||
| this.subjectDeatil = data.text; | |||
| this.form.subjectId = data.value; | |||
| this.form.subjectNameAll = data.text; | |||
| this.showSubjectId = false; | |||
| }, | |||
| onConfirmType(data){ | |||
| this.accountType = data.text; | |||
| this.form.accountType = data.value; | |||
| this.showAccountType = false; | |||
| }, | |||
| goModify(){ | |||
| console.log(this.form) | |||
| this.form.balance = this.form.initialBalance; | |||
| updateAccount(this.form).then((response) => { | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }); | |||
| }, | |||
| goBack(){ | |||
| window.history.go(-1) | |||
| } | |||
| }, | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| .app-container { | |||
| padding: 2% 0; | |||
| } | |||
| .main_title{ | |||
| font-size: 0.4rem; | |||
| color: #1D6FE9; | |||
| margin: 0.2rem 6%; | |||
| margin-top: 0; | |||
| position: relative; | |||
| } | |||
| .main_box{ | |||
| width: 96%; | |||
| margin: 0 auto; | |||
| border-radius: 6px; | |||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
| overflow: hidden; | |||
| background-color: #FFF; | |||
| } | |||
| .submitButton{ | |||
| width: 80%; | |||
| margin: 0 auto; | |||
| background-color: #1D6FE9; | |||
| } | |||
| .addFamily{ | |||
| position: absolute; | |||
| top: -2px; | |||
| right: 0; | |||
| border-radius: 50%; | |||
| } | |||
| </style> | |||