{"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\\projectLedger\\component\\addLedger.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\ProjectManagement\\projectLedger\\component\\addLedger.vue","mtime":1717533647326},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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\n// import purchaseMaterial from './purchaseMaterial.vue'\r\nimport {mapState} from 'vuex'\r\nexport default {\r\n name: 'domesticDialog',\r\n components: {\r\n Breadcrumb,\r\n },\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 activeName: 'first',\r\n breadcrumbOpt: [{breadcrumbName: '项目台账'}, {breadcrumbName: '新增'}],\r\n saveing: false,\r\n flexAuto:true,\r\n methodUnitsList: [],\r\n dataList: [],\r\n qualificationList: [],\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 projectUserMobile: [\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 projectCode: '',\r\n projectType: '1',\r\n serviceDetailList: [],\r\n equipmentDetailList:[],\r\n engineeringDetailList:[],\r\n status: '1',\r\n accessoryList: [],\r\n },\r\n }\r\n },\r\n computed: {\r\n ...mapState({\r\n headers: (state) => {\r\n return {Authorization: `Bearer ${state.login.currentUser.token}`}\r\n },\r\n action: function () {\r\n return window.context.portal + '/biz/universal/v1/minioUpload'\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 if (this.breadcrumbOpt[1].breadcrumbName == '新增') {\r\n this.$http\r\n .get('${portal}/sys/identity/v1/getNextIdByAlias?alias=xmxx_xmbh')\r\n .then((res) => {\r\n console.log(res, 'ressssss')\r\n if (res.data.state) {\r\n this.parameter.projectCode = res.data.value\r\n } else {\r\n this.parameter.projectCode = ''\r\n }\r\n })\r\n }\r\n },\r\n mounted() {},\r\n methods: {\r\n handleClick() {\r\n\r\n },\r\n //添加明细\r\n addTable(val) {\r\n if (val == 'first') {\r\n this.parameter.serviceDetailList.push({\r\n category: this.parameter.projectType,\r\n manufacturer: '',\r\n matBaseExt: '',\r\n matBrand: '',\r\n matCompanyCode: '',\r\n matCompanyId: '',\r\n matCompanyName: '',\r\n matMaterial: '',\r\n matName: '',\r\n matNum: '',\r\n matOtherExt: '',\r\n matSpec: '',\r\n serviceEndTime: this.parameter.constructionStartTime,\r\n serviceStartTime: this.parameter.constructionCompletionTime,\r\n singleValuation: null,\r\n totalValuation: null,\r\n type: null,\r\n matUnit: '',\r\n key: new Date(),\r\n })\r\n }\r\n if (val == 'second') {\r\n this.parameter.engineeringDetailList.push({\r\n category: this.parameter.projectType,\r\n manufacturer: '',\r\n matBaseExt: '',\r\n matBrand: '',\r\n matCompanyCode: '',\r\n matCompanyId: '',\r\n matCompanyName: '',\r\n matMaterial: '',\r\n matName: '',\r\n matNum: '',\r\n matOtherExt: '',\r\n matSpec: '',\r\n serviceEndTime: this.parameter.constructionStartTime,\r\n serviceStartTime: this.parameter.constructionCompletionTime,\r\n singleValuation: null,\r\n totalValuation: null,\r\n type: null,\r\n matUnit: '',\r\n key: new Date(),\r\n })\r\n }\r\n \r\n if (val == 'third') {\r\n this.parameter.equipmentDetailList.push({\r\n category: this.parameter.projectType,\r\n manufacturer: '',\r\n matBaseExt: '',\r\n matBrand: '',\r\n matCompanyCode: '',\r\n matCompanyId: '',\r\n matCompanyName: '',\r\n matMaterial: '',\r\n matName: '',\r\n matNum: '',\r\n matOtherExt: '',\r\n matSpec: '',\r\n serviceEndTime: this.parameter.constructionStartTime,\r\n serviceStartTime: this.parameter.constructionCompletionTime,\r\n singleValuation: null,\r\n totalValuation: null,\r\n type: null,\r\n matUnit: '',\r\n key: new Date(),\r\n })\r\n }\r\n },\r\n //列表删除行\r\n delTable(index, row) {\r\n if(this.activeName == 'first'){\r\n this.parameter.serviceDetailList.splice(index, 1)\r\n }\r\n if(this.activeName == 'second'){\r\n this.parameter.engineeringDetailList.splice(index, 1)\r\n }\r\n if(this.activeName == 'third'){\r\n this.parameter.equipmentDetailList.splice(index, 1)\r\n }\r\n // if (row.id) {\r\n // this.parameter.deleteDetailsId.push(row.id)\r\n // }\r\n },\r\n changeType(val){\r\n if(val==1){\r\n this.activeName = 'first'\r\n }else{\r\n this.activeName = 'third'\r\n }\r\n },\r\n handleOver() {\r\n this.flexAuto = !this.flexAuto\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 changematNum(val){\r\n console.log(val,'val');\r\n // if(val.singleValuation)\r\n },\r\n changeSingle(val){\r\n\r\n },\r\n //获取修改回显数据\r\n modifychoData(val) {\r\n this.$http\r\n .post('${portal}/projectLedger/v1/getDataById?id=' + val.id)\r\n .then((res) => {\r\n console.log(res, 'reas')\r\n if (res.data.state) {\r\n this.parameter = res.data.value\r\n if (this.parameter.accessoryList.length != 0) {\r\n this.dataList = this.parameter.accessoryList\r\n }\r\n }\r\n })\r\n },\r\n // 关闭//面包屑点击\r\n handleClose() {\r\n if (this.breadcrumbOpt[1].breadcrumbName === '编辑') {\r\n this.$router.push({\r\n name: 'projectLedger',\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: 'projectLedger',\r\n })\r\n }\r\n this.parameter = {}\r\n },\r\n // 保存\r\n handleSave() {\r\n this.$refs.formInfo1.validate((valid) => {\r\n if (valid) {\r\n this.saveing = true\r\n this.$http\r\n .post('${portal}/projectLedger/v1/saveOrUpdate', this.parameter)\r\n .then((res) => {\r\n this.saveing = false\r\n if (res.data.state) {\r\n this.$message.success(res.data.message)\r\n this.handleClose()\r\n }\r\n })\r\n }\r\n })\r\n },\r\n },\r\n}\r\n",null]}