{"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\\ProjectManagement\\basicProject\\component\\basicAddDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\ProjectManagement\\basicProject\\component\\basicAddDialog.vue","mtime":1719607232277},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 purchaseMaterial from './purchaseMaterial.vue'\r\nimport procurementManagement from '@/api/procurementManagement'\r\nexport default {\r\n name: 'domesticDialog',\r\n components: {Breadcrumb, purchaseMaterial},\r\n props: {\r\n editData: Object,\r\n },\r\n data() {\r\n return {\r\n importData: {\r\n title: '物料导入',\r\n templateName: '物料导入模板.xls',\r\n downloadUrl: '/../fvue/static/excel/material.xlsx',\r\n importUrl: window.context.portal + '/biz/Gs/v1/importExcelData',\r\n showProject: true,\r\n header: '物料导入',\r\n },\r\n breadcrumbOpt: [{breadcrumbName: '采购制单'}, {breadcrumbName: '新增'}],\r\n saveing: false,\r\n flexAuto:true,\r\n methodUnitsList: [],\r\n qualificationList: [],\r\n activeName:'1',\r\n rules: {\r\n projectName: [\r\n {\r\n required: true,\r\n message: '请输入项目名称',\r\n trigger: 'blur',\r\n },\r\n ],\r\n projectNumber: [\r\n {\r\n required: true,\r\n message: '请输入项目编号',\r\n trigger: 'blur',\r\n },\r\n ],\r\n projectType: [\r\n {\r\n required: true,\r\n message: '请选择项目类型',\r\n trigger: 'blur',\r\n },\r\n ],\r\n purchasingOrgName: [\r\n {\r\n required: true,\r\n message: '请输入采购单位',\r\n trigger: 'blur',\r\n },\r\n ],\r\n projectUserName: [\r\n {\r\n required: true,\r\n message: '请输入项目负责人',\r\n trigger: 'blur',\r\n },\r\n ],\r\n constructionStartTime: [\r\n {\r\n required: true,\r\n message: '请选择建设开始时间',\r\n trigger: 'blur',\r\n },\r\n ],\r\n constructionCompletionTime: [\r\n {\r\n required: true,\r\n message: '请选择建设结束时间',\r\n trigger: 'blur',\r\n },\r\n ],\r\n investment: [\r\n {\r\n required: true,\r\n message: '请输入总投资',\r\n trigger: 'blur',\r\n },\r\n ],\r\n },\r\n procurementMethod: '',\r\n parameter: {\r\n purchasingOrgName: '',\r\n purchasingOrgCode: '',\r\n purchasingOrgId: '',\r\n projectType: '1',\r\n detailList: [],\r\n status: '1',\r\n },\r\n }\r\n },\r\n created() {\r\n this.addModifyBtn()\r\n this.currentUser = JSON.parse(sessionStorage.getItem('currentUserDetail'))\r\n this.parameter.purchasingOrgName = this.currentUser.org[0].orgName\r\n this.parameter.purchasingOrgCode = this.currentUser.org[0].orgCode\r\n this.parameter.purchasingOrgId = this.currentUser.org[0].orgId\r\n let moment = require('moment')\r\n this.parameter.applicationDate = moment().format('YYYY-MM-DD')\r\n },\r\n mounted() {},\r\n methods: {\r\n // 打开资质标签弹窗\r\n handleOpen() {\r\n this.$refs.visible.add()\r\n },\r\n refundData(data) {\r\n this.qualificationList = data\r\n this.parameter.qualificationList = data\r\n this.parameter.hasQualificationName = data\r\n .map((item) => {\r\n return item.qualificationName\r\n })\r\n .join(',')\r\n this.$forceUpdate()\r\n },\r\n // 打开物料弹窗\r\n openDialog() {\r\n this.$refs.troubleshooting.add()\r\n },\r\n changeZZ(val) {\r\n this.parameter.hasQualification = val\r\n },\r\n changeApplicationType(val) {\r\n this.parameter.applicationType = val\r\n if (val == 2) {\r\n if (this.parameter.detailList.length != 0) {\r\n this.parameter.detailList.forEach((item) => {\r\n item.matNum = 1\r\n })\r\n }\r\n } else {\r\n if (this.parameter.detailList.length != 0) {\r\n this.parameter.detailList.forEach((item) => {\r\n item.matNum = null\r\n })\r\n }\r\n }\r\n },\r\n addDetail(list) {\r\n console.log(list, 'llll')\r\n if (this.parameter.detailList.length == 1) {\r\n this.parameter.detailList = list\r\n this.parameter.detailList.forEach((item) => {\r\n item['matId'] = item.id\r\n })\r\n } else {\r\n list.forEach((item) => {\r\n let keep = true\r\n this.parameter.detailList.forEach((val, index) => {\r\n if (val.id == '') {\r\n this.parameter.detailList.splice(index, 1)\r\n }\r\n if (item.id == val.id) {\r\n keep = false\r\n }\r\n })\r\n if (keep) {\r\n this.parameter.detailList.push({\r\n matName: item.matName,\r\n matCode: item.matCode,\r\n matCompanyCode: item.matCompanyCode,\r\n matMaterial: item.matMaterial,\r\n matSpec: item.matSpec,\r\n matNum: item.matNum,\r\n matUnit: item.matUnit,\r\n procurementMethod: item.procurementMethod,\r\n matBrand: item.matBrand,\r\n demandDate: this.parameter.applicationDate,\r\n matBaseExt: item.matBaseExt,\r\n matOtherExt: item.matOtherExt,\r\n id: item.id,\r\n matId: item.id,\r\n key: new Date(),\r\n })\r\n }\r\n })\r\n }\r\n if (this.parameter.applicationType == 2) {\r\n this.parameter.detailList.forEach((item) => {\r\n item.matNum = 1\r\n })\r\n }\r\n },\r\n //列表删除行\r\n addTable() {\r\n this.parameter.detailList.push({\r\n matName: '',\r\n matCode: '',\r\n matCompanyCode: '',\r\n matMaterial: '',\r\n matSpec: '',\r\n matNum: '',\r\n matUnit: '',\r\n procurementMethod: '',\r\n matBrand: '',\r\n demandDate: this.parameter.applicationDate,\r\n matBaseExt: '',\r\n matOtherExt: '',\r\n id: '',\r\n matId: '',\r\n key: new Date(),\r\n })\r\n if (this.parameter.applicationType == 2) {\r\n this.parameter.detailList.forEach((item) => {\r\n item.matNum = 1\r\n })\r\n }\r\n },\r\n //列表删除行\r\n delTable(index, row) {\r\n this.parameter.detailList.splice(index, 1)\r\n // if (row.id) {\r\n // this.parameter.deleteDetailsId.push(row.id)\r\n // }\r\n },\r\n // 选择采购方式\r\n changeMethod(val) {\r\n this.procurementMethod = val\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 handleOver() {\r\n this.flexAuto = !this.flexAuto\r\n },\r\n //获取修改回显数据\r\n modifychoData(val) {\r\n procurementManagement\r\n .bizPurchasingApplicationSelectOne(val.id)\r\n .then((res) => {\r\n this.parameter = res.value\r\n })\r\n },\r\n // 关闭//面包屑点击\r\n handleClose() {\r\n if (this.breadcrumbOpt[1].breadcrumbName === '编辑') {\r\n this.$router.push({\r\n name: 'basicProject',\r\n params: {\r\n pageBean: this.$route.query.pageBean,\r\n },\r\n })\r\n } else {\r\n this.$router.push({\r\n name: 'basicProject',\r\n })\r\n }\r\n this.parameter = {}\r\n },\r\n // 保存\r\n handleSave() {\r\n this.parameter.detailList.forEach((item) => {\r\n item.procurementMethod = this.parameter.procurementMethod\r\n delete item.id\r\n })\r\n this.$refs.formInfo.validate((valid) => {\r\n if (valid) {\r\n this.saveing = true\r\n procurementManagement\r\n .bizPurchasingApplicationSaveOrUpdate(this.parameter)\r\n .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: 'basicProject',\r\n params: {\r\n pageBean: this.$route.query.pageBean,\r\n },\r\n })\r\n } else {\r\n this.$router.push({\r\n name: 'basicProject',\r\n })\r\n }\r\n }\r\n })\r\n }\r\n })\r\n },\r\n },\r\n}\r\n",null]}