From 8b8a5c71036b4b929e518b1a292766dd9763bec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Sun, 29 May 2022 23:17:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3BUG=EF=BC=9A=E7=94=B1?= =?UTF-8?q?=E4=BA=8E=E5=A2=9E=E5=8A=A0=E8=AE=A2=E5=8D=95=E4=BA=A7=E7=94=9F?= =?UTF-8?q?=E7=9A=84=E9=83=A8=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/bill/dialog/BillDetail.vue | 3 +++ .../src/views/bill/mixins/BillModalMixin.js | 10 ++++++++-- .../views/bill/modules/AllocationOutModal.vue | 6 ++++++ .../views/bill/modules/PurchaseInModal.vue | 4 ++-- .../views/bill/modules/PurchaseOrderModal.vue | 20 ++++++++++++++++--- .../src/views/bill/modules/SaleOrderModal.vue | 15 +++++++++++++- .../src/views/bill/modules/SaleOutModal.vue | 4 ++-- 7 files changed, 52 insertions(+), 10 deletions(-) diff --git a/jshERP-web/src/views/bill/dialog/BillDetail.vue b/jshERP-web/src/views/bill/dialog/BillDetail.vue index fc4f5ec4..ae936914 100644 --- a/jshERP-web/src/views/bill/dialog/BillDetail.vue +++ b/jshERP-web/src/views/bill/dialog/BillDetail.vue @@ -1218,6 +1218,9 @@ { title: '库存', dataIndex: 'stock'}, { title: '调入仓库', dataIndex: 'anotherDepotName'}, { title: '单位', dataIndex: 'unit'}, + { title: '序列号', dataIndex: 'snList'}, + { title: '批号', dataIndex: 'batchNumber'}, + { title: '有效期', dataIndex: 'expirationDate'}, { title: '多属性', dataIndex: 'sku'}, { title: '数量', dataIndex: 'operNumber'}, { title: '单价', dataIndex: 'unitPrice'}, diff --git a/jshERP-web/src/views/bill/mixins/BillModalMixin.js b/jshERP-web/src/views/bill/mixins/BillModalMixin.js index 68d9e646..94319bd4 100644 --- a/jshERP-web/src/views/bill/mixins/BillModalMixin.js +++ b/jshERP-web/src/views/bill/mixins/BillModalMixin.js @@ -28,6 +28,13 @@ export const BillModalMixin = { billStatus: '0', isCanCheck: true, isTenant: false, + validatorRules:{ + price:{ + rules: [ + { pattern: /^(([0-9][0-9]*)|([0]\.\d{0,4}|[0-9][0-9]*\.\d{0,4}))$/, message: '金额格式不正确!' } + ] + } + }, spans: { labelCol1: {span: 2}, wrapperCol1: {span: 22}, @@ -112,7 +119,7 @@ export const BillModalMixin = { if(columns[i].key === key) { if(type){ if(key === 'snList' || key === 'batchNumber') { - if(this.prefixNo === 'LSCK' || this.prefixNo === 'CGTH' || this.prefixNo === 'XSCK' || this.prefixNo === 'QTCK') { + if(this.prefixNo === 'LSCK' || this.prefixNo === 'CGTH' || this.prefixNo === 'XSCK' || this.prefixNo === 'QTCK' || this.prefixNo === 'DBCK') { columns[i].type = FormTypes.popupJsh //显示 } else { columns[i].type = FormTypes.input //显示 @@ -215,7 +222,6 @@ export const BillModalMixin = { let otherMoney = this.form.getFieldValue('otherMoney')?this.form.getFieldValue('otherMoney')-0:0 let debt = (discountLastMoney + otherMoney - allPrice).toFixed(2) this.$nextTick(() => { - allPrice = this.prefixNo === 'CGDD' || this.prefixNo === 'XSDD'?0:allPrice this.form.setFieldsValue({'changeAmount':allPrice, 'debt':debt}) }); }, diff --git a/jshERP-web/src/views/bill/modules/AllocationOutModal.vue b/jshERP-web/src/views/bill/modules/AllocationOutModal.vue index 5cf88572..b218f020 100644 --- a/jshERP-web/src/views/bill/modules/AllocationOutModal.vue +++ b/jshERP-web/src/views/bill/modules/AllocationOutModal.vue @@ -150,6 +150,9 @@ { title: '库存', key: 'stock', width: '5%', type: FormTypes.normal }, { title: '调入仓库', key: 'anotherDepotId', width: '7%', type: FormTypes.select, placeholder: '请选择${title}', options: [], allowSearch:true}, { title: '单位', key: 'unit', width: '4%', type: FormTypes.normal }, + { title: '序列号', key: 'snList', width: '12%', type: FormTypes.popupJsh, kind: 'sn', multi: true }, + { title: '批号', key: 'batchNumber', width: '7%', type: FormTypes.popupJsh, kind: 'batch', multi: false }, + { title: '有效期', key: 'expirationDate',width: '6%', type: FormTypes.normal }, { title: '多属性', key: 'sku', width: '4%', type: FormTypes.normal }, { title: '数量', key: 'operNumber', width: '5%', type: FormTypes.inputNumber, statistics: true, validateRules: [{ required: true, message: '${title}不能为空' }] @@ -186,6 +189,9 @@ editAfter() { this.billStatus = '0' this.changeColumnHide() + this.changeFormTypes(this.materialTable.columns, 'snList', 0) + this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0) + this.changeFormTypes(this.materialTable.columns, 'expirationDate', 0) if (this.action === 'add') { this.addInit(this.prefixNo) this.fileList = [] diff --git a/jshERP-web/src/views/bill/modules/PurchaseInModal.vue b/jshERP-web/src/views/bill/modules/PurchaseInModal.vue index 01a6205f..68addc0a 100644 --- a/jshERP-web/src/views/bill/modules/PurchaseInModal.vue +++ b/jshERP-web/src/views/bill/modules/PurchaseInModal.vue @@ -162,13 +162,13 @@ - + - + diff --git a/jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue b/jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue index 35878180..9e8b0269 100644 --- a/jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue +++ b/jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue @@ -121,7 +121,7 @@ -
@@ -140,7 +140,7 @@ - + @@ -175,7 +175,7 @@ import { JEditableTableMixin } from '@/mixins/JEditableTableMixin' import { BillModalMixin } from '../mixins/BillModalMixin' import { getCurrentSystemConfig } from '@/api/api' - import { getMpListShort,handleIntroJs } from "@/utils/util" + import { getMpListShort, changeListFmtMinus,handleIntroJs } from "@/utils/util" import JUpload from '@/components/jeecg/JUpload' import JDate from '@/components/jeecg/JDate' import Vue from 'vue' @@ -296,6 +296,14 @@ this.materialTable.columns[1].type = FormTypes.normal } this.model.operTime = this.model.operTimeStr + if(this.model.accountId == null) { + this.model.accountId = 0 + this.manyAccountBtnStatus = true + this.accountIdList = this.model.accountIdList + this.accountMoneyList = this.model.accountMoneyList + } else { + this.manyAccountBtnStatus = false + } this.fileList = this.model.fileName this.$nextTick(() => { this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'linkNumber', 'remark', @@ -332,6 +340,12 @@ } billMain.totalPrice = 0-totalPrice billMain.changeAmount = 0-billMain.changeAmount + if(billMain.accountId === 0) { + billMain.accountId = '' + } + this.accountMoneyList = changeListFmtMinus(this.accountMoneyList) + billMain.accountIdList = this.accountIdList.length>0 ? JSON.stringify(this.accountIdList) : "" + billMain.accountMoneyList = this.accountMoneyList.length>0 ? JSON.stringify(this.accountMoneyList) : "" if(this.fileList && this.fileList.length > 0) { billMain.fileName = this.fileList } else { diff --git a/jshERP-web/src/views/bill/modules/SaleOrderModal.vue b/jshERP-web/src/views/bill/modules/SaleOrderModal.vue index dfb6756a..6bfe8ca6 100644 --- a/jshERP-web/src/views/bill/modules/SaleOrderModal.vue +++ b/jshERP-web/src/views/bill/modules/SaleOrderModal.vue @@ -140,7 +140,7 @@ - + @@ -278,6 +278,14 @@ }) } else { this.model.operTime = this.model.operTimeStr + if(this.model.accountId == null) { + this.model.accountId = 0 + this.manyAccountBtnStatus = true + this.accountIdList = this.model.accountIdList + this.accountMoneyList = this.model.accountMoneyList + } else { + this.manyAccountBtnStatus = false + } this.personList.value = this.model.salesMan this.fileList = this.model.fileName this.$nextTick(() => { @@ -315,6 +323,11 @@ totalPrice += item.allPrice-0 } billMain.totalPrice = totalPrice + if(billMain.accountId === 0) { + billMain.accountId = '' + } + billMain.accountIdList = this.accountIdList.length>0 ? JSON.stringify(this.accountIdList) : "" + billMain.accountMoneyList = this.accountMoneyList.length>0 ? JSON.stringify(this.accountMoneyList) : "" if(this.fileList && this.fileList.length > 0) { billMain.fileName = this.fileList } else { diff --git a/jshERP-web/src/views/bill/modules/SaleOutModal.vue b/jshERP-web/src/views/bill/modules/SaleOutModal.vue index 2f26dfc1..7e43c449 100644 --- a/jshERP-web/src/views/bill/modules/SaleOutModal.vue +++ b/jshERP-web/src/views/bill/modules/SaleOutModal.vue @@ -163,13 +163,13 @@ - + - +