WMS系统功能添加

This commit is contained in:
赵正易
2024-03-11 11:26:56 +08:00
parent ef18db877d
commit f2d2192cd9
40 changed files with 714 additions and 266 deletions

View File

@@ -25,3 +25,6 @@ export default {
},
};
</script>
<style lang="stylus">
@import "./style/base.styl"
</style>

View File

@@ -46,6 +46,7 @@ import WmsWarehouseCascader from '@/components/WmsWarehouseCascader';
import WmsCarrierSelect from "@/components/WmsCarrierSelect/index.vue";
import DictRadio from '@/components/DictRadio';
import DictSelect from '@/components/DictSelect';
import vuePlugsPrint from '@/utils/vuePlugsPrint'
import KrPrintDesigner from "kr-print-designer";
import "kr-print-designer/lib/kr-print-designer.css";
@@ -102,6 +103,7 @@ Vue.component('WmsCarrierSelect', WmsCarrierSelect)
Vue.component('DictRadio', DictRadio)
Vue.component('DictSelect', DictSelect)
Vue.component('WmsWarehouseCascader', WmsWarehouseCascader)
Vue.use(vuePlugsPrint);
Vue.use(KrPrintDesigner);
Vue.use(permission)

View File

@@ -3,7 +3,7 @@ module.exports = {
* 框架版本号
*/
version: '3.8.1',
title: '上海干巷MES',
title: '上海干巷MOM',
/**
* 主题颜色
*/

View File

@@ -7,6 +7,8 @@ import permission from './modules/permission'
import settings from './modules/settings'
import socket from './modules/socket'
import quality from './modules/quality'
import wms from './modules/wms'
import dict from './modules/dict'
import getters from './getters'
Vue.use(Vuex)
@@ -15,20 +17,22 @@ Vue.use(Vuex)
* 当前用户数据
*/
const state = {
appVersionInfo: ''
appVersionInfo: ''
}
const store = new Vuex.Store({
modules: {
app,
user,
tagsView,
permission,
settings,
modules: {
app,
user,
tagsView,
permission,
settings,
socket,
quality,
},
state: state,//这里放全局参数
getters
quality,
wms,
dict,
},
state: state, //这里放全局参数
getters
})
export default store
export default store

145
src/style/base.styl Normal file
View File

@@ -0,0 +1,145 @@
@import 'reset'
@import "variables.styl"
.icon
width 1em
height 1em
vertical-align -0.15em
fill currentColor
overflow hidden
@keyframes spin {
0% {
transform rotate(0deg)
}
100% {
transform rotate(360deg)
}
}
.tc
text-align center
.tl
text-align left
.tr
text-align right
.spin
animation spin .6s infinite linear
display inline-block
.lineov2
overflow hidden
text-overflow ellipsis
display -webkit-box
-webkit-line-clamp 2
-webkit-box-orient vertical
.lineov1
text-overflow ellipsis
overflow hidden
white-space nowrap
.flex-container
display flex
.align-center
align-items center
.flex-center
display flex
align-items center
.flex-top
display flex
align-items flex-start
.justify-end
justify-content flex-end
.flex-one
flex 1 1 0
.flex-two
flex 2
.mouse-pointer
cursor pointer
.no-break
word-break keep-all
white-space nowrap
.break-all
word-break break-all
white-space normal
/* ---- Chrome ----*/
.scroll::-webkit-scrollbar
width: 5px;
/**/
.scroll::-webkit-scrollbar-track
-webkit-box-shadow: none;
background: #f8f8f9; /**/
border-radius: 5px;
/**/
.scroll::-webkit-scrollbar-thumb
background: #c1c1c1; /**/
border-radius: 5px
/**/
.scroll::-webkit-scrollbar-thumb:hover
background: gray;
/**/
/*--- FirFox ---*/
.scroll
scrollbar-width: thin;
scrollbar-color: orange green;
/**/
.common-table
width 100%
border-collapse: collapse;
tr > td, tr > th
border 1px solid $border-color
padding 5px 8px
tr > th
font-weight bolder
white-space nowrap
.inline-div
display inline-block
[class~=flex].gutter-span
> * + *
margin-left .75rem
.warning
color $yellow
.active
color $active-color
.white
color white
.gold
color $gold-color
.gray
color $gray-color
.red
color $red
.blue
color $blue
.green
color green
.bg-white
background #fff
.pct100
width 100%
.bolder-font
font-weight bolder
.large-tip
font-size 16px

51
src/style/reset.styl Normal file
View File

@@ -0,0 +1,51 @@
// @for num from 1 through 10
for num in (1..20)
.mt{num * 5}
margin-top: 5px * num
.mr{num * 5}
margin-right: 5px * num
.mb{num * 5}
margin-bottom: 5px * num
.ml{num * 5}
margin-left: 5px * num
.m{num * 5}
margin: 5px * num
.pt{num * 5}
padding-top: 5px * num
.pr{num * 5}
padding-right: 5px * num
.pb{num * 5}
padding-bottom: 5px * num
.pl{num * 5}
padding-left: 5px * num
.p{num * 5}
padding: 5px * num
// @for num from 1 through 10
for num in (1..5)
.mt{num * 8}
margin-top: 8px * num
.mr{num * 8}
margin-right: 8px * num
.mb{num * 8}
margin-bottom: 8px * num
.ml{num * 8}
margin-left: 8px * num
.m{num * 8}
margin: 8px * num
.pt{num * 8}
padding-top: 8px * num
.pr{num * 8}
padding-right: 8px * num
.pb{num * 8}
padding-bottom: 8px * num
.pl{num * 8}
padding-left: 8px * num
.p{num * 8}
padding: 8px * num
for num in (1..20)
.pct{num * 5}
width 5% * num
for num in (1..30)
.w{num * 10}
width 10px * num

29
src/style/variables.styl Normal file
View File

@@ -0,0 +1,29 @@
body
--active #409EFF
--success #67C23A
--warning #E6A23C
--red #F56C6C
--info var(--gray-6)
--gray-1 #F2F6FC
--gray-2 #EBEEF5
--gray-3 #E4E7ED
--gray-4 #DCDFE6
--gray-5 #C0C4CC
--gray-6 #909399
--gray-7 #606266
--gray-8 #303133
--white #FFFFFF
--black #000000
--transparent transparent
$gray-1 = var(--gray-1)
$gray-2 = var(--gray-2)
$gray-3 = var(--gray-3)
$gray-4 = var(--gray-4)
$gray-5 = var(--gray-5)
$gray-6 = var(--gray-6)
$gray-7 = var(--gray-7)
$gray-8 = var(--gray-8)
$active-color = var(--active)
$red = var(--red)
$border-color = var(--gray-4)

143
src/utils/vuePlugsPrint.js Normal file
View File

@@ -0,0 +1,143 @@
// 打印类属性、方法定义
/* eslint-disable */
const Print = function (dom, options, pageSize) {
if (!(this instanceof Print)) return new Print(dom, options, pageSize);
this.options = this.extend({
'noPrint': '.no-print'
}, options, pageSize);
if ((typeof dom) === "string") {
this.dom = document.querySelector(dom);
} else {
this.isDOM(dom)
this.dom = this.isDOM(dom) ? dom : dom.$el;
}
this.init(pageSize);
};
Print.prototype = {
init: function (pageSize) {
var content = this.getStyle(pageSize) + this.getHtml();
this.writeIframe(content);
},
extend: function (obj, obj2) {
for (var k in obj2) {
obj[k] = obj2[k];
}
return obj;
},
getStyle: function (pageSize) {
var str = "",
styles = document.querySelectorAll('style,link');
for (var i = 0; i < styles.length; i++) {
str += styles[i].outerHTML;
}
str += "<style>" + (this.options.noPrint ? this.options.noPrint : '.no-print') + "{display:none;}</style>";
str += "<style>html,body,div{height: auto!important;}</style>";
str = str.replace('size: A5', `size: ${pageSize}`);
return str;
},
getHtml: function () {
var inputs = document.querySelectorAll('input');
var textareas = document.querySelectorAll('textarea');
var selects = document.querySelectorAll('select');
for (var k = 0; k < inputs.length; k++) {
if (inputs[k].type == "checkbox" || inputs[k].type == "radio") {
if (inputs[k].checked == true) {
inputs[k].setAttribute('checked', "checked")
} else {
inputs[k].removeAttribute('checked')
}
} else if (inputs[k].type == "text") {
inputs[k].setAttribute('value', inputs[k].value)
} else {
inputs[k].setAttribute('value', inputs[k].value)
}
}
for (var k2 = 0; k2 < textareas.length; k2++) {
if (textareas[k2].type == 'textarea') {
textareas[k2].innerHTML = textareas[k2].value
}
}
for (var k3 = 0; k3 < selects.length; k3++) {
if (selects[k3].type == 'select-one') {
var child = selects[k3].children;
for (var i in child) {
if (child[i].tagName == 'OPTION') {
if (child[i].selected == true) {
child[i].setAttribute('selected', "selected")
} else {
child[i].removeAttribute('selected')
}
}
}
}
}
let content = this.dom.outerHTML;
if (content.indexOf('hidden="hidden"') > -1) {
content = content.replace('hidden="hidden"', '');
}
return content;
},
writeIframe: function (content) {
var w, doc, iframe = document.createElement('iframe'), f = document.body.appendChild(iframe);
iframe.id = "myIframe";
//iframe.style = "position:absolute;width:0;height:0;top:-10px;left:-10px;";
iframe.setAttribute('style', 'position:absolute;width:0;height:0;top:-10px;left:-10px;');
w = f.contentWindow || f.contentDocument;
doc = f.contentDocument || f.contentWindow.document;
doc.open();
doc.write(content);
doc.close();
var _this = this
iframe.onload = function () {
_this.toPrint(w, _this.options);
setTimeout(function () {
document.body.removeChild(iframe)
}, 100)
}
},
toPrint: function (frameWindow, options) {
try {
setTimeout(function () {
frameWindow.focus();
try {
if (!frameWindow.document.execCommand('print', false, null)) {
frameWindow.print();
}
if (options.callback ) options.callback()
} catch (e) {
frameWindow.print();
}
frameWindow.close();
}, 10);
} catch (err) {
console.log('err', err);
}
},
isDOM: (typeof HTMLElement === 'object') ?
function (obj) {
return obj instanceof HTMLElement;
} :
function (obj) {
return obj && typeof obj === 'object' && obj.nodeType === 1 && typeof obj.nodeName === 'string';
},
};
const MyPlugin = {}
MyPlugin.install = function (Vue, options) {
// 4. 添加实例方法
Vue.prototype.$print = Print
}
export default MyPlugin

View File

@@ -2,7 +2,7 @@
<div class="prod-sku-select-wrapper">
<div class="search">
<el-form inline="inline" label-width="64">
<el-form-item label="商品类型">
<el-form-item label="物料类型">
<div class="w200">
<treeselect
v-model="query.itemType"

View File

@@ -15,7 +15,7 @@
<div class="bluebackground">
<div style="width: 50%">
<div style="height: 90px"></div>
<div class="bigtitle">MES管理系统</div>
<div class="bigtitle">MOM管理系统</div>
<div class="smallTitle">
上海干巷车镜实业有限公司创建于1970年开始生产汽车摩托车后视镜经过三十多年的艰苦创业和技术改造现已成为国内专业生产各种型号汽车后视镜行业骨干企业
</div>
@@ -158,6 +158,12 @@ export default {
if (valid) {
this.loading = true
if (this.loginForm.rememberMe) {
this.$store.dispatch("wms/getWarehouseList");
this.$store.dispatch("wms/getAreaList");
this.$store.dispatch("wms/getRackList");
this.$store.dispatch("wms/getSuppliers");
this.$store.dispatch("wms/getCustomer");
this.$store.dispatch("wms/getCarrier");
Cookies.set('username', this.loginForm.username, { expires: 30 })
Cookies.set('password', encrypt(this.loginForm.password), {
expires: 30,

View File

@@ -141,11 +141,16 @@ export default {
},
//todo 更改单元格格式
rowClassName(item) {
if (item.row.status > 0) {
if (item.row.status === 1) {
return {
backgroundColor: '#FFFF00',
}
}
if (item.row.status === 2) {
return {
backgroundColor: '#55ff00',
}
}
return null
},
},

View File

@@ -47,9 +47,9 @@
<!-- 表格部分 -->
<vxe-table border resizable show-overflow :header-cell-style="headerCellStyle" ref="xTable" :column-config="{ resizable: true }" :row-config="{ isHover: true,isCurrent:true,height:20 }" :loading="loading" :data="QualityStatisticsTable" :merge-cells="mergeCells" :cell-style="cellStyle" size="mini" align="center" max-height="800px" :export-config="{}">
<vxe-colgroup title="订单信息" align="center" fixed="left">
<vxe-column field="workorderId" title="工单号" width="120px"></vxe-column>
<vxe-column field="finishedPartNumber" title="零件号" min-width="80px" :show-overflow="false"></vxe-column>
<vxe-column field="colour" title="颜色" min-width="100px" :show-overflow="false"></vxe-column>
<vxe-column field="workorderId" title="工单号" width="140px" sortable></vxe-column>
<vxe-column field="finishedPartNumber" title="零件号" min-width="120px" :show-overflow="false" sortable></vxe-column>
<vxe-column field="colour" title="颜色" min-width="120px" :show-overflow="false" sortable></vxe-column>
<vxe-column field="productDescription" title="描述" min-width="100px" :show-overflow="false"></vxe-column>
<vxe-column field="requireNumber" title="生 产 投 入 数" min-width="60px"></vxe-column>
<vxe-column field="team" title="班次" sortable></vxe-column>
@@ -271,6 +271,7 @@
this.mergeCells.push({ row: i, col: 9, rowspan: num, colspan: 0 })
this.mergeCells.push({ row: i, col: 10, rowspan: num, colspan: 0 })
this.mergeCells.push({ row: i, col: 11, rowspan: num, colspan: 0 })
this.mergeCells.push({ row: i, col: 12, rowspan: num, colspan: 0 })
}
},

View File

@@ -8,7 +8,13 @@
<el-input v-model.trim="queryParams.areaName" placeholder="请输入名称" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="所属仓库" prop="warehouseId">
<el-input v-model.trim="queryParams.warehouseId" placeholder="请输入所属仓库" clearable size="small" @keyup.enter.native="handleQuery" />
<el-input
v-model.trim="queryParams.warehouseId"
placeholder="请输入所属仓库"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item class="flex_one tr">
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -21,13 +27,40 @@
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['wms:area:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['wms:area:edit']">修改</el-button>
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['wms:area:edit']"
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['wms:area:remove']">删除</el-button>
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['wms:area:remove']"
>删除</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" :loading="exportLoading" @click="handleExport" v-hasPermi="['wms:area:export']">导出</el-button>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['wms:area:export']"
>导出</el-button
>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
@@ -40,8 +73,12 @@
<el-table-column label="备注" align="center" prop="remark" v-if="columns[3].visible" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click.stop="handleUpdate(scope.row)" v-hasPermi="['wms:area:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['wms:area:remove']">删除</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click.stop="handleUpdate(scope.row)" v-hasPermi="['wms:area:edit']"
>修改</el-button
>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['wms:area:remove']"
>删除</el-button
>
</template>
</el-table-column>
</WmsTable>
@@ -59,8 +96,7 @@
</el-form-item>
<el-form-item label="所属仓库" prop="warehouseId">
<el-select v-model="form.warehouseId" placeholder="请输入货仓名称" clearable size="small">
<el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
</el-option>
<el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id"> </el-option>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
@@ -76,202 +112,191 @@
</template>
<script>
import {
listWmsArea,
getWmsArea,
delWmsArea,
addWmsArea,
updateWmsArea,
exportWmsArea,
} from "@/api/wms/area";
import { mapGetters } from 'vuex';
export default {
name: "WmsArea",
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 库区表格数据
wmsAreaList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
areaNo: null,
areaName: null,
warehouseId: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
areaNo: [{ required: true, message: "编号不能为空", trigger: "blur" }],
areaName: [
{ required: true, message: "名称不能为空", trigger: "blur" },
],
warehouseId: [
{ required: true, message: "所属仓库不能为空", trigger: "blur" },
],
},
columns: [
{ key: 1, label: "编号", visible: true },
{ key: 2, label: "名称", visible: true },
{ key: 3, label: "所属仓库", visible: true },
{ key: 4, label: "备注", visible: true },
],
};
},
computed: {
// ...mapGetters(['warehouseMap', 'warehouseList'])
},
created() {
this.warehouseList = [];
console.log(111)
// this.getList();
},
methods: {
/** 查询库区列表 */
getList() {
this.loading = true;
const { pageNum, pageSize } = this.queryParams;
const query = {
...this.queryParams,
pageNum: undefined,
pageSize: undefined,
};
const pageReq = { page: pageNum - 1, size: pageSize };
listWmsArea(query, pageReq).then((response) => {
const { content, totalElements } = response;
content.forEach((item) => {
item.warehouseName = this.warehouseMap.get(item.warehouseId);
});
this.wmsAreaList = content;
this.total = totalElements;
this.loading = false;
import { listWmsArea, getWmsArea, delWmsArea, addWmsArea, updateWmsArea, exportWmsArea } from '@/api/wms/area'
import { mapGetters } from 'vuex'
export default {
name: 'WmsArea',
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 库区表格数据
wmsAreaList: [],
// 弹出层标题
title: '',
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
areaNo: null,
areaName: null,
warehouseId: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
areaNo: [{ required: true, message: '编号不能为空', trigger: 'blur' }],
areaName: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
warehouseId: [{ required: true, message: '所属仓库不能为空', trigger: 'blur' }],
},
columns: [
{ key: 1, label: '编号', visible: true },
{ key: 2, label: '名称', visible: true },
{ key: 3, label: '所属仓库', visible: true },
{ key: 4, label: '备注', visible: true },
],
}
},
computed: {
...mapGetters(['warehouseMap', 'warehouseList']),
},
created() {
this.$store.dispatch("wms/getWarehouseList");
this.$store.dispatch("wms/getAreaList");
this.$store.dispatch("wms/getRackList");
this.getList()
},
methods: {
/** 查询库区列表 */
getList() {
this.loading = true
const { pageNum, pageSize } = this.queryParams
const query = {
...this.queryParams,
pageNum: undefined,
pageSize: undefined,
}
const pageReq = { page: pageNum - 1, size: pageSize }
listWmsArea(query, pageReq).then((response) => {
const { content, totalElements } = response
content.forEach((item) => {
item.warehouseName = this.warehouseMap.get(item.warehouseId)
})
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
areaNo: null,
areaName: null,
warehouseId: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加库区";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getWmsArea(id).then((response) => {
this.form = response;
this.open = true;
this.title = "修改库区";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateWmsArea(this.form).then((response) => {
this.$store.dispatch("wms/getAreaList");
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addWmsArea(this.form).then((response) => {
this.$store.dispatch("wms/getAreaList");
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
this.wmsAreaList = content
this.total = totalElements
this.loading = false
})
},
// 取消按钮
cancel() {
this.open = false
this.reset()
},
// 表单重置
reset() {
this.form = {
id: null,
areaNo: null,
areaName: null,
warehouseId: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '添加库区'
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getWmsArea(id).then((response) => {
this.form = response
this.open = true
this.title = '修改库区'
})
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateWmsArea(this.form).then((response) => {
this.$store.dispatch('wms/getAreaList')
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addWmsArea(this.form).then((response) => {
this.$store.dispatch('wms/getAreaList')
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除库区编号为"' + ids + '"的数据项?')
.then(function () {
return delWmsArea(ids);
})
.then(() => {
this.getList();
this.$store.dispatch("wms/getAreaList");
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$modal
.confirm("是否确认导出所有库区数据项?")
.then(() => {
this.exportLoading = true;
return exportWmsArea(queryParams);
})
.then((response) => {
this.$download.download(response);
this.exportLoading = false;
})
.catch(() => {});
},
}
})
},
};
</script>
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal
.confirm('是否确认删除库区编号为"' + ids + '"的数据项?')
.then(function () {
return delWmsArea(ids)
})
.then(() => {
this.getList()
this.$store.dispatch('wms/getAreaList')
this.$modal.msgSuccess('删除成功')
})
.catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams
this.$modal
.confirm('是否确认导出所有库区数据项?')
.then(() => {
this.exportLoading = true
return exportWmsArea(queryParams)
})
.then((response) => {
this.$download.download(response)
this.exportLoading = false
})
.catch(() => {})
},
},
}
</script>

View File

@@ -370,7 +370,7 @@
/** 查看流水 */
handleDetail(row) {
const id = row.id || this.ids
this.$router.push({ path: '/relation/customerTransaction', query: { id } })
this.$router.push({ path: '/wms/wmsCustomerManagement/customerTransaction', query: { id } })
},
/* 新增 应付款 */
handleEnter(row) {

View File

@@ -150,7 +150,7 @@
//查看出库单
handleView(row) {
const id = row.shipmentOrderId
this.$router.push({ path: '/wms/shipmentOrder/status', query: { id } })
this.$router.push({ path: '/wms/wmsInventoryManagement/shipmentOrder/status', query: { id } })
},
// 格式化承运商
getCarrier(row, column) {

View File

@@ -25,7 +25,7 @@
<!-- v-hasPermi="['wms:item:export']">导出-->
<!-- </el-button>-->
<!-- </el-col>-->
<right-toolbar :columns="columns" :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<!-- <right-toolbar :columns="columns" :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
</el-row>
<component :is="currentComponent" v-loading="loading" @update="getList" :table-data="wmsInventoryList"></component>
<pagination v-show="total&gt;0" :limit.sync="pageReq.size" :page.sync="pageReq.page" :total="total" @pagination="getList"></pagination>
@@ -86,6 +86,10 @@
}
},
async created() {
this.$store.dispatch("wms/getWarehouseList");
this.$store.dispatch("wms/getAreaList");
this.$store.dispatch("wms/getRackList");
this.getList();
},
computed: {
...mapGetters(['userId']),

View File

@@ -15,7 +15,7 @@
<el-input v-model="form.remark" placeholder="备注...100个字符以内" rows="3" maxlength="100" type="textarea" show-word-limit="show-word-limit"></el-input>
</el-form-item>
<el-form-item label="附件" prop="attachment">
<file-upload v-model="form.attachment" :file-type="types"></file-upload>
<upload-file v-model="form.attachment" :file-type="types"></upload-file>
</el-form-item>
</el-form>
<el-divider></el-divider>
@@ -157,7 +157,7 @@
methods: {
/** 取消按钮 */
cancel() {
this.$tab.closeOpenPage({ path: '/inventoryCheck' })
this.$tab.closeOpenPage({ path: '/wms/wmsInventoryManagement/inventoryCheck' })
},
/** 提交按钮 */
submitFinishForm() {

View File

@@ -161,7 +161,10 @@
};
},
async created() {
this.$store.dispatch("wms/getWarehouseList");
this.$store.dispatch("wms/getAreaList");
this.$store.dispatch("wms/getRackList");
this.getList();
},
methods: {
/** 查询库存盘点单据列表 */
@@ -223,17 +226,17 @@
},
/** 新增按钮操作 */
handleAdd() {
this.$router.push({ path: '/check/edit' })
this.$router.push({ path: '/wms/wmsInventoryManagement/check/edit' })
},
/** 修改按钮操作 */
handleUpdate(row) {
const id = row.id || this.ids
this.$router.push({ path: '/check/edit', query: { id } })
this.$router.push({ path: '/wms/wmsInventoryManagement/check/edit', query: { id } })
},
/** 查看按钮操作 */
handleView(row) {
const id = row.id || this.ids
this.$router.push({ path: '/check/status', query: { id } })
this.$router.push({ path: '/wms/wmsInventoryManagement/check/status', query: { id } })
},
/** 提交按钮 */
submitForm() {

View File

@@ -114,7 +114,7 @@
methods: {
/** 取消按钮 */
cancel() {
this.$tab.closeOpenPage({ path: '/inventoryCheck' })
this.$tab.closeOpenPage({ path: '/wms/wmsInventoryManagement/inventoryCheck' })
},
/** 加载 盘点单详情 */
loadDetail(id) {

View File

@@ -161,7 +161,7 @@
})
},
cancel() {
this.$tab.closeOpenPage({ path: '/wms/inventoryMovement' })
this.$tab.closeOpenPage({ path: '/wms/wmsInventoryManagement/inventoryMovement' })
},
/** 提交按钮 */
submitForm() {

View File

@@ -175,16 +175,16 @@
},
/** 新增按钮操作 */
handleAdd() {
this.$router.push({ path: "/wms/inventoryMovement/edit" });
this.$router.push({ path: "/wms/wmsInventoryManagement/inventoryMovement/edit" });
},
/** 修改按钮操作 */
handleUpdate(row) {
const id = row.id || this.ids
this.$router.push({ path: "/wms/inventoryMovement/edit", query: { id } });
this.$router.push({ path: "/wms/wmsInventoryManagement/inventoryMovement/edit", query: { id } });
},
handleStatus(row) {
const id = row.id || this.ids
this.$router.push({ path: "/wms/inventoryMovement/status", query: { id } });
this.$router.push({ path: "/wms/wmsInventoryManagement/inventoryMovement/status", query: { id } });
},
/** 删除按钮操作 */
handleDelete(row) {

View File

@@ -196,7 +196,7 @@
}
},
cancel() {
this.$tab.closeOpenPage({ path: '/wms/inventoryMovement' })
this.$tab.closeOpenPage({ path: '/wms/wmsInventoryManagement/inventoryMovement' })
},
/** 提交按钮 */
submitForm() {

View File

@@ -142,9 +142,9 @@
cancel() {
const { settlementType } = this.form
if (Number(settlementType) === 1) {
this.$tab.closeOpenPage({ path: "/settlement/inventorySettlementMonth?settlementType=1" });
this.$tab.closeOpenPage({ path: "/wms/wmsDataBoard/inventorySettlementMonth?settlementType=1" });
} else {
this.$tab.closeOpenPage({ path: "/settlement/inventorySettlementYear?settlementType=2" });
this.$tab.closeOpenPage({ path: "/wms/wmsDataBoard/inventorySettlementYear?settlementType=2" });
}
},
loadSettlement() {

View File

@@ -133,9 +133,9 @@
cancel() {
const { settlementType } = this.form
if (Number(settlementType) === 1) {
this.$tab.closeOpenPage({ path: "/settlement/inventorySettlementMonth?settlementType=1" });
this.$tab.closeOpenPage({ path: "/wms/wmsDataBoard/inventorySettlementMonth?settlementType=1" });
} else {
this.$tab.closeOpenPage({ path: "/settlement/inventorySettlementYear?settlementType=2" });
this.$tab.closeOpenPage({ path: "/wms/wmsDataBoard/inventorySettlementYear?settlementType=2" });
}
},
loadSettlement() {

View File

@@ -232,6 +232,9 @@
};
},
created() {
this.$store.dispatch("wms/getWarehouseList");
this.$store.dispatch("wms/getAreaList");
this.$store.dispatch("wms/getRackList");
this.getList();
itemTypeTreeselect().then(response => {
this.deptOptions = response.data

View File

@@ -158,7 +158,10 @@
...mapGetters(["warehouseMap", "warehouseList", "areaList", "areaMap"]),
},
created() {
// this.getList();
this.$store.dispatch("wms/getWarehouseList");
this.$store.dispatch("wms/getAreaList");
this.$store.dispatch("wms/getRackList");
this.getList();
},
methods: {
/** 查询货架列表 */
@@ -291,7 +294,7 @@
return exportWmsRack(queryParams);
})
.then((response) => {
this.$download.download(response);
this.$downFile.download(response);
this.exportLoading = false;
})
.catch(() => {});

View File

@@ -220,7 +220,15 @@ export default {
],
}
},
async created() {},
async created() {
this.$store.dispatch("wms/getWarehouseList");
this.$store.dispatch("wms/getAreaList");
this.$store.dispatch("wms/getRackList");
this.$store.dispatch("wms/getSuppliers");
this.$store.dispatch("wms/getCustomer");
this.$store.dispatch("wms/getCarrier");
this.getList();
},
methods: {
handleWave() {
addWaveForReceipt({ ids: this.ids }).then((res) => {
@@ -291,16 +299,16 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.$router.push({ path: '/wms/receiptOrder/edit' })
this.$router.push({ path: '/wms/wmsInventoryManagement/receiptOrder/edit' })
},
/** 修改按钮操作 */
handleUpdate(row) {
const id = row.id || this.ids
this.$router.push({ path: '/wms/receiptOrder/edit', query: { id } })
this.$router.push({ path: '/wms/wmsInventoryManagement/receiptOrder/edit', query: { id } })
},
handleStatus(row) {
const id = row.id || this.ids
this.$router.push({ path: '/wms/receiptOrder/status', query: { id } })
this.$router.push({ path: '/wms/wmsInventoryManagement/receiptOrder/status', query: { id } })
},
/** 删除按钮操作 */
handleDelete(row) {

View File

@@ -195,7 +195,7 @@
this.form.payableAmount = sum
},
cancel() {
this.$tab.closeOpenPage({ path: '/wms/receiptOrder' })
this.$tab.closeOpenPage({ path: '/wms/wmsInventoryManagement/receiptOrder' })
},
/** 提交按钮 */
submitForm() {

View File

@@ -194,7 +194,7 @@
}
},
cancel() {
this.$tab.closeOpenPage({ path: '/wms/receiptOrder' })
this.$tab.closeOpenPage({ path: '/wms/wmsInventoryManagement/receiptOrder' })
},
/** 提交按钮 */
submitForm() {

View File

@@ -250,7 +250,7 @@
},
/** 新增按钮操作 */
handleAdd() {
this.$router.push({ path: '/wms/shipmentOrder/edit' })
this.$router.push({ path: '/wms/wmsInventoryManagement/shipmentOrder/edit' })
},
printOut(row, print) {
this.modalObj = {
@@ -357,11 +357,11 @@
/** 修改按钮操作 */
handleUpdate(row) {
const id = row.id || this.ids
this.$router.push({ path: '/wms/shipmentOrder/edit', query: { id } })
this.$router.push({ path: '/wms/wmsInventoryManagement/shipmentOrder/edit', query: { id } })
},
handleStatus(row) {
const id = row.id || this.ids
this.$router.push({ path: '/wms/shipmentOrder/status', query: { id } })
this.$router.push({ path: '/wms/wmsInventoryManagement/shipmentOrder/status', query: { id } })
},
/** 删除按钮操作 */
handleDelete(row) {

View File

@@ -218,7 +218,7 @@ export default {
this.form.receivableAmount = sum
},
cancel() {
this.$tab.closeOpenPage({ path: '/wms/shipmentOrder' })
this.$tab.closeOpenPage({ path: '/wms/wmsInventoryManagement/shipmentOrder' })
},
/** 提交按钮 */
submitForm() {

View File

@@ -99,7 +99,13 @@
}
},
created() {
// this.getList()
this.$store.dispatch("wms/getWarehouseList");
this.$store.dispatch("wms/getAreaList");
this.$store.dispatch("wms/getRackList");
this.$store.dispatch("wms/getSuppliers");
this.$store.dispatch("wms/getCustomer");
this.$store.dispatch("wms/getCarrier");
this.getList()
},
methods: {
handleWave() {
@@ -170,7 +176,7 @@
},
/** 新增按钮操作 */
handleAdd() {
this.$router.push({ path: '/wms/shipmentOrder/edit' })
this.$router.push({ path: '/wms/wmsInventoryManagement/shipmentOrder/edit' })
},
printOut(row, print) {
this.modalObj = {
@@ -277,11 +283,11 @@
/** 修改按钮操作 */
handleUpdate(row) {
const id = row.id || this.ids
this.$router.push({ path: '/wms/shipmentOrder/edit', query: { id } })
this.$router.push({ path: '/wms/wmsInventoryManagement/shipmentOrder/edit', query: { id } })
},
handleStatus(row) {
const id = row.id || this.ids
this.$router.push({ path: '/wms/shipmentOrder/status', query: { id } })
this.$router.push({ path: '/wms/wmsInventoryManagement/shipmentOrder/status', query: { id } })
},
/** 删除按钮操作 */
handleDelete(row) {

View File

@@ -353,7 +353,7 @@
}
},
cancel() {
this.$tab.closeOpenPage({ path: '/wms/shipmentOrder' })
this.$tab.closeOpenPage({ path: '/wms/wmsInventoryManagement/shipmentOrder' })
},
/** 提交按钮 */
submitForm() {

View File

@@ -286,7 +286,7 @@
/** 查看流水 */
handleDetail(row) {
const id = row.id || this.ids
this.$router.push({ path: '/relation/supplierTransaction', query: { id } })
this.$router.push({ path: '/wms/wmsCustomerManagement/supplierTransaction', query: { id } })
},
/* 新增 应付款 */
handleEnter(row) {

View File

@@ -45,7 +45,7 @@
</div>
</div>
<div class="content-wrapper">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tabs v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="库区信息" name="first">
<div class="clearfix oper_area">
<div class="left">
@@ -225,6 +225,10 @@
...mapGetters(["warehouseList", "warehouseMap", "areaList", "areaMap", "rackList", "rackMap", "userId"])
},
async created() {
this.$store.dispatch("wms/getWarehouseList");
this.$store.dispatch("wms/getAreaList");
this.$store.dispatch("wms/getRackList");
this.getList();
},
methods: {
/** 查询仓库列表 */

View File

@@ -102,7 +102,7 @@
methods: {
handleAllocation(row) {
this.$router.push({
path: "/wms/wave/status",
path: "/wms/wmsInventoryManagement/wave/status",
query: {
id: row.id
}

View File

@@ -94,7 +94,7 @@
methods: {
handleAllocation(row) {
this.$router.push({
path: "/wms/wave/receipt/status",
path: "/wms/wmsInventoryManagement/wave/receipt/status",
query: {
id: row.id
}

View File

@@ -291,7 +291,7 @@ export default {
}
},
cancel() {
this.$tab.closeOpenPage({ path: '/wms/receiptOrder' })
this.$tab.closeOpenPage({ path: '/wms/wmsInventoryManagement/receiptOrder' })
},
/** 提交按钮 */
submitForm() {

View File

@@ -287,7 +287,7 @@
}
},
cancel() {
this.$tab.closeOpenPage({ path: '/wms/shipmentOrder' })
this.$tab.closeOpenPage({ path: '/wms/wmsInventoryManagement/shipmentOrder' })
},
/** 提交按钮 */
submitForm() {

View File

@@ -37,9 +37,12 @@ module.exports = {
port: 8887, // 项目启动port,
open: true,
proxy: {
'/wms': {
[process.env.VUE_APP_BASE_API+'/wms']: {
target: 'http://localhost:8000/', // 后端接口地址
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '',
},
},
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {