|
|
|
@ -156,6 +156,7 @@
|
|
|
|
|
|
|
|
|
|
</el-tab-pane> |
|
|
|
|
<el-tab-pane label="备货包件" name="outbound"> |
|
|
|
|
<el-button type="primary" text icon="el-icon-view" v-if =isStockUp @click="handleStockUp(row,'1')">备货</el-button> |
|
|
|
|
<el-table ref="table" v-loading="loading" |
|
|
|
|
@selection-change="selectionChange" |
|
|
|
|
:data="data1" |
|
|
|
@ -178,9 +179,9 @@
|
|
|
|
|
<!-- 操作栏模块 --> |
|
|
|
|
<el-table-column prop="menu" label="操作" :width="220" align="center"> |
|
|
|
|
<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-view" v-if="!row.stockupStatus" @click="handleStockUp(row,'2')">备货</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>--> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
@ -236,6 +237,27 @@
|
|
|
|
|
</el-tabs> |
|
|
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
<el-dialog v-model="dialogHand" title="系统备货"> |
|
|
|
|
<el-form :model="form"> |
|
|
|
|
<el-form-item label="备货区域" :label-width="formLabelWidth" > |
|
|
|
|
<el-select v-model="form.goodsAreaId" clearable placeholder="请选择备货区编号" @change="getForklift($event,'3')"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in goodsAreaIdData" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey"> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<template #footer> |
|
|
|
|
<span class="dialog-footer"> |
|
|
|
|
<el-button @click="dialogHand = false">取消</el-button> |
|
|
|
|
<!-- <el-button type="primary" @click="dialogFormVisible = false"> 确定 </el-button>--> |
|
|
|
|
<el-button type="primary" @click="callFordelivery()"> 确定 </el-button> |
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
<!-- <el-row> |
|
|
|
|
<div class="avue-crud__pagination" style="width:100%"> |
|
|
|
|
<!– 分页模块 –> |
|
|
|
@ -288,12 +310,14 @@ import {
|
|
|
|
|
update, |
|
|
|
|
remove, |
|
|
|
|
getDetailStockupOwn, |
|
|
|
|
getDetailReservationOwn, getDetailOrderOwn, getDetailInventoryOwn |
|
|
|
|
getDetailReservationOwn, getDetailOrderOwn, getDetailInventoryOwn, getListUser |
|
|
|
|
} from '@/api/distribution/distributionStockup'; |
|
|
|
|
import option from "@/option/distribution/distributionStockup"; |
|
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
|
import { getParcelListOwn } from '@/api/distribution/distributionParcelList'; |
|
|
|
|
import { stockUp } from '@/api/basicdata/basicdataGoodsArea'; |
|
|
|
|
import { getStockDetail } from '@/api/distribution/distributionStock'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
data () { |
|
|
|
@ -304,6 +328,7 @@ export default {
|
|
|
|
|
title: '', |
|
|
|
|
// 是否展示弹框 |
|
|
|
|
box: false, |
|
|
|
|
isStockUp: false, |
|
|
|
|
// 是否显示查询 |
|
|
|
|
search: true, |
|
|
|
|
// 加载中 |
|
|
|
@ -343,6 +368,7 @@ export default {
|
|
|
|
|
formCustomer: {}, // 客户 |
|
|
|
|
// 选择行 |
|
|
|
|
selectionList: [], |
|
|
|
|
goodsAreaIdData: [], |
|
|
|
|
// 表单配置 |
|
|
|
|
option: option, |
|
|
|
|
// 表单列表 |
|
|
|
@ -358,6 +384,8 @@ export default {
|
|
|
|
|
dialogTableVisible: false, |
|
|
|
|
dialogFormVisible: false, |
|
|
|
|
dialogFormCustomer: false, |
|
|
|
|
dialogHand: false, //备货手动 |
|
|
|
|
deptId: '', //部门id |
|
|
|
|
dialogFormService: false, |
|
|
|
|
formLabelWidth: '120px', |
|
|
|
|
handler:true, //首次 |
|
|
|
@ -399,6 +427,83 @@ export default {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//系统备货确定 |
|
|
|
|
callFordelivery(){ |
|
|
|
|
// console.log("确定操作",this.form); |
|
|
|
|
let c = false; |
|
|
|
|
if (this.selectionList.length > 0) { |
|
|
|
|
let ids = this.selectionList.map(i => i.id).join(','); |
|
|
|
|
this.selectionList.forEach( i =>{ |
|
|
|
|
if(!!i.stockupStatus){ |
|
|
|
|
c = true; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.form.ids = ids.split(","); |
|
|
|
|
} |
|
|
|
|
if(c){ |
|
|
|
|
this.$message.warning("有已备货的数据!!") |
|
|
|
|
return ; |
|
|
|
|
} |
|
|
|
|
this.form.stockupId = this.$route.query.id; |
|
|
|
|
console.log("ids",this.form); |
|
|
|
|
getStockDetail( Object.assign(this.form)).then(res =>{ |
|
|
|
|
console.log("resd",res.data.data); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
this.form = {}; |
|
|
|
|
this.dialogHand = false; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//选择 |
|
|
|
|
getForklift(row,ty){ |
|
|
|
|
switch (ty){ |
|
|
|
|
case '3': |
|
|
|
|
let f = this.goodsAreaIdData.find(i =>i.dictKey == row) |
|
|
|
|
this.form.stockupArea = f.dictValue; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//备货区 |
|
|
|
|
async getStorageArea(){ |
|
|
|
|
let params ={ |
|
|
|
|
department: this.deptId |
|
|
|
|
} |
|
|
|
|
stockUp(params).then(res =>{ |
|
|
|
|
// console.log("res>>>",res.data.data); |
|
|
|
|
let fo =[]; |
|
|
|
|
res.data.data.forEach(i =>{ |
|
|
|
|
let v = { |
|
|
|
|
dictKey: i.id, |
|
|
|
|
dictValue: i.name +'-'+i.headline |
|
|
|
|
} |
|
|
|
|
fo.push(v) |
|
|
|
|
}) |
|
|
|
|
this.goodsAreaIdData = fo; |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
handleStockUp(row,type){ |
|
|
|
|
getListUser().then(res =>{ //查询当前人信息 |
|
|
|
|
console.log("res>>>",res.data.data); |
|
|
|
|
this.deptId = res.data.data.deptId; |
|
|
|
|
this.getStorageArea(); |
|
|
|
|
}) |
|
|
|
|
console.log("备货数据!!",row); |
|
|
|
|
switch (type){ |
|
|
|
|
case '1': |
|
|
|
|
if(this.selectionList.length === 0){ |
|
|
|
|
this.$message.warning("至少选择一条数据!!!"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case '2': |
|
|
|
|
this.form.ids = row.id; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
this.dialogHand = true; |
|
|
|
|
}, |
|
|
|
|
handleClick (tab, event) { |
|
|
|
|
console.log(tab, event) |
|
|
|
|
console.log(tab.props.name); |
|
|
|
@ -664,14 +769,14 @@ export default {
|
|
|
|
|
console.log("......",a.data); |
|
|
|
|
const data = a.data.data; |
|
|
|
|
this.data3 = data.records; |
|
|
|
|
if(!!this.data3 && this.data3.length > 0){ |
|
|
|
|
this.data3.forEach(i =>{ |
|
|
|
|
let b = this.stockupStatusList.find( a => a.dictKey == i.stockupStatus); |
|
|
|
|
if(!!b){ |
|
|
|
|
i.stockupStatusName = b.dictValue; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// if(!!this.data3 && this.data3.length > 0){ |
|
|
|
|
// this.data3.forEach(i =>{ |
|
|
|
|
// let b = this.stockupStatusList.find( a => a.dictKey == i.stockupStatus); |
|
|
|
|
// if(!!b){ |
|
|
|
|
// i.stockupStatusName = b.dictValue; |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
this.page3.total = a.data.data.total; |
|
|
|
|
this.loading = false; |
|
|
|
@ -684,9 +789,11 @@ export default {
|
|
|
|
|
const data = a.data.data; |
|
|
|
|
this.data1 = data.records; |
|
|
|
|
this.data1.forEach(i =>{ |
|
|
|
|
let b = this.stockupStatusList.find( a => a.dictKey == i.stockupStatus); |
|
|
|
|
if(!!b){ |
|
|
|
|
i.stockupStatusName = b.dictValue; |
|
|
|
|
if(!i.stockupStatus){ |
|
|
|
|
i.stockupStatusName = "未备货"; |
|
|
|
|
this.isStockUp = true; |
|
|
|
|
}else{ |
|
|
|
|
i.stockupStatusName = "已备货"; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.page1.total = a.data.data.total; |
|
|
|
|