Browse Source

完善旧件库存查询、旧件出入库查询

master
yunuo970428 4 weeks ago
parent
commit
d6ed5a0ae3
  1. 660
      yxt-as-ui/src/views/storage/oldPartsInAndOutStorage/index.vue
  2. 22
      yxt-as-ui/src/views/storage/oldPartsInvertory/index.vue

660
yxt-as-ui/src/views/storage/oldPartsInAndOutStorage/index.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div v-show="viewState == 1"> <div v-show="viewState == 1">
<button-bar ref="btnbar" view-title="旧件出入库查询" :btndisabled="btndisabled" @btnhandle="btnHandle" /> <button-bar ref="btnbar" view-title="旧件出入库查询" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content"> <div class="main-content">
<div class="searchcon"> <div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow"> <el-button size="small" class="searchbtn" @click="clicksearchShow">
@ -10,67 +10,60 @@
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form :inline="true" class="tab-header"> <el-form :inline="true" class="tab-header">
<el-form-item label="商品ID"> <el-form-item label="商品ID">
<el-input v-model="queryParams.params.goodsID" placeholder="" clearable /> <el-input v-model="queryParams.params.goodsID" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="商品名称"> <el-form-item label="商品名称">
<el-input v-model="queryParams.params.goodsSpuName" placeholder="" clearable /> <el-input v-model="queryParams.params.goodsSpuName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="商品编码"> <el-form-item label="图号">
<el-input v-model="queryParams.params.goodsSkuCode" placeholder="" clearable /> <el-input v-model="queryParams.params.goodsSkuCode" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="仓库"> <el-form-item label="仓库">
<el-select v-model="queryParams.params.warehouseName" filterable clearable placeholder="请选择" <el-select v-model="queryParams.params.warehouseName" filterable clearable placeholder="请选择" style="width:100%" @change="warehouseNameSelect">
style="width:100%" @change="warehouseNameSelect"> <el-option v-for="item in warehouseList" :key="item.sid" :label="item.warehouseName" :value="item.sid">
<el-option v-for="item in warehouseList" :key="item.sid" :label="item.warehouseName" </el-option>
:value="item.sid"> </el-select>
</el-form-item>
<el-form-item label="库区">
<el-select v-model="queryParams.params.warehouseAreaName" filterable clearable placeholder="请选择" @change="warehouseAreaNameSelect">
<el-option v-for="item in warehouseAreaList" :key="item.sid" :label="item.areaName" :value="item.sid">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="库位"> <el-form-item label="库位">
<el-select v-model="queryParams.params.warehouseRackCode" filterable clearable placeholder="请选择" <el-select v-model="queryParams.params.warehouseRackCode" filterable clearable placeholder="请选择" style="width:100%">
style="width:100%" @change="warehouseRackCodeSelect"> <el-option v-for="item in warehouseRackCodeList" :key="item.rackCode" :label="item.rackCode" :value="item.rackCode">
<el-option v-for="item in warehouseRackList" :key="item.sid" :label="item.areaCode" :value="item.sid">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="厂家"> <el-form-item label="厂家">
<el-select v-model="queryParams.params.manufacturerName" filterable clearable placeholder="请选择" <el-select v-model="queryParams.params.manufacturerName" filterable clearable placeholder="请选择" style="width:100%" @change="manufacturerNameSelect">
style="width:100%" @change="manufacturerNameSelect"> <el-option v-for="item in manufacturerList" :key="item.sid" :label="item.manufacturerName" :value="item.sid">
<el-option v-for="item in manufacturerList" :key="item.sid" :label="item.manufacturerName"
:value="item.sid">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="车架号"> <el-form-item label="车架号">
<el-input v-model="queryParams.params.vinNo" placeholder="" clearable /> <el-input v-model="queryParams.params.vinNo" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="来源单号"> <el-form-item label="来源单号">
<el-input v-model="queryParams.params.billNo" placeholder="" clearable /> <el-input v-model="queryParams.params.billNo" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="单据类型"> <el-form-item label="单据类型">
<el-select v-model="queryParams.params.billType" filterable clearable placeholder="请选择" <el-select v-model="queryParams.params.billType" filterable clearable placeholder="请选择" style="width:100%">
style="width:100%"> <el-option v-for="item in billStateList" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue">
<el-option v-for="item in billStateList" :key="item.dictKey" :label="item.dictValue"
:value="item.dictKey">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="业务类型"> <el-form-item label="业务类型">
<el-select v-model="queryParams.params.busTypeValue" filterable clearable placeholder="请选择" <el-select v-model="queryParams.params.busTypeValue" filterable clearable placeholder="请选择" style="width:100%">
style="width:100%"> <el-option v-for="item in busTypeList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey">
<el-option v-for="item in busTypeList" :key="item.dictKey" :label="item.dictValue"
:value="item.dictKey">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="发生时间"> <el-form-item label="发生时间">
<el-date-picker v-model="queryParams.params.createTimeStart" type="date" placeholder="选择日期" <el-date-picker v-model="queryParams.params.createTimeStart" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> <span style="padding: 0 8px"></span>
</el-date-picker> <el-date-picker v-model="queryParams.params.createTimeEnd" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
<el-date-picker v-model="queryParams.params.createTimeEnd" type="date" placeholder="选择日期"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
</el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn" style="text-align: center;"> <div class="btn" style="text-align: center;">
@ -86,371 +79,300 @@
<!-- End 项目列表头部 --> <!-- End 项目列表头部 -->
<!-- Start 项目列表 --> <!-- Start 项目列表 -->
<div class=""> <div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" <el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="selectionLineChangeHandle">
@selection-change="selectionLineChangeHandle"> <el-table-column fixed width="50" type="selection" align="center"/>
<el-table-column fixed width="50" type="selection" align="center" /> <el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column prop="vinNo" label="车架号" width="120" align="center"/>
<el-table-column prop="vinNo" label="车架号" width="120" align="center" /> <el-table-column prop="goodsID" label="商品ID" width="120" align="center"/>
<el-table-column prop="goodsID" label="商品ID" width="120" align="center" /> <el-table-column prop="goodsSpuName" label="商品名称" width="120" align="center"/>
<el-table-column prop="goodsSpuName" label="商品名称" width="120" align="center" /> <el-table-column prop="goodsSkuCode" label="图号" width="120" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" width="120" align="center" /> <el-table-column prop="manufacturerName" label="厂家" width="180" align="center"/>
<el-table-column prop="manufacturerName" label="厂家" width="180" align="center" /> <el-table-column prop="goodsSkuOwnSpec" label="规格" width="120" align="center"/>
<el-table-column prop="goodsSkuOwnSpec" label="规格" width="120" align="center" /> <el-table-column prop="unit" label="单位" width="120" align="center"/>
<el-table-column prop="unit" label="单位" width="120" align="center" /> <el-table-column prop="warehouseName" label="仓库" width="150" align="center"/>
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" /> <el-table-column prop="warehouseAreaName" label="库区" width="150" align="center"/>
<el-table-column prop="warehouseRackCode" label="库位" width="150" align="center" /> <el-table-column prop="warehouseRackCode" label="库位" width="150" align="center"/>
<el-table-column prop="billNo" label="来源单号" width="150" align="center" /> <el-table-column prop="billNo" label="来源单号" width="150" align="center"/>
<el-table-column prop="billType" label="单据类型" width="150" align="center" /> <el-table-column label="单据类型" align="center" width="100">
<el-table-column prop="createTime" label="发生时间" width="150" align="center" /> <template slot-scope="scope">
<el-table-column prop="busTypeValue" label="业务类型" width="150" align="center" /> <span>{{ scope.row.billType == '1' ? '入库' : scope.row.billType == '0' ? '出库' : '' }}</span>
<el-table-column prop="count" label="数量" width="150" align="center" /> </template>
<el-table-column prop="currentCount" label="出入库后的库存" width="180" align="center" /> </el-table-column>
<el-table-column prop="createTime" label="发生时间" width="150" align="center"/>
<el-table-column prop="busTypeValue" label="业务类型" width="150" align="center"/>
<el-table-column prop="count" label="数量" width="150" align="center"/>
<el-table-column prop="currentCount" label="出入库后的库存" width="180" align="center"/>
</el-table> </el-table>
</div> </div>
<!-- End 项目列表 --> <!-- End 项目列表 -->
<div class="pages"> <div class="pages">
<div class="tit" /> <div class="tit"/>
<!-- 翻页 --> <!-- 翻页 -->
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" <pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/>
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
</div> </div>
</div> </div>
</div> </div>
<!-- End 查询和其列表部分 --> <!-- End 查询和其列表部分 -->
<!-- 新增修改部分组件 -->
<!-- <divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> -->
<!-- <divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList" /> -->
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/storage/oldPartsInAndOutStorage.js' import req from '@/api/storage/oldPartsInAndOutStorage.js'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import { typeValues } from '@/api/Common/dictcommons'
// import divAdd from './oldPartsInStorageAdd.vue' import req2 from '@/api/goods/factory.js'
// import divInfo from './oldPartsInvertoryInfo.vue'
import {
typeValues
} from '@/api/Common/dictcommons'
import req2 from '@/api/goods/factory.js'
export default {
components: {
ButtonBar,
Pagination,
pageye,
// divAdd,
// divInfo
},
data() {
return {
dialogVisible: false,
btndisabled: false,
viewState: 1, // 1 2 3 4
isSearchShow: false,
searchxianshitit: '显示查询条件',
tableLoading: false,
dataList: [],
btnList: [{
type: 'success',
size: 'small',
icon: 'export',
btnKey: 'toBuild',
btnLabel: '导出'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
queryParams: {
current: 1,
size: 10,
total: 0,
params: {
name: ''
}
},
sids: [],
selectionList: [],
manufacturerList: [],
warehouseList: [],
warehouseRackList: [],
busTypeList: [{
name: "单据类型1",
sid: "1"
},
{
name: "单据类型2",
sid: "2"
}
],
billStateList: [],
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
this.loadList()
this.init()
},
methods: {
init() { export default {
var parpams1 = { components: {
orgPath: window.sessionStorage.getItem('defaultOrgPath'), ButtonBar,
Pagination
},
data() {
return {
dialogVisible: false,
btndisabled: false,
viewState: 1, // 1 2 3 4
isSearchShow: false,
searchxianshitit: '显示查询条件',
tableLoading: false,
dataList: [],
btnList: [
{
type: 'success',
size: 'small',
icon: 'export',
btnKey: 'toBuild',
btnLabel: '导出'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
} }
req.getWarehouses(parpams1).then((res) => { ],
if (res.success) { queryParams: {
this.warehouseList = res.data current: 1,
size: 10,
console.log("aaaaaa", this.warehouseList); total: 0,
params: {
} goodsID: '',
}) goodsSpuName: '',
goodsSkuCode: '',
typeValues({ warehouseName: '',
type: 'wms_busType' warehouseAreaName: '',
}).then((res) => { warehouseRackCode: '',
if (res.success) { manufacturerName: '',
this.busTypeList = res.data vinNo: '',
} billNo: '',
}) billType: '',
busTypeValue: '',
typeValues({ createTimeStart: '',
type: 'billsType' createTimeEnd: '',
}).then((res) => { orgPath: '',
if (res.success) { userSid: '',
this.billStateList = res.data menuUrl: ''
}
})
var parpams2 = {
useOrgSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1)
} }
req2.getAllFacturer(parpams2).then(resp => {
this.manufacturerList = resp.data
})
console.log("aaaaaa", this.manufacturerList);
}, },
sids: [],
selectionList: [],
selectionLineChangeHandle(val) { manufacturerList: [],
console.log("val", val); warehouseList: [],
warehouseRackCodeList: [],
this.selectionList = val busTypeList: [],
const aa = [] billStateList: [
val.forEach(element => { {
aa.push(element.sid) dictKey: '0',
}) dictValue: '出库'
this.sids = aa },
{
}, dictKey: '1',
// dictValue: '入库'
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
} }
}, ]
btnHandle(btnKey) { }
switch (btnKey) { },
case 'doDel': mounted() {
// this.doDel() this.$refs['btnbar'].setButtonList(this.btnList)
this.toRelevancy() },
break created() {
case 'toBuild': this.loadList()
this.toBuild() this.init()
break },
case 'doClose': methods: {
this.doClose() init() {
break req.getWarehouses({ orgPath: window.sessionStorage.getItem('defaultOrgPath'), warehouseTypeValue: '旧件库' }).then((res) => {
default: if (res.success) {
break this.warehouseList = res.data
} }
}, })
loadList() { typeValues({ type: 'wms_busType' }).then((res) => {
this.tableLoading = true if (res.success) {
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') this.busTypeList = res.data
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.queryParams.params.menuUrl = this.$route.path
req.listPage(this.queryParams).then((resp) => {
this.tableLoading = false
if (resp.success) {
const data = resp.data
this.queryParams.total = data.total
this.dataList = data.records
} else {
// resp.code
this.dataList = []
this.queryParams.total = 0
}
}).catch(() => {
this.tableLoading = false
})
},
//
indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart
return pageindex
},
dosearch() {
this.queryParams.current = 1
this.loadList()
},
resetQuery() {
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
name: ''
}
} }
this.loadList() })
}, req2.getAllFacturer({ useOrgSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1) }).then(resp => {
doDel() { this.manufacturerList = resp.data
})
if (this.sids.length > 0) { },
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' selectionLineChangeHandle(val) {
this.$confirm(tip, '提示', { this.selectionList = val
confirmButtonText: '确定', const aa = []
cancelButtonText: '取消', val.forEach(element => {
type: 'warning' aa.push(element.sid)
}).then(() => { })
const loading = this.$loading({ this.sids = aa
lock: true, },
text: 'Loading', //
spinner: 'el-icon-loading', clicksearchShow() {
background: 'rgba(0, 0, 0, 0.7)' this.isSearchShow = !this.isSearchShow
}) if (this.isSearchShow) {
req.deleteBySids(this.sids).then((resp) => { this.searchxianshitit = '隐藏查询条件'
loading.close() } else {
if (resp.success) { this.searchxianshitit = '显示查询条件'
this.$message({ }
type: 'success', },
message: resp.msg, btnHandle(btnKey) {
showClose: true switch (btnKey) {
}) case 'toBuild':
this.loadList() this.toBuild()
} else { break
// resp.code case 'doClose':
} this.doClose()
}).catch(e => { break
loading.close() default:
}) break
}).catch(() => {}) }
},
loadList() {
this.tableLoading = true
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.queryParams.params.menuUrl = this.$route.path
req.listPage(this.queryParams).then((resp) => {
this.tableLoading = false
if (resp.success) {
const data = resp.data
this.queryParams.total = data.total
this.dataList = data.records
} else { } else {
this.$message({ // resp.code
showClose: true, this.dataList = []
message: '请至少选择一条记录进行删除操作' this.queryParams.total = 0
})
} }
}, }).catch(() => {
this.tableLoading = false
toBuild() { })
// if (this.sids.length > 0) { },
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.exportExcel(this.queryParams.params).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel'
})
const fileName = '旧件出入库记录' + '.xls'
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'nonde'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}).catch(() => {
loading.close()
})
// } else {
// this.$message({
// type: "warning",
// showClose: true,
// message: ''
// })
// }
},
toRelevancy() {
this.viewState = 4
this.$refs['divinfo'].showAdd()
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
resetState() {
this.viewState = 1
},
manufacturerNameSelect(val) {
console.log("supplierNameSelect", val);
const choose = this.manufacturerList.filter((item) => item.sid == val)
console.log('>>>>>>>>>supplierNameSelect', choose)
this.queryParams.params.manufacturerName = choose[0].manufacturerName
this.queryParams.params.manufacturerSid = choose[0].sid
}, //
getWarehouseAreaList(sid) { indexMethod(index) {
var query = { var pagestart = (this.queryParams.current - 1) * this.queryParams.size
ckSid: sid var pageindex = index + 1 + pagestart
return pageindex
},
dosearch() {
this.queryParams.current = 1
this.loadList()
},
resetQuery() {
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
goodsID: '',
goodsSpuName: '',
goodsSkuCode: '',
warehouseName: '',
warehouseAreaName: '',
warehouseRackCode: '',
manufacturerName: '',
vinNo: '',
billNo: '',
billType: '',
busTypeValue: '',
createTimeStart: '',
createTimeEnd: '',
orgPath: '',
userSid: '',
menuUrl: ''
} }
req.getWarehouseareas(query).then((res) => { }
if (res.success) { this.loadList()
this.warehouseRackList = res.data },
toBuild() {
console.log("aaaaaa", this.warehouseRackList); const loading = this.$loading({
lock: true,
} text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.exportExcel(this.queryParams.params).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel'
}) })
}, const fileName = '旧件出入库记录' + '.xls'
warehouseNameSelect(val) { const elink = document.createElement('a')
console.log("selectWarehouseName", val); elink.download = fileName
const choose = this.warehouseList.filter((item) => item.sid == val) elink.style.display = 'none'
console.log('>>>>>>>>>selectWarehouseName', choose) elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}).catch(() => {
loading.close()
})
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
resetState() {
this.viewState = 1
},
manufacturerNameSelect(val) {
const choose = this.manufacturerList.filter((item) => item.sid === val)
this.queryParams.params.manufacturerName = choose[0].manufacturerName
},
warehouseNameSelect(val) {
const choose = this.warehouseList.filter((item) => item.sid === val)
if (choose !== null && choose.length > 0) {
this.queryParams.params.warehouseName = choose[0].warehouseName this.queryParams.params.warehouseName = choose[0].warehouseName
this.queryParams.params.warehouseSid = choose[0].sid
this.getWarehouseAreaList(choose[0].sid) this.getWarehouseAreaList(choose[0].sid)
} else {
}, this.queryParams.params.warehouseName = ''
warehouseRackCodeSelect(val) { }
console.log("selectWarehouseAreaCode", val); },
getWarehouseAreaList(sid) {
const choose = this.warehouseRackList.filter((item) => item.sid == val) req.getWarehouseareas({ ckSid: sid }).then((res) => {
console.log('>>>>>>>>>selectWarehouseAreaCode', choose) if (res.success) {
this.queryParams.params.warehouseRackCode = choose[0].areaCode this.warehouseAreaList = res.data
this.queryParams.params.warehouseRackSid = choose[0].sid }
})
}, },
warehouseAreaNameSelect(val) {
const choose = this.warehouseAreaList.filter((item) => item.sid === val)
if (choose !== null && choose.length > 0) {
this.queryParams.params.warehouseAreaName = choose[0].areaName
this.getWareHouseCodeList(choose[0].sid)
} else {
this.queryParams.params.warehouseAreaName = ''
}
},
getWareHouseCodeList(sid) {
req.getAllRackByKQSid({ kqSid: sid }).then((res) => {
if (res.success) {
this.warehouseRackCodeList = res.data
}
})
} }
} }
}
</script> </script>
<style scoped> <style scoped>
</style> </style>

22
yxt-as-ui/src/views/storage/oldPartsInvertory/index.vue

@ -24,13 +24,13 @@
</el-form-item> </el-form-item>
<el-form-item label="库区"> <el-form-item label="库区">
<el-select v-model="queryParams.params.warehouseAreaName" filterable clearable placeholder="请选择" @change="warehouseAreaNameSelect"> <el-select v-model="queryParams.params.warehouseAreaName" filterable clearable placeholder="请选择" @change="warehouseAreaNameSelect">
<el-option v-for="item in warehouseAreaList" :key="item.sid" :label="item.areaCode" :value="item.sid"> <el-option v-for="item in warehouseAreaList" :key="item.sid" :label="item.areaName" :value="item.sid">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="库位"> <el-form-item label="库位">
<el-select v-model="queryParams.params.warehouseRackCode" filterable clearable placeholder="请选择"> <el-select v-model="queryParams.params.warehouseRackCode" filterable clearable placeholder="请选择">
<el-option v-for="item in warehouseRackCodeList" :key="item.rackCode" :label="item.rackName" :value="item.rackCode"> <el-option v-for="item in warehouseRackCodeList" :key="item.rackCode" :label="item.rackCode" :value="item.rackCode">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -338,9 +338,12 @@ export default {
}, },
warehouseNameSelect(val) { warehouseNameSelect(val) {
const choose = this.warehouseList.filter((item) => item.sid === val) const choose = this.warehouseList.filter((item) => item.sid === val)
this.queryParams.params.warehouseName = choose[0].warehouseName if (choose !== null && choose.length > 0) {
this.queryParams.params.warehouseSid = choose[0].sid this.queryParams.params.warehouseName = choose[0].warehouseName
this.getWarehouseAreaList(choose[0].sid) this.getWarehouseAreaList(choose[0].sid)
} else {
this.queryParams.params.warehouseName = ''
}
}, },
getWarehouseAreaList(sid) { getWarehouseAreaList(sid) {
req.getWarehouseareas({ ckSid: sid }).then((res) => { req.getWarehouseareas({ ckSid: sid }).then((res) => {
@ -351,9 +354,12 @@ export default {
}, },
warehouseAreaNameSelect(val) { warehouseAreaNameSelect(val) {
const choose = this.warehouseAreaList.filter((item) => item.sid === val) const choose = this.warehouseAreaList.filter((item) => item.sid === val)
this.queryParams.params.warehouseRackCode = choose[0].areaCode if (choose !== null && choose.length > 0) {
this.queryParams.params.warehouseRackSid = choose[0].sid this.queryParams.params.warehouseAreaName = choose[0].areaName
this.getWareHouseCodeList(choose[0].sid) this.getWareHouseCodeList(choose[0].sid)
} else {
this.queryParams.params.warehouseAreaName = ''
}
}, },
getWareHouseCodeList(sid) { getWareHouseCodeList(sid) {
req.getAllRackByKQSid({ kqSid: sid }).then((res) => { req.getAllRackByKQSid({ kqSid: sid }).then((res) => {

Loading…
Cancel
Save