{"remainingRequest":"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\\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":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport Breadcrumb from '@/components/Breadcrumb/index.vue'\r\nimport reconciliationManagement from '@/api/BasicDataManagement/reconciliationManagement.js'\r\nexport default {\r\n name: 'statementManagementAddDialog',\r\n components: {Breadcrumb},\r\n props: {\r\n editData: Object,\r\n },\r\n data() {\r\n return {\r\n centralizedData: [\r\n {name: '是', id: 1},\r\n {name: '否', id: 0},\r\n ],\r\n breadcrumbOpt: [{breadcrumbName: '对账单管理'}, {breadcrumbName: '新增'}],\r\n cardTypeData: [\r\n {\r\n name: '营业执照',\r\n value: 0,\r\n },\r\n {\r\n name: '身份证',\r\n value: 1,\r\n },\r\n {\r\n name: '驾驶证',\r\n value: 2,\r\n },\r\n {\r\n name: '军官证',\r\n value: 3,\r\n },\r\n {\r\n name: '护照',\r\n value: 4,\r\n },\r\n ],\r\n rules: {\r\n receiptId: [\r\n {\r\n required: true,\r\n message: '请选择发货单号',\r\n trigger: 'blur',\r\n },\r\n ],\r\n clientName: [\r\n {\r\n required: true,\r\n message: '请输入客户名称',\r\n trigger: 'blur',\r\n },\r\n ],\r\n cardNo: [\r\n {\r\n required: true,\r\n message: '请输入证件号码',\r\n trigger: 'blur',\r\n },\r\n {\r\n pattern: /^[a-zA-Z0-9]+$/,\r\n message: '证件号码格式不正确',\r\n trigger: 'blur',\r\n },\r\n ],\r\n contacttel: [\r\n {\r\n required: true,\r\n message: '请输入联系电话',\r\n trigger: 'blur',\r\n },\r\n {\r\n pattern: /^1[3456789]\\d{9}$/,\r\n message: '手机号码格式不正确',\r\n trigger: 'blur',\r\n },\r\n ],\r\n isdCode: [\r\n {\r\n required: true,\r\n message: '请输入账单编号',\r\n trigger: 'blur',\r\n },\r\n ],\r\n createTime: [\r\n {\r\n required: true,\r\n message: '请选择创建时间',\r\n trigger: 'blur',\r\n },\r\n ],\r\n matCompanyName: [\r\n {\r\n required: true,\r\n message: '请输入发起单位',\r\n trigger: 'blur',\r\n },\r\n ],\r\n },\r\n parameter: {\r\n bizReconciliation: {},\r\n detailList: [],\r\n },\r\n dialogVisibleDetial: false,\r\n dialogVisible: false,\r\n dialogTableDataDetial: [],\r\n dialogTableData: [],\r\n params: {\r\n pageBean: {\r\n page: 1,\r\n pageSize: 20,\r\n total: 0,\r\n },\r\n },\r\n queryParams: [\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n parentGroup: '',\r\n property: 'orderCode',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n ],\r\n queryParamsDetial: [\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n parentGroup: '',\r\n property: 'matName',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n ],\r\n selectObj: {},\r\n oldDetailslist: [],\r\n }\r\n },\r\n created() {\r\n this.addModifyBtn()\r\n if (this.$route.query.editRows) {\r\n this.breadcrumbOpt[1].breadcrumbName = '编辑'\r\n // this.parameter = this.$route.query.editRows\r\n\r\n let row = JSON.parse(JSON.stringify(this.$route.query.editRows))\r\n\r\n this.selectOne(row)\r\n } else {\r\n if (sessionStorage.getItem('currentUserDetail')) {\r\n let userDetail = JSON.parse(sessionStorage.getItem('currentUserDetail'))\r\n let {orgCode, orgId, orgName} = userDetail.org[0]\r\n let {username, userId, mobile} = userDetail.user\r\n let obj = {}\r\n obj.matCompany = orgCode\r\n obj.matCompanyId = orgId\r\n obj.matCompanyName = orgName\r\n obj.matUserName = username\r\n obj.matUserId = userId\r\n obj.matCompanyPhone = mobile\r\n this.$set(this.parameter, 'bizReconciliation', obj)\r\n }\r\n }\r\n\r\n // this.getDate()\r\n this.getTableData()\r\n },\r\n mounted() {},\r\n methods: {\r\n changeContract(res) {\r\n console.log(res, 'res')\r\n this.dialogTableData.forEach((item) => {\r\n if (item.id === res) {\r\n this.parameter.bizReconciliation.contractId = item.contractId\r\n this.parameter.bizReconciliation.contractName = item.contractName\r\n this.parameter.bizReconciliation.purchaseOrderCode = item.orderCode\r\n this.parameter.bizReconciliation.purchaseOrderId = item.id\r\n this.parameter.bizReconciliation.vendorId = item.outManifestCompanyId\r\n this.parameter.bizReconciliation.vendorName =\r\n item.outManifestCompanyName\r\n this.parameter.bizReconciliation.vendorUserName =\r\n item.outManifestUserName\r\n this.parameter.bizReconciliation.vendorUserId = item.outManifestUserId\r\n this.parameter.bizReconciliation.vendorPhone =\r\n item.outManifestUserPhone\r\n\r\n this.parameter.detailList = []\r\n }\r\n })\r\n },\r\n selectOne(row) {\r\n reconciliationManagement.selectOne(row.id).then((res) => {\r\n console.log(res)\r\n this.parameter = res.data.value\r\n if (!this.parameter.detailList) {\r\n this.parameter.detailList = []\r\n } else {\r\n this.oldDetailslist = JSON.parse(\r\n JSON.stringify(this.parameter.detailList)\r\n )\r\n this.parameter.detailList.forEach((item) => {\r\n item.taxInprice = item.taxInvalue / item.num\r\n })\r\n }\r\n })\r\n },\r\n handleSelectionChange(val) {\r\n if (val.length > 1) {\r\n this.$refs.dialogTable.clearSelection()\r\n this.$refs.dialogTable.toggleRowSelection(val[val.length - 1])\r\n }\r\n this.selectObj = val[val.length - 1]\r\n if (!this.selectObj) {\r\n this.selectObj = {}\r\n }\r\n },\r\n getTableData() {\r\n this.params.querys = [\r\n {\r\n group: 'main',\r\n operation: 'IN',\r\n parentGroup: '',\r\n property: 'status',\r\n relation: 'AND',\r\n value: [3, 4],\r\n },\r\n ]\r\n this.params.sorter = []\r\n if (this.queryParams[0].value) {\r\n this.params.querys.push(this.queryParams[0])\r\n }\r\n\r\n // if (this.sorter[0].direction) {\r\n // this.params.sorter.push(this.sorter[0])\r\n // }\r\n\r\n reconciliationManagement.querycCntractDetails(this.params).then((res) => {\r\n this.dialogTableData = res.data.value.rows\r\n })\r\n },\r\n getTableDataDetial(res) {\r\n reconciliationManagement\r\n .querycCntractDetailsOne(this.parameter.bizReconciliation.receiptId)\r\n .then((res) => {\r\n this.dialogTableDataDetial = res.data.value.detailList\r\n console.log(this.dialogTableDataDetial)\r\n })\r\n },\r\n handleSearch() {\r\n this.getTableData()\r\n },\r\n handleSearchDetial() {\r\n this.getTableDataDetial()\r\n },\r\n clearSearchFormDetial() {\r\n this.queryParamsDetial[0].value = ''\r\n this.getTableDataDetial()\r\n },\r\n clearSearchForm() {\r\n this.queryParams[0].value = ''\r\n this.getTableData()\r\n },\r\n handleDialogTableSubmit() {\r\n let selection = this.selectObj\r\n\r\n this.getTableDataDetial(selection)\r\n this.dialogVisible = false\r\n this.dialogVisibleDetial = true\r\n },\r\n handleDialogTableSubmitDetial() {\r\n let selection = this.$refs.dialogTableDetial.selection\r\n\r\n if (this.selectObj.id !== this.parameter.bizReconciliation.orderId) {\r\n this.parameter.detailList = []\r\n }\r\n\r\n if (selection) {\r\n selection.forEach((item) => {\r\n delete item['id']\r\n })\r\n }\r\n\r\n this.parameter.detailList.push(...selection)\r\n this.parameter.detailList.forEach((item) => {\r\n item.purchaseOrderDetailId = item.purchasingApplicationDetailId\r\n item.purchaseOrderId = item.orderId\r\n item.isdQuantity = item.num ? item.num : 0\r\n item.taxRate = item.taxRate ? item.taxRate : 0\r\n if (item.num && item.transactionPrice) {\r\n item.taxInprice = item.transactionPrice / item.num\r\n }\r\n\r\n item.taxInvalue = item.transactionPrice ? item.transactionPrice : 0\r\n })\r\n\r\n this.dialogVisibleDetial = false\r\n },\r\n handleDialogClose(done) {\r\n done()\r\n },\r\n handleDialogCloseDetial(done) {\r\n done()\r\n },\r\n changeNum(data) {\r\n console.log(data)\r\n let taxsum = 0\r\n this.parameter.detailList.forEach((item) => {\r\n if (item.isdQuantity != null && item.taxInprice != null) {\r\n item.taxInvalue = item.isdQuantity * item.taxInprice\r\n }\r\n })\r\n this.parameter.detailList.forEach((item) => {\r\n if (item.taxInvalue != null) {\r\n taxsum = taxsum + item.taxInvalue\r\n }\r\n })\r\n this.$set(this.parameter.bizReconciliation, 'amount', taxsum)\r\n console.log(this.parameter)\r\n },\r\n //列表删除行\r\n addTable() {\r\n this.getTableDataDetial()\r\n this.dialogVisibleDetial = true\r\n },\r\n //列表删除行\r\n delTable(index, row) {\r\n this.parameter.detailList.splice(index, 1)\r\n if (row.id) {\r\n this.parameter.deleteDetailsId.push(row.id)\r\n }\r\n },\r\n //编辑\r\n addModifyBtn() {\r\n if (this.$route.query.editRows) {\r\n console.log()\r\n this.breadcrumbOpt[1].breadcrumbName = '编辑'\r\n this.modifychoData(this.$route.query.editRows)\r\n } else {\r\n this.breadcrumbOpt[1].breadcrumbName = '新增'\r\n }\r\n },\r\n //获取修改回显数据\r\n modifychoData(val) {\r\n console.log(val)\r\n },\r\n // 关闭//面包屑点击\r\n handleClose() {\r\n if (this.breadcrumbOpt[1].breadcrumbName === '编辑') {\r\n this.$router.push({\r\n name: 'statementManagement',\r\n params: {\r\n pageBean: this.$route.query.pageBean,\r\n },\r\n })\r\n } else {\r\n this.$router.push({\r\n name: 'statementManagement',\r\n })\r\n }\r\n\r\n // this.$emit('closeComponent')\r\n this.parameter = {}\r\n // this.$refs.formInfo.clearValidate()\r\n },\r\n DeleteDetail(toDelete) {\r\n reconciliationManagement.batchDeleteDetails(toDelete).then((res) => {\r\n if (res.data.state) {\r\n console.log(res)\r\n }\r\n })\r\n },\r\n // 保存\r\n handleSave() {\r\n this.$refs.formInfo.validate((valid) => {\r\n if (valid) {\r\n // let toDelete = []\r\n // this.oldDetailslist.forEach((a) => {\r\n // let found = false\r\n // this.parameter.detailList.forEach((item) => {\r\n // if (item.id && item.id == a.id) {\r\n // found = true\r\n // }\r\n // })\r\n // if (!found) {\r\n // toDelete.push(a.id)\r\n // }\r\n // })\r\n\r\n // toDelete = toDelete.join(',')\r\n\r\n reconciliationManagement.batchSubmit(this.parameter).then((res) => {\r\n if (res.data.state) {\r\n this.$message.success('保存成功!')\r\n this.$router.go(-1)\r\n } else {\r\n this.$message.success('保存失败!')\r\n }\r\n })\r\n }\r\n })\r\n },\r\n handleSaverelease() {\r\n this.$refs.formInfo.validate((valid) => {\r\n if (valid) {\r\n reconciliationManagement\r\n .batchSubmitStatus(this.parameter)\r\n .then((res) => {\r\n if (res.data.state) {\r\n this.$message.success('保存并发布成功!')\r\n this.$router.go(-1)\r\n } else {\r\n this.$message.success('保存并发布失败!')\r\n }\r\n })\r\n }\r\n })\r\n },\r\n },\r\n}\r\n",null]}