From d4198ef89aa5c4648c9a857f98e34353054b3e30 Mon Sep 17 00:00:00 2001 From: guoxing <1369478551@qq.com> Date: Sat, 14 Sep 2024 09:18:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=95=B0=E6=8D=AE=E5=A4=A7?= =?UTF-8?q?=E5=B1=8F=E5=8F=8A=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supervise-report-ui/src/api/portal/Upload.js | 12 +- .../src/api/project/project.js | 71 ++ .../uploadFile/upload_yanchejianchaTuBiao.vue | 390 +++++------ .../src/layout/components/Sidebar/index.vue | 12 +- supervise-report-ui/src/main.js | 3 +- .../src/views/project/projectDaily.vue | 46 +- .../src/views/projectList/index.vue | 629 ++++++++++++++++-- 7 files changed, 889 insertions(+), 274 deletions(-) diff --git a/supervise-report-ui/src/api/portal/Upload.js b/supervise-report-ui/src/api/portal/Upload.js index 9f02feaa..ebad3079 100644 --- a/supervise-report-ui/src/api/portal/Upload.js +++ b/supervise-report-ui/src/api/portal/Upload.js @@ -4,7 +4,7 @@ import qs from 'qs' const base = process.env.VUE_APP_BASE_API // 文件上传接口 -export const uploadFile =base+ '/file/upload' +export const uploadFile = base + '/file/upload' // export const uploadFile = process.env.VUE_APP_BASE_API + '/customer/file/upload' @@ -21,10 +21,10 @@ export const uploadFile =base+ '/file/upload' // 移除图片 export function deleteFilesOss(data) { - return request({ - url: '/base/v1/baseVehicleAppendixs/deleteFilesOss', - method: 'post', + return request({ + url: '/base/v1/baseVehicleAppendixs/deleteFilesOss', + method: 'post', data: qs.stringify(data), - // headers: { 'Content-Type': 'multipart/form-data' } - }) + // headers: { 'Content-Type': 'multipart/form-data' } + }) } diff --git a/supervise-report-ui/src/api/project/project.js b/supervise-report-ui/src/api/project/project.js index 550794d2..5668922e 100644 --- a/supervise-report-ui/src/api/project/project.js +++ b/supervise-report-ui/src/api/project/project.js @@ -147,6 +147,9 @@ export default { method: 'get', }); }, + + + // 获取所有项目类型名称 getProjectType: function() { return request({ @@ -154,4 +157,72 @@ export default { method: 'get', }); }, + + // 获取项目进度 + getNodeByProjectSid: function(data) { + return request({ + url: '/v1/projectphase/getNodeByProjectSid', + method: 'get', + params: data + }); + }, + + // 修改项目进度 + updatePhase: function(data) { + return request({ + url: '/v1/projectinformation/updatePhase', + method: 'post', + data: data + }); + }, + + // 保存用还信记录 + saveCreditRecord: function(data) { + return request({ + url: '/v1/projectcreditbalance/save', + method: 'post', + data: data + }); + }, + + // 保存项目报告 + saveProjectReport: function(data) { + return request({ + url: '/v1/ProjectFiles/save', + method: 'post', + data: data + }); + }, + + + + + // 查询商享通所有仓库 + getSxtWarehouses: function(data) { + return request({ + url: '/v1/projectinformation/warehouseList', + method: 'post', + data: data + }); + }, + + // 初始化项目管理商享通仓库 + initProjectWarehouses: function(data) { + return request({ + url: '/v1/projectinformation/getWarehouseBySid/' + data, + method: 'get', + }); + }, + + // 保存项目管理商享通仓库 + saveSxtWarehouses: function(data) { + return request({ + url: '/v1/projectinformation/saveSxt', + method: 'post', + data: data + }); + }, + + + } diff --git a/supervise-report-ui/src/components/uploadFile/upload_yanchejianchaTuBiao.vue b/supervise-report-ui/src/components/uploadFile/upload_yanchejianchaTuBiao.vue index b7c1089a..6e56b397 100644 --- a/supervise-report-ui/src/components/uploadFile/upload_yanchejianchaTuBiao.vue +++ b/supervise-report-ui/src/components/uploadFile/upload_yanchejianchaTuBiao.vue @@ -1,222 +1,232 @@ diff --git a/supervise-report-ui/src/layout/components/Sidebar/index.vue b/supervise-report-ui/src/layout/components/Sidebar/index.vue index 6e4003b8..148bd8ef 100644 --- a/supervise-report-ui/src/layout/components/Sidebar/index.vue +++ b/supervise-report-ui/src/layout/components/Sidebar/index.vue @@ -2,15 +2,9 @@
- + diff --git a/supervise-report-ui/src/main.js b/supervise-report-ui/src/main.js index 079e8cac..f578655d 100644 --- a/supervise-report-ui/src/main.js +++ b/supervise-report-ui/src/main.js @@ -50,7 +50,8 @@ VueAMap.initAMapApiLoader({ Vue.config.productionTip = false let token = null -// let token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiJkN2UxYzlkYy0xN2E3LTRlMjItYTIyYS02ZGFlYWZjNzUwOGEiLCJpc3MiOiJXQksiLCJleHAiOjE3MjAwNjA4MjN9.oO7Giw4M3khIOxNFw2VjNfOD1U6qC_mQzDeYtRi9n4Q' +// let token = +// 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiIwODZlMzg5Mi00Njc5LTRlNGQtYWUwYS02OTVjYTM5N2JiM2QiLCJpc3MiOiJXQksiLCJleHAiOjE3MjYwMTg0Mzh9.S7xDxYHZiRIHGo1eGC8fGb5-AjaR0BSLG7rUs_wVuRA' token = GetQueryString('token') if (token) { setStorage(token) diff --git a/supervise-report-ui/src/views/project/projectDaily.vue b/supervise-report-ui/src/views/project/projectDaily.vue index fa2d2af0..92f5cbf0 100644 --- a/supervise-report-ui/src/views/project/projectDaily.vue +++ b/supervise-report-ui/src/views/project/projectDaily.vue @@ -50,11 +50,11 @@
{{ scope.row.pledgeRatePercent }}%
- + @@ -281,8 +281,8 @@ size: 10, total: 0, params: { - dataDateStart: getDateRang('yesterday'), - dataDateEnd: getDateRang('yesterday'), + dataDateStart: getDateRang('yesterday'), + dataDateEnd: getDateRang('yesterday'), projectSid: '' } }, @@ -632,10 +632,40 @@ // window.open('https://supervise.yxtsoft.com/map365/#/mortgage'); // 本地 window.open('/map365/#/allData?projectSid=' + projectSid + '&projectName=' + projectName + - '&orderDate=' + orderDate); + '&orderDate=' + orderDate); + + // window.open('http://192.168.0.112:9532/map365/#/allData?projectSid=' + projectSid + '&projectName=' + + // projectName + + // '&orderDate=' + orderDate); + }, + showView2(row) { + console.log('showView2: ', row) + var projectSid = row.projectSid + var projectName = row.projectName + var orderDate = row.orderDate + // 正式 + // window.open('https://supervise.yxtsoft.com/map365/#/mortgage'); + // 测试 + // window.open('https://supervise.yxtsoft.com/map365/#/mortgage'); + // 本地 + // window.open('/map365/#/allData?projectSid=' + projectSid + '&projectName=' + projectName + + // '&orderDate=' + orderDate); + + // 山海定制大屏 + if (row.projectSid == 'd8bf7556-6db4-46b1-87eb-f3e9f93d330f') { + + window.open('/map365/#/shanhaiGf?projectSid=' + projectSid + '&projectName=' + + projectName + + '&orderDate=' + orderDate); + } else { + this.$message({ + showClose: true, + type: 'error', + message: '暂无定制大屏' + }) + return + } - // window.open('http://192.168.0.117:9533/map365/#/allData?projectSid=' + projectSid + '&projectName=' + projectName + - // '&orderDate=' + orderDate); }, sendMess(row) { req.sendMess(row.projectSid, row.orderDate).then(res => { diff --git a/supervise-report-ui/src/views/projectList/index.vue b/supervise-report-ui/src/views/projectList/index.vue index 4da21325..73dd032f 100644 --- a/supervise-report-ui/src/views/projectList/index.vue +++ b/supervise-report-ui/src/views/projectList/index.vue @@ -12,34 +12,23 @@ clearable /> - - - - + + + + - - - - + + + + - - - - + + + +
@@ -57,21 +46,23 @@ - - - + + + - - - - + + + + @@ -86,6 +77,188 @@
+ + + + + + + + + + 取 消 + 保 存 + + + + + + + + + 项目名称 + + + + {{formobj.projectname}} + + + + 填报日期 + + + + + + + + 类型 + + + + + 用信 + 还信 + + + + + 金额 + + + + + + + + + + + 附件 + + + + + + + + + + + 备注 + + + + + + + + + 取 消 + 保 存 + + + + + + + + + + 报告类型 + + + + + + + + + + + 上传报告 + + + + + 点击上传报告 + + + + + + + + + + 取 消 + 保 存 + + + + + +
+ + + + + + 添加 + +
+ + + + + + + + + + + + + + + + 取 消 + 保 存 + +
+ +
@@ -96,19 +269,21 @@ import ButtonBar from '@/components/ButtonBar' // import projectAdd from './projectAdd2.vue' // import projectInfo from './projectInfo2.vue' + import upload from '@/components/uploadFile/upload_yanchejianchaTuBiao.vue' export default { name: 'CustomerManagement', components: { Pagination, pageye, ButtonBar, + upload // projectAdd, // projectInfo, }, data() { return { - listLoading: false, + listLoading: false, btndisabled: false, btnList: [ // { @@ -143,9 +318,47 @@ total: 0 }, viewState: 1, - storehouseList:[], - ProjectTypeList:[], - stateList: [], + storehouseList: [], + ProjectTypeList: [], + stateList: [], + dialogShow: false, + dialogShow2: false, + dialogShow3: false, + dialogShow4: false, + options: [], + projectState: { + sid: "", + nodeKey: "", + nodeValue: "" + }, + radio: 1, + formobj: { + usersid: window.sessionStorage.getItem('userSid'), + projectname: "", + projectsid: "", + tbdate: "", + type: 1, + money: "", + pzfiles: [], + remarks: "" + }, + imgList: [], + updateAction: process.env.VUE_APP_BASE_API + '/projectdaily/uploadfile', + uploadFileList: [], + reportFileList: [], + warehouseName: '', + cangKu: {}, + seleWarehouseList: [], + tieUpWarehouses: { + sid: "", + warehouse: [] + }, + reportInfo: { + mainsid: "", + typeKey: '', + typeValue: '', + reportList: [], + }, } }, mounted() { @@ -156,10 +369,253 @@ // 加载列表 }, methods: { - getState(value){ + seleProjectState(val) { + const choose = this.options.filter((item) => item.nodeKey == val) + console.log('>>>>>>>>>seleProjectState', choose) + this.projectState.nodeValue = choose[0].nodeValue + this.projectState.nodeKey = choose[0].nodeKey + }, + toProjectProgress(row) { + + this.projectState = { + sid: row.sid, + nodeKey: row.nodeKey, + nodeValue: row.nodeValue + } + + req.getNodeByProjectSid({ + projectSid: row.sid + }).then((res) => { + console.log(">>>>>>>>>getNodeByProjectSid", res.data) + this.options = res.data + this.dialogShow = true + }) + }, + dialogClose() { + console.log(">>>>>>>>>dialogClose", this.projectState) + this.projectState = { + sid: "", + nodeKey: "", + nodeValue: "" + } + this.dialogShow = false + }, + saveProjectState() { + + req.updatePhase(this.projectState).then((res) => { + console.log(">>>>>>>>>updatePhase", res.data) + this.dialogShow = false + }) + + }, + toCreditLimit(row) { + + this.formobj.projectsid = row.sid + this.formobj.projectname = row.entryName + + this.dialogShow2 = true + }, + dialogClose2() { + console.log("formobj", this.formobj) + this.dialogShow2 = false + }, + radioChange(val) { + console.log("radioChange", val) + + this.formobj.type = val + + }, + backData(value) { + console.log(value, 999) + console.log("imgList", this.imgList) + const aa = [] + if (value.length > 0 && value != null && value != undefined) { + for (var i = 0; i < value.length; i++) { + aa.push(value[i].url) + } + } + this.formobj.pzfiles = aa + + }, + saveFormobj() { + console.log("formobj", this.formobj) + + req.saveCreditRecord(this.formobj).then((res) => { + console.log(">>>>>>>>>saveCreditRecord", res.data) + this.dialogShow2 = false + this.imgList = [] + this.formobj = { + usersid: window.sessionStorage.getItem('userSid'), + projectname: "", + projectsid: "", + tbdate: "", + type: 1, + money: "", + pzfiles: [], + remarks: "" + } + }) + + }, + + toReport(row) { + this.reportInfo.mainsid = row.sid + req.getNodeByProjectSid({ + projectSid: row.sid + }).then((res) => { + console.log(">>>>>>>>>getNodeByProjectSid", res.data) + this.options = res.data + this.dialogShow3 = true + }) + }, + seleReportType(val) { + console.log(">>>>>>>>>seleReportType1111", val) + const choose = this.options.filter((item) => item.nodeKey == val) + console.log('>>>>>>>>>seleReportType', choose) + this.reportInfo.typeKey = choose[0].nodeKey + this.reportInfo.typeValue = choose[0].nodeValue + + }, + + dialogClose3() { + this.dialogShow3 = false + }, + saveReport() { + + var fileTypeName = '' + + if (this.reportInfo.typeValue == '在途') { + fileTypeName = "到货验收报告" + } + if (this.reportInfo.typeValue == '在建') { + fileTypeName = "在建查验报告" + } + if (this.reportInfo.typeValue == '竣工') { + fileTypeName = "竣工报告" + } + + for (var i = 0; i < this.reportFileList.length; i++) { + var item = { + url: this.reportFileList[i].fullUrl, + absolutePath: this.reportFileList[i].filePath, + name: fileTypeName, + fileSrcName: this.reportFileList[i].fileSrcName, + } + this.reportInfo.reportList.push(item) + } + console.log('saveReport', this.reportInfo) + + req.saveProjectReport(this.reportInfo).then((res) => { + this.uploadFileList = [] + this.reportFileList = [] + this.reportInfo.reportList = [] + this.dialogShow3 = false + }) + + }, + + handleSuccess(resp, file, fileList) { + console.log('handleSuccess----', resp) + const _this = this + const upfile = { + fileTypeId: 6, // '文件类型: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款;', + fileTypeName: '项目报告', // '文件类型名: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款', + fileSrcName: resp.data.sourceFileName, // '原文件名', + filePath: resp.data.filePath, // '文件的相对路径', + fullUrl: resp.data.fullUrl, // '文件完整的访问URL', + fileuid: file.uid // '文件完整的访问URL', + } + _this.reportFileList.push(upfile) + }, + handleRemove(file, fileList) { + 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 + } + } + _this.reportFileList.splice(delete_index, 1) + }, + + getSxtWarehouses(sid) { + req.getSxtWarehouses({ + sid: sid + }).then((res) => { + console.log(">>>>>>>>>getSxtWarehouses", res.data) + this.seleWarehouseList = res.data + }) + }, + + toTieUp(row) { + this.tieUpWarehouses.sid = row.sid + + req.initProjectWarehouses(row.sid).then((res) => { + console.log(">>>>>>>>>initProjectWarehouses", res.data) + this.tieUpWarehouses.warehouse = res.data.warehouse + this.dialogShow4 = true + }) + + this.getSxtWarehouses(row.sid) + + }, + getCangku(value) { + + const choose = this.seleWarehouseList.filter((item) => item.sid === value) + + this.cangKu.name = choose[0].warehouseName + this.cangKu.shSid = choose[0].sid + this.cangKu.address = choose[0].address + this.cangKu.linkerName = choose[0].contacts + this.cangKu.linkerPhone = choose[0].mob + + }, + + addCangku() { + + console.log(">>>>>>>>>addCangku", this.cangKu) + console.log(">>>>>>>>>addCangku", this.tieUpWarehouses.warehouse) + + var info = { + shSid: this.cangKu.shSid, + name: this.cangKu.name, + address: this.cangKu.address, + linkerName: this.cangKu.linkerName, + linkerPhone: this.cangKu.linkerPhone, + } + const choose = this.tieUpWarehouses.warehouse.filter((item) => item.shSid === info.shSid) + console.log(">>>>>>>>>addCangku", choose) + if (choose.length == 0) + this.tieUpWarehouses.warehouse.push(info) + else + this.$message({ + showClose: true, + type: 'error', + message: "请勿重复添加!" + }) + }, + doDel(index) { + this.tieUpWarehouses.warehouse.splice(index, 1) + }, + dialogClose4() { + this.dialogShow4 = false + }, + saveSxtWarehouses() { + + req.saveSxtWarehouses(this.tieUpWarehouses).then((res) => { + console.log(">>>>>>>>>saveSxtWarehouses", res.data) + this.dialogShow4 = false + this.warehouseName = '' + }) + + }, + + + getState(value) { console.log(">>>>>>>>>getState", value) const choose = this.stateList.filter((item) => item.sid === value) - console.log(">>>>>>>>>getState", choose) + console.log(">>>>>>>>>getState", choose) this.listQuery.params.stateSid = choose[0].sid }, @@ -196,23 +652,23 @@ var pageindex = index + 1 + pagestart return pageindex }, - getBankName(){ - req.getUserListByOrg().then((res)=>{ - console.log(">>>>>>>>>getBankName", res.data) - this.storehouseList=res.data + getBankName() { + req.getUserListByOrg().then((res) => { + console.log(">>>>>>>>>getBankName", res.data) + this.storehouseList = res.data }) - req.getProjectType().then((res)=>{ - console.log(">>>>>>>>>getProjectType", res.data) - this.ProjectTypeList=res.data + req.getProjectType().then((res) => { + console.log(">>>>>>>>>getProjectType", res.data) + this.ProjectTypeList = res.data }) - req.getProjtypedstated().then((res)=>{ - console.log(">>>>>>>>>getProjtypedstated", res.data) - this.stateList=res.data - this.stateList.unshift({ - name:'全部', - sid:'', - }) + req.getProjtypedstated().then((res) => { + console.log(">>>>>>>>>getProjtypedstated", res.data) + this.stateList = res.data + this.stateList.unshift({ + name: '全部', + sid: '', + }) }) }, // 查询列表信息 @@ -220,7 +676,7 @@ this.listLoading = true req.listPage(this.listQuery).then((response) => { this.listLoading = false - console.log(">>>>>>>>>listPage", response.data) + console.log(">>>>>>>>>listPage", response.data) if (response.success) { this.list = response.data.records this.listQuery.total = response.data.total @@ -246,7 +702,7 @@ projectType: '', bankSid: '', stateSid: 'b2a9f856-016e-4880-ba1c-261ac4edc8ec', - stateName: '正式监管', + stateName: '正式监管', } } this.getList() @@ -262,7 +718,7 @@ this.$refs['divAdd'].showEdit(row) }, // 根据本行ID删除数据 - doDel(row) { + doDelss(row) { const tip = '请确认是否删除所选记录?' this.$confirm(tip, '提示', { confirmButtonText: '确定', @@ -295,11 +751,11 @@ this.viewState = 1 }, jump(sid) { - console.log("jump",sid) + console.log("jump", sid) this.viewState = 2 - this.$refs['divAdd'].showAdd(sid) + this.$refs['divAdd'].showAdd(sid) }, - close(sid){ + close(sid) { this.viewState = 4 this.$refs['divInfo'].showAdd(sid) }, @@ -311,4 +767,57 @@ }