mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-29 04:51:58 +08:00
新增DataSelect组件
This commit is contained in:
@@ -9,10 +9,11 @@ export function listBaseStock(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// TODO 查询基本库存详细 主键需要注意
|
||||
export function getBaseStock(whsCd) {
|
||||
// 询基本库存详细
|
||||
export function getBaseStock(data) {
|
||||
return request({
|
||||
url: '/wms/BaseStock/' + whsCd,
|
||||
method: 'get'
|
||||
url: '/wms/BaseStock/getInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
26
ruoyi-ui/src/api/wms/InvTransHis.js
Normal file
26
ruoyi-ui/src/api/wms/InvTransHis.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询入出库履历列表
|
||||
export function listInvTransHis(query) {
|
||||
return request({
|
||||
url: '/wms/InvTransHis/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询入出库履历详细
|
||||
export function getInvTransHis(invTransNo) {
|
||||
return request({
|
||||
url: '/wms/InvTransHis/' + invTransNo,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除入出库履历
|
||||
export function delInvTransHis(invTransNo) {
|
||||
return request({
|
||||
url: '/wms/InvTransHis/' + invTransNo,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
111
ruoyi-ui/src/components/DataSelect/index.vue
Normal file
111
ruoyi-ui/src/components/DataSelect/index.vue
Normal file
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-select
|
||||
v-model="selectedValue"
|
||||
:placeholder="placeholder"
|
||||
:clearable="clearable"
|
||||
@change="handleChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dataOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getDicts } from '@/api/system/dict/data'
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emit = defineEmits();
|
||||
|
||||
const props = defineProps({
|
||||
// v-model
|
||||
modelValue: {
|
||||
type: [String, Number],
|
||||
required: false,
|
||||
},
|
||||
// 直接自定义选项
|
||||
options: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
// 获取数据的方法
|
||||
fetchData: {
|
||||
type: Function,
|
||||
required: false,
|
||||
},
|
||||
// 字典名称
|
||||
dictName: {
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
// 提示文本
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
// 是否能够清空选项
|
||||
clearable: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
});
|
||||
|
||||
const dataOptions = ref([]);
|
||||
const selectedValue = ref(null);
|
||||
|
||||
// v-model双向绑定:更新父组件的值
|
||||
function handleChange(value) {
|
||||
emit('update:modelValue', value);
|
||||
}
|
||||
|
||||
// v-model双向绑定:更新子组件的值
|
||||
watch(() => props.modelValue, (value) => {
|
||||
selectedValue.value = value;
|
||||
});
|
||||
|
||||
// 获取数据
|
||||
async function doFetchData() {
|
||||
if (props.options instanceof Array && props.options.length > 0) {
|
||||
// 如果是直接自定义选项,则直接使用
|
||||
dataOptions.value = props.options;
|
||||
} else if (props.fetchData) {
|
||||
// 如果是通过方法获取数据,则调用方法获取数据
|
||||
const dataList = await props.fetchData();
|
||||
dataList.map((item) => {
|
||||
dataOptions.value.push({
|
||||
label: item.label,
|
||||
value: item.value,
|
||||
});
|
||||
});
|
||||
} else if (props.dictName) {
|
||||
// 如果是字典类型,则从字典中获取数据
|
||||
const dicts = proxy.useDict(props.dictName);
|
||||
let list = dicts[props.dictName]._object[props.dictName];
|
||||
if (list.length > 0) {
|
||||
//已经缓存过字典数据
|
||||
list.map((item) => {
|
||||
dataOptions.value.push({
|
||||
label: item.label,
|
||||
value: item.value,
|
||||
});
|
||||
});
|
||||
} else {
|
||||
//没有缓存过字典数据
|
||||
const response = await getDicts(props.dictName);
|
||||
response.data.map((item) => {
|
||||
dataOptions.value.push({
|
||||
label: item.dictLabel,
|
||||
value: item.dictValue,
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
doFetchData()
|
||||
|
||||
</script>
|
||||
@@ -4,7 +4,7 @@
|
||||
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top" v-if="search">
|
||||
<el-button circle icon="Search" @click="toggleSearch()" />
|
||||
</el-tooltip>
|
||||
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
|
||||
<el-tooltip class="item" effect="dark" content="刷新" placement="top" v-if="showRefresh">
|
||||
<el-button circle icon="Refresh" @click="refresh()" />
|
||||
</el-tooltip>
|
||||
<el-tooltip class="item" effect="dark" content="显隐列" placement="top" v-if="columns">
|
||||
@@ -60,6 +60,11 @@ const props = defineProps({
|
||||
type: Number,
|
||||
default: 10,
|
||||
},
|
||||
/* 是否显示刷新图标 */
|
||||
showRefresh: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
})
|
||||
|
||||
const emits = defineEmits(['update:showSearch', 'queryTable']);
|
||||
|
||||
@@ -24,7 +24,10 @@ import elementIcons from '@/components/SvgIcon/svgicon'
|
||||
|
||||
import './permission' // permission control
|
||||
|
||||
//字典
|
||||
import { useDict } from '@/utils/dict'
|
||||
import { optionselect } from '@/api/system/dict/type'
|
||||
|
||||
import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi'
|
||||
|
||||
// 分页组件
|
||||
@@ -45,6 +48,8 @@ import TreeSelect from '@/components/TreeSelect'
|
||||
import DictTag from '@/components/DictTag'
|
||||
// FilePond文件上传组件
|
||||
import FpFileUpload from '@/components/FpFileUpload'
|
||||
// 自定义下拉选项组件
|
||||
import DataSelect from '@/components/DataSelect'
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
@@ -68,6 +73,7 @@ app.component('ImagePreview', ImagePreview)
|
||||
app.component('RightToolbar', RightToolbar)
|
||||
app.component('Editor', Editor)
|
||||
app.component('FpFileUpload', FpFileUpload)
|
||||
app.component('DataSelect', DataSelect)
|
||||
|
||||
app.use(router)
|
||||
app.use(store)
|
||||
|
||||
@@ -113,7 +113,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 30,
|
||||
fileId: null,
|
||||
savedName: null,
|
||||
originalName: null,
|
||||
|
||||
@@ -308,7 +308,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
jobName: undefined,
|
||||
jobGroup: undefined,
|
||||
status: undefined
|
||||
|
||||
@@ -191,7 +191,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
dictName: undefined,
|
||||
dictType: undefined,
|
||||
status: undefined
|
||||
|
||||
@@ -62,7 +62,7 @@ const onlineList = ref([]);
|
||||
const loading = ref(true);
|
||||
const total = ref(0);
|
||||
const pageNum = ref(1);
|
||||
const pageSize = ref(10);
|
||||
const pageSize = ref(30);
|
||||
|
||||
const queryParams = ref({
|
||||
ipaddr: undefined,
|
||||
|
||||
@@ -170,7 +170,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
seqDistCd: null,
|
||||
ruleName: null,
|
||||
},
|
||||
|
||||
@@ -185,7 +185,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
configName: undefined,
|
||||
configKey: undefined,
|
||||
configType: undefined
|
||||
|
||||
@@ -209,7 +209,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
dictType: undefined,
|
||||
dictLabel: undefined,
|
||||
status: undefined
|
||||
|
||||
@@ -193,7 +193,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
dictName: undefined,
|
||||
dictType: undefined,
|
||||
status: undefined
|
||||
|
||||
@@ -140,7 +140,7 @@ const defaultSort = ref({ prop: "accessTime", order: "descending" });
|
||||
// 查询参数
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
ipaddr: undefined,
|
||||
userName: undefined,
|
||||
status: undefined,
|
||||
|
||||
@@ -178,7 +178,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
noticeTitle: undefined,
|
||||
createBy: undefined,
|
||||
status: undefined
|
||||
|
||||
@@ -220,7 +220,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
operIp: undefined,
|
||||
title: undefined,
|
||||
operName: undefined,
|
||||
|
||||
@@ -164,7 +164,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
postCode: undefined,
|
||||
postName: undefined,
|
||||
status: undefined
|
||||
|
||||
@@ -108,7 +108,7 @@ const userIds = ref([]);
|
||||
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
roleId: route.params.roleId,
|
||||
userName: undefined,
|
||||
phonenumber: undefined,
|
||||
|
||||
@@ -282,7 +282,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
roleName: undefined,
|
||||
roleKey: undefined,
|
||||
status: undefined
|
||||
|
||||
@@ -79,7 +79,7 @@ const userIds = ref([]);
|
||||
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
roleId: undefined,
|
||||
userName: undefined,
|
||||
phonenumber: undefined
|
||||
|
||||
@@ -54,7 +54,7 @@ const { proxy } = getCurrentInstance();
|
||||
const loading = ref(true);
|
||||
const total = ref(0);
|
||||
const pageNum = ref(1);
|
||||
const pageSize = ref(10);
|
||||
const pageSize = ref(30);
|
||||
const roleIds = ref([]);
|
||||
const roles = ref([]);
|
||||
const form = ref({
|
||||
|
||||
@@ -382,7 +382,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
userName: undefined,
|
||||
phonenumber: undefined,
|
||||
status: undefined,
|
||||
|
||||
@@ -59,7 +59,7 @@ const { proxy } = getCurrentInstance();
|
||||
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
tableName: undefined,
|
||||
tableComment: undefined
|
||||
});
|
||||
|
||||
@@ -171,7 +171,7 @@ const uniqueId = ref("");
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
tableName: undefined,
|
||||
tableComment: undefined
|
||||
},
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="仓库代码" prop="whsCd">
|
||||
<el-input
|
||||
v-model="queryParams.whsCd"
|
||||
placeholder="请输入仓库代码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
<el-form-item label="仓库" prop="whsCd">
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.whsCd"-->
|
||||
<!-- placeholder="请输入仓库代码"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter="handleQuery"-->
|
||||
<!-- />-->
|
||||
<data-select v-model="queryParams.whsCd" :fetch-data="fetchWarehouseData" />
|
||||
</el-form-item>
|
||||
<el-form-item label="货架号" prop="stgBinCd">
|
||||
<el-input
|
||||
@@ -36,40 +37,40 @@
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleInstock"
|
||||
v-hasPermi="['wms:BaseStock:instock']"
|
||||
>入库</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleOutstock"
|
||||
v-hasPermi="['wms:BaseStock:outstock']"
|
||||
>出库</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['wms:BaseStock:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['wms:BaseStock:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="Plus"-->
|
||||
<!-- @click="handleInstock"-->
|
||||
<!-- v-hasPermi="['wms:BaseStock:instock']"-->
|
||||
<!-- >入库</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="Edit"-->
|
||||
<!-- :disabled="single"-->
|
||||
<!-- @click="handleOutstock"-->
|
||||
<!-- v-hasPermi="['wms:BaseStock:outstock']"-->
|
||||
<!-- >出库</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
@@ -118,7 +119,9 @@
|
||||
</template>
|
||||
|
||||
<script setup name="BaseStock">
|
||||
import { listBaseStock, getBaseStock } from "@/api/wms/BaseStock";
|
||||
import { listBaseStock, getBaseStock } from "@/api/wms/BaseStock"
|
||||
import { listWarehouseInfo } from "@/api/wms/WarehouseInfo";
|
||||
import DataSelect from "@/components/DataSelect/index.vue";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
@@ -136,7 +139,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 30,
|
||||
whsCd: null,
|
||||
stgBinCd: null,
|
||||
itemCd: null,
|
||||
@@ -206,38 +209,45 @@ function resetQuery() {
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// TODO 多选框选中数据 需要修改主键
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(item => item.whsCd);
|
||||
ids.value = selection.map(item => {
|
||||
return {
|
||||
whsCd: item.whsCd,
|
||||
stgBinCd: item.stgBinCd,
|
||||
itemCd: item.itemCd,
|
||||
lotNo: item.lotNo,
|
||||
subLotNo: item.subLotNo,
|
||||
};
|
||||
});
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 入库按钮操作 */
|
||||
function handleInstock() {
|
||||
proxy.$modal.msg("开发中...");
|
||||
// reset();
|
||||
// open.value = true;
|
||||
// title.value = "入库";
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "入库";
|
||||
}
|
||||
|
||||
/** 出库按钮操作 */
|
||||
function handleOutstock(row) {
|
||||
proxy.$modal.msg("开发中...");
|
||||
// reset();
|
||||
// const _whsCd = row.whsCd || ids.value
|
||||
// getBaseStock(_whsCd).then(response => {
|
||||
// form.value = response.data;
|
||||
// open.value = true;
|
||||
// title.value = "出库";
|
||||
// });
|
||||
function handleOutstock() {
|
||||
reset();
|
||||
let primaryKey = ids.value[0]
|
||||
getBaseStock(primaryKey).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "出库";
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
//TODO 未完成
|
||||
proxy.$refs["BaseStockRef"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.whsCd != null) {
|
||||
if (form.value.deptId != null) {
|
||||
// instock(form.value).then(response => {
|
||||
// proxy.$modal.msgSuccess("出库成功");
|
||||
// open.value = false;
|
||||
@@ -261,6 +271,19 @@ function handleExport() {
|
||||
}, `BaseStock_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
// 获取仓库数据
|
||||
async function fetchWarehouseData() {
|
||||
const response = await listWarehouseInfo({})
|
||||
const dataList = []
|
||||
response.rows.map(item => {
|
||||
dataList.push({
|
||||
label: item.whsName,
|
||||
value: item.whsCd,
|
||||
})
|
||||
})
|
||||
return dataList
|
||||
}
|
||||
|
||||
//页面打开时查询
|
||||
//getList();
|
||||
</script>
|
||||
|
||||
234
ruoyi-ui/src/views/wms/InvTransHis/index.vue
Normal file
234
ruoyi-ui/src/views/wms/InvTransHis/index.vue
Normal file
@@ -0,0 +1,234 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="85px">
|
||||
<el-form-item label="入出库类型" prop="invTransType">
|
||||
<data-select v-model="queryParams.invTransType" dict-name="wms_inv_trans_type" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="whsCd">
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.whsCd"-->
|
||||
<!-- placeholder="请输入仓库代码"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter="handleQuery"-->
|
||||
<!-- />-->
|
||||
<data-select v-model="queryParams.whsCd" :fetch-data="fetchWarehouseData" />
|
||||
</el-form-item>
|
||||
<el-form-item label="货架号" prop="stgBinCd">
|
||||
<el-input
|
||||
v-model="queryParams.stgBinCd"
|
||||
placeholder="请输入货架号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物品代码" prop="itemCd">
|
||||
<el-input
|
||||
v-model="queryParams.itemCd"
|
||||
placeholder="请输入物品代码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批号" prop="lotNo">
|
||||
<el-input
|
||||
v-model="queryParams.lotNo"
|
||||
placeholder="请输入批号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['wms:InvTransHis:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="InvTransHisList" @selection-change="handleSelectionChange" :show-overflow-tooltip="true">
|
||||
<el-table-column type="selection" width="30" align="center" />
|
||||
<el-table-column label="入出库履历号" align="center" prop="invTransNo" />
|
||||
<el-table-column label="入出库类型" align="center" prop="invTransType" >
|
||||
<template #default="scope">
|
||||
<dict-tag :options="wms_inv_trans_type" :value="scope.row.invTransType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="存储位置" align="center" >
|
||||
<el-table-column label="仓库代码" align="center" prop="whsCd" />
|
||||
<el-table-column label="货架号" align="center" prop="stgBinCd" />
|
||||
</el-table-column>
|
||||
<el-table-column label="物品代码" align="center" prop="itemCd" />
|
||||
<el-table-column label="批号" align="center" prop="lotNo" />
|
||||
<el-table-column label="子批号" align="center" prop="subLotNo" />
|
||||
<el-table-column label="数量" align="center" >
|
||||
<el-table-column label="标准单位数量" align="center" prop="stdUnitQty" />
|
||||
<el-table-column label="标准单位" align="center" prop="stdUnitName" />
|
||||
<el-table-column label="包装单位数量" align="center" prop="pkgUnitQty" />
|
||||
<el-table-column label="包装单位" align="center" prop="pkgUnitName" />
|
||||
</el-table-column>
|
||||
<el-table-column label="创建者" align="center" prop="createByUser" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改入出库履历对话框 -->
|
||||
<!-- <el-dialog :title="title" v-model="open" width="500px" append-to-body>-->
|
||||
<!-- <el-form ref="InvTransHisRef" :model="form" :rules="rules" label-width="80px">-->
|
||||
<!-- </el-form>-->
|
||||
<!-- <template #footer>-->
|
||||
<!-- <div class="dialog-footer">-->
|
||||
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
|
||||
<!-- <el-button @click="cancel">取 消</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-dialog>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="InvTransHis">
|
||||
import { listInvTransHis } from "@/api/wms/InvTransHis";
|
||||
import { listWarehouseInfo } from "@/api/wms/WarehouseInfo";
|
||||
import DataSelect from "@/components/DataSelect/index.vue";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const {wms_inv_trans_type} = proxy.useDict("wms_inv_trans_type");
|
||||
|
||||
const InvTransHisList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(false);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 30,
|
||||
invTransType: null,
|
||||
whsCd: null,
|
||||
stgBinCd: null,
|
||||
itemCd: null,
|
||||
lotNo: null,
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询入出库履历列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listInvTransHis(queryParams.value).then(response => {
|
||||
InvTransHisList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
// dialog表单重置(目前无用)
|
||||
function reset() {
|
||||
// form.value = {
|
||||
// deptId: null,
|
||||
// invTransNo: null,
|
||||
// invTransType: null,
|
||||
// whsCd: null,
|
||||
// stgBinCd: null,
|
||||
// palletId: null,
|
||||
// stdUnitQty: null,
|
||||
// pkgUnitQty: null,
|
||||
// transOrderNo: null,
|
||||
// transOrderDetlNo: null,
|
||||
// operator: null,
|
||||
// businessCls: null,
|
||||
// itemCd: null,
|
||||
// lotNo: null,
|
||||
// subLotNo: null,
|
||||
// serialNo: null,
|
||||
// reason: null,
|
||||
// remark1: null,
|
||||
// remark2: null,
|
||||
// remark3: null,
|
||||
// remark4: null,
|
||||
// remark5: null,
|
||||
// updateCount: null,
|
||||
// deleteFlag: null,
|
||||
// createBy: null,
|
||||
// createTime: null,
|
||||
// updateBy: null,
|
||||
// updateTime: null,
|
||||
// remark: null
|
||||
// };
|
||||
// proxy.resetForm("InvTransHisRef");
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(item => item.invTransNo);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download('wms/InvTransHis/export', {
|
||||
...queryParams.value
|
||||
}, `InvTransHis_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
// 获取仓库数据
|
||||
async function fetchWarehouseData() {
|
||||
const response = await listWarehouseInfo({})
|
||||
const dataList = []
|
||||
response.rows.map(item => {
|
||||
dataList.push({
|
||||
label: item.whsName,
|
||||
value: item.whsCd,
|
||||
})
|
||||
})
|
||||
return dataList
|
||||
}
|
||||
|
||||
//页面打开时查询
|
||||
//getList();
|
||||
</script>
|
||||
@@ -440,7 +440,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 30,
|
||||
itemCd: null,
|
||||
itemName: null,
|
||||
},
|
||||
|
||||
@@ -125,7 +125,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 30,
|
||||
itemTypeName: null,
|
||||
remark1: null,
|
||||
},
|
||||
|
||||
@@ -125,7 +125,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 30,
|
||||
unitCode: null,
|
||||
unitName: null,
|
||||
},
|
||||
|
||||
@@ -173,7 +173,7 @@ const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 30,
|
||||
whsCd: null,
|
||||
whsName: null,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user