业助审核
This commit is contained in:
parent
a7b7e4e99a
commit
37535f89ff
@ -3,8 +3,18 @@
|
||||
<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="销售订单">
|
||||
<el-Input v-model="state.paramMain.SALESHIPREQUESTNAME" placeholder="输入销售订单" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="col_height">
|
||||
<el-form-item label="销售订单行号">
|
||||
<el-Input v-model="state.paramMain.SALESHIPREQUESTDETAILNAME" placeholder="输入销售订单行号" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="6" class="col_height">
|
||||
<el-form-item label="组织" prop="params.ERPFACTORY">
|
||||
<el-select filterable v-model="queryParams.params.ERPFACTORY" placeholder="下拉选择组织" style="width: 240px"
|
||||
@ -47,7 +57,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="6" class="col_height">
|
||||
<!-- <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>
|
||||
@ -63,18 +73,18 @@
|
||||
<el-form-item label="批次" prop="params.CHARGE">
|
||||
<el-Input v-model="queryParams.params.CHARGE" placeholder="输入批次" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="6" class="col_height">
|
||||
<el-form-item label="SDK规格" prop="params.SPECNAME">
|
||||
<el-Input v-model="queryParams.params.SPECNAME" placeholder="输入SDK规格" clearable />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="6" class="col_height">
|
||||
<el-form-item label="业助" prop="params.SALESPERSON">
|
||||
<!-- <el-col :span="6" class="col_height">
|
||||
<el-form-item label="业助" prop="params.SALESPERSON"> -->
|
||||
<!-- <el-Input v-model="queryParams.params.SALESPERSON" placeholder="输入业助" clearable />-->
|
||||
<el-Input v-model="queryParams.params.CAREER_ASSISTANCE" placeholder="输入业助" clearable />
|
||||
<!-- <el-Input v-model="queryParams.params.CAREER_ASSISTANCE" placeholder="输入业助" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="6">
|
||||
<el-form-item label="入库时间" prop="params.USERNAME">
|
||||
<el-date-picker v-model="queryParams.params.DateValue" type="daterange" unlink-panels range-separator="To"
|
||||
@ -95,10 +105,40 @@
|
||||
</el-form>
|
||||
<div class="page-search-btns" style="margin-bottom: 10px;">
|
||||
<el-button type="primary" @click="queryInfo">搜索</el-button>
|
||||
<el-button type="primary" @click="handleReview">审核</el-button>
|
||||
<!-- <el-button type="primary" @click="exportExcel">导出</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>
|
||||
<el-table :height="tableHeight" border v-loading="state.loadingMain" @row-click="selectRow"
|
||||
:data="state.BoxHistoryMainList" highlight-current-row row-key="id" style="width: 100%">
|
||||
<template v-for="(col, index) in state.columnMain" :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"
|
||||
v-model:pageSizeTo="queryParams.pageSize" @pagination="handleQuery" /> -->
|
||||
<pagination v-if="state.page.total" :total="state.page.total" v-model:pageNumTo="state.page.pageNum"
|
||||
v-model:pageSizeTo="state.page.pageSize" @pagination="handleQueryMian" />
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="vue-element-page-table">
|
||||
<div class="page-table-operate">
|
||||
<div class="page-table-title">
|
||||
@ -142,17 +182,17 @@
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column width="100" label="操作" align="center" class-name="table-operation" fixed="right">
|
||||
<!-- <el-table-column width="100" label="操作" align="center" class-name="table-operation" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-popconfirm v-if="scope.row.IS_CHECK =='N'" title="确定要审核吗?" @confirm="handleCheck(scope.row)">
|
||||
<template #reference>
|
||||
<template #reference> -->
|
||||
<!-- @click.stop="handleUpdate(scope.row)" -->
|
||||
<el-button type="primary" link v-if="!scope.row.status"> 审核
|
||||
<!-- <el-button type="primary" link v-if="!scope.row.status"> 审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<!-- <template v-slot:empty>-->
|
||||
<!-- <svg-icon icon-class="noData" width="160px" height="160px" />-->
|
||||
<!-- </template>-->
|
||||
@ -206,7 +246,6 @@
|
||||
<!-- </el-form>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<el-row :gutter="24" class="page-search" justify="space-between" align="bottom">
|
||||
<el-form
|
||||
ref="formDataRef"
|
||||
@ -214,7 +253,7 @@
|
||||
:rules="rules"
|
||||
label-position="left"
|
||||
>
|
||||
<el-form-item label="" prop="CAREER_ASSISTANCE">
|
||||
<el-form-item label="" prop="CAREER_ASSISTANCE" style="margin-left: 15px;">
|
||||
<el-col :span="5">
|
||||
<div class="block" style="float: right">
|
||||
<el-form-item label="过账日期" prop="state.commitDate">
|
||||
@ -232,8 +271,6 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
@ -279,6 +316,18 @@ const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableH
|
||||
CAREER_ASSISTANCE : '',
|
||||
CHARGE : '',
|
||||
} ,
|
||||
columnMain: [] as any,
|
||||
loadingMain: false,
|
||||
active_row: {},
|
||||
page: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
},
|
||||
paramMain: {
|
||||
SALESHIPREQUESTNAME: '',
|
||||
SALESHIPREQUESTDETAILNAME: '',
|
||||
},
|
||||
boxDrawer :false,
|
||||
PhaseList: [{ label: '全部', Value: '' }, { label: 'C', Value: 'C' }, { label: 'D', Value: 'D' }, { label: 'S', Value: 'S' }] as any,
|
||||
ChangeERPLocation: [],
|
||||
@ -306,7 +355,8 @@ const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableH
|
||||
FROMDATE: '',
|
||||
TODATE: '',
|
||||
CAREER_ASSISTANCE :'',
|
||||
USERID: localStorage.get('userId')
|
||||
USERID: localStorage.get('userId'),
|
||||
MAIN_ID: "",
|
||||
},
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
@ -347,6 +397,7 @@ const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableH
|
||||
total: 0,
|
||||
loading: false,
|
||||
BoxHistoryList: [] as any,
|
||||
BoxHistoryMainList: [] as any,
|
||||
StockStateList: [] as any,
|
||||
ERPFactoryList: [] as any,
|
||||
ERPLocationList: [] as any,
|
||||
@ -440,9 +491,6 @@ const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableH
|
||||
if (day < 10) day = '0' + day
|
||||
state.commitDate = year + '-' + moth + '-' + day
|
||||
materialTableConfig.value.column = [
|
||||
|
||||
|
||||
|
||||
// { header: "组织", field: "ERPFACTORY", hide: false },
|
||||
// { header: "组织(CN)", field: "ERPFACTORYDESC", hide: false },
|
||||
|
||||
@ -490,18 +538,54 @@ const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableH
|
||||
// { header: "WMS唯一码", field: "MATERIALPACKINGNAME", hide: false },
|
||||
// { header: "备注", field: "REMARK", hide: false },
|
||||
];
|
||||
|
||||
state.columnMain = [
|
||||
{ header: "ID", field: "id", hide: true },
|
||||
{ header: "业助", field: "CAREER_ASSISTANCE", hide: false },
|
||||
{ header: "状态", field: "STATUS", hide: false },
|
||||
{ header: "销售订单", field: "SALESHIPREQUESTNAME", hide: false },
|
||||
{ header: "销售订单行号", field: "SALESHIPREQUESTDETAILNAME", hide: false },
|
||||
]
|
||||
let pwd: any = localStorage.get('remeberPwd');
|
||||
// state.orgNo = JSON.parse(pwd).orgNo;
|
||||
// state.queryParams.params.ERPFACTORY = JSON.parse(pwd).orgNo;
|
||||
|
||||
handleQuery();
|
||||
// handleQuery();
|
||||
ERPFactoryQuery();
|
||||
// ERPLocationQuery();
|
||||
|
||||
handleQueryMian();
|
||||
updateTableHeight();
|
||||
window.addEventListener('resize', handleResize);
|
||||
});
|
||||
|
||||
function handleReview() {
|
||||
if(state.BoxHistoryList.length <= 0) {
|
||||
ElMessageBox.alert('列表为空', {
|
||||
confirmButtonText: 'OK',
|
||||
})
|
||||
return
|
||||
}
|
||||
let paramList = [] as any;
|
||||
state.BoxHistoryList.forEach(item => {
|
||||
paramList.push({
|
||||
...item,
|
||||
IS_CHECK: 'Y',
|
||||
user: localStorage.get('userId'),
|
||||
SITENAME: 'SDK',
|
||||
commitDate: state.commitDate
|
||||
})
|
||||
})
|
||||
checkMaterialPack(paramList)
|
||||
.then((res: any) => {
|
||||
if (res.success) {
|
||||
proxy.$ElMessage.success('审核成功')
|
||||
handleQueryMian();
|
||||
} else {
|
||||
proxy.$ElMessage.warning(res.message)
|
||||
}
|
||||
}).catch(() => { })
|
||||
}
|
||||
|
||||
function handleCheck(row: any) {
|
||||
state.dialog = {
|
||||
title: "物料信息维护",
|
||||
@ -510,17 +594,21 @@ const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableH
|
||||
};
|
||||
// state.selectItem = row;
|
||||
state.formData = {...row};
|
||||
state.formData.IS_CHECK = "Y"
|
||||
checkMaterialPack({...state.formData, user: localStorage.get('userId'),SITENAME: 'SDK'})
|
||||
state.formData.IS_CHECK = "Y";
|
||||
state.formData.user = localStorage.get('userId');
|
||||
state.formData.SITENAME = 'SDK';
|
||||
checkMaterialPack([state.formData])
|
||||
.then((res: any) => {
|
||||
dialog.value.visible = false;
|
||||
handleQuery();
|
||||
handleQueryMian();
|
||||
}).then(() => proxy.$ElMessage.success('审核成功'))
|
||||
.catch(() => { })
|
||||
}
|
||||
function queryInfo () {
|
||||
state.queryParams.pageNum = 1
|
||||
handleQuery();
|
||||
// handleQuery();
|
||||
state.page.pageNum = 1;
|
||||
handleQueryMian();
|
||||
}
|
||||
const updateList = (col: any) => {
|
||||
materialTableConfig.value.column = col
|
||||
@ -600,6 +688,7 @@ const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableH
|
||||
.catch(() => { });
|
||||
}
|
||||
async function handleQuery() {
|
||||
state.loading = true
|
||||
if (state.queryParams.params.DateValue.length > 0) {
|
||||
state.queryParams.params.UNDOID = msToDate(state.queryParams.params.DateValue[0]).withoutTime
|
||||
state.queryParams.params.TODATE = msToDate(state.queryParams.params.DateValue[1]).withoutTime
|
||||
@ -617,6 +706,7 @@ const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableH
|
||||
state.queryParams.version = 'WEB00035'
|
||||
await getQueryPageList(state.queryParams)
|
||||
.then((res: any) => {
|
||||
state.loading = false
|
||||
if (res.data.list.length > 0) {
|
||||
state.BoxHistoryList = res.data.list
|
||||
state.total = res.data.total
|
||||
@ -788,6 +878,42 @@ const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableH
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function handleQueryMian() {
|
||||
state.loadingMain = true
|
||||
state.BoxHistoryMainList = []
|
||||
state.BoxHistoryList = []
|
||||
state.total = 0;
|
||||
queryFormRef.value.validate((isValid: boolean) => {
|
||||
if (isValid) {
|
||||
getQueryPageList({
|
||||
queryId: "GetMaterialPackingCheckMainList",
|
||||
version: "10001",
|
||||
params: {
|
||||
userName: localStorage.get('userName'),
|
||||
...state.paramMain
|
||||
},
|
||||
pageNum: state.page.pageNum,
|
||||
pageSize: state.page.pageSize,
|
||||
}).then((res: any) => {
|
||||
state.loadingMain = false
|
||||
state.BoxHistoryMainList = res.data.list;
|
||||
state.page.total = res.data.total;
|
||||
if (state.BoxHistoryMainList.length > 0) {
|
||||
state.queryParams.params.MAIN_ID = state.BoxHistoryMainList[0].ID
|
||||
if (state.queryParams.params.MAIN_ID) {
|
||||
handleQuery()
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function selectRow(row: any) {
|
||||
state.queryParams.params.MAIN_ID = row.ID
|
||||
handleQuery()
|
||||
}
|
||||
</script>
|
||||
<!--style 区域-->
|
||||
<style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user