{"remainingRequest":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\cqlt-fvue\\src\\views\\configureInfo\\cashFlowBudget\\components\\cashFlowBudgetDetails.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\src\\views\\configureInfo\\cashFlowBudget\\components\\cashFlowBudgetDetails.vue","mtime":1693992862301},{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.array.includes\";\nimport \"core-js/modules/es6.string.includes\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/web.dom.iterable\";\nimport _defineProperty from \"D:/jenkins/workspace/cqlt-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { mapState } from 'vuex';\nimport { TableMixin } from '@/mixins/tableMixin';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport cashFlowBudget from '@/api/configureInfo/cashFlowBudget.js';\nexport default {\n name: 'cashFlowBudgetDetails',\n components: {},\n mixins: [TableMixin],\n data: function data() {\n return {\n hasData: false,\n loading: false,\n dialogloading: false,\n tableData: [],\n tableHearder: {},\n // 表头\n multipleSelection: [],\n queryParam: {\n pageBean: {\n page: 1,\n pageSize: -1\n }\n },\n total: 0,\n jbList: [],\n parentId: 0,\n sortList: {},\n title: '',\n id: '',\n dialogVisible: false,\n actionUrl: '',\n uploadData: {\n mainId: ''\n },\n modifyData: {},\n totalheader: ['Total', 'Consolidation Posting', 'Consolidated Financial Statement'],\n totalKey: {\n Total: 'budgetTotal',\n 'Consolidation Posting': 'budgetPosting',\n 'Consolidated Financial Statement': 'budgetConsolidated'\n },\n statementData: {}\n };\n },\n watch: {},\n created: function created() {\n this.statementData = JSON.parse(window.localStorage.getItem(\"statementData\"));\n\n if (this.$i18n.locale === 'zh-CN') {\n this.jbList = dictUtils.getDictItemsFromCache('jb');\n } else {\n this.jbList = dictUtils.getDictItemsFromCache('jb_en');\n }\n\n this.actionUrl = window.context.portal;\n console.log(this.$route.query);\n this.title = this.$route.query.name ? this.$route.query.name : '编辑';\n this.id = this.$route.query.id;\n this.uploadData.mainId = this.$route.query.id;\n this.title == '编辑' ? this.getData() : '';\n },\n computed: mapState({\n header: function header(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n }\n }),\n mounted: function mounted() {},\n methods: {\n changeData: function changeData(value, code, column) {\n if (this.modifyData[code]) {\n this.modifyData[code][column] = value;\n } else {\n this.modifyData[code] = _defineProperty({}, column, value);\n }\n },\n //获取数据\n getData: function getData() {\n var _this = this;\n\n this.loading = true;\n this.queryParam.querys = [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'mainId',\n relation: 'AND',\n value: this.id\n }];\n cashFlowBudget.headerDetailQuery(this.queryParam, function (res) {\n console.log(res);\n\n if (res.state) {\n console.log(res);\n var length = res.value.length;\n\n if (length) {\n _this.hasData = true;\n _this.tableHearder = res.value[0];\n delete _this.tableHearder.subjectName;\n delete _this.tableHearder.subjectCode;\n delete _this.tableHearder.subjectUnit;\n delete _this.tableHearder.subjectLevel;\n delete _this.tableHearder.Total;\n delete _this.tableHearder['Consolidation Posting'];\n delete _this.tableHearder['Consolidated Financial Statement'];\n res.value.splice(0, 1);\n _this.tableData = res.value;\n var tempData = res.value;\n tempData.forEach(function (item) {\n var space = '';\n var level = parseInt(item.subjectLevel);\n\n if (level) {\n for (var i = 1; i <= level; i++) {\n space += '\\xa0';\n }\n }\n\n item.subjectName = space + item.subjectName;\n });\n\n _this.$set(_this.tableData);\n } else {\n _this.hasData = false;\n }\n }\n\n _this.loading = false;\n });\n },\n //保存\n handleSave: function handleSave() {\n var _this2 = this;\n\n var keys = Object.keys(this.modifyData);\n\n if (!keys.length) {\n this.$message({\n message: this.$t('report.unchanged'),\n type: 'warning'\n });\n } else {\n // 数据提交格式组装\n // dataUpload 动态字段\n // totalListUpload 固定统计字段\n // 动态字段格式\n // [{\n // subjectCode:'',\n // budgetYtd:'',\n // enterpriseCode: ''\n // },{\n // subjectCode:'',\n // budgetYtd:'',\n // enterpriseCode: ''\n // }]\n // 固定统计字段格式\n // [{\n // subjectCode:'',\n // budgetTotal:'',\n // budgetPosting: '',\n // budgetConsolidated:''\n // },{\n // subjectCode:'',\n // budgetTotal:'',\n // budgetPosting: '',\n // budgetConsolidated:''\n // }]\n var dataUpload = [];\n var totalListUpload = [];\n\n for (var key in this.modifyData) {\n var totalObj = {};\n\n for (var valKey in this.modifyData[key]) {\n var obj = {};\n obj.subjectCode = key;\n\n if (!this.totalheader.includes(valKey)) {\n obj.enterpriseCode = valKey;\n obj.budgetYtd = this.modifyData[key][valKey];\n dataUpload.push(obj);\n }\n\n if (this.totalheader.includes(valKey)) {\n totalObj.subjectCode = key;\n totalObj[this.totalKey[valKey]] = this.modifyData[key][valKey];\n }\n }\n\n if (totalObj.subjectCode) {\n totalListUpload.push(totalObj);\n }\n }\n\n cashFlowBudget.batchUpdateData({\n id: this.id,\n list: dataUpload,\n totalList: totalListUpload\n }, function (res) {\n if (res.state) {\n _this2.modifyData = {};\n\n _this2.$notify({\n type: 'success',\n message: _this2.$t('domestic.success'),\n duration: 2000\n });\n\n _this2.getData(); // this.$router.go(-1)\n\n }\n });\n }\n },\n handleClose: function handleClose() {\n this.dialogVisible = false;\n },\n //导出\n exportKPL: function exportKPL() {\n cashFlowBudget.export(this.queryParam, function (res) {});\n },\n //导入运营kpl数据\n importKPL: function importKPL() {\n var _this3 = this;\n\n if (!this.tableData.length) {\n this.dialogVisible = true;\n } else {\n this.$confirm(this.$t('report.importCoverTips'), this.$t('common.tips'), {\n confirmButtonText: this.$t('common.confirm'),\n cancelButtonText: this.$t('common.cancel'),\n type: 'warning'\n }).then(function () {\n _this3.dialogVisible = true;\n }).catch(function () {});\n }\n },\n //上传成功\n handleAvatarSuccess: function handleAvatarSuccess(res, file) {\n this.dialogVisible = false;\n this.dialogloading = false;\n this.$notify({\n type: 'success',\n message: this.$t('domestic.success'),\n duration: 2000\n });\n this.getData();\n },\n handleAvatarError: function handleAvatarError(err, file, fileList) {\n this.dialogVisible = false;\n this.dialogloading = false;\n this.$notify({\n type: 'error',\n message: this.$t('domestic.failure'),\n duration: 2000\n });\n },\n handleProgress: function handleProgress(event, file, fileList) {\n this.dialogloading = true;\n }\n }\n};",null]}