计提工资和计提社保

This commit is contained in:
jinbooks_dev
2025-06-16 11:47:33 +08:00
parent bc11aaac99
commit aab71f480d
4 changed files with 34 additions and 34 deletions

View File

@ -187,30 +187,6 @@
<b>{{ formatAmount(scope.row.businessExpenditureCosts) }}</b>
</template>
</el-table-column>
<el-table-column prop="accrualVoucherId" label="计提/收票凭证" align="center" fixed="right" width="90">
<template #default="scope">
<el-button v-if="(scope.row.accrualVoucherId === null ||scope.row.accrualVoucherId ==='') && scope.row.label === 'salary'" type="text"
@click="generateVoucher(scope.row,0)">
生成
</el-button>
<el-button v-if="scope.row.accrualVoucherId !== null &&scope.row.accrualVoucherId !=='' && scope.row.label === 'salary'" type="text"
@click="viewVoucher(scope.row.accrualVoucherId)">
查看
</el-button>
</template>
</el-table-column>
<el-table-column prop="salaryVoucherId" label="发放凭证" align="center" fixed="right" width="90">
<template #default="scope">
<el-button v-if="(scope.row.salaryVoucherId === null ||scope.row.salaryVoucherId ==='') && scope.row.label === 'salary'" type="text"
@click="generateVoucher(scope.row,1)">
生成
</el-button>
<el-button v-if="scope.row.salaryVoucherId !== null &&scope.row.salaryVoucherId !=='' && scope.row.label === 'salary'" type="text"
@click="viewVoucher(scope.row.salaryVoucherId)">
查看
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"

View File

@ -40,7 +40,7 @@
</el-button>
</template>
</el-table-column>
<el-table-column label="操作" align="center" header-align="center" width="160" prop="sortIndex">
<el-table-column label="模板" align="center" header-align="center" width="160" prop="sortIndex">
<template #default="scope">
<el-tooltip content="新增/编辑">
<el-button type="primary" link @click="handleAdd(scope.row)" icon="Plus"></el-button>
@ -62,7 +62,7 @@
<el-dialog v-model="dialog.visible" :close-on-click-modal="false" width="800"
style="margin-top: 30vh !important;">
<template #default>
<el-form :model="form" :rules="rules" ref="voucherTemplateRef" label-width="68px"
<el-form :model="form" :items="items" ref="voucherTemplateRef" label-width="68px"
inline-message>
<el-form-item label="ID" prop="id" style="display:none">
<el-input style="width: 300px" v-model="form.id" placeholder="请输入id"/>
@ -157,7 +157,7 @@
</template>
</el-table-column>
</el-table>
<el-button icon="Plus" style="width: 100%" @click="form.items.push({})"></el-button>
<el-button icon="Plus" style="width: 100%" @click="form.items.push({direction:1})"></el-button>
</el-form>
</template>
<template #footer>
@ -249,7 +249,7 @@ const data = reactive({
bookId: currBookStore.bookId
},
voucherForm: {},
rules: {
items: {
itemCode: [
{required: true, message: '编码不能为空', trigger: 'blur'}
],
@ -259,7 +259,7 @@ const data = reactive({
}
});
const {queryParams, form, rules, voucherForm} = toRefs(data);
const {queryParams, form, items, voucherForm} = toRefs(data);
/** 查询列表 */
function getList() {
@ -373,8 +373,10 @@ const submitForm = () => {
voucherTemplateRef.value?.validate(async (valid: boolean) => {
if (valid) {
form.value.items = form.value.items.filter((item: any) => {
console.log("subjectCode "+item.subjectCode+ " summary " + item.summary +" direction "+ item.direction);
return item.subjectCode && item.summary && item.direction
})
form.value.relatedId = form.value.relatedId || queryParams.value.bookId;
buttonLoading.value = true;

View File

@ -52,7 +52,7 @@
<el-dialog v-model="dialog.visible" :close-on-click-modal="false" width="800" style="margin-top: 30vh !important;">
<template #default>
<el-form :model="form" :rules="rules" ref="voucherTemplateRef" label-width="68px"
<el-form :model="form" :items="items" ref="voucherTemplateRef" label-width="68px"
inline-message>
<el-form-item label="ID" prop="id" style="display:none">
<el-input style="width: 300px" v-model="form.id" placeholder="请输入id"/>
@ -145,7 +145,7 @@
</template>
</el-table-column>
</el-table>
<el-button icon="Plus" style="width: 100%" @click="form.items.push({})" ></el-button>
<el-button icon="Plus" style="width: 100%" @click="form.items.push({direction:1})" ></el-button>
</el-form>
</template>
<template #footer>
@ -210,7 +210,7 @@ const data = reactive({
reportQuarter: getCurrentQuarter(),
reportDate: parseTime(new Date(), "{y}-{m}"),
},
rules: {
items: {
itemCode: [
{required: true, message: '编码不能为空', trigger: 'blur'}
],
@ -220,7 +220,7 @@ const data = reactive({
}
});
const {queryParams, form, rules} = toRefs(data);
const {queryParams, form, items} = toRefs(data);
const customPrefix = shallowRef({
render() {
@ -345,6 +345,7 @@ const submitForm = () => {
voucherTemplateRef.value?.validate(async (valid: boolean) => {
if (valid) {
form.value.items = form.value.items.filter((item: any) => {
console.log("subjectCode "+item.subjectCode+ " summary " + item.summary +" direction "+ item.direction);
return item.subjectCode && item.summary && item.direction
})
form.value.relatedId =form.value.relatedId||queryParams.value.standardId;