{"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\\components\\flowURLForm\\flowInfoDailog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\components\\flowURLForm\\flowInfoDailog.vue","mtime":1726683189411},{"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.regexp.split\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport \"core-js/modules/es6.regexp.constructor\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/es6.function.name\";\nimport _defineProperty from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { helper } from \"../../../public/hotent.helper.js\";\nimport req from '@/request.js';\nimport utils from '@/utils';\nimport basicData from '@/api/basicData.js';\nimport dialogApi from '@/api/dialogApi';\nimport routerInfoSelector from '@/components/selector/routerInfoSelector.vue';\nimport DiseaseDialog from '@/components/dialog/DiseaseDialog.vue';\nimport ResponsDialog from '@/components/dialog/ResponsDialog.vue';\nimport selectContractDialog from '@/components/flowURLForm/selectContractDialog';\nimport sctionInfoSelector from '@/components/selector/sctionInfoSelector.vue';\nimport { mapState } from 'vuex';\nimport companyInfoSelector from '@/components/selector/companyInfoSelector.vue';\nimport eipUserSelector from '@/components/eipControl/selector/EipUserSelector.vue';\nvar ImgPreviewUpload = function ImgPreviewUpload() {\n return import('@/components/common/ImgPreviewUploadAccessor.vue');\n};\nimport fileUpload from '@/components/upload/fileUpload.vue';\nimport CommonPhrases from '@/components/flowURLForm/CommonPhrases.vue';\nexport default {\n name: 'flowInfoDailog',\n components: {\n // routerInfoSelector,\n DiseaseDialog: DiseaseDialog,\n selectContractDialog: selectContractDialog,\n ImgPreviewUpload: ImgPreviewUpload,\n // sctionInfoSelector,\n companyInfoSelector: companyInfoSelector,\n eipUserSelector: eipUserSelector,\n ResponsDialog: ResponsDialog,\n fileUpload: fileUpload,\n CommonPhrases: CommonPhrases\n },\n data: function data() {\n return {\n dadToSon: {\n bizPath: 'workorder',\n fileList: []\n },\n accountObj: {},\n activeName: 'first',\n orgUserArr: [],\n orgUserName: {},\n //养护人员变量值\n companyInfoSelect: true,\n isSendHandle: false,\n //是否是菜单待办工单中办理发送信息,默认为false\n businessKeyId: '',\n jobNumber: '',\n // responsIdArr: [], //选取施工班组的id,便于查询下一级用户账号\n responsId: '',\n //养护单位id,用于施工班组查询数据\n permission: 'b',\n isEnlarge: false,\n //用户是否选着放大病害照片列表\n initialIndex: 0,\n //放大照片走马灯激状态索引值\n isFirst: true,\n //判断是否调用两次saveData\n currentNode: 1,\n queryByTypeData: {\n fullname: '',\n account: '',\n id: ''\n },\n //用户选择器返回数据用于初始化值\n form: {\n isCheck: false,\n //判断是否是办理,解决养护单位赋值问题\n //工单信息实体数据\n workOrderInformation: {\n type: 4,\n description: '',\n //不能删掉,防止病害选取回填失效\n responsiblePerson: '',\n constructUnitId: '',\n maintenanceStationAudit: '',\n maintenanceDept: '',\n maintenanceUnitAudit: '',\n demandFinishTime: '',\n //要求修护时间\n issueDate: '',\n //签发日期\n issuer: '',\n //签发人\n contractId: '',\n //合同id\n assignedPersonnel: '',\n //承包方经办人\n receivingPartyReview: '',\n //承包方负责人\n hasDisease: 0\n },\n billOfQuantities: [],\n contract: {},\n defaultBpmCheckOpinion: {},\n disease: []\n },\n options: [],\n cbkm: [],\n soncbkm: [],\n //子细目数据\n activeNames: ['1', '2', '3', '4', '5'],\n tableData: [],\n tableDataOutside: [],\n contractInfoList: [],\n //合同信息列表\n disabledCreated: false,\n //控制创建工单信息表单的选填\n dialogImageUrl: '',\n dialogVisible: false,\n isshow: false,\n //控制关联病害是否显示\n readDetaial: false,\n roadOptions: [],\n //选取路段\n rules: {\n 'workOrderInformation.contractId': {\n required: true,\n message: '请选择合同',\n trigger: 'change'\n },\n 'workOrderInformation.type': {\n required: true,\n message: '请输入工单类型',\n trigger: 'blur'\n },\n 'workOrderInformation.roadSegmentName': {\n required: true,\n message: '请选择路段名称',\n trigger: 'change'\n },\n 'workOrderInformation.companyName': {\n required: true,\n message: '请选择施工单位',\n trigger: 'change'\n },\n 'workOrderInformation.position': {\n required: true,\n message: '请输入位置',\n trigger: 'blur'\n },\n 'workOrderInformation.constructionStartPegK': {\n required: true,\n message: '请输入起点桩号(KM)',\n trigger: 'blur'\n },\n 'workOrderInformation.constructionEndPegK': {\n required: true,\n message: '请输入止点桩号(KM)',\n trigger: 'blur'\n },\n 'workOrderInformation.categoryId': {\n required: true,\n message: '请选择类别',\n trigger: 'blur'\n },\n 'workOrderInformation.detailsId': {\n required: true,\n message: '请输入细目',\n trigger: 'blur'\n },\n 'workOrderInformation.demandFinishTime': {\n required: true,\n message: '请输入要求修复时间',\n trigger: 'blur'\n },\n 'workOrderInformation.issuer': {\n required: true,\n message: '请输入签发人',\n trigger: 'blur'\n },\n 'workOrderInformation.issueDate': {\n required: true,\n message: '请输入签发日期',\n trigger: 'blur'\n },\n 'workOrderInformation.taskContent': {\n required: true,\n message: '请输入派工原因',\n trigger: 'blur'\n },\n 'workOrderInformation.remarks': {\n required: true,\n message: '请输入公作概况',\n trigger: 'blur'\n },\n // constructionPicIds: {\n // required: true,\n // message: '请上传照片',\n // trigger: 'blur'\n // }\n // 'workOrderInformation.description': {\n // required: true,\n // message: '请选择关联病害',\n // trigger: 'blur',\n // },\n 'workOrderInformation.maintenanceUnitAudit': {\n required: true,\n message: '请选择养护单位',\n trigger: 'change'\n },\n 'workOrderInformation.responsiblePerson': {\n required: true,\n message: '请选择施工班组',\n trigger: 'change'\n },\n 'workOrderInformation.assignedPersonnel': {\n required: true,\n message: '请选择承包方经办人',\n trigger: 'change'\n },\n 'workOrderInformation.receivingPartyReview': {\n required: true,\n message: '请选择承包方负责人',\n trigger: 'change'\n },\n 'workOrderInformation.maintenanceStationAudit': {\n required: true,\n message: '必填',\n trigger: 'blur'\n },\n 'workOrderInformation.maintenanceDept': {\n required: true,\n message: '必填',\n trigger: 'blur'\n }\n },\n dadToSonPre: {\n sourceId: '',\n fileList: []\n },\n dadToSonUnd: {\n sourceId: '',\n fileList: []\n },\n dadToSonSuf: {\n sourceId: '',\n fileList: []\n },\n source: false,\n selectorUser: {},\n //默认赋值\n reviewUserArr: [],\n priceIsTaxOption: [{\n label: '否',\n value: 0\n }, {\n label: '是',\n value: 1\n }],\n selectOptionsHTN: [],\n subOptionsHTN: []\n };\n },\n mounted: function mounted() {\n var _this2 = this;\n console.log(this.$route, '节点信息');\n this.currentNode = this.$route.query.node;\n console.log(this.currentNode, '节点');\n console.log(this.$route, '参数');\n if (this.$route.query.type) {\n this.readDetaial = true;\n }\n // this.currentNode = 4\n console.log(this.currentNode, '节点');\n if (this.currentNode == 2 || this.currentNode == 3 || this.currentNode == 4 || this.currentNode == 5 || this.currentNode == 6 || this.currentNode == 7) {\n this.disabledCreated = true;\n this.rules['workOrderInformation.constructionStartPegK'].required = false;\n this.rules['workOrderInformation.constructionEndPegK'].required = false;\n } else {\n this.rules['workOrderInformation.constructionStartPegK'].required = true;\n this.rules['workOrderInformation.constructionEndPegK'].required = true;\n }\n var _this = this;\n window.saveData = this.saveData;\n this.id = utils.getUrlKey('id');\n var isEdit = utils.getUrlKey('isEdit');\n this.disabled = isEdit == 'r' ? true : false;\n if (this.id) {\n this.companyInfoSelect = false;\n req.get(window.context.yhxt + '/workOrderInformation/v1/getVo/' + this.id).then(function (res) {\n console.log(res, '流程数据');\n _this2.companyInfoSelect = true;\n if (res.data) {\n res.data.type ? res.data.type = res.data.type + '' : null;\n _this2.form = res.data;\n _this2.form.workOrderInformation.constructUnitId = res.data.workOrderInformation.constructUnitId;\n //根据类别id获取细目数组\n if (_this2.form.workOrderInformation.categoryId) {\n var id = _this2.form.workOrderInformation.categoryId;\n _this2.getDetailsidName(id);\n }\n var obj = {\n workOrderInformation: {},\n billOfQuantities: [],\n contract: {},\n defaultBpmCheckOpinion: {}\n };\n if (_this2.form.diseases) {\n _this2.isshow = true;\n var str = '';\n _this2.form.diseases.forEach(function (item) {\n str += item.description + ';';\n });\n _this2.form.workOrderInformation.description = str;\n }\n _this2.form = _objectSpread(_objectSpread({}, obj), _this2.form);\n _this2.form.workOrderInformation.hasDisease = 0;\n\n // //路段名称赋值\n _this2.form.workOrderInformation.roadSegmentName = res.data.workOrderInformation.road.name;\n _this2.getContractId(); //根据路段id查询相应合同数据\n // this.getByRoadSegmentId_Pcode() //根据路段查询科目数据\n _this2.initSelectOptions(); // 获取科目名称列表\n _this2.getContractOutsideInfo(_this2.form.workOrderInformation.roadSegmentId);\n // console.log(this.form, 'this.form')\n _this2.dadToSonPre.sourceId = _this2.form.workOrderInformation.id;\n _this2.dadToSonUnd.sourceId = _this2.form.workOrderInformation.id;\n _this2.dadToSonSuf.sourceId = _this2.form.workOrderInformation.id;\n _this2.source = true;\n //施工前照片\n _this2.dadToSonPre.fileList = _this2.form.accessoriesPre;\n //施工中照片\n _this2.dadToSonUnd.fileList = _this2.form.accessoriesUnd;\n //施工后照片\n _this2.dadToSonSuf.fileList = _this2.form.accessoriesSuf;\n // 附件管理\n _this2.dadToSon.fileList = _this2.form.accessoriesWorkOrder;\n console.log(_this2.dadToSon.fileList);\n _this2.formartTableData(_this2.form.billOfQuantities); //合同内工程量清单\n _this2.tableDataOutside = _this2.form.billOutOfQuantities; //合同外\n //获取每一列细科目数据\n _this2.tableDataOutside.forEach(function (item) {\n // console.log(item)\n _this2.changesele(item.subjectNumber, item.key);\n });\n }\n });\n } else {\n this.queryByType(); //获取数据赋值默认值\n }\n\n var that = this;\n window.addEventListener('message', function (e) {\n if (e.data.params) {\n console.log(e.data.params, 'message-relationData');\n var data = e.data.params;\n _this2.form.workOrderInformation.roadSegmentId = data.roadId; //路段id\n _this2.form.workOrderInformation.roadSegmentName = data.roadName; //路段名称\n _this2.getContractId(); //根据路段id查询相应合同数据\n // this.getByRoadSegmentId_Pcode()\n _this2.getContractOutsideInfo(_this2.form.workOrderInformation.roadSegmentId);\n var str = data.startPeg || '' + '~' + data.endPeg || '';\n _this2.$set(_this2.form.workOrderInformation, 'position', str); //起止桩号\n // this.form.workOrderInformation.position = str //位置\n _this2.form.workOrderInformation.categoryId = data.categoryId; //类别\n _this2.form.workOrderInformation.subjectName = data.subjectName; //类别\n basicData.getCostAccountManagement(data.categoryId).then(function (res) {\n var arr = [];\n if (res.data.length > 0) {\n res.data.forEach(function (item) {\n if (item.pcode == data.categoryId) {\n arr.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n }\n _this2.cbkm = arr;\n });\n //console.log(this.cbkm, '123')\n _this2.form.workOrderInformation.detailsId = data.detailsId; //细目\n _this2.form.workOrderInformation.dsubjectName = data.dsubjectName; //细目\n // this.getTypeOptions()\n }\n });\n\n _this2.form.workOrderInformation.description = e.data.params.description;\n //存入病害id\n _this2.form.workOrderInformation.diseaseId = e.data.params.id;\n console.log(_this2.form.workOrderInformation);\n }\n });\n Date.prototype.format = function (fmt) {\n var o = {\n 'M+': this.getMonth() + 1,\n //月份\n 'd+': this.getDate(),\n //日\n 'h+': this.getHours(),\n //小时\n 'm+': this.getMinutes(),\n //分\n 's+': this.getSeconds(),\n //秒\n 'q+': Math.floor((this.getMonth() + 3) / 3),\n //季度\n S: this.getMilliseconds() //毫秒\n };\n\n if (/(y+)/.test(fmt)) {\n fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));\n }\n for (var k in o) {\n if (new RegExp('(' + k + ')').test(fmt)) {\n fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));\n }\n }\n return fmt;\n };\n // let orgAccount = JSON.parse(window.sessionStorage.getItem('currentUser'))\n // .account\n // this.getOrgInfo(orgAccount)\n // // 获取当前登录用户名\n // let currentUser = JSON.parse(window.sessionStorage.getItem('currentUser'))\n // this.currentUserName = currentUser.username\n },\n created: function created() {\n // this.getTypeOptions()\n this.getContractId();\n this.getInfo(); //获取路段信息\n // if(this.$route.query.node != 1){\n // this.getContractId()\n // }\n },\n\n computed: mapState({\n actionUrl: function actionUrl() {\n //工程图纸中文件上传\n if (this.dialogImageUrl) {\n return window.context.portal + this.dialogImageUrl;\n } else {\n return window.context.portal + '/bizAccessory/v1/minioDrawingUpload';\n }\n },\n money: function money() {\n if (this.tableData.price) {\n return this.tableData.amount * this.tableData.price;\n }\n }\n }),\n methods: {\n comfirmCommonPhrases: function comfirmCommonPhrases(msg) {\n this.form.workOrderInformation.taskContent = msg;\n this.$forceUpdate();\n },\n // 合同内明细start\n initData: function initData() {\n if (!this.form.workOrderInformation.roadSegmentName) {\n this.$message.warning('请选择路段!');\n return;\n }\n if (!this.selectOptionsHTN.length) {\n this.initSelectOptions();\n }\n },\n initSelectOptions: function initSelectOptions() {\n var _this3 = this;\n var data = 'CBKM';\n if (this.form.workOrderInformation.roadSegmentName == '昆楚高速') {\n data = 'KCQD';\n }\n basicData.getCostAccountManagement(data).then(function (res) {\n res.data.forEach(function (item) {\n _this3.selectOptionsHTN.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n });\n });\n console.log(this.selectOptionsHTN, 'this.selectOptions');\n },\n clearItem: function clearItem(row) {\n row.spec = '';\n row.subOption = [];\n row.price = 0;\n row.amount = 0;\n row.money = 0;\n row.auditPrice = 0;\n row.auditAmount = 0;\n row.auditMoney = 0;\n row.receiverPrice = 0;\n row.receiverAmount = 0;\n row.receiverMoney = 0;\n row.priceIsTax = 0;\n return row;\n },\n changeSelectionHTN: function changeSelectionHTN(value, row, index) {\n var _this4 = this;\n console.log(value, row, index, 'value, scope');\n row = this.clearItem(row);\n row.subOptionsHTN = [];\n row.fineSubjectName = '';\n row.fineSubjectCode = '';\n row.sonSubOptions = [];\n row.sonSubjectName = '';\n row.sonSubjectCode = '';\n basicData.getCostAccountManagement(value).then(function (res) {\n if (res.data.length > 0) {\n var arr = [];\n res.data.forEach(function (item) {\n if (item.pcode == value) {\n arr.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n }\n });\n row.subOptionsHTN = arr;\n row.fineSubjectName = arr[0].label;\n row.fineSubjectCode = arr[0].value;\n var val = arr[0].value;\n _this4.searchSonSubject(val, row, index);\n } else {\n _this4.$set(_this4.tableData, index, row);\n }\n });\n },\n // 回显示获取子科目明细\n formartTableData: function formartTableData(data) {\n var _this5 = this;\n this.tableDate = data.map(function (item, index) {\n item.subjectCode = item.number;\n _this5.getSubSelect(item.subjectCode, item, index);\n _this5.getSonSelect(item.fineSubjectCode, item, index);\n return item;\n });\n },\n // 获取细科目明细\n getSubSelect: function getSubSelect(value, row, index) {\n var _this6 = this;\n basicData.getCostAccountManagement(value).then(function (res) {\n if (res.data.length > 0) {\n var arr = [];\n res.data.forEach(function (item) {\n if (item.pcode == value) {\n arr.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n }\n });\n row.subOptionsHTN = arr;\n _this6.$set(_this6.tableData, index, row);\n }\n });\n },\n // 获取子科目明细\n getSonSelect: function getSonSelect(value, row, index) {\n var _this7 = this;\n basicData.getCostAccountManagement(value).then(function (res) {\n if (res.data.length > 0) {\n var arr = [];\n res.data.forEach(function (item) {\n if (item.pcode == value) {\n arr.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n }\n });\n row.sonSubOptions = arr;\n _this7.$set(_this7.tableData, index, row);\n }\n });\n },\n changeFineSubject: function changeFineSubject(val, row, index) {\n row = this.clearItem(row);\n this.form.fineSubjectCode = val;\n this.sonSubOptions = [];\n row.sonSubjectName = '';\n row.sonSubjectCode = '';\n this.searchSonSubject(val, row, index);\n },\n searchSonSubject: function searchSonSubject(val, row, index) {\n var _this8 = this;\n basicData.getCostAccountManagement(val).then(function (res) {\n row.sonSubOptions = [];\n if (res.data.length > 0) {\n var arr = [];\n res.data.forEach(function (item) {\n if (item.pcode == val) {\n arr.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n }\n });\n row.sonSubOptions = arr;\n }\n row.sonSubjectName = '';\n row.sonSubjectCode = '';\n _this8.$set(_this8.tableData, index, row);\n });\n },\n changeSonSubject: function () {\n var _changeSonSubject = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(val, row, index) {\n var resData;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n this.$set(this.tableData, index, row);\n _context.next = 3;\n return this.loadDetailData(row);\n case 3:\n resData = _context.sent;\n resData = _objectSpread(_objectSpread({}, row), resData);\n this.getContractItem(resData, index);\n case 6:\n case \"end\":\n return _context.stop();\n }\n }, _callee, this);\n }));\n function changeSonSubject(_x, _x2, _x3) {\n return _changeSonSubject.apply(this, arguments);\n }\n return changeSonSubject;\n }(),\n loadDetailData: function loadDetailData(row) {\n var param = {\n pageBean: {\n pageSize: -1\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n property: 'CONTRACT_ID_',\n relation: 'AND',\n value: this.form.workOrderInformation.contractId\n }]\n };\n if (row.subjectCode) {\n param.querys.push({\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'CODE_',\n relation: 'AND',\n value: row.subjectCode\n });\n }\n if (row.fineSubjectCode) {\n param.querys.push({\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'FINE_SUBJECT_CODE_',\n relation: 'AND',\n value: row.fineSubjectCode\n });\n }\n if (row.sonSubjectCode) {\n param.querys.push({\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'SON_SUBJECT_CODE_',\n relation: 'AND',\n value: row.sonSubjectCode\n });\n }\n return new Promise(function (resolve, reject) {\n dialogApi.getContractItem(param).then(function (resp) {\n if (resp.rows && resp.rows.length) resolve(resp.rows[0]);\n });\n });\n },\n // 合同内明细end\n // 获取合同外工程清单科目信息\n getContractOutsideInfo: function getContractOutsideInfo(roadSegmentId) {\n var _this9 = this;\n var params = {\n pageBean: {\n pageSize: -1\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n property: 'road_segment_id_',\n relation: 'AND',\n value: roadSegmentId\n }]\n };\n this.$http.post('${yhxt}/bill/quanti/type/manag/v1/query', params).then(function (res) {\n var arr = res.data.rows;\n arr.length !== 0 && arr.forEach(function (item) {\n _this9.options.push({\n label: item.projectName,\n value: item.projectName,\n price: item.price,\n spec: item.spec,\n amount: item.amount\n });\n });\n });\n },\n //获取级角色信息\n getOrgInfo: function getOrgInfo(orgAccount) {\n var _this10 = this;\n this.$http.get('${yhxt}/api/role/v1/role/getRolesByUser?account=' + orgAccount).then(function (res) {\n if (res.data.length != 0) {\n res.data.forEach(function (item) {\n _this10.groupCodeArr.push(item.groupCode);\n });\n console.log(_this10.groupCodeArr, 'd');\n }\n });\n },\n //办理时请求细目列表\n getDetailsidName: function getDetailsidName(id) {\n var _this11 = this;\n basicData.getCostAccountManagement(id).then(function (res) {\n var arr = [];\n if (res.data.length > 0) {\n res.data.forEach(function (item) {\n if (item.pcode == id) {\n arr.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n }\n _this11.cbkm = arr;\n });\n }\n });\n },\n //获取用户选择的数据的第一条数据用于默认赋值\n queryByType: function queryByType() {\n var _this12 = this;\n this.$http.post('${yhxt}/api/user/v1/users/queryByType').then(function (res) {\n console.log(res);\n var resp = res.data.rows[0];\n var date = _this12.getDate();\n _this12.form.workOrderInformation.demandFinishTime = date;\n _this12.form.workOrderInformation.issueDate = date;\n // 获取当前登录用户名\n var currentUser = JSON.parse(window.sessionStorage.getItem('currentUser'));\n if (_this12.currentNode == 1) {\n //默认签发人为当前登录人账号\n _this12.form.workOrderInformation.issuer = currentUser.username;\n _this12.form.workOrderInformation.assignedPersonnel = resp.fullname;\n _this12.form.workOrderInformation.assignedPersonnelAccount = resp.account;\n } else if (!_this12.form.workOrderInformation.assignedPersonnel && !_this12.form.workOrderInformation.maintenanceStationAudit && !_this12.form.workOrderInformation.maintenanceDept) {}\n });\n },\n //放大病害照片\n handleEnlarge: function handleEnlarge(index) {\n this.initialIndex = index;\n this.isEnlarge = true;\n },\n handleRemove: function handleRemove(file, fileList) {\n console.log(file, fileList);\n },\n handlePictureCardPreview: function handlePictureCardPreview(file) {\n console.log(file);\n this.dialogImageUrl = file.url;\n this.dialogVisible = true;\n },\n // imgUrl(url) {\n // console.log(url)\n // this.form.accessories = url\n // },\n imageUrl: function imageUrl(val) {\n console.log(val);\n },\n sonToDad: function sonToDad(data, key) {\n console.log(data);\n // this.form.accessories = data\n if (key == 'constructionPre') {\n //施工前照片\n this.form.accessoriesPre = data;\n } else if (key == 'constructionUnd') {\n //施工中照片\n this.form.accessoriesUnd = data;\n } else if (key == 'constructionSuf') {\n //施工后照片\n this.form.accessoriesSuf = data;\n } else {\n //附件管理\n this.form.accessoriesWorkOrder = data;\n }\n // console.log(this.form.accessories)\n },\n // 工程清单相关方法 start\n changePrice: function changePrice(val, index) {\n var currentObj;\n if (this.activeName == 'first') {\n currentObj = this.tableData[index];\n } else {\n currentObj = this.tableDataOutside[index];\n }\n currentObj.auditPrice = val;\n if (this.currentNode == 3) {\n currentObj.money = currentObj.amount * val;\n }\n if (this.currentNode == 4) {\n currentObj.receiverMoney = currentObj.receiverAmount * val;\n currentObj.receiverPrice = val;\n }\n currentObj.auditMoney = currentObj.auditAmount * val;\n if (this.activeName == 'first') {\n if (!currentObj.priceIsTax) {\n currentObj.taxMoney = this.getTaxmoney(currentObj.auditMoney);\n } else {\n currentObj.taxMoney = currentObj.auditMoney;\n }\n this.tableData.splice(index, 1, currentObj);\n } else {\n this.tableDataOutside.splice(index, 1, currentObj);\n }\n },\n changeAmount: function changeAmount(val, index) {\n var currentObj;\n if (this.activeName == 'first') {\n currentObj = this.tableData[index];\n } else {\n currentObj = this.tableDataOutside[index];\n }\n if (!currentObj.auditPrice && !currentObj.receiverPrice) {\n currentObj.auditPrice = currentObj.price;\n currentObj.receiverPrice = currentObj.price;\n }\n currentObj.amount = val;\n currentObj.money = currentObj.price * val;\n currentObj.auditAmount = val;\n currentObj.auditMoney = currentObj.auditPrice * val;\n currentObj.receiverAmount = val;\n currentObj.receiverMoney = currentObj.receiverPrice * val;\n if (this.activeName == 'first') {\n if (!currentObj.priceIsTax) {\n currentObj.taxMoney = this.getTaxmoney(currentObj.auditMoney);\n } else {\n currentObj.taxMoney = currentObj.auditMoney;\n }\n this.tableData.splice(index, 1, currentObj);\n } else {\n this.tableDataOutside.splice(index, 1, currentObj);\n }\n },\n changeColNum: function changeColNum(val, index, colums, otherCol, totalCol) {\n var currentObj;\n if (this.activeName == 'first') {\n currentObj = this.tableData[index];\n } else {\n currentObj = this.tableDataOutside[index];\n }\n currentObj[colums] = val;\n currentObj[totalCol] = currentObj[colums] * currentObj[otherCol];\n currentObj.auditAmount = val;\n currentObj.auditMoney = currentObj.auditPrice * val;\n if (this.activeName == 'first') {\n if (!currentObj.priceIsTax) {\n currentObj.taxMoney = this.getTaxmoney(currentObj.auditMoney);\n } else {\n currentObj.taxMoney = currentObj.auditMoney;\n }\n this.tableData.splice(index, 1, currentObj);\n } else {\n this.tableDataOutside.splice(index, 1, currentObj);\n }\n },\n addListItem: function addListItem() {\n console.log(this.form, 'ddddddddddd');\n var length = 0;\n if (this.activeName == 'first') {\n length = this.tableData.length;\n } else {\n length = this.tableDataOutside.length;\n }\n var workOrderInformationId = this.form.workOrderInformation && this.form.workOrderInformation.id ? this.form.workOrderInformation.id : '';\n var contractId = this.form.workOrderInformation && this.form.workOrderInformation.contractId ? this.form.workOrderInformation.contractId : '';\n var newData = {\n // todo 回显时需加上工单id合同id,key\n key: length + 1,\n workOrderInformationId: workOrderInformationId,\n contractId: contractId,\n subjectName: '',\n fineSubjectName: '',\n sonSubjectName: '',\n spec: '',\n price: 0,\n amount: 0,\n money: 0,\n auditPrice: 0,\n auditAmount: 0,\n auditMoney: 0,\n receiverPrice: 0,\n receiverAmount: 0,\n receiverMoney: 0,\n subOption: [],\n priceIsTax: 0\n };\n if (this.activeName == 'first') {\n this.tableData.push(newData);\n } else {\n this.tableDataOutside.push(newData);\n }\n },\n deleteListItem: function deleteListItem(index) {\n if (this.activeName == 'first') {\n this.tableData.splice(index, 1);\n } else {\n this.tableDataOutside.splice(index, 1);\n }\n },\n searchSubject: function searchSubject(index) {\n if (this.form.workOrderInformation && this.form.workOrderInformation.contractId) {\n this.$refs.selectContract.open(index, this.form.workOrderInformation.contractId, this.form.workOrderInformation.roadSegmentName);\n }\n },\n getTaxmoney: function getTaxmoney(val) {\n var BigNumber = require('bignumber.js');\n val = new BigNumber(val);\n var num = val.plus(val.times(0.066)).times(1.09).toFixed(2);\n return num;\n },\n getContractItem: function getContractItem(obj, index) {\n obj.workOrderInformationId = this.form.workOrderInformation && this.form.workOrderInformation.id ? this.form.workOrderInformation.id : '';\n obj.contractItemId = obj.id;\n obj.number = obj.code;\n obj.sort = obj.key;\n obj.money = obj.monty;\n obj.amount = obj.amount; // 取消默认值 || 1 //数量默认为1\n obj.receiverPrice = obj.price;\n obj.receiverAmount = obj.amount;\n obj.receiverMoney = obj.money;\n obj.auditPrice = obj.price;\n obj.auditAmount = obj.amount;\n obj.auditMoney = obj.money;\n // 判断是否含税\n if (!obj.priceIsTax) {\n obj.taxMoney = this.getTaxmoney(obj.auditMoney); // 含税金额\n } else {\n obj.taxMoney = obj.auditMoney.toFixed(2);\n }\n this.tableData.splice(index, 1, obj);\n },\n changeseleOut_: function changeseleOut_(val, index) {\n var _this13 = this;\n this.options.forEach(function (item) {\n if (item.value == val) {\n _this13.tableDataOutside[index].price = item.price;\n _this13.tableDataOutside[index].spec = item.spec;\n _this13.tableDataOutside[index].amount = item.amount;\n _this13.tableDataOutside[index].money = item.price * item.amount;\n }\n });\n },\n handleBlur: function handleBlur(e, index) {\n if (e.target.value) {\n var val = e.target.value;\n this.$set(this.tableDataOutside[index], 'subjectName', e.target.value);\n }\n },\n changeseleOut: function changeseleOut(value, key) {\n var _this14 = this;\n var arr = [];\n basicData.getCostAccountManagement(value).then(function (res) {\n if (res.data.length > 0) {\n res.data.forEach(function (item) {\n if (item.pcode == value) {\n arr.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n }\n });\n //默然赋值细科目的第一条数据\n _this14.tableDataOutside.forEach(function (item) {\n if (item.key == key) {\n item.subOption = arr;\n item.fineSubjectNumber = item.subOption[0].value;\n item.fineSubjectCode = item.subOption[0].value;\n item.fineSubjectName = item.subOption[0].label;\n basicData.getCostAccountManagement(item.fineSubjectCode).then(function (res) {\n if (res.data.length > 0) {\n res.data.forEach(function (item1) {\n if (item1.pcode == item.fineSubjectCode) {\n arr.push({\n label: item1.subjectName,\n value: item1.subjectCode\n });\n }\n });\n _this14.tableDataOutside.forEach(function (item) {\n if (item.key == key) {\n item.childOption = arr;\n item.sonSubjectName = item.childOption[0].label;\n item.sonSubjectCode = item.childOption[0].value;\n }\n });\n } else {\n _this14.$message.info('暂无子科目数据');\n _this14.tableDataOutside.forEach(function (item) {\n if (item.key == key) {\n item.childOption = [];\n item.sonSubjectName = '';\n item.sonSubjectCode = '';\n }\n });\n }\n });\n }\n });\n //赋值科目名称\n _this14.options.forEach(function (item) {\n if (item.value == value) {\n _this14.tableDataOutside.forEach(function (item1) {\n if (item1.key == key) {\n item1.subjectName = item.label;\n item1.subjectCode = item.value;\n item1.number = item.value;\n }\n });\n }\n });\n } else {\n _this14.tableDataOutside.forEach(function (item) {\n if (item.key == key) {\n item.subOption = [];\n item.fineSubjectCode = '';\n item.fineSubjectName = '';\n }\n });\n }\n });\n },\n subSubChange: function subSubChange(val, obj) {\n var _this15 = this;\n var value;\n // console.log(val, obj)\n if (obj.subOption) {\n obj.subOption.forEach(function (item) {\n if (item.value == val) {\n _this15.tableDataOutside.forEach(function (item1) {\n if (item1.key == obj.key) {\n item1.fineSubjectName = item.label;\n item1.fineSubjectNumber = item.value;\n value = item1.value;\n var arr = [];\n var key = obj.key;\n basicData.getCostAccountManagement(value).then(function (res) {\n if (res.data.length > 0) {\n res.data.forEach(function (item) {\n if (item.pcode == value) {\n arr.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n }\n });\n //默然赋值子科目的第一条数据\n _this15.tableDataOutside.forEach(function (item) {\n if (item.key == key) {\n item.childOption = arr;\n item.sonSubjectName = item.childOption[0].label;\n item.sonSubjectCode = item.childOption[0].value;\n }\n });\n } else {\n _this15.$message.info('暂无子科目数据');\n _this15.tableDataOutside.forEach(function (item) {\n if (item.key == key) {\n item.childOption = [];\n item.sonSubjectName = '';\n item.sonSubjectCode = '';\n }\n });\n }\n });\n }\n });\n }\n });\n }\n },\n //子科目名称赋值\n childSubChange: function childSubChange(val, obj) {\n var _this16 = this;\n if (obj.childOption) {\n obj.childOption.forEach(function (item) {\n if (item.value == val) {\n _this16.tableDataOutside.forEach(function (item1) {\n if (item1.key == obj.key) {\n item1.sonSubjectName = item.label;\n item1.sonSubjectCode = item.value;\n }\n });\n }\n });\n }\n },\n // 工程清单相关方法 end\n // handleRemove(file, fileList) {\n // console.log(file, fileList)\n // },\n // handlePictureCardPreview(file) {\n // this.dialogImageUrl = file.url\n // // this.dialogVisible = true\n // },\n handleFocusDisease: function handleFocusDisease() {\n this.$refs.disease.open();\n },\n openDisease: function openDisease() {\n this.$refs.disease.open();\n },\n handleFocusRespons: function handleFocusRespons() {\n this.$refs.respons.open(this.form.workOrderInformation.maintenanceUnitAuditId);\n },\n openRespons: function openRespons() {\n this.$refs.respons.open(this.form.workOrderInformation.maintenanceUnitAuditId);\n },\n //选取病害回填数据\n handleSelectDisease: function handleSelectDisease(data, sclection) {\n if (data.id && data.description) {\n if (!this.form.workOrderInformation.diseaseId) {\n this.form.workOrderInformation.diseaseId = '';\n }\n this.form.workOrderInformation.diseaseId += data.id + ';';\n this.form.workOrderInformation.description += data.startPeg + ';';\n // this.form.workOrderInformation.diseaseId = data.id\n // this.form.workOrderInformation.description = data.description\n this.form.routeId = data.id;\n this.form.createAccount = data.createAccount; //创建人账号 运用于流程\n this.form.description = data.description; //病号描述\n this.form.createTime = data.createTime; //病害创建时间\n // this.$refs.diseaseName.focus()\n this.$refs.diseaseName.blur();\n console.log(this.form.workOrderInformation.diseaseId, 'ids');\n } else {\n this.$message.info('此病害无法添加');\n }\n },\n handleSelectRespons: function handleSelectRespons(data) {\n var _this17 = this;\n // console.log(data)\n this.hanldeResponsClear(); //每次回填清空当前数据,防止重复填写\n data.forEach(function (item) {\n _this17.form.workOrderInformation.responsiblePerson += item.name + ';';\n _this17.form.workOrderInformation.constructUnitId += item.id + ';';\n // this.responsIdArr.push(item.id)\n });\n\n this.$refs.responsName.focus();\n this.$refs.responsName.blur();\n this.accountObj = {}; //施工人员账号对象\n //根据施工班组id查询用户账号循环进流程变量中,自定义的参数\n this.getResponsAccount().then(function (res) {\n res.forEach(function (item, index) {\n _this17.accountObj['props_' + index] = item;\n });\n });\n },\n handleDiseaseClear: function handleDiseaseClear() {\n this.form.workOrderInformation.diseaseId = '';\n this.form.workOrderInformation.description = '';\n this.form.routeId = '';\n this.form.createAccount = ''; //创建人账号 运用于流程\n this.form.description = ''; //病号描述\n this.form.createTime = ''; //病害创建时间\n },\n hanldeResponsClear: function hanldeResponsClear() {\n // this.responsIdArr = []\n this.form.workOrderInformation.constructUnitId = '';\n this.form.workOrderInformation.responsiblePerson = '';\n },\n // //字典回调数据\n handleDict: function handleDict(val, obj, str) {\n if (str === 'yhgd-gdlx') {\n this.form.workOrderInformation.typeValue = obj.name;\n } else if (str === 'fx') {\n this.form.disease.directionName = obj.name;\n }\n },\n handleCancel: function handleCancel() {\n this.$emit('handleCancel');\n },\n //根据选取的施工班组查询账户\n getResponsAccount: function getResponsAccount() {\n var _this18 = this;\n return new Promise(function (resolve, reject) {\n var arr = [];\n var params = {\n pageBean: {\n page: 1,\n pageSize: 10,\n showTotal: true\n },\n params: {},\n org_id_: '',\n querys: [{\n group: 'main',\n operation: 'IN',\n parentGroup: '',\n property: 'org_id_',\n relation: 'AND',\n value: []\n }],\n sorter: []\n };\n var arr_ = _this18.form.workOrderInformation.constructUnitId.split(';');\n params.querys[0].value = arr_.slice(0, arr_.length - 1);\n _this18.$http.post('${form}/api/user/v1/users/queryByType', params).then(function (res) {\n res.data.rows.forEach(function (item) {\n arr.push(item.account);\n });\n resolve(arr);\n });\n });\n },\n saveData: function saveData() {\n var _this19 = this;\n if (JSON.stringify(this.accountObj) === '{}' || !this.accountObj || this.accountObj == undefined) {\n if (this.form.workOrderInformation.constructUnitId !== undefined && this.form.workOrderInformation.constructUnitId !== '') {\n this.getResponsAccount().then(function (res) {\n res.forEach(function (item, index) {\n _this19.accountObj['props_' + index] = item;\n });\n });\n }\n }\n console.log(this.accountObj, 'accountObj');\n //判断是否存在数据否则清除数据\n if (this.tableData.length !== 0 || this.tableDataOutside.length !== 0) {\n this.tableData.forEach(function (item, index) {\n if (!item.subjectName) {\n _this19.tableData.splice(index, 1);\n }\n });\n this.tableDataOutside.forEach(function (item, index) {\n if (!item.subjectName) {\n _this19.tableDataOutside.splice(index, 1);\n }\n });\n }\n // this.getResponsAccount()\n var _this = this;\n //验证表单是否填写完\n this.tableData.length !== 0 && this.tableData.forEach(function (item) {\n delete item.id;\n });\n this.form.billOfQuantities = this.tableData;\n this.form.billOutOfQuantities = this.tableDataOutside;\n // console.log(this.form, 'ddddddddddddddddd')\n this.$refs.taskManageForm.validate(function (pass) {\n if (pass) {\n //请求保存提交\n console.log(_this19.form, 'this.form');\n // let accountObj = {} //施工人员账号对象\n // //根据施工班组id查询用户账号循环进流程变量中,自定义的参数\n // if (this.currentNode == 2) {\n // this.getResponsAccount().then(res => {\n // console.log(res, 'res工单信息')\n // // debugger\n // res.forEach((item, index) => {\n // accountObj['props_' + index] = item\n // })\n // })\n // }\n\n // this.accountObj = {} //施工人员账号对象\n // //根据施工班组id查询用户账号循环进流程变量中,自定义的参数\n // this.getResponsAccount().then(res => {\n // res.forEach((item, index) => {\n // this.accountObj['props_' + index] = item\n // })\n // })\n if (_this19.isFirst) {\n _this19.$http.post('${yhxt}/workOrderInformation/v1/saveVo', _this19.form).then(function (res) {\n console.log(res, 'resresree');\n if (res.data.state) {\n _this19.businessKeyId = res.data.value.workOrderInformation.id;\n _this19.jobNumber = res.data.value.workOrderInformation.jobNumber;\n }\n var params = {\n type: 'saveData',\n state: true,\n businessKey: _this19.businessKeyId,\n sysCode: ''\n };\n params.vars = {};\n if (_this19.form.createAccount) {\n params.vars.createAccount = _this19.form.createAccount; //创建者\n }\n\n if (_this19.form.description) {\n params.vars.description = _this19.form.description; //描述\n }\n\n if (_this19.form.createTime) {\n params.vars.createTime = _this19.form.createTime; //创建时间\n }\n\n if (_this19.jobNumber) {\n params.vars.jobNumber = _this19.jobNumber; //工单号\n }\n\n if (_this19.form.workOrderInformation.assignedPersonnelAccount) {\n params.vars.assignedPersonnelAccount = _this19.form.workOrderInformation.assignedPersonnelAccount; //养护人员账号\n }\n\n if (_this19.form.workOrderInformation.receivingPartyReviewAccount) {\n params.vars.receivingPartyReviewAccount = _this19.form.workOrderInformation.receivingPartyReviewAccount; //收方审核账号\n }\n\n if (_this19.form.workOrderInformation.maintenanceStationAuditAccount) {\n params.vars.maintenanceStationAuditAccount = _this19.form.workOrderInformation.maintenanceStationAuditAccount;\n }\n if (_this19.form.workOrderInformation.maintenanceDeptAccount) {\n params.vars.maintenanceDeptAccount = _this19.form.workOrderInformation.maintenanceDeptAccount; //养护站审核账号\n }\n //将施工账号存储进params.vars里\n if (_this19.accountObj) {\n params.vars = $.extend(params.vars, _this19.accountObj);\n }\n console.log(params.vars, '4444444444444444444444');\n hotent.sendMessage(params);\n _this19.isFirst = false; //数据保存后置为false,防止多次保存\n });\n } else {\n var params = {\n type: 'saveData',\n state: true,\n businessKey: _this19.businessKeyId,\n sysCode: ''\n };\n params.vars = {};\n if (_this19.form.createAccount) {\n params.vars.createAccount = _this19.form.createAccount; //创建者\n }\n\n if (_this19.form.description) {\n params.vars.description = _this19.form.description; //描述\n }\n\n if (_this19.form.createTime) {\n params.vars.createTime = _this19.form.createTime; //创建时间\n }\n\n if (_this19.jobNumber) {\n params.vars.jobNumber = _this19.jobNumber; //工单号\n }\n\n if (_this19.form.workOrderInformation.assignedPersonnelAccount) {\n params.vars.assignedPersonnelAccount = _this19.form.workOrderInformation.assignedPersonnelAccount; //养护人员账号\n }\n\n if (_this19.form.workOrderInformation.receivingPartyReviewAccount) {\n params.vars.receivingPartyReviewAccount = _this19.form.workOrderInformation.receivingPartyReviewAccount; //收方审核账号\n }\n\n if (_this19.form.workOrderInformation.maintenanceStationAuditAccount) {\n params.vars.maintenanceStationAuditAccount = _this19.form.workOrderInformation.maintenanceStationAuditAccount;\n }\n if (_this19.form.workOrderInformation.maintenanceDeptAccount) {\n params.vars.maintenanceDeptAccount = _this19.form.workOrderInformation.maintenanceDeptAccount; //养护站审核账号\n }\n\n if (_this19.accountObj) {\n // params.vars = {...accountObj, ...params[vars]}\n params.vars = $.extend(params.vars, _this19.accountObj);\n }\n console.log(params.vars, '4444444444444444444444');\n hotent.sendMessage(params);\n _this19.isFirst = false; //数据保存后置为false,防止多次保存\n }\n } else {\n return false;\n }\n });\n },\n //路线信息赋值\n changed: function changed(id) {\n var _this20 = this;\n this.form.workOrderInformation.roadSegmentId = id;\n this.roadOptions.forEach(function (item) {\n if (item.id == id) {\n _this20.form.workOrderInformation.roadSegmentName = item.name;\n }\n });\n this.form.workOrderInformation.contractId = '';\n this.getContractId(); //路段改变再次获取合同信息\n\n //根据路段查询科目名称数据\n // this.getByRoadSegmentId_Pcode()\n\n // 获取工程清单外信息\n this.getContractOutsideInfo(id);\n },\n getByRoadSegmentId_Pcode: function getByRoadSegmentId_Pcode() {\n var _this21 = this;\n var roadSegmentId = this.form.workOrderInformation.roadSegmentId;\n this.getByRoadSegmentId('', roadSegmentId).then(function (res) {\n if (res.length !== 0) {\n var pcode = res[0].subjectCode;\n _this21.getByRoadSegmentId(pcode, roadSegmentId).then(function (res) {\n _this21.options = [];\n _this21.cbkm = [];\n _this21.form.workOrderInformation.categoryId = '';\n _this21.form.workOrderInformation.detailsId = '';\n if (res.length !== 0) {\n res.forEach(function (item) {\n _this21.options.push({\n label: item.subjectName,\n value: item.subjectCode,\n roadSegmentId: item.roadSegmentId,\n roadSegmentName: item.roadSegmentName\n });\n });\n }\n });\n } else {\n //获取所有科目数据\n _this21.getTypeOptions();\n }\n });\n },\n getInfo: function getInfo() {\n var _this22 = this;\n basicData.getRoadManagement().then(function (res) {\n if (res.rows.length !== 0) {\n _this22.roadOptions = res.rows;\n // this.form.workOrderInformation.roadSegmentName = res.rows[0].name\n // this.form.workOrderInformation.roadSegmentId = res.rows[0].id\n _this22.getContractId(); //路段改变再次获取合同信息\n // this.getByRoadSegmentId_Pcode()\n _this22.getContractOutsideInfo(_this22.form.workOrderInformation.roadSegmentId);\n }\n });\n },\n // value(obj) {\n // console.log(obj)\n // if (obj) {\n // this.form.workOrderInformation.roadSegmentName = obj.name\n // this.form.workOrderInformation.roadSegmentId = obj.id\n // this.getContractId() //路段改变再次获取合同信息\n // }\n // },\n //公司赋值\n handleChanged: function handleChanged(obj) {\n console.log(obj.valueInfo.join(','));\n this.form.workOrderInformation.companyIds = JSON.stringify(obj.valueInfo);\n this.form.workOrderInformation.companyName = obj.name;\n this.form.workOrderInformation.companyId = obj.id;\n },\n companyValue: function companyValue(obj) {\n console.log(obj);\n this.form.workOrderInformation.companyName = obj.name;\n this.form.workOrderInformation.companyId = obj.id;\n this.form.workOrderInformation.companyIds = JSON.stringify(obj.id.split(' ')); //必须是空格\n },\n changesele: function changesele(value) {\n var _this23 = this;\n console.log(value);\n this.options.forEach(function (item) {\n if (value == item.value) {\n _this23.form.workOrderInformation.subjectName = item.label;\n _this23.form.workOrderInformation.categoryId = item.value;\n }\n });\n var arr = [];\n basicData.getCostAccountManagement(value).then(function (res) {\n if (res.data.length > 0) {\n res.data.forEach(function (item) {\n if (item.pcode == value) {\n arr.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n }\n _this23.cbkm = arr;\n _this23.form.workOrderInformation.detailsId = arr[0].value;\n _this23.form.workOrderInformation.dsubjectName = arr[0].label;\n });\n\n //查询子细目\n var val = arr[0].value;\n _this23.getsonCbkm(val);\n }\n });\n },\n //根据科目父节点编码以及路段id获取科目数据\n getByRoadSegmentId: function getByRoadSegmentId(pcode, id) {\n return new Promise(function (resolve, reject) {\n req.get(window.context.yhxt + \"/bizCourseDetails/v1/get/getByParentIdRoad?pCode=\".concat(pcode, \"&roadSegmentId=\").concat(id)).then(function (resp) {\n resolve(resp.data);\n }, function (error) {\n reject(error);\n });\n });\n },\n dsubchange: function dsubchange(val) {\n var _this24 = this;\n console.log(val);\n this.cbkm.forEach(function (item) {\n if (item.value == val) {\n _this24.form.workOrderInformation.dsubjectName = item.label;\n _this24.form.workOrderInformation.detailsId = item.value;\n //查询子细目\n var _val = item.value;\n _this24.getsonCbkm(_val);\n }\n });\n this.$forceUpdate();\n },\n //获取子细目数据\n getsonCbkm: function getsonCbkm(pcode) {\n var _this25 = this;\n var arrson = [];\n basicData.getCostAccountManagement(pcode).then(function (res) {\n if (res.data.length > 0) {\n res.data.forEach(function (item) {\n if (item.pcode == pcode) {\n arrson.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n }\n _this25.soncbkm = arrson;\n _this25.form.workOrderInformation.sonSubjectCode = arrson[0].value;\n _this25.form.workOrderInformation.sonSubjectName = arrson[0].label;\n });\n } else {\n _this25.$message.info('暂无子细目数据');\n }\n });\n },\n //子细目\n sondsubchange: function sondsubchange(val) {\n var _this26 = this;\n this.soncbkm.forEach(function (item) {\n if (item.value == val) {\n _this26.form.workOrderInformation.sonSubjectName = item.label;\n _this26.form.workOrderInformation.sonSubjectCode = item.value;\n }\n });\n },\n //获取类型数据\n getTypeOptions: function getTypeOptions() {\n var _this27 = this;\n this.options = [];\n var data = 'CBKM';\n basicData.getCostAccountManagement(data).then(function (res) {\n res.data.forEach(function (item) {\n _this27.options.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n });\n });\n },\n //获取合同信息\n getContractId: function getContractId() {\n var _this28 = this;\n var params = {\n pageBean: {\n page: 1,\n pageSize: -1,\n showTotal: true\n },\n params: {},\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n property: 'road_segment_id_',\n relation: 'AND',\n value: this.form.workOrderInformation.roadSegmentId\n }],\n sorter: [{\n direction: 'DESC',\n property: 'contract_date_'\n }]\n };\n basicData.getDailyMaintenanceontract(params).then(function (res) {\n console.log(res, 'd');\n _this28.contractInfoList = res.rows;\n if (_this28.contractInfoList.length !== 0 && _this28.$route.query.node == 1) {\n _this28.form.workOrderInformation.contractId = _this28.contractInfoList[0].id;\n }\n console.log(_this28.contractInfoList);\n });\n },\n //赋值合同名称\n contractChange: function contractChange(val) {\n console.log(val);\n // this.contractInfoList.forEach((item) => {\n // this.form.workOrderInformation.contractId = item.id\n // })\n },\n //公司赋值\n handleChangedA: function handleChangedA(obj) {\n // console.log(obj.valueInfo.join(','))\n this.form.workOrderInformation.maintenanceUnitAuditIds = JSON.stringify(obj.valueInfo);\n this.form.workOrderInformation.maintenanceUnitAudit = obj.name;\n this.form.workOrderInformation.maintenanceUnitAuditId = obj.id;\n //根据id获取当前组织单位下的用户角色\n this.getByOrgId(obj.id);\n },\n companyValueA: function companyValueA(obj) {\n // console.log(obj)\n this.form.workOrderInformation.maintenanceUnitAudit = obj.name;\n this.form.workOrderInformation.maintenanceUnitAuditId = obj.id;\n // this.responsId = this.form.workOrderInformation.maintenanceUnitAuditId\n this.form.workOrderInformation.maintenanceUnitAuditIds = JSON.stringify(obj.id.split(' ')); //必须是空格\n this.getByOrgId(obj.id);\n },\n //获取用户选择养护单位下组织用户\n getByOrgId: function getByOrgId(orgId) {\n var _this29 = this;\n var params = {\n pageBean: {\n page: 1,\n pageSize: -1\n },\n querys: [{\n group: 'orgTree',\n operation: 'IN',\n property: 'ORG_ID_',\n relation: 'AND',\n value: orgId\n }],\n sorter: [{\n direction: 'DESC',\n property: 'updateTime'\n }]\n };\n this.$http.post('${yhxt}/api/user/v1/users/getOrgUserQuery', params).then(function (res) {\n var data = res.data.rows;\n _this29.orgUserArr = data;\n //默认赋值第一条数据养护人员名称\n if (data.length != 0) {\n _this29.form.workOrderInformation.assignedPersonnelId = data[0].id;\n _this29.form.workOrderInformation.assignedPersonnelAccount = data[0].account;\n _this29.form.workOrderInformation.assignedPersonnel = data[0].fullname;\n } else {\n _this29.form.workOrderInformation.assignedPersonnelId = '';\n _this29.form.workOrderInformation.assignedPersonnelAccount = '';\n _this29.form.workOrderInformation.assignedPersonnel = '';\n }\n //根据承包方经办人id查询承包方负责人\n var reviewID = _this29.form.workOrderInformation.assignedPersonnelId;\n _this29.getByReviewId(reviewID);\n });\n },\n //根据承包方经办人id查询承包方负责人\n getByReviewId: function getByReviewId(id) {\n var _this30 = this;\n this.$http.get('${yhxt}/workOrderInformation/v1/getPrincipal?userId=' + id).then(function (res) {\n _this30.reviewUserArr = res.data;\n });\n },\n //组织用户回调函数\n handleOrgUserchange: function handleOrgUserchange(id) {\n var _this31 = this;\n this.orgUserArr.forEach(function (item) {\n if (item.id == id) {\n _this31.form.workOrderInformation.assignedPersonnelId = item.id;\n _this31.form.workOrderInformation.assignedPersonnelAccount = item.account;\n _this31.form.workOrderInformation.assignedPersonnel = item.fullname;\n }\n });\n this.$forceUpdate();\n },\n handleReviewUserchange: function handleReviewUserchange(id) {\n var _this32 = this;\n this.reviewUserArr.forEach(function (item) {\n if (item.id == id) {\n _this32.form.workOrderInformation.receivingPartyReviewId = item.id;\n _this32.form.workOrderInformation.receivingPartyReviewAccount = item.account;\n _this32.form.workOrderInformation.receivingPartyReview = item.fullname;\n }\n });\n this.$forceUpdate();\n }\n }\n};",null]}