diff --git a/pages/StockOut/features/InventoryLossStockOut/index.vue b/pages/StockOut/features/InventoryLossStockOut/index.vue index 1137c3c..730bcca 100644 --- a/pages/StockOut/features/InventoryLossStockOut/index.vue +++ b/pages/StockOut/features/InventoryLossStockOut/index.vue @@ -107,7 +107,7 @@ commitDate: '', opCode: '', costName: '', - itemsCostName: [{text: '财务部中心',value: '1010103000'}] + itemsCostName: [{text: '财务部中心',value: '1010109040'}] } }, @@ -129,6 +129,7 @@ } }) this.getTimeData(); + this.getCostCenter(); }, methods: { @@ -153,7 +154,15 @@ this[nextfocus] = true }) }, - + getCostCenter(){ + let erpFactory = JSON.parse(uni.getStorageSync('loginInfoObject')).org + this.$MyRequest('/CostCenter/getCostCenter',{erpFactory: erpFactory},'GET').then(res => { + this.itemsCostName = res.data.data.map(item => ({ + text: item.costName, + value: item.costCode, + })); + }) + }, ScanBarCode() { this.focusBarCode = false console.log(this.BoxListInfo.length) diff --git a/pages/material/features/InventoryProfitStockIn/index.vue b/pages/material/features/InventoryProfitStockIn/index.vue index 3476117..e90ab84 100644 --- a/pages/material/features/InventoryProfitStockIn/index.vue +++ b/pages/material/features/InventoryProfitStockIn/index.vue @@ -187,7 +187,7 @@ commitDate: '', opCode: '', costName: '', - itemsCostName: [{text: '财务部中心',value: '1010103000'}] + itemsCostName: [{text: '财务部中心',value: '1010109040'}] } }, @@ -209,6 +209,7 @@ this.orgObject = JSON.parse(uni.getStorageSync('orgObject')) this.getTimeData(); this.getERPLocation(); + this.getCostCenter(); // let Things = 20 // for (var i = 0; i < Things; i++) { // this.BoxListInfo.push({aa:"1"}) @@ -228,6 +229,15 @@ maskClick(e) { console.log('maskClick事件:', e); }, + getCostCenter(){ + let erpFactory = JSON.parse(uni.getStorageSync('loginInfoObject')).org + this.$MyRequest('/CostCenter/getCostCenter',{erpFactory: erpFactory},'GET').then(res => { + this.itemsCostName = res.data.data.map(item => ({ + text: item.costName, + value: item.costCode, + })); + }) + }, onLeftClick() { uni.showModal({ title: this.titleModal, // 模态框标题