解决BUG:由于增加订单产生的部分bug
This commit is contained in:
parent
8f00b2c91f
commit
8b8a5c7103
@ -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'},
|
||||
|
||||
@ -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})
|
||||
});
|
||||
},
|
||||
|
||||
@ -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 = []
|
||||
|
||||
@ -162,13 +162,13 @@
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次付款">
|
||||
<a-input placeholder="请输入本次付款" v-decorator.trim="[ 'changeAmount' ]" @keyup="onKeyUpChangeAmount"/>
|
||||
<a-input placeholder="请输入本次付款" v-decorator.trim="[ 'changeAmount', validatorRules.price ]" @keyup="onKeyUpChangeAmount"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次欠款" data-step="10" data-title="本次欠款"
|
||||
data-intro="欠款产生的费用,后续可以在付款单进行支付">
|
||||
<a-input placeholder="请输入本次欠款" v-decorator.trim="[ 'debt' ]" :readOnly="true"/>
|
||||
<a-input placeholder="请输入本次欠款" v-decorator.trim="[ 'debt', validatorRules.price ]" :readOnly="true"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
@ -121,7 +121,7 @@
|
||||
<a-col :lg="6" :md="12" :sm="24">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户" data-step="9" data-title="结算账户"
|
||||
data-intro="如果在下拉框中选择多账户,则可以通过多个结算账户进行结算">
|
||||
<a-select style="width:185px;" placeholder="选择结算账户" v-decorator="[ 'accountId', validatorRules.accountId ]"
|
||||
<a-select style="width:185px;" placeholder="选择结算账户" v-decorator="[ 'accountId' ]"
|
||||
:dropdownMatchSelectWidth="false" allowClear @select="selectAccount">
|
||||
<div slot="dropdownRender" slot-scope="menu">
|
||||
<v-nodes :vnodes="menu" />
|
||||
@ -140,7 +140,7 @@
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="支付订金">
|
||||
<a-input placeholder="请输入支付订金" v-decorator.trim="[ 'changeAmount' ]" @keyup="onKeyUpChangeAmount"/>
|
||||
<a-input placeholder="请输入支付订金" v-decorator.trim="[ 'changeAmount', validatorRules.price ]" @keyup="onKeyUpChangeAmount"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24">
|
||||
@ -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 {
|
||||
|
||||
@ -140,7 +140,7 @@
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收取订金">
|
||||
<a-input placeholder="请输入收取订金" v-decorator.trim="[ 'changeAmount' ]" @keyup="onKeyUpChangeAmount"/>
|
||||
<a-input placeholder="请输入收取订金" v-decorator.trim="[ 'changeAmount', validatorRules.price ]" @keyup="onKeyUpChangeAmount"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24">
|
||||
@ -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 {
|
||||
|
||||
@ -163,13 +163,13 @@
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次收款">
|
||||
<a-input placeholder="请输入本次付款" v-decorator.trim="[ 'changeAmount' ]" @keyup="onKeyUpChangeAmount"/>
|
||||
<a-input placeholder="请输入本次付款" v-decorator.trim="[ 'changeAmount', validatorRules.price ]" @keyup="onKeyUpChangeAmount"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次欠款" data-step="10" data-title="本次欠款"
|
||||
data-intro="欠款产生的费用,后续可以在收款单进行收取">
|
||||
<a-input placeholder="请输入本次欠款" v-decorator.trim="[ 'debt' ]" :readOnly="true"/>
|
||||
<a-input placeholder="请输入本次欠款" v-decorator.trim="[ 'debt', validatorRules.price ]" :readOnly="true"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user