Merge remote-tracking branch 'origin/main'

main
zk 1 year ago
commit ef42ba826b

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

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

Loading…
Cancel
Save