{"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\\BasicDataManagement\\materialManagement\\component\\materialeditAddDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\BasicDataManagement\\materialManagement\\component\\materialeditAddDialog.vue","mtime":1718397607285},{"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/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 basicData from '@/api/basicData';\nimport Breadcrumb from '@/components/Breadcrumb/index.vue';\nexport default {\n name: 'domesticDialog',\n components: {\n Breadcrumb: Breadcrumb\n },\n props: {\n editData: Object\n },\n data: function data() {\n return {\n breadcrumbOpt: [{\n breadcrumbName: '物料分类'\n }, {\n breadcrumbName: '新增'\n }],\n judgmentValue: '1',\n options: [],\n yqcList: [],\n saveing: false,\n rules: {\n name: [{\n required: true,\n message: '请输入分类名称',\n trigger: 'blur'\n }],\n judgmentValue: [{\n required: true,\n message: '请选择是否是第一级',\n trigger: 'blur'\n }],\n parentCode: [{\n required: true,\n message: '请选择上级分类',\n trigger: 'blur'\n }],\n code: [{\n required: true,\n message: '请输入分类编号',\n trigger: 'blur'\n }]\n },\n parameter: {\n name: '',\n code: '',\n parentCode: '',\n is_dele_: 0,\n yqcCategoryName: '',\n yqcCategoryCode: '',\n parentId: '',\n status: '1'\n }\n };\n },\n created: function created() {\n this.selectTree();\n this.addModifyBtn();\n this.getYqc();\n },\n mounted: function mounted() {},\n methods: {\n cascaderChange: function cascaderChange(val) {\n this.parameter.parentCode = this.$refs['cascader'].getCheckedNodes()[0].data.code;\n this.parameter.parentId = this.$refs['cascader'].getCheckedNodes()[0].data.id;\n },\n //查询物料分类树结构\n selectTree: function selectTree() {\n var _this = this;\n\n basicData.bizMaterialCategorySelectTree().then(function (res) {\n _this.options = res.value;\n });\n },\n // 获取渝企采分类\n getYqc: function getYqc() {\n var _this2 = this;\n\n var data = {\n pageBean: {\n page: -1,\n pageSize: -1\n }\n };\n this.$http.post('${portal}/yqcGovernmentCategory/v1/page', data).then(function (res) {\n if (res.data.message) {\n _this2.yqcList = res.data.value.rows;\n }\n });\n },\n //编辑\n addModifyBtn: function addModifyBtn() {\n console.log(this.$route.query.editRows);\n\n if (this.$route.query.editRows) {\n if (this.$route.query.editRows.parentCode === '1') {\n this.judgmentValue = '1';\n } else {\n this.judgmentValue = '0';\n }\n\n this.breadcrumbOpt[1].breadcrumbName = '编辑';\n this.modifychoData(this.$route.query.editRows);\n } else if (this.$route.query.code) {\n this.judgmentValue = '0';\n this.breadcrumbOpt[1].breadcrumbName = '添加下级';\n this.parameter.parentCode = this.$route.query.code.code;\n this.parameter.parentId = this.$route.query.code.id;\n } else {\n this.breadcrumbOpt[1].breadcrumbName = '新增';\n }\n },\n //获取修改回显数据\n modifychoData: function modifychoData(val) {\n console.log(val, 'val');\n this.parameter = val;\n this.parameter.yqcCategory = val.yqcCategoryCode;\n },\n // 关闭//面包屑点击\n handleClose: function handleClose() {\n if (this.breadcrumbOpt[1].breadcrumbName === '编辑' || this.breadcrumbOpt[1].breadcrumbName === '添加下级') {\n this.$router.push({\n name: 'materialManagement',\n params: {\n tabsActiveName: 'materialClassification',\n pageBean: this.$route.query.pageBean\n }\n });\n } else {\n this.$router.push({\n name: 'materialManagement',\n params: {\n tabsActiveName: 'materialClassification'\n }\n });\n }\n\n this.parameter = {};\n },\n changeYqc: function changeYqc(val) {\n var _this3 = this;\n\n this.parameter.yqcCategoryCode = val;\n this.yqcList.forEach(function (item) {\n if (val == item.code) {\n _this3.parameter.yqcCategoryName = item.name;\n }\n });\n this.$forceUpdate();\n },\n // 保存\n handleSave: function handleSave() {\n var _this4 = this;\n\n if (this.judgmentValue === '1') {\n this.parameter.parentCode = 1;\n this.parameter.parentId = 1;\n } // this.parameter.parentCode = this.parameter.parentCode.join(',')\n\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n _this4.saveing = true;\n basicData.bizMaterialCategorySaveCategory(_this4.parameter).then(function (res) {\n _this4.saveing = false;\n\n if (res.state) {\n _this4.$message.success(res.message);\n\n if (_this4.breadcrumbOpt[1].breadcrumbName === '编辑') {\n _this4.$router.push({\n name: 'materialManagement',\n params: {\n tabsActiveName: 'materialClassification',\n pageBean: _this4.$route.query.pageBean\n }\n });\n } else {\n _this4.$router.push({\n name: 'materialManagement',\n params: {\n tabsActiveName: 'materialClassification'\n }\n });\n }\n }\n });\n }\n });\n }\n }\n};",null]}