|
@@ -593,14 +593,13 @@ export default {
|
|
|
getMaterialSelectList() {
|
|
|
const v = this
|
|
|
v.loading = true
|
|
|
- axios
|
|
|
- .post('/cloudApi/material/selectList', {
|
|
|
+ this.$post('/api/storage-restructure/material/page', {
|
|
|
pageNum:1,
|
|
|
pageSize:10,
|
|
|
- search: v.params.keyword,
|
|
|
+ keyword: v.params.keyword,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- v.materialList = res.data.data
|
|
|
+ v.materialList = res.data.records
|
|
|
v.loading = false
|
|
|
})
|
|
|
|
|
@@ -692,28 +691,28 @@ export default {
|
|
|
},
|
|
|
getRemainingToday() {
|
|
|
const v = this
|
|
|
- axios
|
|
|
- .post('/cloudApi/stockWater/remainingToday', {})
|
|
|
+ this
|
|
|
+ .$post('/api/storage-restructure/stock/statistics', {})
|
|
|
.then((res) => {
|
|
|
console.log(res)
|
|
|
for (
|
|
|
let i = 0;
|
|
|
- i < res.data.data.purposeStatistics.length;
|
|
|
+ i < res.data.purposeStatistics.length;
|
|
|
i++
|
|
|
) {
|
|
|
- const element = res.data.data.purposeStatistics[i]
|
|
|
+ const element = res.data.purposeStatistics[i]
|
|
|
if (element.materialPurpose == '')
|
|
|
element.materialPurpose = '其他'
|
|
|
}
|
|
|
- this.totalData.fabric = res.data.data.fabric
|
|
|
- this.totalData.ink = res.data.data.ink
|
|
|
+ this.totalData.fabric = res.data.fabric
|
|
|
+ this.totalData.ink = res.data.ink
|
|
|
this.totalData.purposeStatistics =
|
|
|
- res.data.data.purposeStatistics
|
|
|
+ res.data.purposeStatistics
|
|
|
this.totalData.typeStatistics = [
|
|
|
- { ...res.data.data.typeStatistics[0], name: '直喷' },
|
|
|
- { ...res.data.data.typeStatistics[1], name: '热转' },
|
|
|
- { ...res.data.data.typeStatistics[2], name: '打纸' },
|
|
|
- { ...res.data.data.typeStatistics[4], name: '其他' },
|
|
|
+ { ...res.data.typeStatistics[0], name: '直喷' },
|
|
|
+ { ...res.data.typeStatistics[1], name: '热转' },
|
|
|
+ { ...res.data.typeStatistics[2], name: '打纸' },
|
|
|
+ { ...res.data.typeStatistics[4], name: '其他' },
|
|
|
]
|
|
|
})
|
|
|
},
|
|
@@ -731,7 +730,7 @@ export default {
|
|
|
errChange() {
|
|
|
this.params.pageIndex = 1
|
|
|
this.getList()
|
|
|
- },
|
|
|
+ },
|
|
|
open(item) {
|
|
|
if (!item.storageDetails) {
|
|
|
axios
|
|
@@ -935,13 +934,21 @@ export default {
|
|
|
this.handleData(item.children)
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ treeInit(data){
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
+ const element = data[i];
|
|
|
+ element.title = element.name
|
|
|
+ element.value = element.code
|
|
|
+ element.label = element.name
|
|
|
+ if(element.children && element.children.length > 0) this.treeInit(element.children)
|
|
|
+ }
|
|
|
},
|
|
|
- getTree() {
|
|
|
- GetMaterialCategoryZTree().then((res) => {
|
|
|
- if (res.code === 0) {
|
|
|
- this.materialTreeData = res.result
|
|
|
- this.handleData(this.materialTreeData)
|
|
|
- }
|
|
|
+ getTree () {
|
|
|
+ const v = this
|
|
|
+ v.$post('/api/storage-restructure/materialClassify/tree').then(res=>{
|
|
|
+ v.treeInit(res.data)
|
|
|
+ this.materialTreeData = res.data
|
|
|
})
|
|
|
},
|
|
|
getTitleData() {
|
|
@@ -981,15 +988,13 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
getStockHouse() {
|
|
|
- GetStockHouse().then((res) => {
|
|
|
- if (res.code === 0) {
|
|
|
- this.stockList = res.result.map((item) => {
|
|
|
- return {
|
|
|
- label: item.name,
|
|
|
- value: item.id,
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ this.$post('/api/storage-restructure/stockHouse/page',this.params).then(res=>{
|
|
|
+ this.stockList = res.data.records.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.name,
|
|
|
+ value: item.id,
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
},
|