库内管理-批次属性修改
This commit is contained in:
parent
edffef748b
commit
3f21833d29
@ -11,3 +11,16 @@ export function updatePacking(data: any) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
* @param params
|
||||
* @returns
|
||||
*/
|
||||
export function editWareHouse(params: any) {
|
||||
return request({
|
||||
url: '/api/api/packing/handelEdit',
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
@ -1,25 +1,68 @@
|
||||
<template>
|
||||
<div class="vue-element-page-wrap" ref="tableContainer">
|
||||
<el-row class="page-search" justify="space-between" align="bottom">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="80px" label-position="left">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-position="left">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" class="col_height">
|
||||
<el-form-item label="组织" prop="params.ERPFACTORY" label-width="50px">
|
||||
<el-select filterable v-model="queryParams.params.ERPFACTORY" placeholder="下拉选择组织" style="width: 240px" @change="getErpFactory">
|
||||
<el-form-item label="组织" prop="params.ERPFACTORY">
|
||||
<el-select filterable v-model="queryParams.params.ERPFACTORY" placeholder="下拉选择组织" @change="ERPLocationQuery">
|
||||
<el-option v-for="item in ERPFactoryList" :key="item.ERPFACTORY" :label="item.DESCRIPTION" :value="item.ERPFACTORY"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="col_height">
|
||||
<el-form-item label="物料编号" prop="params.MATERIALSPECNAME" label-width="70px">
|
||||
<el-form-item label="仓库" prop="params.ERPLOCATION">
|
||||
<el-select v-model="state.ChangeERPLocation" multiple clearable collapse-tags placeholder="请选择仓库"
|
||||
popper-class="custom-header" :max-collapse-tags="1"
|
||||
@visible-change="GetLocationListForSomeERPLocation" filterable>
|
||||
<template #header>
|
||||
</template>
|
||||
<el-option v-for="item in state.ERPLocationList" :key="item.ENUMVALUE" :label="item.DESCRIPTION"
|
||||
:value="item.ENUMVALUE" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="col_height">
|
||||
<el-form-item label="货位" prop="params.LOCATIONNAME">
|
||||
<el-select v-model="state.ChangeLocation" multiple clearable collapse-tags placeholder="请选择货位"
|
||||
popper-class="custom-header" :max-collapse-tags="1"
|
||||
remote :remote-method="handleInput" filterable>
|
||||
<template #header>
|
||||
</template>
|
||||
<el-option v-for="item in state.LocationList" :key="item.storageName" :label="item.storageName"
|
||||
:value="item.storageName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="col_height">
|
||||
<el-form-item label="物料编号" prop="params.MATERIALSPECNAME">
|
||||
<el-Input v-model="queryParams.params.MATERIALSPECNAME" placeholder="输入物料编号" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="col_height">
|
||||
<el-form-item label="批次" prop="params.CHARGE" label-width="50px">
|
||||
<el-form-item label="阶段" prop="params.PHASE">
|
||||
<el-select v-model="queryParams.params.PHASE" placeholder="选择阶段" clearable>
|
||||
<el-option value="S" label="S"></el-option>
|
||||
<el-option value="D" label="D"></el-option>
|
||||
<el-option value="C" label="C"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="col_height">
|
||||
<el-form-item label="品名" prop="params.DESC_CN">
|
||||
<el-Input v-model="queryParams.params.DESC_CN" placeholder="输入品名" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="col_height">
|
||||
<el-form-item label="批次" prop="params.CHARGE">
|
||||
<el-Input v-model="queryParams.params.CHARGE" placeholder="输入批次" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="col_height">
|
||||
<el-form-item label="备注" prop="params.REMARK">
|
||||
<el-Input v-model="queryParams.params.REMARK" placeholder="输入备注" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="page-search-btns">
|
||||
@ -49,35 +92,31 @@
|
||||
<el-table :height="tableHeight" border v-loading="loading" :default-sort="{ prop: 'MATERIALSPECNAME', order: 'descending' }"
|
||||
:data="state.dataList" highlight-current-row row-key="id" style="width: 100%" @selection-change="handleSelection">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" width="50" label="序号"></el-table-column>
|
||||
<template v-for="(col, index) in tableConfig.column" :key="index">
|
||||
<el-table-column v-if="!col.hide" :label="col.header" :prop="col.field" show-overflow-tooltip
|
||||
:sort-orders="['descending', 'ascending']" :sortable="true"/>
|
||||
:width="col.width" :sort-orders="['descending', 'ascending']" :sortable="true"/>
|
||||
</template>
|
||||
<el-table-column width="100" label="操作" align="center" class-name="table-operation" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link @click.stop="refModal.showModal(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div>
|
||||
<pagination v-if="total > 0" :total="total" v-model:pageNumTo="queryParams.pageNum"
|
||||
v-model:pageSizeTo="queryParams.pageSize" @pagination="handleQuery" />
|
||||
</div>
|
||||
<div>
|
||||
<el-form :model="state.updateParams" ref="formDataRef" label-position="top" :rules="rules">
|
||||
<el-form :model="state.updateParams" ref="formDataRef" label-position="left" :rules="rules">
|
||||
<el-row :gutter="22">
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="CHARGE">
|
||||
<el-Input v-model="state.updateParams.CHARGE" placeholder="批次"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="EXPIRNGDATE">
|
||||
<el-date-picker v-model="state.updateParams.EXPIRNGDATE" type="datetime"
|
||||
format="YYYY-MM-DD hh:mm:ss" value-format="YYYY-MM-DD hh:mm:ss"
|
||||
placeholder="选择保质期" style="width: 100%"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="MAKEDATE">
|
||||
<el-date-picker v-model="state.updateParams.MAKEDATE" type="datetime"
|
||||
format="YYYY-MM-DD hh:mm:ss" value-format="YYYY-MM-DD hh:mm:ss"
|
||||
placeholder="选择制造日期" style="width: 100%"/>
|
||||
<el-form-item label="阶段" prop="PHASE">
|
||||
<el-select v-model="state.updateParams.PHASE" placeholder="选择阶段" clearable>
|
||||
<el-option value="S" label="S"></el-option>
|
||||
<el-option value="D" label="D"></el-option>
|
||||
<el-option value="C" label="C"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
@ -87,6 +126,7 @@
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<drawer ref="refModal" @refresh="handleQuery"/>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
@ -97,11 +137,14 @@ export default {
|
||||
<script lang="ts" setup>
|
||||
import { reactive, ref, onMounted, toRefs, getCurrentInstance } from 'vue'
|
||||
import { ElForm, ElMessageBox, ElTable } from 'element-plus'
|
||||
import { getQueryPageList } from '@/api/common'
|
||||
import { getQueryPageList,getQueryList } from '@/api/common'
|
||||
import { areAllNotEmpty, msToDate } from '@/utils/CommonUtil';
|
||||
import { localStorage } from '@/utils/storage'
|
||||
import { updatePacking } from '@/api/material/notPosted'
|
||||
import { bTableHeight } from '@/composables/calcTableHeight'
|
||||
import { getORG } from '@/api/auth'
|
||||
import { search } from '@/api/wareHouse'
|
||||
import Drawer from './drawer.vue'
|
||||
// 公共变量
|
||||
const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(310)
|
||||
const { proxy }: any = getCurrentInstance()
|
||||
@ -112,6 +155,7 @@ const tableConfig = ref({
|
||||
})
|
||||
const queryFormRef = ref(ElForm)
|
||||
const formDataRef = ref()
|
||||
const refModal = ref()
|
||||
// 变量
|
||||
const state = reactive({
|
||||
dataList: [] as any, // 表格数据
|
||||
@ -119,8 +163,14 @@ const state = reactive({
|
||||
selection: [] as any, // 多选
|
||||
loadings: false, // 更新按钮
|
||||
loading: true, // 表格
|
||||
ChangeERPLocation: [],
|
||||
ChangeLocation: [],
|
||||
// 组织
|
||||
ERPFactoryList: [] as any,
|
||||
// 仓库
|
||||
ERPLocationList: [] as any,
|
||||
// 货位
|
||||
LocationList: [] as any,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
queryId: 'NotPosted',
|
||||
@ -129,7 +179,22 @@ const state = reactive({
|
||||
SITENAME: localStorage.get('siteName') || 'SDK',
|
||||
MATERIALSPECNAME: '', // 物料编号
|
||||
ERPFACTORY: '',
|
||||
CHARGE: ''
|
||||
CHARGE: '',
|
||||
ERPLOCATION: '',
|
||||
LOCATIONNAME: '',
|
||||
PHASE: '',
|
||||
DESC_CN: '',
|
||||
REMARK: '',
|
||||
},
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
queryParamsERPLocation: {
|
||||
queryId: "GetErpLocationList",
|
||||
version: "WEB00001",
|
||||
params: {
|
||||
SITENAME: localStorage.get("siteName") || 'SDK',
|
||||
ERPFACTORYNAME: '',
|
||||
},
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
@ -138,13 +203,15 @@ const state = reactive({
|
||||
updateParams: {
|
||||
CHARGE: '',
|
||||
EXPIRNGDATE: '',
|
||||
MAKEDATE: ''
|
||||
MAKEDATE: '',
|
||||
PHASE: ''
|
||||
},
|
||||
// 条件
|
||||
rules: {
|
||||
CHARGE: [{required: true, message: '请输入批次号', trigger: 'blur'}],
|
||||
EXPIRNGDATE: [{required: true, message: '请选择保质期', trigger: 'blur'}],
|
||||
MAKEDATE: [{required: true, message: '请选择制造日期', trigger: 'blur'}],
|
||||
// CHARGE: [{required: true, message: '请输入批次号', trigger: 'blur'}],
|
||||
// EXPIRNGDATE: [{required: true, message: '请选择保质期', trigger: 'blur'}],
|
||||
// MAKEDATE: [{required: true, message: '请选择制造日期', trigger: 'blur'}],
|
||||
PHASE: [{required: true, message: '请选择阶段', trigger: 'blur'}],
|
||||
}
|
||||
})
|
||||
const { queryParams, total, loading, ERPFactoryList, rules } = toRefs(state)
|
||||
@ -153,18 +220,26 @@ const { queryParams, total, loading, ERPFactoryList, rules } = toRefs(state)
|
||||
onMounted(() => {
|
||||
tableConfig.value.column = [
|
||||
{ header: 'SITENAME', field: 'SITENAME', hide: true },
|
||||
{ header: 'MATERIALPACKINGNAME', field: 'MATERIALPACKINGNAME', hide: true },
|
||||
{ header: '组织(CN)', field: 'ERPFACTORYDESC', hide: false },
|
||||
{ header: '货位名称', field: 'LOCATIONNAMEDESC', hide: false },
|
||||
{ header: '物料编号', field: 'MATERIALSPECNAME', hide: false },
|
||||
{ header: '品名', field: 'DESC_CN', hide: false },
|
||||
{ header: '批次号', field: 'CHARGE', hide: false },
|
||||
{ header: '组织', field: 'ERPFACTORY', hide: false },
|
||||
{ header: '组织(CN)', field: 'ERPFACTORYDESC', hide: false, width: 100 },
|
||||
{ header: '仓库编码', field: 'ERPLOCATION', hide: false, width: 100 },
|
||||
{ header: "仓库名称", field: "ERPLOCATIONDESC", hide: false, width: 100 },
|
||||
{ header: '货位', field: 'LOCATIONNAME', hide: false },
|
||||
{ header: '货位名称', field: 'LOCATIONNAMEDESC', hide: false, width: 100 },
|
||||
{ header: '物料编号', field: 'MATERIALSPECNAME', hide: false, width: 140 },
|
||||
{ header: '品名', field: 'DESC_CN', hide: false, width: 140 },
|
||||
{ header: '批次号', field: 'CHARGE', hide: false, width: 180 },
|
||||
{ header: '标签', field: 'MATERIALPACKINGNAME', hide: false, width: 180 },
|
||||
{ header: '阶段', field: 'PHASE', hide: false },
|
||||
{ header: '系统规格', field: 'DESCRIPTION', hide: false },
|
||||
{ header: 'SDK规格', field: 'SPECNAME', hide: false },
|
||||
{ header: '是否良品', field: 'OQARESULT', hide: false },
|
||||
{ header: '保质期', field: 'EXPIRINGDATE', hide: false },
|
||||
{ header: '制造日期', field: 'MAKEDATE', hide: false }
|
||||
{ header: '系统规格', field: 'DESCRIPTION', hide: false, width: 100 },
|
||||
{ header: 'SDK规格', field: 'SPECNAME', hide: false, width: 100 },
|
||||
{ header: '数量', field: 'MATERIALQUANTITY', hide: false },
|
||||
{ header: '单位', field: 'UNIT', hide: false },
|
||||
{ header: '是否良品', field: 'OQARESULT', hide: false, width: 100 },
|
||||
{ header: '保质期', field: 'EXPIRINGDATE', hide: false, width: 150 },
|
||||
{ header: '制造日期', field: 'MAKEDATE', hide: false, width: 150 },
|
||||
{ header: '入库时间', field: 'RECEIVETIME', hide: false, width: 150 },
|
||||
{ header: '备注', field: 'REMARK', hide: false, width: 150 },
|
||||
]
|
||||
handleQuery()
|
||||
getErpFactory()
|
||||
@ -213,6 +288,16 @@ function updateInfo() {
|
||||
// 查询
|
||||
async function handleQuery() {
|
||||
state.loading = true
|
||||
state.queryParams.params.ERPLOCATION = ''
|
||||
if (state.ChangeERPLocation[0] != '')
|
||||
for (let i = 0; i < state.ChangeERPLocation.length; i++) {
|
||||
state.queryParams.params.ERPLOCATION = state.queryParams.params.ERPLOCATION + state.ChangeERPLocation[i] + ','
|
||||
}
|
||||
state.queryParams.params.LOCATIONNAME = ''
|
||||
if (state.ChangeLocation[0] != '')
|
||||
for (let i = 0; i < state.ChangeLocation.length; i++) {
|
||||
state.queryParams.params.LOCATIONNAME = state.queryParams.params.LOCATIONNAME + state.ChangeLocation[i] + ','
|
||||
}
|
||||
await getQueryPageList(state.queryParams).then((res: any) => {
|
||||
state.dataList = res.data.list
|
||||
state.total = res.data.total
|
||||
@ -231,8 +316,45 @@ function getErpFactory() {
|
||||
// 重置
|
||||
function resetQuery() {
|
||||
queryFormRef.value.resetFields();
|
||||
state.ChangeERPLocation = []
|
||||
state.ChangeLocation = []
|
||||
handleQuery();
|
||||
}
|
||||
//ERP库位查询
|
||||
function ERPLocationQuery() {
|
||||
state.queryParamsERPLocation.params.ERPFACTORYNAME = state.queryParams.params.ERPFACTORY
|
||||
getQueryList(state.queryParamsERPLocation).then((res: any) => {
|
||||
state.ERPLocationList = res.data;
|
||||
});
|
||||
}
|
||||
function GetLocationListForSomeERPLocation(value: any) {
|
||||
if (!areAllNotEmpty(state.queryParams.params.ERPFACTORY)) {
|
||||
proxy.$ElMessage.warning('当前还未选择组织');
|
||||
state.queryParams.params.ERPLOCATION = ''
|
||||
state.ERPLocationList = []
|
||||
return
|
||||
}
|
||||
if (!areAllNotEmpty(state.queryParams.params.ERPLOCATION)) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
function handleInput(val: any) {
|
||||
let index = [1, 3, 4, 7, 8]
|
||||
if (index.indexOf(val.length) > -1) {
|
||||
state.LocationList = []
|
||||
search({
|
||||
storageName: val,
|
||||
orgNo: JSON.parse(localStorage.get('orgNo'))
|
||||
}).then((res:any) => {
|
||||
if (res.resultObj) {
|
||||
state.LocationList = res.resultObj
|
||||
} else {
|
||||
proxy.$ElMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.col_height {
|
||||
|
Loading…
x
Reference in New Issue
Block a user