{"remainingRequest":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\yhxt-web\\src\\views\\specialProjectManagement\\DeliveryPayment.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\specialProjectManagement\\DeliveryPayment.vue","mtime":1717697645399},{"path":"D:\\jenkins\\workspace\\yhxt-web\\babel.config.js","mtime":1667326389982},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.reflect.delete-property\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.map\";\nimport _defineProperty from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.array.find\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { mapState } from 'vuex';\nimport req from '@/request.js';\nimport basicData from '@/api/basicData.js';\nimport CascaderCompany from '@/components/selector/CascaderCompany.vue';\nimport fileUpload from '@/components/upload/fileUploadProject.vue';\nimport projectDialog from '@/components/dialog/projectDialog.vue';\nexport default {\n name: 'meterialPayment',\n components: {\n CascaderCompany: CascaderCompany,\n fileUpload: fileUpload,\n projectDialog: projectDialog\n },\n data: function data() {\n return {\n roadData: [],\n dadToSon: {\n bizPath: 'specialproject',\n fileList: []\n },\n accessories: [],\n searchForm: {},\n data: [],\n pageResult: {\n pageNum: 1,\n pageSize: 10,\n total: 0\n },\n dialogVisible: false,\n type: '',\n form: {\n measurementPayment: {},\n details: [],\n files: [],\n accessories: []\n },\n fullscreenLoading: false,\n //全屏加载控件\n key: '',\n roadOptions: [],\n //选取路段\n projectOptions: [],\n //选取项目\n contractOptions: [],\n //选取合同\n projectParams: {\n pageBean: {\n pageSize: -1,\n showTotal: true\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'roadSegmentId',\n relation: 'AND',\n value: ''\n }]\n },\n contractPrams: {\n pageBean: {\n pageSize: -1,\n showTotal: true\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'projectId',\n relation: 'AND',\n value: ''\n }]\n },\n subjectNumberOptions: [],\n //选取清单名称\n rules: {\n 'measurementPayment.roadSegmentId': {\n required: true,\n message: '请选择路段名称',\n trigger: 'change'\n },\n 'measurementPayment.projectName': {\n required: true,\n message: '请选择项目名称',\n trigger: 'change'\n },\n // accessories: {\n // required: true,\n // message: '请上传附件',\n // trigger: 'change',\n // },\n 'measurementPayment.projectContractName': {\n required: true,\n message: '请选择合同',\n trigger: 'change'\n },\n 'measurementPayment.paymentDates': {\n required: true,\n message: '请选择支付时间',\n trigger: 'change'\n },\n 'measurementPayment.paymentPeriods': {\n required: true,\n message: '请选择支付期数',\n trigger: 'change'\n },\n 'measurementPayment.paymentCashs': {\n required: true,\n message: '请输入支付金额',\n trigger: 'change'\n },\n 'measurementPayment.paymentScale': {\n required: true,\n message: '请输入支付比例',\n trigger: 'change'\n }\n },\n optionYears: [],\n readyForDefaultParams: false\n };\n },\n computed: mapState({\n deleteUrl: function deleteUrl() {\n return window.context.yhxt + '/measurement/payment/v1/';\n }\n }),\n beforeDestroy: function beforeDestroy() {\n this.$EventBus.$off('route');\n },\n created: function created() {\n this.getRoadInfo();\n this.roadData = this.getroad();\n },\n mounted: function mounted() {\n this.getYear();\n // ht-table 组件会在created时默认执行一次查询\n // 为了添加上级页面携带的查询参数,这里在参数获取到以后再渲染ht-table组件\n if (this.$route.params && this.$route.params.id) {\n this.searchForm.projectName = this.$route.params.projectName || '';\n this.searchForm.projectId = this.$route.params.id || '';\n } else {\n this.searchForm.paymentDates = new Date().getFullYear();\n }\n this.readyForDefaultParams = true;\n },\n methods: {\n //获取顶部搜索的年份区间\n getYear: function getYear() {\n var myDate = new Date();\n var startYear = 2006; //起始年份\n var endYear = myDate.getFullYear() + 3; //结束年份\n for (var i = endYear; i >= startYear; i--) {\n this.optionYears.push({\n label: i + '年',\n value: i\n });\n }\n },\n getroad: function getroad() {\n var arr = [];\n basicData.getRoadManagement().then(function (res) {\n res.rows.forEach(function (item) {\n arr.push({\n value: item.name,\n key: item.id\n });\n });\n console.log(arr, '12');\n });\n return arr;\n },\n handleSubjectNumberChanged: function handleSubjectNumberChanged(val, key) {\n var _this = this;\n this.subjectNumberOptions.forEach(function (item) {\n if (item.subjectNumber == val) {\n console.log(item, 'item');\n _this.form.details[key - 1] = item;\n }\n });\n },\n getProjectInfo: function getProjectInfo(roadSegmentId) {\n var _this2 = this;\n this.projectParams.querys[0].value = roadSegmentId;\n this.$http.post('${yhxt}/bizEngineeringProject/v1/getJson', this.projectParams).then(function (res) {\n _this2.projectOptions = res.data.rows;\n });\n },\n handleProjectchanged: function handleProjectchanged(id) {\n var _this3 = this;\n this.projectOptions.forEach(function (item) {\n if (item.id === id) {\n _this3.form.measurementPayment.projectName = item.projectName;\n }\n });\n this.getByIdContractData(id);\n },\n getByIdContractData: function getByIdContractData(id) {\n var _this4 = this;\n this.contractPrams.querys[0].value = id;\n this.$http.post('${yhxt}/bizProjectContract/v1/getJson', this.contractPrams).then(function (res) {\n _this4.contractOptions = res.data.rows;\n });\n },\n handleContractChanged: function handleContractChanged(id) {\n var _this5 = this;\n var list = this.contractOptions;\n var obj = list.find(function (item) {\n return item.id === id;\n });\n this.form.measurementPayment.projectContractName = obj.contractName;\n this.$http.get('${yhxt}/bizProjectContract/v1/get/' + id).then(function (res) {\n _this5.subjectNumberOptions = res.data.detailList;\n });\n },\n changed: function changed(id) {\n var _this6 = this;\n this.roadOptions.forEach(function (item) {\n if (item.id == id) {\n _this6.form.measurementPayment = _objectSpread({\n roadSegmentName: item.name,\n companyName: item.companyName,\n companyId: item.companyId,\n roadSegmentId: id,\n projectId: '',\n projectContractName: ''\n }, _this6.form.measurementPayment);\n _this6.projectOptions = [];\n _this6.contractOptions = [];\n _this6.getProjectInfo(id);\n }\n });\n },\n getRoadInfo: function getRoadInfo() {\n var _this7 = this;\n basicData.getRoadManagement().then(function (res) {\n if (res.rows.length !== 0) {\n _this7.roadOptions = res.rows;\n }\n });\n },\n handleReset: function handleReset() {\n this.searchForm = _objectSpread(_objectSpread({}, this.searchForm), {}, {\n companyId: ['1419863231459102720'],\n companyIds: '',\n paymentPeriods: '',\n companyName: '',\n projectName: '',\n roadSegmentId: ''\n });\n this.findinfo();\n },\n findinfo: function findinfo() {\n var _this8 = this;\n var query = [];\n var search = {\n company_id_: this.searchForm.companyIds,\n payment_periods_: this.searchForm.paymentPeriods,\n company_name_: this.searchForm.companyName,\n project_name_: this.searchForm.projectName,\n road_segment_id_: this.searchForm.roadSegmentId,\n PAYMENT_DATE_: this.searchForm.paymentDates\n };\n for (var i in search) {\n if (search[i]) {\n if (i == 'company_id_') {\n query.push({\n group: 'companyIds',\n operation: 'IN',\n parentGroup: '',\n property: 'company_id_',\n relation: 'AND',\n value: search[i]\n });\n } else {\n query.push({\n group: 'advance',\n operation: 'LIKE',\n property: i,\n relation: 'AND',\n value: search[i]\n });\n }\n }\n }\n query = this.uniqueFunc(query, 'property');\n var data = {\n pageBean: {\n page: 1,\n pageSize: 20,\n showTotal: true\n },\n querys: query\n };\n this.topQuery = query;\n this.$http.post('${yhxt}/measurement/payment/v1/query', data).then(function (response) {\n var res = response.data;\n _this8.data = res.rows;\n _this8.pageResult = {\n page: res.page,\n pageSize: res.pageSize,\n total: res.total\n };\n });\n },\n uniqueFunc: function uniqueFunc(arr, uniId) {\n var res = new Map();\n return arr.filter(function (item) {\n return !res.has(item[uniId]) && res.set(item[uniId], 1);\n });\n },\n handleEdit: function handleEdit(data) {\n var _this9 = this;\n this.getProjectInfo(data.roadSegmentId);\n this.type = 'edit';\n this.dialogVisible = true;\n this.$http.get('${yhxt}/measurement/payment/v1/get/' + data.id).then(function (response) {\n var res = response.data;\n var accessories = res.files || [];\n _this9.form.measurementPayment = _objectSpread(_objectSpread({}, res.measurementPayment), {}, {\n accessories: accessories\n });\n // this.form.details = res.details || []\n res.files.forEach(function (item) {\n item.url = item.attachmentPath;\n item.name = item.attachmentName;\n });\n _this9.dadToSon = _objectSpread(_objectSpread({}, _this9.dadToSon), {}, {\n fileList: res.files\n });\n });\n\n // let params = {\n // pageBean: {\n // pageSize: -1\n // },\n // querys: [\n // {\n // group: 'main',\n // operation: 'EQUAL',\n // property: 'measurementPaymentId',\n // relation: 'AND',\n // value: data.id\n // }\n // ]\n // }\n // this.$http\n // .post('${yhxt}/measurement/payment/details/v1/query', params)\n // .then(res => {\n // this.form.details = res.data.rows\n // })\n },\n handleAdd: function handleAdd() {\n this.form = {\n measurementPayment: {\n paymentDates: this.getDate()\n },\n details: [],\n accessories: []\n };\n this.projectOptions = [];\n this.type = 'add';\n this.dialogVisible = true;\n /* 添加时默认填写项目管理选中数据的第一条 */\n // let obj = JSON.parse(sessionStorage.getItem('projectRow'))\n // if (!obj) return\n var data = this.$route.params;\n var obj = {};\n if (data.id) {\n obj = {\n roadSegmentId: data.roadSegmentId,\n roadSegmentName: data.roadSegmentName,\n projectId: data.id,\n projectName: data.projectName\n };\n }\n this.form.measurementPayment = _objectSpread(_objectSpread({}, this.form.measurementPayment), obj);\n this.changed(this.form.measurementPayment.roadSegmentId);\n },\n sonToDad: function sonToDad(data) {\n console.log(data);\n var arr = [];\n data.forEach(function (item) {\n arr.push({\n isDele: item.isDele,\n attachmentName: item.name,\n attachmentPath: item.url,\n attachmentSuffix: item.suffix,\n attachmentType: item.type,\n type: 0\n });\n });\n this.accessories = arr;\n this.form.accessories = arr;\n // 防止用户打开了文件选择框之后不选择文件而出现效验失败\n if (this.form.accessories) {\n this.$refs.form.clearValidate('accessories');\n }\n },\n afterDelete: function afterDelete() {\n this.$refs.htTable.load();\n },\n handleClose: function handleClose(done) {\n this.dadToSon = {\n fileList: []\n };\n done();\n },\n addTableData: function addTableData() {\n this.form.details.push({\n key: this.form.details.length + 1,\n subjectNumber: '',\n calculaMethod: '',\n commencementDate: '',\n completeAmount: '',\n constructionSite: '',\n paidMoney: '',\n subjectPrice: '',\n subjectAmount: '',\n subjectUnit: '',\n subjectMoney: '',\n remarks: ''\n });\n },\n handleCancel: function handleCancel() {\n this.dialogVisible = false;\n this.dadToSon = {\n fileList: []\n };\n },\n handleSubmit: function handleSubmit() {\n var _this10 = this;\n this.$refs.form.validate(function (bool) {\n if (bool) {\n _this10.fullscreenLoading = true;\n _this10.disabledSave = true;\n _this10.form.files = _this10.accessories;\n Reflect.deleteProperty(_this10.form, 'accessories');\n _this10.$http.post('${yhxt}/measurement/payment/v1/saveVo', _this10.form).then(function (res) {\n if (res.data.state) {\n _this10.$message({\n type: 'success',\n message: '保存成功'\n });\n _this10.dialogVisible = false;\n _this10.fullscreenLoading = false;\n _this10.$refs.htTable.load();\n } else {\n _this10.fullscreenLoading = false;\n _this10.$message.error(res.message);\n }\n }).catch(function () {\n _this10.fullscreenLoading = false;\n });\n }\n });\n },\n loadData: function loadData(param, cb) {\n var _this11 = this;\n console.log(param, 'param');\n if (typeof this.topQuery !== 'undefined' && this.topQuery.length !== 0) {\n param.querys = typeof param.querys !== 'undefined' ? param.querys : [];\n this.topQuery.forEach(function (item) {\n param.querys.push(item);\n });\n param.querys = this.uniqueFunc(param.querys, 'property');\n }\n if (this.searchForm.projectId) {\n param.querys = [{\n group: 'defaultQuerys',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'project_id_',\n relation: 'AND',\n value: this.searchForm.projectId\n }];\n } else {\n param.querys = [{\n group: 'advance',\n operation: 'LIKE',\n property: 'PAYMENT_DATE_',\n relation: 'AND',\n value: new Date().getFullYear()\n }];\n }\n this.exportQuery = param;\n this.$http.post('${yhxt}/measurement/payment/v1/query', param).then(function (res) {\n console.log(res);\n var response = res.data;\n _this11.data = response.rows;\n _this11.pageResult = {\n page: response.page,\n pageSize: response.pageSize,\n total: response.total\n };\n }).finally(function () {\n if (cb) {\n cb();\n }\n });\n },\n openProjectName: function openProjectName(val) {\n this.$refs.reference.open(val);\n },\n backData: function backData(data) {\n console.log(data, 'data');\n this.form.measurementPayment.projectId = data[0].id;\n this.form.measurementPayment.projectName = data[0].projectName;\n this.$forceUpdate();\n var field = 'projectName'; // 替换为要清除校验的字段名\n var rules = this.$refs.form.rules;\n if (rules && rules[field]) {\n this.$refs.form.clearValidate(field);\n }\n this.getByIdContractData(data[0].id);\n },\n // 返回上一页面\n clickBack: function clickBack() {\n var form = this.$route.params;\n this.$EventBus.$emit('route', JSON.stringify(form));\n this.$router.go(-1);\n }\n }\n};",null]}