{"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\\reconciliationManagement\\statementManagement\\component\\statementManagementAddDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\reconciliationManagement\\statementManagement\\component\\statementManagementAddDialog.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 _toConsumableArray from \"D:/jenkins/workspace/jd_cgpt_fvue/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\nimport \"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 reconciliationManagement from '@/api/BasicDataManagement/reconciliationManagement.js';\nexport default {\n name: 'statementManagementAddDialog',\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 receiptId: [{\n required: true,\n message: '请选择发货单号',\n trigger: 'blur'\n }],\n clientName: [{\n required: true,\n message: '请输入客户名称',\n trigger: 'blur'\n }],\n cardNo: [{\n required: true,\n message: '请输入证件号码',\n trigger: 'blur'\n }, {\n pattern: /^[a-zA-Z0-9]+$/,\n message: '证件号码格式不正确',\n trigger: 'blur'\n }],\n contacttel: [{\n required: true,\n message: '请输入联系电话',\n trigger: 'blur'\n }, {\n pattern: /^1[3456789]\\d{9}$/,\n message: '手机号码格式不正确',\n trigger: 'blur'\n }],\n isdCode: [{\n required: true,\n message: '请输入账单编号',\n trigger: 'blur'\n }],\n createTime: [{\n required: true,\n message: '请选择创建时间',\n trigger: 'blur'\n }],\n matCompanyName: [{\n required: true,\n message: '请输入发起单位',\n trigger: 'blur'\n }]\n },\n parameter: {\n bizReconciliation: {},\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$org$ = userDetail.org[0],\n orgCode = _userDetail$org$.orgCode,\n orgId = _userDetail$org$.orgId,\n orgName = _userDetail$org$.orgName;\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.matCompany = orgCode;\n obj.matCompanyId = orgId;\n obj.matCompanyName = orgName;\n obj.matUserName = username;\n obj.matUserId = userId;\n obj.matCompanyPhone = mobile;\n this.$set(this.parameter, 'bizReconciliation', 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.bizReconciliation.contractId = item.contractId;\n _this.parameter.bizReconciliation.contractName = item.contractName;\n _this.parameter.bizReconciliation.purchaseOrderCode = item.orderCode;\n _this.parameter.bizReconciliation.purchaseOrderId = item.id;\n _this.parameter.bizReconciliation.vendorId = item.outManifestCompanyId;\n _this.parameter.bizReconciliation.vendorName = item.outManifestCompanyName;\n _this.parameter.bizReconciliation.vendorUserName = item.outManifestUserName;\n _this.parameter.bizReconciliation.vendorUserId = item.outManifestUserId;\n _this.parameter.bizReconciliation.vendorPhone = item.outManifestUserPhone;\n _this.parameter.detailList = [];\n }\n });\n },\n selectOne: function selectOne(row) {\n var _this2 = this;\n\n reconciliationManagement.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.taxInprice = item.taxInvalue / 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: 'IN',\n parentGroup: '',\n property: 'status',\n relation: 'AND',\n value: [3, 4]\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 reconciliationManagement.querycCntractDetails(this.params).then(function (res) {\n _this3.dialogTableData = res.data.value.rows;\n });\n },\n getTableDataDetial: function getTableDataDetial(res) {\n var _this4 = this;\n\n reconciliationManagement.querycCntractDetailsOne(this.parameter.bizReconciliation.receiptId).then(function (res) {\n _this4.dialogTableDataDetial = res.data.value.detailList;\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.bizReconciliation.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.isdQuantity = item.num ? item.num : 0;\n item.taxRate = item.taxRate ? item.taxRate : 0;\n\n if (item.num && item.transactionPrice) {\n item.taxInprice = item.transactionPrice / item.num;\n }\n\n item.taxInvalue = item.transactionPrice ? item.transactionPrice : 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.isdQuantity != null && item.taxInprice != null) {\n item.taxInvalue = item.isdQuantity * item.taxInprice;\n }\n });\n this.parameter.detailList.forEach(function (item) {\n if (item.taxInvalue != null) {\n taxsum = taxsum + item.taxInvalue;\n }\n });\n this.$set(this.parameter.bizReconciliation, '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: 'statementManagement',\n params: {\n pageBean: this.$route.query.pageBean\n }\n });\n } else {\n this.$router.push({\n name: 'statementManagement'\n });\n } // this.$emit('closeComponent')\n\n\n this.parameter = {}; // this.$refs.formInfo.clearValidate()\n },\n DeleteDetail: function DeleteDetail(toDelete) {\n reconciliationManagement.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 // let toDelete = []\n // this.oldDetailslist.forEach((a) => {\n // let found = false\n // this.parameter.detailList.forEach((item) => {\n // if (item.id && item.id == a.id) {\n // found = true\n // }\n // })\n // if (!found) {\n // toDelete.push(a.id)\n // }\n // })\n // toDelete = toDelete.join(',')\n reconciliationManagement.batchSubmit(_this5.parameter).then(function (res) {\n if (res.data.state) {\n _this5.$message.success('保存成功!');\n\n _this5.$router.go(-1);\n } else {\n _this5.$message.success('保存失败!');\n }\n });\n }\n });\n },\n handleSaverelease: function handleSaverelease() {\n var _this6 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n reconciliationManagement.batchSubmitStatus(_this6.parameter).then(function (res) {\n if (res.data.state) {\n _this6.$message.success('保存并发布成功!');\n\n _this6.$router.go(-1);\n } else {\n _this6.$message.success('保存并发布失败!');\n }\n });\n }\n });\n }\n }\n};",null]}