This commit is contained in:
郭飞 2025-04-10 18:46:45 +08:00
commit 0f0e520b49
31 changed files with 742 additions and 208 deletions

View File

@ -147,36 +147,3 @@ export function TransferIn(params: any) {
data: params,
});
}
/********** 批次 **************/
export function createDelivery(params: any) {
return request({
url: '/api/api/delivery/create',
method: 'post',
data: params,
});
}
export function getPurchase(params: any) {
return request({
url: '/api/api/delivery/getPurchase',
method: 'post',
data: params,
});
}
export function getStoreDetail(params: any) {
return request({
url: '/api/api/delivery/getStoreDetail',
method: 'post',
data: params,
});
}
export function getReceiveDetail(params: any) {
return request({
url: '/api/api/delivery/getReceiveDetail',
method: 'post',
data: params,
});
}

View File

@ -48,7 +48,7 @@ export function editMaterial(data: any) {
*/
export function checkMaterial(data: any) {
return request({
url: '/api/materialMaint/checkMaterial',
url: '/api/api/materialMaint/checkMaterial',
method: 'post',
data: data,
});

View File

@ -19,7 +19,7 @@ export function createcheckmark(data: any) {
// 提交审核
export function Auditcheckmark(data: any) {
return request({
url: '/api/checkmark/Auditcheckmark',
url: '/api/api/checkmark/Auditcheckmark',
method: 'post',
data: data,
});

View File

@ -112,7 +112,7 @@ export function updateCAREER_ASSISTANCE(queryParams: any) {
export function undoCommit(queryParams: any) {
return request({
url: '/api/MaterialUndo/commitUndo',
url: '/api/api/MaterialUndo/commitUndo',
method: 'post',
data: queryParams,
});

49
src/api/delivery/index.ts Normal file
View File

@ -0,0 +1,49 @@
import request from '@/utils/request';
export function createDelivery(params: any) {
return request({
url: '/api/api/delivery/create',
method: 'post',
data: params,
});
}
export function getReceiveList(params: any) {
return request({
url: '/api/api/delivery/getReceiveList',
method: 'post',
data: params,
});
}
export function getStoreDetail(params: any) {
return request({
url: '/api/api/delivery/getStoreDetail',
method: 'post',
data: params,
});
}
export function getReceiveDetail(params: any) {
return request({
url: '/api/api/delivery/getReceiveDetail',
method: 'post',
data: params,
});
}
export function getDeliveryList(params: any) {
return request({
url: '/api/api/delivery/getDeliveryList',
method: 'post',
data: params,
});
}
export function delDelivery(params: any) {
return request({
url: '/api/api/delivery/delDelivery',
method: 'post',
data: params,
});
}

View File

@ -46,7 +46,7 @@ export function Getprinter(data: any) {
*/
export function updateRemark(data: any) {
return request({
url: '/api/label/updateRemark',
url: '/api/api/label/updateRemark',
method: 'post',
data: data,
});
@ -57,7 +57,7 @@ export function updateRemark(data: any) {
*/
export function updateTruegg(data: any) {
return request({
url: '/api/label/updateTruegg',
url: '/api/api/label/updateTruegg',
method: 'post',
data: data,
});
@ -97,7 +97,7 @@ export function getSpecList(data: any) {
export function labelMaterial(data: any) {
return request({
url: '/api/label/labelMaterial',
url: '/api/api/label/labelMaterial',
method: 'post',
data: data,
});

View File

@ -0,0 +1,9 @@
import request from '@/utils/request';
export function editWareHouse(params: any) {
return request({
url: '/api/api/materialSpec/edit',
method: 'post',
data: params,
});
}

View File

@ -0,0 +1,9 @@
import request from '@/utils/request';
export function editWareHouse(params: any) {
return request({
url: '/api/api/wareHouse/edit',
method: 'post',
data: params,
});
}

View File

@ -212,6 +212,8 @@ function logout() {
localStorage.removeItem('userId');
localStorage.removeItem('userName');
localStorage.removeItem('orgNo');
localStorage.removeItem('session');
localStorage.removeItem('token');
});
}
</script>

View File

@ -2,6 +2,7 @@
<div>
<template v-if="!item.children || (item.children && item.children.length === 0)">
<el-menu-item
v-if="!item.root"
@click="goRoute(item.path || item.routePath)"
:index="item.path || item.routePath"
>

View File

@ -13,7 +13,13 @@ function setGuard(router: any) {
const hasToken = user.getToken();
// 未登录
if (!hasToken) {
if (hasToken) {
// 已登录
if (to.path === '/login') {
next('/');
return;
}
} else {
// 未登录时放通login
if (to.path === '/login') {
next();
@ -27,7 +33,6 @@ function setGuard(router: any) {
const routes = app.getRoutes;
// 若没有设置routes
if (routes && routes.length === 0) {
const { app } = useStore();
// 获取menuList
const menuList: any = await app.getMenuList();
// 如果menuList不存在或为空则不走下面

View File

@ -25,12 +25,12 @@ const constRoutes = [
/**
* home路由redirect使用
*/
const homeRoute = { path: '/', hidden: true, redirect: '' };
const homeRoute = { path: '/', root: true, redirect: '' };
/**
* 404
*/
const notFoundRoute = { path: '/:catchAll(.*)', redirect: '/404', hidden: true };
const notFoundRoute = { path: '/:catchAll(.*)', redirect: '/404', root: true };
/**
* 使require加载组件

View File

@ -313,7 +313,7 @@
const size = ref<'default' | 'large' | 'small'>('small');//formdata
const state = reactive({
orgNo:'',
PhaseList: [{ label: 'C', Value: 'C' }, { label: 'D', Value: 'D' }, { label: 'S', Value: 'S' }] as any,
PhaseList: [{ label: '全部', Value: '' }, { label: 'C', Value: 'C' }, { label: 'D', Value: 'D' }, { label: 'S', Value: 'S' }] as any,
PackingGradeList:[{ label: '全部', Value: '' },{ label: '合格', Value: 'OK' }, { label: '不合格', Value: 'NG' }] as any,
resultStateList:[{ label: '全部', Value: '' },{ label: '待质检', Value: 'PREOQA' },{ label: '质检完成', Value: 'END' }] as any,
ChangeERPLocation: [],
@ -540,14 +540,8 @@
state.queryParams.version = 'WEB00034'
await getQueryPageList(state.queryParams)
.then((res: any) => {
if (res.data.list.length > 0) {
state.BoxHistoryList = res.data.list
state.total = res.data.total
} else {
state.BoxHistoryList = res.data.list
proxy.$ElMessage.success('查询结果为空');
}
state.BoxHistoryList = res.data.list
state.total = res.data.total
})
state.queryParams.version = 'WEB00032'
state.AllNumber = 0

View File

@ -350,20 +350,13 @@ function handleQuery() {
// state.queryParams.params.TODATE = str2.withoutTime;
// console.log(state.queryParams.params);
state.pageList = []
getQueryPageList(state.queryParams)
.then((res: any) => {
if(res.data.list.length == 0){
ElMessageBox.alert('查无数据', '提醒框', {
confirmButtonText: 'OK',
state.pageList2 = [];
state.total1 = 0;
getQueryPageList(state.queryParams).then((res: any) => {
state.pageList = res.data.list;
state.total = res.data.total;
showCurrentTime();
})
} else {
state.pageList = res.data.list;
state.total = res.data.total;
showCurrentTime();
}
})
.catch(() => { });
}
function resetQuery() {
queryFormRef.value.resetFields();

View File

@ -42,7 +42,7 @@
</el-form>
<div class="page-search-btns">
<el-button type="primary" @click="handleQueryInfo">搜索</el-button>
<el-button type="primary" @click="InAdvanceQuery">刷新</el-button>
<!-- <el-button type="primary" @click="InAdvanceQuery">刷新</el-button>-->
<el-button type="primary" @click="exportExcel">导出</el-button>
</div>
</el-row>
@ -258,6 +258,8 @@ const updateList = (col: any) => {
function handleQueryInfo() {
state.queryParams.pageNum = 1
state.queryParamsActivate.pageNum = 1;
state.BoxDetailList = [];
state.total1 = 0
HandleQuery()
}
function HandleQuery() {

View File

@ -26,7 +26,7 @@
<el-form-item label="料号" prop="MATERIALSPECNAME">
<el-Input v-model="queryParams.MATERIALSPECNAME" clearable />
</el-form-item>
</el-col>
</el-col>
<el-col :span="6">
<el-form-item label="品名" prop="DESC_CN">
<el-Input v-model="queryParams.DESC_CN" clearable />
@ -229,6 +229,7 @@ function handleQueryInfo() {
state.page.pageNum = 1
state.page_d.pageNum = 1
state.page.total = 0
state.page_d.total = 0;
handleQuery()
}
function handleQuery() {
@ -247,22 +248,18 @@ function handleQuery() {
pageNum: state.page.pageNum,
pageSize: state.page.pageSize,
}).then((res: any) => {
if(res.data.list.length == 0){
ElMessageBox.alert('查无数据', '提醒框', {
confirmButtonText: 'OK',
})
state.loading = false
} else {
state.list = res.data.list;
for(let i=0;i<state.list.length;i++)
{
var dates = new Date(state.list[i].ORDERDATE).toJSON();
state.list[i].ORDERDATE=new Date(+new Date(dates) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
console.log( state.list[i].ORDERDATE);
state.list = res.data.list;
state.page.total = res.data.total;
state.loading = false
if (state.list.length > 0) {
for (const element of state.list) {
let dates = new Date(element.ORDERDATE).toJSON()
element.ORDERDATE = new Date(+new Date(dates) + 8 * 3600 * 1000)
.toISOString()
.replace(/T/g, ' ')
.replace(/\.[\d]{3}Z/, '')
console.log(element.ORDERDATE)
}
state.page.total = res.data.total;
state.loading = false
state.active_row = state.list[0]
if (state.active_row) {
handleQuery_d()

View File

@ -237,6 +237,7 @@ function handleQuery() {
state.loading = true
state.list = []
state.list_d = []
state.page_d.total = 0;
queryFormRef.value.validate((isValid: boolean) => {
if (isValid) {
getQueryPageList({
@ -249,27 +250,22 @@ function handleQuery() {
pageNum: state.page.pageNum,
pageSize: state.page.pageSize,
}).then((res: any) => {
state.loading = false
if(res.data.list.length ==0 ){
ElMessageBox.alert('查无数据', '提醒框', {
confirmButtonText: 'OK',
})
} else {
state.list = res.data.list;
for(let i=0;i<state.list.length;i++)
{
var dates = new Date(state.list[i].ORDERDATE).toJSON();
state.list[i].ORDERDATE=new Date(+new Date(dates) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
console.log( state.list[i].ORDERDATE);
state.loading = false
state.list = res.data.list;
state.page.total = res.data.total;
if (state.list.length > 0) {
for (const element of state.list) {
const dates = new Date(element.ORDERDATE).toJSON()
element.ORDERDATE = new Date(+new Date(dates) + 8 * 3600 * 1000)
.toISOString()
.replace(/T/g, ' ')
.replace(/\.[\d]{3}Z/, '')
}
state.page.total = res.data.total;
state.loading = false
state.active_row = state.list[0]
if (state.active_row) {
handleQuery_d()
}
}
});
}
});

View File

@ -51,13 +51,13 @@
</el-col>
<el-col :span="4">
<el-form-item label="开始时间" prop="FROMDATE">
<el-date-picker v-model="queryParams.FROMDATE" value-format="YYYY/MM/DD HH:mm:ss" type="datetime"
<el-date-picker v-model="queryParams.FROMDATE" value-format="YYYYMMDD" type="date"
placeholder="Pick a day" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="结束时间" prop="TODATE">
<el-date-picker v-model="queryParams.TODATE" value-format="YYYY/MM/DD HH:mm:ss" type="datetime"
<el-date-picker v-model="queryParams.TODATE" value-format="YYYYMMDD" type="date"
placeholder="Pick a day" />
</el-form-item>
</el-col>

View File

@ -189,7 +189,11 @@ function handleQueryInfo() {
}
function handleQuery() {
state.list_d = []
state.list = []
state.page.total = 0;
state.loading = true
state.page_d.total = 0;
state.loading_d = false
queryFormRef.value.validate((isValid: boolean) => {
if (isValid) {
getQueryPageList({
@ -202,17 +206,10 @@ function handleQuery() {
pageNum: state.page.pageNum,
pageSize: state.page.pageSize,
}).then((res: any) => {
if(res.data.list.length == 0){
ElMessageBox.alert('查无数据', '提醒框', {
confirmButtonText: 'OK',
})
state.loading = false
state.list = []
state.list_d = []
} else {
state.list = res.data.list;
state.page.total = res.data.total;
state.loading = false
state.list = res.data.list;
state.page.total = res.data.total;
state.loading = false
if (state.list.length > 0) {
state.active_row = state.list[0]
if (state.active_row) {
handleQuery_d()

View File

@ -120,6 +120,10 @@ const state = reactive({
active_row: {},
StockStateList : [
{
ENUMVALUE : "" ,
DESCRIPTION : "全部"
},
{
ENUMVALUE : "Created" ,
DESCRIPTION : "创建"

View File

@ -0,0 +1,103 @@
<template>
<el-drawer :title="dialog.title" v-model="dialog.visible" @close="cancel">
<el-form ref="drawerRef" :model="formData" :rules="rules" label-position="top">
<el-form-item label="批次管理" prop="isBatch">
<el-select filterable v-model="formData.isBatch" size="small">
<el-option
v-for="item in isBatch"
:key="item.key"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="有效期计算规则" prop="expirationRules">
<el-select filterable v-model="formData.expirationRules" size="small">
<el-option
v-for="item in expirationRules"
:key="item.key"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm"> </el-button>
</template>
</el-drawer>
</template>
<script lang="ts" setup>
import { getCurrentInstance, reactive, ref, toRefs } from 'vue'
import { ElForm } from 'element-plus'
import { editWareHouse } from '@/api/materialSpec'
const { proxy }: any = getCurrentInstance()
const emits = defineEmits(['refresh'])
//
const drawerRef = ref(ElForm);
const state = reactive({
dialog: {
title: "编辑物料",
type: 'edit',
visible: false,
},
isBatch: [
{ key: 'y', label: '启用', value: 'Y' },
{ key: 'n', label: '不启用', value: 'N' }
],
expirationRules: [
{ key: '0', label: '到货时间', value: '0' },
{ key: '1', label: '创建时间', value: '1' }
],
formData: {
//
siteName: '',
//
materialSpecName: '',
// YN
isBatch: '',
// (01)
expirationRules: ''
},
rules: {
isBatch: [{ required: true, message: "是否启用批次管理", trigger: "blur" }],
expirationRules: [{ required: true, message: "有效期计算规则", trigger: "blur" }],
}
})
const { dialog, formData, rules, isBatch, expirationRules } = toRefs(state)
//
function cancel() {
state.dialog.visible = false;
}
//
function submitForm() {
drawerRef.value.validate((isValid: boolean) => {
if (isValid) {
//
editWareHouse(state.formData).then((res: any) => {
console.log(res)
if (res.errorCode === 200) {
proxy.$ElMessage.success(res.message)
cancel()
emits('refresh')
} else {
proxy.$ElMessage.error(res.message)
}
})
}
});
}
//
const showModal = (row: any) => {
state.dialog.visible = true
//
state.formData.siteName = row.SITENAME
state.formData.materialSpecName = row.MATERIALSPECNAME
state.formData.isBatch = row.EDIT_IS_BATCH
state.formData.expirationRules = row.EDIT_EXPIRATION_RULES
}
defineExpose({ showModal })
</script>

View File

@ -54,15 +54,7 @@
<template v-for="(col, index) in materialTableConfig.column" :key="index">
<el-table-column v-if="!col.hide" :label="col.header" show-overflow-tooltip>
<template #default="scope">
<span v-if="col.field === 'IS_CON_TEMP_T'">
<span v-if="scope.row[col.field] == 'Y'" ></span>
<span v-else></span>
</span>
<span v-else-if="col.field === 'MATURATIONFLAG_T'">
<span v-if="scope.row[col.field] == 'Y'" ></span>
<span v-else></span>
</span>
<span v-else-if="col.field === 'IQCFLAG_T'">
<span v-if="col.field === 'IQCFLAG_T'">
<span v-if="scope.row[col.field] == 'Y'"></span>
<span v-else></span>
</span>
@ -73,8 +65,9 @@
<el-table-column width="100" label="操作" align="center" class-name="table-operation" fixed="right">
<template #default="scope">
<el-button type="primary" link @click.stop="handleUpdate(scope.row)" v-if="!scope.row.status"> 编辑
</el-button>
<!-- <el-button type="primary" link @click.stop="handleUpdate(scope.row)" v-if="!scope.row.status"> 编辑
</el-button>-->
<el-button type="primary" link @click.stop="refModal.showModal(scope.row)"> 编辑 </el-button>
</template>
</el-table-column>
</el-table>
@ -133,6 +126,7 @@
</template>
</el-drawer>
</div>
<drawer ref="refModal" @refresh="handleQuery"/>
</div>
</template>
<script lang="ts">
@ -146,12 +140,14 @@ import { ElForm, ElMessageBox, ElTable } from "element-plus";
import { getQueryList, getQueryPageList, BpelEvent } from '@/api/common';
import { editMaterial } from '@/api/basics/material'
import { bTableHeight } from "../../../../composables/calcTableHeight";
import Drawer from '@/views/basics/flatWarehouse/materialMaint/drawer.vue'
const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(180);
const { proxy }: any = getCurrentInstance();
const queryFormRef = ref(ElForm);
const formDataRef = ref(ElForm);
const refModal = ref()
const formDataRefData = ref({
SITENAME: '',//
@ -235,7 +231,8 @@ const state = reactive({
type: 'add',
visible: false,
},
TEMPList: [{ label: '全部', value: '' },{ label: '是', value: 'Y' }, { label: '否', value: 'N' }] as any,
TEMPList: [{ label: '全部', value: '' },{ label: '不熟化', value: '01' }, { label: '常温', value: '02' },
{ label: '低温', value: '03' }, { label: '中温', value: '04' }, { label: '高温', value: '05' }] as any,
formData: {
siteName: 'SDK',
MATERIALSPECNAME:"",
@ -269,8 +266,8 @@ onMounted(() => {
{ header: "品名", field: "DESC_CN", hide: false },
{ header: "规格型号", field: "DESCRIPTION", hide: false },
{ header: "物料类型", field: "MATERIALTYPE", hide: false },
{ header: "是否恒温管控", field: "IS_CON_TEMP_T", hide: false },
{ header: "是否熟化", field: "MATURATIONFLAG_T", hide: false },
{ header: "恒温管控", field: "IS_CON_TEMP_T", hide: false },
{ header: "熟化", field: "MATURATIONFLAG_T", hide: false },
{ header: "烘烤天数", field: "MATURATIONTIME_T", hide: false },
{ header: "主单位", field: "MATERIALUNIT", hide: false },
{ header: "辅单位", field: "FUNIT_T", hide: false },

View File

@ -0,0 +1,101 @@
<template>
<el-drawer :title="dialog.title" v-model="dialog.visible" @close="cancel">
<el-form ref="drawerRef" :model="formData" :rules="rules" label-position="top">
<el-form-item label="是否货位管理" prop="useLocation">
<el-select filterable v-model="formData.useLocation" size="small">
<el-option
v-for="item in useLocation"
:key="item.key"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="是否熟化" prop="isOven">
<el-select filterable v-model="formData.isOven" size="small">
<el-option
v-for="item in isOven"
:key="item.key"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm"> </el-button>
</template>
</el-drawer>
</template>
<script lang="ts" setup>
import { getCurrentInstance, reactive, ref, toRefs } from 'vue'
import { ElForm } from 'element-plus'
import { editWareHouse } from '@/api/wareHouse'
const { proxy }: any = getCurrentInstance()
const emits = defineEmits(['refresh'])
//
const drawerRef = ref(ElForm);
const state = reactive({
dialog: {
title: "编辑仓库",
type: 'edit',
visible: false,
},
useLocation: [
{ key: 'y', label: '是', value: 'Y' },
{ key: 'n', label: '否', value: 'N' }
],
isOven: [
{ key: 'y', label: '是', value: 'Y' },
{ key: 'n', label: '否', value: 'N' }
],
formData: {
erpFactoryName: '',
erpLocationName: '',
//
useLocation: '',
//
isOven: ''
},
rules: {
useLocation: [{ required: true, message: "是否货位管理", trigger: "blur" }],
isOven: [{ required: true, message: "是否熟化", trigger: "blur" }],
}
})
const { dialog, formData, rules, useLocation, isOven } = toRefs(state)
//
function cancel() {
state.dialog.visible = false;
}
//
function submitForm() {
drawerRef.value.validate((isValid: boolean) => {
if (isValid) {
//
editWareHouse(state.formData).then((res: any) => {
console.log(res)
if (res.errorCode === 200) {
proxy.$ElMessage.success(res.message)
cancel()
emits('refresh')
} else {
proxy.$ElMessage.error(res.message)
}
})
}
});
}
//
const showModal = (row: any) => {
state.dialog.visible = true
//
state.formData.erpFactoryName = row.ERPFACTORYNAME
state.formData.erpLocationName = row.ERPLOCATIONNAME
state.formData.useLocation = row.USE_LOCATION
state.formData.isOven = row.IS_OVEN
}
defineExpose({ showModal })
</script>

View File

@ -88,10 +88,17 @@
</template>
</el-table-column>
</template>
<el-table-column width="60" 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>
<pagination v-if="total > 0" :total="total" v-model:pageNumTo="queryParams.pageNum"
v-model:pageSizeTo="queryParams.pageSize" @pagination="handleQuery" />
</div>
<drawer ref="refModal" @refresh="handleQuery"/>
</div>
</template>
<script lang="ts">
@ -104,9 +111,9 @@ import { reactive, ref, onMounted, toRefs, getCurrentInstance, nextTick } from "
import { ElForm, ElMessageBox, ElTable } from "element-plus";
import { getQueryList, getQueryPageList, BpelEvent } from '@/api/common';
import { bTableHeight } from "../../../../composables/calcTableHeight";
import Drawer from '@/views/basics/flatWarehouse/wareHouse/drawer.vue'
const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(190);
const refModal = ref()
const queryFormRef = ref(ElForm);
const formDataRef = ref(ElForm);
@ -255,6 +262,7 @@ onMounted(() => {
{ header: "是否货位管理", field: "USE_LOCATION", hide: false },
{ header: "是否自动备货", field: "ZDBHFLAG", hide: false },
{ header: "是否熟化", field: "IS_OVEN", hide: false },
{ header: "仓库管理员", field: "LOCATION_USER", hide: false }
// { header: "", field: "USE_MRP", hide: false },
]
// handleQuery

View File

@ -272,18 +272,9 @@ function handleQuery2() {
pageSize: state.pageSize2,
}
getQueryPageList(query).then((res: any) => {
if(res.data.list.length==0){
ElMessageBox.alert('查无数据', '提醒框', {
confirmButtonText: 'OK',
})
state.loading = false;
} else {
state.loading = false;
state.list2 = res.data.list;
state.total2 = res.data.total;
}
state.loading = false;
state.list2 = res.data.list;
state.total2 = res.data.total;
});
}
state.loading = false;

View File

@ -36,7 +36,7 @@
</el-form>
<div class="page-search-btns">
<el-button type="primary" @click="handleQueryInfo">搜索</el-button>
<el-button type="primary" @click="print" :disabled="state.button_print" v-loading="state.loadings">打印</el-button>
<!-- <el-button type="primary" @click="print" :disabled="state.button_print" v-loading="state.loadings">打印</el-button>-->
</div>
</el-row>

View File

@ -505,17 +505,19 @@ const handleQuery = () => {
function getStorageSpec() {
state.queryParams.params.LOCATIONNAME = ''
state.AllLocationList = []
getQueryList({
queryId: 'GetLocationList',
version: 'WEB00001',
params: {
SITENAME: 'SDK',
ERPLOCATION: state.queryParams.params.ERPLOCATION //PO
} as any
}).then((res: any) => {
state.AllLocationList = res.data
locatioNFilter('')
})
if(state.queryParams.params.ERPLOCATION) {
getQueryList({
queryId: 'GetLocationList',
version: 'WEB00001',
params: {
SITENAME: 'SDK',
ERPLOCATION: state.queryParams.params.ERPLOCATION //PO
} as any
}).then((res: any) => {
state.AllLocationList = res.data
locatioNFilter('')
})
}
}
function getGetPrintLabelType() {
@ -547,21 +549,23 @@ function locatioNFilter(query: any) {
function getERPLocation() {
state.queryParams.params.LOCATIONNAME = ''
state.queryParams.params.ERPLOCATION = ''
getQueryList({
// queryId: "GetERPLocationForCreatePO",
queryId: 'GetErpLocationList',
version: 'WEB00001',
params: {
SITENAME: 'SDK',
ERPFACTORYNAME: state.queryParams.params.ERPFACTORY
} as any
}).then((res: any) => {
console.log(res.data)
state.ERPLocationList = res.data
state.ERPLocationList.unshift({
VALUE: '全部'
if (state.queryParams.params.ERPFACTORY) {
getQueryList({
// queryId: "GetERPLocationForCreatePO",
queryId: 'GetErpLocationList',
version: 'WEB00001',
params: {
SITENAME: 'SDK',
ERPFACTORYNAME: state.queryParams.params.ERPFACTORY
} as any
}).then((res: any) => {
console.log(res.data)
state.ERPLocationList = res.data
state.ERPLocationList.unshift({
VALUE: '全部'
})
})
})
}
}
function ERPFactoryQuery() {
@ -611,9 +615,9 @@ function commitDESC_CN() {
.then((res: any) => {
console.log(res.success)
if (res.success) {
// ElMessageBox.alert('', '', {
// confirmButtonText: 'OK',
// })
ElMessageBox.alert('修改实际规格成功', '提醒框', {
confirmButtonText: 'OK',
})
} else {
ElMessageBox.alert(res.message, '提醒框', {
confirmButtonText: 'OK'

View File

@ -133,8 +133,9 @@ function validatePassword(rule: any, value: any, callback: any) {
function getORGFn() {
getORG({ orgNo: null}).then((res: any) => {
console.log(res)
state.orgList = res.resultObj;
if (res && res.resultObj) {
state.orgList = res.resultObj
}
}).catch(() => { });
}
@ -163,6 +164,7 @@ function handleLogin() {
localStorage.removeItem('ut');
localStorage.removeItem('userId');
localStorage.removeItem('userName');
state.loading = true
// 1store
user.login(form)
.then((res) => {
@ -172,8 +174,9 @@ function handleLogin() {
//
console.log(res);
ElMessageBox.alert(res.response.data.message, '提醒框', {
confirmButtonText: 'OK'
})
confirmButtonText: 'OK'
})
state.loading = false
});
} else {
state.loading = false;

View File

@ -1,15 +1,57 @@
<template>
<el-drawer title="新建到货单" size="900px">
<el-row class="page-search" justify="space-between" align="middle">
<el-form ref="queryFormRef" :model="queryParams.params" :inline="true">
<el-form-item label="采购单" prop="RECEIVEREQUESTNAME">
<el-Input v-model="queryParams.params.RECEIVEREQUESTNAME" placeholder="单号" clearable />
</el-form-item>
<el-form ref="queryFormRef" :model="queryParams.params" label-width="60px" label-position="left">
<el-row :gutter="21">
<el-col :span="7">
<el-form-item label="组织" prop="erpFactory">
<el-select v-model="queryParams.params.erpFactory" placeholder="下拉选择" style="width: 160px">
<el-option v-for="item in state.orgList" :key="item.ERPFACTORY" :label="item.DESCRIPTION"
:value="item.ERPFACTORY" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="采购单号" prop="receiveRequestName">
<el-Input v-model="queryParams.params.receiveRequestName" placeholder="单号" clearable />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="订单状态" prop="receiveRequestState">
<el-select v-model="queryParams.params.receiveRequestState" placeholder="下拉选择" style="width: 160px">
<el-option v-for="item in state.orderStatus" :key="item.label" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="料号" prop="materialSpecName">
<el-Input v-model="queryParams.params.materialSpecName" clearable />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="品名" prop="descCn">
<el-Input v-model="queryParams.params.descCn" clearable />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="开始时间" prop="fromDate">
<el-date-picker v-model="queryParams.params.fromDate" value-format="YYYYMMDD" type="date"
placeholder="选择开始时间" />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="结束时间" prop="toDate">
<el-date-picker v-model="queryParams.params.toDate" value-format="YYYYMMDD" type="date"
placeholder="选择结束时间" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="page-search-btns">
<el-button type="primary" @click="queryInfo">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleCreate" v-loading="state.loadings">创建</el-button>
<el-button type="primary" @click="handleCreate" v-loading="state.btnLoading">创建</el-button>
</div>
</el-row>
@ -22,8 +64,13 @@
<el-table border v-loading="loading" :data="state.dataList"
highlight-current-row row-key="id" @selection-change="handleSelection">
<el-table-column type="selection" width="55" />
<el-table-column prop="siteName" label="工厂"/>
<el-table-column prop="receiveRequestName" label="订单编号"/>
<template v-for="(col, index) in column" :key="index">
<el-table-column v-if="!col.hide" :label="col.header" :width="col.width" show-overflow-tooltip>
<template #default="scope">
<span>{{ scope.row[col.field] }}</span>
</template>
</el-table-column>
</template>
</el-table>
<div>
<pagination v-if="total > 0" :total="total" v-model:pageNumTo="queryParams.pageNum"
@ -56,7 +103,8 @@
import { getCurrentInstance, onMounted, reactive, ref, toRefs } from 'vue'
import { ElForm, ElMessageBox, ElTable } from 'element-plus'
import { localStorage } from '@/utils/storage'
import { createDelivery, getPurchase, getReceiveDetail } from '@/api/StockIn'
import { createDelivery, getReceiveList, getReceiveDetail } from '@/api/delivery'
import { getORG } from '@/api/auth'
const queryFormRef = ref(ElForm)
const { proxy }: any = getCurrentInstance()
@ -65,31 +113,78 @@ let state = reactive({
dataList: [] as any, //
total: 0, //
selection: [] as any, //
loadings: false,
btnLoading: false,
loading: true,
receiveLoading: false,
receiveList: [] as any,
column: [] as any,
//
orgList: [] as any,
//
orderStatus: [{
label: "未完成",
value: "Created"
},{
label: "完成",
value: "Completed"
}],
//
queryParams: {
params: {
SITENAME: localStorage.get('siteName') || 'SDK',
RECEIVEREQUESTNAME: '' //
// siteName
siteName: localStorage.get('siteName') || 'SDK',
//
erpFactory: '',
//
receiveRequestName: '',
//
receiveRequestState: '',
//
materialSpecName: '',
//
descCn: '',
//
fromDate: '',
//
toDate: ''
},
pageNum: 1,
pageSize: 10
}
})
const { queryParams, loading, total, receiveLoading } = toRefs(state)
const { queryParams, column, loading, total, receiveLoading } = toRefs(state)
onMounted(()=> {
state.column = [
{ header: "组织", field: "erpFactory", hide: false },
{ header: "组织(CN)", field: "orgName", hide: false },
{ header: "订单编号", field: "receiveRequestName", hide: false },
{ header: "料号", field: "materialSpecName", hide: false },
{ header: "品名", field: "descCn", hide: false },
{ header: "出入库类型编码", field: "receiveRequestType", hide: false },
{ header: "订单状态", field: "receiveRequestState", hide: false },
{ header: "供应商编号", field: "supplierNo", hide: false },
{ header: "单据日期" , field: "orderDate", hide: false},
{ header: "供应商名称", field: "supplierName", hide: false },
{ header: "创建日期", field: "createTime", hide: false },
{ header: "最后操作名称", field: "lastEventName", hide: false },
{ header: "最后操作时间", field: "lastEventTime", hide: false },
{ header: "最后操作人", field: "lastEventUser", hide: false },
{ header: "最后操作注释", field: "lastEventComment", hide: false },
]
//
getORG({ orgNo: null }).then((res: any) => {
state.orgList = res.resultObj
})
handleQuery()
})
//
const handleSelection = (val: any) => {
state.selection = val
state.receiveLoading = true
if (val.length === 0) {
state.receiveList = []
return
}
state.selection = val
state.receiveLoading = true
let nameList: any = []
val.forEach((item: any) => nameList.push(item.receiveRequestName))
//
@ -106,7 +201,8 @@ function queryInfo() {
//
async function handleQuery() {
state.loading = true
await getPurchase(state.queryParams).then((res: any) => {
state.receiveList = []
await getReceiveList(state.queryParams).then((res: any) => {
state.dataList = res.resultObj.list
state.total = res.resultObj.total
state.loading = false
@ -121,17 +217,14 @@ function handleCreate() {
}
let name = "DK" + Date.now()
createDelivery({
receiveRequestName: name,
deliveryName: name,
deliveryType: '01',
siteName: 'SDK',
dataList: state.selection,
receiveList: state.receiveList
}).then((res: any) => {
if (res.success) {
ElMessageBox.alert('创建到货单:' + name, '提醒框', {
confirmButtonText: 'OK'
}).then(() => {
emits('refresh', name)
})
if (res.errorCode == 200) {
proxy.$ElMessage.success(res.message)
emits('refresh', name)
} else {
proxy.$ElMessage.error(res.message)
}
@ -139,6 +232,13 @@ function handleCreate() {
}
function resetQuery() {
queryFormRef.value.resetFields();
state.queryParams.params.erpFactory = '';
state.queryParams.params.receiveRequestName = '';
state.queryParams.params.receiveRequestState = '';
state.queryParams.params.materialSpecName = '';
state.queryParams.params.descCn = '';
state.queryParams.params.fromDate = '';
state.queryParams.params.toDate = '';
queryInfo();
}
</script>

View File

@ -203,7 +203,7 @@ export default {
import { reactive, ref, onMounted, toRefs } from 'vue'
import { ElForm, ElMessageBox, ElTable } from 'element-plus'
import { getQueryList } from '@/api/common'
import { getStoreDetail } from '@/api/StockIn'
import { getStoreDetail } from '@/api/delivery'
import { localStorage } from '@/utils/storage'
import { areAllNotEmpty, msToDate } from '@/utils/CommonUtil'
import {
@ -650,21 +650,27 @@ function handleQuery() {
return
}
getStoreDetail(state.queryParams).then((res: any)=> {
state.MATERIALPACKINGLIST = res.resultObj.storeCharge
state.MATERIALRECEIVEACT = res.resultObj.storeDetail
if (state.MATERIALPACKINGLISTS != '') {
for (const element of state.MATERIALRECEIVEACT) {
if (
element.MATERIALSPECNAME == state.MATERIALPACKINGLISTS.MATERIALSPECNAME &&
element.DESC_CN == state.MATERIALPACKINGLISTS.DESC_CN
) {
element.ERPLOCATION = state.MATERIALPACKINGLISTS.ERPLOCATION
element.ERPLOCATION2 = state.MATERIALPACKINGLISTS.ERPLOCATION2
element.LOCATIONNAME = state.MATERIALPACKINGLISTS.LOCATIONNAME
element.LOCATIONNAME2 = state.MATERIALPACKINGLISTS.LOCATIONNAME2
if (res.resultObj) {
state.MATERIALPACKINGLIST = res.resultObj.storeCharge
state.MATERIALRECEIVEACT = res.resultObj.storeDetail
if (state.MATERIALPACKINGLISTS != '') {
for (const element of state.MATERIALRECEIVEACT) {
if (
element.MATERIALSPECNAME == state.MATERIALPACKINGLISTS.MATERIALSPECNAME &&
element.DESC_CN == state.MATERIALPACKINGLISTS.DESC_CN
) {
element.ERPLOCATION = state.MATERIALPACKINGLISTS.ERPLOCATION
element.ERPLOCATION2 = state.MATERIALPACKINGLISTS.ERPLOCATION2
element.LOCATIONNAME = state.MATERIALPACKINGLISTS.LOCATIONNAME
element.LOCATIONNAME2 = state.MATERIALPACKINGLISTS.LOCATIONNAME2
}
}
state.MATERIALPACKINGLISTS
}
state.MATERIALPACKINGLISTS
} else {
ElMessageBox.alert(res.message, '提醒框', {
confirmButtonText: 'OK'
})
}
}).catch((error: any) => {
ElMessageBox.alert(error.message, '提醒框', {

View File

@ -0,0 +1,196 @@
<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.params" :inline="true" label-width="80px" label-position="left">
<el-row :gutter="20">
<el-col :span="6" class="col_height">
<el-form-item label="到货单类型" prop="deliveryType">
<el-select filterable v-model="queryParams.params.deliveryType" placeholder="到货单类型">
<el-option v-for="item in deliveryType" :key="item.key" :label="item.label" :value="item.key" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6" class="col_height">
<el-form-item label="到货单单号" prop="deliveryName">
<el-Input v-model="queryParams.params.deliveryName" placeholder="输入到货单单号" clearable />
</el-form-item>
</el-col>
<el-col :span="6" class="col_height">
<el-form-item label="到货单状态" prop="deliveryState">
<el-select filterable v-model="queryParams.params.deliveryState" placeholder="到货单状态">
<el-option v-for="item in deliveryState" :key="item.key" :label="item.label" :value="item.key" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="page-search-btns">
<el-button type="primary" @click="queryInfo">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</div>
</el-row>
<!-- table 区域-->
<div class="vue-element-page-table">
<div class="page-table-operate">
<div class="page-table-title">
<div class="page-table-title-left">
<span>到货单管理</span>
</div>
</div>
<div class="page-table-operateBtns">
<el-popover :persistent="false" placement="right" popper-class="config-table-wrap" trigger="click">
<template #reference>
<el-button class="operateBtns-setting">
<svg-icon icon-class="table_title" width="16px" height="16px" />
</el-button>
</template>
<ConfigTable :list="tableConfig.column" @updateList="updateList" />
</el-popover>
</div>
</div>
<el-table :height="tableHeight" border v-loading="loading"
:data="state.dataList" highlight-current-row row-key="id" style="width: 100%"
@selection-change="handleSelection">
<el-table-column type="selection" width="55" />
<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">
<template #default="scope">
<span v-if="col.field === 'deliveryType'">
<span v-for="(item, index) in deliveryType" :key="index">
<span v-if="item.key === scope.row[col.field]" >{{ item.label }}</span>
</span>
</span>
<span v-else-if="col.field === 'deliveryState'">
<span v-for="(item, index) in deliveryState" :key="index">
<span v-if="item.key === scope.row[col.field]" >{{ item.label }}</span>
</span>
</span>
<span v-else>{{ scope.row[col.field] }}</span>
</template>
</el-table-column>
</template>
<el-table-column width="80" label="操作" align="center" class-name="table-operation" fixed="right">
<template #default="scope">
<el-button type="danger" link @click.stop="handleDel(scope.row)"> 删除 </el-button>
</template>
</el-table-column>
</el-table>
<pagination v-if="total > 0" :total="total" v-model:pageNumTo="queryParams.pageNum"
v-model:pageSizeTo="queryParams.pageSize" @pagination="handleQuery" />
</div>
</div>
</template>
<script lang="ts">
export default {
name: 'deliveryNote'
}
</script>
<script lang="ts" setup>
import { reactive, ref, onMounted, toRefs, getCurrentInstance } from 'vue'
import { ElForm, ElMessageBox, ElTable } from 'element-plus'
import { localStorage } from '@/utils/storage'
import { bTableHeight } from '@/composables/calcTableHeight'
import { getDeliveryList } from '@/api/delivery'
import { delDelivery } from '@/api/delivery'
//
const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(310)
const { proxy }: any = getCurrentInstance()
const tableConfig = ref({
loading: false,
column: [] as any,
data: []
})
const queryFormRef = ref(ElForm)
//
const state = reactive({
dataList: [] as any, //
total: 0, //
selection: [] as any, //
loadings: false, //
loading: true, //
//
deliveryType: [{label: '批次到货单', key: '01'}, {label: '辅材到货单', key: '02'}],
deliveryState: [{label: '新建', key: '01'}, {label: '结束', key: '02'}],
//
queryParams: {
params: {
siteName: localStorage.get('siteName') || 'SDK',
//
deliveryName: '',
//
deliveryType: '',
//
deliveryState: ''
},
pageNum: 1,
pageSize: 10
}
})
const { queryParams, total, loading, deliveryType, deliveryState } = toRefs(state)
//
onMounted(() => {
tableConfig.value.column = [
{ header: '工厂', field: 'siteName', hide: false },
{ header: '到货单号', field: 'deliveryName', hide: false },
{ header: '到货单类型', field: 'deliveryType', hide: false },
{ header: '到货单状态', field: 'deliveryState', hide: false }
]
handleQuery()
updateTableHeight()
window.addEventListener('resize', handleResize)
})
//
function queryInfo() {
state.queryParams.pageNum = 1
handleQuery()
}
//
const updateList = (col: any) => {
tableConfig.value.column = col
}
//
const handleSelection = (val: any) => {
state.selection = val
}
//
function handleDel(row: any) {
ElMessageBox.confirm('确认删除?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
distinguishCancelAndClose: true,
type: 'warning',
}).then(() => {
delDelivery(row).then((res: any) => {
if (res.errorCode == 200) {
proxy.$ElMessage.success(res.message)
queryInfo()
} else {
proxy.$ElMessage.error(res.message)
}
})
}).catch(() => {});
}
//
async function handleQuery() {
state.loading = true
await getDeliveryList(state.queryParams).then((res: any) => {
state.dataList = res.resultObj.list
state.total = res.resultObj.total
state.loading = false
})
}
//
function resetQuery() {
queryFormRef.value.resetFields();
handleQuery();
}
</script>
<style>
.col_height {
padding-top: 3.5px;
padding-bottom: 3.5px;
}
</style>