{"remainingRequest":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\SupplierManagement\\onboardingSupplier\\component\\onboardingAddDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\SupplierManagement\\onboardingSupplier\\component\\onboardingAddDialog.vue","mtime":1720730442290},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_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.object.keys\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\nimport _defineProperty from \"D:/jenkins/workspace/jd_cgpt_fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 supplierManger from '@/api/supplierManger.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport Breadcrumb from '@/components/Breadcrumb/index.vue';\nimport utils from '@/utils.js';\nimport expertPoolUnits from \"./expertPoolUnits.vue\";\nimport expertOrgUnits from \"./expertOrgUnits.vue\";\nimport { mapState } from 'vuex';\nimport classificationDialog from \"./classificationDialog.vue\";\nimport multipleInput from \"../../blacklistSupplier/component/multipleInput.vue\";\nimport { file } from 'jszip';\nexport default {\n name: 'domesticDialog',\n components: {\n Breadcrumb: Breadcrumb,\n expertPoolUnits: expertPoolUnits,\n expertOrgUnits: expertOrgUnits,\n dictUtils: dictUtils,\n multipleInput: multipleInput,\n classificationDialog: classificationDialog\n },\n props: {\n editData: Object\n },\n data: function data() {\n return {\n saveing: false,\n breadcrumbOpt: [{\n breadcrumbName: '供应商准入'\n }, {\n breadcrumbName: '新增'\n }],\n rules: {\n enterpriseName: [{\n required: true,\n message: '请选择企业名称',\n trigger: ['blur', 'change']\n }],\n level: [{\n required: true,\n message: '请选择供应商分级',\n trigger: ['blur', 'change']\n }],\n supplierName: [{\n required: true,\n message: '请选择供应商名称',\n trigger: ['blur', 'change']\n }],\n categoryName: [{\n required: true,\n message: '请选择供应商分类',\n trigger: ['blur', 'change']\n }],\n needProvideQualifications: [{\n required: true,\n message: '请选择资质',\n trigger: ['blur', 'change']\n }],\n qualificationsCodeList: [{\n required: true,\n message: '请选择资质类型',\n trigger: ['blur', 'change']\n }]\n },\n parameter: {\n type: 1,\n categoryCode: '',\n level: '',\n reviewStatus: 1,\n needProvideQualifications: 1,\n qualificationsCodeList: [],\n suppliersQualificationList: [],\n supplierTypeId: '',\n categoryName: '',\n qualificationLabelList: []\n },\n options: [],\n classList: [],\n form: {\n qualificationLabelList: []\n },\n suppliersQualificationList: [],\n enterpriseList: [],\n list: [],\n accessoryList: [],\n supplierList: [],\n loading: false,\n currentData: []\n };\n },\n created: function created() {\n this.supplierList = [];\n this.currentUser = JSON.parse(sessionStorage.getItem('currentUserDetail'));\n this.parameter.supplierId = this.currentUser.org[0].orgId;\n this.parameter.supplierName = this.currentUser.org[0].orgName;\n this.parameter.supplierCode = this.currentUser.org[0].orgCode;\n this.supplierList = [{\n id: this.currentUser.org[0].orgId,\n name: this.currentUser.org[0].orgName,\n code: this.currentUser.org[0].orgCode\n }];\n this.addModifyBtn();\n this.getQualification();\n this.getQualificationData();\n },\n computed: _objectSpread({}, mapState({\n headers: function headers(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n },\n action: function action() {\n return window.context.portal + '/biz/universal/v1/minioUpload';\n }\n })),\n methods: {\n handleInput: function handleInput() {\n this.$refs['class'].add();\n },\n open: function open(type) {\n this.$refs[type].add();\n },\n deleteTags: function deleteTags(index, key) {\n if (!index) {\n this[key] = [];\n } else {\n this[key].splice(index, 1);\n }\n\n if (key === 'enterpriseList') {\n this.$set(this.parameter, 'enterpriseName', '');\n this.$set(this.parameter, 'enterpriseId', '');\n this.$set(this.parameter, 'enterpriseCode', '');\n }\n\n console.log(this.parameter);\n },\n addDetail: function addDetail(list, key) {\n console.log(list, key);\n this[key] = list;\n\n if (key === 'enterpriseList') {\n this.$set(this.parameter, 'enterpriseName', list[0].name);\n this.$set(this.parameter, 'enterpriseId', list[0].id);\n this.$set(this.parameter, 'enterpriseCode', list[0].code);\n } else {\n var arr = [];\n list.forEach(function (item) {\n arr.push(item.name);\n });\n this.$set(this.parameter, 'supplierName', arr.join(','));\n console.log(this.parameter);\n }\n },\n getClass: function getClass(list) {\n this.parameter.categoryCode = list[0].code;\n this.parameter.categoryName = list[0].name;\n this.parameter.supplierTypeId = list[0].id;\n },\n getByIdData: function getByIdData(id) {\n var _this = this;\n\n supplierManger.getByIdManage(id).then(function (res) {\n console.log(res, 'ress');\n _this.loading = false;\n var data = res.data;\n _this.enterpriseList = [{\n id: data.enterpriseId,\n code: data.enterpriseCode,\n name: data.enterpriseName\n }];\n _this.supplierList = [{\n id: data.supplierId,\n code: data.supplierCode,\n name: data.supplierName\n }];\n _this.parameter = data;\n\n if (_this.parameter.qualificationsCode) {\n _this.parameter.qualificationsCodeList = _this.parameter.qualificationsCode.split(',');\n }\n });\n },\n getQualification: function getQualification() {\n var _this2 = this;\n\n var params = {\n pageBean: {\n page: -1,\n pageSize: -1\n }\n };\n this.$http.post('${portal}/bizQualificationCategory/v1/page', params).then(function (res) {\n if (res.data.state) {\n var data = res.data.value.rows;\n _this2.options = data;\n }\n });\n },\n changeCode: function changeCode(val) {\n var _this3 = this;\n\n console.log(val, 'val');\n var data = dictUtils.getDictItemsFromCache('gysfl');\n data.forEach(function (item) {\n if (item.value == val) {\n _this3.parameter.categoryName = item.name;\n }\n });\n },\n changeStatus: function changeStatus(val) {\n if (val == 1) {\n this.parameter.reviewStatus = 0;\n } else {\n this.parameter.reviewStatus = 2;\n }\n },\n changeQua: function changeQua(val) {\n var _this4 = this;\n\n console.log(val);\n this.parameter.qualificationsCode = val.join(',');\n\n if (this.breadcrumbOpt[1].breadcrumbName === '编辑') {\n this.suppliersQualificationList = [];\n this.options.forEach(function (item) {\n val.forEach(function (v) {\n if (item.code == v) {\n _this4.suppliersQualificationList.push({\n qualificationCategoryId: item.id,\n qualificationCategoryCode: item.code,\n qualificationCategoryName: item.name,\n fileSize: item.fileSize,\n fileNum: item.fileNum\n });\n }\n });\n console.log(_this4.suppliersQualificationList, 1111111111);\n });\n } else {\n this.suppliersQualificationList = [];\n this.options.forEach(function (item) {\n val.forEach(function (v) {\n if (item.code == v) {\n _this4.suppliersQualificationList.push({\n qualificationCategoryId: item.id,\n qualificationCategoryCode: item.code,\n qualificationCategoryName: item.name,\n fileSize: item.fileSize,\n fileNum: item.fileNum\n });\n }\n });\n });\n }\n\n this.$forceUpdate();\n },\n // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用,function(file, accessoryList)\n handleSuccess: function handleSuccess(res, item, index) {\n this.loading = false;\n\n if (res.state) {\n this.loading = false;\n } else {\n this.loading = false;\n }\n\n this.accessoryList = [];\n this.accessoryList.push(res.value);\n item.qualificationLabelList.push({\n qualificationMemberId: this.parameter.supplierId,\n qualificationMember: this.parameter.supplierName,\n qualificationCode: '',\n qualificationAcquisitionDate: '',\n expiryDate: '',\n qualificationName: '',\n accessoryList: this.accessoryList,\n name: res.value.name,\n createTime: res.value.createTime,\n qualificationTypeCode: item.qualificationTypeCode,\n qualificationTypeName: item.qualificationTypeName\n });\n item.qualificationMemberId = this.parameter.supplierId;\n item.qualificationMember = this.parameter.supplierName;\n this.parameter.qualificationLabelList = this.list;\n this.$forceUpdate();\n },\n updateFile: function updateFile() {\n this.loading = true;\n },\n getQualificationData: function getQualificationData() {\n var _this5 = this;\n\n var params = {\n pageBean: {\n page: -1,\n pageSize: -1\n },\n querys: []\n };\n params.querys.push({\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'qualificationMemberId',\n relation: 'AND',\n value: this.parameter.supplierId\n });\n this.$http.post('${portal}/bizQualificationLabel/v1/page', params).then(function (res) {\n _this5.currentData = res.data.value.rows;\n });\n },\n //下载按钮回调\n downloadFile: function downloadFile(name, url) {\n console.log(name, 'name');\n var a = document.createElement('a');\n var event = new MouseEvent('click');\n a.download = name;\n a.target = '_blank';\n a.href = url;\n a.dispatchEvent(event);\n },\n // 删除\n deleteHandle: function deleteHandle(row, i) {\n var _this6 = this;\n\n this.$confirm('是否确认删除该附件', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n if (row.id) {\n _this6.$http.post('${portal}/biz/universal/v1/delete?ids=' + row.id).then(function (res) {\n if (res.data.state) {\n _this6.$message.success('删除成功');\n\n _this6.modifychoData(_this6.$route.query.editRows);\n }\n });\n } else {\n _this6.list.forEach(function (item) {\n if (item.qualificationLabelList) {\n item.qualificationLabelList.forEach(function (val, index) {\n if (val.qualificationTypeCode == row.qualificationTypeCode && index == i) {\n item.qualificationLabelList.splice(index, 1);\n }\n });\n }\n });\n }\n });\n },\n getAdmission: function getAdmission() {\n var _this7 = this;\n\n var params = {\n pageBean: {\n page: -1,\n pageSize: -1\n },\n querys: []\n };\n params.querys.push({\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'b.ENTERPRISE_ID_',\n relation: 'AND',\n value: this.enterpriseList[0].id\n }, {\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'b.VENDOR_CATEGORY_ID_',\n relation: 'AND',\n value: this.parameter.supplierTypeId\n }, {\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'b.LEVEL_',\n relation: 'AND',\n value: this.parameter.level\n });\n this.$http.post('${portal}/admissionConfigQualification/v1/queryByPage', params).then(function (res) {\n _this7.list = res.data.rows;\n\n _this7.list.forEach(function (item) {\n item['qualificationLabelList'] = [];\n item.qualificationTypeCode = item.code;\n item.qualificationTypeName = item.name;\n delete item.id;\n });\n });\n },\n changeLevel: function changeLevel(val) {\n this.getAdmission();\n },\n //编辑\n addModifyBtn: function addModifyBtn() {\n var id = this.$route.params.id;\n\n if (id) {\n this.loading = true;\n this.getByIdData(id);\n this.breadcrumbOpt[1].breadcrumbName = '编辑';\n } else {\n this.breadcrumbOpt[1].breadcrumbName = '新增';\n }\n },\n // 关闭//面包屑点击\n handleClose: function handleClose() {\n if (this.breadcrumbOpt[1].breadcrumbName === '编辑') {\n this.$router.push({\n name: 'onboardingSupplier',\n params: {\n pageBean: this.$route.query.pageBean\n }\n });\n } else {\n this.$router.push({\n name: 'onboardingSupplier'\n });\n }\n\n this.active = 0; // this.$emit('closeComponent')\n\n this.parameter = {}; // this.$refs.formInfo.clearValidate()\n },\n // 保存\n handleSave: function handleSave() {\n var _this8 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n _this8.saveing = true;\n\n if (_this8.suppliersQualificationList.length != 0) {\n _this8.parameter.suppliersQualificationList = _this8.suppliersQualificationList;\n }\n\n var params = _objectSpread(_objectSpread({}, _this8.parameter), {}, {\n supplierList: _this8.supplierList\n });\n\n var arr = [];\n\n _this8.list.forEach(function (item) {\n item.qualificationLabelList.forEach(function (val) {\n arr.push(val);\n });\n });\n\n params.qualificationLabelList = arr;\n console.log(params, 'params');\n supplierManger.saveManage(params).then(function (res) {\n _this8.saveing = false;\n\n if (res.data.state) {\n _this8.$confirm('保存成功,是否返回列表页?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'success'\n }).then(function () {\n _this8.$router.push({\n name: 'onboardingSupplier'\n });\n });\n } else {\n _this8.loading = false;\n\n _this8.$message.error('保存失败!');\n }\n });\n }\n });\n }\n }\n};",null]}