优化序列和和批号
This commit is contained in:
@@ -112,13 +112,13 @@ export const BillModalMixin = {
|
|||||||
if(columns[i].key === key) {
|
if(columns[i].key === key) {
|
||||||
if(type){
|
if(type){
|
||||||
if(key === 'snList' || key === 'batchNumber') {
|
if(key === 'snList' || key === 'batchNumber') {
|
||||||
if(this.prefixNo === 'XSCK' || this.prefixNo === 'CGTH') {
|
if(this.prefixNo === 'XSCK') {
|
||||||
columns[i].type = FormTypes.popupJsh //显示
|
columns[i].type = FormTypes.popupJsh //显示
|
||||||
} else {
|
} else {
|
||||||
columns[i].type = FormTypes.input //显示
|
columns[i].type = FormTypes.input //显示
|
||||||
}
|
}
|
||||||
} else if(key === 'expirationDate') {
|
} else if(key === 'expirationDate') {
|
||||||
if(this.prefixNo === 'CGRK' || this.prefixNo === 'XSTH') {
|
if(this.prefixNo === 'CGRK' || this.prefixNo === 'XSTH' || this.prefixNo === 'CGTH') {
|
||||||
columns[i].type = FormTypes.date //显示
|
columns[i].type = FormTypes.date //显示
|
||||||
} else {
|
} else {
|
||||||
columns[i].type = FormTypes.input //显示
|
columns[i].type = FormTypes.input //显示
|
||||||
@@ -235,7 +235,7 @@ export const BillModalMixin = {
|
|||||||
onValueChange(event) {
|
onValueChange(event) {
|
||||||
let that = this
|
let that = this
|
||||||
const { type, row, column, value, target } = event
|
const { type, row, column, value, target } = event
|
||||||
let param,batchNumber,operNumber,unitPrice,taxUnitPrice,allPrice,taxRate,taxMoney,taxLastMoney
|
let param,snList,batchNumber,operNumber,unitPrice,taxUnitPrice,allPrice,taxRate,taxMoney,taxLastMoney
|
||||||
switch(column.key) {
|
switch(column.key) {
|
||||||
case "depotId":
|
case "depotId":
|
||||||
if(row.barCode){
|
if(row.barCode){
|
||||||
@@ -310,6 +310,22 @@ export const BillModalMixin = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case "snList":
|
||||||
|
snList = value
|
||||||
|
if(snList) {
|
||||||
|
let snArr = snList.split(',')
|
||||||
|
operNumber = snArr.length
|
||||||
|
taxRate = row.taxRate-0 //税率
|
||||||
|
unitPrice = row.unitPrice-0 //单价
|
||||||
|
taxUnitPrice = row.taxUnitPrice-0
|
||||||
|
allPrice = (unitPrice*operNumber).toFixed(2)-0
|
||||||
|
taxMoney =((taxRate*0.01)*allPrice).toFixed(2)-0
|
||||||
|
taxLastMoney = (allPrice + taxMoney).toFixed(2)-0
|
||||||
|
target.setValues([{rowKey: row.id, values: {operNumber: operNumber, allPrice: allPrice, taxMoney: taxMoney, taxLastMoney: taxLastMoney}}])
|
||||||
|
target.recalcAllStatisticsColumns()
|
||||||
|
that.autoChangePrice(target)
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "batchNumber":
|
case "batchNumber":
|
||||||
batchNumber = value-0
|
batchNumber = value-0
|
||||||
getBatchNumberList({name:'', depotId: row.depotId, barCode: row.barCode, batchNumber: batchNumber}).then((res) => {
|
getBatchNumberList({name:'', depotId: row.depotId, barCode: row.barCode, batchNumber: batchNumber}).then((res) => {
|
||||||
|
|||||||
@@ -181,9 +181,11 @@
|
|||||||
{ title: '扩展信息', key: 'materialOther', width: '5%', type: FormTypes.input, readonly: true },
|
{ title: '扩展信息', key: 'materialOther', width: '5%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '库存', key: 'stock', width: '5%', type: FormTypes.input, readonly: true },
|
{ title: '库存', key: 'stock', width: '5%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '单位', key: 'unit', width: '4%', type: FormTypes.input, readonly: true },
|
{ title: '单位', key: 'unit', width: '4%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '序列号', key: 'snList', width: '7%', type: FormTypes.popupJsh, kind: 'sn', multi: true },
|
{ title: '序列号', key: 'snList', width: '12%', type: FormTypes.input, placeholder: '多个序列号请用逗号隔开',
|
||||||
{ title: '批号', key: 'batchNumber', width: '7%', type: FormTypes.popupJsh, kind: 'batch', multi: false },
|
validateRules: [{ pattern: /^\S{1,100}$/, message: '请小于100位字符' }]
|
||||||
{ title: '有效期', key: 'expirationDate',width: '5%', type: FormTypes.input, readonly: true },
|
},
|
||||||
|
{ title: '批号', key: 'batchNumber', width: '5%', type: FormTypes.input },
|
||||||
|
{ title: '有效期', key: 'expirationDate',width: '7%', type: FormTypes.date },
|
||||||
{ title: '多属性', key: 'sku', width: '4%', type: FormTypes.input, readonly: true },
|
{ title: '多属性', key: 'sku', width: '4%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '数量', key: 'operNumber', width: '5%', type: FormTypes.inputNumber, statistics: true,
|
{ title: '数量', key: 'operNumber', width: '5%', type: FormTypes.inputNumber, statistics: true,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
|
|||||||
@@ -182,7 +182,9 @@
|
|||||||
{ title: '扩展信息', key: 'materialOther', width: '5%', type: FormTypes.input, readonly: true },
|
{ title: '扩展信息', key: 'materialOther', width: '5%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '库存', key: 'stock', width: '5%', type: FormTypes.input, readonly: true },
|
{ title: '库存', key: 'stock', width: '5%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '单位', key: 'unit', width: '4%', type: FormTypes.input, readonly: true },
|
{ title: '单位', key: 'unit', width: '4%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '序列号', key: 'snList', width: '5%', type: FormTypes.input },
|
{ title: '序列号', key: 'snList', width: '12%', type: FormTypes.input, placeholder: '多个序列号请用逗号隔开',
|
||||||
|
validateRules: [{ pattern: /^\S{1,100}$/, message: '请小于100位字符' }]
|
||||||
|
},
|
||||||
{ title: '批号', key: 'batchNumber', width: '5%', type: FormTypes.input },
|
{ title: '批号', key: 'batchNumber', width: '5%', type: FormTypes.input },
|
||||||
{ title: '有效期', key: 'expirationDate',width: '7%', type: FormTypes.date },
|
{ title: '有效期', key: 'expirationDate',width: '7%', type: FormTypes.date },
|
||||||
{ title: '多属性', key: 'sku', width: '4%', type: FormTypes.input, readonly: true },
|
{ title: '多属性', key: 'sku', width: '4%', type: FormTypes.input, readonly: true },
|
||||||
|
|||||||
@@ -186,7 +186,9 @@
|
|||||||
{ title: '扩展信息', key: 'materialOther', width: '5%', type: FormTypes.input, readonly: true },
|
{ title: '扩展信息', key: 'materialOther', width: '5%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '库存', key: 'stock', width: '5%', type: FormTypes.input, readonly: true },
|
{ title: '库存', key: 'stock', width: '5%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '单位', key: 'unit', width: '4%', type: FormTypes.input, readonly: true },
|
{ title: '单位', key: 'unit', width: '4%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '序列号', key: 'snList', width: '5%', type: FormTypes.input },
|
{ title: '序列号', key: 'snList', width: '12%', type: FormTypes.input, placeholder: '多个序列号请用逗号隔开',
|
||||||
|
validateRules: [{ pattern: /^\S{1,100}$/, message: '请小于100位字符' }]
|
||||||
|
},
|
||||||
{ title: '批号', key: 'batchNumber', width: '5%', type: FormTypes.input },
|
{ title: '批号', key: 'batchNumber', width: '5%', type: FormTypes.input },
|
||||||
{ title: '有效期', key: 'expirationDate',width: '7%', type: FormTypes.date },
|
{ title: '有效期', key: 'expirationDate',width: '7%', type: FormTypes.date },
|
||||||
{ title: '多属性', key: 'sku', width: '4%', type: FormTypes.input, readonly: true },
|
{ title: '多属性', key: 'sku', width: '4%', type: FormTypes.input, readonly: true },
|
||||||
|
|||||||
@@ -186,7 +186,7 @@
|
|||||||
{ title: '扩展信息', key: 'materialOther', width: '5%', type: FormTypes.input, readonly: true },
|
{ title: '扩展信息', key: 'materialOther', width: '5%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '库存', key: 'stock', width: '5%', type: FormTypes.input, readonly: true },
|
{ title: '库存', key: 'stock', width: '5%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '单位', key: 'unit', width: '4%', type: FormTypes.input, readonly: true },
|
{ title: '单位', key: 'unit', width: '4%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '序列号', key: 'snList', width: '7%', type: FormTypes.popupJsh, kind: 'sn', multi: true },
|
{ 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: 'batchNumber', width: '7%', type: FormTypes.popupJsh, kind: 'batch', multi: false },
|
||||||
{ title: '有效期', key: 'expirationDate',width: '5%', type: FormTypes.input, readonly: true },
|
{ title: '有效期', key: 'expirationDate',width: '5%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '多属性', key: 'sku', width: '4%', type: FormTypes.input, readonly: true },
|
{ title: '多属性', key: 'sku', width: '4%', type: FormTypes.input, readonly: true },
|
||||||
|
|||||||
Reference in New Issue
Block a user