{"remainingRequest":"D:\\jenkins\\workspace\\ljzc-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\ljzc-fvue\\src\\views\\InvestmentFinancingAssets\\InvestmentFinancingEnter\\EquityRegistrationWarehousing\\components\\editAddDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\ljzc-fvue\\src\\views\\InvestmentFinancingAssets\\InvestmentFinancingEnter\\EquityRegistrationWarehousing\\components\\editAddDialog.vue","mtime":1701943659893},{"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\r\nimport Breadcrumb from '@/components/Breadcrumb/index.vue'\r\nimport utils from '@/utils.js'\r\nimport api from '@/api/InvestmentFinancingAssets/InvestmentFinancingEnter/EquityRegistrationWarehousing.js'\r\nexport default {\r\n name: 'domesticDialog',\r\n components: {Breadcrumb},\r\n data() {\r\n var checkStockName = (rule, value, callback) => {\r\n if (\r\n value === this.parameter.belongsOrgName &&\r\n rule.fullField !== 'structureList[0].stockName'\r\n ) {\r\n callback(new Error('股权公司不能与所属公司一致'))\r\n } else {\r\n callback()\r\n }\r\n }\r\n return {\r\n breadcrumbOpt: [\r\n {breadcrumbName: '股权登记入库'},\r\n {breadcrumbName: '添加'},\r\n ],\r\n cardTypeData: [],\r\n rules: {\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 pattern: /^[a-zA-Z0-9]+$/,\r\n message: '证件号码格式不正确',\r\n trigger: 'blur',\r\n },\r\n ],\r\n // contactTel: [\r\n // {\r\n // required: true,\r\n // message: '请输入联系电话',\r\n // trigger: 'blur'\r\n // },\r\n // {\r\n // pattern: /^1[3456789]\\d{9}$/,\r\n // message: '手机号码格式不正确',\r\n // trigger: 'blur'\r\n // }\r\n // ],\r\n equityRatio: [\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 belongsOrgId: [\r\n {\r\n required: true,\r\n message: '请选择所属公司',\r\n trigger: 'blur',\r\n },\r\n ],\r\n structureList: {\r\n stockName: [\r\n {\r\n required: true,\r\n message: '请输入股权公司',\r\n trigger: 'blur',\r\n },\r\n {\r\n required: true,\r\n validator: checkStockName,\r\n trigger: 'blur',\r\n },\r\n ],\r\n equityRatio: [\r\n {\r\n required: true,\r\n message: '请输入股权占比',\r\n trigger: 'blur',\r\n },\r\n ],\r\n },\r\n },\r\n orgValue: [],\r\n orgTree: [], //组织树\r\n parameter: {\r\n structureList: [\r\n {\r\n stockName: null,\r\n equityRatio: null,\r\n },\r\n ],\r\n assetNature: '0',\r\n investmentWays: '0',\r\n },\r\n orgId: '', //组织id\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 },\r\n mounted() {},\r\n methods: {\r\n //编辑\r\n addModifyBtn(val) {\r\n this.$set(this.parameter)\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.orgValue = utils.getAllParentArr(\r\n this.orgTree,\r\n this.orgId,\r\n 'id',\r\n 'children'\r\n )\r\n // this.$set(this.orgValue)\r\n this.$nextTick(() => {\r\n this.handelCascader()\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 modifychoData(val) {\r\n api.detailsData(val.id, (res) => {\r\n if (res) {\r\n this.parameter = res\r\n if (res.belongsOrgFullId) {\r\n let orgId = utils\r\n .trimSpace(res.belongsOrgFullId.split('.'))\r\n .pop()\r\n this.orgValue = utils.getAllParentArr(\r\n this.orgTree,\r\n orgId,\r\n 'id',\r\n 'children'\r\n )\r\n }\r\n }\r\n })\r\n },\r\n //绑定所属公司\r\n handelCascader() {\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 this.parameter.structureList[0].stockName = data.name\r\n },\r\n // 关闭//面包屑点击\r\n handleClose() {\r\n this.$emit('closeComponent')\r\n // this.orgValue = []\r\n this.parameter = {\r\n structureList: [\r\n {\r\n stockName: null,\r\n equityRatio: null,\r\n },\r\n ],\r\n assetNature: '0',\r\n investmentWays: '0',\r\n }\r\n this.$refs.formInfo.clearValidate()\r\n },\r\n // 保存\r\n handleSave(val) {\r\n this.$refs.formInfo.validate((valid) => {\r\n if (valid || val === -1) {\r\n if (this.breadcrumbOpt[1].breadcrumbName === '添加') {\r\n this.parameter.assetAudit = val\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 (\r\n this.breadcrumbOpt[1].breadcrumbName === '编辑'\r\n ) {\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 delEquity(ind) {\r\n this.parameter.structureList.splice(ind, 1)\r\n },\r\n // 增加股权结构\r\n addEquity() {\r\n this.parameter.structureList.push({\r\n stockName: null,\r\n equityRatio: null,\r\n })\r\n },\r\n // 改变股份占比\r\n changeEquityRatio(value) {\r\n this.parameter.structureList[0].equityRatio = value\r\n },\r\n },\r\n}\r\n",null]}