增加判断是否已经支付预付伙食费(未完)

This commit is contained in:
czx 2020-12-01 16:55:57 +08:00
parent 43b05b9781
commit e2ad86e682
6 changed files with 57 additions and 2 deletions

View File

@ -33,6 +33,13 @@ public class FtPrepaymentDaoController extends BaseController {
private final IFtPrepaymentDaoService iFtPrepaymentDaoService;
@GetMapping("/getCountById/{patientId}")
public AjaxResult getCountById(@PathVariable("patientId") Long patiendId) {
return AjaxResult.success(iFtPrepaymentDaoService.getCountById(patiendId));
}
// 查询所有待缴费列表
@PreAuthorize("@ss.hasPermi('fantang:prepayment:list')")
@GetMapping("/listNoPrepay")

View File

@ -18,4 +18,6 @@ public interface IFtPrepaymentDaoService extends IService<FtPrepaymentVo> {
List<com.ruoyi.system.fantang.vo.FtPrepaymentVo> listPrepay();
List<com.ruoyi.system.fantang.vo.FtPrepaymentVo> listAllPrepay();
int getCountById(Long patiendId);
}

View File

@ -1,5 +1,6 @@
package com.ruoyi.system.fantang.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.fantang.domain.FtPrepaymentVo;
import com.ruoyi.system.fantang.mapper.FtPrepaymentDaoMapper;
@ -31,4 +32,12 @@ public class FtPrepaymentDaoServiceImpl extends ServiceImpl<FtPrepaymentDaoMappe
public List<com.ruoyi.system.fantang.vo.FtPrepaymentVo> listAllPrepay() {
return this.baseMapper.listAllPrepay();
}
@Override
public int getCountById(Long patiendId) {
QueryWrapper<FtPrepaymentVo> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("patiendId",patiendId);
return this.baseMapper.selectCount(queryWrapper);
}
}

View File

@ -23,7 +23,13 @@ export function listAllPrepay() {
})
}
// 查询该用户是否已经收取预付伙食费
export function getCountById(patientId) {
return request({
url: '/fantang/prepayment/getCountById/' + patientId,
method: 'get',
})
}
// 查询收费管理列表
export function listPrepayment(query) {

View File

@ -196,13 +196,18 @@
updatePrepayment
} from "@/api/fantang/prepayment";
import {listAllPrepay, listPrepay} from "../../../api/fantang/prepayment";
import {getUserProfile} from "../../../api/system/user";
export default {
name: "Prepayment",
components: {},
data() {
return {
//
userName: null,
roleGroup: null,
postGroup: null,
settlementFlagOptions: [{
value: null,
label: '未交费'
@ -261,12 +266,20 @@
},
created() {
this.getDefaultNoPrepayment();
this.getUser();
this.myGetUser();
},
mounted() {
},
methods: {
//
myGetUser() {
getUserProfile().then(response => {
this.userName = response.data;
this.roleGroup = response.roleGroup;
this.postGroup = response.postGroup;
});
},
//
selectSettlementFlag(value) {
console.log("value", value)
@ -376,6 +389,7 @@
prepaidAt: new Date(),
hospitalId: null,
name: null,
userName:null,
};
this.resetForm("formAddPrepayment");
},
@ -414,6 +428,7 @@
/** 提交按钮 */
submitformAddPrepayment() {
let hospitalId = this.formAddPrepayment.hospitalId;
this.formAddPrepayment.collectBy = this.userName;
this.$refs["formAddPrepayment"].validate(valid => {
if (valid) {
if (!this.NoPrepayments.find(function(x) {
@ -423,6 +438,7 @@
return ;
}
this.formAddPrepayment.prepaidAt = null;
console.log("form -->", this.formAddPrepayment)
addPrepayment(this.formAddPrepayment).then(response => {

View File

@ -239,6 +239,10 @@ export default {
components: {},
data() {
return {
//
userName: null,
roleGroup: null,
postGroup: null,
//
flagAddPrepaymentShow: false,
//
@ -256,6 +260,7 @@ export default {
netPeceipt: null,
prepayment: null,
settlementDate: null,
userName: null,
},
//
@ -329,6 +334,7 @@ export default {
},
created() {
this.loading = true;
this.myGetUser();
listNoPay(this.queryParams).then(response => {
this.settleList = response.rows;
this.total = response.total;
@ -336,6 +342,14 @@ export default {
});
},
methods: {
//
myGetUser() {
getUserProfile().then(response => {
this.userName = response.data;
this.roleGroup = response.roleGroup;
this.postGroup = response.postGroup;
});
},
//
clickAddNewSettlement(row) {
@ -349,6 +363,7 @@ export default {
this.formAddNewSettlement.price = row.price;
this.formAddNewSettlement.prepayment = row.prepayment;
this.formAddNewSettlement.netPeceipt = null;
this.formAddNewSettlement.userName = this.userName;
},
//