{"remainingRequest":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\orderManagement\\orderMange\\component\\orderMangeAddDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\orderManagement\\orderMange\\component\\orderMangeAddDialog.vue","mtime":1713259781131},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.function.name\";\nimport _toConsumableArray from \"D:/jenkins/workspace/jd_cgpt_fvue/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\nimport _defineProperty from \"D:/jenkins/workspace/jd_cgpt_fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/es7.string.pad-start\";\nimport \"core-js/modules/es6.regexp.to-string\";\nimport \"core-js/modules/web.dom.iterable\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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//\nimport Breadcrumb from '@/components/Breadcrumb/index.vue';\nimport purchaseOrder from '@/api/BasicDataManagement/purchaseOrder.js';\nimport multipleInput from \"../../../SupplierManagement/blacklistSupplier/component/multipleInput.vue\";\nimport expertPoolUnits from \"./expertPoolUnits.vue\";\nimport expertOrgUnits from \"./expertOrgUnits.vue\"; // import {uploadMixin} from '@/mixins/uploadMixin'\n\nexport default {\n name: 'orderMangeAddDialog',\n components: {\n Breadcrumb: Breadcrumb,\n expertPoolUnits: expertPoolUnits,\n expertOrgUnits: expertOrgUnits,\n multipleInput: multipleInput\n },\n props: {\n editData: Object\n },\n // mixins: [uploadMixin],\n data: function data() {\n return {\n centralizedData: [{\n name: '是',\n id: 1\n }, {\n name: '否',\n id: 0\n }],\n breadcrumbOpt: [{\n breadcrumbName: '订单管理'\n }, {\n breadcrumbName: '新增'\n }],\n rules: {\n contractId: [{\n required: true,\n message: '请选择合同',\n trigger: 'blur'\n }],\n createName: [{\n required: true,\n message: '请输入编制人',\n trigger: 'blur'\n }],\n matCompanyName: [{\n required: true,\n message: '请选择采购方',\n trigger: 'blur'\n }],\n vendorName: [{\n required: true,\n message: '请选择供货方',\n trigger: 'blur'\n }],\n // orderCreatedate: [\n // {\n // required: true,\n // message: '请选择订单时间',\n // trigger: 'blur',\n // },\n // ],\n status: [{\n required: true,\n message: '请选择订单状态',\n trigger: 'blur'\n }],\n approvalStatus: [{\n required: true,\n message: '请选择审批状态',\n trigger: 'blur'\n }]\n },\n parameter: {\n detailsList: [],\n orderAmount: 0,\n taxInvalue: 0 // status: '1',\n // approvalStatus: '1',\n\n },\n statusList: [{\n label: '未确认',\n value: '1'\n }, {\n label: '已确认',\n value: '2'\n }],\n // 订单状态\n approvalStatusList: [{\n label: '审批中',\n value: '1'\n }, {\n label: '已审批',\n value: '2'\n }, {\n label: '已撤回',\n value: '3'\n }],\n // 审批状态\n dialogVisibleDetial: false,\n dialogVisible: false,\n dialogTableDataDetial: [],\n dialogTableData: [],\n params: {\n pageBean: {\n page: 1,\n pageSize: 20,\n total: 0\n }\n },\n queryParamsDetial: [{\n group: 'main',\n operation: 'LIKE',\n parentGroup: '',\n property: 'matName',\n relation: 'AND',\n value: ''\n }],\n queryParams: [{\n group: 'main',\n operation: 'LIKE',\n parentGroup: '',\n property: 'contrName',\n relation: 'AND',\n value: ''\n }],\n enterpriseList: [],\n supplierList: [],\n selectObj: {}\n };\n },\n created: function created() {\n if (this.$route.query.editRows) {\n this.breadcrumbOpt[1].breadcrumbName = '编辑'; // this.parameter = this.$route.query.editRows\n\n this.parameter = JSON.parse(JSON.stringify(this.$route.query.editRows));\n\n if (!this.parameter.detailsList) {\n this.parameter.detailsList = [];\n }\n }\n\n this.addModifyBtn();\n\n var _JSON$parse = JSON.parse(sessionStorage.getItem('currentUser')),\n username = _JSON$parse.username,\n userId = _JSON$parse.userId;\n\n this.parameter.createName = username;\n this.parameter.createBy = userId; // this.getDate()\n\n this.getTableData();\n },\n mounted: function mounted() {},\n methods: {\n changeContract: function changeContract(res) {\n var _this = this;\n\n console.log(res, 'res');\n this.dialogTableData.forEach(function (item) {\n if (item.id === res) {\n _this.parameter.contractName = item.contrName;\n _this.parameter.contractNumber = item.contrCode;\n _this.parameter.detailsList = [];\n }\n });\n },\n handleSelectionChange: function handleSelectionChange(val) {\n if (val.length > 1) {\n this.$refs.dialogTable.clearSelection();\n this.$refs.dialogTable.toggleRowSelection(val[val.length - 1]);\n }\n\n this.selectObj = val[val.length - 1];\n\n if (!this.selectObj) {\n this.selectObj = {};\n }\n },\n getDate: function getDate() {\n var date = new Date();\n var year = date.getFullYear();\n var month = (1 + date.getMonth()).toString();\n month = month.padStart(2, '0');\n var day = date.getDate().toString();\n day = day.padStart(2, '0');\n this.parameter.orderCreatedate = year + '-' + month + '-' + day;\n },\n getTableData: function getTableData() {\n var _this2 = this;\n\n this.params.querys = [];\n this.params.sorter = [];\n\n if (this.queryParams[0].value) {\n this.params.querys.push(this.queryParams[0]);\n } // if (this.sorter[0].direction) {\n // this.params.sorter.push(this.sorter[0])\n // }\n\n\n purchaseOrder.querycCntract(this.params).then(function (res) {\n _this2.dialogTableData = res.data.value.rows;\n });\n },\n getTableDataDetial: function getTableDataDetial() {\n var _this3 = this;\n\n this.params.querys = [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'contractId',\n relation: 'AND',\n value: this.parameter.contractId\n }];\n this.params.sorter = [];\n\n if (this.queryParamsDetial[0].value) {\n this.params.querys.push(this.queryParamsDetial[0]);\n } // if (this.sorter[0].direction) {\n // this.params.sorter.push(this.sorter[0])\n // }\n\n\n purchaseOrder.querycCntractDetails(this.params).then(function (res) {\n _this3.dialogTableDataDetial = res.data.value.rows;\n _this3.params.pageBean = {\n page: res.data.value.page,\n pageSize: res.data.value.pageSize,\n total: res.data.value.total\n };\n });\n },\n handleCurrentChange: function handleCurrentChange(page) {\n this.params.pageBean = _objectSpread(_objectSpread({}, this.params.pageBean), {}, {\n page: page\n });\n this.getTableDataDetial();\n },\n handleSizeChange: function handleSizeChange(pageSize) {\n this.params.pageBean = _objectSpread(_objectSpread({}, this.params.pageBean), {}, {\n pageSize: pageSize\n });\n this.getTableDataDetial();\n },\n handleSearch: function handleSearch() {\n this.getTableData();\n },\n handleSearchDetial: function handleSearchDetial() {\n this.getTableDataDetial();\n },\n clearSearchFormDetial: function clearSearchFormDetial() {\n this.queryParamsDetial[0].value = '';\n this.getTableDataDetial();\n },\n clearSearchForm: function clearSearchForm() {\n this.queryParams[0].value = '';\n this.getTableData();\n },\n handleDialogTableSubmit: function handleDialogTableSubmit() {\n var selection = this.selectObj;\n this.getTableDataDetial(selection);\n this.dialogVisible = false;\n this.dialogVisibleDetial = true;\n },\n handleDialogTableSubmitDetial: function handleDialogTableSubmitDetial() {\n var _this$parameter$detai;\n\n this.parameter.detailsList = [];\n var selection = this.$refs.dialogTableDetial.selection;\n\n (_this$parameter$detai = this.parameter.detailsList).push.apply(_this$parameter$detai, _toConsumableArray(selection));\n\n this.parameter.detailsList.forEach(function (item) {\n item.matNum = item.num;\n\n if (item.taxInprice && item.taxValue) {\n item.orderPrice = item.taxInprice - item.taxValue;\n item.orderAmount = item.orderPrice * item.num;\n } else {\n item.orderPrice = 0;\n item.orderAmount = 0;\n }\n });\n this.dialogVisibleDetial = false;\n },\n //列表添加选择合同信息\n addTable: function addTable() {\n this.getTableDataDetial();\n this.dialogVisibleDetial = true;\n },\n //列表删除行\n delTable: function delTable(index, row) {\n this.parameter.detailsList.splice(index, 1);\n\n if (row.id) {\n this.parameter.deleteDetailsId.push(row.id);\n }\n },\n //编辑\n addModifyBtn: function addModifyBtn() {\n if (this.$route.query.editRows) {\n this.breadcrumbOpt[1].breadcrumbName = '编辑';\n this.modifychoData(this.$route.query.editRows);\n } else {\n this.breadcrumbOpt[1].breadcrumbName = '新增';\n }\n },\n //获取修改回显数据\n modifychoData: function modifychoData(val) {\n console.log(val);\n },\n // 关闭//面包屑点击\n handleClose: function handleClose() {\n if (this.breadcrumbOpt[1].breadcrumbName === '编辑') {\n this.$router.push({\n name: 'orderMange',\n params: {\n pageBean: this.$route.query.pageBean\n }\n });\n } else {\n this.$router.push({\n name: 'orderMange'\n });\n } // this.$emit('closeComponent')\n\n\n this.parameter = {}; // this.$refs.formInfo.clearValidate()\n },\n // 保存\n handleSave: function handleSave() {\n var _this4 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n if (!_this4.$route.query.editRows && _this4.parameter.detailsList) {\n _this4.parameter.detailsList.forEach(function (item) {\n delete item['id'];\n });\n }\n\n purchaseOrder.batchSubmit(_this4.parameter).then(function (res) {\n if (res.data.state) {\n _this4.$message.success('保存成功!');\n\n _this4.$router.go(-1);\n } else {\n _this4.$message.success('保存失败!');\n }\n });\n }\n });\n },\n handleDialogClose: function handleDialogClose(done) {\n done();\n },\n handleDialogCloseDetial: function handleDialogCloseDetial(done) {\n done();\n },\n open: function open(type) {\n this.$refs[type].add();\n },\n deleteTags: function deleteTags(index, key) {\n if (!index) {\n this[key] = [];\n } else {\n this[key].splice(index, 1);\n }\n\n if (key === 'enterpriseList') {\n this.$set(this.parameter, 'matCompanyName', '');\n this.$set(this.parameter, 'matCompanyId', '');\n this.$set(this.parameter, 'matCompanyCode', '');\n } else {\n this.$set(this.parameter, 'vendorName', '');\n this.$set(this.parameter, 'vendorId', '');\n this.$set(this.parameter, 'vendorCode', '');\n }\n },\n addDetail: function addDetail(list, key) {\n this[key] = list;\n\n if (key === 'enterpriseList') {\n this.$set(this.parameter, 'matCompanyName', list[0].name);\n this.$set(this.parameter, 'matCompanyId', list[0].id);\n this.$set(this.parameter, 'matCompanyCode', list[0].code);\n } else {\n this.$set(this.parameter, 'vendorName', list[0].name);\n this.$set(this.parameter, 'vendorId', list[0].id);\n this.$set(this.parameter, 'vendorCode', list[0].code);\n }\n },\n changeNum: function changeNum(data) {\n var taxsum = 0;\n var ordersum = 0;\n this.parameter.detailsList.forEach(function (item) {\n if (item.matNum != null && item.taxInprice != null) {\n item.taxInvalue = item.matNum * item.taxInprice;\n }\n\n if (item.matNum != null && item.orderPrice != null) {\n item.orderAmount = item.matNum * item.orderPrice;\n }\n });\n this.parameter.detailsList.forEach(function (item) {\n if (item.taxInvalue != null) {\n taxsum = taxsum + item.taxInvalue;\n }\n\n if (item.orderAmount != null) {\n ordersum = ordersum + item.orderAmount;\n }\n });\n this.$set(this.parameter, 'orderAmount', taxsum);\n this.$set(this.parameter, 'taxInvalue', ordersum);\n }\n }\n};",null]}