|
|
@ -1,48 +1,38 @@ |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<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="searchcon"> |
|
|
|
<el-button size="small" class="searchbtn" @click="clicksearchShow"> |
|
|
|
{{ searchxianshitit }} |
|
|
|
</el-button> |
|
|
|
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|
|
|
<div v-show="isSearchShow" class="search"> |
|
|
|
<el-form :inline="true" class="tab-header"> |
|
|
|
<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 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 label="商品编码"> |
|
|
|
<el-input v-model="queryParams.params.goodsSkuCode" placeholder="" clearable /> |
|
|
|
<el-form-item label="图号"> |
|
|
|
<el-input v-model="queryParams.params.goodsSkuCode" placeholder="" clearable/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="仓库"> |
|
|
|
<el-select v-model="queryParams.params.warehouseName" filterable clearable placeholder="请选择" |
|
|
|
style="width:100%" @change="warehouseNameSelect"> |
|
|
|
<el-option v-for="item in warehouseList" :key="item.sid" :label="item.warehouseName" |
|
|
|
:value="item.sid"> |
|
|
|
<el-select v-model="queryParams.params.warehouseName" filterable clearable placeholder="请选择" @change="warehouseNameSelect"> |
|
|
|
<el-option v-for="item in warehouseList" :key="item.sid" :label="item.warehouseName" :value="item.sid"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="库位"> |
|
|
|
<el-select v-model="queryParams.params.warehouseRackCode" filterable clearable placeholder="请选择" |
|
|
|
style="width:100%" @change="warehouseRackCodeSelect"> |
|
|
|
<el-select v-model="queryParams.params.warehouseRackCode" filterable clearable placeholder="请选择" @change="warehouseRackCodeSelect"> |
|
|
|
<el-option v-for="item in warehouseRackList" :key="item.sid" :label="item.areaCode" :value="item.sid"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="厂家"> |
|
|
|
<el-select v-model="queryParams.params.manufacturerName" filterable clearable placeholder="请选择" |
|
|
|
style="width:100%" @change="manufacturerNameSelect"> |
|
|
|
<el-option v-for="item in manufacturerList" :key="item.sid" :label="item.manufacturerName" |
|
|
|
:value="item.sid"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<el-input v-model="queryParams.params.manufacturerName" placeholder="" clearable/> |
|
|
|
</el-form-item> |
|
|
|
<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> |
|
|
|
<div class="btn" style="text-align: center;"> |
|
|
@ -58,383 +48,300 @@ |
|
|
|
<!-- End 项目列表头部 --> |
|
|
|
<!-- Start 项目列表 --> |
|
|
|
<div class=""> |
|
|
|
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
|
|
|
@selection-change="selectionLineChangeHandle"> |
|
|
|
<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 v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="selectionLineChangeHandle"> |
|
|
|
<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 label="操作" align="center" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">查看</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="goodsID" label="商品ID" width="120" align="center" /> |
|
|
|
<el-table-column prop="goodsSpuName" label="商品名称" width="150" align="center" /> |
|
|
|
<el-table-column prop="goodsSkuCode" label="商品编码" width="120" align="center" /> |
|
|
|
<el-table-column prop="vinNo" label="车架号" width="150" align="center" /> |
|
|
|
<el-table-column prop="vehMark" label="车牌号" width="150" align="center" /> |
|
|
|
<el-table-column prop="sourceBillNo" label="维修单号" width="190" align="center" /> |
|
|
|
<el-table-column prop="goodsID" label="商品ID" width="120" align="center" /> |
|
|
|
<el-table-column prop="goodsSpuName" label="商品名称" width="150" 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="goodsSkuOwnSpec" 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="warehouseInfo" label="仓库-库区" width="150" align="center" /> |
|
|
|
<el-table-column prop="warehouseRackCode" label="库位" width="120" align="center" /> |
|
|
|
<el-table-column prop="inventoryCount" label="库存数量" width="120" align="center" /> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<!-- End 项目列表 --> |
|
|
|
<div class="pages"> |
|
|
|
<div class="tit" /> |
|
|
|
<div class="tit"/> |
|
|
|
<!-- 翻页 --> |
|
|
|
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
|
|
|
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
|
|
|
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 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" /> |
|
|
|
|
|
|
|
<divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList"/> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import req from '@/api/storage/oldPartsInvertory.js' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
// import divAdd from './oldPartsInStorageAdd.vue' |
|
|
|
import divInfo from './oldPartsInvertoryInfo.vue' |
|
|
|
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: 'danger', |
|
|
|
size: 'small', |
|
|
|
icon: 'del', |
|
|
|
btnKey: 'doDel', |
|
|
|
btnLabel: '删除' |
|
|
|
}, |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import req from '@/api/storage/oldPartsInvertory.js' |
|
|
|
import divInfo from './oldPartsInvertoryInfo.vue' |
|
|
|
|
|
|
|
{ |
|
|
|
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: { |
|
|
|
goodsID: '', |
|
|
|
goodsSpuName: "", |
|
|
|
goodsSkuCode: "", |
|
|
|
warehouseName: "", |
|
|
|
warehouseRackCode: "", |
|
|
|
manufacturerName: "", |
|
|
|
vinNo: "", |
|
|
|
createBySid: "", |
|
|
|
orgPath: "", |
|
|
|
} |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
ButtonBar, |
|
|
|
Pagination, |
|
|
|
divInfo |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
dialogVisible: false, |
|
|
|
btndisabled: false, |
|
|
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|
|
|
isSearchShow: false, |
|
|
|
searchxianshitit: '显示查询条件', |
|
|
|
tableLoading: false, |
|
|
|
dataList: [], |
|
|
|
btnList: [ |
|
|
|
{ |
|
|
|
type: 'danger', |
|
|
|
size: 'small', |
|
|
|
icon: 'del', |
|
|
|
btnKey: 'doDel', |
|
|
|
btnLabel: '删除' |
|
|
|
}, |
|
|
|
sids: [], |
|
|
|
selectionList: [], |
|
|
|
manufacturerList: [], |
|
|
|
warehouseList: [], |
|
|
|
warehouseRackList: [], |
|
|
|
|
|
|
|
{ |
|
|
|
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: { |
|
|
|
goodsID: '', |
|
|
|
goodsSpuName: '', |
|
|
|
goodsSkuCode: '', |
|
|
|
warehouseName: '', |
|
|
|
warehouseRackCode: '', |
|
|
|
manufacturerName: '', |
|
|
|
vinNo: '', |
|
|
|
createBySid: '', |
|
|
|
orgPath: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
sids: [], |
|
|
|
multipleSelection: [], |
|
|
|
warehouseList: [], |
|
|
|
warehouseRackList: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$refs['btnbar'].setButtonList(this.btnList) |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.loadList() |
|
|
|
this.getWarehouseList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 搜索条件效果 |
|
|
|
clicksearchShow() { |
|
|
|
this.isSearchShow = !this.isSearchShow |
|
|
|
if (this.isSearchShow) { |
|
|
|
this.searchxianshitit = '隐藏查询条件' |
|
|
|
} else { |
|
|
|
this.searchxianshitit = '显示查询条件' |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$refs['btnbar'].setButtonList(this.btnList) |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.loadList() |
|
|
|
this.getWarehouseList() |
|
|
|
this.getManufacturerList() |
|
|
|
btnHandle(btnKey) { |
|
|
|
switch (btnKey) { |
|
|
|
case 'doDel': |
|
|
|
this.doDel() |
|
|
|
break |
|
|
|
case 'toBuild': |
|
|
|
this.toBuild() |
|
|
|
break |
|
|
|
case 'doClose': |
|
|
|
this.doClose() |
|
|
|
break |
|
|
|
default: |
|
|
|
break |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|
selectionLineChangeHandle(val) { |
|
|
|
console.log("val", val); |
|
|
|
|
|
|
|
this.selectionList = val |
|
|
|
const aa = [] |
|
|
|
val.forEach(element => { |
|
|
|
aa.push(element.sid) |
|
|
|
}) |
|
|
|
this.sids = aa |
|
|
|
|
|
|
|
}, |
|
|
|
// 搜索条件效果 |
|
|
|
clicksearchShow() { |
|
|
|
this.isSearchShow = !this.isSearchShow |
|
|
|
if (this.isSearchShow) { |
|
|
|
this.searchxianshitit = '隐藏查询条件' |
|
|
|
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 { |
|
|
|
this.searchxianshitit = '显示查询条件' |
|
|
|
// 根据resp.code进行异常情况处理 |
|
|
|
this.dataList = [] |
|
|
|
this.queryParams.total = 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
btnHandle(btnKey) { |
|
|
|
switch (btnKey) { |
|
|
|
case 'doDel': |
|
|
|
this.doDel() |
|
|
|
break |
|
|
|
case 'toBuild': |
|
|
|
this.toBuild() |
|
|
|
break |
|
|
|
case 'doClose': |
|
|
|
this.doClose() |
|
|
|
break |
|
|
|
default: |
|
|
|
break |
|
|
|
} |
|
|
|
}, |
|
|
|
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 { |
|
|
|
// 根据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: { |
|
|
|
goodsID: '', |
|
|
|
goodsSpuName: "", |
|
|
|
goodsSkuCode: "", |
|
|
|
warehouseName: "", |
|
|
|
warehouseRackCode: "", |
|
|
|
manufacturerName: "", |
|
|
|
vinNo: "", |
|
|
|
createBySid: "", |
|
|
|
orgPath: "", |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.tableLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 序号 |
|
|
|
indexMethod(index) { |
|
|
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
|
|
|
var pageindex = index + 1 + pagestart |
|
|
|
return pageindex |
|
|
|
}, |
|
|
|
selectionLineChangeHandle(val) { |
|
|
|
this.multipleSelection = val |
|
|
|
const aa = [] |
|
|
|
val.forEach(element => { |
|
|
|
aa.push(element.sid) |
|
|
|
}) |
|
|
|
this.sids = aa |
|
|
|
}, |
|
|
|
dosearch() { |
|
|
|
this.queryParams.current = 1 |
|
|
|
this.loadList() |
|
|
|
}, |
|
|
|
resetQuery() { |
|
|
|
this.queryParams = { |
|
|
|
current: 1, |
|
|
|
size: 10, |
|
|
|
total: 0, |
|
|
|
params: { |
|
|
|
goodsID: '', |
|
|
|
goodsSpuName: '', |
|
|
|
goodsSkuCode: '', |
|
|
|
warehouseName: '', |
|
|
|
warehouseRackCode: '', |
|
|
|
manufacturerName: '', |
|
|
|
vinNo: '', |
|
|
|
createBySid: '', |
|
|
|
orgPath: '' |
|
|
|
} |
|
|
|
this.loadList() |
|
|
|
}, |
|
|
|
doDel() { |
|
|
|
|
|
|
|
for (var i = 0; i < this.selectionList.length; i++) { |
|
|
|
if (this.selectionList[i].inventoryCount != 0) { |
|
|
|
this.$message({ |
|
|
|
type: 'warning', |
|
|
|
message: "只有库存数量为0的,才可以删除", |
|
|
|
showClose: true |
|
|
|
}) |
|
|
|
} |
|
|
|
this.loadList() |
|
|
|
}, |
|
|
|
doDel() { |
|
|
|
if (this.sids.length > 0) { |
|
|
|
for (var i = 0; i < this.multipleSelection.length; i++) { |
|
|
|
if (this.multipleSelection[i].inventoryCount !== '0') { |
|
|
|
this.$message({ showClose: true, type: 'warning', message: '请选择库存数量为0的记录进行操作' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (this.sids.length > 0) { |
|
|
|
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|
|
|
this.$confirm(tip, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: 'Loading', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
req.deleteBySids(this.sids).then((resp) => { |
|
|
|
loading.close() |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ |
|
|
|
type: 'success', |
|
|
|
message: resp.msg, |
|
|
|
showClose: true |
|
|
|
}) |
|
|
|
this.loadList() |
|
|
|
} else { |
|
|
|
// 根据resp.code进行异常情况处理 |
|
|
|
} |
|
|
|
}).catch(e => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
}).catch(() => {}) |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '请至少选择一条记录进行删除操作' |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
toBuild() { |
|
|
|
|
|
|
|
// if (this.sids.length > 0) { |
|
|
|
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|
|
|
this.$confirm(tip, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
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) => { |
|
|
|
req.deleteBySids(this.sids).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(() => { |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ |
|
|
|
type: 'success', |
|
|
|
message: resp.msg, |
|
|
|
showClose: true |
|
|
|
}) |
|
|
|
this.loadList() |
|
|
|
} else { |
|
|
|
// 根据resp.code进行异常情况处理 |
|
|
|
} |
|
|
|
}).catch(e => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
// } else { |
|
|
|
// this.$message({ |
|
|
|
// type:"warning", |
|
|
|
// showClose: true, |
|
|
|
// message: '请至少选择一条记录进行操作' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
}, |
|
|
|
|
|
|
|
toRelevancy(row) { |
|
|
|
this.viewState = 4 |
|
|
|
this.$refs['divinfo'].showAdd(row) |
|
|
|
}, |
|
|
|
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 |
|
|
|
|
|
|
|
}, |
|
|
|
getManufacturerList() { |
|
|
|
var params = { |
|
|
|
userSid : window.sessionStorage.getItem('userSid'), |
|
|
|
orgPath :window.sessionStorage.getItem('defaultOrgPath'), |
|
|
|
menuUrl : this.$route.path |
|
|
|
} |
|
|
|
req.choiceManufacturer(params).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.manufacturerList = res.data |
|
|
|
|
|
|
|
console.log("aaaaaa", this.manufacturerList); |
|
|
|
|
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
getWarehouseList() { |
|
|
|
var parpams = { |
|
|
|
orgPath: window.sessionStorage.getItem('defaultOrgPath'), |
|
|
|
} |
|
|
|
req.getWarehouses(parpams).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.warehouseList = res.data |
|
|
|
|
|
|
|
console.log("aaaaaa", this.warehouseList); |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录进行删除操作' }) |
|
|
|
} |
|
|
|
}, |
|
|
|
toBuild() { |
|
|
|
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' |
|
|
|
}) |
|
|
|
}, |
|
|
|
getWarehouseAreaList(sid) { |
|
|
|
var query = { |
|
|
|
ckSid: sid |
|
|
|
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() |
|
|
|
}) |
|
|
|
}, |
|
|
|
toRelevancy(row) { |
|
|
|
this.viewState = 4 |
|
|
|
this.$refs['divinfo'].showInfo(row) |
|
|
|
}, |
|
|
|
doClose() { |
|
|
|
this.$store.dispatch('tagsView/delView', this.$route) |
|
|
|
this.$router.go(-1) |
|
|
|
}, |
|
|
|
resetState() { |
|
|
|
this.viewState = 1 |
|
|
|
}, |
|
|
|
getWarehouseList() { |
|
|
|
req.getWarehouses({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.warehouseList = res.data |
|
|
|
} |
|
|
|
req.getWarehouseareas(query).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.warehouseRackList = res.data |
|
|
|
|
|
|
|
console.log("aaaaaa", this.warehouseRackList); |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
warehouseNameSelect(val) { |
|
|
|
console.log("selectWarehouseName", val); |
|
|
|
const choose = this.warehouseList.filter((item) => item.sid == val) |
|
|
|
console.log('>>>>>>>>>selectWarehouseName', choose) |
|
|
|
this.queryParams.params.warehouseName = choose[0].warehouseName |
|
|
|
this.queryParams.params.warehouseSid = choose[0].sid |
|
|
|
|
|
|
|
this.getWarehouseAreaList(choose[0].sid) |
|
|
|
|
|
|
|
}, |
|
|
|
warehouseRackCodeSelect(val) { |
|
|
|
console.log("selectWarehouseAreaCode", val); |
|
|
|
|
|
|
|
const choose = this.warehouseRackList.filter((item) => item.sid == val) |
|
|
|
console.log('>>>>>>>>>selectWarehouseAreaCode', choose) |
|
|
|
this.queryParams.params.warehouseRackCode = choose[0].areaCode |
|
|
|
this.queryParams.params.warehouseRackSid = choose[0].sid |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
getWarehouseAreaList(sid) { |
|
|
|
req.getWarehouseareas({ ckSid: sid }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.warehouseRackList = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
warehouseNameSelect(val) { |
|
|
|
const choose = this.warehouseList.filter((item) => item.sid === val) |
|
|
|
this.queryParams.params.warehouseName = choose[0].warehouseName |
|
|
|
this.queryParams.params.warehouseSid = choose[0].sid |
|
|
|
this.getWarehouseAreaList(choose[0].sid) |
|
|
|
}, |
|
|
|
warehouseRackCodeSelect(val) { |
|
|
|
const choose = this.warehouseRackList.filter((item) => item.sid === val) |
|
|
|
this.queryParams.params.warehouseRackCode = choose[0].areaCode |
|
|
|
this.queryParams.params.warehouseRackSid = choose[0].sid |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
</style> |
|
|
|