{"remainingRequest":"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\\informationAddDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\BasicDataManagement\\materialManagement\\component\\informationAddDialog.vue","mtime":1712868019941},{"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":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 basicData from '@/api/basicData'\r\nexport default {\r\n name: 'domesticDialog',\r\n components: {Breadcrumb},\r\n props: {\r\n editData: Object\r\n },\r\n data() {\r\n return {\r\n breadcrumbOpt: [{breadcrumbName: '物料数据'}, {breadcrumbName: '新增'}],\r\n options: [],\r\n saveing: false,\r\n rules: {\r\n matCompanyCode: [\r\n {\r\n required: true,\r\n message: '请输入企业编号',\r\n trigger: 'blur'\r\n }\r\n ],\r\n matCode: [\r\n {\r\n required: true,\r\n message: '请输入企业物料编号',\r\n trigger: 'blur'\r\n }\r\n ],\r\n matPlatcode: [\r\n {\r\n required: true,\r\n message: '请输入平台物料编号',\r\n trigger: 'blur'\r\n }\r\n ],\r\n matIfPlat: [\r\n {\r\n required: true,\r\n message: '请选择是否集中采购',\r\n trigger: 'blur'\r\n }\r\n ],\r\n matCategory: [\r\n {\r\n required: true,\r\n message: '请选择物料分类',\r\n trigger: 'blur'\r\n }\r\n ],\r\n matName: [\r\n {\r\n required: true,\r\n message: '请输入平台物料名称',\r\n trigger: 'blur'\r\n }\r\n ],\r\n matSpec: [\r\n {\r\n required: true,\r\n message: '请输入规格型号',\r\n trigger: 'blur'\r\n }\r\n ],\r\n matUnit: [\r\n {\r\n required: true,\r\n message: '请输入计量单位',\r\n trigger: 'blur'\r\n }\r\n ],\r\n matMaterial: [\r\n {\r\n required: true,\r\n message: '请选择物料牌号',\r\n trigger: 'blur'\r\n }\r\n ]\r\n },\r\n parameter: {\r\n matCompanyCode: '',\r\n matCode: '',\r\n matPlatcode: '',\r\n matSpec: '',\r\n matUnit: '',\r\n matMaterial: '',\r\n matCategory: '',\r\n matIfPlat: '',\r\n matCompanyId: '',\r\n matCompanyName: '',\r\n matStatus: '1'\r\n }\r\n }\r\n },\r\n created() {\r\n this.selectTree()\r\n this.addModifyBtn()\r\n this.currentUser = JSON.parse(sessionStorage.getItem('currentUserDetail'))\r\n this.parameter.matCompanyId = this.currentUser.org[0].orgId\r\n this.parameter.matCompanyName = this.currentUser.org[0].orgName\r\n // this.parameter.createBy = this.currentUser.user.userId\r\n // this.parameter.createName = this.currentUser.user.fullname\r\n },\r\n mounted() {},\r\n methods: {\r\n //查询物料分类树结构\r\n selectTree() {\r\n basicData.bizMaterialCategorySelectTree().then(res => {\r\n this.options = res.value\r\n })\r\n },\r\n //编辑\r\n addModifyBtn() {\r\n if (this.$route.query.editRows) {\r\n this.breadcrumbOpt[1].breadcrumbName = '编辑'\r\n this.modifychoData(this.$route.query.editRows)\r\n } else {\r\n this.breadcrumbOpt[1].breadcrumbName = '新增'\r\n }\r\n },\r\n //获取修改回显数据\r\n modifychoData(val) {\r\n this.parameter = val\r\n },\r\n // 关闭//面包屑点击\r\n handleClose() {\r\n if (this.breadcrumbOpt[1].breadcrumbName === '编辑') {\r\n this.$router.push({\r\n name: 'materialManagement',\r\n params: {\r\n tabsActiveName: 'itemData',\r\n pageBean: this.$route.query.pageBean\r\n }\r\n })\r\n } else {\r\n this.$router.push({\r\n name: 'materialManagement',\r\n params: {\r\n tabsActiveName: 'itemData'\r\n }\r\n })\r\n }\r\n this.parameter = {}\r\n },\r\n // 保存\r\n handleSave() {\r\n this.$refs.formInfo.validate(valid => {\r\n if (valid) {\r\n this.saveing = true\r\n basicData.bizMaterialSave(this.parameter).then(res => {\r\n this.saveing = false\r\n if (res.state) {\r\n this.$message.success(res.message)\r\n if (this.breadcrumbOpt[1].breadcrumbName === '编辑') {\r\n this.$router.push({\r\n name: 'materialManagement',\r\n params: {\r\n tabsActiveName: 'itemData',\r\n pageBean: this.$route.query.pageBean\r\n }\r\n })\r\n } else {\r\n this.$router.push({\r\n name: 'materialManagement',\r\n params: {\r\n tabsActiveName: 'itemData'\r\n }\r\n })\r\n }\r\n }\r\n })\r\n }\r\n })\r\n }\r\n }\r\n}\r\n",null]}