{"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\\quoteTemplate\\component\\quoteTemplateAddDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\BasicDataManagement\\quoteTemplate\\component\\quoteTemplateAddDialog.vue","mtime":1720730442274},{"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\r\nimport Breadcrumb from '@/components/Breadcrumb/index.vue'\r\nimport procurementManagement from '@/api/procurementManagement'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nexport default {\r\n name: 'quoteTemplateAddDialog',\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 saveing: false,\r\n methodUnitsList: [],\r\n rules: {\r\n preparedOrgName: [\r\n {\r\n required: true,\r\n message: '请输入编制公司',\r\n trigger: 'blur',\r\n },\r\n ],\r\n\r\n name: [\r\n {\r\n required: true,\r\n message: '请输入模板名称',\r\n trigger: 'blur',\r\n },\r\n ],\r\n quotationMethod: [\r\n {\r\n required: true,\r\n message: '请选择报价方式',\r\n trigger: 'blur',\r\n },\r\n ],\r\n targetType: [\r\n {\r\n required: true,\r\n message: '请选择标的类型',\r\n trigger: 'blur',\r\n },\r\n ],\r\n isTax: [\r\n {\r\n required: true,\r\n message: '请选择是否含税价',\r\n trigger: 'blur',\r\n },\r\n ],\r\n isEnable: [\r\n {\r\n required: true,\r\n message: '请选择是否启用',\r\n trigger: 'blur',\r\n },\r\n ],\r\n },\r\n parameter: {\r\n preparedOrgName: '',\r\n remarks: '',\r\n quotationMethod: '1',\r\n targetType: '',\r\n detailList: [],\r\n isTax: '1',\r\n isEnable: '1',\r\n name: '',\r\n preparedOrgId: '',\r\n preparedOrgCode: '',\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.preparedOrgName = this.currentUser.org[0].orgName\r\n this.parameter.preparedOrgId = this.currentUser.org[0].orgId\r\n this.parameter.preparedOrgCode = this.currentUser.org[0].orgCode\r\n let data = dictUtils.getDictItemsFromCache('cglx-jjfs')\r\n data.forEach((item) => {\r\n if (item.value == this.parameter.isTax) {\r\n this.parameter.quoArrange = item.name\r\n }\r\n })\r\n this.parameter.detailList = [\r\n {\r\n beckonEntry: '',\r\n evaluationShow: true,\r\n isRequired: true,\r\n priceEntry: '1',\r\n quoArrange: this.parameter.quoArrange,\r\n sourceType: '',\r\n throwEntry: '',\r\n throwShow: true,\r\n },\r\n {\r\n beckonEntry: '',\r\n evaluationShow: true,\r\n isRequired: true,\r\n priceEntry: '2',\r\n quoArrange: '合计金额',\r\n sourceType: '',\r\n throwEntry: '',\r\n throwShow: true,\r\n },\r\n ]\r\n },\r\n mounted() {},\r\n methods: {\r\n changeIsTax(val) {\r\n let data = dictUtils.getDictItemsFromCache('cglx-jjfs')\r\n data.forEach((item) => {\r\n if (val == item.value) {\r\n this.parameter.detailList[0].quoArrange = item.name\r\n this.$forceUpdate()\r\n }\r\n })\r\n },\r\n //列表删除行\r\n addTable() {\r\n if (this.parameter.detailList == undefined) {\r\n this.parameter.detailList = []\r\n this.parameter.detailList.push({\r\n beckonEntry: '',\r\n evaluationShow: '',\r\n isRequired: '',\r\n priceEntry: '',\r\n quoArrange: '',\r\n sourceType: '',\r\n throwEntry: '',\r\n throwShow: '',\r\n key: new Date(),\r\n })\r\n } else {\r\n this.parameter.detailList.push({\r\n beckonEntry: '',\r\n evaluationShow: '',\r\n isRequired: '',\r\n priceEntry: '',\r\n quoArrange: '',\r\n sourceType: '',\r\n throwEntry: '',\r\n throwShow: '',\r\n key: new Date(),\r\n })\r\n }\r\n this.$forceUpdate()\r\n },\r\n //列表删除行\r\n delTable(index, row) {\r\n console.log(row)\r\n if (row.id != undefined) {\r\n this.parameter.detailList.splice(index, 1)\r\n this.$http\r\n .remove('${portal}/quotationTemplateDetail/v1/' + row.id)\r\n .then((res) => {\r\n if (res.data.state) {\r\n this.$message.success(res.data.message)\r\n }\r\n })\r\n } else {\r\n this.parameter.detailList.splice(index, 1)\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.$http\r\n .post('${portal}/quotationTemplate/v1/dataById?id=' + val.id)\r\n .then((res) => {\r\n this.parameter = res.data.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: 'quoteTemplate',\r\n })\r\n } else {\r\n this.$router.push({\r\n name: 'quoteTemplate',\r\n })\r\n }\r\n this.parameter = {}\r\n },\r\n // 保存\r\n handleSave() {\r\n console.log(this.parameter, 'this.parameter')\r\n this.$refs.formInfo.validate((valid) => {\r\n if (valid) {\r\n this.saveing = true\r\n this.$http\r\n .post(\r\n '${portal}/quotationTemplate/v1/saveOrUpdateData',\r\n this.parameter\r\n )\r\n .then((res) => {\r\n if (res.data.state) {\r\n this.$message.success(res.data.message)\r\n if (this.breadcrumbOpt[1].breadcrumbName === '编辑') {\r\n this.$router.push({\r\n name: 'quoteTemplate',\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: 'quoteTemplate',\r\n })\r\n }\r\n }\r\n this.saveing = false\r\n })\r\n }\r\n })\r\n },\r\n },\r\n}\r\n",null]}