Browse Source

仓库、库位基础信息

master
赵宏斌 7 months ago
parent
commit
179ad4be14
  1. 6
      src/api/warehouse/inventoryPart.js
  2. 3
      src/api/warehouse/location.js
  3. 2
      src/api/warehouse/warehouse.js
  4. 678
      src/views/modules/warehouse/InventoryPart.vue
  5. 687
      src/views/modules/warehouse/PurchasePart.vue
  6. 348
      src/views/modules/warehouse/location.vue
  7. 24
      src/views/modules/warehouse/warehouse.vue

6
src/api/warehouse/inventoryPart.js

@ -0,0 +1,6 @@
import { createAPI } from "@/utils/httpRequest.js";
export const getInventoryStockList = data => createAPI(`warehouse/getInventoryStockList`,'POST',data)
export const getPurchasePartList = data => createAPI(`warehouse/getPurchasePartList`,'POST',data)

3
src/api/warehouse/location.js

@ -12,6 +12,7 @@ export const delLocation = data => createAPI(`warehouse/delLocation`,'POST',data
// 获取库房信息
export const getWarehouseList = data => createAPI(`warehouse/getWarehouseList`,'POST',data)
// 获取位置组信息
export const queryAllLocationGruopList = data => createAPI(`warehouse/queryAllLocationGruopList`,'POST',data)

2
src/api/warehouse/warehouse.js

@ -9,8 +9,6 @@ export const saveWarehouse = data => createAPI(`warehouse/saveWarehouse`,'POST',
// 删除库房信息
export const delWarehouse = data => createAPI(`warehouse/delWarehouse`,'POST',data)
// 删除库房类型信息
export const getWareHouseTypeList = data => createAPI(`factory/tblbasedata/getTblBaseList`,'POST',data)

678
src/views/modules/warehouse/InventoryPart.vue

@ -0,0 +1,678 @@
<template>
<div class="mod-config">
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item label="工厂编码">
<el-input v-model="searchData.site" style="width: 120px"></el-input>
</el-form-item>
<!-- <el-form-item >-->
<!-- <span slot="label" style="" @click="getBaseList(5)"><a herf="#">{{buttons.partNo}}</a></span>-->
<!-- <el-input v-model="searchData.partNo" style="width: 120px" oninput="this.value = this.value.toUpperCase()"></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="物料编码">
<el-input v-model="searchData.partNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="物料名称">
<el-input v-model="searchData.partDesc" style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="规格型号">
<el-input v-model="searchData.spec" style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="新增日期">
<el-date-picker
style="width: 130px"
v-model="searchData.date1"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="至">
<el-date-picker
style="width: 130px"
v-model="searchData.date2"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="在用">
<el-select filterable v-model="searchData.active" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option>
</el-select>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;margin-left: -2px">
<el-form-item>
<el-button @click="getData()" type="primary" style="margin-left: 2px;">查询</el-button>
<!-- <el-button @click="userSetting" type="primary">设置列表</el-button>-->
<el-button v-if="isAuth('sys:setting')" @click="saveColumnList()" type="primary">设置默认配置</el-button>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
导出
</download-excel>
</el-form-item>
</el-form>
<el-table
:height="700"
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="searchData.page"
:page-sizes="[5, 10, 100]"
:page-size="searchData.size"
:total="searchData.total"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 动态列 -->
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {getCRollInfoList} from '@/api/crollinfo/crollinfo.js'
import column from "../common/column";
import Chooselist from '@/views/modules/common/Chooselist';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage
} from "@/api/sysLanguage.js"
import {
saveTableDefaultList,
saveTableUser,
getTableDefaultListLanguage,
getTableUserListLanguage,
removerDefault,
removerUser
} from "@/api/table.js"
import {
searchPartNoDataWithPage,
} from "@/api/base/site.js"
import {
getInventoryStockList
} from "@/api/warehouse/inventoryPart.js"
export default {
name: "searchPartNo",
components: {column,Chooselist},
watch: {
searchData: {
deep: true,
handler: function (newV, oldV) {
this.searchData.partNo = this.searchData.partNo.toUpperCase()
}
}
},
data() {
return {
tagNo:'',
// start
buttonList: [
{
functionId: this.$route.meta.menuId,
languageValue: '设置默认配置',
objectId: 'defaultTable',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '查询',
objectId: 'search',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '导出',
objectId: 'download',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '设置列表',
objectId: 'settingTable',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '工厂编码',
objectId: 'site',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '全部',
objectId: 'all',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '是',
objectId: 'yes',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '否',
objectId: 'no',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '在用',
objectId: 'active',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '物料编码',
objectId: 'partNo',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '物料名称',
objectId: 'partDescription',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '规格型号',
objectId: 'spec',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '新增日期',
objectId: 'newDate',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '至',
objectId: 'to',
objectType: "button",
tableId: "100005Table"
}
],
showDefault:false,
//
sysLanguageParams: [],
dataListLoading: false,
// table
userColumnList: [],
queryTableUser: {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "100005Table",
status: true,
languageCode: this.$i18n.locale
},
buttons:{
defaultTable:'设置默认配置',
search:'查询',
download:'导出',
settingTable: '设置列表',
site:'工厂编码',
active:'在用',
all:'全部',
yes:'是',
no:'否',
partNo:'物料编码',
partDescription:'物料名称',
spec:'规格型号',
newDate:'新增日期',
to:'至',
},
// table
queryTable: {
functionId: this.$route.meta.menuId,
tableId: "100005Table",
languageCode: this.$i18n.locale
},
languageList: [],
queryLanguage: {},
visible:false,
// end
// start
exportData: [],
exportName: "物料编码"+this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["物料编码"],
exportFooter: [],
// end
height: 200,
modelFlag:false,
modelInputFlag:true,
selectList:[],
searchData: {
site:'',
//
page:1,
size:5,
total: 0,
partNo:'',
partDesc:'',
active:'',
spec:'',
date1:'',
date2:'',
user:this.$store.state.user.name,
},
pageIndex: 1,
pageSize: 5,
total: 0,
dataList:[],
columnList: [
{
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '100005TablePartNo',
tableId: "100005Table",
tableName: "查询物料编码表",
columnProp: "partNo",
headerAlign: "center",
align: "left",
columnLabel: "库存件编码",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '100005TablePartDescription',
tableId: "100005Table",
tableName: "查询物料编码表",
columnProp: "partDesc",
headerAlign: "center",
align: "left",
columnLabel: "库存件描述",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 200
},
{
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '100005TableSpec',
tableId: "100005Table",
tableName: "查询物料编码表",
columnProp: "spec",
headerAlign: "center",
align: "left",
columnLabel: "规格型号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '100005TableUmid',
tableId: "100005Table",
tableName: "查询物料编码表",
columnProp: "umId",
headerAlign: "center",
align: "left",
columnLabel: "计量单位",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '100005TableActive',
tableId: "100005Table",
tableName: "查询物料编码表",
columnProp: "active",
headerAlign: "center",
align: "left",
columnLabel: "在用",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 40
},
{
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '100005TableCreateDate',
tableId: "100005Table",
tableName: "查询物料编码表",
columnProp: "createDate",
headerAlign: "center",
align: "left",
columnLabel: "新增日期",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '100005TableSite',
tableId: "100005Table",
tableName: "查询物料编码表",
columnProp: "site",
headerAlign: "center",
align: "left",
columnLabel: "工厂编号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
}
],
//start
loading: false,
pagination: {
page: 1,
pageSize: 200,
total: 0,
},
countTotal: 200,
//end
}
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 180;
this.lazyLoading();
})
},
methods: {
//start
//
getMsgLanguage() {
this.dataListLoading = true
let queryLang = {
functionId: this.$route.meta.menuId,
table_id: '100005Table',
languageCode: this.$i18n.locale
}
searchPageLanguageData(queryLang).then((data) => {
if (data.code == 0) {
this.pageLanguageData = data.data
} else {
}
})
this.dataListLoading = false
},
// button
getFunctionButtonList() {
searchFunctionButtonList(this.queryTable).then(({data}) => {
if (data.code == 0) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
})
},
getBaseData(val){
if (this.tagNo === 5){
this.searchData.partNo = val.PartNo
}
},
//
getBaseList(val){
this.tagNo = val
this.$nextTick(() => {
let strVal = "";
if (val === 5){
strVal = this.searchData.partNo
}
this.$refs.baseList.init(val, strVal);
})
},
//
getSysLanguageParamList() {
searchSysLanguageParam(this.queryTable).then(({data}) => {
this.sysLanguageParams = data.rows
})
},
//
userSetting() {
this.visible = true;
let queryTable = {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "100005Table",
languageCode: this.$i18n.locale
}
this.$nextTick(() => {
this.$refs.column.init(queryTable);
});
},
//
getTableUserColumn() {
getTableUserListLanguage(this.queryTableUser).then(({data}) => {
if (data.rows.length>0) {
//this.columnList = []
this.columnList = data.rows
} else {
this.getColumnList()
}
})
},
//
saveColumnList() {
//
if (this.userColumnList) {
// user
removerUser(this.queryTable)
}
//
removerDefault(this.queryTable)
//
removerLanguage(this.queryTable)
// table
let sumColumnList = this.columnList;
saveTableDefaultList(sumColumnList).then(({data}) => {
})
// button label title
saveButtonList(this.buttonList).then(({data}) => {
})
this.getFunctionButtonList()
this.getColumnList()
},
// tableDefault
getColumnList() {
getTableDefaultListLanguage(this.queryTable).then(({data}) => {
if (data.rows.length>0) {
// this.showDefault = false
this.columnList = data.rows
} else {
// this.showDefault = true
}
})
},
//
sizeChangeHandle(val) {
this.searchData.size = val
this.searchData.page = 1
this.getData()
},
//
currentChangeHandle (val) {
this.searchData.page = val
this.getData()
},
// end
// getData(){
// if((this.searchData.site==null||this.searchData.site=='')&&(this.searchData.partNo==null||this.searchData.partNo=='')&&(this.searchData.partDescription==null||this.searchData.partDescription=='')&&
// (this.searchData.spec==null||this.searchData.spec=='')&&(this.searchData.date1==null||this.searchData.date1=='')&&(this.searchData.date2==null||this.searchData.date2=='')){
// this.$alert("",'',{
// confirmButtonText:''
// })
// return false;
// }
// searchPartNoDataWithPage(this.searchData).then(({data}) => {
// this.dataList = data.rows
// })
// },
//excel
createExportData() {
return this.dataList;
},
startDownload() {
// this.exportData = this.dataList
},
finishDownload() {
},
fields() {
let json = "{"
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
// end
lazyLoading() {
// let dom = document.querySelector(".el-table__body-wrapper");
// dom.addEventListener("scroll", (v) => {
// const scrollDistance = dom.scrollHeight - dom.scrollTop - dom.clientHeight;
// //console.log("-scrollDistance", scrollDistance)
// // if (scrollDistance <= 0) { // 100% scrollDistance 0.201 -0.201
// if (scrollDistance <= 1) {
// //0
// if (this.pagination.page >= this.totalPage) {
// //
// // this.$message.warning("~线 ()");
// }
// if (this.pagination.page < this.totalPage) {
// //
// this.pagination.page++; //
// this.pagination.pageSize = this.countTotal;
// this.getDataListAdd()
// }
// }
// });
},
//
getData(val) {
if((this.searchData.site==null||this.searchData.site=='')&&(this.searchData.partNo==null||this.searchData.partNo=='')&&(this.searchData.partDescription==null||this.searchData.partDescription=='')&&
(this.searchData.spec==null||this.searchData.spec=='')&&(this.searchData.date1==null||this.searchData.date1=='')&&(this.searchData.date2==null||this.searchData.date2=='')){
this.$alert("数据量过大,请至少输入一个查询条件!",'提示',{
confirmButtonText:'确定'
})
return false;
}
this.dataListLoading = true
getInventoryStockList(this.searchData).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.searchData.page = data.page.currPage
this.searchData.size = data.page.pageSize
this.searchData.total = data.page.totalCount
}
this.dataListLoading = false
})
}
},
created() {
this.getTableUserColumn()
this.getSysLanguageParamList()
this.getFunctionButtonList()
this.getMsgLanguage()
}
}
</script>
<style >
.el-textarea__inner {
padding: 5px 5px;
}
</style>

687
src/views/modules/warehouse/PurchasePart.vue

@ -0,0 +1,687 @@
<template>
<div class="mod-config">
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item label="工厂编码">
<el-input v-model="searchData.site" style="width: 120px"></el-input>
</el-form-item>
<!-- <el-form-item >-->
<!-- <span slot="label" style="" @click="getBaseList(5)"><a herf="#">{{buttons.partNo}}</a></span>-->
<!-- <el-input v-model="searchData.partNo" style="width: 120px" oninput="this.value = this.value.toUpperCase()"></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="物料编码">
<el-input v-model="searchData.partNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="物料名称">
<el-input v-model="searchData.partDesc" style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="新增日期">
<el-date-picker
style="width: 130px"
v-model="searchData.date1"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="至">
<el-date-picker
style="width: 130px"
v-model="searchData.date2"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;margin-left: -2px">
<el-form-item>
<el-button @click="getData()" type="primary" style="margin-left: 2px;">查询</el-button>
<!-- <el-button @click="userSetting" type="primary">设置列表</el-button>-->
<el-button v-if="isAuth('sys:setting')" @click="saveColumnList()" type="primary">设置默认配置</el-button>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
导出
</download-excel>
</el-form-item>
</el-form>
<el-table
:height="700"
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="this.searchData.page"
:page-sizes="[100, 200, 500]"
:page-size="this.searchData.size"
:total="this.searchData.total"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 动态列 -->
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {getCRollInfoList} from '@/api/crollinfo/crollinfo.js'
import column from "../common/column";
import Chooselist from '@/views/modules/common/Chooselist';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage
} from "@/api/sysLanguage.js"
import {
saveTableDefaultList,
saveTableUser,
getTableDefaultListLanguage,
getTableUserListLanguage,
removerDefault,
removerUser
} from "@/api/table.js"
import {
searchPartNoDataWithPage,
} from "@/api/base/site.js"
import {
getPurchasePartList
} from "@/api/warehouse/inventoryPart.js"
export default {
name: "searchPartNo",
components: {column,Chooselist},
watch: {
searchData: {
deep: true,
handler: function (newV, oldV) {
this.searchData.partNo = this.searchData.partNo.toUpperCase()
}
}
},
data() {
return {
tagNo:'',
// start
buttonList: [
{
functionId: this.$route.meta.menuId,
languageValue: '设置默认配置',
objectId: 'defaultTable',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '查询',
objectId: 'search',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '导出',
objectId: 'download',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '设置列表',
objectId: 'settingTable',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '工厂编码',
objectId: 'site',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '全部',
objectId: 'all',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '是',
objectId: 'yes',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '否',
objectId: 'no',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '在用',
objectId: 'active',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '物料编码',
objectId: 'partNo',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '物料名称',
objectId: 'partDescription',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '规格型号',
objectId: 'spec',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '新增日期',
objectId: 'newDate',
objectType: "button",
tableId: "100005Table"
},
{
functionId: this.$route.meta.menuId,
languageValue: '至',
objectId: 'to',
objectType: "button",
tableId: "100005Table"
}
],
showDefault:false,
//
sysLanguageParams: [],
dataListLoading: false,
// table
userColumnList: [],
queryTableUser: {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "100005Table",
status: true,
languageCode: this.$i18n.locale
},
buttons:{
defaultTable:'设置默认配置',
search:'查询',
download:'导出',
settingTable: '设置列表',
site:'工厂编码',
active:'在用',
all:'全部',
yes:'是',
no:'否',
partNo:'物料编码',
partDescription:'物料名称',
spec:'规格型号',
newDate:'新增日期',
to:'至',
},
// table
queryTable: {
functionId: this.$route.meta.menuId,
tableId: "100005Table",
languageCode: this.$i18n.locale
},
languageList: [],
queryLanguage: {},
visible:false,
// end
// start
exportData: [],
exportName: "物料编码"+this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["物料编码"],
exportFooter: [],
// end
height: 200,
modelFlag:false,
modelInputFlag:true,
selectList:[],
searchData: {
site:'',
page:1,
size:100,
total:0,
partNo:'',
partDesc:'',
date1:'',
date2:'',
user:this.$store.state.user.name,
},
dataList:[],
columnList: [
{
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '100005TablePartNo',
tableId: "100005Table",
tableName: "查询物料编码表",
columnProp: "partNo",
headerAlign: "center",
align: "left",
columnLabel: "采购件编码",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '100005TablePartDescription',
tableId: "100005Table",
tableName: "查询物料编码表",
columnProp: "partDesc",
headerAlign: "center",
align: "left",
columnLabel: "采购件描述",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 200
},
{
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '100005TableUmid',
tableId: "100005Table",
tableName: "查询物料编码表",
columnProp: "umId",
headerAlign: "center",
align: "left",
columnLabel: "计量单位",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '100005TableCreateDate',
tableId: "100005Table",
tableName: "查询物料编码表",
columnProp: "createDate",
headerAlign: "center",
align: "left",
columnLabel: "新增日期",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '100005TableinventoryPart',
tableId: "100005Table",
tableName: "查询物料编码表",
columnProp: "inventoryPart",
headerAlign: "center",
align: "left",
columnLabel: "库存件",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '100005TableSite',
tableId: "100005Table",
tableName: "查询物料编码表",
columnProp: "site",
headerAlign: "center",
align: "left",
columnLabel: "工厂编号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
}
],
//start
loading: false,
pagination: {
page: 1,
pageSize: 200,
total: 0,
},
totalPage: 5,
countTotal: 200,
//end
}
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 180;
this.lazyLoading();
})
},
methods: {
//start
//
getMsgLanguage() {
this.dataListLoading = true
let queryLang = {
functionId: this.$route.meta.menuId,
table_id: '100005Table',
languageCode: this.$i18n.locale
}
searchPageLanguageData(queryLang).then((data) => {
if (data.code == 0) {
this.pageLanguageData = data.data
} else {
}
})
this.dataListLoading = false
},
// button
getFunctionButtonList() {
searchFunctionButtonList(this.queryTable).then(({data}) => {
if (data.code == 0) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
})
},
getBaseData(val){
if (this.tagNo === 5){
this.searchData.partNo = val.PartNo
}
},
//
getBaseList(val){
this.tagNo = val
this.$nextTick(() => {
let strVal = "";
if (val === 5){
strVal = this.searchData.partNo
}
this.$refs.baseList.init(val, strVal);
})
},
//
getSysLanguageParamList() {
searchSysLanguageParam(this.queryTable).then(({data}) => {
this.sysLanguageParams = data.rows
})
},
//
userSetting() {
this.visible = true;
let queryTable = {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "100005Table",
languageCode: this.$i18n.locale
}
this.$nextTick(() => {
this.$refs.column.init(queryTable);
});
},
//
getTableUserColumn() {
getTableUserListLanguage(this.queryTableUser).then(({data}) => {
if (data.rows.length>0) {
//this.columnList = []
this.columnList = data.rows
} else {
this.getColumnList()
}
})
},
//
saveColumnList() {
//
if (this.userColumnList) {
// user
removerUser(this.queryTable)
}
//
removerDefault(this.queryTable)
//
removerLanguage(this.queryTable)
// table
let sumColumnList = this.columnList;
saveTableDefaultList(sumColumnList).then(({data}) => {
})
// button label title
saveButtonList(this.buttonList).then(({data}) => {
})
this.getFunctionButtonList()
this.getColumnList()
},
// tableDefault
getColumnList() {
getTableDefaultListLanguage(this.queryTable).then(({data}) => {
if (data.rows.length>0) {
// this.showDefault = false
this.columnList = data.rows
} else {
// this.showDefault = true
}
})
},
//
sizeChangeHandle(val) {
this.searchData.size = val
this.searchData.page = 1
this.getData()
},
//
currentChangeHandle (val) {
this.searchData.page = val
this.getData()
},
// end
// getData(){
// if((this.searchData.site==null||this.searchData.site=='')&&(this.searchData.partNo==null||this.searchData.partNo=='')&&(this.searchData.partDescription==null||this.searchData.partDescription=='')&&
// (this.searchData.spec==null||this.searchData.spec=='')&&(this.searchData.date1==null||this.searchData.date1=='')&&(this.searchData.date2==null||this.searchData.date2=='')){
// this.$alert("",'',{
// confirmButtonText:''
// })
// return false;
// }
// searchPartNoDataWithPage(this.searchData).then(({data}) => {
// this.dataList = data.rows
// })
// },
//excel
createExportData() {
return this.dataList;
},
startDownload() {
// this.exportData = this.dataList
},
finishDownload() {
},
fields() {
let json = "{"
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
// end
lazyLoading() {
// let dom = document.querySelector(".el-table__body-wrapper");
// dom.addEventListener("scroll", (v) => {
// const scrollDistance = dom.scrollHeight - dom.scrollTop - dom.clientHeight;
// //console.log("-scrollDistance", scrollDistance)
// // if (scrollDistance <= 0) { // 100% scrollDistance 0.201 -0.201
// if (scrollDistance <= 1) {
// //0
// if (this.pagination.page >= this.totalPage) {
// //
// // this.$message.warning("~线 ()");
// }
// if (this.pagination.page < this.totalPage) {
// //
// this.pagination.page++; //
// this.pagination.pageSize = this.countTotal;
// this.getDataListAdd()
// }
// }
// });
},
//
getDataListAdd(val) {
// this.dataListLoading = true
// let query = {
// parttypeFlag:'R',
// limit: this.pagination.pageSize,
// page: this.pagination.page,
// site:this.searchData.site,
// partNo:this.searchData.partNo,
// partDescription:this.searchData.partDescription,
// active:this.searchData.active,
// spec:this.searchData.spec,
// date1:this.searchData.date1,
// date2:this.searchData.date2,
// user:this.$store.state.user.name,
// }
// searchPartNoDataWithPage(query).then(({data}) => {
// if (data && data.code === 0) {
// let voList = data.page.list
// this.dataList.push(...voList)
// }
// this.dataListLoading = false
// })
},
//
getData(val) {
if((this.searchData.site==null||this.searchData.site=='')&&(this.searchData.partNo==null||this.searchData.partNo=='')&&(this.searchData.partDescription==null||this.searchData.partDescription=='')&&
(this.searchData.spec==null||this.searchData.spec=='')&&(this.searchData.date1==null||this.searchData.date1=='')&&(this.searchData.date2==null||this.searchData.date2=='')){
this.$alert("数据量过大,请至少输入一个查询条件!",'提示',{
confirmButtonText:'确定'
})
return false;
}
this.dataListLoading = true
if (val != 0){
this.pagination.pageSize=200
}
let query = {
parttypeFlag:'R',
limit: this.pagination.pageSize,
page: this.pagination.page,
site:this.searchData.site,
partNo:this.searchData.partNo,
partDescription:this.searchData.partDescription,
active:this.searchData.active,
spec:this.searchData.spec,
date1:this.searchData.date1,
date2:this.searchData.date2,
user:this.$store.state.user.name,
}
getPurchasePartList(this.searchData).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.searchData.page = data.page.currPage
this.searchData.size = data.page.pageSize
this.searchData.total = data.page.totalCount
}
this.dataListLoading = false
})
}
},
created() {
this.getTableUserColumn()
this.getSysLanguageParamList()
this.getFunctionButtonList()
this.getMsgLanguage()
}
}
</script>
<style >
.el-textarea__inner {
padding: 5px 5px;
}
</style>

348
src/views/modules/warehouse/location.vue

@ -7,11 +7,10 @@
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
</span>
</div>
<el-button @click="getDataList()" type="primary">{{buttons.search}}</el-button>
<el-button @click="initModel()" type="primary">{{buttons.add}}</el-button>
<el-button @click="saveColumnList()" type="primary" v-show="showDefault">{{buttons.defaultTable}}
</el-button>
<el-button @click="userSetting" type="primary">{{ buttons.settingTable}}</el-button>
<el-button @click="getDataList()" type="primary">查询</el-button>
<el-button @click="initModel()" type="primary">新增</el-button>
<!-- <el-button @click="saveColumnList()" type="primary" v-show="showDefault">设置默认配置</el-button>-->
<!-- <el-button @click="userSetting" type="primary">设置列表</el-button>-->
<download-excel
:fields="fields()"
:data="exportData"
@ -25,7 +24,7 @@
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{buttons.download}}
导出
</download-excel>
<el-button v-if="isAuth(':prd:delete')" type="danger" @click="deleteHandle()"
@ -98,20 +97,20 @@
header-align="center"
align="center"
width="90"
:label="buttons.cz">
:label="操作">
<template slot-scope="scope">
<a @click="initModel(scope.row)">{{buttons.edit}}</a>
<a @click="delHeaderData(scope.row)">{{buttons.delete}}</a>
<a @click="initModel(scope.row)">编辑</a>
<a @click="delHeaderData(scope.row)">删除</a>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
:current-page="queryHeaderData.page"
:page-sizes="[5, 10, 20]"
:page-size="queryHeaderData.size"
:total="queryHeaderData.totalCount"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</el-col>
@ -122,8 +121,7 @@
:title="inputLabel.headerInput.label5" :visible.sync="setUp.reviewFlag" width="325px">
<el-form :inline="true" label-position="top">
<el-form-item :label="inputLabel.headerInput.label1">
<el-input style="width: 130px;" :readonly="setUp.readonlyFlag?'readonly':false"
oninput="this.value = this.value.toUpperCase()" v-model="saveHeaderData.locationId"></el-input>
<el-input style="width: 130px;" :readonly="setUp.readonlyFlag?'readonly':false" v-model="saveHeaderData.locationId"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label2">
<el-input style="width: 130px;" v-model="saveHeaderData.locationName"></el-input>
@ -131,7 +129,7 @@
</el-form>
<el-form :inline="true" label-position="top">
<el-form-item :label="inputLabel.headerInput.label3">
<el-select v-model="saveHeaderData.warehouseId" placeholder="请选择" style="width: 130px;">
<el-select v-model="saveHeaderData.warehouseId" :disabled="setUp.readonlyFlag?'disabled':false" placeholder="请选择" style="width: 130px;">
<el-option
v-for="item in selectList.select2"
:key="item.value"
@ -141,7 +139,7 @@
</el-select>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label4">
<el-select v-model="saveHeaderData.active" placeholder="请选择" style="width: 130px;">
<el-select v-model="saveHeaderData.active" :disabled="setUp.readonlyFlag?'disabled':false" placeholder="请选择" style="width: 130px;">
<el-option
v-for="item in selectList.select1"
:key="item.value"
@ -150,6 +148,28 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label8">
<el-input style="width: 130px;" :readonly="setUp.readonlyFlag?'readonly':false" v-model="saveHeaderData.hold"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label9">
<el-input style="width: 130px;" :readonly="setUp.readonlyFlag?'readonly':false" v-model="saveHeaderData.row"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label10">
<el-input style="width: 130px;" :readonly="setUp.readonlyFlag?'readonly':false" v-model="saveHeaderData.storey"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label11">
<el-input style="width: 130px;" :readonly="setUp.readonlyFlag?'readonly':false" v-model="saveHeaderData.box"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label6">
<span style="cursor: pointer" slot="label" @click="queryLocationGruop"><a>位置组编码</a></span>
<el-input style="width: 130px;" readonly v-model="saveHeaderData.locationGroupId"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label7">
<el-input style="width: 130px;" readonly v-model="saveHeaderData.locationGroupDesc"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label12">
<el-input style="width: 130px;" readonly v-model="saveHeaderData.locationType"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" :disabled="setUp.saveButton" @click="saveHeaderFunction()">确定</el-button>
@ -158,6 +178,48 @@
</span>
</el-dialog>
<!-- 新增时位置组编码选择dialog-->
<el-dialog title="物料选择" :close-on-click-modal="false" v-drag :visible.sync="localtionGruopFlag" width="520px">
<div class="rq">
<el-form :inline="true" label-position="top" :model="locationGruopModalData">
<el-form-item :label="'物料编码'">
<el-input v-model="locationGruopModalData.locationGroupId" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'物料名称'">
<el-input v-model="locationGruopModalData.locationGroupDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="queryLocationGruop">查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="300"
:data="locationGruopDataList"
@row-dblclick="getRowData"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in locationGruop_colum" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="localtionGruopFlag=false">关闭</el-button>
</el-footer>
</el-dialog>
</div>
</template>
@ -192,6 +254,7 @@
getLocationList,
saveLocation,
delLocation,
queryAllLocationGruopList
} from '@/api/warehouse/location.js'
export default {
@ -205,13 +268,29 @@
locationName: '',
warehouseId: '',
active: '',
locationGroupId: '',
locationGroupDesc: '',
locationType:'',
hold:'',
row:'',
storey:'',
box:'',
},
locationGruopModalData: {
locationGroupId: '',
locationGroupDesc: ''
},
locationGruopDataList: [],
localtionGruopFlag: false,
queryHeaderData: {
site: this.$store.state.user.site,
locationId: '',
locationName: '',
warehouseId: '',
active: '',
page:1,
size:5,
totalCount:0
},
setUp: {
reviewFlag: false,
@ -226,6 +305,13 @@
label3: '仓库名称',
label4: '状态',
label5: '库位信息',
label6: '位置组编码',
label7: '位置组描述',
label8: '货舱',
label9: '行',
label10: '层',
label11: '箱',
label12: '库位类型'
},
},
selectList: {
@ -273,6 +359,56 @@
// table
userColumnList: [],
//
locationGruop_colum:[
{
userId: this.$store.state.user.name,
serialNumber: 'location2601locationGroupId',
tableId: this.$route.meta.menuId + 'LOTI01',
tableName: "locationGruopTable",
columnProp: "locationGroupId",
headerAlign: "center",
align: "center",
columnLabel: "位置组编码",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
serialNumber: 'location2601locationGroupDesc',
tableId: this.$route.meta.menuId + 'LOTI01',
tableName: "locationGruopTable",
columnProp: "locationGroupDesc",
headerAlign: "center",
align: "center",
columnLabel: "位置组描述",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
serialNumber: 'location2601locationType',
tableId: this.$route.meta.menuId + 'LOTI01',
tableName: "locationGruopTable",
columnProp: "locationType",
headerAlign: "center",
align: "center",
columnLabel: "位置组描述",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
}
],
columnList: [
{
userId: this.$store.state.user.name,
@ -338,12 +474,108 @@
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
serialNumber: 'location2601StrlocationGroupDesc',
tableId: this.$route.meta.menuId + 'LOTI01',
tableName: "locationTable",
columnProp: "locationGroupDesc",
headerAlign: "center",
align: "center",
columnLabel: "位置组描述",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
serialNumber: 'location2601StrlocationGroupDesc',
tableId: this.$route.meta.menuId + 'LOTI01',
tableName: "locationTable",
columnProp: "locationType",
headerAlign: "center",
align: "center",
columnLabel: "库房类型",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
serialNumber: 'location2601StrActive',
tableId: this.$route.meta.menuId + 'LOTI01',
tableName: "locationTable",
columnProp: "hold",
headerAlign: "center",
align: "center",
columnLabel: "货舱",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
serialNumber: 'location2601StrActive',
tableId: this.$route.meta.menuId + 'LOTI01',
tableName: "locationTable",
columnProp: "strActive",
columnProp: "row",
headerAlign: "center",
align: "center",
columnLabel: "行",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
serialNumber: 'location2601StrActive',
tableId: this.$route.meta.menuId + 'LOTI01',
tableName: "locationTable",
columnProp: "storey",
headerAlign: "center",
align: "center",
columnLabel: "层",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
serialNumber: 'location2601StrActive',
tableId: this.$route.meta.menuId + 'LOTI01',
tableName: "locationTable",
columnProp: "box",
headerAlign: "center",
align: "center",
columnLabel: "箱",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
serialNumber: 'location2601StrActive',
tableId: this.$route.meta.menuId + 'LOTI01',
tableName: "locationTable",
columnProp: "active",
headerAlign: "center",
align: "center",
columnLabel: "状态",
@ -581,6 +813,7 @@
let jsonData = {
site: row.site,
locationId: row.locationId,
warehouseId: row.warehouseId
}
delLocation(jsonData).then(({data}) => {
if (data.code == 0) {
@ -609,6 +842,31 @@
this.setUp.saveButton = false
return
}
if (!this.saveHeaderData.hold) {
this.$message.warning('请输入货舱!!')
this.setUp.saveButton = false
return
}
if (!this.saveHeaderData.row) {
this.$message.warning('请输入行!')
this.setUp.saveButton = false
return
}
if (!this.saveHeaderData.storey) {
this.$message.warning('请输入层!')
this.setUp.saveButton = false
return
}
if (!this.saveHeaderData.box) {
this.$message.warning('请输入箱!')
this.setUp.saveButton = false
return
}
if (!this.saveHeaderData.locationGroupId) {
this.$message.warning('请选择位置组编码!')
this.setUp.saveButton = false
return
}
saveLocation(this.saveHeaderData).then(({data}) => {
this.setUp.saveButton = false
if (data.code == 0) {
@ -636,6 +894,14 @@
this.saveHeaderData.locationName = ''
this.saveHeaderData.warehouseId = ''
this.saveHeaderData.active = 'Y'
this.saveHeaderData.hide = 'Y'
this.saveHeaderData.locationGroupId = ''
this.saveHeaderData.locationGroupDesc = ''
this.saveHeaderData.hold = ''
this.saveHeaderData.row = ''
this.saveHeaderData.storey = ''
this.saveHeaderData.box = ''
this.saveHeaderData.locationType = ''
if (row) {
console.log("2 =" + row)
this.setUp.readonlyFlag = true
@ -644,7 +910,18 @@
this.saveHeaderData.locationName = row.locationName
this.saveHeaderData.warehouseId = row.warehouseId
this.saveHeaderData.active = row.active
this.saveHeaderData.hold = row.hold
this.saveHeaderData.row = row.row
this.saveHeaderData.storey = row.storey
this.saveHeaderData.box = row.box
this.saveHeaderData.locationGroupId = row.locationGroupId
for (let i = 0; i<this.dataList.length;i++){
if (this.saveHeaderData.locationGroupId == this.dataList[i].locationGroupId){
this.saveHeaderData.locationGroupDesc = this.dataList[i].locationGroupDesc
break;
}
}
this.saveHeaderData.locationType = row.locationType
}
},
//
@ -671,6 +948,21 @@
// LODOP.PREVIEW()
// }
},
queryLocationGruop(){
queryAllLocationGruopList(this.locationGruopModalData).then(({data})=>{
if (data.code==0){
this.$message.success(data.rows)
this.locationGruopDataList = data.rows
this.localtionGruopFlag = true
}
})
},
getRowData(row){
this.saveHeaderData.locationGroupId = row.locationGroupId
this.saveHeaderData.locationGroupDesc = row.locationGroupDesc
this.saveHeaderData.locationType = row.locationType
this.localtionGruopFlag = false
},
//
favoriteIsOk() {
let userFavorite = {
@ -822,27 +1114,27 @@
//
getDataList() {
this.dataListLoading = true
this.queryHeaderData.limit = this.pageSize
this.queryHeaderData.page = this.pageIndex
this.dataList = []
this.totalPage = 0
// this.totalPage = 0
getLocationList(this.queryHeaderData).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.rows.list
this.totalPage = data.rows.totalCount
this.dataList = data.page.list
this.queryHeaderData.page = data.page.currPage
this.queryHeaderData.size = data.page.pageSize
this.queryHeaderData.totalCount = data.page.totalCount
}
this.dataListLoading = false
})
},
//
sizeChangeHandle(val) {
this.pageSize = val
this.pageIndex = 1
this.queryHeaderData.size = val
this.queryHeaderData.page = 1
this.getDataList()
},
//
currentChangeHandle(val) {
this.pageIndex = val
currentChangeHandle (val) {
this.queryHeaderData.page = val
this.getDataList()
},
//

24
src/views/modules/warehouse/warehouse.vue

@ -24,11 +24,11 @@
</el-select>
</el-form-item>
<el-form-item style="margin-top: 20px;">
<el-button @click="getDataList('Y')" type="primary">{{buttons.search}}</el-button>
<el-button @click="getDataList('Y')" type="primary">查询</el-button>
</el-form-item>
<el-form-item style="margin-top: 20px;">
<el-button @click="initModel()" type="primary">{{buttons.add}}</el-button>
<el-button @click="userSetting" type="primary">{{ buttons.settingTable}}</el-button>
<el-button @click="initModel()" type="primary">新增</el-button>
<!-- <el-button @click="userSetting" type="primary">设置列表</el-button>-->
<download-excel
:fields="fields()"
:data="exportData"
@ -42,7 +42,7 @@
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{buttons.download}}
导出
</download-excel>
<el-button v-if="isAuth(':prd:delete')" type="danger" @click="deleteHandle()"
@ -79,17 +79,17 @@
header-align="center"
align="center"
width="90"
:label="buttons.cz">
:label="操作">
<template slot-scope="scope">
<a @click="initModel(scope.row)">{{buttons.edit}}</a>
<a @click="delHeaderData(scope.row)">{{buttons.delete}}</a>
<a @click="initModel(scope.row)">编辑</a>
<a @click="delHeaderData(scope.row)">删除</a>
</template>
</el-table-column>
</el-table>
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column>
<!-- 新增dialog-->
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-drag :title="inputLabel.headerInput.label5" :visible.sync="setUp.reviewFlag" width="325px">
<el-form :inline="true" label-position="top">
<el-form-item :label="inputLabel.headerInput.label1">
@ -122,9 +122,9 @@
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="setUp.reviewFlag = false">取消</el-button>
<el-button type="primary" :disabled="setUp.saveButton" @click="saveHeaderFunction()">确定</el-button>
</span>
<el-button @click="setUp.reviewFlag = false">取消</el-button>
<el-button type="primary" :disabled="setUp.saveButton" @click="saveHeaderFunction()">确定</el-button>
</span>
</el-dialog>
</div>
@ -348,7 +348,7 @@ import {
serialNumber: 'wareHouse2501StrActive',
tableId: this.$route.meta.menuId + 'WAHO01',
tableName: "wareHouseTable",
columnProp: "strActive",
columnProp: "active",
headerAlign: "center",
align: "center",
columnLabel: "状态",

Loading…
Cancel
Save