如果单据选择过仓库,则直接从当前选择的仓库加载
This commit is contained in:
@@ -18,6 +18,7 @@ export const BillModalMixin = {
|
|||||||
options: [],
|
options: [],
|
||||||
value: ''
|
value: ''
|
||||||
},
|
},
|
||||||
|
currentSelectDepotId: '',
|
||||||
depotList: [],
|
depotList: [],
|
||||||
accountList: [],
|
accountList: [],
|
||||||
accountIdList: [],
|
accountIdList: [],
|
||||||
@@ -337,20 +338,25 @@ export const BillModalMixin = {
|
|||||||
onAdded(event) {
|
onAdded(event) {
|
||||||
const { row, target } = event
|
const { row, target } = event
|
||||||
target.setValues([{rowKey: row.id, values: {operNumber:0}}])
|
target.setValues([{rowKey: row.id, values: {operNumber:0}}])
|
||||||
getAction('/depot/findDepotByCurrentUser').then((res) => {
|
if(this.currentSelectDepotId) {
|
||||||
if (res.code === 200) {
|
//如果单据选择过仓库,则直接从当前选择的仓库加载
|
||||||
let arr = res.data
|
target.setValues([{rowKey: row.id, values: {depotId: this.currentSelectDepotId}}])
|
||||||
if(arr.length===1) {
|
} else {
|
||||||
target.setValues([{rowKey: row.id, values: {depotId: arr[0].id+''}}])
|
getAction('/depot/findDepotByCurrentUser').then((res) => {
|
||||||
} else {
|
if (res.code === 200) {
|
||||||
for (let i = 0; i < arr.length; i++) {
|
let arr = res.data
|
||||||
if(arr[i].isDefault){
|
if(arr.length===1) {
|
||||||
target.setValues([{rowKey: row.id, values: {depotId: arr[i].id+''}}])
|
target.setValues([{rowKey: row.id, values: {depotId: arr[0].id+''}}])
|
||||||
|
} else {
|
||||||
|
for (let i = 0; i < arr.length; i++) {
|
||||||
|
if(arr[i].isDefault){
|
||||||
|
target.setValues([{rowKey: row.id, values: {depotId: arr[i].id+''}}])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
},
|
},
|
||||||
//单元值改变一个字符就触发一次
|
//单元值改变一个字符就触发一次
|
||||||
onValueChange(event) {
|
onValueChange(event) {
|
||||||
@@ -359,6 +365,7 @@ export const BillModalMixin = {
|
|||||||
let param,snList,batchNumber,operNumber,unitPrice,allPrice,taxRate,taxMoney,taxLastMoney
|
let param,snList,batchNumber,operNumber,unitPrice,allPrice,taxRate,taxMoney,taxLastMoney
|
||||||
switch(column.key) {
|
switch(column.key) {
|
||||||
case "depotId":
|
case "depotId":
|
||||||
|
that.currentSelectDepotId = row.depotId
|
||||||
if(row.barCode){
|
if(row.barCode){
|
||||||
that.getStockByDepotBarCode(row, target)
|
that.getStockByDepotBarCode(row, target)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -184,6 +184,7 @@
|
|||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
editAfter() {
|
editAfter() {
|
||||||
this.billStatus = '0'
|
this.billStatus = '0'
|
||||||
|
this.currentSelectDepotId = ''
|
||||||
this.changeColumnHide()
|
this.changeColumnHide()
|
||||||
this.changeFormTypes(this.materialTable.columns, 'snList', 0)
|
this.changeFormTypes(this.materialTable.columns, 'snList', 0)
|
||||||
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
||||||
|
|||||||
@@ -184,6 +184,7 @@
|
|||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
editAfter() {
|
editAfter() {
|
||||||
this.billStatus = '0'
|
this.billStatus = '0'
|
||||||
|
this.currentSelectDepotId = ''
|
||||||
this.changeColumnHide()
|
this.changeColumnHide()
|
||||||
if (this.action === 'add') {
|
if (this.action === 'add') {
|
||||||
this.addInit(this.prefixNo)
|
this.addInit(this.prefixNo)
|
||||||
|
|||||||
@@ -184,6 +184,7 @@
|
|||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
editAfter() {
|
editAfter() {
|
||||||
this.billStatus = '0'
|
this.billStatus = '0'
|
||||||
|
this.currentSelectDepotId = ''
|
||||||
this.changeColumnHide()
|
this.changeColumnHide()
|
||||||
if (this.action === 'add') {
|
if (this.action === 'add') {
|
||||||
this.addInit(this.prefixNo)
|
this.addInit(this.prefixNo)
|
||||||
|
|||||||
@@ -208,6 +208,7 @@
|
|||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
editAfter() {
|
editAfter() {
|
||||||
this.billStatus = '0'
|
this.billStatus = '0'
|
||||||
|
this.currentSelectDepotId = ''
|
||||||
this.changeColumnHide()
|
this.changeColumnHide()
|
||||||
this.changeFormTypes(this.materialTable.columns, 'snList', 0)
|
this.changeFormTypes(this.materialTable.columns, 'snList', 0)
|
||||||
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
||||||
|
|||||||
@@ -208,6 +208,7 @@
|
|||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
editAfter() {
|
editAfter() {
|
||||||
this.billStatus = '0'
|
this.billStatus = '0'
|
||||||
|
this.currentSelectDepotId = ''
|
||||||
this.changeColumnHide()
|
this.changeColumnHide()
|
||||||
this.changeFormTypes(this.materialTable.columns, 'snList', 0)
|
this.changeFormTypes(this.materialTable.columns, 'snList', 0)
|
||||||
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
||||||
|
|||||||
@@ -290,6 +290,7 @@
|
|||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
editAfter() {
|
editAfter() {
|
||||||
this.billStatus = '0'
|
this.billStatus = '0'
|
||||||
|
this.currentSelectDepotId = ''
|
||||||
this.rowCanEdit = true
|
this.rowCanEdit = true
|
||||||
this.materialTable.columns[1].type = FormTypes.popupJsh
|
this.materialTable.columns[1].type = FormTypes.popupJsh
|
||||||
this.changeColumnHide()
|
this.changeColumnHide()
|
||||||
|
|||||||
@@ -322,6 +322,7 @@
|
|||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
editAfter() {
|
editAfter() {
|
||||||
this.billStatus = '0'
|
this.billStatus = '0'
|
||||||
|
this.currentSelectDepotId = ''
|
||||||
this.rowCanEdit = true
|
this.rowCanEdit = true
|
||||||
this.materialTable.columns[1].type = FormTypes.popupJsh
|
this.materialTable.columns[1].type = FormTypes.popupJsh
|
||||||
this.changeColumnHide()
|
this.changeColumnHide()
|
||||||
|
|||||||
@@ -278,6 +278,7 @@
|
|||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
editAfter() {
|
editAfter() {
|
||||||
this.billStatus = '0'
|
this.billStatus = '0'
|
||||||
|
this.currentSelectDepotId = ''
|
||||||
this.rowCanEdit = true
|
this.rowCanEdit = true
|
||||||
this.materialTable.columns[0].type = FormTypes.popupJsh
|
this.materialTable.columns[0].type = FormTypes.popupJsh
|
||||||
this.getSystemConfig()
|
this.getSystemConfig()
|
||||||
|
|||||||
@@ -272,6 +272,7 @@
|
|||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
editAfter() {
|
editAfter() {
|
||||||
this.billStatus = '0'
|
this.billStatus = '0'
|
||||||
|
this.currentSelectDepotId = ''
|
||||||
this.rowCanEdit = true
|
this.rowCanEdit = true
|
||||||
this.materialTable.columns[1].type = FormTypes.popupJsh
|
this.materialTable.columns[1].type = FormTypes.popupJsh
|
||||||
this.changeColumnHide()
|
this.changeColumnHide()
|
||||||
|
|||||||
@@ -282,6 +282,7 @@
|
|||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
editAfter() {
|
editAfter() {
|
||||||
this.billStatus = '0'
|
this.billStatus = '0'
|
||||||
|
this.currentSelectDepotId = ''
|
||||||
this.changeColumnHide()
|
this.changeColumnHide()
|
||||||
this.changeFormTypes(this.materialTable.columns, 'snList', 0)
|
this.changeFormTypes(this.materialTable.columns, 'snList', 0)
|
||||||
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
||||||
|
|||||||
@@ -295,6 +295,7 @@
|
|||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
editAfter() {
|
editAfter() {
|
||||||
this.billStatus = '0'
|
this.billStatus = '0'
|
||||||
|
this.currentSelectDepotId = ''
|
||||||
this.rowCanEdit = true
|
this.rowCanEdit = true
|
||||||
this.materialTable.columns[1].type = FormTypes.popupJsh
|
this.materialTable.columns[1].type = FormTypes.popupJsh
|
||||||
this.changeColumnHide()
|
this.changeColumnHide()
|
||||||
|
|||||||
@@ -268,6 +268,7 @@
|
|||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
editAfter() {
|
editAfter() {
|
||||||
this.billStatus = '0'
|
this.billStatus = '0'
|
||||||
|
this.currentSelectDepotId = ''
|
||||||
this.changeColumnHide()
|
this.changeColumnHide()
|
||||||
if (this.action === 'add') {
|
if (this.action === 'add') {
|
||||||
this.addInit(this.prefixNo)
|
this.addInit(this.prefixNo)
|
||||||
|
|||||||
@@ -338,6 +338,7 @@
|
|||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
editAfter() {
|
editAfter() {
|
||||||
this.billStatus = '0'
|
this.billStatus = '0'
|
||||||
|
this.currentSelectDepotId = ''
|
||||||
this.rowCanEdit = true
|
this.rowCanEdit = true
|
||||||
this.materialTable.columns[1].type = FormTypes.popupJsh
|
this.materialTable.columns[1].type = FormTypes.popupJsh
|
||||||
this.changeColumnHide()
|
this.changeColumnHide()
|
||||||
|
|||||||
Reference in New Issue
Block a user