|
|
|
@ -30,8 +30,12 @@
|
|
|
|
|
</div> |
|
|
|
|
<!-- 头部右侧按钮模块 --> |
|
|
|
|
<div class="avue-crud__right"> |
|
|
|
|
<el-button icon="el-icon-refresh" @click="searchChange" circle></el-button> |
|
|
|
|
<el-button icon="el-icon-search" @click="searchHide" circle></el-button> |
|
|
|
|
<el-button icon="el-icon-search" @click="onLoad" >全部</el-button> |
|
|
|
|
<el-button icon="el-icon-refresh" @click="getStockUp('2')" >已备货</el-button> |
|
|
|
|
<el-button icon="el-icon-search" @click="getStockUp('1')" >待备货</el-button> |
|
|
|
|
|
|
|
|
|
<!-- <el-button icon="el-icon-refresh" @click="searchChange" circle></el-button>--> |
|
|
|
|
<!-- <el-button icon="el-icon-search" @click="searchHide" circle></el-button>--> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-row> |
|
|
|
@ -61,7 +65,7 @@
|
|
|
|
|
<template #="{row}"> |
|
|
|
|
<el-button type="primary" text icon="el-icon-view" @click="handleView(row)">查看</el-button> |
|
|
|
|
<el-button type="primary" text icon="el-icon-edit" @click="handleEdit(row)">编辑</el-button> |
|
|
|
|
<el-button type="primary" text icon="el-icon-delete" @click="rowDel(row)">删除</el-button> |
|
|
|
|
<!-- <el-button type="primary" text icon="el-icon-delete" @click="rowDel(row)">删除</el-button>--> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
@ -205,12 +209,13 @@
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { getList, getDetail, add, update, remove,getListUser } from "@/api/distribution/distributionStockup"; |
|
|
|
|
import { getList, getDetail, add, update, remove,getListUser,addAssign } from "@/api/distribution/distributionStockup"; |
|
|
|
|
import { getPostList } from '@/api/system/post'; |
|
|
|
|
import { stockUp } from '@/api/basicdata/basicdataGoodsArea'; |
|
|
|
|
import { getListOwn } from '@/api/system/user'; |
|
|
|
|
import { getListOwn,getUser } from '@/api/system/user'; |
|
|
|
|
import option from "@/option/distribution/distributionStockup"; |
|
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
|
import { getListTeam } from '@/api/basicdata/basicdataTeamGroup'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
data () { |
|
|
|
@ -265,6 +270,26 @@ export default {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//查询备货 |
|
|
|
|
getStockUp(row){ |
|
|
|
|
console.log("row",row); |
|
|
|
|
let params = {}; |
|
|
|
|
switch (row) { |
|
|
|
|
case '1': |
|
|
|
|
params.stockupStatus = '2' |
|
|
|
|
break; |
|
|
|
|
case '2': |
|
|
|
|
params.stockupStatus = '3' |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
getList(this.page.currentPage, this.page.pageSize, params).then(res => { |
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.page.total = data.total; |
|
|
|
|
this.data = data.records; |
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//查询叉车人员 |
|
|
|
|
async getFork(){ |
|
|
|
|
let ides = ''; |
|
|
|
@ -289,8 +314,7 @@ export default {
|
|
|
|
|
// roleId: '', //角色 |
|
|
|
|
} |
|
|
|
|
getListOwn(Object.assign(params, this.query)).then(res =>{ |
|
|
|
|
|
|
|
|
|
console.log(".............",res.data.data); |
|
|
|
|
// console.log(".............",res.data.data); |
|
|
|
|
let fo = []; |
|
|
|
|
res.data.data.forEach( i =>{ |
|
|
|
|
let a ={ |
|
|
|
@ -301,12 +325,27 @@ export default {
|
|
|
|
|
}); |
|
|
|
|
this.forkliftData = fo; |
|
|
|
|
}) |
|
|
|
|
this.getStorageArea(); |
|
|
|
|
await this.getStorageArea(); |
|
|
|
|
await this.getTeam(); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//查询班组 |
|
|
|
|
async getTeam(){ |
|
|
|
|
|
|
|
|
|
let params ={ |
|
|
|
|
department: this.deptId |
|
|
|
|
} |
|
|
|
|
getListTeam(this.page.currentPage, this.page.pageSize, Object.assign(params, this.query)).then(res =>{ |
|
|
|
|
// console.log(">><><",res.data.data.records); |
|
|
|
|
let fo= []; |
|
|
|
|
res.data.data.records.forEach(i =>{ |
|
|
|
|
let a= { |
|
|
|
|
dictKey: i.id, |
|
|
|
|
dictValue: i.name +'-'+i.groupName |
|
|
|
|
} |
|
|
|
|
fo.push(a); |
|
|
|
|
}); |
|
|
|
|
this.loaderData = fo; |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//备货区 |
|
|
|
|
async getStorageArea(){ |
|
|
|
@ -314,7 +353,7 @@ export default {
|
|
|
|
|
department: this.deptId |
|
|
|
|
} |
|
|
|
|
stockUp(params).then(res =>{ |
|
|
|
|
console.log("res>>>",res.data.data); |
|
|
|
|
// console.log("res>>>",res.data.data); |
|
|
|
|
let fo =[]; |
|
|
|
|
res.data.data.forEach(i =>{ |
|
|
|
|
let v = { |
|
|
|
@ -327,15 +366,26 @@ export default {
|
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
handleForklift(){ |
|
|
|
|
// console.log(">>"); |
|
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
|
this.$message.warning("请选择至少一条数据"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.dialogFormCustomer = true; |
|
|
|
|
this.getFork(); |
|
|
|
|
this.getTeam() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//确定通知提货按钮 |
|
|
|
|
callFordelivery(inde){ |
|
|
|
|
//确定指派 |
|
|
|
|
callFordelivery(){ |
|
|
|
|
this.form.ids = this.ids; |
|
|
|
|
addAssign(this.form).then(res =>{ |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.dialogFormCustomer = false; |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
init () { |
|
|
|
@ -458,8 +508,26 @@ export default {
|
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.page.total = data.total; |
|
|
|
|
this.data = data.records; |
|
|
|
|
this.loading = false; |
|
|
|
|
this.data.forEach(async i =>{ |
|
|
|
|
let a = await getUser(i.forklift); |
|
|
|
|
i.forklift =a.data.data.name; |
|
|
|
|
i.loader = i.groupName; |
|
|
|
|
i.stockupArea = i.headline; |
|
|
|
|
if(i.assignStatus == '2'){ |
|
|
|
|
i.assignStatus = '已指派'; |
|
|
|
|
}else{ |
|
|
|
|
i.assignStatus = '未指派'; |
|
|
|
|
} |
|
|
|
|
if(i.stockupStatus == '2'){ |
|
|
|
|
i.stockupStatus = '待备货'; |
|
|
|
|
}else if(i.stockupStatus == '3'){ |
|
|
|
|
i.stockupStatus = '已备货'; |
|
|
|
|
}else{ |
|
|
|
|
i.stockupStatus = '未备货'; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.selectionClear(); |
|
|
|
|
this.loading = false; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|