会计凭证页面修改;人员选择框修改

main
mo 1 year ago
parent 60741d8f92
commit e3bee12dcb

@ -11,10 +11,11 @@ export function listUser(query) {
}
// 获取用户精简信息列表
export function listSimpleUsers() {
export function listSimpleUsers(query) {
return request({
url: '/system/user/list-all-simple',
method: 'get'
method: 'get',
params: query
})
}

@ -224,7 +224,7 @@
>
<el-row>
<el-col :span="8">
<el-form-item label="业务实体名称" prop="company">
<el-form-item label="业务实体" prop="company">
<el-select
v-model="form.company"
placeholder="请选择业务实体"
@ -242,6 +242,11 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="凭证号" prop="voucherNum">
<el-input v-model="form.voucherNum" placeholder="请输入凭证号" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="凭证类型" prop="type">
<el-select v-model="form.type" placeholder="请选择凭证类型">
@ -256,89 +261,106 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="审核人" prop="audit">
<el-input
<el-select
v-model="form.audit"
placeholder="请选择审核人"
readonly
clearable
filterable
remote
:remote-method="getUserDatas"
:loading="loading"
placeholder="请选择或输入审核人"
class="formItemFullWidth"
>
<el-button
slot="append"
@click="handleSelectUser1"
icon="el-icon-search"
style="
border-color: #46a6ff;
background-color: #46a6ff;
color: white;
"
></el-button>
</el-input>
<el-option
v-for="item in userOptions"
:key="item.id"
:label="item.nickname"
:value="item.nickname"
>
</el-option>
</el-select>
<el-button
@click="handleSelectUser1"
icon="el-icon-search"
style="
border-color: #46a6ff;
background-color: #46a6ff;
color: white;
"
>
</el-button>
<UserSelect ref="UserSelect1" @onSelected="onUserSelected1" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="核准人" prop="checker">
<el-input
<el-select
v-model="form.checker"
placeholder="请选择审核人"
readonly
clearable
filterable
remote
:remote-method="getUserDatas"
:loading="loading"
placeholder="请选择或输入核准人"
class="formItemFullWidth"
>
<el-button
slot="append"
@click="handleSelectUser2"
icon="el-icon-search"
style="
border-color: #46a6ff;
background-color: #46a6ff;
color: white;
"
></el-button>
</el-input>
<el-option
v-for="item in userOptions"
:key="item.id"
:label="item.nickname"
:value="item.nickname"
>
</el-option>
</el-select>
<el-button
@click="handleSelectUser2"
icon="el-icon-search"
style="
border-color: #46a6ff;
background-color: #46a6ff;
color: white;
"
></el-button>
<UserSelect ref="UserSelect2" @onSelected="onUserSelected2" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="经办人" prop="handle">
<el-input
<el-select
v-model="form.handle"
placeholder="请选择审核人"
readonly
clearable
filterable
remote
:remote-method="getUserDatas"
:loading="loading"
placeholder="请选择或输入经办人"
class="formItemFullWidth"
>
<el-button
slot="append"
@click="handleSelectUser3"
icon="el-icon-search"
style="
border-color: #46a6ff;
background-color: #46a6ff;
color: white;
"
></el-button>
</el-input>
<el-option
v-for="item in userOptions"
:key="item.id"
:label="item.nickname"
:value="item.nickname"
>
</el-option>
</el-select>
<el-button
@click="handleSelectUser3"
icon="el-icon-search"
style="
border-color: #46a6ff;
background-color: #46a6ff;
color: white;
"
></el-button>
<UserSelect ref="UserSelect3" @onSelected="onUserSelected3"
/></el-form-item>
</el-col>
</el-row>
</el-form>
<!-- 记账凭证 -->
<el-divider v-if="optType != 'add'"></el-divider>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="100px"
:disabled="this.title === '查看会计凭证'"
>
<el-row>
<el-col :span="8">
<el-form-item label="凭证号" prop="voucherNum">
<el-input v-model="form.voucherNum" placeholder="请输入凭证号" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="凭证日期" prop="voucherTime">
<el-date-picker
@ -350,20 +372,6 @@
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="纸档位置" prop="site">
<el-cascader
v-model="siteArray"
:options="siteOptions"
:props="propName"
placeholder="请选择纸档位置"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="会计年度" prop="year">
<el-date-picker
@ -376,9 +384,6 @@
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="会计期间" prop="period">
<el-date-picker
@ -392,12 +397,28 @@
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="摘要" prop="digest">
<el-input v-model="form.digest" placeholder="请输入摘要" />
<el-form-item label="纸档位置" prop="site">
<el-cascader
v-model="siteArray"
:options="siteOptions"
:props="propName"
placeholder="请选择纸档位置"
clearable
/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="摘要" prop="digest">
<el-input
v-model="form.digest"
type="textarea"
placeholder="请输入摘要"
/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input
v-model="form.remark"
@ -406,6 +427,9 @@
/>
</el-form-item>
</el-form>
<!-- 记账凭证 -->
<el-divider v-if="optType != 'add'"></el-divider>
<el-table :data="tableData" style="width: 100%" v-if="optType != 'add'">
<el-table-column prop="digest" label="摘要" width="180" />
<el-table-column prop="subjectCode" label="科目代码" width="180" />
@ -1321,6 +1345,7 @@ import { getInvoicesPage, getInvoices } from "@/api/accounting/invoices";
import { getBankSlipPage, getBankSlip } from "@/api/accounting/bankSlip";
import UserSelect from "@/components/UserSelect/single.vue";
import { getOrganizationPage } from "@/api/setting/organization";
import { listSimpleUsers } from "@/api/system/user";
export default {
name: "Voucher",
@ -1411,9 +1436,21 @@ export default {
inputPassword: [
{ required: true, message: "密码不能为空", trigger: "blur" },
],
company: [
{ required: true, message: "业务实体不能为空", trigger: "blur" },
],
voucherNum: [
{ required: true, message: "凭证号不能为空", trigger: "blur" },
],
type: [
{ required: true, message: "凭证类型不能为空", trigger: "blur" },
],
year: [
{ required: true, message: "会计年度不能为空", trigger: "blur" },
],
period: [
{ required: true, message: "会计期间不能为空", trigger: "blur" },
],
},
siteOptions: [], //
siteArray: [], //
@ -1423,6 +1460,7 @@ export default {
invoiceStateOptions: [], //
inOrOutOptions: [], //
invoicesDuplicateOptions: [], //
userOptions: [], //
};
},
created() {
@ -1430,6 +1468,7 @@ export default {
this.getSiteList();
this.handleInitList();
this.getOrganizationList();
this.getUserDatas();
},
methods: {
/** 查询列表 */
@ -1448,6 +1487,16 @@ export default {
this.tableData = response.data.list;
});
},
/* 获取人员选项列表 */
getUserDatas(key) {
this.loading = true;
listSimpleUsers({
nickname: key || "", //
}).then((res) => {
this.loading = false;
this.userOptions = res.data;
});
},
/**
* 文件预览
* @param fileUrl

Loading…
Cancel
Save