{"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\\salesOrder\\shipmentsSales\\component\\shipmentsAddDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\salesOrder\\shipmentsSales\\component\\shipmentsAddDialog.vue","mtime":1713259781147},{"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 _defineProperty from \"D:/jenkins/workspace/jd_cgpt_fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport _toConsumableArray from \"D:/jenkins/workspace/jd_cgpt_fvue/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\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//\nimport Breadcrumb from '@/components/Breadcrumb/index.vue';\nimport salesOrder from '@/api/BasicDataManagement/salesOrder.js';\nimport RejectInfoDialogVue from \"../../../../../components/dialog/RejectInfoDialog.vue\";\nexport default {\n name: 'shipmentsAddDialog',\n components: {\n Breadcrumb: Breadcrumb\n },\n props: {\n editData: Object\n },\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 cardTypeData: [{\n name: '营业执照',\n value: 0\n }, {\n name: '身份证',\n value: 1\n }, {\n name: '驾驶证',\n value: 2\n }, {\n name: '军官证',\n value: 3\n }, {\n name: '护照',\n value: 4\n }],\n rules: {\n inManifestCompanyName: [{\n required: true,\n message: '请输入收货公司',\n trigger: 'blur'\n }],\n contractName: [{\n required: true,\n message: '请输入合同名称',\n trigger: 'blur'\n }],\n outManifestCompanyName: [{\n required: true,\n message: '请输入发货公司',\n trigger: 'blur'\n }],\n outManifestUserName: [{\n required: true,\n message: '请输入发货人',\n trigger: 'blur'\n }],\n outManifestUserPhone: [{\n required: true,\n message: '请输入联系电话',\n trigger: 'blur'\n }, {\n pattern: /^1[3456789]\\d{9}$/,\n message: '手机号码格式不正确',\n trigger: 'blur'\n }],\n outManifestDate: [{\n required: true,\n message: '请选择发货时间',\n trigger: 'blur'\n }],\n purchaseOrderId: [{\n required: true,\n message: '请选择选择订单编号',\n trigger: 'blur'\n }]\n },\n parameter: {\n bizReceipt: {},\n detailList: []\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 queryParams: [{\n group: 'main',\n operation: 'LIKE',\n parentGroup: '',\n property: 'orderCode',\n relation: 'AND',\n value: ''\n }],\n queryParamsDetial: [{\n group: 'main',\n operation: 'LIKE',\n parentGroup: '',\n property: 'matName',\n relation: 'AND',\n value: ''\n }],\n selectObj: {},\n oldDetailslist: []\n };\n },\n created: function created() {\n this.addModifyBtn();\n\n if (this.$route.query.editRows) {\n this.breadcrumbOpt[1].breadcrumbName = '编辑'; // this.parameter = this.$route.query.editRows\n\n var row = JSON.parse(JSON.stringify(this.$route.query.editRows));\n this.selectOne(row);\n } else {\n if (sessionStorage.getItem('currentUserDetail')) {\n var userDetail = JSON.parse(sessionStorage.getItem('currentUserDetail'));\n var _userDetail$user = userDetail.user,\n username = _userDetail$user.username,\n userId = _userDetail$user.userId,\n mobile = _userDetail$user.mobile;\n var obj = {};\n obj.outManifestUserName = username;\n obj.outManifestUserId = userId;\n obj.outManifestUserPhone = mobile;\n this.$set(this.parameter, 'bizReceipt', obj);\n }\n } // this.getDate()\n\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.bizReceipt.contractName = item.contractName;\n _this.parameter.bizReceipt.purchaseOrderCode = item.orderCode;\n _this.parameter.bizReceipt.purchaseOrderId = item.id;\n _this.parameter.bizReceipt.inManifestCompanyId = item.matCompanyId;\n _this.parameter.bizReceipt.inManifestCompanyName = item.matCompanyName;\n _this.parameter.bizReceipt.outManifestCompanyId = item.vendorId;\n _this.parameter.bizReceipt.outManifestCompanyName = item.vendorName;\n _this.parameter.detailList = [];\n }\n });\n },\n selectOne: function selectOne(row) {\n var _this2 = this;\n\n salesOrder.selectOne(row.id).then(function (res) {\n console.log(res);\n _this2.parameter = res.data.value;\n\n if (!_this2.parameter.detailList) {\n _this2.parameter.detailList = [];\n } else {\n _this2.oldDetailslist = JSON.parse(JSON.stringify(_this2.parameter.detailList));\n\n _this2.parameter.detailList.forEach(function (item) {\n item.TaxPrice = item.transactionPrice / item.num;\n });\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 getTableData: function getTableData() {\n var _this3 = this;\n\n this.params.querys = [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'status',\n relation: 'AND',\n value: 3\n }];\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 salesOrder.querycCntractDetails(this.params).then(function (res) {\n _this3.dialogTableData = res.data.value.rows;\n });\n },\n getTableDataDetial: function getTableDataDetial() {\n var _this4 = this;\n\n salesOrder.querycCntractDetailsOne(this.parameter.bizReceipt.purchaseOrderId).then(function (res) {\n _this4.dialogTableDataDetial = res.data.value.detailsList;\n console.log(_this4.dialogTableDataDetial);\n });\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 var selection = this.$refs.dialogTableDetial.selection;\n\n if (this.selectObj.id !== this.parameter.bizReceipt.orderId) {\n this.parameter.detailList = [];\n }\n\n if (selection) {\n selection.forEach(function (item) {\n delete item['id'];\n });\n }\n\n (_this$parameter$detai = this.parameter.detailList).push.apply(_this$parameter$detai, _toConsumableArray(selection));\n\n this.parameter.detailList.forEach(function (item) {\n item.purchaseOrderDetailId = item.purchasingApplicationDetailId;\n item.purchaseOrderId = item.orderId;\n item.num = item.matNum ? item.matNum : 0;\n item.taxRate = item.taxRate ? item.taxRate : 0;\n item.TaxPrice = item.taxInprice ? item.taxInprice : 0;\n item.transactionPrice = item.taxInvalue ? item.taxInvalue : 0;\n });\n this.dialogVisibleDetial = false;\n },\n handleDialogClose: function handleDialogClose(done) {\n done();\n },\n handleDialogCloseDetial: function handleDialogCloseDetial(done) {\n done();\n },\n changeNum: function changeNum(data) {\n console.log(data);\n var taxsum = 0;\n this.parameter.detailList.forEach(function (item) {\n if (item.num != null && item.TaxPrice != null) {\n item.transactionPrice = item.num * item.TaxPrice;\n }\n });\n this.parameter.detailList.forEach(function (item) {\n if (item.transactionPrice != null) {\n taxsum = taxsum + item.transactionPrice;\n }\n });\n this.$set(this.parameter.bizReceipt, 'amount', taxsum);\n console.log(this.parameter);\n },\n //列表删除行\n addTable: function addTable() {\n this.getTableDataDetial();\n this.dialogVisibleDetial = true;\n },\n //列表删除行\n delTable: function delTable(index, row) {\n this.parameter.detailList.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 console.log();\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: 'shipmentsSales',\n params: {\n pageBean: this.$route.query.pageBean\n }\n });\n } else {\n this.$router.push({\n name: 'shipmentsSales'\n });\n } // this.$emit('closeComponent')\n\n\n this.parameter = {}; // this.$refs.formInfo.clearValidate()\n },\n DeleteDetail: function DeleteDetail(toDelete) {\n salesOrder.batchDeleteDetails(toDelete).then(function (res) {\n if (res.data.state) {\n console.log(res);\n }\n });\n },\n // 保存\n handleSave: function handleSave() {\n var _this5 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n var toDelete = [];\n\n _this5.oldDetailslist.forEach(function (a) {\n var found = false;\n\n _this5.parameter.detailList.forEach(function (item) {\n if (item.id && item.id == a.id) {\n found = true;\n }\n });\n\n if (!found) {\n toDelete.push(a.id);\n }\n });\n\n toDelete = toDelete.join(',');\n salesOrder.batchSubmit(_this5.parameter).then(function (res) {\n if (res.data.state) {\n _this5.$message.success('保存成功!'); // this.DeleteDetail(toDelete)\n\n\n _this5.$router.go(-1);\n } else {\n _this5.$message.success('保存失败!');\n }\n });\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 }\n};",null]}