优化代码

This commit is contained in:
wuxw 2024-04-07 13:31:40 +08:00
parent e4eea2e74c
commit feeead2890
5 changed files with 228 additions and 200 deletions

View File

@ -38,11 +38,29 @@
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">
<vc:i18n name='地址、电话' namespace='editOwnerInvoice'></vc:i18n>
<vc:i18n name='地址' namespace='editOwnerInvoice'></vc:i18n>
</label>
<div class="col-sm-10">
<input v-model="editOwnerInvoiceInfo.invoiceAddress" type="text"
:placeholder="vc.i18n('必填,请填写地址、电话','editOwnerInvoice')" class="form-control">
:placeholder="vc.i18n('必填,请填写地址','editOwnerInvoice')" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label ">
<vc:i18n name='电话' namespace='editOwnerInvoice'></vc:i18n>
</label>
<div class="col-sm-10">
<input v-model="editOwnerInvoiceInfo.invoiceLink" type="text"
:placeholder="vc.i18n('必填,请填写电话','editOwnerInvoice')" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label ">
<vc:i18n name='开户行及账号' namespace='editOwnerInvoice'></vc:i18n>
</label>
<div class="col-sm-10">
<input v-model="editOwnerInvoiceInfo.invoiceAccount" type="text"
:placeholder="vc.i18n('必填,请填写开户行及账号','editOwnerInvoice')" class="form-control">
</div>
</div>
<div class="form-group row">

View File

@ -11,7 +11,8 @@
invoiceNum: '',
invoiceAddress: '',
remark: '',
invoiceLink:'',
invoiceAccount:'',
}
},
_initMethod: function () {
@ -144,7 +145,8 @@
invoiceNum: '',
invoiceAddress: '',
remark: '',
invoiceLink:'',
invoiceAccount:'',
}
}
}

View File

@ -1,86 +1,99 @@
<div class="row">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>
<vc:i18n name="添加抬头" namespace="addOweFeeCallable"></vc:i18n>
</h5>
<div class="ibox-tools" style="top:10px;">
<button class="btn btn-white float-right" type="button" v-on:click="vc.goBack()">
<vc:i18n name="返回"></vc:i18n>
<div class="ibox">
<div class="ibox-title">
<h5>
<vc:i18n name="添加抬头" namespace="addOweFeeCallable"></vc:i18n>
</h5>
<div class="ibox-tools" style="top:10px;">
<button class="btn btn-white float-right" type="button" v-on:click="vc.goBack()">
<vc:i18n name="返回"></vc:i18n>
</button>
</div>
</div>
<div class="ibox-content">
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">
<vc:i18n name="业主" namespace="addOwnerInvoice"></vc:i18n>
</label>
<div class="col-sm-6">
<input v-model="addOwnerInvoiceInfo.ownerName" disabled type="text"
:placeholder="vc.i18n('必填,请选择业主','addOwnerInvoice')" class="form-control">
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openChooseOwner()">选择业主
</button>
</div>
</div>
<div class="ibox-content">
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">
<vc:i18n name="业主" namespace="addOwnerInvoice"></vc:i18n>
</label>
<div class="col-sm-6">
<input v-model="addOwnerInvoiceInfo.ownerName" disabled type="text"
:placeholder="vc.i18n('必填,请选择业主','addOwnerInvoice')" class="form-control">
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_openChooseOwner()">选择业主
</button>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">
<vc:i18n name='发票类型' namespace='addOwnerInvoice'></vc:i18n>
</label>
<div class="col-sm-8">
<select class="custom-select" v-model="addOwnerInvoiceInfo.invoiceType">
<option selected disabled value="">{{vc.i18n('必填,请选择发票类型','addOwnerInvoice')}}</option>
<option value="1001">{{vc.i18n('个人','addOwnerInvoice')}}</option>
<option value="2002">{{vc.i18n('企业','addOwnerInvoice')}}</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">
<vc:i18n name='发票名头' namespace='addOwnerInvoice'></vc:i18n>
</label>
<div class="col-sm-8">
<input v-model="addOwnerInvoiceInfo.invoiceName" type="text"
:placeholder="vc.i18n('必填,请填写发票名头','addOwnerInvoice')" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">
<vc:i18n name='纳税人识别号' namespace='addOwnerInvoice'></vc:i18n>
</label>
<div class="col-sm-8">
<input v-model="addOwnerInvoiceInfo.invoiceNum" type="text"
:placeholder="vc.i18n('必填,请填写纳税人识别号','addOwnerInvoice')" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">
<vc:i18n name='地址、电话' namespace='addOwnerInvoice'></vc:i18n>
</label>
<div class="col-sm-8">
<input v-model="addOwnerInvoiceInfo.invoiceAddress" type="text"
:placeholder="vc.i18n('必填,请填写地址、电话','addOwnerInvoice')" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">
<vc:i18n name='备注' namespace='addOwnerInvoice'></vc:i18n>
</label>
<div class="col-sm-8">
<textarea v-model="addOwnerInvoiceInfo.remark" :placeholder="vc.i18n('选填,请填写备注','addOwnerInvoice')"
class="form-control"></textarea>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">
<vc:i18n name='发票类型' namespace='addOwnerInvoice'></vc:i18n>
</label>
<div class="col-sm-8">
<select class="custom-select" v-model="addOwnerInvoiceInfo.invoiceType">
<option selected disabled value="">{{vc.i18n('必填,请选择发票类型','addOwnerInvoice')}}</option>
<option value="1001">{{vc.i18n('个人','addOwnerInvoice')}}</option>
<option value="2002">{{vc.i18n('企业','addOwnerInvoice')}}</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">
<vc:i18n name='发票名头' namespace='addOwnerInvoice'></vc:i18n>
</label>
<div class="col-sm-8">
<input v-model="addOwnerInvoiceInfo.invoiceName" type="text"
:placeholder="vc.i18n('必填,请填写发票名头','addOwnerInvoice')" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">
<vc:i18n name='纳税人识别号' namespace='addOwnerInvoice'></vc:i18n>
</label>
<div class="col-sm-8">
<input v-model="addOwnerInvoiceInfo.invoiceNum" type="text"
:placeholder="vc.i18n('必填,请填写纳税人识别号','addOwnerInvoice')" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">
<vc:i18n name='地址' namespace='addOwnerInvoice'></vc:i18n>
</label>
<div class="col-sm-8">
<input v-model="addOwnerInvoiceInfo.invoiceAddress" type="text"
:placeholder="vc.i18n('必填,请填写地址','addOwnerInvoice')" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">
<vc:i18n name='电话' namespace='addOwnerInvoice'></vc:i18n>
</label>
<div class="col-sm-8">
<input v-model="addOwnerInvoiceInfo.invoiceLink" type="text"
:placeholder="vc.i18n('必填,请填写电话','addOwnerInvoice')" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">
<vc:i18n name='开户行及账号' namespace='addOwnerInvoice'></vc:i18n>
</label>
<div class="col-sm-8">
<input v-model="addOwnerInvoiceInfo.invoiceAccount" type="text"
:placeholder="vc.i18n('必填,请填写开户行及账号','addOwnerInvoice')" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">
<vc:i18n name='备注' namespace='addOwnerInvoice'></vc:i18n>
</label>
<div class="col-sm-8">
<textarea v-model="addOwnerInvoiceInfo.remark" :placeholder="vc.i18n('选填,请填写备注','addOwnerInvoice')"
class="form-control"></textarea>
</div>
</div>
<div class="ibox-content">
<button class="btn btn-primary float-right" type="button" v-on:click="saveOwnerInvoiceInfo()">
<vc:i18n name="保存"></vc:i18n>
</button>
</div>
</div>
<div class="ibox-content">
<button class="btn btn-primary float-right" type="button" v-on:click="saveOwnerInvoiceInfo()">
<vc:i18n name="保存"></vc:i18n>
</button>
</div>
</div>
<vc:create path="property/searchOwner" emitChooseOwner="addOwnerInvoice" emitLoadData="addOwnerInvoice">

View File

@ -10,6 +10,8 @@
invoiceNum: '',
invoiceAddress: '',
remark: '',
invoiceLink:'',
invoiceAccount:'',
}
},

View File

@ -1,130 +1,123 @@
<div>
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5>
<vc:i18n name="查询条件"></vc:i18n>
</h5>
<div class="ibox-tools" style="top:10px;">
<div class="ibox ">
<div class="ibox-title">
<h5>
<vc:i18n name="查询条件"></vc:i18n>
</h5>
<div class="ibox-tools" style="top:10px;">
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请选择业主名称','ownerInvoice')"
v-model="ownerInvoiceInfo.conditions.ownerName" class=" form-control">
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请选择业主名称','ownerInvoice')"
v-model="ownerInvoiceInfo.conditions.ownerName" class=" form-control">
</div>
</div>
<div class="col-sm-4">
<select class="custom-select" v-model="ownerInvoiceInfo.conditions.invoiceType">
<option selected value="">
请选择发票类型
</option>
<option value="1001">个人</option>
<option value="2002">企业</option>
</select>
</div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请选择发票名头','ownerInvoice')"
v-model="ownerInvoiceInfo.conditions.invoiceName" class=" form-control">
</div>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_queryOwnerInvoiceMethod()">
<vc:i18n name="查询"></vc:i18n>
</button>
</div>
<div class="col-sm-4">
<select class="custom-select" v-model="ownerInvoiceInfo.conditions.invoiceType">
<option selected value="">
请选择发票类型
</option>
<option value="1001">个人</option>
<option value="2002">企业</option>
</select>
</div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请选择发票名头','ownerInvoice')"
v-model="ownerInvoiceInfo.conditions.invoiceName" class=" form-control">
</div>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryOwnerInvoiceMethod()">
<vc:i18n name="查询"></vc:i18n>
</button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>
<vc:i18n name="发票抬头" namespace="ownerInvoice"></vc:i18n>
</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddOwnerInvoiceModal()">
<vc:i18n name="添加" namespace="ownerInvoice"></vc:i18n>
</button>
</div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">
<vc:i18n name='编号' namespace='ownerInvoice'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='业主名称' namespace='ownerInvoice'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='发票类型' namespace='ownerInvoice'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='发票名头' namespace='ownerInvoice'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='纳税人识别号' namespace='ownerInvoice'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='地址、电话' namespace='ownerInvoice'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='备注' namespace='ownerInvoice'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='操作'></vc:i18n>
</th>
</tr>
</thead>
<tbody>
<tr v-for="ownerInvoice in ownerInvoiceInfo.ownerInvoices">
<td class="text-center">{{ownerInvoice.oiId}}</td>
<td class="text-center">{{ownerInvoice.ownerName}}</td>
<td class="text-center">{{ownerInvoice.invoiceType == '1001'?'个人':'公司'}}</td>
<td class="text-center">{{ownerInvoice.invoiceName}}</td>
<td class="text-center">{{ownerInvoice.invoiceNum}}</td>
<td class="text-center">{{ownerInvoice.invoiceAddress}}</td>
<td class="text-center">{{ownerInvoice.remark}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openEditOwnerInvoiceModel(ownerInvoice)">
<vc:i18n name='修改'></vc:i18n>
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openDeleteOwnerInvoiceModel(ownerInvoice)">
<vc:i18n name='删除'></vc:i18n>
</button>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
</div>
<div class="ibox">
<div class="ibox-title">
<h5>
<vc:i18n name="发票抬头" namespace="ownerInvoice"></vc:i18n>
</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddOwnerInvoiceModal()">
<vc:i18n name="添加" namespace="ownerInvoice"></vc:i18n>
</button>
</div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">
<vc:i18n name='编号' namespace='ownerInvoice'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='业主名称' namespace='ownerInvoice'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='发票类型' namespace='ownerInvoice'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='发票名头' namespace='ownerInvoice'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='纳税人识别号' namespace='ownerInvoice'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='地址' namespace='ownerInvoice'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='电话' namespace='ownerInvoice'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='开户行及账号' namespace='ownerInvoice'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='备注' namespace='ownerInvoice'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='操作'></vc:i18n>
</th>
</tr>
</thead>
<tbody>
<tr v-for="ownerInvoice in ownerInvoiceInfo.ownerInvoices">
<td class="text-center">{{ownerInvoice.oiId}}</td>
<td class="text-center">{{ownerInvoice.ownerName}}</td>
<td class="text-center">{{ownerInvoice.invoiceType == '1001'?'个人':'公司'}}</td>
<td class="text-center">{{ownerInvoice.invoiceName}}</td>
<td class="text-center">{{ownerInvoice.invoiceNum}}</td>
<td class="text-center">{{ownerInvoice.invoiceAddress}}</td>
<td class="text-center">{{ownerInvoice.invoiceLink}}</td>
<td class="text-center">{{ownerInvoice.invoiceAccount}}</td>
<td class="text-center">{{ownerInvoice.remark}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openEditOwnerInvoiceModel(ownerInvoice)">
<vc:i18n name='修改'></vc:i18n>
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openDeleteOwnerInvoiceModel(ownerInvoice)">
<vc:i18n name='删除'></vc:i18n>
</button>
</div>
</td>
</tr>
</tbody>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
<vc:create path="fee/editOwnerInvoice"></vc:create>