仓库-批量查看功能完成,样式待调整

This commit is contained in:
2024-04-26 17:59:05 +08:00
parent 8d80085e58
commit f731c79194
8 changed files with 593 additions and 47 deletions

View File

@@ -5,9 +5,9 @@ import request from '@/utils/request'
* 批量查询出库树表
* @param data
*/
export function GetBatchOutRecordTreeTableData(data) {
export function GetBatchTreeTableData(data) {
return request({
url: '/mes/wm/WmGoodsBatchSearch/getBatchOutRecordTreeTableData',
url: '/mes/wm/WmGoodsBatchSearch/getBatchTreeTableData',
method: 'post',
data: data,
})

View File

@@ -434,7 +434,8 @@ export default {
return delWmGoodsOutProduction(Ids)
})
.then(() => {
this.handleQuery()
//this.handleQuery()
this.getList()
this.msgSuccess('删除成功')
})
.catch(() => {})

View File

@@ -1,7 +1,7 @@
<template>
<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="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>
@@ -27,7 +27,7 @@
},
data() {
return {
activeName: '1',
activeName: '2',
total: 0,
}
},

View File

@@ -1,11 +1,11 @@
<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-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>
@@ -13,16 +13,21 @@
</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-table border :header-cell-style="headerCellStyle" :row-style="rowClassStyle" keep-source resizable ref="xTable" :loading="loading" max-height="800" :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="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="{}">
<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>
@@ -37,8 +42,8 @@
<vxe-button @click="editRowEvent(row)">编辑</vxe-button>
</template>
</template>
</vxe-column>
<vxe-column field="entryWarehouseTime" title="入库时间"></vxe-column>
</vxe-column> -->
<vxe-column field="entryWarehouseTime" 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" />
@@ -46,19 +51,13 @@
</template>
<script>
import { Node_patch_search, updateactualInventoryQuantity } from '@/api/wmsManagement/wmGoodsNowProduction.js'
import * as WmGoodsBatchApi from '@/api/wmsManagement/wmGoodsBatchSearch.js'
export default {
name: 'PatchSearch2',
name: 'PatchSearch5',
data() {
return {
labelWidth: '100px',
formLabelWidth: '100px',
// 选中id数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 遮罩层
loading: false,
// 显示搜索条件
@@ -66,11 +65,15 @@
// 查询参数
queryParams: {
partnumber: '',
packageCodeClient_short: '',
packageCode: '',
pageNum: 1,
pageSize: 10,
sort: undefined,
sortType: undefined,
// 查询类别:1-树父节点 2-树子节点
type: 1,
// 聚合模型类别:1-根据批次号 2-根据零件号
model: 1,
// 查询类别:1-入库 2-出库
category: 1
},
dataList: [],
total: 0,
@@ -83,14 +86,35 @@
// 查询数据
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
setTimeout(() => {
this.loading = false
}, 30000)
let data = this.queryParams;
WmGoodsBatchApi.GetBatchTreeTableData(data).then(res => {
if (res.code === 200) {
this.total = res.data.totalNum;
this.dataList = res.data.result;
this.loading = false
} else {
this.loading = false
}
})
},
loadChildrenMethod({ row }) {
return new Promise(resolve => {
const data = {
type: 2,
model: 1,
category: 1,
packageCode: row.packageCodeClient_son,
}
WmGoodsBatchApi.GetBatchTreeTableData(data).then(res => {
if (res.code === 200) {
resolve(res.data.result);
}
})
})
},
//todo 处理搜索请求
handleQuery() {
this.queryParams.pageNum = 1
@@ -98,7 +122,7 @@
},
resetQuery() {
this.queryParams.partnumber = ''
this.queryParams.packageCodeClient_short = ''
this.queryParams.packageCode = ''
},
//todo 修改库存
editRowEvent(row) {
@@ -130,8 +154,32 @@
//this.getList()
})
},
// 表格颜色配置
headerCellStyle({ column }) {
const data = {
backgroundColor: '#C0C4CC',
color: '#303133'
}
return data
},
rowClassStyle({ row, column, rowIndex }) {
let data = {
backgroundColor: '#F2F6FC',
color: '#303133'
}
if (rowIndex % 2 > 0) {
data.backgroundColor = '#EBEEF5'
}
if (row.description === '此零件号不在物料清单内!') {
data.backgroundColor = '#F56C6C';
data.color = '#FFFFFF'
}
return data
},
},
}
</script>
<style lang="scss" scoped></style>
<style scoped>
</style>

View File

@@ -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>

View File

@@ -1,9 +1,185 @@
<template>
<div>入库记录根据零件号</div>
<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="请输入零件号" :clearable="true" />
</el-form-item>
<!-- <el-form-item label="短批次号" prop="packageCodeClient">
<el-input v-model="queryParams.packageCode" 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="800" :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="partnumber" title="零件号" tree-node min-width="100"></vxe-column>
<vxe-column field="description" title="描述" min-width="120"></vxe-column>
<vxe-column field="packageCode" title="批次号" min-width="180"></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="entryWarehouseTime" 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: 'PatchSearch5',
data() {
return {
labelWidth: '100px',
formLabelWidth: '100px',
// 遮罩层
loading: false,
// 显示搜索条件
showSearch: true,
// 查询参数
queryParams: {
partnumber: '',
packageCode: '',
pageNum: 1,
pageSize: 10,
// 查询类别:1-树父节点 2-树子节点
type: 1,
// 聚合模型类别:1-根据批次号 2-根据零件号
model: 2,
// 查询类别:1-入库 2-出库
category: 1
},
dataList: [],
total: 0,
}
},
mounted() {
this.getList()
},
methods: {
// 查询数据
getList() {
this.loading = true
setTimeout(() => {
this.loading = false
}, 30000)
let data = this.queryParams;
WmGoodsBatchApi.GetBatchTreeTableData(data).then(res => {
if (res.code === 200) {
this.total = res.data.totalNum;
this.dataList = res.data.result;
this.loading = false
} else {
this.loading = false
}
})
},
loadChildrenMethod({ row }) {
return new Promise(resolve => {
const data = {
type: 2,
model: 2,
category: 1,
partnumber: row.packageCodeClient_son,
}
WmGoodsBatchApi.GetBatchTreeTableData(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, rowIndex }) {
let data = {
backgroundColor: '#F2F6FC',
color: '#303133'
}
if (rowIndex % 2 > 0) {
data.backgroundColor = '#EBEEF5'
}
if( row.description === '此零件号不在物料清单内!'){
data.backgroundColor = '#F56C6C';
data.color = '#FFFFFF'
}
return data
},
},
}
</script>
<style>
<style scoped>
</style>

View File

@@ -13,7 +13,7 @@
</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="{
<vxe-table border :header-cell-style="headerCellStyle" :row-style="rowClassStyle" keep-source resizable ref="xTable" :loading="loading" max-height="800" :row-config="{isHover: true}" :tree-config="{
transform: true,
rowField: 'packageCodeClient_son',
parentField: 'packageCodeClient_short_parent',
@@ -71,7 +71,9 @@
// 查询类别:1-树父节点 2-树子节点
type: 1,
// 聚合模型类别:1-根据批次号 2-根据零件号
model: 1
model: 1,
// 查询类别:1-入库 2-出库
category: 2
},
dataList: [],
total: 0,
@@ -88,11 +90,13 @@
this.loading = false
}, 30000)
let data = this.queryParams;
WmGoodsBatchApi.GetBatchOutRecordTreeTableData(data).then(res => {
WmGoodsBatchApi.GetBatchTreeTableData(data).then(res => {
if (res.code === 200) {
this.total = res.data.totalNum;
this.dataList = res.data.result;
this.loading = false
} else {
this.loading = false
}
})
},
@@ -101,9 +105,10 @@
const data = {
type: 2,
model: 1,
category: 2,
packageCode: row.packageCodeClient_son
}
WmGoodsBatchApi.GetBatchOutRecordTreeTableData(data).then(res => {
WmGoodsBatchApi.GetBatchTreeTableData(data).then(res => {
if (res.code === 200) {
resolve(res.data.result);
}
@@ -158,16 +163,19 @@
}
return data
},
rowClassStyle({ row, column }) {
rowClassStyle({ row, column, rowIndex }) {
let data = {
backgroundColor: '#F2F6FC',
color: '#303133'
}
if (rowIndex % 2 > 0) {
data.backgroundColor = '#EBEEF5'
}
// if( row.description === '此零件号不在物料清单内!'){
// data.backgroundColor = '#F56C6C';
// data.color = '#FFFFFF'
// }
return data
},
},

View File

@@ -1,9 +1,185 @@
<template>
<div>出库记录根据零件号</div>
<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="请输入零件号" :clearable="true" />
</el-form-item>
<!-- <el-form-item label="短批次号" prop="packageCodeClient">
<el-input v-model="queryParams.packageCode" 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="800" :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="partnumber" title="零件号" tree-node min-width="100"></vxe-column>
<vxe-column field="description" title="描述" min-width="120"></vxe-column>
<vxe-column field="packageCode" title="批次号" min-width="180"></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: 'PatchSearch5',
data() {
return {
labelWidth: '100px',
formLabelWidth: '100px',
// 遮罩层
loading: false,
// 显示搜索条件
showSearch: true,
// 查询参数
queryParams: {
partnumber: '',
packageCode: '',
pageNum: 1,
pageSize: 10,
// 查询类别:1-树父节点 2-树子节点
type: 1,
// 聚合模型类别:1-根据批次号 2-根据零件号
model: 2,
// 查询类别:1-入库 2-出库
category: 2
},
dataList: [],
total: 0,
}
},
mounted() {
this.getList()
},
methods: {
// 查询数据
getList() {
this.loading = true
setTimeout(() => {
this.loading = false
}, 30000)
let data = this.queryParams;
WmGoodsBatchApi.GetBatchTreeTableData(data).then(res => {
if (res.code === 200) {
this.total = res.data.totalNum;
this.dataList = res.data.result;
this.loading = false
} else {
this.loading = false
}
})
},
loadChildrenMethod({ row }) {
return new Promise(resolve => {
const data = {
type: 2,
model: 2,
category: 2,
partnumber: row.packageCodeClient_son,
}
WmGoodsBatchApi.GetBatchTreeTableData(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, rowIndex }) {
let data = {
backgroundColor: '#F2F6FC',
color: '#303133'
}
if (rowIndex % 2 > 0) {
data.backgroundColor = '#EBEEF5'
}
// if( row.description === '此零件号不在物料清单内!'){
// data.backgroundColor = '#F56C6C';
// data.color = '#FFFFFF'
// }
return data
},
},
}
</script>
<style>
<style scoped>
</style>