{"remainingRequest":"D:\\jenkins\\workspace\\ljzc-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\ljzc-fvue\\src\\views\\assetsOperating\\AssetLedgerRegistration\\PropertyLedger\\components\\editAddDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\ljzc-fvue\\src\\views\\assetsOperating\\AssetLedgerRegistration\\PropertyLedger\\components\\editAddDialog.vue","mtime":1702006594155},{"path":"D:\\jenkins\\workspace\\ljzc-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\ljzc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\ljzc-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport utils from '@/utils.js'\r\nimport Breadcrumb from '@/components/Breadcrumb/index.vue'\r\nimport api from '@/api/assetsOperating/AssetLedgerRegistration/PropertyLedger.js'\r\n\r\nexport default {\r\n components: { Breadcrumb },\r\n data() {\r\n return {\r\n breadcrumbOpt: [\r\n { breadcrumbName: '资产登记' },\r\n { breadcrumbName: '添加' }\r\n ],\r\n parameter: {\r\n isOutAsset:null,\r\n assetBusinessWarrents: {\r\n isGetWarrents: 0,\r\n isMortgage: 0,\r\n warrentsOrgId: null,\r\n warrentsNo: null\r\n },\r\n assetBusinessUse: {}\r\n },\r\n active: 0,\r\n warrentsValue: [],//权属\r\n orgValue: [],\r\n orgTree: [],//组织树\r\n projectData: [],//项目信息\r\n buildingData: [],//楼栋信息\r\n rules: {\r\n projectId: [\r\n {\r\n required: true,\r\n message: '请选择项目',\r\n trigger: 'blur'\r\n }\r\n ],\r\n buildingId: [\r\n {\r\n required: true,\r\n message: '请选择楼栋',\r\n trigger: 'blur'\r\n },\r\n ],\r\n assetNo: [\r\n {\r\n required: true,\r\n message: '请输入户号',\r\n trigger: 'blur'\r\n },\r\n ],\r\n assetFloor: [\r\n {\r\n required: true,\r\n message: '请输入所在楼层',\r\n trigger: 'blur'\r\n }\r\n ],\r\n name: [\r\n {\r\n required: true,\r\n message: '请输入资产名称',\r\n trigger: 'blur'\r\n }\r\n ],\r\n code: [\r\n {\r\n required: true,\r\n message: '请输入门牌号',\r\n trigger: 'blur'\r\n }\r\n ],\r\n assetType: [\r\n {\r\n required: true,\r\n message: '请选择资产类型',\r\n trigger: 'blur'\r\n },\r\n ],\r\n assetBusiness: [\r\n {\r\n required: true,\r\n message: '请选择资产业态',\r\n trigger: 'blur'\r\n },\r\n ],\r\n assetSrc: [\r\n {\r\n required: true,\r\n message: '请选择资产来源',\r\n trigger: 'blur'\r\n },\r\n ],\r\n assetNature: [\r\n {\r\n required: true,\r\n message: '请选择资产属性',\r\n trigger: 'blur'\r\n },\r\n ],\r\n assetBelong: [\r\n {\r\n required: true,\r\n message: '请选择资产归属',\r\n trigger: 'blur'\r\n },\r\n ],\r\n belongsOrgId: [\r\n {\r\n required: true,\r\n message: '请选择所属公司',\r\n trigger: 'blur'\r\n },\r\n ],\r\n assetDecorate: [\r\n {\r\n required: true,\r\n message: '请选择装修状态',\r\n trigger: 'blur'\r\n },\r\n ],\r\n assetStatus: [\r\n {\r\n required: true,\r\n message: '请选择资产状态',\r\n trigger: 'blur'\r\n },\r\n ],\r\n bookValue: [\r\n {\r\n required: true,\r\n message: '请输入账面价值',\r\n trigger: 'blur'\r\n }\r\n ],\r\n structureArea: [\r\n {\r\n required: true,\r\n message: '请输入建筑面积',\r\n trigger: 'blur'\r\n }\r\n ],\r\n assetBusinessUse: {\r\n yearEarnings: [\r\n {\r\n required: true,\r\n message: '请输入年收益',\r\n trigger: 'blur'\r\n }\r\n ],\r\n hireArea: [\r\n {\r\n required: true,\r\n message: '请输入出租面积',\r\n trigger: 'blur'\r\n }\r\n ],\r\n },\r\n assetBusinessWarrents: {\r\n isGetWarrents: [\r\n {\r\n required: true,\r\n message: '请选择是否已获取权属信息',\r\n trigger: 'blur'\r\n }\r\n ],\r\n isMortgage: [\r\n {\r\n required: true,\r\n message: '请选择是否设置抵质押',\r\n trigger: 'blur'\r\n }\r\n ],\r\n warrentsOrgId: [\r\n {\r\n required: true,\r\n message: '请选择权属单位',\r\n trigger: 'blur'\r\n }\r\n ],\r\n warrentsNo: [\r\n {\r\n required: true,\r\n message: '请输入权属证号',\r\n trigger: 'blur'\r\n }\r\n ],\r\n },\r\n },\r\n }\r\n },\r\n created() {\r\n let curUserDetail = this.$store.state.user.currentUserDetail\r\n this.orgId = curUserDetail.org[0].orgId\r\n this.getUserOrgTree()\r\n this.getProject()\r\n this.getBuilding()\r\n },\r\n mounted() { },\r\n computed: {\r\n hireRate() {\r\n return this.parameter.assetBusinessUse.hireArea ? (this.parameter.assetBusinessUse.hireArea / this.parameter.structureArea) * 100 : 0\r\n },\r\n leaseIncome() {\r\n return this.parameter.assetBusinessUse.yearEarnings ? (this.parameter.assetBusinessUse.yearEarnings / this.parameter.bookValue) * 100 : 0\r\n }\r\n },\r\n watch: {\r\n hireRate(val) {\r\n this.parameter.assetBusinessUse.hireRate = val\r\n },\r\n leaseIncome(val) {\r\n this.parameter.assetBusinessUse.yearEarningsRate = val\r\n if (val >= 7) {\r\n this.parameter.assetBusinessUse.operationLevel = 'A'\r\n } else if (7 > val >= 5) {\r\n this.parameter.assetBusinessUse.operationLevel = 'B'\r\n } else if (4 > val >= 2) {\r\n this.parameter.assetBusinessUse.operationLevel = 'C'\r\n } else if (2 > val) {\r\n this.parameter.assetBusinessUse.operationLevel = 'D'\r\n }\r\n }\r\n },\r\n methods: {\r\n //编辑\r\n addModifyBtn(val) {\r\n if (val) {\r\n this.breadcrumbOpt[1].breadcrumbName = '编辑'\r\n this.modifychoData(val)\r\n } else {\r\n this.breadcrumbOpt[1].breadcrumbName = '添加'\r\n this.parameter.projectId = (this.projectData && this.projectData.length > 0) ? this.projectData[0].id : ''\r\n this.parameter.buildingId = (this.buildingData && this.buildingData.length > 0) ? this.buildingData[0].id : ''\r\n this.orgValue = utils.getAllParentArr(this.orgTree, this.orgId, 'id', 'children')\r\n this.parameter.assetType = utils.getDictItemsFromCache('zclx')[0].value\r\n this.parameter.assetBusiness = utils.getDictItemsFromCache('zcyt')[0].value\r\n this.parameter.assetSrc = utils.getDictItemsFromCache('xmly')[0].value\r\n this.parameter.assetNature = utils.getDictItemsFromCache('xmsx')[0].value\r\n this.parameter.assetBelong = utils.getDictItemsFromCache('xmgs')[0].value\r\n this.parameter.assetDecorate = utils.getDictItemsFromCache('zxzt')[0].value\r\n this.parameter.assetStatus = utils.getDictItemsFromCache('zczt')[0].value\r\n this.$set(this.parameter)\r\n this.$nextTick(() => {\r\n this.handelOrg()\r\n })\r\n }\r\n },\r\n //获取修改回显数据\r\n modifychoData(val) {\r\n api.detailsData(val.id, res => {\r\n if (res) {\r\n this.parameter = res\r\n console.log(res);\r\n if (res.belongsOrgId) {\r\n // let orgId = utils.trimSpace(res.belongsOrgFullId.split('.')).pop()\r\n this.orgValue = utils.getAllParentArr(this.orgTree, res.belongsOrgId, 'id', 'children')\r\n }\r\n if (res.assetBusinessWarrents && res.assetBusinessWarrents.warrentsOrgId) {\r\n // let orgId = utils.trimSpace(res.belongsOrgFullId.split('.')).pop()\r\n this.warrentsValue = utils.getAllParentArr(this.orgTree, res.assetBusinessWarrents.warrentsOrgId, 'id', 'children')\r\n }\r\n if (res.assetBusinessUse && res.assetBusinessUse.fillYear) {\r\n this.parameter.assetBusinessUse.fillYear = this.parameter.assetBusinessUse.fillYear.toString()\r\n }\r\n }\r\n })\r\n },\r\n //获取项目下拉\r\n getProject() {\r\n api.projectQquery({\r\n pageBean: {\r\n pageSize: -1,\r\n page: 1\r\n }\r\n }, res => {\r\n if (res.rows) {\r\n this.projectData = res.rows\r\n }\r\n })\r\n },\r\n //获取楼栋\r\n getBuilding() {\r\n api.buildingQquery({\r\n pageBean: {\r\n pageSize: -1,\r\n page: 1\r\n }\r\n }, res => {\r\n if (res.rows) {\r\n this.buildingData = res.rows\r\n }\r\n })\r\n },\r\n //获取组织树\r\n getUserOrgTree() {\r\n api.getUserOrgTree(this.orgId, res => {\r\n if (res) {\r\n this.orgTree = res\r\n }\r\n })\r\n },\r\n //绑定单位\r\n handelOrg() {\r\n let data = this.$refs[\"cascader\"].getCheckedNodes()[0].data\r\n this.parameter.belongsOrgFullId = data.path\r\n this.parameter.belongsOrgId = data.id\r\n this.parameter.belongsOrgName = data.name\r\n },\r\n //绑定权属\r\n handelWarrents() {\r\n let data = this.$refs[\"warrentsCascader\"].getCheckedNodes()[0].data\r\n this.parameter.assetBusinessWarrents.warrentsOrgId = data.id\r\n this.parameter.assetBusinessWarrents.warrentsOrgName = data.name\r\n },\r\n // 关闭//面包屑点击\r\n handleClose() {\r\n this.$emit('closeComponent')\r\n this.active = 0\r\n this.parameter = {\r\n assetBusinessWarrents: {\r\n isGetWarrents: 0,\r\n isMortgage: 0,\r\n warrentsOrgId: null,\r\n warrentsNo: null\r\n },\r\n assetBusinessUse: {}\r\n }\r\n this.$refs.formInfo.clearValidate()\r\n },\r\n // 保存\r\n addBtn() {\r\n this.$refs.formInfo.validate(valid => {\r\n if (valid) {\r\n if (this.breadcrumbOpt[1].breadcrumbName === '添加') {\r\n api.addData(this.parameter, res => {\r\n if (res.state) {\r\n this.$message.success('保存成功')\r\n this.handleClose()\r\n }\r\n })\r\n } else if (this.breadcrumbOpt[1].breadcrumbName === '编辑') {\r\n api.editData(this.parameter, res => {\r\n if (res.state) {\r\n this.$message.success('编辑成功')\r\n this.handleClose()\r\n }\r\n })\r\n }\r\n }\r\n })\r\n },\r\n //单选框取消选中\r\n clickitemdataType( value) {\r\n this.parameter.isOutAsset= value == this.parameter.isOutAsset ? '' : value\r\n },\r\n // 下一步\r\n next(num) {\r\n if (num > 0) {\r\n this.$refs.formInfo.validate(valid => {\r\n if (valid) {\r\n this.active += num\r\n }\r\n })\r\n } else {\r\n this.active += num\r\n }\r\n }\r\n }\r\n}\r\n",null]}