Browse Source

Merge pull request '优化物料模块API请求' (#169) from xuxiaoming into develop

Reviewed-on: #169
pull/171/head
xuxiaoming 3 years ago
parent
commit
1bddb69439
3 changed files with 410 additions and 602 deletions
  1. +374
    -566
      src/views/factoryModel/materialResourceMaintenance/artStockResource/addOrEdit.vue
  2. +35
    -36
      src/views/factoryModel/materialResourceMaintenance/artStockResource/index.vue
  3. +1
    -0
      src/views/factoryModel/materialResourceMaintenance/artStockResource/upload.vue

+ 374
- 566
src/views/factoryModel/materialResourceMaintenance/artStockResource/addOrEdit.vue
File diff suppressed because it is too large
View File


+ 35
- 36
src/views/factoryModel/materialResourceMaintenance/artStockResource/index.vue View File

@ -132,14 +132,16 @@
v-if="isAddOrEdit"
:isAddOrEdit="isAddOrEdit"
:item="item"
:planList="planList"
:articleList="articleList"
:maxCoverPeriodTypeArray="maxCoverPeriodTypeArray"
:minCoverPeriodTypeArray="minCoverPeriodTypeArray"
:mainResourceList="mainResourceList"
:secondaryResourceList="secondaryResourceList"
@setIsAddOrEdit="setIsAddOrEdit"
/>
<Upload
v-model="importDialogVisible"
@editCallBack="completeCallBack" />
<Upload v-if="importDialogVisible" @editCallBack="completeCallBack" />
</div>
</template>
@ -148,7 +150,7 @@ import AddOrEdit from "./addOrEdit.vue";
import Upload from "./upload.vue";
import { ListMixin } from "@/mixins/newListMixin";
import { queryTableData, getPlantList } from "@/server/factoryModel/materialResourceMaintenance/inventoryLevels";
import { deleteHanle,getArtIdList } from "@/server/factoryModel/materialResourceMaintenance/artStockResource";
import { deleteHanle,getArtIdList, getMainResourceList, getSecondaryResourceList, } from "@/server/factoryModel/materialResourceMaintenance/artStockResource";
export default {
@ -181,28 +183,29 @@ export default {
articleList:[], //
minCoverPeriodTypeArray:[],
maxCoverPeriodTypeArray:[],
completeStatusList:[]
completeStatusList:[],
mainResourceList:[],
secondaryResourceList:[],
};
}
},
created(){
this.getStanderData()
},
mounted(){
this.getList();
this.$nextTick(() => {
this.tableHeight = this.calculationTableHeight(
this.$refs.tableRef,
120
);
})
},
methods: {
//
completeCallBack() {
this.importDialogVisible = false
},
//
getArticleList(){
getArtIdList().then(({data=[]})=>{
this.articleList=data;
})
},
//
getPlantList(){
getPlantList().then(({data=[]})=>{
this.planList=data;
})
},
//
handleQuery() {
this.getList();
@ -230,6 +233,18 @@ export default {
},
getStanderData(){
getMainResourceList().then(({ data = [] }) => {
this.mainResourceList = data;
});
getSecondaryResourceList().then(({ data = [] }) => {
this.secondaryResourceList = data;
});
getArtIdList().then(({data=[]})=>{
this.articleList=data;
})
getPlantList().then(({data=[]})=>{
this.planList=data;
})
this.getStanderOne({ statid: 'AP_ArticleStockLevel-MinCoverPeriodType' }).then((res) => {
this.minCoverPeriodTypeArray = res.data
})
@ -238,25 +253,9 @@ export default {
})
this.getStanderOne({ statid: 'AP_ArticleStockLevel-CompleteStatus' }).then((res) => {
this.completeStatusList = res.data
console.log(this.completeStatusList);
})
}
},
created(){
this.getPlantList();
this.getArticleList();
this.getStanderData();
},
mounted(){
this.getList();
this.$nextTick(() => {
this.tableHeight = this.calculationTableHeight(
this.$refs.tableRef,
120
);
});
}
};
</script>
<style lang="less" scoped>


+ 1
- 0
src/views/factoryModel/materialResourceMaintenance/artStockResource/upload.vue View File

@ -19,6 +19,7 @@ import { importArtResource } from "@/server/factoryModel/materialResourceMainten
export default {
name: 'upload',
emits:["editCallBack"],
props:{
showUploadDailog : {
type: Boolean,


Loading…
Cancel
Save