预算付款计划审核确认

master
xy 1 year ago
parent a654df2522
commit 9e22890d57

@ -19,7 +19,8 @@ const getDefaultState = () => {
name: '',
info: {},
avatar: '',
roles: []
roles: [],
myRole: [],
}
}
@ -43,6 +44,9 @@ const mutations = {
},
SET_ROLES: (state, roles) => {
state.roles = roles
},
SET_MYROLE: (state, roles) => {
state.myRole = roles
}
}
@ -117,13 +121,13 @@ const actions = {
}
response["roles"] = ["admin"];
const {
role,
roles,
name,
avatar
} = response
commit('SET_MYROLE', role)
commit('SET_ROLES', roles)
commit('SET_NAME', name)
commit('SET_AVATAR', avatar)

@ -127,6 +127,7 @@ export default {
<el-input-number
precision={2}
controls={false}
disabled={row.status}
placeholder="付款金额"
style="width: 100%;"
v-model={row.paid_money}
@ -152,6 +153,7 @@ export default {
return (
<el-date-picker
type="month"
disabled={row.status}
placeholder="年份-月份"
style="width: 100%;"
value-format="yyyy-MM"
@ -179,6 +181,7 @@ export default {
<el-input
v-model={row.remark}
placeholder="备注"
disabled={row.status}
style="width: 100%;"
size="mini"
clearable={true}
@ -234,16 +237,37 @@ export default {
</Button>
</Poptip>
{
/*
<Button
(this.$store.state.user.myRole.find(i => /领导|系统管理员/g.test(i.name)) && row.id && (row.status === 0 || row.status === undefined || row.status === null)) ?
(<Button
style="margin-left: 4px;"
ghost
size="small"
type="primary"
>
确认
</Button>
*/
on={{
['click']: _ => {
let copyRow = JSON.parse(JSON.stringify(row));
copyRow.status = 1;
paidSave(copyRow).then(_ => this.getDetail())
}
}}>
审核确认
</Button>) : ""
}
{
(this.$store.state.user.myRole.find(i => /领导|系统管理员/g.test(i.name)) && row.id && (row.status === 1)) ?
(<Button
style="margin-left: 4px;"
size="small"
ghost
type="primary"
on={{
['click']: _ => {
let copyRow = JSON.parse(JSON.stringify(row));
copyRow.status = 0;
paidSave(copyRow).then(_ => this.getDetail())
}
}}>
审核取消
</Button>) : ""
}
</div>
);

Loading…
Cancel
Save