|
|
|
|
@ -48,10 +48,18 @@ |
|
|
|
|
@size-change="sizeChange" |
|
|
|
|
@refresh-change="refreshChange" |
|
|
|
|
@on-load="onLoad" |
|
|
|
|
:beforeOpen="beforeOpen" |
|
|
|
|
> |
|
|
|
|
<template #menu-left> |
|
|
|
|
<el-button type="primary" @click="handleAdd">新增</el-button> |
|
|
|
|
</template> |
|
|
|
|
<template #goodsCode-form="{type}"> |
|
|
|
|
<el-select v-if="type == 'edit'" v-model="form.goodsCode" placeholder="请选择物料" |
|
|
|
|
@change="changeGoods" filterable remote :remote-method="remoteMethodGoods" |
|
|
|
|
:loading="goodsLoading" > |
|
|
|
|
<el-option v-for="item in goodsList" :key="item.id" :label="item.goodsCode" :value="item.id"> </el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
<!-- <template #menu="{ row }"> |
|
|
|
|
<el-button type="text" v-if="tabPosition == 'warehouseSetup'">管理员设置</el-button> |
|
|
|
|
</template> --> |
|
|
|
|
@ -132,7 +140,7 @@ import addEditDialog from "./components/addEditDialog.vue" |
|
|
|
|
import {warehouseOption,storageOption} from "./js/warehouseMain"; |
|
|
|
|
import {getWareList,addWare,editWare,deleteWare,getLocationList,delLocation, |
|
|
|
|
editLocation,getUserByRoleAlias,getWareByUser,getWareSelect,getUserByWare,saveUserWare,getAllUser, |
|
|
|
|
saveWareUser} from "@/api/storeManagement/warehouseMaintenance"; |
|
|
|
|
saveWareUser,getMaterialSelect} from "@/api/storeManagement/warehouseMaintenance"; |
|
|
|
|
export default { |
|
|
|
|
components: { addEditDialog,treeTransfer }, |
|
|
|
|
data() { |
|
|
|
|
@ -144,6 +152,8 @@ export default { |
|
|
|
|
noChooseWare:[], //未选库房 |
|
|
|
|
noChooseUser:[], //未选人员 |
|
|
|
|
chooseUser:[], //已选人员 |
|
|
|
|
goodsList:[], |
|
|
|
|
goodsLoading:false, |
|
|
|
|
form: {}, |
|
|
|
|
query:{}, |
|
|
|
|
dialogTitle:'新增', |
|
|
|
|
@ -228,6 +238,46 @@ export default { |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// getGoodsList(){ |
|
|
|
|
// getMaterialSelect().then(res =>{ |
|
|
|
|
|
|
|
|
|
// }) |
|
|
|
|
// }, |
|
|
|
|
beforeOpen(done, type){ |
|
|
|
|
if(type == 'edit'){ |
|
|
|
|
getMaterialSelect().then(res =>{ |
|
|
|
|
this.goodsList = res.data.data.records |
|
|
|
|
done() |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
done() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
remoteMethodGoods(query){ |
|
|
|
|
console.log("query",query) |
|
|
|
|
if(query){ |
|
|
|
|
this.goodsLoading = true |
|
|
|
|
getMaterialSelect({ |
|
|
|
|
goodsCode:query |
|
|
|
|
}).then(res =>{ |
|
|
|
|
this.goodsList = res.data.data.records |
|
|
|
|
this.goodsLoading = false |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
this.goodsLoading = true |
|
|
|
|
getMaterialSelect().then(res =>{ |
|
|
|
|
this.goodsList = res.data.data.records |
|
|
|
|
this.goodsLoading = false |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
changeGoods(val){ |
|
|
|
|
console.log("val",val) |
|
|
|
|
let tmp = this.goodsList.find(item => item.id == val) |
|
|
|
|
this.form.goodsName = tmp.goodsName |
|
|
|
|
this.form.specifications = tmp.specifications |
|
|
|
|
this.form.mtltmrk = tmp.mtltmrk |
|
|
|
|
}, |
|
|
|
|
searchChange(params, done){ |
|
|
|
|
if(this.tabPosition == "warehouseSetup"){ |
|
|
|
|
this.query = params |
|
|
|
|
|