2024-2-28需求调整
This commit is contained in:
parent
b10cdab59f
commit
d79fc9b89e
File diff suppressed because it is too large
Load Diff
|
@ -122,7 +122,16 @@
|
|||
})
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataList = data.page.list
|
||||
this.dataList = []
|
||||
data.page.list.forEach((item) => {
|
||||
if (item.contractNewName !== null && item.contractNewName !== '') {
|
||||
item.contractName = item.contractNewName
|
||||
}
|
||||
if (item.excelContractMoneyNew !== null && item.contractNewName !== '') {
|
||||
item.excelContractMoney = item.excelContractMoneyNew
|
||||
}
|
||||
this.dataList.push(item)
|
||||
})
|
||||
this.totalPage = data.page.totalCount
|
||||
} else {
|
||||
this.dataList = []
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<div>
|
||||
<div style="text-align: center">
|
||||
<el-button v-if="authenticName !== '侯吉光'" @click="oi()">收支总结表</el-button>
|
||||
<el-button @click="o()">支出明细表</el-button>
|
||||
<el-button :type="isShowSz?'success':''" v-if="authenticName !== '侯吉光'" @click="oi()">每日收支总结表</el-button>
|
||||
<el-button :type="isShowMx?'success':''" @click="o()">每日支出表</el-button>
|
||||
</div>
|
||||
<businessOutlayIncome v-if="outLayIncome" ref="outInLayWeb"></businessOutlayIncome>
|
||||
<businessOutLay v-if="outLay" ref="outLayWeb"></businessOutLay>
|
||||
|
@ -19,6 +19,8 @@ export default {
|
|||
},
|
||||
data () {
|
||||
return {
|
||||
isShowSz: false,
|
||||
isShowMx: false,
|
||||
outLay: false,
|
||||
outLayIncome: false,
|
||||
userId: '',
|
||||
|
@ -28,6 +30,8 @@ export default {
|
|||
methods: {
|
||||
// 收支总结
|
||||
oi () {
|
||||
this.isShowSz = true
|
||||
this.isShowMx = false
|
||||
this.outLayIncome = true
|
||||
this.outLay = false
|
||||
this.$nextTick(() => {
|
||||
|
@ -36,6 +40,8 @@ export default {
|
|||
},
|
||||
// 支出明细
|
||||
o () {
|
||||
this.isShowSz = false
|
||||
this.isShowMx = true
|
||||
this.outLay = true
|
||||
this.outLayIncome = false
|
||||
this.$nextTick(() => {
|
||||
|
@ -44,7 +50,11 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted () {
|
||||
this.oi()
|
||||
if (this.authenticName !== '侯吉光') {
|
||||
this.o()
|
||||
} else {
|
||||
this.oi()
|
||||
}
|
||||
// 获取登录人信息
|
||||
this.$http.request({
|
||||
url: this.$http.adornUrl('/sys/user/info'),
|
||||
|
@ -61,4 +71,6 @@ export default {
|
|||
|
||||
<style scoped>
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="收款人" prop="outPayee">
|
||||
<el-form-item v-if="isShow" label="收款人" prop="outPayee">
|
||||
<el-input v-if="!selectskr" v-model="dataForm.outPayee" placeholder="收款人"></el-input>
|
||||
<el-select
|
||||
v-else
|
||||
|
@ -71,21 +71,20 @@
|
|||
>
|
||||
<el-option
|
||||
v-for="item in recipientList"
|
||||
:key="item.userId"
|
||||
:label="item.name"
|
||||
:value="item.userId"
|
||||
:value="item.dictId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="地址" prop="outPayeeAddress">
|
||||
<el-input :disabled="otherZclbDisabled" v-model="dataForm.outPayeeAddress" placeholder="地址"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="outPayeePhone">
|
||||
<el-input :disabled="otherZclbDisabled" v-model="dataForm.outPayeePhone" placeholder="电话"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="outRemark">
|
||||
<el-input v-model="dataForm.outRemark" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="地址" prop="outPayeeAddress">-->
|
||||
<!-- <el-input :disabled="otherZclbDisabled" v-model="dataForm.outPayeeAddress" placeholder="地址"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="电话" prop="outPayeePhone">-->
|
||||
<!-- <el-input :disabled="otherZclbDisabled" v-model="dataForm.outPayeePhone" placeholder="电话"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="备注" prop="outRemark">-->
|
||||
<!-- <el-input v-model="dataForm.outRemark" placeholder="备注"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
|
@ -98,9 +97,10 @@
|
|||
export default {
|
||||
data () {
|
||||
return {
|
||||
isShow: false,
|
||||
visible: false,
|
||||
selectskr: false, // 收款人
|
||||
otherZclbDisabled: true,// 其他支出类别不可以
|
||||
otherZclbDisabled: true, // 其他支出类别不可以
|
||||
dataForm: {
|
||||
id: 0,
|
||||
outTime: '',
|
||||
|
@ -161,9 +161,12 @@
|
|||
url: this.$http.adornUrl('/sys/user/info'),
|
||||
method: 'get'
|
||||
}).then(({data}) => {
|
||||
if (data && data.code == 0) {
|
||||
if (data && data.code === 0) {
|
||||
this.userId = data.user.userId
|
||||
this.authenticName = data.user.authenticName
|
||||
if (data.user.userId === 10 || data.user.userId === 1) {
|
||||
this.isShow = true
|
||||
}
|
||||
}
|
||||
// 获取立项数据
|
||||
this.$http.request({
|
||||
|
@ -171,7 +174,7 @@
|
|||
method: 'get'
|
||||
}).then(({data}) => {
|
||||
// console.log(data);
|
||||
if (data && data.code == 0) {
|
||||
if (data && data.code === 0) {
|
||||
this.projectList = data.page
|
||||
this.projectList.forEach((item) => {
|
||||
if (item.projectNewName !== null) {
|
||||
|
@ -183,26 +186,31 @@
|
|||
url: this.$http.adornUrl('/business/businessoutlay/selectAllContainsDeparturePage'),
|
||||
method: 'get'
|
||||
}).then(({data}) => {
|
||||
if (data && data.code == 0) {
|
||||
this.recipientList_all = data.page;
|
||||
if (data && data.code === 0) {
|
||||
this.recipientList_all = data.page
|
||||
}
|
||||
this.$http.request({
|
||||
url: this.$http.adornUrl('/business/businessoutlay/dictList'),
|
||||
method: 'get'
|
||||
}).then(({data}) => {
|
||||
// console.log(data);
|
||||
if (data && data.code == 0) {
|
||||
if (data && data.code === 0) {
|
||||
data.data.forEach((item) => {
|
||||
if (item.dictCode == 'pay_type') {
|
||||
if (item.dictCode === 'pay_type') {
|
||||
this.payList = item.children
|
||||
} else if (item.dictCode == 'recipient') {
|
||||
this.recipientList = item.children
|
||||
} else if (item.dictCode === 'recipient') {
|
||||
this.recipientList = []
|
||||
item.children.forEach((item2) => {
|
||||
item2.dictId = item2.dictId.toString()
|
||||
this.recipientList.push(item2)
|
||||
})
|
||||
this.recipientList_nbzz = []
|
||||
this.recipientList.forEach((item2) => {
|
||||
if(item2.name == "侯德生" || item2.name == "侯吉庆" || item2.name == "李现举") {
|
||||
this.recipientList_nbzz.push(item2);
|
||||
if (item2.name === '肖爽' || item2.name === '侯吉庆' || item2.name === '李现举') {
|
||||
this.recipientList_nbzz.push(item2)
|
||||
}
|
||||
})
|
||||
} else if (item.dictCode == 'expense_type') {
|
||||
} else if (item.dictCode === 'expense_type') {
|
||||
this.expenseList = item.children
|
||||
}
|
||||
})
|
||||
|
@ -213,14 +221,14 @@
|
|||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({data}) => {
|
||||
if (data && data.code == 0) {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm = {
|
||||
...data.businessOutlay
|
||||
}
|
||||
this.dataOldForm = {
|
||||
...data.businessOutlay
|
||||
}
|
||||
this.selectZc();
|
||||
this.selectZc()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -238,101 +246,101 @@
|
|||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
// 进入审批
|
||||
if (this.dataForm.id && this.dataForm.id !== 0) {
|
||||
if (this.dataForm.approval == 1) {
|
||||
this.$message('待上次申请审批之后,在重新申请')
|
||||
} else if (this.dataForm.approval == 0 && JSON.stringify(this.dataForm) == JSON.stringify(this.dataOldForm)) {
|
||||
this.$message('请修改后在进行提交')
|
||||
} else {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/business/businessoutlay/update`),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({
|
||||
'id': this.dataForm.id,
|
||||
'approval': 1
|
||||
})
|
||||
})
|
||||
// 提交到审批表中
|
||||
this.$http.request({
|
||||
url: this.$http.adornUrl('/business/businessapproval/save'),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({
|
||||
'approvalId': this.dataForm.id,
|
||||
'approvalName': this.dataForm.outTime,
|
||||
'approvalData': JSON.stringify(this.dataForm),
|
||||
'approvalOldData': JSON.stringify(this.dataOldForm),
|
||||
'approvalType': 6,
|
||||
'approvalSuccess': 0
|
||||
})
|
||||
}).then(({data}) => {
|
||||
if (data && data.code == 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
// if (this.dataForm.id && this.dataForm.id !== 0) {
|
||||
// if (this.dataForm.approval === 1) {
|
||||
// this.$message('待上次申请审批之后,在重新申请')
|
||||
// } else if (this.dataForm.approval === 0 && JSON.stringify(this.dataForm) === JSON.stringify(this.dataOldForm)) {
|
||||
// this.$message('请修改后在进行提交')
|
||||
// } else {
|
||||
// this.$http({
|
||||
// url: this.$http.adornUrl(`/business/businessoutlay/update`),
|
||||
// method: 'post',
|
||||
// data: this.$http.adornData({
|
||||
// 'id': this.dataForm.id,
|
||||
// 'approval': 1
|
||||
// })
|
||||
// })
|
||||
// // 提交到审批表中
|
||||
// this.$http.request({
|
||||
// url: this.$http.adornUrl('/business/businessapproval/save'),
|
||||
// method: 'post',
|
||||
// data: this.$http.adornData({
|
||||
// 'approvalId': this.dataForm.id,
|
||||
// 'approvalName': this.dataForm.outTime,
|
||||
// 'approvalData': JSON.stringify(this.dataForm),
|
||||
// 'approvalOldData': JSON.stringify(this.dataOldForm),
|
||||
// 'approvalType': 6,
|
||||
// 'approvalSuccess': 0
|
||||
// })
|
||||
// }).then(({data}) => {
|
||||
// if (data && data.code == 0) {
|
||||
// this.$message({
|
||||
// message: '操作成功',
|
||||
// type: 'success',
|
||||
// duration: 1500,
|
||||
// onClose: () => {
|
||||
// this.visible = false
|
||||
// this.$emit('refreshDataList')
|
||||
// }
|
||||
// })
|
||||
// } else {
|
||||
// this.$message.error(data.msg)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// } else {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/business/businessoutlay/save`),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({
|
||||
'id': this.dataForm.id,
|
||||
'outTime': this.dataForm.outTime,
|
||||
'outMoney': this.dataForm.outMoney,
|
||||
'outNr': this.dataForm.outNr,
|
||||
'outWay': this.dataForm.outWay,
|
||||
'outType': this.dataForm.outType,
|
||||
'outProject': this.dataForm.outProject,
|
||||
'outPayee': this.dataForm.outPayee,
|
||||
'outPayeeAddress': this.dataForm.outPayeeAddress,
|
||||
'outPayeePhone': this.dataForm.outPayeePhone,
|
||||
'outRemark': this.dataForm.outRemark,
|
||||
'status': 0,
|
||||
'writeUserId': this.dataForm.writeUserId,
|
||||
'approval': 0
|
||||
})
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
} else {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/business/businessoutlay/save`),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({
|
||||
'id': this.dataForm.id || undefined,
|
||||
'outTime': this.dataForm.outTime,
|
||||
'outMoney': this.dataForm.outMoney,
|
||||
'outNr': this.dataForm.outNr,
|
||||
'outWay': this.dataForm.outWay,
|
||||
'outType': this.dataForm.outType,
|
||||
'outProject': this.dataForm.outProject,
|
||||
'outPayee': this.dataForm.outPayee,
|
||||
'outPayeeAddress': this.dataForm.outPayeeAddress,
|
||||
'outPayeePhone': this.dataForm.outPayeePhone,
|
||||
'outRemark': this.dataForm.outRemark,
|
||||
'status': this.dataForm.status,
|
||||
'writeUserId': this.dataForm.writeUserId,
|
||||
'approval': this.dataForm.approval
|
||||
})
|
||||
}).then(({data}) => {
|
||||
if (data && data.code == 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
// }
|
||||
}
|
||||
})
|
||||
},
|
||||
selectZc () {
|
||||
if (this.dataForm.outType == 141 || this.dataForm.outType == 146) {
|
||||
if (this.dataForm.outType === 141 || this.dataForm.outType === 146) {
|
||||
this.selectskr = true
|
||||
if(this.dataForm.outType == 141) {
|
||||
this.recipientList = [];
|
||||
this.recipientList = this.recipientList_all;
|
||||
if (this.dataForm.outType === 141) {
|
||||
this.recipientList = []
|
||||
this.recipientList = this.recipientList_all
|
||||
} else {
|
||||
this.recipientList = [];
|
||||
this.recipientList = this.recipientList_nbzz;
|
||||
this.recipientList = []
|
||||
this.recipientList = this.recipientList_nbzz
|
||||
}
|
||||
this.otherZclbDisabled = true;
|
||||
this.otherZclbDisabled = true
|
||||
} else {
|
||||
this.selectskr = false;
|
||||
this.otherZclbDisabled = false;
|
||||
this.selectskr = false
|
||||
this.otherZclbDisabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,29 +90,30 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="isShow"
|
||||
prop="outPayeeStr"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="收款人">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="outPayeeAddress"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="地址">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="outPayeePhone"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="电话">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="outRemark"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="备注">
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="outPayeeAddress"-->
|
||||
<!-- header-align="center"-->
|
||||
<!-- align="center"-->
|
||||
<!-- label="地址">-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="outPayeePhone"-->
|
||||
<!-- header-align="center"-->
|
||||
<!-- align="center"-->
|
||||
<!-- label="电话">-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="outRemark"-->
|
||||
<!-- header-align="center"-->
|
||||
<!-- align="center"-->
|
||||
<!-- label="备注">-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
|
@ -124,7 +125,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <el-pagination
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
:current-page="pageIndex"
|
||||
|
@ -132,7 +133,7 @@
|
|||
:page-size="pageSize"
|
||||
:total="totalPage"
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>-->
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||
</div>
|
||||
|
@ -160,7 +161,8 @@
|
|||
addOrUpdateVisible: false,
|
||||
userId: '',
|
||||
authenticName: '',
|
||||
sysYear: ''
|
||||
sysYear: '',
|
||||
isShow: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
@ -180,6 +182,9 @@
|
|||
if (data && data.code === 0) {
|
||||
this.userId = data.user.userId
|
||||
this.authenticName = data.user.authenticName
|
||||
if (data.user.userId === 10 || data.user.userId === 1) {
|
||||
this.isShow = true
|
||||
}
|
||||
}
|
||||
})
|
||||
await this.$http.request({
|
||||
|
@ -229,18 +234,21 @@
|
|||
params: this.$http.adornParams({
|
||||
'start': this.dataForm.start,
|
||||
'end': this.dataForm.end,
|
||||
'writeUserId': this.userId
|
||||
'writeUserId': this.userId,
|
||||
'page': this.pageIndex,
|
||||
'limit': this.pageSize
|
||||
})
|
||||
}).then(({data}) => {
|
||||
this.totalPage = data.page.totalCount
|
||||
if (this.authenticName === '管理员') {
|
||||
this.dataList = data.page
|
||||
this.dataList = data.page.list
|
||||
this.recipientList.forEach((item) => {
|
||||
if (item.dictId.toString() === item.outPayee) {
|
||||
item.outPayee = item.name
|
||||
}
|
||||
})
|
||||
} else {
|
||||
data.page.forEach((item) => {
|
||||
data.page.list.forEach((item) => {
|
||||
if (item.writeUserId === this.userId) { // 谁登陆查找谁的信息
|
||||
this.recipientList.forEach((item) => {
|
||||
if (item.dictId.toString() === item.outPayee) {
|
||||
|
@ -254,8 +262,12 @@
|
|||
})
|
||||
this.dataListLoading = false
|
||||
},
|
||||
onExport() {
|
||||
window.open(this.$http.adornUrl('/business/businessoutlay/export'));
|
||||
onExport () {
|
||||
if (this.authenticName === '管理员') {
|
||||
window.open(this.$http.adornUrl('/business/businessoutlay/export'))
|
||||
} else {
|
||||
window.open(this.$http.adornUrl('/business/businessoutlay/export?writeUserId=' + this.userId))
|
||||
}
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle (val) {
|
||||
|
|
|
@ -14,17 +14,17 @@
|
|||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="昨日余额" prop="outinYdayBalance">
|
||||
<el-input v-model="dataForm.outinYdayBalance" placeholder="昨日余额" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')"></el-input>
|
||||
<el-input disabled v-model="dataForm.outinYdayBalance" placeholder="昨日余额" @change="jrYe()" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="今日收入" prop="outinTdayIncome">
|
||||
<el-input v-model="dataForm.outinTdayIncome" placeholder="今日收入" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')"></el-input>
|
||||
<el-input v-model="dataForm.outinTdayIncome" placeholder="今日收入" @change="jrYe()" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="今日支出" prop="outinTdayOut">
|
||||
<el-input v-model="dataForm.outinTdayOut" placeholder="今日支出" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')"></el-input>
|
||||
<el-input disabled v-model="dataForm.outinTdayOut" placeholder="今日支出" @change="jrYe()" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="今日余额" prop="outinTdayBalance">
|
||||
<el-input readonly v-model="dataForm.outinTdayBalance" placeholder="今日余额" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')" style="width:90%;"></el-input>
|
||||
<el-button @click="jrYe()">计算</el-button>
|
||||
<el-input disabled v-model="dataForm.outinTdayBalance" placeholder="今日余额" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')"></el-input>
|
||||
<!-- <el-button @click="jrYe()">计算</el-button>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="收款方式" prop="outinCreditingWay">
|
||||
<el-select
|
||||
|
@ -40,6 +40,20 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="收入类别" prop="outType">
|
||||
<el-select
|
||||
v-model="dataForm.outType"
|
||||
placeholder="选择收款方式"
|
||||
style="width: 90%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in expenseList"
|
||||
:key="item.dictId"
|
||||
:label="item.name"
|
||||
:value="item.dictId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="outinRemark">
|
||||
<el-input v-model="dataForm.outinRemark" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
|
@ -64,7 +78,7 @@
|
|||
outinTdayOut: '',
|
||||
outinTdayBalance: '',
|
||||
outinCreditingWay: '',
|
||||
outinPayId: '',
|
||||
outType: '',
|
||||
outinRemark: '',
|
||||
status: 0,
|
||||
writeUserId: '', // 填写人id
|
||||
|
@ -78,7 +92,7 @@
|
|||
outinTdayOut: '',
|
||||
outinTdayBalance: '',
|
||||
outinCreditingWay: '',
|
||||
outinPayId: '',
|
||||
outType: '',
|
||||
outinRemark: '',
|
||||
status: 0,
|
||||
writeUserId: '', // 填写人id
|
||||
|
@ -88,6 +102,7 @@
|
|||
authenticName: '',
|
||||
// 字典内容
|
||||
payList: [],
|
||||
expenseList: [], // 收入类别
|
||||
dataRule: {
|
||||
outinDate: [
|
||||
{ required: true, message: '日期不能为空', trigger: 'blur' }
|
||||
|
@ -181,32 +196,35 @@
|
|||
if (item.dictCode === 'pay_type') {
|
||||
this.payList = item.children
|
||||
}
|
||||
if (item.dictCode === 'expense_type') {
|
||||
this.expenseList = item.children
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
jrYe(){
|
||||
let v1 = this.dataForm.outinYdayBalance;
|
||||
if(!v1) {
|
||||
v1 = 0;
|
||||
jrYe () {
|
||||
let v1 = this.dataForm.outinYdayBalance
|
||||
if (!v1) {
|
||||
v1 = 0
|
||||
} else {
|
||||
v1 = parseFloat(this.dataForm.outinYdayBalance);
|
||||
v1 = parseFloat(this.dataForm.outinYdayBalance)
|
||||
}
|
||||
let v2 = this.dataForm.outinTdayIncome;
|
||||
if(!v2) {
|
||||
v2 = 0;
|
||||
let v2 = this.dataForm.outinTdayIncome
|
||||
if (!v2) {
|
||||
v2 = 0
|
||||
} else {
|
||||
v2 = parseFloat(this.dataForm.outinTdayIncome)
|
||||
}
|
||||
let v3 = this.dataForm.outinTdayOut;
|
||||
if(!v3) {
|
||||
v3 = 0;
|
||||
let v3 = this.dataForm.outinTdayOut
|
||||
if (!v3) {
|
||||
v3 = 0
|
||||
} else {
|
||||
v3 = parseFloat(this.dataForm.outinTdayOut)
|
||||
}
|
||||
this.dataForm.outinTdayBalance = (v1 + v2 - v3).toFixed(2);
|
||||
this.$forceUpdate();
|
||||
this.dataForm.outinTdayBalance = (v1 + v2 - v3).toFixed(2)
|
||||
this.$forceUpdate()
|
||||
},
|
||||
|
||||
bindChange: function (e) {
|
||||
|
@ -325,11 +343,11 @@
|
|||
'outinTdayOut': this.dataForm.outinTdayOut,
|
||||
'outinTdayBalance': this.dataForm.outinTdayBalance,
|
||||
'outinCreditingWay': this.dataForm.outinCreditingWay,
|
||||
'outinPayId': this.dataForm.outinPayId,
|
||||
'outinRemark': this.dataForm.outinRemark,
|
||||
'status': this.dataForm.status,
|
||||
'outType': this.dataForm.outType,
|
||||
'status': 0,
|
||||
'writeUserId': this.dataForm.writeUserId,
|
||||
'approval': this.dataForm.approval
|
||||
'approval': 0
|
||||
})
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
|
|
|
@ -78,6 +78,17 @@
|
|||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="outType"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="收入类型">
|
||||
<template slot-scope="scope">
|
||||
<template v-for="item in expenseList" v-if="item.dictId === scope.row.outType">
|
||||
{{ item.name }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="outinRemark"
|
||||
header-align="center"
|
||||
|
@ -95,7 +106,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <el-pagination
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
:current-page="pageIndex"
|
||||
|
@ -103,7 +114,7 @@
|
|||
:page-size="pageSize"
|
||||
:total="totalPage"
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>-->
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||
</div>
|
||||
|
@ -127,6 +138,7 @@
|
|||
dataListLoading: false,
|
||||
dataListSelections: [],
|
||||
payList: [], // 收款方式
|
||||
expenseList: [], // 收入类别
|
||||
addOrUpdateVisible: false,
|
||||
userId: '',
|
||||
authenticName: '',
|
||||
|
@ -161,6 +173,9 @@
|
|||
if (item.dictCode === 'pay_type') {
|
||||
this.payList = item.children
|
||||
}
|
||||
if (item.dictCode === 'expense_type') {
|
||||
this.expenseList = item.children
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -194,18 +209,21 @@
|
|||
})*/
|
||||
this.dataList = []
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/business/businessoutlayincome/listNoPage'),
|
||||
url: this.$http.adornUrl('/business/businessoutlayincome/pcListPage'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
'start': this.dataForm.start,
|
||||
'end': this.dataForm.end,
|
||||
'writeUserId': this.userId
|
||||
'writeUserId': this.userId,
|
||||
'page': this.pageIndex,
|
||||
'limit': this.pageSize
|
||||
})
|
||||
}).then(({data}) => {
|
||||
this.totalPage = data.page.totalCount
|
||||
if (this.authenticName === '管理员') {
|
||||
this.dataList = data.page
|
||||
this.dataList = data.page.list
|
||||
} else {
|
||||
data.page.forEach((item) => {
|
||||
data.page.list.forEach((item) => {
|
||||
if (item.writeUserId === this.userId) { // 谁登陆查找谁的信息
|
||||
this.dataList.push(item)
|
||||
}
|
||||
|
@ -214,8 +232,12 @@
|
|||
})
|
||||
this.dataListLoading = false
|
||||
},
|
||||
onExport() {
|
||||
window.open(this.$http.adornUrl('/business/businessoutlayincome/export'));
|
||||
onExport () {
|
||||
if (this.authenticName === '管理员') {
|
||||
window.open(this.$http.adornUrl('/business/businessoutlayincome/export'))
|
||||
} else {
|
||||
window.open(this.$http.adornUrl('/business/businessoutlayincome/export?writeUserId=' + this.userId))
|
||||
}
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle (val) {
|
||||
|
|
Loading…
Reference in New Issue