计提工资和计提社保
This commit is contained in:
@ -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"
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -29,6 +29,7 @@ import com.jinbooks.entity.book.BookSubject;
|
||||
import com.jinbooks.entity.book.Settlement;
|
||||
import com.jinbooks.entity.book.SettlementCarryforward;
|
||||
import com.jinbooks.entity.book.vo.SettlementCarryforwardVo;
|
||||
import com.jinbooks.entity.hr.EmployeeSalarySummary;
|
||||
import com.jinbooks.entity.statement.StatementSubjectBalance;
|
||||
import com.jinbooks.entity.voucher.VoucherTemplate;
|
||||
import com.jinbooks.entity.voucher.VoucherTemplateItem;
|
||||
@ -38,6 +39,7 @@ import com.jinbooks.entity.voucher.dto.VoucherItemChangeDto;
|
||||
import com.jinbooks.entity.voucher.dto.VoucherTemplatePageDto;
|
||||
import com.jinbooks.enums.VoucherStatusEnum;
|
||||
import com.jinbooks.persistence.mapper.BookMapper;
|
||||
import com.jinbooks.persistence.mapper.EmployeeSalarySummaryMapper;
|
||||
import com.jinbooks.persistence.mapper.SettlementCarryforwardMapper;
|
||||
import com.jinbooks.persistence.mapper.SettlementMapper;
|
||||
import com.jinbooks.persistence.mapper.VoucherTemplateItemMapper;
|
||||
@ -93,6 +95,9 @@ public class SettlementCarryServiceImpl extends ServiceImpl<SettlementMapper, Se
|
||||
|
||||
@Autowired
|
||||
StatementSubjectBalanceService statementSubjectBalanceService;
|
||||
|
||||
@Autowired
|
||||
EmployeeSalarySummaryMapper employeeSalarySummaryMapper;
|
||||
|
||||
public Message<Page<SettlementCarryforwardVo>> fetchCarry(VoucherTemplatePageDto dto) {
|
||||
dto.setCategory(1);//期末处理模板
|
||||
@ -197,7 +202,23 @@ public class SettlementCarryServiceImpl extends ServiceImpl<SettlementMapper, Se
|
||||
return Message.failed("非年末,无需结转本年利润");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}else if (voucherTemplate.getCode().startsWith("jt_gz")||voucherTemplate.getCode().startsWith("jt_shebao")) {
|
||||
LambdaQueryWrapper<EmployeeSalarySummary> salaryWrapper = new LambdaQueryWrapper<>();
|
||||
salaryWrapper.eq(EmployeeSalarySummary::getBelongDate, currentTerm);
|
||||
salaryWrapper.eq(EmployeeSalarySummary::getBookId, bookId);
|
||||
salaryWrapper.eq(EmployeeSalarySummary::getLabel, "salary");
|
||||
salaryWrapper.eq(EmployeeSalarySummary::getDeleted, "n");
|
||||
EmployeeSalarySummary summary = employeeSalarySummaryMapper.selectOne(salaryWrapper);
|
||||
if (voucherTemplate.getCode().startsWith("jt_gz")){
|
||||
for (VoucherTemplateItem item : items) {
|
||||
voucherItems.add(createVoucherItemDto(bookId, item, summary.getPayAmount()));
|
||||
}
|
||||
}else if (voucherTemplate.getCode().startsWith("jt_shebao")){
|
||||
for (VoucherTemplateItem item : items) {
|
||||
voucherItems.add(createVoucherItemDto(bookId, item, summary.getBusinessSocialInsurance()));
|
||||
}
|
||||
}
|
||||
}else {
|
||||
for (VoucherTemplateItem item : items) {
|
||||
voucherItems.add(createVoucherItemDto(bookId, item, BigDecimal.ZERO));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user