{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web-prod\\src\\views\\ContractInformation.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\src\\views\\ContractInformation.vue","mtime":1702930191761},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\babel.config.js","mtime":1667333346259},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\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 _defineProperty from \"D:/jenkins/workspace/xypm-web-prod/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.array.find\";\nimport \"core-js/modules/es6.string.iterator\";\nimport _toConsumableArray from \"D:/jenkins/workspace/xypm-web-prod/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 ProjectInfoDialog from '@/components/dialog/ProjectInfoDialog.vue';\nimport { duration } from 'moment';\nimport { numToCny } from '@/lib/tool';\nimport req from '@/request.js';\nvar BigNumber = require('bignumber.js');\nexport default {\n name: 'ContractInformation',\n //合同管理\n components: {\n ProjectInfoDialog: ProjectInfoDialog\n },\n props: {\n pid: {\n type: String,\n default: ''\n },\n isShow: {\n type: Boolean,\n default: true\n },\n alias: {\n type: String,\n default: ''\n }\n },\n data: function data() {\n return {\n total: {\n project: {\n projectName: '合计'\n },\n contract: {\n name: '----',\n typeValue: '----',\n contractDate: '----',\n contractAmount: 1000,\n secondLevelType: '----',\n opation_: '----'\n }\n },\n selected: {\n numbers: 0,\n contractAmount: '0'\n },\n importData: {\n title: '合同信息导入',\n templateName: '合同信息模板.xls',\n downloadUrl: '/../fvue/static/excel/ExportContractInformation.xlsx',\n importUrl: window.context.cqxy + '/biz/contract/v1/importExcelData',\n showProject: true,\n projectId: ''\n },\n importDataDetailed: {\n title: '合同信息明细导入',\n templateName: '合同信息明细模板.xls',\n downloadUrl: '../../static/excel/ExportContractInformationDetailed.xlsx',\n importUrl: window.context.cqxy + '/biz/contract/item/v1/readExcelData'\n },\n projectObj: [],\n searchForm: {\n contractNumber: '',\n projectId: '',\n name: '',\n biddingChargeType: '',\n type: '',\n typeValue: '',\n contractReceiver: ''\n },\n //顶部搜索参数\n dataBaseOptions: {\n dataBaseId: '',\n tableName: '',\n // 必填\n tableSchema: ''\n },\n ConstructionModeArr: [],\n ProjectTypeArr: [],\n originAPIOptions: {\n url: '',\n // 列表请求接口地址\n method: 'post',\n // 列表请求方法\n moduleRoot: '' // 微服务根路径\n },\n\n exportQuery: {},\n data: [],\n //表格数据\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n form: {},\n //基本信息表单\n dialogVisible: false,\n dialogTitle: '添加',\n selectionArr: [],\n active: 0,\n loading: false,\n // tableData: [],\n // tableDataFiles: [],\n querySearch: [],\n costConsultation: '',\n //全过程造价咨询单位\n rules: {\n 'project.projectName': {\n required: true,\n message: '请选择项目名称',\n trigger: 'blur'\n },\n 'contract.biddingChargeType': {\n required: true,\n message: '请选择发包方式',\n trigger: 'blur'\n },\n // 'project.projectCode': {\n // required: true,\n // message: '请输入项目代码',\n // trigger: 'blur',\n // },\n 'contract.contractDate': {\n required: true,\n message: '请选择签订日期',\n trigger: 'blur'\n },\n 'contract.decisionDocuments': {\n required: true,\n message: '请输入决策依据',\n trigger: 'blur'\n },\n 'contract.typeValue': {\n required: true,\n message: '输入合同类型',\n trigger: 'blur'\n },\n // 'contract.type': {\n // required: true,\n // message: '输入合同类型',\n // trigger: 'blur',\n // },\n 'contract.mold': {\n required: true,\n message: '输入合同分类',\n trigger: 'blur'\n },\n // 'contract.contractNumber': {\n // required: true,\n // message: '请输入合同编号',\n // trigger: 'blur',\n // },\n 'contract.name': {\n required: true,\n message: '请输入合同名称',\n trigger: 'blur'\n }\n // 'contract.biddingChargeType': {\n // required: true,\n // message: '请输入招标方式',\n // trigger: 'blur'\n // },\n // 'contract.contractAmount': {\n // required: true,\n // message: '请输入合同金额',\n // trigger: 'blur',\n // },\n // 'contract.retentionMoney': {\n // required: true,\n // message: '请输入保证金',\n // trigger: 'blur',\n // },\n // 'contract.firstParty': {\n // required: true,\n // message: '请输入甲方单位',\n // trigger: 'blur',\n // },\n // 'contract.secondParty': {\n // required: true,\n // message: '请输入乙方单位',\n // trigger: 'blur',\n // },\n // 'contract.thirdParty': {\n // required: true,\n // message: '请输入丙方单位',\n // trigger: 'blur'\n // }\n }\n };\n },\n mounted: function mounted() {\n this.initProjectAll();\n },\n created: function created() {\n this.getByIdProject(this.pid);\n },\n computed: {\n deleteUrl: function deleteUrl() {\n return window.context.cqxy + '/biz/contract/v1/delete';\n }\n },\n methods: {\n // 根据项目id和合同ids导出相应合同文件\n handleDownFile: function handleDownFile() {\n var _this2 = this;\n if (this.$refs.AtTable.selection.length === 0) return this.$message.error('请选择导出合同文件');\n var projectId = this.$refs.AtTable.selection[0].project.id;\n var arr = [];\n this.$refs.AtTable.selection.forEach(function (item) {\n arr.push(item.contract.id);\n });\n var contractIds = arr.join(',');\n var formData = new FormData();\n formData.append('projectId', projectId);\n formData.append('contractIds', contractIds);\n this.$http.post('${cqxy}/biz/contract/v1/downloadBatch', formData, 'arraybuffer').then(function (res) {\n if (res.status === 200) {\n _this2.$message.success('合同文件导出成功');\n } else {\n _this2.$message.error('合同文件导出失败');\n }\n });\n },\n // 行政缴费\n handelPay: function handelPay() {\n var id = this.$route.params.id;\n var name = this.$route.params.projectName;\n this.$router.push({\n name: 'administrativePay',\n params: {\n projectName: name,\n id: id\n }\n });\n },\n handleSaveCostConsultation: function handleSaveCostConsultation() {\n var _this3 = this;\n var params = {\n costConsultation: this.costConsultation,\n id: this.pid\n };\n this.$http.post('${cqxy}/biz/projectManagement/pm/v1/updateCostConsultationById', params).then(function (res) {\n _this3.getByIdProject(_this3.pid);\n });\n },\n getByIdProject: function getByIdProject(id) {\n var _this4 = this;\n this.$http.post('${cqxy}/biz/projectManagement/pm/v1/detail/' + id).then(function (res) {\n _this4.costConsultation = res.data.value.costConsultation;\n });\n },\n handleCommand: function handleCommand(params) {\n var data = params.row;\n data.alias = this.alias;\n sessionStorage.setItem('routerParams', JSON.stringify(data));\n if (params.command == 'pay') {\n this.$router.push({\n name: 'PaymentApproval',\n params: {\n projectName: data.project.projectName,\n id: data.project.id\n }\n });\n } else if (params.command == 'plan') {\n this.$router.push({\n name: 'fundPlan',\n params: {\n projectName: params.row.project.projectName,\n id: params.row.project.id\n }\n });\n }\n },\n //重置\n handleReset: function handleReset() {\n var _this5 = this;\n this.searchForm.projectId = '';\n this.searchForm.contractNumber = '';\n this.searchForm.name = '';\n this.searchForm.biddingChargeType = '';\n this.searchForm.type = '';\n this.searchForm.typeValue = '';\n this.searchForm.contractReceiver = '';\n this.$refs['searchForm'].resetFields();\n this.pageResult = {\n page: 1,\n pageSize: 20,\n total: 0\n };\n this.$nextTick(function () {\n _this5.$refs.AtTable.load();\n });\n },\n //导入后重新加载数据\n load: function load() {\n this.$refs.AtTable.load();\n },\n //导出\n handleExport: function handleExport() {\n var _this6 = this;\n var query = [];\n var search = {\n project_id_: this.searchForm.projectId,\n 'bc.name_': this.searchForm.name,\n contract_number_: this.searchForm.contractNumber,\n 'bc.type_value': this.searchForm.typeValue,\n bidding_charge_type_: this.searchForm.biddingChargeType\n };\n if (!this.isShow) {\n search['pm.ID_'] = this.pid;\n }\n for (var i in search) {\n if (search[i]) {\n query.push({\n group: 'advance',\n operation: 'LIKE',\n property: i,\n relation: 'AND',\n value: search[i]\n });\n }\n }\n var param = {\n pageBean: {\n page: 1,\n pageSize: -1,\n showTotal: true\n },\n querys: query,\n sorter: []\n };\n req.downloadPostCopy('${cqxy}/biz/contract/v1/exportDataToExcel', param).then(function (res) {\n if (res.status === 200) {\n _this6.$message.success('导出成功');\n } else {\n _this6.$message.error('导出失败');\n }\n });\n },\n //导入\n loadDetailed: function loadDetailed(data) {\n var _this7 = this,\n _this$form$contractIt;\n var newData = data.map(function (item) {\n item.contractId = _this7.form.contract.id;\n return item;\n });\n (_this$form$contractIt = this.form.contractItem).push.apply(_this$form$contractIt, _toConsumableArray(newData));\n },\n //导出\n handleExportDetailed: function handleExportDetailed() {\n var _this8 = this;\n var param = {\n pageBean: {\n page: 1,\n pageSize: -1,\n showTotal: true\n },\n querys: [],\n sorter: []\n };\n req.downloadPostCopy('${cqxy}/biz/contract/item/v1/exportDataToExcel', param).then(function (res) {\n if (res.status === 200) {\n _this8.$message.success('导出成功');\n } else {\n _this8.$message.error('导出失败');\n }\n });\n },\n //上一步\n prevSteps: function prevSteps() {\n this.active--;\n this.active = this.active;\n },\n //下一步\n nextSteps: function nextSteps() {\n var _this9 = this;\n if (this.active == 0) {\n var _this = this;\n var vaitalArr = ['project.projectName'\n // 'project.projectCode',\n // 'contract.contractDate',\n // 'contract.type',\n // 'contract.contractNumber',\n // 'contract.name',\n // 'contract.biddingChargeType',\n // 'contract.contractAmount',\n // 'contract.retentionMoney',\n // 'contract.firstParty',\n // 'contract.secondParty',\n // 'contract.thirdParty'\n ];\n\n Promise.all(vaitalArr.map(function (item) {\n var p = new Promise(function (resolve, reject) {\n _this.$refs.form.validateField(item, function (vaild) {\n resolve(vaild);\n });\n });\n return p;\n })).then(function (result) {\n result = result.filter(function (item) {\n return item;\n });\n if (!result.length) {\n _this9.active++;\n _this9.active = _this9.active;\n _this9.$refs['form'].clearValidate();\n }\n });\n } else {\n this.active++;\n this.active = this.active;\n this.$refs['form'].clearValidate();\n }\n },\n // handleDict(val, obj, str) {\n // console.log(this.form.contract)\n // if (str === 'zbfs') {\n // this.form.contract.biddingChargeTypeValue = obj.name\n // } else if (str === 'htgl-htlb') {\n // this.form.contract.type = obj.name\n // } else if (str == 'htgl-htfl') {\n // this.form.contract.moleValue = obj.name\n // }\n // },\n handleAdd: function handleAdd() {\n this.dialogTitle = '添加';\n this.form = {\n projectId: '',\n contractItem: [],\n project: {\n projectName: '',\n projectCode: ''\n },\n contract: {\n contractBigAmount: '',\n //金额大写\n type: 'G1',\n //合同类型\n biddingChargeType: 1,\n //招标方式\n secondLevelType: 1,\n firstParty: '重庆西永微电子产业园区开发有限公司',\n //甲方单位\n establishmentRemarks: ''\n },\n accessoryInfo: []\n };\n this.dialogVisible = true;\n if (this.isShow) {\n var selectedProject = this.projectObj.find(function (item) {\n if (item.currentProject && item.currentProject == 1) {\n return item.currentProject == 1;\n }\n });\n this.form.project.projectName = selectedProject.projectName;\n this.form.project.projectCode = selectedProject.projectCode;\n this.form.projectId = selectedProject.id;\n this.form.contract.projectId = selectedProject.id;\n this.costConsultation = selectedProject.costConsultation;\n } else {\n //根据项目id查询\n this.form.project.projectName = this.projectObj[0].projectName;\n this.form.project.projectCode = this.projectObj[0].projectCode;\n this.form.projectId = this.projectObj[0].id;\n this.form.contract.projectId = this.projectObj[0].id;\n }\n },\n handleRowDBClick: function handleRowDBClick(data) {\n var _this10 = this;\n this.$http.post('${cqxy}/biz/contract/v1/detail/' + data.contract.id).then(function (res) {\n if (res.data.state) {\n _this10.dialogTitle = '修改';\n _this10.form = _objectSpread({}, res.data.value);\n //明细导入传入合同id\n\n // this.importDataDetailed.contractId = this.form.contract.id\n // this.importDataDetailed.projectId = this.form.project.id\n _this10.handleChangeAmount(_this10.form.contract.contractAmount);\n _this10.dialogVisible = true;\n } else {\n _this10.$message.error('请求出错,请重新选择');\n }\n });\n },\n handleFocusProject: function handleFocusProject() {\n this.$refs.project.open();\n },\n handleSelectProject: function handleSelectProject(data) {\n this.form.contract.projectId = data.id;\n this.form.projectId = data.id;\n this.form.project.projectCode = data.projectCode;\n this.form.project.projectName = data.projectName;\n // this.importDataDetailed.projectId=data.id\n this.$refs.form.clearValidate();\n },\n handleSelect: function handleSelect(selection) {\n selection.forEach(function (item, index) {\n if (item.project.projectName === '合计') {\n selection.splice(index, 1);\n }\n });\n this.selected.numbers = selection.length;\n var total = this.calculationTotal(selection, 'contractAmount');\n this.selected.contractAmount = total;\n },\n handleDialogCancel: function handleDialogCancel() {\n this.dialogVisible = false;\n this.active = 0;\n /* 发送一个事件用于侧边栏按钮监听是否显示 */\n this.$bus.$emit('handleAsideBtn', true);\n },\n handleDialogClose: function handleDialogClose() {\n this.dialogVisible = false;\n this.active = 0;\n },\n handleFile: function handleFile(file) {\n this.form.accessoryInfo = file;\n },\n initProjectAll: function initProjectAll() {\n var _this11 = this;\n //初始获取所有项目数据\n if (this.isShow) {\n this.$http.post('${cqxy}/biz/projectManagement/pm/v1/All').then(function (res) {\n _this11.projectObj = res.data.value;\n }, function (error) {\n reject(error);\n });\n } else {\n var params = {\n pageBean: {\n page: 1,\n pageSize: 500,\n total: 0\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n property: 'id',\n relation: 'AND',\n value: this.pid\n }]\n };\n this.$http.post('${cqxy}/biz/projectManagement/pm/v1/page', params).then(function (res) {\n if (res.data.state) {\n var resp = res.data.value;\n _this11.projectObj = resp.rows;\n }\n });\n }\n },\n handleDialogSubmit: function handleDialogSubmit() {\n var _this12 = this;\n if (this.form.accessoryInfo && this.form.accessoryInfo.length > 0) {\n this.form.accessoryInfo.forEach(function (item) {\n if (item.id) {\n delete item.id;\n }\n });\n }\n this.loading = true;\n this.$http.post('${cqxy}/biz/contract/v1/save', this.form).then(function (res) {\n if (res.data.state) {\n _this12.$refs.form.resetFields();\n _this12.$message.success(res.data.message);\n _this12.dialogVisible = false;\n _this12.$refs.AtTable.load();\n _this12.active = 0;\n } else {\n _this12.$message.error(res.data.message);\n }\n _this12.loading = false;\n });\n },\n loadData: function loadData(param, cb) {\n var _this13 = this;\n var query = [];\n var search = {\n project_id_: this.searchForm.projectId,\n 'bc.name_': this.searchForm.name,\n contract_number_: this.searchForm.contractNumber,\n 'bc.type_': this.searchForm.type,\n bidding_charge_type_: this.searchForm.biddingChargeType,\n 'bc.type_value_': this.searchForm.typeValue,\n 'bc.contract_receiver_': this.searchForm.contractReceiver\n // contract_date_: this.searchForm.contractDate,\n };\n\n if (!this.isShow) {\n search['pm.ID_'] = this.pid;\n this.importData.projectId = this.pid;\n }\n for (var i in search) {\n if (search[i]) {\n query.push({\n group: 'advance',\n operation: 'LIKE',\n property: i,\n relation: 'AND',\n value: search[i]\n });\n }\n }\n if (param.querys && param.querys.length) {\n var _param$querys;\n (_param$querys = param.querys).push.apply(_param$querys, query);\n } else {\n param.querys = query;\n }\n this.$http.post('${cqxy}/biz/contract/v1/page', param).then(function (resp) {\n var response = resp.data.value;\n _this13.selected = {\n numbers: 0,\n contractAmount: '0'\n };\n var data = response.rows;\n var total = _this13.calculationTotal(data, 'contractAmount');\n _this13.total.contract.contractAmount = total;\n if (data.length !== 0) {\n data.push(_this13.total);\n }\n _this13.data = data;\n _this13.pageResult = {\n page: response.page,\n pageSize: response.pageSize,\n total: response.total\n };\n }, function (error) {\n reject(error);\n }).finally(function () {\n if (cb) {\n cb();\n }\n });\n },\n findinfo: function findinfo() {\n this.$refs.AtTable.load();\n },\n changeAmount: function changeAmount(val, index) {},\n changePrice: function changePrice(val, index) {},\n addListItem: function addListItem() {\n var length;\n length = this.form.contractItem.length;\n var newData = {\n key: length + 1,\n contractId: this.form.contract.id,\n subjectName: '',\n amount: 1\n };\n this.form.contractItem.push(newData);\n },\n deleteTableData: function deleteTableData(key, id) {\n var _this14 = this;\n this.form.contractItem = this.form.contractItem.filter(function (item) {\n if (key) {\n return item.key !== key;\n } else {\n return item.id !== id;\n }\n });\n if (id) {\n var formData = new FormData();\n formData.append('ids', id);\n this.$http.post('${cqxy}/biz/contract/item/v1/delete', formData).then(function (res) {\n if (res.data.state) {\n _this14.$message.success(res.data.message);\n } else {\n _this14.$message.error(res.data.message);\n }\n });\n }\n },\n handleChangeAmount: function handleChangeAmount(value) {\n var num = numToCny(value);\n this.form.contract.contractBigAmount = num;\n },\n // 计算列表合同金额合计金额\n calculationTotal: function calculationTotal(data, key) {\n var total = new BigNumber(0);\n if (key && data && data.length !== 0) {\n data.forEach(function (item) {\n item = item.contract;\n if (item[key]) {\n total = total.plus(item[key]);\n } else {\n total = total.plus(0);\n }\n });\n }\n return this.moneyFormatter(total);\n },\n cellClassNameFn: function cellClassNameFn(row) {\n // 列表项目名称为【合计】隐藏复选框\n if (row.row.project.projectName === '合计') {\n return 'table-column-hidden';\n }\n }\n }\n // destroyed() {\n // this.$bus.$off('fileAdded')\n // this.$bus.$off('fileSuccess')\n // }\n};",null]}