{"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\\customerSales\\components\\customerSalesDetails.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\src\\views\\configureInfo\\customerSales\\components\\customerSalesDetails.vue","mtime":1677054004491},{"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.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.array.find-index\";\nimport _toConsumableArray from \"D:/jenkins/workspace/cqlt-fvue/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\nimport _defineProperty from \"D:/jenkins/workspace/cqlt-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.function.name\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 customerSales from '@/api/configureInfo/customerSales.js';\nexport default {\n name: 'InternationalSubject',\n components: {},\n mixins: [TableMixin],\n data: function data() {\n return {\n loading: false,\n config: {\n product: '',\n actual: '',\n budget: '',\n deviationRate: '',\n deviation: '',\n actualYtd: '',\n budgetYtd: '',\n deviationRateYtd: '',\n deviationYtd: ''\n },\n tableData: [{\n product: '',\n actual: '',\n budget: '',\n deviationRate: '',\n deviation: '',\n actualYtd: '',\n budgetYtd: '',\n deviationRateYtd: '',\n deviationYtd: '',\n fakeId: 0\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 };\n },\n watch: {},\n created: function created() {\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 this.title = 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 pasteMe: function pasteMe(e) {\n var source = e.clipboardData.getData('Text'); // 首先对源头进行解析\n\n var rows = source.split('\\n'); // 拆成很多行\n // if (rows.length - 1 > this.tableData.length) {\n // \tthis.$notify.error({\n // \t\ttitle: '错误',\n // \t\tmessage: '赋值内容超出配置内容,请重试',\n // \t})\n // \treturn\n // }\n // console.log(rows, 'rows')\n\n var keys = Object.keys(this.config); // 配置需要填写的keys的名\n // console.log(keys, 'keys')\n\n var arr = [];\n\n for (var i = 0; i < rows.length - 1; i++) {\n if (rows[i] !== '') {\n var columns = rows[i].split('\\t'); // 已经按列划分\n // console.log(columns, '1111')\n\n var dataone = {}; // 声明一行数组\n\n for (var j = 0; j < columns.length; j++) {\n // 读取demo里的第j对应的key值\n dataone[keys[j]] = columns[j];\n }\n\n for (var _i = 0, _Object$keys = Object.keys(dataone); _i < _Object$keys.length; _i++) {\n var item = _Object$keys[_i];\n dataone[item] = dataone[item].replace(\" %\", \"\");\n\n if (item == 'fillDate') {\n var fillDate = dataone['fillDate'].replace('年', '-').replace('月', '-').replace('日', '').split('-');\n\n if (fillDate[1] < 10) {\n fillDate[1] = '0' + fillDate[1];\n }\n\n if (fillDate[2] < 10) {\n fillDate[2] = '0' + fillDate[2];\n }\n\n dataone['fillDate'] = fillDate.join('-');\n }\n }\n\n this.tableData[i] = _objectSpread(_objectSpread({}, this.tableData[i]), dataone);\n this.tableData[i].fakeId = i;\n }\n }\n\n this.tableData = _toConsumableArray(this.tableData);\n },\n //获取数据\n getData: function getData() {\n var _this = this;\n\n this.queryParam.querys = [{\n group: \"main\",\n operation: \"EQUAL\",\n parentGroup: \"\",\n property: \"mainId\",\n relation: \"AND\",\n value: this.id\n }];\n customerSales.detailQuery(this.queryParam, function (res) {\n if (res.rows) {\n _this.tableData = res.rows.length > 0 ? res.rows : [{}];\n\n _this.$set(_this.tableData);\n }\n });\n },\n //保存\n handleSave: function handleSave() {\n var _this2 = this;\n\n this.tableData.forEach(function (e) {\n delete e.id;\n delete e.fakeId;\n });\n\n if (this.title == '新增') {\n customerSales.saveData({\n id: this.id,\n list: this.tableData\n }, function (res) {\n if (res.state) {\n _this2.$notify({\n type: 'success',\n message: _this2.$t('domestic.success'),\n duration: 2000\n });\n\n _this2.$router.go(-1);\n }\n });\n } else if (this.title == '编辑') {\n customerSales.editData({\n id: this.id,\n list: this.tableData\n }, function (res) {\n if (res.state) {\n _this2.$notify({\n type: 'success',\n message: _this2.$t('domestic.success'),\n duration: 2000\n });\n\n _this2.$router.go(-1);\n }\n });\n }\n },\n //删除\n handleDelete: function handleDelete() {\n var _this3 = this;\n\n this.fakeMultipleSelection.forEach(function (m) {\n var index = _this3.tableData.findIndex(function (item) {\n return item.id === m;\n });\n\n _this3.tableData.splice(index, 1);\n });\n\n if (this.multipleSelection.length > 0) {\n customerSales.dleDetail(this.multipleSelection, function (res) {\n if (res.state) {\n _this3.$notify({\n type: 'success',\n message: _this3.$t('domestic.success'),\n duration: 2000\n });\n\n _this3.getData();\n }\n });\n }\n\n this.multipleSelection = [];\n this.fakeMultipleSelection = []; // 清空所有选中状态\n\n this.$refs.multipleSelection.clearSelection();\n },\n //表格选中\n handleSelectionChange: function handleSelectionChange(val) {\n var _this4 = this;\n\n this.multipleSelection = [];\n this.fakeMultipleSelection = [];\n this.$refs.multipleSelection.selection.forEach(function (item) {\n if (item.id) {\n _this4.multipleSelection.push(item.id);\n } else if (item.fakeId) {\n _this4.fakeMultipleSelection.push(item.fakeId);\n }\n });\n },\n handleClose: function handleClose() {\n this.dialogVisible = false;\n },\n //导出\n exportKPL: function exportKPL() {\n customerSales.export({\n pageBean: {\n page: 1,\n pageSize: -1\n }\n }, function (res) {});\n return;\n this.$http.post(this.actionUrl + '/qf/operation/product/export', {\n pageBean: {\n page: 1,\n pageSize: -1\n }\n }, {\n headers: {\n \"Content-Type\": \"multipart/form-data\"\n },\n responseType: 'blob'\n }).then(function (res) {\n var link = document.createElement('a'); // 创建元素\n\n var blob = new Blob([res.data], {\n type: 'application/vnd.ms-excel'\n });\n link.style.display = 'none';\n link.href = URL.createObjectURL(blob); // 创建下载的链接\n //num++\n\n link.setAttribute('download', '产品销售数据.xlsx'); // 给下载后的文件命名\n\n document.body.appendChild(link);\n link.click(); // 点击下载\n\n document.body.removeChild(link); // 下载完成移除元素\n\n window.URL.revokeObjectURL(link.href); // 释放掉blob对象\n });\n },\n //导入运营kpl数据\n importKPL: function importKPL() {\n var _this5 = this;\n\n if (!this.tableData[0].fakeId && !this.tableData[0].id) {\n this.dialogVisible = true;\n } else {\n this.$confirm('此操作将覆盖表格数据, 是否继续?', this.$t('common.tips'), {\n confirmButtonText: this.$t('common.confirm'),\n cancelButtonText: this.$t('common.cancel'),\n type: 'warning'\n }).then(function () {\n _this5.dialogVisible = true;\n }).catch(function () {});\n }\n },\n //上传成功\n handleAvatarSuccess: function handleAvatarSuccess(res, file) {\n this.dialogVisible = false;\n this.$notify({\n type: 'success',\n message: this.$t('domestic.success'),\n duration: 2000\n });\n this.getData();\n },\n //添加\n tableAdd: function tableAdd() {\n if (!this.tableData[0].fakeId && !this.tableData[0].id) {\n this.tableData[0].fakeId = 0;\n }\n\n this.tableData.push({\n fakeId: this.tableData.length,\n product: '',\n actual: '',\n budget: '',\n deviationRate: '',\n deviation: '',\n actualYtd: '',\n budgetYtd: '',\n deviationRateYtd: '',\n deviationYtd: ''\n });\n }\n }\n};",null]}