仓库-仓库批量查看总看板修改
This commit is contained in:
@@ -1,153 +1,45 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
size="small"
|
||||
label-position="right"
|
||||
inline
|
||||
ref="queryForm"
|
||||
:label-width="labelWidth"
|
||||
v-show="showSearch"
|
||||
@submit.native.prevent
|
||||
>
|
||||
<el-form-item label="零件号" prop="partnumber">
|
||||
<el-input v-model="queryParams.partnumber" placeholder="请输入零件号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="短批次号" prop="packageCodeClient">
|
||||
<el-input v-model="queryParams.packageCodeClient_short" placeholder="请输入批次号" />
|
||||
</el-form-item>
|
||||
<el-form-item label=" ">
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<vxe-table
|
||||
keep-source
|
||||
resizable
|
||||
ref="xTable"
|
||||
:tree-config="{ transform: true, rowField: 'packageCodeClient_son', parentField: 'packageCodeClient_short_parent' }"
|
||||
:edit-config="{ trigger: 'manual', mode: 'row' }"
|
||||
:data="dataList"
|
||||
>
|
||||
<vxe-column field="partnumber" title="零件号"></vxe-column>
|
||||
<vxe-column field="description" title="描述"></vxe-column>
|
||||
<vxe-column field="packageCodeClient_son" title="批次号" tree-node></vxe-column>
|
||||
<vxe-column field="locationCode" title="库位编码"></vxe-column>
|
||||
<vxe-column field="pack_num" title="箱数"></vxe-column>
|
||||
<vxe-column field="goodsNumLogic" title="理论库存"></vxe-column>
|
||||
<!-- <vxe-column field="goodsNumAction" title="实际库存"></vxe-column> -->
|
||||
<!-- :edit-config="{ trigger: 'manual', mode: 'row' }" -->
|
||||
<vxe-column field="goodsNumAction" title="实际库存" :edit-render="{}">
|
||||
<template #edit="{ row }">
|
||||
<vxe-input v-model="row.goodsNumAction" type="text"></vxe-input>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column title="操作" width="160">
|
||||
<template #default="{ row }">
|
||||
<template v-if="$refs.xTable.isActiveByRow(row)">
|
||||
<vxe-button @click="saveRowEvent(row)">保存</vxe-button>
|
||||
<vxe-button @click="cancelRowEvent(row)">取消</vxe-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<vxe-button @click="editRowEvent(row)">编辑</vxe-button>
|
||||
</template>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="entryWarehouseTime" title="入库时间"></vxe-column>
|
||||
<vxe-column field="remark" title="备注"></vxe-column>
|
||||
</vxe-table>
|
||||
<pagination class="mt10" background :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
</div>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="仓库数据总看板" name="1"><TAB1 v-if="activeName === '1'"></TAB1></el-tab-pane>
|
||||
<el-tab-pane label="入库记录根据批次号" name="2"><TAB2 v-if="activeName === '2'"></TAB2></el-tab-pane>
|
||||
<el-tab-pane label="入库记录根据零件号" name="3"><TAB3 v-if="activeName === '3'"></TAB3></el-tab-pane>
|
||||
<el-tab-pane label="出库记录根据批次号" name="4"><TAB4 v-if="activeName === '4'"></TAB4></el-tab-pane>
|
||||
<el-tab-pane label="出库记录根据零件号" name="5"><TAB5 v-if="activeName === '5'"></TAB5></el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Node_patch_search, updateactualInventoryQuantity } from '@/api/wmsManagement/wmGoodsNowProduction.js'
|
||||
export default {
|
||||
name: 'WmpatchSearch',
|
||||
data() {
|
||||
return {
|
||||
labelWidth: '100px',
|
||||
formLabelWidth: '100px',
|
||||
// 选中id数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
partnumber: '',
|
||||
packageCodeClient_short: '',
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sort: undefined,
|
||||
sortType: undefined,
|
||||
},
|
||||
dataList: [],
|
||||
total: 0,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 查询数据
|
||||
getList() {
|
||||
this.loading = true
|
||||
Node_patch_search(this.queryParams).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.dataList = res.data.item1
|
||||
this.total = res.data.item2
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
//todo 处理搜索请求
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams.partnumber = ''
|
||||
this.queryParams.packageCodeClient_short = ''
|
||||
},
|
||||
//todo 修改库存
|
||||
editRowEvent(row) {
|
||||
const $table = this.$refs.xTable
|
||||
$table.setActiveRow(row)
|
||||
},
|
||||
saveRowEvent(row) {
|
||||
const $table = this.$refs.xTable
|
||||
$table
|
||||
.clearActived()
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
//提交修改
|
||||
const query = { id: row.id, stack_num: row.goodsNumAction }
|
||||
return updateactualInventoryQuantity(query)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 200 && res.data > 0) {
|
||||
this.$notify.success('修改成功')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
cancelRowEvent(row) {
|
||||
const $table = this.$refs.xTable
|
||||
$table.clearActived().then(() => {
|
||||
// 还原行数据
|
||||
$table.revertData(row)
|
||||
//this.getList()
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
import TAB1 from './components/TheWmBatchSearch/仓库数据总看板/index.vue';
|
||||
import TAB2 from './components/TheWmBatchSearch/入库记录根据批次号/index.vue';
|
||||
import TAB3 from './components/TheWmBatchSearch/入库记录根据零件号/index.vue';
|
||||
import TAB4 from './components/TheWmBatchSearch/出库记录根据批次号/index.vue';
|
||||
import TAB5 from './components/TheWmBatchSearch/出库记录根据零件号/index.vue';
|
||||
export default {
|
||||
name: 'WmpatchSearch',
|
||||
components: {
|
||||
TAB1,
|
||||
TAB2,
|
||||
TAB3,
|
||||
TAB4,
|
||||
TAB5
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: '1',
|
||||
total: 0,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
// console.log(tab, event);
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<div>仓库数据总看板</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" size="small" label-position="right" inline ref="queryForm" :label-width="labelWidth" v-show="showSearch" @submit.native.prevent>
|
||||
<el-form-item label="零件号" prop="partnumber">
|
||||
<el-input v-model="queryParams.partnumber" placeholder="请输入零件号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="短批次号" prop="packageCodeClient">
|
||||
<el-input v-model="queryParams.packageCodeClient_short" placeholder="请输入批次号" />
|
||||
</el-form-item>
|
||||
<el-form-item label=" ">
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<vxe-table keep-source resizable ref="xTable" :tree-config="{ transform: true, rowField: 'packageCodeClient_son', parentField: 'packageCodeClient_short_parent' }" :edit-config="{ trigger: 'manual', mode: 'row' }" :data="dataList">
|
||||
<vxe-column field="partnumber" title="零件号"></vxe-column>
|
||||
<vxe-column field="description" title="描述"></vxe-column>
|
||||
<vxe-column field="packageCodeClient_son" title="批次号" tree-node></vxe-column>
|
||||
<vxe-column field="locationCode" title="库位编码"></vxe-column>
|
||||
<vxe-column field="pack_num" title="箱数"></vxe-column>
|
||||
<vxe-column field="goodsNumLogic" title="理论库存"></vxe-column>
|
||||
<!-- <vxe-column field="goodsNumAction" title="实际库存"></vxe-column> -->
|
||||
<!-- :edit-config="{ trigger: 'manual', mode: 'row' }" -->
|
||||
<vxe-column field="goodsNumAction" title="实际库存" :edit-render="{}">
|
||||
<template #edit="{ row }">
|
||||
<vxe-input v-model="row.goodsNumAction" type="text"></vxe-input>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column title="操作" width="160">
|
||||
<template #default="{ row }">
|
||||
<template v-if="$refs.xTable.isActiveByRow(row)">
|
||||
<vxe-button @click="saveRowEvent(row)">保存</vxe-button>
|
||||
<vxe-button @click="cancelRowEvent(row)">取消</vxe-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<vxe-button @click="editRowEvent(row)">编辑</vxe-button>
|
||||
</template>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="entryWarehouseTime" title="入库时间"></vxe-column>
|
||||
<vxe-column field="remark" title="备注"></vxe-column>
|
||||
</vxe-table>
|
||||
<pagination class="mt10" background :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Node_patch_search, updateactualInventoryQuantity } from '@/api/wmsManagement/wmGoodsNowProduction.js'
|
||||
export default {
|
||||
name: 'PatchSearch2',
|
||||
data() {
|
||||
return {
|
||||
labelWidth: '100px',
|
||||
formLabelWidth: '100px',
|
||||
// 选中id数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
partnumber: '',
|
||||
packageCodeClient_short: '',
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sort: undefined,
|
||||
sortType: undefined,
|
||||
},
|
||||
dataList: [],
|
||||
total: 0,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 查询数据
|
||||
getList() {
|
||||
this.loading = true
|
||||
Node_patch_search(this.queryParams).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.dataList = res.data.item1
|
||||
this.total = res.data.item2
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
//todo 处理搜索请求
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams.partnumber = ''
|
||||
this.queryParams.packageCodeClient_short = ''
|
||||
},
|
||||
//todo 修改库存
|
||||
editRowEvent(row) {
|
||||
const $table = this.$refs.xTable
|
||||
$table.setActiveRow(row)
|
||||
},
|
||||
saveRowEvent(row) {
|
||||
const $table = this.$refs.xTable
|
||||
$table
|
||||
.clearActived()
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
//提交修改
|
||||
const query = { id: row.id, stack_num: row.goodsNumAction }
|
||||
return updateactualInventoryQuantity(query)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 200 && res.data > 0) {
|
||||
this.$notify.success('修改成功')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
cancelRowEvent(row) {
|
||||
const $table = this.$refs.xTable
|
||||
$table.clearActived().then(() => {
|
||||
// 还原行数据
|
||||
$table.revertData(row)
|
||||
//this.getList()
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<div>入库记录根据零件号</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -0,0 +1,178 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" size="small" label-position="right" inline ref="queryForm" :label-width="labelWidth" v-show="showSearch" @submit.native.prevent>
|
||||
<el-form-item label="短批次号" prop="packageCodeClient">
|
||||
<el-input v-model="queryParams.packageCode" placeholder="请输入批次号" :clearable="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="零件号" prop="partnumber">
|
||||
<el-input v-model="queryParams.partnumber" placeholder="请输入零件号" :clearable="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label=" ">
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<vxe-table border :header-cell-style="headerCellStyle" :row-style="rowClassStyle" keep-source resizable ref="xTable" :loading="loading" max-height="600" :row-config="{isHover: true}" :tree-config="{
|
||||
transform: true,
|
||||
rowField: 'packageCodeClient_son',
|
||||
parentField: 'packageCodeClient_short_parent',
|
||||
lazy: true,
|
||||
hasChild: 'hasChild',
|
||||
loadMethod: loadChildrenMethod }" :edit-config="{ trigger: 'manual', mode: 'row' }" :data="dataList">
|
||||
<vxe-column field="packageCode" title="批次号" tree-node min-width="180"></vxe-column>
|
||||
<vxe-column field="partnumber" title="零件号" min-width="100"></vxe-column>
|
||||
<vxe-column field="description" title="描述" min-width="120"></vxe-column>
|
||||
<vxe-column field="locationCode" title="库位编码"></vxe-column>
|
||||
<vxe-column field="packageNum" title="箱数"></vxe-column>
|
||||
<vxe-column field="goodsNumAction" title="库存">
|
||||
</vxe-column>
|
||||
<!-- <vxe-column field="goodsNumAction" title="库存" :edit-render="{}">
|
||||
<template #edit="{ row }">
|
||||
<vxe-input v-model="row.goodsNumAction" type="text"></vxe-input>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column title="操作" width="160">
|
||||
<template #default="{ row }">
|
||||
<template v-if="$refs.xTable.isActiveByRow(row)">
|
||||
<vxe-button @click="saveRowEvent(row)">保存</vxe-button>
|
||||
<vxe-button @click="cancelRowEvent(row)">取消</vxe-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<vxe-button @click="editRowEvent(row)">编辑</vxe-button>
|
||||
</template>
|
||||
</template>
|
||||
</vxe-column> -->
|
||||
<vxe-column field="outTime" title="出库时间" min-width="120"></vxe-column>
|
||||
<vxe-column field="remark" title="备注"></vxe-column>
|
||||
</vxe-table>
|
||||
<pagination class="mt10" background :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as WmGoodsBatchApi from '@/api/wmsManagement/wmGoodsBatchSearch.js'
|
||||
export default {
|
||||
name: 'PatchSearch4',
|
||||
data() {
|
||||
return {
|
||||
labelWidth: '100px',
|
||||
formLabelWidth: '100px',
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
partnumber: '',
|
||||
packageCode: '',
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
// 查询类别:1-树父节点 2-树子节点
|
||||
type: 1,
|
||||
// 聚合模型类别:1-根据批次号 2-根据零件号
|
||||
model: 1
|
||||
},
|
||||
dataList: [],
|
||||
total: 0,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 查询数据
|
||||
getList() {
|
||||
this.loading = true
|
||||
setTimeout(() => {
|
||||
this.loading = false
|
||||
}, 30000)
|
||||
let data = this.queryParams;
|
||||
WmGoodsBatchApi.GetBatchOutRecordTreeTableData(data).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.total = res.data.totalNum;
|
||||
this.dataList = res.data.result;
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
loadChildrenMethod({ row }) {
|
||||
return new Promise(resolve => {
|
||||
const data = {
|
||||
type: 2,
|
||||
model: 1,
|
||||
packageCode: row.packageCodeClient_son
|
||||
}
|
||||
WmGoodsBatchApi.GetBatchOutRecordTreeTableData(data).then(res => {
|
||||
if (res.code === 200) {
|
||||
resolve(res.data.result);
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
//todo 处理搜索请求
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams.partnumber = ''
|
||||
this.queryParams.packageCode = ''
|
||||
},
|
||||
//todo 修改库存
|
||||
editRowEvent(row) {
|
||||
const $table = this.$refs.xTable
|
||||
$table.setActiveRow(row)
|
||||
},
|
||||
saveRowEvent(row) {
|
||||
const $table = this.$refs.xTable
|
||||
$table
|
||||
.clearActived()
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
//提交修改
|
||||
const query = { id: row.id, stack_num: row.goodsNumAction }
|
||||
return updateactualInventoryQuantity(query)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 200 && res.data > 0) {
|
||||
this.$notify.success('修改成功')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
cancelRowEvent(row) {
|
||||
const $table = this.$refs.xTable
|
||||
$table.clearActived().then(() => {
|
||||
// 还原行数据
|
||||
$table.revertData(row)
|
||||
//this.getList()
|
||||
})
|
||||
},
|
||||
// 表格颜色配置
|
||||
headerCellStyle({ column }) {
|
||||
const data = {
|
||||
backgroundColor: '#C0C4CC',
|
||||
color: '#303133'
|
||||
}
|
||||
return data
|
||||
},
|
||||
rowClassStyle({ row, column }) {
|
||||
let data = {
|
||||
backgroundColor: '#F2F6FC',
|
||||
color: '#303133'
|
||||
}
|
||||
// if( row.description === '此零件号不在物料清单内!'){
|
||||
// data.backgroundColor = '#F56C6C';
|
||||
// data.color = '#FFFFFF'
|
||||
// }
|
||||
|
||||
return data
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<div>出库记录根据零件号</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user