diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderloancontract/BusSalesOrderLoancontractService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderloancontract/BusSalesOrderLoancontractService.java index 63f89ab7d9..1c2913c10b 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderloancontract/BusSalesOrderLoancontractService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderloancontract/BusSalesOrderLoancontractService.java @@ -389,7 +389,14 @@ public class BusSalesOrderLoancontractService extends MybatisBaseService busSalesOrderVehicles = busSalesOrderVehicleService.selByLoanContractSid(record.getSalesOrderSid()); busSalesOrderVehicles.removeAll(Collections.singleton(null)); if (!busSalesOrderVehicles.isEmpty()) { - List stringVinNos = busSalesOrderVehicles.stream().map(c -> c.getLinkNo()).collect(Collectors.toList()); + List stringVinNos = new ArrayList<>(); + for (BusSalesOrderVehicle v : busSalesOrderVehicles) { + if (v.getLinkNo().length() > 8) { + stringVinNos.add(v.getLinkNo().substring(v.getLinkNo().length() - 8)); + } else { + stringVinNos.add(v.getLinkNo()); + } + } if (!stringVinNos.isEmpty()) { record.setVinNo(String.join(",", stringVinNos)); } @@ -406,7 +413,7 @@ public class BusSalesOrderLoancontractService extends MybatisBaseService + import('@/views/workFlow/caigoutuihuoFlow/purchasereturnEdit.vue'), + name: 'PurchaseReturnEdit' + }, + // 采购退货单管理--待办 + { + path: '/caigoutuihuoFlow/purchasereturnDaiBan', + component: () => + import('@/views/workFlow/caigoutuihuoFlow/purchasereturnDaiBan.vue'), + name: 'PurchaseReturnDaiBan' + }, + // 采购退货单管理--已办 + { + path: '/caigoutuihuoFlow/purchasereturnYiBan', + component: () => + import('@/views/workFlow/caigoutuihuoFlow/purchasereturnYiBan.vue'), + name: 'PurchaseReturnYiBan' + }, // 404 page must be placed at the end !!! // { path: '*', redirect: '/404', hidden: true } ] diff --git a/yxt-as-ui/src/views/purchase/procurement/procurement.vue b/yxt-as-ui/src/views/purchase/procurement/procurement.vue index d259feb8b6..95945f0879 100644 --- a/yxt-as-ui/src/views/purchase/procurement/procurement.vue +++ b/yxt-as-ui/src/views/purchase/procurement/procurement.vue @@ -33,17 +33,17 @@ - + - + - + @@ -173,6 +173,7 @@ export default { sids: [], // 用于导出的时候保存已选择的SIDs procurementType_list: [], procurementReason_list: [], + paymentMethod_list: [], state_list: [ { dictKey: '1', diff --git a/yxt-as-ui/src/views/purchase/procurement/procurementAdd.vue b/yxt-as-ui/src/views/purchase/procurement/procurementAdd.vue index ff724429d5..4685dc8625 100644 --- a/yxt-as-ui/src/views/purchase/procurement/procurementAdd.vue +++ b/yxt-as-ui/src/views/purchase/procurement/procurementAdd.vue @@ -390,7 +390,7 @@ export default { this.formobj.createTime = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day) }, showEdit(row) { - this.viewTitle = '【新增】采购单' + this.viewTitle = '【编辑】采购单' this.$nextTick(() => { this.$refs['form_obj'].clearValidate() }) diff --git a/yxt-as-ui/src/views/purchase/purchasereturn/purchasereturn.vue b/yxt-as-ui/src/views/purchase/purchasereturn/purchasereturn.vue index 0821658c73..cce0e35a13 100644 --- a/yxt-as-ui/src/views/purchase/purchasereturn/purchasereturn.vue +++ b/yxt-as-ui/src/views/purchase/purchasereturn/purchasereturn.vue @@ -9,23 +9,48 @@ {{ searchxianshitit }} @@ -79,7 +116,8 @@ import Pagination from '@/components/pagination' import pageye from '@/components/pagination/pageye' import ButtonBar from '@/components/ButtonBar' import req from '@/api/purchase/purchasereturn' -import { choiceSupplierInfo } from '@/api/Common/dictcommons' +import { typeValues } from '@/api/Common/dictcommons' +import { getStorage } from '@/utils/auth' import purchasereturnAdd from './purchasereturnAdd' import purchasereturnInfo from './purchasereturnInfo' @@ -94,6 +132,9 @@ export default { }, data() { return { + url: '', + dialogHeight: '80%', + centerDialogVisible: false, btndisabled: false, btnList: [ { @@ -103,13 +144,6 @@ export default { btnKey: 'toAdd', btnLabel: '新增' }, - { - type: 'primary', - size: 'small', - icon: 'edit', - btnKey: 'toEdit', - btnLabel: '编辑' - }, { type: 'danger', size: 'small', @@ -117,13 +151,6 @@ export default { btnKey: 'doDel', btnLabel: '删除' }, - { - type: 'success', - size: 'small', - icon: 'export', - btnKey: 'doExport', - btnLabel: '导出' - }, { type: 'info', size: 'small', @@ -138,7 +165,9 @@ export default { tableKey: 0, list: [], sids: [], // 用于导出的时候保存已选择的SIDs - supplier_list: [], + procurementType_list: [], + procurementReason_list: [], + paymentMethod_list: [], FormLoading: false, listLoading: false, // 翻页 @@ -147,11 +176,20 @@ export default { size: 10, total: 0, params: { - supplierSid: '', + createOrgName: '', + deptName: '', + createByName: '', + billNo: '', createStartTime: '', createEndTime: '', - createOrgSid: '', - otherQuery: '' + finishStartTime: '', + finishEndTime: '', + sourceBillNo: '', + purchaseTypeValue: '', + purchaseReasonValue: '', + payTypeValue: '', + supplierName: '', + orgPath: '' } } } @@ -162,16 +200,56 @@ export default { this.getList() }, mounted() { + // 在外部vue的window上添加postMessage的监听,而且绑定处理函数handleMessage + window.addEventListener('message', this.handleMessage) this.$refs['btnbar'].setButtonList(this.btnList) }, methods: { init() { - choiceSupplierInfo({ createOrgSid : '' }).then((res) => { + typeValues({ type: 'procurementType' }).then((res) => { + if (res.success) { + this.procurementType_list = res.data + } + }) + typeValues({ type: 'procurementReason' }).then((res) => { + if (res.success) { + this.procurementReason_list = res.data + } + }) + typeValues({ type: 'paymentMethod' }).then((res) => { if (res.success) { - this.supplier_list = res.data + this.paymentMethod_list = res.data } }) }, + async handleMessage(event) { + var code = '' + if (event.data.params !== null && event.data.params !== undefined) { + code = event.data.params.code + } + if (code === 1) { + this.centerDialogVisible = false + } else if (code === 2) { + this.dialogHeight = event.data.params.data + this.setIframeHeight(document.getElementById('iframe')) + } + }, + closeIt() { + this.url = '' + this.centerDialogVisible = false + }, + setIframeHeight(iframe) { + iframe.height = this.dialogHeight + }, + flowRecord(row) { + this.centerDialogVisible = true + var params = { + deployId: row.procDefId, + procInsId: row.procInstId, + token: getStorage() + } + this.url = '/#/flow/flowRecordForBusiness?data=' + encodeURI((JSON.stringify(params))) + }, // 搜索条件效果 clicksearchShow() { this.isSearchShow = !this.isSearchShow @@ -187,15 +265,9 @@ export default { case 'toAdd': this.toAdd() break - case 'toEdit': - this.toEdit() - break case 'doDel': this.doDel() break - case 'doExport': - this.doExport() - break case 'doClose': this.doClose() break @@ -220,6 +292,7 @@ export default { // 查询列表信息 getList() { this.listLoading = true + this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') req.listPage(this.listQuery).then((response) => { this.listLoading = false if (response.success) { @@ -243,26 +316,31 @@ export default { size: 10, total: 0, params: { - supplierSid: '', + createOrgName: '', + deptName: '', + createByName: '', + billNo: '', createStartTime: '', createEndTime: '', - createOrgSid: '', - otherQuery: '' + finishStartTime: '', + finishEndTime: '', + sourceBillNo: '', + purchaseTypeValue: '', + purchaseReasonValue: '', + payTypeValue: '', + supplierName: '', + orgPath: '' } } this.init() }, toAdd() { this.viewState = 2 - this.$refs['divAdd'].showAdd(this.listQuery.params.createOrgSid) + this.$refs['divAdd'].showAdd() }, toEdit(row) { - if (this.sids.length === 1) { - this.viewState = 3 - this.$refs['divAdd'].showEdit(this.sids[0]) - } else { - this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑操作' }) - } + this.viewState = 3 + this.$refs['divAdd'].showEdit(row) }, toInfo(row) { this.viewState = 4 @@ -297,31 +375,6 @@ export default { }).catch(() => { }) }, - doExport() { - const loading = this.$loading({ - lock: true, - text: 'Loading', - spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)' - }) - req.exportExcel(this.listQuery.params).then((resp) => { - loading.close() - const blob = new Blob([resp], { - type: 'application/vnd.ms-excel' - }) - const fileName = '销售单查询' + '.xls' - const elink = document.createElement('a') - elink.download = fileName - elink.style.display = 'nonde' - elink.href = URL.createObjectURL(blob) - document.body.appendChild(elink) - elink.click() - URL.revokeObjectURL(elink.href) - document.body.removeChild(elink) - }).catch(() => { - loading.close() - }) - }, // 修改、编辑、详情返回列表页面 resetState() { this.viewState = 1 diff --git a/yxt-as-ui/src/views/purchase/purchasereturn/purchasereturnAdd.vue b/yxt-as-ui/src/views/purchase/purchasereturn/purchasereturnAdd.vue index d128df2195..e1515dab2e 100644 --- a/yxt-as-ui/src/views/purchase/purchasereturn/purchasereturnAdd.vue +++ b/yxt-as-ui/src/views/purchase/purchasereturn/purchasereturnAdd.vue @@ -4,7 +4,9 @@
{{ viewTitle }}
- 结算 + 选择原单 + 保存 + 提交 关闭
@@ -12,168 +14,166 @@ -
单号
- {{ formobj.billNo }} +
申请部门
+ {{ formobj.deptName }}
-
制单人
+
申请人
{{ formobj.createByName }}
+
申请日期
+ {{ formobj.createTime }} +
+
+ + +
备注
+ +
+
+
原单信息
+ + +
单据编号
+ {{ formobj.sourceBillNo }} +
+ +
单据日期
+ {{ originalmessage.createTime }} +
+ +
采购人
+ {{ originalmessage.purchaserName }} +
+
+ + +
采购类型
+ {{ originalmessage.purchaseTypeValue }} +
+ +
采购原因
+ {{ originalmessage.purchaseReasonValue }} +
+ +
付款方式
+ {{ originalmessage.payTypeValue }} +
+
+ + +
供应商
+ {{ originalmessage.supplierName }} +
+ +
是否开发票
+ {{ originalmessage.isInvoicing }} +
+ +
+
发票类型(税率)
+ {{ originalmessage.billType }}({{ originalmessage.taxRate }}) +
+
+
+ +
备注
- {{ formobj.remarks }} + {{ originalmessage.remarks }} +
+
+
款项情况
+ + +
采购金额
+ {{ originalmessage.amountCount }} +
+ +
运费
+ {{ originalmessage.freight }} +
+ +
优惠金额
+ {{ originalmessage.discountAmount }} +
+ +
误差调整
+ {{ originalmessage.errorAmount }} +
+
+ + +
应付金额
+ {{ yfTotal }} +
+ +
*已付金额
+ +
+ +
欠款
+ {{ qkTotal }}
- 选取原单 +
商品列表
+ 整单全退
- + - - - - - - - - - - - + + + + + + + + + + - +
数量
- {{ numTotal }} -
-
- - -
合计含税金额
- {{ hsjeTotal }} = 进价:{{ jjTotal }} + 税额: -
-
- - -
退货金额
- {{ thjeTotal }} = 合计含税金额:{{ hsjeTotal }} + 退误差调整: + {{ slTotal }}
应收金额
- {{ ysjeTotal }} = 退货金额:{{ thjeTotal }} - 退优惠: - 抵扣欠款: + {{ ysTotal }} = 退货金额:{{ thTotal }} - 运费: - 退优惠: - 抵扣欠款: + 误差调整:
- - - - - - - - - - - - - 查询 - - - - - - - - - - - - - - - -
-
- - -
- - - - - - -
应收金额
- {{ formobj.mobile}} -
- -
转入预付款
- {{ formobj.mobile }} -
-
- - -
结算方式
- -
- -
结算金额
- -
- -
结算时间
- -
-
- - -
其他结算方式
- -
- -
其他结算金额
- -
- -
欠款金额
- -
-
-
-
- 确 定 - 取 消 -
-
+ +
+ @@ -329,4 +481,15 @@ export default { .addinputInfo { margin-left: 120px !important; } +.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { + margin-left: 120px !important; + width: calc(100% - 115px); +} +.titleOne { + padding: 7px; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; +} diff --git a/yxt-as-ui/src/views/purchase/purchasereturn/purchasereturnInfo.vue b/yxt-as-ui/src/views/purchase/purchasereturn/purchasereturnInfo.vue index 042b708434..64e82d748e 100644 --- a/yxt-as-ui/src/views/purchase/purchasereturn/purchasereturnInfo.vue +++ b/yxt-as-ui/src/views/purchase/purchasereturn/purchasereturnInfo.vue @@ -9,19 +9,138 @@
- + + +
申请部门
+ {{ formobj.deptName }} +
+ +
申请人
+ {{ formobj.createByName }} +
+ +
申请日期
+ {{ formobj.createTime }} +
+
+ + +
备注
+ {{ formobj.remarks }} +
+
+
原单信息
+ + +
单据编号
+ {{ formobj.sourceBillNo }} +
+ +
单据日期
+ {{ originalmessage.createTime }} +
+ +
采购人
+ {{ originalmessage.purchaserName }} +
+
+ + +
采购类型
+ {{ originalmessage.purchaseTypeValue }} +
+ +
采购原因
+ {{ originalmessage.purchaseReasonValue }} +
+ +
付款方式
+ {{ originalmessage.payTypeValue }} +
+
+ + +
供应商
+ {{ originalmessage.supplierName }} +
+ +
是否开发票
+ {{ originalmessage.isInvoicing }} +
+ +
+
发票类型(税率)
+ {{ originalmessage.billType }}({{ originalmessage.taxRate }}) +
+
+
+ + +
备注
+ {{ originalmessage.remarks }} +
+
+
款项情况
+ + +
采购金额
+ {{ originalmessage.amountCount }} +
+ +
运费
+ {{ originalmessage.freight }} +
+ +
优惠金额
+ {{ originalmessage.discountAmount }} +
+ +
误差调整
+ {{ originalmessage.errorAmount }} +
+
+ + +
应付金额
+ {{ yfTotal }} +
+ +
*已付金额
+ {{ formobj.paidAmount }} +
+ +
欠款
+ {{ qkTotal }} +
+
+
商品列表 +
+ - - - - - - - - - - + + + + + + + + + + + + + +
数量
+ {{ slTotal }} +
+
+ + +
应收金额
+ {{ ysTotal }} = 退货金额:{{ thTotal }} - 运费:{{ formobj.backFreight }} - 退优惠:{{ formobj.backDiscountAmount }} - 抵扣欠款:{{ formobj.deductDebts }} + 误差调整:{{ formobj.backErrorAmount }} +
+
@@ -37,7 +156,7 @@ export default { return { viewTitle: '', viewState: 1, - tableReturnKey: 0, + tableKey: 1, index: 0, formobj: { sid: '', @@ -48,28 +167,152 @@ export default { sourceBillNo: '', billNo: '', backErrorAmount: '', + backFreight: '', backDiscountAmount: '', deductDebts: '', deductBillNo: '', toPrepayment: '', + payableAmount: '', + paidAmount: '', + receivableAmount: '', + deptSid: '', + deptName: '', + procDefId: '', + nodeId: '', + procInstId: '', + nodeState: '', + taskId: '', + finishTime: '', useOrgSid: '', + useOrgName: '', createOrgSid: '', + createOrgName: '', pmsPurchasebackDetailList: [] }, + originalmessage: { + createTime: '', + purchaserName: '', + purchaseTypeValue: '', + purchaseReasonValue: '', + payTypeValue: '', + supplierName: '', + isInvoicing: '', + billType: '', + taxRate: '', + remarks: '', + amountCount: '', + freight: '', + discountAmount: '', + errorAmount: '' + }, rules: {} } }, + computed: { + // 数量 + slTotal() { + let sl = '0' + if (this.formobj.pmsPurchasebackDetailList.length > 0) { + this.formobj.pmsPurchasebackDetailList.forEach((e) => { + if (e.goodsSpuName !== '') { + sl = Math.round((parseFloat(sl) + parseFloat(e.backCount !== '' ? e.backCount : '0')) * 100) / 100 + } + }) + } + return sl + }, + // 退货金额 + thTotal() { + let th = '0' + if (this.formobj.pmsPurchasebackDetailList.length > 0) { + this.formobj.pmsPurchasebackDetailList.forEach((e) => { + if (e.goodsSpuName !== '') { + th = Math.round((parseFloat(th) + parseFloat(e.backAmount !== '' ? e.backAmount : '0')) * 100) / 100 + } + }) + } + return th + }, + ysTotal() { + let ys = '0' + ys = Math.round((parseFloat(ys) + parseFloat(this.thTotal) - parseFloat(this.formobj.backFreight !== '' ? this.formobj.backFreight : '0') - parseFloat(this.formobj.backDiscountAmount !== '' ? this.formobj.backDiscountAmount : '0') - parseFloat(this.formobj.deductDebts !== '' ? this.formobj.deductDebts : '0') + parseFloat(this.formobj.backErrorAmount !== '' ? this.formobj.backErrorAmount : '0')) * 100) / 100 + return ys + }, + // 应付金额 = 应付金额 - 退货单合计(退货金额 - 优惠 + 误差调整) - 运费 - 抵扣欠款 + yfTotal() { + let yf = '0' + yf = Math.round((parseFloat(yf) + parseFloat(this.formobj.payableAmount === '' ? '0' : this.formobj.payableAmount) - (parseFloat(this.thTotal) - parseFloat(this.formobj.backDiscountAmount !== '' ? this.formobj.backDiscountAmount : '0') + parseFloat(this.formobj.backErrorAmount !== '' ? this.formobj.backErrorAmount : '0')) - parseFloat(this.formobj.backFreight !== '' ? this.formobj.backFreight : '0') - parseFloat(this.formobj.deductDebts !== '' ? this.formobj.deductDebts : '0')) * 100) / 100 + return yf + }, + // 欠款 = 应付金额 - 已付金额 + qkTotal() { + let qk = '0' + qk = Math.round((parseFloat(this.yfTotal) - parseFloat(this.formobj.paidAmount === '' ? '0' : this.formobj.paidAmount)) * 100) / 100 + return qk + } + }, methods: { showInfo(row) { this.viewTitle = '采购退货单详情' + this.$nextTick(() => { + this.$refs['form_obj'].clearValidate() + }) req.fetchDetailsBySid(row.sid).then((res) => { if (res.success) { this.formobj = res.data + this.originalmessage = this.formobj.pmsPurchaseChoiceBillDetailsVo } }) }, - handleReturn() { - this.formobj = {} + handleReturn(isreload) { + if (isreload === 'true') this.$emit('reloadlist') + this.formobj = { + sid: '', + remarks: '', + createBySid: '', + createByName: '', + sourceBillSid: '', + sourceBillNo: '', + billNo: '', + backErrorAmount: '', + backFreight: '', + backDiscountAmount: '', + deductDebts: '', + deductBillNo: '', + toPrepayment: '', + payableAmount: '', + paidAmount: '', + receivableAmount: '', + deptSid: '', + deptName: '', + procDefId: '', + nodeId: '', + procInstId: '', + nodeState: '', + taskId: '', + finishTime: '', + useOrgSid: '', + useOrgName: '', + createOrgSid: '', + createOrgName: '', + pmsPurchasebackDetailList: [] + } + this.originalmessage = { + createTime: '', + purchaserName: '', + purchaseTypeValue: '', + purchaseReasonValue: '', + payTypeValue: '', + supplierName: '', + isInvoicing: '', + billType: '', + taxRate: '', + remarks: '', + amountCount: '', + freight: '', + discountAmount: '', + errorAmount: '' + } this.$emit('doback') } } @@ -77,5 +320,10 @@ export default { diff --git a/yxt-as-ui/src/views/purchase/purchasereturn/relation/originalorder.vue b/yxt-as-ui/src/views/purchase/purchasereturn/relation/originalorder.vue new file mode 100644 index 0000000000..1dd094a527 --- /dev/null +++ b/yxt-as-ui/src/views/purchase/purchasereturn/relation/originalorder.vue @@ -0,0 +1,259 @@ + + + + diff --git a/yxt-as-ui/src/views/workFlow/caigoutuihuoFlow/purchasereturnDaiBan.vue b/yxt-as-ui/src/views/workFlow/caigoutuihuoFlow/purchasereturnDaiBan.vue new file mode 100644 index 0000000000..9d3cc68a9a --- /dev/null +++ b/yxt-as-ui/src/views/workFlow/caigoutuihuoFlow/purchasereturnDaiBan.vue @@ -0,0 +1,558 @@ + + + + + diff --git a/yxt-as-ui/src/views/workFlow/caigoutuihuoFlow/purchasereturnEdit.vue b/yxt-as-ui/src/views/workFlow/caigoutuihuoFlow/purchasereturnEdit.vue new file mode 100644 index 0000000000..2f6b762aaa --- /dev/null +++ b/yxt-as-ui/src/views/workFlow/caigoutuihuoFlow/purchasereturnEdit.vue @@ -0,0 +1,460 @@ + + + + + diff --git a/yxt-as-ui/src/views/workFlow/caigoutuihuoFlow/purchasereturnYiBan.vue b/yxt-as-ui/src/views/workFlow/caigoutuihuoFlow/purchasereturnYiBan.vue new file mode 100644 index 0000000000..4ceb3da82d --- /dev/null +++ b/yxt-as-ui/src/views/workFlow/caigoutuihuoFlow/purchasereturnYiBan.vue @@ -0,0 +1,350 @@ + + + + + diff --git a/yxt-as-ui/src/views/workFlow/caigoutuihuoFlow/relation/originalorder.vue b/yxt-as-ui/src/views/workFlow/caigoutuihuoFlow/relation/originalorder.vue new file mode 100644 index 0000000000..aecf6adb77 --- /dev/null +++ b/yxt-as-ui/src/views/workFlow/caigoutuihuoFlow/relation/originalorder.vue @@ -0,0 +1,259 @@ + + + +