Browse Source

修改物资查询数据

dev
caoyizhong 2 years ago
parent
commit
d96e4a5ca7
  1. 75
      src/views/wastematerials/ProcessWasteMaterialsList.vue
  2. 52
      src/views/wastematerials/ProcessWasteMaterialsLists.vue

75
src/views/wastematerials/ProcessWasteMaterialsList.vue

@ -257,14 +257,11 @@
}
let ue= sessionStorage.getItem('USER_INFORMATION');
let res=JSON.parse(ue);
// console.log("res",res);
let role = {
userid : res.id,
}
let isAdmin = false;
await getAction(this.url.userRoleUrl,role).then(res =>{
// console.log("res",res)
if(res.success){
let item = res.result;
item.forEach( re =>{
@ -328,22 +325,64 @@
}
},
handleDetail(record){
async handleDetail(record){
// console.log("1111111111111111111111111111111111")
// console.log(record);
this.$router.push({
// name:'src-views-wastematerials-ProcessWasteMaterialsLists',
// params:{
// merchandiseNewsId: record.merchandiseNewsId,
// materialStorageId : record.materialStorageId
// }
path:'/materials/wastematerials_detail',
query:{
merchandiseNewsId: record.merchandiseNewsId,
materialStorageId : record.departId,
merchandiseName : ' - '+record.materialDescription.substring(0,10)
}
})
// console.log("sdfgadsg",record);
this.$router.push({
path:'/materials/wastematerials_detail',
query:{
merchandiseNewsId: record.merchandiseNewsId,
materialStorageId : record.materialStorageId,
merchandiseName : ' - '+record.materialDescription.substring(0,10)
}
})
// let ue= sessionStorage.getItem('USER_INFORMATION');
// let res=JSON.parse(ue);
// let role = {
// userid : res.id,
// }
// let is = false;
// await getAction(this.url.userRoleUrl,role).then(res =>{
// // console.log("res",res)
// if(res.success){
// let item = res.result;
// item.forEach( re =>{
// if(re.roleName === "" || re.roleName === ""){
// is = true;
// }
// })
// }
// })
//
// console.log("is=====",is);
// if(is){
// this.$router.push({
// // name:'src-views-wastematerials-ProcessWasteMaterialsLists',
// // params:{
// // merchandiseNewsId: record.merchandiseNewsId,
// // materialStorageId : record.materialStorageId
// // }
// path:'/materials/wastematerials_detail',
// query:{
// merchandiseNewsId: record.merchandiseNewsId,
// materialStorageId : record.materialStorageId,
// merchandiseName : ' - '+record.materialDescription.substring(0,10)
// }
// })
// }else{
// this.$router.push({
// path:'/materials/wastematerials_detail',
// query:{
// merchandiseNewsId: record.merchandiseNewsId,
// materialStorageId : record.materialStorageId,
// merchandiseName : ' - '+record.materialDescription.substring(0,10)
// }
// })
// }
},
initDictConfig(){
//

52
src/views/wastematerials/ProcessWasteMaterialsLists.vue

@ -179,7 +179,7 @@
merchandiseNewsId: this.$route.query.merchandiseNewsId,
materialStorageId: this.$route.query.materialStorageId,
descriptionId: null,
del_flag: 0
delFlag: 0
},
createProductTime:[],
@ -321,8 +321,8 @@
watch: {
$route() {
this.queryParam.merchandiseNewsId = this.$route.query.merchandiseNewsId;
this.queryParam.departId = this.$route.query.materialStorageId;
this.loadData()
this.queryParam.materialStorageId = this.$route.query.materialStorageId;
this.loadData(1)
}
},
computed: {
@ -341,6 +341,7 @@
this.queryParam.inboundDateBegin=dateString[0];
this.queryParam.inboundDateEnd=dateString[1];
},
//
judgeRouterParam(){
if (this.$route.query.merchandiseNewsId == null){
this.$router.go(-1);
@ -355,7 +356,9 @@
// }
// });
// },
//
searchReset(){
this.createProductTime = [],
this.createInnerTime = [],
this.queryParam = {
@ -363,7 +366,41 @@
materialStorageId: this.$route.query.materialStorageId,
del_flag: 0
},
this.loadData(1);
this.ipagination.current = 1;
this.loadData(1);
// getAction(this.url.list,this.queryParam).then((res)=>{
// if(res.success){
// this.dataSource=res.result.records;
// }
// });
},
loadData(arg){
if(!this.url.list){
this.$message.error("请设置url.list属性!")
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
var params = this.getQueryParams();//
this.loading = true;
console.log("params>>>>>>",params)
getAction(this.url.list, params).then((res) => {
if (res.success) {
this.dataSource = res.result.records||res.result;
if(res.result.total)
{
this.ipagination.total = res.result.total;
}
}
if(res.code===510){
this.$message.warning(res.message)
}
this.loading = false;
})
// getAction(this.url.list,this.queryParam).then((res)=>{
// if(res.success){
@ -371,13 +408,6 @@
// }
// });
},
// loadData(){
// getAction(this.url.list,this.queryParam).then((res)=>{
// if(res.success){
// this.dataSource=res.result.records;
// }
// });
// },
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'supplier',text:'供应商',dictCode:''})

Loading…
Cancel
Save