diff --git a/supervise-report-ui/.env.development b/supervise-report-ui/.env.development index 7f387f4d..e9a5dacc 100644 --- a/supervise-report-ui/.env.development +++ b/supervise-report-ui/.env.development @@ -6,4 +6,4 @@ VUE_APP_BASE_API = '/api/service' ## 配置测试和本地开发时的 接口地址 ##VUE_APP_URL = "http://8.130.39.13:8112" -VUE_APP_URL = "http://192.168.1.193:8112" +VUE_APP_URL = "http://192.168.1.107:8112" diff --git a/supervise-report-ui/src/api/project/projectDaily.js b/supervise-report-ui/src/api/project/projectDaily.js index 1d1f7e6b..683a9358 100644 --- a/supervise-report-ui/src/api/project/projectDaily.js +++ b/supervise-report-ui/src/api/project/projectDaily.js @@ -34,6 +34,15 @@ export default { baseURL: '/api', url: '/report/projectdaily/sendMess/' + projectSid + "/" + orderDate }) + }, + + // 根据项目sid 获取项目账户信息 + getProjectAccountBySid: function(projectSid, orderDate) { + return request({ + baseURL: '/api/crm', + url: '/projectAccount/getAccountByProjectSid/' + projectSid , + }) } -} \ No newline at end of file + +} diff --git a/supervise-report-ui/src/views/project/projectDaily.vue b/supervise-report-ui/src/views/project/projectDaily.vue index 30bf3631..1f39a612 100644 --- a/supervise-report-ui/src/views/project/projectDaily.vue +++ b/supervise-report-ui/src/views/project/projectDaily.vue @@ -8,9 +8,11 @@ @@ -233,6 +268,7 @@ }, data() { return { + banInfo: false, btndisabled: false, viewState: 1, // 1、列表 2、添加 3、修改 4、查看 isSearchShow: false, @@ -276,12 +312,14 @@ projectSid: '', // 项目Sid', projectName: '', // 项目名称', totalLoan: 0, // 贷款总额', + useLimit: 0, // 用信总额', accountsBalance: 0, // 帐户余额', accountsReceivable: 0, // 应收账款', stockAmount: 0, // 库存货值', transitAmount: 0, // 在途货值', advancePayment: 0, // 预付款', - fileList: [] + fileList: [], + bankList: [], // fileList:[{ // fileTypeId: '', // 文件类型: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款;', @@ -341,7 +379,8 @@ projectList: [], reportFileList: [], zhiyalv: '0', - uploadFileList: [] + uploadFileList: [], + bankList: [] } }, mounted() { @@ -352,9 +391,46 @@ this.loadList() }, methods: { + rowClass({ + rowIndex, + columnIndex + }) { + // if (rowIndex === 0) { + // if(columnIndex===7||columnIndex===8||columnIndex===9){ + // return {background:'skyblue',color:'white'} + // }else{ + // return {background:'#ededed'} + // } + // } + return { + background: '#0294D7', + color: '#fff' + } + }, + showBalance() { + this.getProjectAccountBySid(this.projectDaily.projectSid) + this.banInfo = true + }, + bankInfoClose() { + this.banInfo = false + }, + bankInfoSave() { + + var balance = 0 + for (var i = 0; i < this.bankList.length; i++) { + var item = this.bankList[i] + balance += Number(item.balance) + } + + console.log('balance:', balance) + this.projectDaily.accountsBalance = balance + this.banInfo = false + this.zyl() + }, zyl() { const a = Number(this.projectDaily.totalLoan) - Number(this.projectDaily.accountsBalance) - const b = Number(this.projectDaily.accountsReceivable) + Number(this.projectDaily.stockAmount) + Number(this.projectDaily.transitAmount) + Number(this.projectDaily + const b = Number(this.projectDaily.accountsReceivable) + Number(this.projectDaily.stockAmount) + Number(this + .projectDaily.transitAmount) + Number(this.projectDaily .advancePayment) if (b === 0) { this.zhiyalv = '0' @@ -368,7 +444,12 @@ this.projectDaily.projectSid = this.projectList[0].sid this.projectDaily.projectName = this.projectList[0].entryName this.projectDaily.totalLoan = Number(this.projectList[0].creditLimit) + this.projectDaily.useLimit = Number(this.projectList[0].useLimit) + this.projectDaily.accountsBalance = this.projectList[0].balance console.log('projectList:', res) + console.log('projectList:', this.projectList[0]) + console.log('projectDaily:', this.projectDaily) + }).catch(e => { console.log('projectListAll--ee:', e) }) @@ -437,8 +518,24 @@ if (this.projectDaily.projectSid === this.projectList[i].sid) { this.projectDaily.totalLoan = Number(this.projectList[i].creditLimit) this.projectDaily.projectName = this.projectList[i].entryName + this.projectDaily.accountsBalance = this.projectList[i].balance } } + + }, + + getProjectAccountBySid(sid) { + console.log('getProjectAccountBySid:', sid) + req.getProjectAccountBySid(sid).then(res => { + console.log('getProjectAccountBySid:', res) + this.bankList = res.data + + this.banInfo = this.bankList.length > 0 + + }).catch(e => { + console.log('CsmCashLog-loadList-ee:', e) + }) + }, projectDailyClose() { this.projectDaily.sid = '' @@ -447,12 +544,13 @@ this.projectDaily.projectSid = this.projectList[0].sid // 项目Sid', this.projectDaily.projectName = this.projectList[0].entryName // 项目名称', this.projectDaily.totalLoan = Number(this.projectList[0].creditLimit) // 贷款总额', - this.projectDaily.accountsBalance = 0 // 帐户余额', + // this.projectDaily.accountsBalance = Number(this.projectList[0].balance) // 帐户余额', this.projectDaily.accountsReceivable = 0 // 应收账款', this.projectDaily.stockAmount = 0 // 库存货值', this.projectDaily.transitAmount = 0 // 在途货值', this.projectDaily.advancePayment = 0 // 预付款', this.projectDaily.fileList = [] + this.projectDaily.bankList = [] this.reportFileList = [] this.uploadFileList = [] @@ -462,11 +560,18 @@ this.dialogVisible = false }, projectDailySave() { + this.$refs['form_daily'].validate((valid) => { if (valid) { + console.log('bankList:', this.bankList) this.projectDaily.fileList = this.reportFileList + this.projectDaily.bankList = this.bankList + + req.saveDaily(this.projectDaily).then(resp => { + console.log('projectDailySave:', this.projectDaily) this.loadList() + this.initData() this.projectDailyClose() }).catch(e => { console.log('projectDailySave--e:', e) @@ -635,10 +740,10 @@ const _this = this let delete_index = 0 for (let i = 0, len = _this.reportFileList.length; i < len; i++) { - if (file.uid === _this.reportFileList[i].fileuid) { - delete_index = i - break - } + if (file.uid === _this.reportFileList[i].fileuid) { + delete_index = i + break + } } _this.reportFileList.splice(delete_index, 1) } @@ -662,4 +767,23 @@ overflow-y: auto; overflow-x: hidden; } + + .tleftb2 { + text-align: center; + font-size: 14px; + color: #606266; + line-height: 40px !important; + font-weight: 600; + } + + .tleftb3 { + display: flex; + height: 100%; + flex-direction: row; + align-items: center; + justify-content: center; + text-align: center; + font-size: 14px; + color: #666666; + } diff --git a/yxt-portal-ui/src/views/Home/Home.vue b/yxt-portal-ui/src/views/Home/Home.vue index 5c7f6f67..fdacc72e 100644 --- a/yxt-portal-ui/src/views/Home/Home.vue +++ b/yxt-portal-ui/src/views/Home/Home.vue @@ -443,7 +443,7 @@ // window.open('http://127.0.0.1:9531/#/' + '?token=' + getStorage(), '_blank') window.open('/customer/#/' + '?token=' + getStorage(), '_blank') } else if (index === 1) { - window.open('http://192.168.1.119:9531#/' + '?token=' + getStorage(), '_blank') + window.open('http://192.168.1.103:9531#/' + '?token=' + getStorage(), '_blank') // window.open('/report/#/' + '?token=' + getStorage(), '_blank') } else if (index === 2) { window.open('/business/#/' + '?token=' + getStorage(), '_blank') @@ -460,7 +460,7 @@ window.open('http://192.168.1.102:9531/#/' + '?token=' + getStorage(), '_blank') // window.open('/organizational/#/' + '?token=' + getStorage(), '_blank') } else if (index === 8) { - window.open('http://192.168.1.103:9531/#/' + '?token=' + getStorage(), '_blank') + window.open('http://192.168.1.103:9532/#/' + '?token=' + getStorage(), '_blank') // window.open('/crm/#/' + '?token=' + getStorage(), '_blank') } else if (index === 9) { // window.open('http://192.168.1.102:9531/#/' + '?token=' + getStorage(), '_blank')