{"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\\selectContractDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\components\\flowURLForm\\selectContractDialog.vue","mtime":1673633598675},{"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/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 basicData from '@/api/basicData';\nimport dialogApi from '@/api/dialogApi';\nexport default {\n name: 'SelectContractDialog',\n data: function data() {\n return {\n dialogVisible: false,\n contractId: '',\n roadName: '',\n selectOptions: [],\n subOptions: [],\n sonSubOptions: [],\n form: {\n subjectName: '',\n subjectCode: '',\n fineSubjectName: '',\n fineSubjectCode: '',\n sonSubjectName: '',\n sonSubjectCode: ''\n },\n data: [],\n pageBean: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n selectedId: ''\n };\n },\n created: function created() {\n // this.initSelectOptions()\n },\n methods: {\n rowClick: function rowClick(row) {\n this.activeRow = row;\n this.selectedId = row.id;\n },\n initData: function initData() {\n if (!this.selectOptions.length) {\n this.initSelectOptions();\n }\n },\n initSelectOptions: function initSelectOptions() {\n var _this = this;\n var data = 'CBKM';\n if (this.roadName == '昆楚高速') {\n // data = 'CBKM-KC'\n data = 'KCQD';\n }\n basicData.getCostAccountManagement(data).then(function (res) {\n res.data.forEach(function (item) {\n _this.selectOptions.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n });\n });\n console.log(this.selectOptions, 'this.selectOptions');\n },\n changeSelection: function changeSelection(value) {\n var _this2 = this;\n this.form.subjectCode = value;\n this.subOptions = [];\n this.form.fineSubjectName = '';\n this.form.fineSubjectCode = '';\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 _this2.subOptions = arr;\n _this2.form.fineSubjectName = arr[0].label;\n _this2.form.fineSubjectCode = arr[0].value;\n var val = arr[0].value;\n _this2.sonSubOptions = [];\n _this2.form.sonSubjectName = '';\n _this2.form.sonSubjectCode = '';\n basicData.getCostAccountManagement(val).then(function (res) {\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 _this2.sonSubOptions = arr_;\n _this2.form.sonSubjectName = arr_[0].label;\n _this2.form.sonSubjectCode = arr_[0].value;\n }\n });\n }\n });\n },\n changeFineSubject: function changeFineSubject(val) {\n var _this3 = this;\n this.form.fineSubjectCode = val;\n this.sonSubOptions = [];\n this.form.sonSubjectName = '';\n this.form.sonSubjectCode = '';\n basicData.getCostAccountManagement(val).then(function (res) {\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 _this3.sonSubOptions = arr;\n _this3.form.sonSubjectName = arr[0].label;\n _this3.form.sonSubjectCode = arr[0].value;\n }\n });\n },\n changeSonSubject: function changeSonSubject(val) {\n this.form.sonSubjectCode = val;\n },\n reSearch: function reSearch() {\n this.form.fineSubjectName = '';\n this.form.fineSubjectCode = '';\n this.form.subjectName = '';\n this.form.subjectCode = '';\n this.form.sonSubjectName = '';\n this.form.sonSubjectCode = '';\n this.subOptions = [];\n this.sonSubOptions = [];\n var param = {\n pageBean: this.pageBean\n };\n this.loadData(param);\n },\n search: function search() {\n var param = {\n pageBean: this.pageBean\n };\n this.loadData(param);\n },\n handleOK: function handleOK() {\n var _this4 = this;\n if (this.selectedId) {\n var selection = this.data.filter(function (item) {\n return item.id == _this4.selectedId;\n })[0];\n this.$emit('change', selection, this.currentIndex);\n }\n this.close();\n },\n open: function open(index, contractId, roadName) {\n this.currentIndex = index;\n this.contractId = contractId;\n this.roadName = roadName;\n this.dialogVisible = true;\n this.initSelectOptions();\n },\n loadData: function loadData(param, cb) {\n var _this5 = this;\n if (!param.querys) {\n param.querys = [{\n group: 'main',\n operation: 'EQUAL',\n property: 'CONTRACT_ID_',\n relation: 'AND',\n value: this.contractId\n }];\n }\n if (this.form.subjectCode) {\n param.querys.push({\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'CODE_',\n relation: 'AND',\n value: this.form.subjectCode\n });\n }\n if (this.form.fineSubjectCode) {\n param.querys.push({\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'FINE_SUBJECT_CODE_',\n relation: 'AND',\n value: this.form.fineSubjectCode\n });\n }\n if (this.form.sonSubjectCode) {\n param.querys.push({\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'SON_SUBJECT_CODE_',\n relation: 'AND',\n value: this.form.sonSubjectCode\n });\n }\n dialogApi.getContractItem(param).then(function (resp) {\n _this5.data = resp.rows;\n _this5.pageBean = {\n page: resp.page,\n pageSize: resp.pageSize,\n total: resp.total\n };\n }).finally(function () {\n if (cb) {\n cb();\n }\n });\n },\n close: function close() {\n this.dialogVisible = false;\n this.contractId = '';\n this.selectedId = '';\n this.data = [];\n this.selectOptions = [];\n this.subOptions = [];\n this.form = {\n subjectName: '',\n subjectCode: '',\n fineSubjectName: '',\n fineSubjectCode: ''\n };\n this.currentIndex = '';\n }\n }\n};",null]}