优化单据中仓库、账户之类的下拉框

This commit is contained in:
季圣华
2021-07-13 22:52:43 +08:00
parent ee21de663c
commit 23f231c167
21 changed files with 104 additions and 63 deletions

View File

@@ -37,12 +37,6 @@ export const BillModalMixin = {
};
},
created () {
this.initSupplier()
this.initCustomer()
this.initRetail()
this.initSalesman()
this.initDepot()
this.initAccount()
},
computed: {
readOnly: function() {
@@ -112,13 +106,14 @@ export const BillModalMixin = {
getAction('/depot/findDepotByCurrentUser').then((res) => {
if(res.code === 200){
let arr = res.data
for(let i=0; i<arr.length; i++) {
let depotInfo = {};
depotInfo.value = arr[i].id+'' //注意-此处value必须为字符串格式
depotInfo.text = arr[i].depotName
depotInfo.title = arr[i].depotName
for(let item of that.materialTable.columns){
if(item.key == 'depotId' || item.key == 'anotherDepotId') {
for(let item of that.materialTable.columns){
if(item.key == 'depotId' || item.key == 'anotherDepotId') {
item.options = []
for(let i=0; i<arr.length; i++) {
let depotInfo = {};
depotInfo.value = arr[i].id + '' //注意-此处value必须为字符串格式
depotInfo.text = arr[i].depotName
depotInfo.title = arr[i].depotName
item.options.push(depotInfo)
}
}