|
|
|
@ -26,7 +26,7 @@
|
|
|
|
|
<div class="avue-crud__left"> |
|
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新 增</el-button> |
|
|
|
|
<el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain>删 除</el-button> |
|
|
|
|
<el-button type="primary" text icon="el-icon-edit" @click="handleEdit(row)" >指派叉车司机</el-button> |
|
|
|
|
<el-button type="primary" text icon="el-icon-edit" @click="handleForklift(row)" >指派叉车司机</el-button> |
|
|
|
|
</div> |
|
|
|
|
<!-- 头部右侧按钮模块 --> |
|
|
|
|
<div class="avue-crud__right"> |
|
|
|
@ -81,21 +81,37 @@
|
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
</el-row> |
|
|
|
|
<el-dialog v-model="dialogFormCustomer" title="修改客户信息"> |
|
|
|
|
<el-form :model="formCustomer"> |
|
|
|
|
<el-form-item label="姓名" :label-width="formLabelWidth"> |
|
|
|
|
<el-input v-model="formCustomer.name" autocomplete="off" /> |
|
|
|
|
<el-dialog v-model="dialogFormCustomer" title="指派叉车"> |
|
|
|
|
<el-form :model="form"> |
|
|
|
|
<el-form-item label="叉车司机" :label-width="formLabelWidth"> |
|
|
|
|
<el-select v-model="form.forklift" clearable placeholder="请选择叉车司机"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in forkliftData" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey"> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="电话" :label-width="formLabelWidth"> |
|
|
|
|
<el-input v-model="formCustomer.phone" autocomplete="off" /> |
|
|
|
|
<el-form-item label="装卸班组" :label-width="formLabelWidth"> |
|
|
|
|
<el-select v-model="form.loader" clearable placeholder="请选择装卸班组"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in loaderData" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey"> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="地址" :label-width="formLabelWidth"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="formCustomer.address" |
|
|
|
|
:rows="2" |
|
|
|
|
type="textarea" |
|
|
|
|
placeholder="请填写地址" |
|
|
|
|
/> |
|
|
|
|
<el-form-item label="备货区域" :label-width="formLabelWidth"> |
|
|
|
|
<el-select v-model="form.stockupArea" clearable placeholder="请选择备货区编号"> |
|
|
|
|
<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> |
|
|
|
@ -189,7 +205,10 @@
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { getList, getDetail, add, update, remove } from "@/api/distribution/distributionStockup"; |
|
|
|
|
import { getList, getDetail, add, update, remove,getListUser } from "@/api/distribution/distributionStockup"; |
|
|
|
|
import { getPostList } from '@/api/system/post'; |
|
|
|
|
import { stockUp } from '@/api/basicdata/basicdataGoodsArea'; |
|
|
|
|
import { getListOwn } from '@/api/system/user'; |
|
|
|
|
import option from "@/option/distribution/distributionStockup"; |
|
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
|
|
|
|
|
@ -208,7 +227,6 @@ export default {
|
|
|
|
|
// 是否为查看模式 |
|
|
|
|
view: false, |
|
|
|
|
dialogFormCustomer: false, |
|
|
|
|
formCustomer: [], |
|
|
|
|
formLabelWidth: '120px', |
|
|
|
|
// 查询信息 |
|
|
|
|
query: {}, |
|
|
|
@ -226,6 +244,10 @@ export default {
|
|
|
|
|
option: option, |
|
|
|
|
// 表单列表 |
|
|
|
|
data: [], |
|
|
|
|
forkliftData: [], |
|
|
|
|
loaderData: [], |
|
|
|
|
goodsAreaIdData: [], |
|
|
|
|
deptId: '', |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted () { |
|
|
|
@ -243,6 +265,74 @@ export default {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//查询叉车人员 |
|
|
|
|
async getFork(){ |
|
|
|
|
let ides = ''; |
|
|
|
|
let ide = { }; |
|
|
|
|
await getListUser().then(res =>{ |
|
|
|
|
// console.log("res>>>",res.data.data); |
|
|
|
|
ides = res.data.data.tenantId; |
|
|
|
|
this.deptId = res.data.data.deptId; |
|
|
|
|
}) |
|
|
|
|
await getPostList(ides).then(res =>{ |
|
|
|
|
// console.log(">>>>",res.data.data); |
|
|
|
|
res.data.data.forEach(i =>{ |
|
|
|
|
if(i.postName == "叉车"){ |
|
|
|
|
ide = i; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
// console.log("ied>>>>>",ide); |
|
|
|
|
let params={ |
|
|
|
|
postId: ide.id, //岗位 |
|
|
|
|
deptId: this.deptId, //部门 |
|
|
|
|
// roleId: '', //角色 |
|
|
|
|
} |
|
|
|
|
getListOwn(Object.assign(params, this.query)).then(res =>{ |
|
|
|
|
|
|
|
|
|
console.log(".............",res.data.data); |
|
|
|
|
let fo = []; |
|
|
|
|
res.data.data.forEach( i =>{ |
|
|
|
|
let a ={ |
|
|
|
|
dictKey: i.id, |
|
|
|
|
dictValue: i.name |
|
|
|
|
}; |
|
|
|
|
fo.push(a); |
|
|
|
|
}); |
|
|
|
|
this.forkliftData = fo; |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//查询班组 |
|
|
|
|
async getTeam(){ |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//备货区 |
|
|
|
|
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.headline |
|
|
|
|
} |
|
|
|
|
fo.push(v) |
|
|
|
|
}) |
|
|
|
|
this.goodsAreaIdData = fo; |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
handleForklift(){ |
|
|
|
|
// console.log(">>"); |
|
|
|
|
this.dialogFormCustomer = true; |
|
|
|
|
this.getFork(); |
|
|
|
|
this.getTeam() |
|
|
|
|
this.getStorageArea(); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//确定通知提货按钮 |
|
|
|
|
callFordelivery(inde){ |
|
|
|
|
|
|
|
|
|