入库整理多查询
parent
c62071abd0
commit
7552e44751
|
|
@ -0,0 +1,11 @@
|
||||||
|
<script setup>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
$END$
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
@ -25,12 +25,12 @@
|
||||||
|
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="工厂:">
|
<el-form-item label="工厂:">
|
||||||
<el-select v-model="param.PROP_C9" multiple filterable placeholder="请选择工厂" style="width: 100%;">
|
<el-select v-model="param.PROP_C9" multiple filterable placeholder="请选择工厂" style="width: 100%;">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in PROP_C9S"
|
v-for="item in Plant"
|
||||||
:key="item.label"
|
:key="item.ID"
|
||||||
:label="item.value"
|
:label="item.PROP_C9"
|
||||||
:value="item.value"
|
:value="item.PROP_C9"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -39,12 +39,12 @@
|
||||||
|
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="LOC:">
|
<el-form-item label="LOC:">
|
||||||
<el-select v-model="param.PROP_C2" multiple placeholder="请选择LOC" style="width: 100%;">
|
<el-select v-model="param.PROP_C2" multiple filterable placeholder="请选择LOC" style="width: 100%;">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in PROP_C2S"
|
v-for="item in LOCS"
|
||||||
:key="item.label"
|
:key="item.ID"
|
||||||
:label="item.value"
|
:label="item.PROP_C2"
|
||||||
:value="item.value"
|
:value="item.PROP_C2"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="批次号:">
|
<el-form-item label="批次号:">
|
||||||
<el-input type="textarea" v-model="param.PROP_C2" :rows="1"></el-input>
|
<el-input type="textarea" v-model="param.PROP_C1" :rows="1"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="收货日期:">
|
<el-form-item label="收货日期:">
|
||||||
<el-date-picker style="width: 325px"
|
<el-date-picker style="width: 325px"
|
||||||
v-model="ORDER_DATE"
|
v-model="param.ORDER_DATE"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
align="right"
|
align="right"
|
||||||
unlink-panels
|
unlink-panels
|
||||||
|
|
@ -77,7 +77,7 @@
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="整理日期:">
|
<el-form-item label="整理日期:">
|
||||||
<el-date-picker style="width: 325px"
|
<el-date-picker style="width: 325px"
|
||||||
v-model="RECEIVE_DATE"
|
v-model="param.RECEIVE_DATE"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
align="right"
|
align="right"
|
||||||
unlink-panels
|
unlink-panels
|
||||||
|
|
@ -545,16 +545,17 @@ export default {
|
||||||
PROP_C1: '',
|
PROP_C1: '',
|
||||||
PROP_C3: '',
|
PROP_C3: '',
|
||||||
CODE: '',
|
CODE: '',
|
||||||
PROP_C2: [],
|
|
||||||
PROP_C9: [],
|
PROP_C9: [],
|
||||||
|
PROP_C2: [],
|
||||||
|
//整理日期
|
||||||
|
RECEIVE_DATE: [],
|
||||||
|
//收货日期
|
||||||
|
ORDER_DATE: [],
|
||||||
},
|
},
|
||||||
//整理日期
|
Plant: [],
|
||||||
RECEIVE_DATE: [],
|
LOCS: [],
|
||||||
//收货日期
|
|
||||||
ORDER_DATE: [],
|
|
||||||
checked: false,
|
checked: false,
|
||||||
zh:'',
|
zh:'',
|
||||||
|
|
||||||
PROP_C2S: [
|
PROP_C2S: [
|
||||||
{
|
{
|
||||||
label: '1',
|
label: '1',
|
||||||
|
|
@ -566,16 +567,6 @@ export default {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
PROP_C9S: [
|
|
||||||
{
|
|
||||||
label: '1',
|
|
||||||
value: '马云'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '0',
|
|
||||||
value: '阿里'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
form: {
|
form: {
|
||||||
id: '',
|
id: '',
|
||||||
userNo: '',
|
userNo: '',
|
||||||
|
|
@ -603,6 +594,9 @@ export default {
|
||||||
centerDialogVisible: false,
|
centerDialogVisible: false,
|
||||||
title:''
|
title:''
|
||||||
}
|
}
|
||||||
|
},mounted() {
|
||||||
|
this.PlantS();
|
||||||
|
this.LOC();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleEdit(index, row) {
|
handleEdit(index, row) {
|
||||||
|
|
@ -622,20 +616,44 @@ export default {
|
||||||
this.pageNum = val;
|
this.pageNum = val;
|
||||||
this.queryUser();
|
this.queryUser();
|
||||||
},
|
},
|
||||||
|
LOC(){
|
||||||
|
//LOC下拉列表数据加载
|
||||||
|
this.$axios.post(this.$httpUrl + '/user/LOC', {
|
||||||
|
|
||||||
|
}).then(res => res.data)
|
||||||
|
.then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.LOCS = res.data;
|
||||||
|
} else {
|
||||||
|
this.$message.error('获取数据失败');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (err) {
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
PlantS(){
|
||||||
|
//工厂下拉列表数据加载
|
||||||
|
this.$axios.post(this.$httpUrl + '/user/Plant', {
|
||||||
|
|
||||||
|
}).then(res => res.data)
|
||||||
|
.then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.Plant = res.data;
|
||||||
|
} else {
|
||||||
|
this.$message.error('获取数据失败');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (err) {
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
},
|
||||||
queryUser() {
|
queryUser() {
|
||||||
|
|
||||||
console.log(this.RECEIVE_DATE[0]);
|
|
||||||
console.log(this.ORDER_DATE[0]);
|
|
||||||
|
|
||||||
//列表数据加载
|
//列表数据加载
|
||||||
this.$axios.post(this.$httpUrl + '/user/queryUser', {
|
this.$axios.post(this.$httpUrl + '/user/queryUser', {
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
pageNum: this.pageNum,
|
pageNum: this.pageNum,
|
||||||
param: this.param,
|
param: this.param,
|
||||||
PROP_C2: this.PROP_C2,
|
|
||||||
PROP_C9: this.PROP_C9,
|
|
||||||
RECEIVE_DATE: this.RECEIVE_DATE,
|
|
||||||
ORDER_DATE: this.ORDER_DATE
|
|
||||||
}).then(res => res.data)
|
}).then(res => res.data)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|
@ -1,470 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="div1">
|
|
||||||
|
|
||||||
<div class="div2" style="padding-bottom: 10px">
|
|
||||||
<div style="float: right">
|
|
||||||
<el-select v-model="xb" clearable filterable placeholder="请选择性别" style="width: 100px">
|
|
||||||
<el-option
|
|
||||||
v-for="item in xbs"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
|
|
||||||
<el-input v-model="name"
|
|
||||||
placeholder="请输入姓名"
|
|
||||||
style="width: 200px;margin-left: 5px"
|
|
||||||
|
|
||||||
class="input-with-select"
|
|
||||||
@keyup.enter.native="queryUser">
|
|
||||||
|
|
||||||
<el-button class="el-input-group__prepend" slot="append" icon="el-icon-search" @click="queryUser"></el-button>
|
|
||||||
</el-input>
|
|
||||||
|
|
||||||
<el-button type="success" icon="el-icon-refresh-left" style="margin-left: 5px;" @click="rest">重置</el-button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="div3" style="">
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
|
|
||||||
<el-button type="success" icon="el-icon-edit" @click="mod">编辑</el-button>
|
|
||||||
<el-button type="danger" icon="el-icon-delete" @click="del">删除</el-button>
|
|
||||||
<el-button type="warning" icon="el-icon-download" @click="exportExcel">导出</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-dialog :title="title"
|
|
||||||
:visible.sync="centerDialogVisible"
|
|
||||||
width="30%"
|
|
||||||
:before-close="handleClose"
|
|
||||||
center>
|
|
||||||
<el-form ref="form"
|
|
||||||
:model="form"
|
|
||||||
:rules="rules"
|
|
||||||
label-width="80px">
|
|
||||||
|
|
||||||
<el-form-item label="账号" prop="userNo">
|
|
||||||
<el-input v-model="form.userNo" style="width: 300px;"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="姓名" prop="userName">
|
|
||||||
<el-input v-model="form.userName" style="width: 300px;"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="年龄" prop="age">
|
|
||||||
<el-input v-model.number="form.age" style="width: 300px;" autocomplete="off"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="性别">
|
|
||||||
<el-radio-group v-model="form.sex">
|
|
||||||
<el-radio label='1'>男</el-radio>
|
|
||||||
<el-radio label='0'>女</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="电话" prop="phone">
|
|
||||||
<el-input v-model="form.phone" style="width: 300px;"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="cancelDialog">取 消</el-button>
|
|
||||||
<el-button type="primary" @click="addUser">确 定</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
|
|
||||||
<el-table
|
|
||||||
:header-cell-style="{background:'#000',color:'#fff'}"
|
|
||||||
:data="tableData"
|
|
||||||
id="educe-table"
|
|
||||||
ref="tableData"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
@select="selectionRow"
|
|
||||||
style="width: 100%;">
|
|
||||||
<el-table-column
|
|
||||||
type="selection"
|
|
||||||
width="55">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
fixed
|
|
||||||
label="序号"
|
|
||||||
v-if="false"
|
|
||||||
width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="margin-left: 10px">{{ scope.row.id }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
fixed
|
|
||||||
label="账号"
|
|
||||||
width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-popover trigger="hover" placement="top">
|
|
||||||
<p>账号: {{ scope.row.userNo }}</p>
|
|
||||||
<p>电话: {{ scope.row.phone }}</p>
|
|
||||||
<div slot="reference" class="name-wrapper">
|
|
||||||
<el-tag size="medium">{{ scope.row.userNo }}</el-tag>
|
|
||||||
</div>
|
|
||||||
</el-popover>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="姓名"
|
|
||||||
width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div slot="reference" class="name-wrapper">
|
|
||||||
<span>{{ scope.row.userName }}</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="年龄"
|
|
||||||
width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div slot="reference" class="name-wrapper">
|
|
||||||
<span>{{ scope.row.age }}</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="电话"
|
|
||||||
width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div slot="reference" class="name-wrapper">
|
|
||||||
<span>{{ scope.row.phone }}</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="性别"
|
|
||||||
width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
|
|
||||||
<div slot="reference" class="name-wrapper">
|
|
||||||
<el-tag size="medium" :type="scope.row.sex ===0 ? 'primary' : 'success'">
|
|
||||||
{{ scope.row.sex === 0 ? '女' : '男' }}
|
|
||||||
</el-tag>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="角色"
|
|
||||||
width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div slot="reference" class="name-wrapper">
|
|
||||||
<el-tag size="medium"
|
|
||||||
:type="scope.row.roleId ===0 ? 'danger' : (scope.row.roleId ===1 ? 'primary':'success') ">
|
|
||||||
{{ scope.row.roleId === 0 ? '超级管理员' : (scope.row.roleId === 1 ? '管理员' : '用户') }}
|
|
||||||
</el-tag>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
fixed="right"
|
|
||||||
label="操作"
|
|
||||||
width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<!-- <el-button
|
|
||||||
size="small"
|
|
||||||
@click="handleEdit(scope.$index, scope.row)">编辑
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
size="small"
|
|
||||||
type="danger"
|
|
||||||
@click="handleDelete(scope.$index, scope.row)">删除
|
|
||||||
</el-button>-->
|
|
||||||
<el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
|
|
||||||
<el-button type="text" size="small" @click="editUser(scope.row)">编辑</el-button>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<el-pagination
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
:current-page="pageNum"
|
|
||||||
:page-sizes="[10, 50, 150, 200]"
|
|
||||||
:page-size="pageSize"
|
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
|
||||||
:total="total">
|
|
||||||
</el-pagination>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import {outFile} from "@/util/excel.vue";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "Main",
|
|
||||||
data() {
|
|
||||||
//验证账号
|
|
||||||
let checkuserNo = (rule, value, callback) => {
|
|
||||||
let id=0;
|
|
||||||
if(this.form.id>0){
|
|
||||||
id=this.form.id;
|
|
||||||
}
|
|
||||||
this.$axios.get(this.$httpUrl + '/user/queryuserNo?id='+id+'&userNo='+ this.form.userNo).then(res => res.data)
|
|
||||||
.then(res => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
callback(new Error(this.form.userNo + '账号已存在!'));
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
return {
|
|
||||||
tableData: [],
|
|
||||||
pageSize: 10,
|
|
||||||
pageNum: 1,
|
|
||||||
total: 3,
|
|
||||||
name: '',
|
|
||||||
xb: '',
|
|
||||||
zh:'',
|
|
||||||
xbs: [
|
|
||||||
{
|
|
||||||
value: '1',
|
|
||||||
label: '男'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: '0',
|
|
||||||
label: '女'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
form: {
|
|
||||||
id: '',
|
|
||||||
userNo: '',
|
|
||||||
userName: '',
|
|
||||||
passWord:'123456',
|
|
||||||
age: '',
|
|
||||||
sex: '1',
|
|
||||||
phone: '',
|
|
||||||
roleId: '2'
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
userNo: [
|
|
||||||
{required: true, message: '请输入账号', trigger: 'blur'},
|
|
||||||
{ validator: checkuserNo, trigger: 'blur' }
|
|
||||||
],
|
|
||||||
userName: [
|
|
||||||
{required: true, message: '请输入姓名', trigger: 'blur'},
|
|
||||||
],
|
|
||||||
age: [
|
|
||||||
{required: true, message: '年龄不能为空'},
|
|
||||||
{type: 'number', message: '年龄必须为数字值'}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
multipleSelection:[],
|
|
||||||
centerDialogVisible: false,
|
|
||||||
title:''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handleEdit(index, row) {
|
|
||||||
console.log(index, row);
|
|
||||||
},
|
|
||||||
handleDelete(index, row) {
|
|
||||||
console.log(index, row);
|
|
||||||
},
|
|
||||||
handleSizeChange(val) {
|
|
||||||
console.log(`每页 ${val} 条`);
|
|
||||||
this.pageNum = 1;
|
|
||||||
this.pageSize = val;
|
|
||||||
this.queryUser();
|
|
||||||
},
|
|
||||||
handleCurrentChange(val) {
|
|
||||||
console.log(`当前页: ${val}`);
|
|
||||||
this.pageNum = val;
|
|
||||||
this.queryUser();
|
|
||||||
},
|
|
||||||
queryUser() {
|
|
||||||
//列表数据加载
|
|
||||||
this.$axios.post(this.$httpUrl + '/user/queryUser', {
|
|
||||||
pageSize: this.pageSize,
|
|
||||||
pageNum: this.pageNum,
|
|
||||||
param: {
|
|
||||||
name: this.name,
|
|
||||||
xb: this.xb
|
|
||||||
}
|
|
||||||
}).then(res => res.data)
|
|
||||||
.then(res => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
this.tableData = res.data
|
|
||||||
this.total = res.total
|
|
||||||
} else {
|
|
||||||
this.$message.error('获取数据失败');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
.catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
rest() {
|
|
||||||
//表单重置
|
|
||||||
this.name = '',
|
|
||||||
this.xb = ''
|
|
||||||
},
|
|
||||||
add() {
|
|
||||||
//点击新增按弹窗
|
|
||||||
this.title="新增用户"
|
|
||||||
this.centerDialogVisible = true;
|
|
||||||
//重置表单信息
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.resetForm()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
resetForm() {
|
|
||||||
this.$refs["form"].resetFields();
|
|
||||||
this.$data.form=JSON.parse(JSON.stringify(this.$options.data().form))
|
|
||||||
},
|
|
||||||
handleClose(){
|
|
||||||
//关闭对话框
|
|
||||||
this.centerDialogVisible=false;
|
|
||||||
this.form.sex='1';
|
|
||||||
},
|
|
||||||
cancelDialog(){
|
|
||||||
//取消对话框
|
|
||||||
this.centerDialogVisible=false;
|
|
||||||
this.resetForm();
|
|
||||||
this.form.sex='1';
|
|
||||||
this.$refs.tableData.clearSelection()
|
|
||||||
},
|
|
||||||
addUser() {
|
|
||||||
//新增用户
|
|
||||||
this.$refs["form"].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
|
|
||||||
this.$axios.post(this.$httpUrl + '/user/addorupdate', this.form).then(res => res.data)
|
|
||||||
.then(res => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
this.$message({
|
|
||||||
message: res.msg,
|
|
||||||
type: 'success'
|
|
||||||
});
|
|
||||||
this.centerDialogVisible = false;//退出新增窗体
|
|
||||||
this.queryUser();//刷新列表
|
|
||||||
this.resetForm();
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.msg);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
editUser(row){
|
|
||||||
//编辑
|
|
||||||
this.title="编辑用户"
|
|
||||||
this.centerDialogVisible = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.form=JSON.parse(JSON.stringify(row));
|
|
||||||
this.form.sex=row.sex+''
|
|
||||||
this.$refs.tableData.toggleRowSelection(row, true);//编辑时勾选
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleSelectionChange(val) {
|
|
||||||
this.multipleSelection = val;
|
|
||||||
let planIdList = [];
|
|
||||||
for (let item of this.multipleSelection) {
|
|
||||||
planIdList.push(item.id);
|
|
||||||
}
|
|
||||||
console.log(planIdList);
|
|
||||||
},
|
|
||||||
selectionRow(selection,row){
|
|
||||||
|
|
||||||
},
|
|
||||||
mod(){
|
|
||||||
//编辑
|
|
||||||
if(this.$refs.tableData.selection.length==1){
|
|
||||||
this.title="编辑用户"
|
|
||||||
this.centerDialogVisible = true;
|
|
||||||
for (let item of this.multipleSelection) {
|
|
||||||
this.form=JSON.parse(JSON.stringify(item));
|
|
||||||
this.form.sex=item.sex+''
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
this.$message.error('请选中一条记录!');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
del(){
|
|
||||||
//删除
|
|
||||||
if(this.$refs.tableData.selection.length==0){
|
|
||||||
this.$message.error('请至少选中一条记录!');
|
|
||||||
}else{
|
|
||||||
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
let ids=[];
|
|
||||||
for (let item of this.multipleSelection) {
|
|
||||||
ids.push(item.id)
|
|
||||||
}
|
|
||||||
this.$axios.get(this.$httpUrl + '/user/deleteUser?ids='+ids.toString()).then(res => res.data)
|
|
||||||
.then(res => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
this.$message({
|
|
||||||
message: res.msg,
|
|
||||||
type: 'success'
|
|
||||||
});
|
|
||||||
this.queryUser()//刷新数据
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.msg);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message({
|
|
||||||
type: 'info',
|
|
||||||
message: '已取消删除'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
exportExcel(){
|
|
||||||
this.fixs = false
|
|
||||||
this.$nextTick(() => {
|
|
||||||
outFile('educe-table', '(用户)')
|
|
||||||
this.fixs = true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
beforeMount() {
|
|
||||||
this.queryUser();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
package com.yc.wms.bean;
|
|
||||||
|
|
||||||
public class DcxBean1 {
|
|
||||||
public String [] PROP_C9;
|
|
||||||
|
|
||||||
public String sourceId;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.yc.wms.bean;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class DcxBean1 {
|
||||||
|
//工厂
|
||||||
|
public String [] PROP_C9;
|
||||||
|
|
||||||
|
//LOC
|
||||||
|
public String [] PROP_C2;
|
||||||
|
|
||||||
|
//整理日期
|
||||||
|
public Date[] RECEIVE_DATE;
|
||||||
|
//收货日期
|
||||||
|
public Date [] ORDER_DATE;
|
||||||
|
|
||||||
|
//采购单号
|
||||||
|
public String sourceId;
|
||||||
|
|
||||||
|
//收货凭证
|
||||||
|
public String strBill7;
|
||||||
|
|
||||||
|
//料号
|
||||||
|
public String code;
|
||||||
|
|
||||||
|
//批次号
|
||||||
|
public String PROP_C1;
|
||||||
|
|
||||||
|
//特殊标记
|
||||||
|
public String PROP_C3;
|
||||||
|
|
||||||
|
//SAP接口
|
||||||
|
public String CODE;
|
||||||
|
|
||||||
|
//加急标记
|
||||||
|
public String strBill11;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
package com.yc.wms.bean;public class Zhengliqingdan {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
package com.yc.wms.controller;public class RukuzhengliController {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
package com.yc.wms.controller;public class ZhengliqingdanController {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.yc.wms.service;
|
||||||
|
|
||||||
|
import com.yc.wms.until.Result;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 入库整理:
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wms
|
||||||
|
* @since 2023-04-01
|
||||||
|
*/
|
||||||
|
public interface Rukuzhengli {
|
||||||
|
//查询下拉列表工厂
|
||||||
|
Result Plant();
|
||||||
|
|
||||||
|
//查询下拉列表
|
||||||
|
Result LOC();
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package com.yc.wms.service;
|
package com.yc.wms.service;
|
||||||
|
|
||||||
|
|
||||||
import com.yc.wms.bean.DcxBean1;
|
import com.yc.wms.bean.Rukuzhengli;
|
||||||
import com.yc.wms.until.QueryPageUtil;
|
import com.yc.wms.until.QueryPageUtil;
|
||||||
import com.yc.wms.until.Result;
|
import com.yc.wms.until.Result;
|
||||||
|
|
||||||
|
|
@ -14,11 +14,6 @@ import com.yc.wms.until.Result;
|
||||||
* @since 2023-03-04
|
* @since 2023-03-04
|
||||||
*/
|
*/
|
||||||
public interface DcxService {
|
public interface DcxService {
|
||||||
Result readJson(QueryPageUtil query, DcxBean1 bean1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,83 +0,0 @@
|
||||||
package com.yc.wms.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.json.JSONArray;
|
|
||||||
import cn.hutool.json.JSONObject;
|
|
||||||
import com.yc.wms.bean.DcxBean1;
|
|
||||||
import com.yc.wms.service.DcxService;
|
|
||||||
import com.yc.wms.until.QueryPageUtil;
|
|
||||||
import com.yc.wms.until.Result;
|
|
||||||
import com.yc.wms.until.SpringContextHolder;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
|
|
||||||
import org.springframework.jdbc.object.SqlQuery;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import javax.persistence.EntityManager;
|
|
||||||
import javax.persistence.Query;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@Slf4j
|
|
||||||
public class DcxServiceImpl implements DcxService {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private NamedParameterJdbcTemplate jdbcTemplate;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result readJson(QueryPageUtil query,DcxBean1 dcxBean1) {
|
|
||||||
|
|
||||||
|
|
||||||
int pageNum = query.getPageNum();//当前页
|
|
||||||
int pageSize = query.getPageSize();//条数
|
|
||||||
//这里到时候记得自己加 判空
|
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
||||||
//System.out.println(map);
|
|
||||||
|
|
||||||
// String startDate = simpleDateFormat.format(query.getStartDate());
|
|
||||||
|
|
||||||
String sql_bz = "SELECT ROW_NUMBER() OVER(ORDER BY rd.id) AS Row_Num,rd.id,ad.sourceId,ad.strBill7,ad.strBill8,\n" +
|
|
||||||
"i.CODE,i.NAME,i.UNIT,a.ORDER_DATE,rd.RECEIVE_DATE,\n" +
|
|
||||||
"rd.OPERATOR,z.NAME z_name,s.LP,ik.PROP_C1,ik.PROP_C2,\n" +
|
|
||||||
"ik.PROP_C3,ik.PROP_C5,ik.PROP_C8,ik.PROP_C9,\n" +
|
|
||||||
"rd.BAR_CODE,rd.BE_MOVED,ad.description\n" +
|
|
||||||
"FROM RECEIVED_RECORD rd \n" +
|
|
||||||
"LEFT JOIN ASN_DETAIL ad ON ad.id = rd.ASN_DETAIL_ID\n" +
|
|
||||||
"LEFT JOIN asn a ON a.ID = ad.ASN_ID\n" +
|
|
||||||
"LEFT JOIN ITEM_KEY ik ON ik.id = rd.ITEM_KEY_ID\n" +
|
|
||||||
"LEFT JOIN ITEM i ON i.id = ad.ITEM_ID\n" +
|
|
||||||
"LEFT JOIN stock s ON s.id = rd.SRC_LP\n" +
|
|
||||||
"LEFT JOIN WORKER w ON w.id = rd.WORKER_ID\n" +
|
|
||||||
"LEFT JOIN [ZONE] z ON z.id = rd.WAREHOUSE_AREA_ID " +
|
|
||||||
" where 1=1";
|
|
||||||
|
|
||||||
//查询条件
|
|
||||||
//采购订单
|
|
||||||
if(map.get("sourceId")!=null&&!map.get("sourceId").toString().equals("")){
|
|
||||||
sql_bz+=" and ad.sourceId ="+"'"+map.get("sourceId").toString()+"'";
|
|
||||||
}
|
|
||||||
//收货凭证
|
|
||||||
if(map.get("strBill7")!=null&&!map.get("strBill7").toString().equals("")){
|
|
||||||
sql_bz+=" and ad.strBill7 ="+"'"+map.get("strBill7").toString()+"'";
|
|
||||||
}
|
|
||||||
|
|
||||||
String sqlCount = "select count(t.id) as nums from(" + sql_bz+") t";
|
|
||||||
String sqlFy = "select t.* from(" + sql_bz+") t";
|
|
||||||
sqlFy+= " WHERE Row_Num BETWEEN " + (pageNum-1) * pageSize + " AND " + (pageNum) * pageSize;
|
|
||||||
//查询单数据
|
|
||||||
Map<String,Object> listCount = jdbcTemplate.queryForMap(sqlCount, new HashMap<>());
|
|
||||||
//查询多条数据据
|
|
||||||
List<Map<String,Object>> maps = jdbcTemplate.queryForList(sqlFy, new HashMap<>());
|
|
||||||
System.out.println(maps);
|
|
||||||
|
|
||||||
return Result.success(Long.parseLong(listCount.get("nums").toString()),maps);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
package com.yc.wms.service.impl;public class RukuzhengliImpl {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.yc.wms.service.impl;
|
||||||
|
|
||||||
|
import com.yc.wms.bean.Rukuzhengli;
|
||||||
|
import com.yc.wms.service.DcxService;
|
||||||
|
import com.yc.wms.until.QueryPageUtil;
|
||||||
|
import com.yc.wms.until.Result;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class DcxServiceImpl implements DcxService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue