Commit 3bcdba65 by yucheng.jiang

储位信息维护

parent 008aad20
......@@ -6308,7 +6308,7 @@ export default {
'5500313': '标准值设置',
'5500314': '',
'5500315': '',
'5500316': '',
'5500316': '储位信息',
'5500317': '',
'5500318': '',
'5500319': '',
......
......@@ -165,16 +165,16 @@ export default {
},
created() {
this.initTableTitle();//获取列表标题
this.initStorage();
this.initWarehouse();
this.tosearch();
this.tableColumns1 = this.$time.initTableTitle(this.tableColumns1);
},
methods: {
//仓库下拉框
initStorage(){
initWarehouse(){
let data = {
page: 1,
pageSize: 1000000,
pagesize: 1000000,
typeid: 0, // 产线层级id
name: '',
};
......@@ -353,11 +353,11 @@ export default {
handlePageSize(value) {
this.page = 1;
this.pagesize = value;
this.tableData1 = this.search(this.page, this.pagesize);
this.search();
},
changePage(value) {
this.page = value;
this.tableData1 = this.search(this.page, this.pagesize);
this.search();
},
handleFormatError(file) {
......
<template>
<div>
<div class="divborder newSearchDiv">
<div class="filter">
<label>{{ $t(8070) }}</label>
<Select v-model="warehouseid" label-in-value clearable filterable filter-by-label @on-change="changeWarehouse" class="searchSelect">
<Option
v-for="(item,index) in whdata"
:value="item.id"
:key="index"
:label="item.name"
>{{ item.name }}</Option
>
</Select>
</div>
<div class="filter">
<label>{{ $t(5500316) }}</label>
<Cascader class="searchSelect" :data="storageTree" change-on-select v-model="storageValue" @on-change="changeStorage"></Cascader>
</div>
<div class="searchBtn">
<Button type="primary" class="twoWord" icon="ios-search" @click="tosearch()">{{ $t(1001) }}</Button>
<!-- <Button type="success" class="twoWord" icon="md-add-circle" @click="add()">{{$t('1002')}}</Button>
<Button type="warning" class="twoWord" icon="ios-create-outline" @click="edit()">{{$t('1003')}}</Button>
<Button type="error" class="twoWord intervalRight" icon="md-close-circle" @click="dele()">{{ $t(1004) }}</Button>
<Button type="primary" class="fourWord" icon="md-download" @click="loadexcel()">{{$t('1005')}}</Button>
<Upload
style="display:inline-block"
ref="upload"
:action="action"
name="excel-file"
:headers="headers"
:show-upload-list="false"
:on-format-error="handleFormatError"
:on-success="handleSuccess"
:on-error="handleError"
:format="['xlsx']"
>
<Button
type="primary"
class="fourWord"
icon="md-cloud-upload"
>{{$t('1006')}}</Button>
</Upload>
<Button type="primary" class="fourWord" icon="ios-cloud-download" @click="Export()">{{$t('1007')}}</Button> -->
</div>
</div>
<div class="divborder newTableDiv">
<Table
class="tableClass"
@on-current-change="handleRowChange"
highlight-row
:data="tableData1"
:columns="tableColumns1"
></Table>
<div class="pageDiv">
<div class="pageDirection">
<Page
:total="total"
:current="page"
@on-change="changePage"
show-elevator
show-sizer
show-total
@on-page-size-change="handlePageSize"
:page-size-opts="[10,20,30,40,100]"
></Page>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data(){
return{
whdata:[],//仓库列表
warehouseid:"",//仓库id
//储位树形结构
storageTree:[],
storageValue:[],//储位数据
storageid:"",//储位id
total:0,
page:1,
pagesize:10,
tableData1:[],
tableColumns1:[
{
type: "index2",
title: this.$t("1008"),
key: "xuhao",
render: (h, params) => {
return h(
"span",
params.index + (this.page - 1) * this.pagesize + 1
);
},
},
{
title:'仓库名称',
key:'warehouse_name'
},
{
title:'储位信息',
key:'storage_info'
},
{
title:'储位ID',
key:'storage_id'
},
{
title:'工装类别',
key:'frock_type'
},
{
title:'工装编号',
key:'frock_code'
},
{
title:'工装名称',
key:'frock_name'
},
{
title:'工装规格',
key:'frock_spec'
},
{
title:'工件编号',
key:'workpiece_code'
},
{
title:'工序顺序',
key:'process_seq'
},
{
title:'工序名称',
key:'process_name'
},
{
title:'物料状态',
key:'material_status'
},
{
title:'备注',
key:'remark'
},
{
title:'附件',
key:'file_url'
},
{
title:'维护人',
key:'user'
},
{
title:'维护时间',
key:'datetime'
}
],
}
},
created(){
this.initWarehouse();//仓库
},
methods:{
//仓库下拉框
initWarehouse(){
let params = {
page: 1,
pagesize: 1000000,
typeid: 0, // 产线层级id
name: '',
};
this.axios.request({
url: "/wms/WaveHouse/GetWaveHouseList",
params,
method: "get",
})
.then((res) => {
this.whdata = [];
this.whdata1 = [];
let data = res.data.data;
if (res.data.ret == 1&&Array.isArray(data)&&data.length) {
this.whdata = res.data.data;
this.whdata1 = res.data.data;
}
});
},
//切换仓库
changeWarehouse(value){
this.storageTree = [];
this.storageid = "";
if(value != undefined){
this.warehouseid = value.value;
this.initStorage();
}
},
//储位
initStorage(){
let params = {
id:this.warehouseid?this.warehouseid:0
}
this.axios.request({
url: "/wms/Location/GetLocationTypeListNoPage",
params,
method: "get",
})
.then((res) => {
if (res.data.ret == 1) {
let arr = res.data.data.children;
this.storageTree = arr;
this.contentTree(arr);
}
});
},
contentTree (arr) {
arr.forEach(ele => {
ele.disabled = false;
ele.value = ele.id;
ele.label = ele.name;
if (
ele.children.length != 0 &&
ele.children != undefined &&
ele.children != null
) {
this.contentTree(ele.children);
}
});
},
//切换储位
changeStorage(value){
this.storageid = "";
if(value!=undefined && value.length){
this.storageid = value[value.length - 1];
}
},
tosearch(){
this.page = 1;
this.pagesize = 10;
this.search();
},
search(){
},
handleRowChange(currentRow, oldCurrentRow) {
this.detailobj = currentRow;
},
handlePageSize(value) {
this.page = 1;
this.pagesize = value;
this.search();
},
changePage(value) {
this.page = value;
this.search();
},
}
}
</script>
<style>
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment