This commit is contained in:
朱文强 2023-10-08 15:58:29 +08:00
parent b4ffb20ba8
commit 51f101ea4e
77 changed files with 1378 additions and 947 deletions

View File

@ -2,16 +2,16 @@
# @Author: zwq # @Author: zwq
# @Date: 2023-08-17 15:10:53 # @Date: 2023-08-17 15:10:53
# @LastEditors: zwq # @LastEditors: zwq
# @LastEditTime: 2023-08-30 15:15:52 # @LastEditTime: 2023-10-07 13:46:53
# @Description: # @Description:
### ###
# 开发环境配置 # 开发环境配置
ENV = 'development' ENV = 'development'
# 页面标题 # 页面标题
VUE_APP_TITLE = 芋道管理系统 VUE_APP_TITLE = 南京锂膜管理系统
# 芋道管理系统/开发环境 # 南京锂膜管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.1.23:48080' VUE_APP_BASE_API = 'http://192.168.1.23:48080'
# VUE_APP_BASE_API = 'http://192.168.0.31:48081' # VUE_APP_BASE_API = 'http://192.168.0.31:48081'

View File

@ -2,9 +2,9 @@
ENV = 'development' ENV = 'development'
# 页面标题 # 页面标题
VUE_APP_TITLE = 芋道管理系统 VUE_APP_TITLE = 南京锂膜管理系统
# 芋道管理系统/本地环境 # 南京锂膜管理系统/本地环境
VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn' VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn'
# 路由懒加载 # 路由懒加载

View File

@ -2,13 +2,13 @@
ENV = 'production' ENV = 'production'
# 页面标题 # 页面标题
VUE_APP_TITLE = 芋道管理系统 VUE_APP_TITLE = 南京锂膜管理系统
# 芋道管理系统/生产环境 # 南京锂膜管理系统/生产环境
VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = '/prod-api'
# 根据服务器或域名修改 # 根据服务器或域名修改
PUBLIC_PATH = 'http://my-pi.com:8888/yudao-admin/' PUBLIC_PATH = 'http://192.168.0.31:8003/'
# 二级部署路径 # 二级部署路径
VUE_APP_APP_NAME ='yudao-admin' VUE_APP_APP_NAME ='yudao-admin'

View File

@ -1,12 +1,12 @@
NODE_ENV = production NODE_ENV = production
# 页面标题 # 页面标题
VUE_APP_TITLE = 芋道管理系统 VUE_APP_TITLE = 南京锂膜管理系统
# 测试环境配置 # 测试环境配置
ENV = 'staging' ENV = 'staging'
# 芋道管理系统/测试环境 # 南京锂膜管理系统/测试环境
VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn' VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn'
# 静态资源地址 # 静态资源地址

View File

@ -4,9 +4,9 @@ NODE_ENV = development
ENV = 'staging' ENV = 'staging'
# 页面标题 # 页面标题
VUE_APP_TITLE = 芋道管理系统 VUE_APP_TITLE = 南京锂膜管理系统
# 芋道管理系统/测试环境 # 南京锂膜管理系统/测试环境
VUE_APP_BASE_API = 'http://127.0.0.1:48080' VUE_APP_BASE_API = 'http://127.0.0.1:48080'
# 根据服务器或域名修改 # 根据服务器或域名修改

View File

@ -1,7 +1,7 @@
{ {
"name": "yudao-ui-admin", "name": "yudao-ui-admin",
"version": "1.7.3-snapshot", "version": "1.7.3-snapshot",
"description": "芋道管理系统", "description": "南京锂膜管理系统",
"author": "芋道", "author": "芋道",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:31:37 * @Date: 2023-08-22 15:31:37
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-04 15:46:20 * @LastEditTime: 2023-10-07 16:04:12
* @Description: * @Description:
*/ */
import request from '@/utils/request' import request from '@/utils/request'
@ -69,7 +69,14 @@ export function getWarehouseStorehousePage(query) {
params: query params: query
}) })
} }
// 获得立库库位列表
export function getWarehouseStorehouseList(query) {
return request({
url: '/asrs/warehouse-storehouse/list',
method: 'get',
params: query
})
}
// 导出立库库位 Excel // 导出立库库位 Excel
export function exportWarehouseStorehouseExcel(query) { export function exportWarehouseStorehouseExcel(query) {
return request({ return request({

View File

@ -1,3 +1,10 @@
/*
* @Author: zwq
* @Date: 2023-09-06 14:31:37
* @LastEditors: zwq
* @LastEditTime: 2023-10-07 16:47:35
* @Description:
*/
import request from '@/utils/request' import request from '@/utils/request'
// 创建成品库 // 创建成品库
@ -60,6 +67,14 @@ export function getCode() {
method: 'post' method: 'post'
}) })
} }
// 获得立库库位列表
export function getWarehouseStorehouseList(query) {
return request({
url: '/asrs/finish-product-warehouse/list',
method: 'get',
params: query
})
}
// 获得仓库占用率 // 获得仓库占用率
export function getOccupancy(id) { export function getOccupancy(id) {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-17 15:10:53 * @Date: 2023-08-17 15:10:53
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-08-18 09:43:17 * @LastEditTime: 2023-10-08 15:33:03
* @Description: * @Description:
*/ */
import Vue from 'vue' import Vue from 'vue'
@ -110,7 +110,7 @@ Router.prototype.push = function push(location) {
export default new Router({ export default new Router({
base: process.env.VUE_APP_APP_NAME ? process.env.VUE_APP_APP_NAME : "/", base: process.env.VUE_APP_APP_NAME ? process.env.VUE_APP_APP_NAME : "/",
mode: 'history', // 去掉url中的# mode: 'hash', // 去掉url中的#
scrollBehavior: () => ({y: 0}), scrollBehavior: () => ({y: 0}),
routes: constantRoutes routes: constantRoutes
}) })

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-05 14:52:47 * @LastEditTime: 2023-09-27 10:29:09
* @Description: * @Description:
--> -->
<template> <template>
@ -37,7 +37,7 @@ export default {
getDataListURL: getHistogram, getDataListURL: getHistogram,
}, },
listQuery: { listQuery: {
warehouseId: '', warehouseId: '1696803324030865409',
goodName: '', goodName: '',
startTime: '', startTime: '',
endTime: '', endTime: '',
@ -102,6 +102,7 @@ export default {
if (val.name) { if (val.name) {
this.listQuery.goodName = val.name; this.listQuery.goodName = val.name;
if (val.searchTime) { if (val.searchTime) {
this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime this.listQuery.startTime = val.searchTime
? val.searchTime[0] ? val.searchTime[0]
: ''; : '';

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-05 14:52:57 * @LastEditTime: 2023-09-27 10:29:26
* @Description: * @Description:
--> -->
<template> <template>
@ -37,7 +37,7 @@ export default {
getDataListURL: getHistogram, getDataListURL: getHistogram,
}, },
listQuery: { listQuery: {
warehouseId: '', warehouseId: '1698950657556340737',
goodName: '', goodName: '',
startTime: '', startTime: '',
endTime: '', endTime: '',
@ -103,6 +103,7 @@ export default {
if (val.name) { if (val.name) {
this.listQuery.goodName = val.name; this.listQuery.goodName = val.name;
if (val.searchTime) { if (val.searchTime) {
this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime this.listQuery.startTime = val.searchTime
? val.searchTime[0] ? val.searchTime[0]
: ''; : '';

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-05 14:52:33 * @LastEditTime: 2023-09-27 10:50:43
* @Description: * @Description:
--> -->
<template> <template>
@ -14,11 +14,13 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="23"> <el-col :span="23">
<pieChart <pieChart
title="饼状图分析" title="饼状图分析"
ref="pieChart" ref="pieChart"
height="500px" height="500px"
:total-number="tableData.totalNumber" v-if="tableData.totalNumber"
:total-number="tableData.totalNumber"
:pie-data="tableData.list" /> :pie-data="tableData.list" />
<el-empty v-else></el-empty>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -37,7 +39,7 @@ export default {
getDataListURL: getPieChart, getDataListURL: getPieChart,
}, },
listQuery: { listQuery: {
warehouseId: '', warehouseId: '1696803324030865409',
startTime: '', startTime: '',
endTime: '', endTime: '',
}, },
@ -65,17 +67,18 @@ export default {
components: { components: {
pieChart, pieChart,
}, },
created() { created() {},
},
methods: { methods: {
// //
getDataList() { getDataList() {
if (this.listQuery.startTime) { if (this.listQuery.startTime) {
this.urlOptions.getDataListURL(this.listQuery).then((response) => { this.urlOptions.getDataListURL(this.listQuery).then((response) => {
this.tableData = response.data; if (response.data) {
this.$nextTick(() => { this.tableData = response.data;
this.$refs.pieChart.initChart(); this.$nextTick(() => {
}); this.$refs.pieChart.initChart();
});
}
}); });
} }
}, },
@ -83,6 +86,7 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
if (val.searchTime) { if (val.searchTime) {
this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : ''; this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : ''; this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
this.getDataList(); this.getDataList();

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-06 14:44:21 * @LastEditTime: 2023-09-27 10:50:39
* @Description: * @Description:
--> -->
<template> <template>
@ -14,11 +14,13 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="23"> <el-col :span="23">
<pieChart <pieChart
title="饼状图分析" title="饼状图分析"
ref="pieChart" ref="pieChart"
height="500px" height="500px"
:total-number="tableData.totalNumber" v-if="tableData.totalNumber"
:total-number="tableData.totalNumber"
:pie-data="tableData.list" /> :pie-data="tableData.list" />
<el-empty v-else></el-empty>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -37,7 +39,7 @@ export default {
getDataListURL: getPieChart, getDataListURL: getPieChart,
}, },
listQuery: { listQuery: {
warehouseId: '', warehouseId: '1698950657556340737',
startTime: '', startTime: '',
endTime: '', endTime: '',
}, },
@ -73,10 +75,12 @@ export default {
getDataList() { getDataList() {
if (this.listQuery.startTime) { if (this.listQuery.startTime) {
this.urlOptions.getDataListURL(this.listQuery).then((response) => { this.urlOptions.getDataListURL(this.listQuery).then((response) => {
this.tableData = response.data; if (response.data) {
this.$nextTick(() => { this.tableData = response.data;
this.$refs.pieChart.initChart(); this.$nextTick(() => {
}); this.$refs.pieChart.initChart();
});
}
}); });
} }
}, },
@ -84,6 +88,7 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
if (val.searchTime) { if (val.searchTime) {
this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : ''; this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : ''; this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
this.getDataList(); this.getDataList();

View File

@ -28,17 +28,14 @@ const tableProps = [
{ {
prop: 'reqInterface', prop: 'reqInterface',
label: '请求接口', label: '请求接口',
align: 'center',
}, },
{ {
prop: 'reqParameter', prop: 'reqParameter',
label: '请求参数', label: '请求参数',
align: 'center',
}, },
{ {
prop: 'createDate', prop: 'createTime',
label: '时间', label: '时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
]; ];
@ -69,7 +66,7 @@ export default {
label: '订单出货日期', label: '订单出货日期',
dateType: 'daterange', dateType: 'daterange',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd hh:mm:ss',
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
@ -102,6 +99,7 @@ export default {
this.listQuery.pageSize = 10; this.listQuery.pageSize = 10;
this.listQuery.reqInterface = val.code; this.listQuery.reqInterface = val.code;
this.listQuery.reqParameter = val.name; this.listQuery.reqParameter = val.name;
this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : ''; this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : ''; this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
this.getDataList(); this.getDataList();

View File

@ -122,7 +122,7 @@ export default {
], ],
series: [ series: [
{ {
name: 'pageA', name: '数量',
type: 'bar', type: 'bar',
stack: 'vistors', stack: 'vistors',
barWidth: '60%', barWidth: '60%',

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-06-01 10:47:42 * @Date: 2023-06-01 10:47:42
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-08-31 16:23:08 * @LastEditTime: 2023-10-08 15:50:35
* @Description: * @Description:
--> -->
<template> <template>
@ -33,10 +33,6 @@ export default {
type: String, type: String,
default: '300px', default: '300px',
}, },
occupancyData: {
type: Number,
default: 0,
},
}, },
name: 'echarts', name: 'echarts',
data() { data() {
@ -52,7 +48,7 @@ export default {
this.chart = null; this.chart = null;
}, },
methods: { methods: {
initChart() { initChart(occupancyData) {
this.chart = echarts.init(this.$el, 'macarons'); this.chart = echarts.init(this.$el, 'macarons');
this.chart.setOption({ this.chart.setOption({
@ -169,7 +165,7 @@ export default {
}, },
data: [ data: [
{ {
value: this.occupancyData * 100, value: occupancyData,
}, },
], ],
radius: '90%', radius: '90%',

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-08-31 16:35:40 * @LastEditTime: 2023-10-08 10:45:09
* @Description: * @Description:
--> -->
<template> <template>
@ -24,6 +24,18 @@
clearable clearable
placeholder="请输入产品名称" /> placeholder="请输入产品名称" />
</el-form-item> </el-form-item>
<el-form-item label="产品规格" prop="specification">
<el-select
v-model="dataForm.specification"
clearable
placeholder="请选择产品规格">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="需要熟化时间" prop="cureTime"> <el-form-item label="需要熟化时间" prop="cureTime">
<el-input-number <el-input-number
v-model="dataForm.cureTime" v-model="dataForm.cureTime"
@ -47,16 +59,21 @@
<script> <script>
import basicAdd from '../mixins/basic-add'; import basicAdd from '../mixins/basic-add';
import { createGoodSpecification, updateGoodSpecification, getGoodSpecification, getCode } from "@/api/asrs/goodSpecification"; import {
createGoodSpecification,
updateGoodSpecification,
getGoodSpecification,
getCode,
} from '@/api/asrs/goodSpecification';
export default { export default {
mixins: [basicAdd], mixins: [basicAdd],
data() { data() {
return { return {
urlOptions: { urlOptions: {
isGetCode: true, isGetCode: true,
codeURL: getCode, codeURL: getCode,
codeName: 'goodSpecificationCode', codeName: 'goodSpecificationCode',
createURL: createGoodSpecification, createURL: createGoodSpecification,
updateURL: updateGoodSpecification, updateURL: updateGoodSpecification,
infoURL: getGoodSpecification, infoURL: getGoodSpecification,
@ -65,10 +82,17 @@ export default {
id: undefined, id: undefined,
goodSpecificationCode: undefined, goodSpecificationCode: undefined,
goodSpecificationName: undefined, goodSpecificationName: undefined,
specification: undefined,
cureTime: undefined, cureTime: undefined,
cure: undefined, cure: 1,
deactivate: undefined, deactivate: 1,
}, },
options: [
{
value: 0,
label: '卷',
},
],
dataRule: { dataRule: {
goodSpecificationCode: [ goodSpecificationCode: [
{ required: true, message: '产品编码不能为空', trigger: 'blur' }, { required: true, message: '产品编码不能为空', trigger: 'blur' },

View File

@ -47,28 +47,23 @@ const tableProps = [
{ {
prop: 'goodSpecificationCode', prop: 'goodSpecificationCode',
label: '产品编码', label: '产品编码',
align: 'center',
}, },
{ {
prop: 'goodSpecificationName', prop: 'goodSpecificationName',
label: '产品名称', label: '产品名称',
align: 'center',
}, },
{ {
prop: 'cure', prop: 'cure',
label: '是否需要熟化', label: '是否需要熟化',
align: 'center',
filter: codeFilter('cure'), filter: codeFilter('cure'),
}, },
{ {
prop: 'cureTime', prop: 'cureTime',
label: '需要熟化时间(小时)', label: '需要熟化时间(小时)',
align: 'center',
}, },
{ {
prop: 'deactivate', prop: 'deactivate',
label: '是否启用', label: '是否启用',
align: 'center',
filter: codeFilter('deactivate'), filter: codeFilter('deactivate'),
}, },
]; ];

View File

@ -47,28 +47,23 @@ const tableProps = [
{ {
prop: 'goodSpecificationCode', prop: 'goodSpecificationCode',
label: '产品编码', label: '产品编码',
align: 'center',
}, },
{ {
prop: 'goodSpecificationName', prop: 'goodSpecificationName',
label: '产品名称', label: '产品名称',
align: 'center',
}, },
{ {
prop: 'cure', prop: 'cure',
label: '是否需要熟化', label: '是否需要熟化',
align: 'center',
filter: codeFilter('cure'), filter: codeFilter('cure'),
}, },
{ {
prop: 'cureTime', prop: 'cureTime',
label: '需要熟化时间(小时)', label: '需要熟化时间(小时)',
align: 'center',
}, },
{ {
prop: 'deactivate', prop: 'deactivate',
label: '是否启用', label: '是否启用',
align: 'center',
filter: codeFilter('deactivate'), filter: codeFilter('deactivate'),
}, },
]; ];

View File

@ -28,52 +28,42 @@ const tableProps = [
{ {
prop: 'reqInterface', prop: 'reqInterface',
label: '请求接口', label: '请求接口',
align: 'center',
}, },
{ {
prop: 'reqParameter', prop: 'reqParameter',
label: '请求参数', label: '请求参数',
align: 'center',
}, },
{ {
prop: 'errorCode', prop: 'errorCode',
label: '返回编码', label: '返回编码',
align: 'center',
}, },
{ {
prop: 'cmd', prop: 'cmd',
label: '返回请求接口', label: '返回请求接口',
align: 'center',
}, },
{ {
prop: 'msgId', prop: 'msgId',
label: '返回msgId', label: '返回msgId',
align: 'center',
}, },
{ {
prop: 'retStatus', prop: 'retStatus',
label: '返回状态', label: '返回状态',
align: 'center',
}, },
{ {
prop: 'fastName', prop: 'fastName',
label: '返回指定区域', label: '返回指定区域',
align: 'center',
}, },
{ {
prop: 'areaName', prop: 'areaName',
label: '返回复合区域', label: '返回复合区域',
align: 'center',
}, },
{ {
prop: 'list', prop: 'list',
label: '返回集合', label: '返回集合',
align: 'center',
}, },
{ {
prop: 'createDate', prop: 'createTime',
label: '时间', label: '时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
]; ];
@ -104,7 +94,7 @@ export default {
label: '订单出货日期', label: '订单出货日期',
dateType: 'daterange', dateType: 'daterange',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd hh:mm:ss',
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
@ -137,6 +127,7 @@ export default {
this.listQuery.pageSize = 10; this.listQuery.pageSize = 10;
this.listQuery.reqInterface = val.code; this.listQuery.reqInterface = val.code;
this.listQuery.reqParameter = val.name; this.listQuery.reqParameter = val.name;
this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : ''; this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : ''; this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
this.getDataList(); this.getDataList();

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-05 13:50:38 * @LastEditTime: 2023-09-27 10:44:49
* @Description: * @Description:
--> -->
<template> <template>
@ -12,8 +12,7 @@
<gaugeChart <gaugeChart
ref="gaugeChart" ref="gaugeChart"
title="仓库占用率" title="仓库占用率"
height="500px" height="500px"/>
:occupancy-data="occupancyData" />
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<barChart <barChart
@ -28,6 +27,7 @@
<script> <script>
import basicPage from '../mixins/basic-page'; import basicPage from '../mixins/basic-page';
import { mul } from '../mixins/code-filter';
import barChart from '../chart/BarChart.vue'; import barChart from '../chart/BarChart.vue';
import gaugeChart from '../chart/GaugeChart.vue'; import gaugeChart from '../chart/GaugeChart.vue';
import { getOccupancy } from '@/api/asrs/warehouseStorehouse'; import { getOccupancy } from '@/api/asrs/warehouseStorehouse';
@ -54,9 +54,10 @@ export default {
// //
getDataList() { getDataList() {
this.urlOptions.occupancyURL(this.aId).then((response) => { this.urlOptions.occupancyURL(this.aId).then((response) => {
this.occupancyData = response.data; this.occupancyData = response.data.toFixed(2);
const num = mul(this.occupancyData,100)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.gaugeChart.initChart(); this.$refs.gaugeChart.initChart(num);
}); });
}); });
this.urlOptions.allURL(this.aId).then((response) => { this.urlOptions.allURL(this.aId).then((response) => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-05 14:51:54 * @LastEditTime: 2023-10-08 15:49:40
* @Description: * @Description:
--> -->
<template> <template>
@ -12,8 +12,7 @@
<gaugeChart <gaugeChart
ref="gaugeChart" ref="gaugeChart"
title="仓库占用率" title="仓库占用率"
height="500px" height="500px"/>
:occupancy-data="occupancyData" />
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<barChart <barChart
@ -28,6 +27,7 @@
<script> <script>
import basicPage from '../mixins/basic-page'; import basicPage from '../mixins/basic-page';
import { mul } from '../mixins/code-filter';
import barChart from '../chart/BarChart.vue'; import barChart from '../chart/BarChart.vue';
import gaugeChart from '../chart/GaugeChart.vue'; import gaugeChart from '../chart/GaugeChart.vue';
import { getOccupancy } from '@/api/asrs/warehouseStorehouse'; import { getOccupancy } from '@/api/asrs/warehouseStorehouse';
@ -56,9 +56,10 @@ export default {
// //
getDataList() { getDataList() {
this.urlOptions.occupancyURL(this.bId).then((response) => { this.urlOptions.occupancyURL(this.bId).then((response) => {
this.occupancyData = response.data; this.occupancyData = response.data.toFixed(2);
const num = mul(this.occupancyData,100)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.gaugeChart.initChart(); this.$refs.gaugeChart.initChart(num);
}); });
}); });
this.urlOptions.allURL(this.bId).then((response) => { this.urlOptions.allURL(this.bId).then((response) => {

View File

@ -14,7 +14,7 @@
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
:width="120" :width="80"
label="操作" label="操作"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
@ -31,46 +31,39 @@
import basicPage from '../mixins/basic-page'; import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter'; import { parseTime } from '../mixins/code-filter';
import codeFilter from '../mixins/code-filter'; import codeFilter from '../mixins/code-filter';
import { getMainTaskPage } from '@/api/oth/mainTask'; import { getMainTaskPage, deleteMainTask } from '@/api/oth/mainTask';
const tableProps = [ const tableProps = [
{ {
prop: 'mainTaskCode', prop: 'mainTaskCode',
label: '任务编码', label: '任务编码',
align: 'center',
}, },
{ {
prop: 'mainTaskType', prop: 'mainTaskType',
label: '任务类型', label: '任务类型',
align: 'center',
filter: codeFilter('mainTaskType'), filter: codeFilter('mainTaskType'),
}, },
{ {
prop: 'stacker', prop: 'stacker',
label: '堆垛机', label: '堆垛机',
align: 'center',
}, },
{ {
prop: 'agv', prop: 'agv',
label: 'agv', label: 'agv',
align: 'center',
}, },
{ {
prop: 'mainTaskState', prop: 'mainTaskState',
label: '状态', label: '状态',
align: 'center',
filter: codeFilter('mainTaskState'), filter: codeFilter('mainTaskState'),
}, },
{ {
prop: 'taskSource', prop: 'taskSource',
label: '任务来源', label: '任务来源',
align: 'center',
filter: codeFilter('taskSource'), filter: codeFilter('taskSource'),
}, },
{ {
prop: 'createTime', prop: 'createTime',
label: '创建时间', label: '创建时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
]; ];
@ -118,22 +111,40 @@ const mainTaskState = [
id: 5, id: 5,
}, },
]; ];
const agvArr = [
{
name: 'A1',
id: 1,
},
{
name: 'A2',
id: 2,
},
{
name: 'A3',
id: 3,
},
];
export default { export default {
mixins: [basicPage], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
getDataListURL: getMainTaskPage, getDataListURL: getMainTaskPage,
deleteURL: deleteMainTask,
}, },
listQuery: {
pageSize: 10,
pageNo: 1,
total: 1,
},
tableProps, tableProps,
tableBtn: [ tableBtn: [
true {
? { type: 'canlce',
type: 'cancle', btnName: '取消',
btnName: '取消', },
} ],
: undefined,
].filter((v) => v),
tableData: [], tableData: [],
formConfig: [ formConfig: [
{ {
@ -159,17 +170,19 @@ export default {
filterable: true, filterable: true,
}, },
{ {
type: 'input', type: 'select',
label: 'agv', label: 'agv',
placeholder: 'agv', selectOptions: agvArr,
param: 'agv', param: 'agv',
defaultSelect: '',
filterable: true,
}, },
{ {
type: 'datePicker', type: 'datePicker',
label: '选择日期', label: '选择日期',
dateType: 'daterange', dateType: 'daterange',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd hh:mm:ss',
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
@ -204,6 +217,7 @@ export default {
this.listQuery.mainTaskType = val.taskType; this.listQuery.mainTaskType = val.taskType;
this.listQuery.mainTaskState = val.status; this.listQuery.mainTaskState = val.status;
this.listQuery.agv = val.agv; this.listQuery.agv = val.agv;
this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : ''; this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : ''; this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
this.getDataList(); this.getDataList();
@ -221,6 +235,26 @@ export default {
console.log(val); console.log(val);
} }
}, },
otherMethods(val){
this.$confirm(`确定对${'[任务编码=' + val.data.mainTaskCode + ']'}进行取消操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(val.data.id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
})
.catch(() => { });
},
}, },
}; };
</script> </script>

View File

@ -30,46 +30,38 @@ const tableProps = [
{ {
prop: 'mainTaskCode', prop: 'mainTaskCode',
label: '任务编码', label: '任务编码',
align: 'center',
}, },
{ {
prop: 'mainTaskType', prop: 'mainTaskType',
label: '任务类型', label: '任务类型',
align: 'center',
filter: codeFilter('mainTaskType'), filter: codeFilter('mainTaskType'),
}, },
{ {
prop: 'stacker', prop: 'stacker',
label: '堆垛机', label: '堆垛机',
align: 'center',
}, },
{ {
prop: 'agv', prop: 'agv',
label: 'agv', label: 'agv',
align: 'center',
}, },
{ {
prop: 'mainTaskState', prop: 'mainTaskState',
label: '状态', label: '状态',
align: 'center',
filter: codeFilter('mainTaskState'), filter: codeFilter('mainTaskState'),
}, },
{ {
prop: 'taskSource', prop: 'taskSource',
label: '任务来源', label: '任务来源',
align: 'center',
filter: codeFilter('taskSource'), filter: codeFilter('taskSource'),
}, },
{ {
prop: 'createTime', prop: 'createTime',
label: '创建时间', label: '创建时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
{ {
prop: 'cancellation', prop: 'cancellation',
label: '是否取消', label: '是否取消',
align: 'center',
filter: codeFilter('cancellation'), filter: codeFilter('cancellation'),
}, },
]; ];
@ -117,6 +109,34 @@ const mainTaskState = [
id: 5, id: 5,
}, },
]; ];
const agvArr = [
{
name: 'A1',
id: 1,
},
{
name: 'A2',
id: 2,
},
{
name: 'A3',
id: 3,
},
];
const stackerArr = [
{
name: 'D1',
id: 1,
},
{
name: 'D2',
id: 2,
},
{
name: 'D3',
id: 3,
},
];
export default { export default {
mixins: [basicPage], mixins: [basicPage],
data() { data() {
@ -150,23 +170,27 @@ export default {
filterable: true, filterable: true,
}, },
{ {
type: 'input', type: 'select',
label: '堆垛机', label: '堆垛机',
placeholder: '堆垛机', selectOptions: stackerArr,
param: 'stacker', param: 'stacker',
defaultSelect: '',
filterable: true,
}, },
{ {
type: 'input', type: 'select',
label: 'agv', label: 'agv',
placeholder: 'agv', selectOptions: agvArr,
param: 'agv', param: 'agv',
defaultSelect: '',
filterable: true,
}, },
{ {
type: 'datePicker', type: 'datePicker',
label: '选择日期', label: '选择日期',
dateType: 'daterange', dateType: 'daterange',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd hh:mm:ss',
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
@ -202,6 +226,7 @@ export default {
this.listQuery.mainTaskState = val.status; this.listQuery.mainTaskState = val.status;
this.listQuery.stacker = val.stacker; this.listQuery.stacker = val.stacker;
this.listQuery.agv = val.agv; this.listQuery.agv = val.agv;
this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : ''; this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : ''; this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
this.getDataList(); this.getDataList();

View File

@ -28,17 +28,14 @@ const tableProps = [
{ {
prop: 'reqInterface', prop: 'reqInterface',
label: '请求接口', label: '请求接口',
align: 'center',
}, },
{ {
prop: 'reqParameter', prop: 'reqParameter',
label: '请求参数', label: '请求参数',
align: 'center',
}, },
{ {
prop: 'createDate', prop: 'createTime',
label: '时间', label: '时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
]; ];
@ -69,7 +66,7 @@ export default {
label: '订单出货日期', label: '订单出货日期',
dateType: 'daterange', dateType: 'daterange',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd hh:mm:ss',
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
@ -102,6 +99,7 @@ export default {
this.listQuery.pageSize = 10; this.listQuery.pageSize = 10;
this.listQuery.reqInterface = val.code; this.listQuery.reqInterface = val.code;
this.listQuery.reqParameter = val.name; this.listQuery.reqParameter = val.name;
this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : ''; this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : ''; this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
this.getDataList(); this.getDataList();

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2022-08-24 11:19:43 * @Date: 2022-08-24 11:19:43
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-05 15:10:13 * @LastEditTime: 2023-10-08 10:44:25
* @Description: * @Description:
*/ */
export default { export default {
@ -39,7 +39,7 @@ export default {
if(bPage){ if(bPage){
this.dataForm.warehouseId = this.bId; this.dataForm.warehouseId = this.bId;
}else{ }else{
this.dataForm.warehouseId = this.bId; this.dataForm.warehouseId = this.aId;
} }
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["dataForm"].resetFields(); this.$refs["dataForm"].resetFields();
@ -90,17 +90,25 @@ export default {
// 修改的提交 // 修改的提交
if (this.dataForm.id) { if (this.dataForm.id) {
this.urlOptions.updateURL(this.dataForm).then(response => { this.urlOptions.updateURL(this.dataForm).then(response => {
this.$modal.msgSuccess("修改成功"); if(response.data){
this.visible = false; this.$modal.msgSuccess("修改成功");
this.$emit("refreshDataList"); this.visible = false;
this.$emit("refreshDataList");
}else{
this.$modal.msgWarning('名称或编码不能重复');;
}
}); });
return; return;
} }
// 添加的提交 // 添加的提交
this.urlOptions.createURL(this.dataForm).then(response => { this.urlOptions.createURL(this.dataForm).then(response => {
this.$modal.msgSuccess("新增成功"); if(response.data){
this.visible = false; this.$modal.msgSuccess("新增成功");
this.$emit("refreshDataList"); this.visible = false;
this.$emit("refreshDataList");
}else{
this.$modal.msgWarning('名称或编码不能重复');;
}
}); });
}); });
}, },

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2022-08-24 11:19:43 * @Date: 2022-08-24 11:19:43
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-05 15:10:24 * @LastEditTime: 2023-09-26 14:00:22
* @Description: * @Description:
*/ */
export default { export default {
@ -42,7 +42,7 @@ export default {
this.dataListLoading = true; this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then(response => { this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.list; this.tableData = response.data.list;
this.total = response.data.total; this.listQuery.total = response.data.total;
this.dataListLoading = false; this.dataListLoading = false;
}); });
}, },

View File

@ -2,7 +2,7 @@
/* /*
* @Date: 2020-12-29 16:49:28 * @Date: 2020-12-29 16:49:28
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-07 14:10:53 * @LastEditTime: 2023-10-07 14:32:52
* @FilePath: \basic-admin\src\filters\basicData\index.js * @FilePath: \basic-admin\src\filters\basicData\index.js
* @Description: * @Description:
*/ */
@ -47,6 +47,9 @@ const table = {
1: '否', 1: '否',
2: '是', 2: '是',
}, },
specification:{
0: '卷',
},
} }
// 日期格式化 // 日期格式化
@ -91,6 +94,20 @@ export function parseTime(time, pattern) {
}) })
return time_str return time_str
} }
// 去除浮点相乘
export function mul(num1, num2) {
if (parseFloat(num1).toString() == "NaN" || parseFloat(num2).toString() == "NaN") return;
var m = 0, s1 = num1.toString(), s2 = num2.toString();
try {
m += s1.split(".")[1].length
} catch (e) {
}
try {
m += s2.split(".")[1].length
} catch (e) {
}
return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m);
}
export default function (dictTable) { export default function (dictTable) {
return function (val) { return function (val) {
return table?.[dictTable]?.[val] return table?.[dictTable]?.[val]

View File

@ -0,0 +1,46 @@
<!--
* @Author: zwq
* @Date: 2023-09-22 15:36:40
* @LastEditors: zwq
* @LastEditTime: 2023-09-26 15:59:57
* @Description:
-->
<template>
<div class="tableInner">
<el-input v-model="list[itemProp]" @blur="changeInput" />
</div>
</template>
<script>
export default {
name: "InputArea",
props: {
injectData: {
type: Object,
default: () => ({}),
},
itemProp: {
type: String,
},
},
data() {
return {
list: this.injectData,
};
},
methods: {
changeInput() {
this.list.sType = 1
this.$emit("emitData", this.list,1);
},
},
};
</script>
<style scoped>
.tableInner >>> .el-input__inner {
color: #409EFF;
border: 1px rgb(232, 231, 231) solid;
padding: 0;
text-align: center;
height: 30px;
}
</style>

View File

@ -0,0 +1,59 @@
<template>
<div class="tableInner">
<el-select v-model="list[itemProp]" @change="changeInput">
<el-option
v-for="item in QArr"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</div>
</template>
<script>
export default {
name: 'InputArea',
props: {
injectData: {
type: Object,
default: () => ({}),
},
itemProp: {
type: String,
},
},
data() {
return {
list: this.injectData,
QArr: [
{
name: 'A',
id: 0,
},
{
name: 'B',
id: 1,
},
{
name: 'C',
id: 2,
},
],
};
},
methods: {
changeInput() {
this.list.sType = 1;
this.$emit('emitData', this.list);
},
},
};
</script>
<style scoped>
.tableInner >>> .el-input__inner {
color: #409EFF;
border: 1px rgb(232, 231, 231) solid;
padding: 0;
text-align: center;
height: 30px;
}
</style>

View File

@ -2,16 +2,15 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-24 14:47:58 * @Date: 2023-08-24 14:47:58
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-04 14:38:44 * @LastEditTime: 2023-10-07 14:33:42
* @Description: * @Description:
--> -->
<template> <template>
<div class="app-container"> <div class="app-container">
<base-table <base-table
v-loading="dataListLoading" v-loading="dataListLoading"
:table-props="propType===1? :table-props="propType==='1'?
[...tableProps,...tableProps2]:propType===2? [...tableProps,...tableProps1]:tableProps"
[...tableProps,...tableProps1,...tableProps2]:tableProps"
max-height="200" max-height="200"
:table-data="tableData" /> :table-data="tableData" />
</div> </div>
@ -35,48 +34,39 @@ const tableProps = [
{ {
prop: 'goodSpecificationName', prop: 'goodSpecificationName',
label: '产品名', label: '产品名',
align: 'center',
}, },
{ {
prop: 'goodSpecificationCode', prop: 'goodSpecificationCode',
label: '产品编码', label: '产品编码',
align: 'center',
}, },
{ {
prop: 'goodSpecificationName1', prop: 'specification',
label: '产品规格', label: '产品规格',
align: 'center', filter: codeFilter('specification'),
},
{
prop: 'number',
label: '数量',
}, },
{ {
prop: 'quality', prop: 'quality',
label: '品质', label: '品质',
align: 'center',
filter: codeFilter('quality'), filter: codeFilter('quality'),
}, },
]; ];
const tableProps1 = [
{
prop: 'number',
label: '数量',
align: 'center',
},
]
const tableProps2 = [ const tableProps1 = [
{ {
prop: 'cureTime', prop: 'cureTime',
label: '需要熟化时间(小时)', label: '需要熟化时间(小时)',
align: 'center',
}, },
{ {
prop: 'alreadyCureTime', prop: 'alreadyCureTime',
label: '已熟化时间(小时)', label: '已熟化时间(小时)',
align: 'center',
}, },
{ {
prop: 'createTime', prop: 'createTime',
label: '入库时间', label: '入库时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
] ]
@ -84,8 +74,8 @@ export default {
mixins: [basicPage], mixins: [basicPage],
props: { props: {
propType: { propType: {
type: Number, type: String,
default: 1, default: '1',
}, },
warehouseId: { warehouseId: {
type: String, type: String,
@ -99,7 +89,6 @@ export default {
}, },
tableProps, tableProps,
tableProps1, tableProps1,
tableProps2,
tableData: [], tableData: [],
listQuery: { listQuery: {
pageSize: 100, pageSize: 100,

View File

@ -50,17 +50,14 @@ const tableProps = [
{ {
prop: 'warehouseCode', prop: 'warehouseCode',
label: '仓库编码', label: '仓库编码',
align: 'center',
}, },
{ {
prop: 'warehouseName', prop: 'warehouseName',
label: '仓库名称', label: '仓库名称',
align: 'center',
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-21 14:26:23 * @Date: 2023-08-21 14:26:23
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-08-31 14:36:15 * @LastEditTime: 2023-10-07 16:45:47
* @Description: * @Description:
--> -->
<template> <template>
@ -11,92 +11,97 @@
:formConfigs="formConfig" :formConfigs="formConfig"
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />
<div class="mainbody"> <div class="tips">
<div v-for="a in 3" :key="a"> <el-tag effect="dark"></el-tag>
<el-row type="flex" justify="space-around"> <el-tag type="success" effect="dark"></el-tag>
<el-col :span="5" v-for="i in 4" :key="i"> <el-tag type="warning" effect="dark"></el-tag>
<el-row type="flex" justify="space-between"> </div>
<el-col :span="12" v-for="j in 2" :key="j"> <div class="mainbody">
<div <div v-for="a in listQuery.total" :key="a">
class="dashboard-layout-item" <el-row>
v-for="z in 2" <el-col :span="24">
:key="z" <el-row>
style="background: #ffd781; float: left"> <div
<div class="dashboard-layout-item"
class="dashboard-layout-item-cricle" v-for="a in wareData.one"
style="background: #16dc09" /> :key="a.id+a.warehouseStorehouseCode"
{{ i + '+' + j + '+' + z }} :style="{background: bgColor[a.warehouseStorehouseState], float: 'left'}">
</div> <!-- <div
</el-col> class="dashboard-layout-item-cricle"
</el-row> style="background: #16dc09" /> -->
<el-row type="flex" justify="space-between"> {{ a.warehouseStorehouseCode }}
<el-col :span="12" v-for="j in 2" :key="j"> </div>
<div </el-row>
class="dashboard-layout-item" <el-row>
v-for="z in 2" <div
:key="z" class="dashboard-layout-item"
style="background: #ffd781; float: left"> v-for="b in wareData.two"
<div :key="b.id+b.warehouseStorehouseCode"
class="dashboard-layout-item-cricle" :style="{background: bgColor[b.warehouseStorehouseState], float: 'left'}">
style="background: #16dc09" /> <!-- <div
{{ i + '+' + j + '+' + z }} class="dashboard-layout-item-cricle"
</div> style="background: #16dc09" /> -->
</el-col> {{ b.warehouseStorehouseCode }}
</el-row> </div>
</el-col> </el-row>
</el-row> </el-col>
<el-divider class="divider"></el-divider> </el-row>
<el-row type="flex" justify="space-around"> <el-divider class="divider"></el-divider>
<el-col :span="5" v-for="i in 4" :key="i"> <el-row>
<el-row type="flex" justify="space-between"> <el-col :span="24">
<el-col :span="12" v-for="j in 2" :key="j"> <el-row>
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="z in 2" v-for="c in wareData.there"
:key="z" :key="c.id+c.warehouseStorehouseCode"
style="background: #ffd781; float: left"> :style="{background: bgColor[c.warehouseStorehouseState], float: 'left'}">
<div <!-- <div
class="dashboard-layout-item-cricle" class="dashboard-layout-item-cricle"
style="background: #16dc09" /> style="background: #16dc09" /> -->
{{ i + '+' + j + '+' + z }} {{ c.warehouseStorehouseCode }}
</div> </div>
</el-col> </el-row>
</el-row> <el-row>
<el-row type="flex" justify="space-between"> <div
<el-col :span="12" v-for="j in 2" :key="j"> class="dashboard-layout-item"
<div v-for="d in wareData.four"
class="dashboard-layout-item" :key="d.id+d.warehouseStorehouseCode"
v-for="z in 2" :style="{background: bgColor[d.warehouseStorehouseState], float: 'left'}">
:key="z" <!-- <div
style="background: #ffd781; float: left"> class="dashboard-layout-item-cricle"
<div style="background: #16dc09" /> -->
class="dashboard-layout-item-cricle" {{ d.warehouseStorehouseCode }}
style="background: #16dc09" /> </div>
{{ i + '+' + j + '+' + z }} </el-row>
</div> </el-col>
</el-col> </el-row>
</el-row> </div>
</el-col>
</el-row>
</div> </div>
</div>
</div> </div>
</template> </template>
<script> <script>
import basicPage from '../mixins/basic-page'; import basicPage from '../mixins/basic-page';
import { getWarehouseStorehousePage } from '@/api/asrs/warehouseStorehouse'; import { getWarehouseStorehouseList } from '@/api/asrs/warehouseStorehouse';
export default { export default {
mixins: [basicPage], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
getDataListURL: getWarehouseStorehousePage, getDataListURL: getWarehouseStorehouseList,
}, },
listQuery: { listQuery: {
wareLayer: 1, wareLayer: 1,
total: 0,
}, },
wareData: {
one: [],
two: [],
there: [],
four: [],
},
bgColor:['#37d97f','#ffbd02','#0b58ff'],
formConfig: [ formConfig: [
{ {
type: 'select', type: 'select',
@ -122,8 +127,34 @@ export default {
}; };
}, },
components: {}, components: {},
created() {}, created() {
},
methods: { methods: {
//
getDataList() {
this.dataListLoading = true;
this.wareData= {
one: [],
two: [],
there: [],
four: [],
},
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
response.data.forEach((a, b) => {
if (b % 4 === 0) {
this.wareData.one.push(a);
} else if (b % 4 === 1) {
this.wareData.two.push(a);
} else if (b % 4 === 2) {
this.wareData.there.push(a);
} else if (b % 4 === 3) {
this.wareData.four.push(a);
}
});
this.listQuery.total = Math.ceil(response.data.length / 120);
this.dataListLoading = false;
});
},
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
@ -139,18 +170,19 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.mainbody{ .mainbody {
display: flex; display: flex;
gap: 50px; gap: 50px;
flex-direction: column; flex-direction: column;
} }
.dashboard-layout-item { .dashboard-layout-item {
width: 80px; color: white;
width: 3.3%;
text-align: center; text-align: center;
height: 32px; height: 40px;
box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8); box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8);
border-radius: 2px 4px 4px 2px; border-radius: 2px 4px 4px 2px;
margin-bottom: 8px; margin-bottom: 4px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -161,11 +193,22 @@ export default {
border-radius: 6px; border-radius: 6px;
margin-right: 6px; margin-right: 6px;
} }
&:hover {
background-color: rgba(85, 136, 253, 0.8) !important;
color: #ffffff;
cursor: pointer;
transform: scaleY(1.3) translateZ(0);
}
} }
.el-divider--horizontal { .el-divider--horizontal {
margin: 10px 0; margin: 10px 0;
} }
.el-divider{ .el-divider {
background-color: black; background-color: black;
}
.tips {
position: absolute;
top: 22px;
left: 370px;
} }
</style> </style>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-21 14:26:23 * @Date: 2023-08-21 14:26:23
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-05 14:53:46 * @LastEditTime: 2023-10-07 16:45:37
* @Description: * @Description:
--> -->
<template> <template>
@ -11,92 +11,97 @@
:formConfigs="formConfig" :formConfigs="formConfig"
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />
<div class="mainbody"> <div class="tips">
<div v-for="a in 3" :key="a"> <el-tag effect="dark"></el-tag>
<el-row type="flex" justify="space-around"> <el-tag type="success" effect="dark"></el-tag>
<el-col :span="5" v-for="i in 4" :key="i"> <el-tag type="warning" effect="dark"></el-tag>
<el-row type="flex" justify="space-between"> </div>
<el-col :span="12" v-for="j in 2" :key="j"> <div class="mainbody">
<div <div v-for="a in listQuery.total" :key="a">
class="dashboard-layout-item" <el-row>
v-for="z in 2" <el-col :span="24">
:key="z" <el-row>
style="background: #ffd781; float: left"> <div
<div class="dashboard-layout-item"
class="dashboard-layout-item-cricle" v-for="a in wareData.one"
style="background: #16dc09" /> :key="a.id+a.warehouseStorehouseCode"
{{ i + '+' + j + '+' + z }} :style="{background: bgColor[a.warehouseStorehouseState], float: 'left'}">
</div> <!-- <div
</el-col> class="dashboard-layout-item-cricle"
</el-row> style="background: #16dc09" /> -->
<el-row type="flex" justify="space-between"> {{ a.warehouseStorehouseCode }}
<el-col :span="12" v-for="j in 2" :key="j"> </div>
<div </el-row>
class="dashboard-layout-item" <el-row>
v-for="z in 2" <div
:key="z" class="dashboard-layout-item"
style="background: #ffd781; float: left"> v-for="b in wareData.two"
<div :key="b.id+b.warehouseStorehouseCode"
class="dashboard-layout-item-cricle" :style="{background: bgColor[b.warehouseStorehouseState], float: 'left'}">
style="background: #16dc09" /> <!-- <div
{{ i + '+' + j + '+' + z }} class="dashboard-layout-item-cricle"
</div> style="background: #16dc09" /> -->
</el-col> {{ b.warehouseStorehouseCode }}
</el-row> </div>
</el-col> </el-row>
</el-row> </el-col>
<el-divider class="divider"></el-divider> </el-row>
<el-row type="flex" justify="space-around"> <el-divider class="divider"></el-divider>
<el-col :span="5" v-for="i in 4" :key="i"> <el-row>
<el-row type="flex" justify="space-between"> <el-col :span="24">
<el-col :span="12" v-for="j in 2" :key="j"> <el-row>
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="z in 2" v-for="c in wareData.there"
:key="z" :key="c.id+c.warehouseStorehouseCode"
style="background: #ffd781; float: left"> :style="{background: bgColor[c.warehouseStorehouseState], float: 'left'}">
<div <!-- <div
class="dashboard-layout-item-cricle" class="dashboard-layout-item-cricle"
style="background: #16dc09" /> style="background: #16dc09" /> -->
{{ i + '+' + j + '+' + z }} {{ c.warehouseStorehouseCode }}
</div> </div>
</el-col> </el-row>
</el-row> <el-row>
<el-row type="flex" justify="space-between"> <div
<el-col :span="12" v-for="j in 2" :key="j"> class="dashboard-layout-item"
<div v-for="d in wareData.four"
class="dashboard-layout-item" :key="d.id+d.warehouseStorehouseCode"
v-for="z in 2" :style="{background: bgColor[d.warehouseStorehouseState], float: 'left'}">
:key="z" <!-- <div
style="background: #ffd781; float: left"> class="dashboard-layout-item-cricle"
<div style="background: #16dc09" /> -->
class="dashboard-layout-item-cricle" {{ d.warehouseStorehouseCode }}
style="background: #16dc09" /> </div>
{{ i + '+' + j + '+' + z }} </el-row>
</div> </el-col>
</el-col> </el-row>
</el-row> </div>
</el-col>
</el-row>
</div> </div>
</div>
</div> </div>
</template> </template>
<script> <script>
import basicPage from '../mixins/basic-page'; import basicPage from '../mixins/basic-page';
import { getWarehouseStorehousePage } from '@/api/asrs/warehouseStorehouse'; import { getWarehouseStorehouseList } from '@/api/asrs/warehouseStorehouse';
export default { export default {
mixins: [basicPage], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
getDataListURL: getWarehouseStorehousePage, getDataListURL: getWarehouseStorehouseList,
}, },
listQuery: { listQuery: {
wareLayer: 1, wareLayer: 1,
total: 0,
}, },
wareData: {
one: [],
two: [],
there: [],
four: [],
},
bgColor:['#37d97f','#ffbd02','#0b58ff'],
formConfig: [ formConfig: [
{ {
type: 'select', type: 'select',
@ -124,8 +129,33 @@ export default {
components: {}, components: {},
created() { created() {
this.listQuery.warehouseId = this.bId; this.listQuery.warehouseId = this.bId;
}, },
methods: { methods: {
//
getDataList() {
this.dataListLoading = true;
this.wareData= {
one: [],
two: [],
there: [],
four: [],
},
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
response.data.forEach((a, b) => {
if (b % 4 === 0) {
this.wareData.one.push(a);
} else if (b % 4 === 1) {
this.wareData.two.push(a);
} else if (b % 4 === 2) {
this.wareData.there.push(a);
} else if (b % 4 === 3) {
this.wareData.four.push(a);
}
});
this.listQuery.total = Math.ceil(response.data.length / 120);
this.dataListLoading = false;
});
},
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
@ -141,18 +171,19 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.mainbody{ .mainbody {
display: flex; display: flex;
gap: 50px; gap: 50px;
flex-direction: column; flex-direction: column;
} }
.dashboard-layout-item { .dashboard-layout-item {
width: 80px; color: white;
width: 3.3%;
text-align: center; text-align: center;
height: 32px; height: 40px;
box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8); box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8);
border-radius: 2px 4px 4px 2px; border-radius: 2px 4px 4px 2px;
margin-bottom: 8px; margin-bottom: 4px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -163,11 +194,22 @@ export default {
border-radius: 6px; border-radius: 6px;
margin-right: 6px; margin-right: 6px;
} }
&:hover {
background-color: rgba(85, 136, 253, 0.8) !important;
color: #ffffff;
cursor: pointer;
transform: scaleY(1.3) translateZ(0);
}
} }
.el-divider--horizontal { .el-divider--horizontal {
margin: 10px 0; margin: 10px 0;
} }
.el-divider{ .el-divider {
background-color: black; background-color: black;
}
.tips {
position: absolute;
top: 22px;
left: 370px;
} }
</style> </style>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-08-31 16:37:37 * @LastEditTime: 2023-10-08 10:34:29
* @Description: * @Description:
--> -->
<template> <template>
@ -13,22 +13,12 @@
size="medium" size="medium"
label-width="120px"> label-width="120px">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="仓库" prop="warehouseInfo"> <el-form-item label="仓库" prop="warehouseName">
<el-select <el-input
v-model="dataForm.warehouseInfo" v-model="dataForm.warehouseName"
placeholder="请输入仓库" placeholder="请输入仓库名称"
filterable readonly
clearable :style="{ width: '100%' }" />
@change="setWarehouseInfo"
:style="{ width: '100%' }">
<el-option
v-for="item in urlOptions.optionArr.arr0"
:key="item.id"
:label="item.warehouseName"
:value="item.id+'-'+item.warehouseName+'-'+item.warehouseCode"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -37,7 +27,7 @@
v-model="dataForm.warehouseStorehouseName" v-model="dataForm.warehouseStorehouseName"
placeholder="请输入库位名称" placeholder="请输入库位名称"
clearable clearable
:style="{ width: '100%' }"></el-input> :style="{ width: '100%' }" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -130,10 +120,8 @@ export default {
updateURL: updateWarehouseStorehouse, updateURL: updateWarehouseStorehouse,
infoURL: getWarehouseStorehouse, infoURL: getWarehouseStorehouse,
}, },
setData: true,
dataForm: { dataForm: {
id: undefined, id: undefined,
warehouseInfo: undefined,
warehouseId: undefined, warehouseId: undefined,
warehouseName: undefined, warehouseName: undefined,
warehouseCode: undefined, warehouseCode: undefined,
@ -194,16 +182,24 @@ export default {
}; };
}, },
methods: { methods: {
setDataForm(){ getCode() {
this.dataForm.warehouseInfo = this.dataForm.warehouseId+'-'+this.dataForm.warehouseName+'-'+this.dataForm.warehouseCode if(this.dataForm.warehouseId === this.aId){
}, this.dataForm.warehouseName = "立库仓库A"
setWarehouseInfo(val){ this.dataForm.warehouseCode = "CK1"
if(val){ }else{
this.dataForm.warehouseId = val.split('-')[0] this.dataForm.warehouseName = "立库仓库B"
this.dataForm.warehouseName = val.split('-')[1] this.dataForm.warehouseCode = "CK2"
this.dataForm.warehouseCode = val.split('-')[2]
} }
} this.urlOptions.codeURL()
.then(({ data: res }) => {
if (this.urlOptions.codeName) {
this.dataForm[this.urlOptions.codeName] = res;
} else {
this.dataForm.code = res;
}
})
.catch(() => { });
},
}, },
}; };
</script> </script>

View File

@ -47,54 +47,44 @@ const tableProps = [
{ {
prop: 'warehouseCode', prop: 'warehouseCode',
label: '仓库编码', label: '仓库编码',
align: 'center',
}, },
{ {
prop: 'warehouseName', prop: 'warehouseName',
label: '仓库名称', label: '仓库名称',
align: 'center',
}, },
{ {
prop: 'warehouseStorehouseCode', prop: 'warehouseStorehouseCode',
label: '库位编码', label: '库位编码',
align: 'center',
}, },
{ {
prop: 'warehouseStorehouseName', prop: 'warehouseStorehouseName',
label: '库位名称', label: '库位名称',
align: 'center',
}, },
{ {
prop: 'wareRow', prop: 'wareRow',
label: '排', label: '排',
align: 'center',
}, },
{ {
prop: 'wareColumn', prop: 'wareColumn',
label: '列', label: '列',
align: 'center',
}, },
{ {
prop: 'wareLayer', prop: 'wareLayer',
label: '层', label: '层',
align: 'center',
}, },
{ {
prop: 'cacheLocation', prop: 'cacheLocation',
label: '是否缓存库位', label: '缓存库位',
align: 'center',
filter: codeFilter('isOrno'), filter: codeFilter('isOrno'),
}, },
{ {
prop: 'deactivate', prop: 'deactivate',
label: '是否停用', label: '是否停用',
align: 'center',
filter: codeFilter('deactivate'), filter: codeFilter('deactivate'),
}, },
{ {
prop: 'notes', prop: 'notes',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];

View File

@ -47,54 +47,44 @@ const tableProps = [
{ {
prop: 'warehouseCode', prop: 'warehouseCode',
label: '仓库编码', label: '仓库编码',
align: 'center',
}, },
{ {
prop: 'warehouseName', prop: 'warehouseName',
label: '仓库名称', label: '仓库名称',
align: 'center',
}, },
{ {
prop: 'warehouseStorehouseCode', prop: 'warehouseStorehouseCode',
label: '库位编码', label: '库位编码',
align: 'center',
}, },
{ {
prop: 'warehouseStorehouseName', prop: 'warehouseStorehouseName',
label: '库位名称', label: '库位名称',
align: 'center',
}, },
{ {
prop: 'wareRow', prop: 'wareRow',
label: '排', label: '排',
align: 'center',
}, },
{ {
prop: 'wareColumn', prop: 'wareColumn',
label: '列', label: '列',
align: 'center',
}, },
{ {
prop: 'wareLayer', prop: 'wareLayer',
label: '层', label: '层',
align: 'center',
}, },
{ {
prop: 'cacheLocation', prop: 'cacheLocation',
label: '是否缓存库位', label: '缓存库位',
align: 'center',
filter: codeFilter('isOrno'), filter: codeFilter('isOrno'),
}, },
{ {
prop: 'deactivate', prop: 'deactivate',
label: '是否停用', label: '是否停用',
align: 'center',
filter: codeFilter('deactivate'), filter: codeFilter('deactivate'),
}, },
{ {
prop: 'notes', prop: 'notes',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];

View File

@ -1,7 +1,15 @@
<!--
* @Author: zwq
* @Date: 2023-08-22 15:01:55
* @LastEditors: zwq
* @LastEditTime: 2023-10-07 14:39:56
* @Description:
-->
<template> <template>
<el-drawer <el-drawer
:visible.sync="visible" :visible.sync="visible"
:show-close="false" :show-close="false"
:destroy-on-close="true"
:wrapper-closable="false" :wrapper-closable="false"
class="drawer" class="drawer"
size="60%"> size="60%">
@ -18,31 +26,28 @@
@keyup.enter.native="dataFormSubmit"> @keyup.enter.native="dataFormSubmit">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="仓库编码" prop="code"> <el-form-item label="仓库编码" prop="warehouseCode">
<el-input <el-input
v-model="dataForm.code" v-model="dataForm.warehouseCode"
readonly readonly
:disabled="isdetail"
placeholder="请输入仓库编码" /> placeholder="请输入仓库编码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="仓库名" prop="name"> <el-form-item label="仓库名" prop="warehouseName">
<el-input <el-input
v-model="dataForm.name" v-model="dataForm.warehouseName"
readonly readonly
:disabled="isdetail"
placeholder="请输入仓库名" /> placeholder="请输入仓库名" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="工序" prop="processId"> <el-form-item label="工序" prop="process">
<el-select <el-select
v-model="dataForm.processId" v-model="dataForm.process"
style="width: 100%" style="width: 100%"
:disabled="isdetail"
placeholder="请选择工序"> placeholder="请选择工序">
<el-option <el-option
v-for="item in processArr" v-for="item in processArr"
@ -59,20 +64,20 @@
style="margin: 16px 0; padding-left: 8px" style="margin: 16px 0; padding-left: 8px"
:no-padding="true"> :no-padding="true">
产品信息 产品信息
<el-alert title="产品信息新增和修改后,需点击最下方保存按钮确定修改" type="warning" show-icon></el-alert>
</small-title> </small-title>
<div class="attr-list"> <div class="attr-list">
<base-table <base-table
:table-props=" :table-props="tableProps"
propType === 1 ? [...tableProps, ...tableProps1] : tableProps
"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:add-button-show="addButtonShow" :add-button-show="addButtonShow"
@emitButtonClick="addNew" @emitButtonClick="addNew"
@emitFun="inputChange"
:height="400"
:table-data="productAttributeList"> :table-data="productAttributeList">
<method-btn <method-btn
v-if="!isdetail"
slot="handleBtn" slot="handleBtn"
:width="120" :width="120"
label="操作" label="操作"
@ -85,47 +90,30 @@
<div style="position: absolute; bottom: 24px; right: 24px"> <div style="position: absolute; bottom: 24px; right: 24px">
<el-button style="margin-right: 10px" @click="goback()">返回</el-button> <el-button style="margin-right: 10px" @click="goback()">返回</el-button>
<el-button v-if="isdetail" type="primary" @click="goEdit()"> <span>
编辑
</el-button>
<span v-if="!isdetail">
<el-button type="primary" @click="dataFormSubmit()">保存</el-button> <el-button type="primary" @click="dataFormSubmit()">保存</el-button>
<!-- <el-button
v-if="dataForm.id && !isdetail"
type="primary"
@click="addNew()">
添加属性
</el-button> -->
</span> </span>
</div> </div>
<product-attr-add <product-attr-add
v-if="addOrUpdateVisible" v-if="addOrUpdateVisible"
ref="addOrUpdate" ref="addOrUpdate"
:warehouse-id="dataForm.id" :warehouse-id="dataForm.warehouseId"
@refreshDataList="getList" /> @refreshDataList="addList" />
</el-drawer> </el-drawer>
</template> </template>
<script> <script>
import { import { getWarehouseStorehouseGoodsSpecificationPage } from '@/api/asrs/warehouseStorehouseGoodsSpecification';
updateProduct, import { updateWarehouseStorehouse } from '@/api/asrs/warehouseStorehouse';
} from '@/api/core/base/product';
import {
getWarehouseStorehouseGoodsSpecificationPage,
deleteWarehouseStorehouseGoodsSpecification,
} from '@/api/asrs/warehouseStorehouseGoodsSpecification';
import productAttrAdd from './attr-add'; import productAttrAdd from './attr-add';
import inputArea from '../mixins/inputArea';
import selectQuality from '../mixins/selectQuality';
import { parseTime } from '../mixins/code-filter'; import { parseTime } from '../mixins/code-filter';
import codeFilter from '../mixins/code-filter'; import codeFilter from '../mixins/code-filter';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
const tableBtn = [ const tableBtn = [
{
type: 'edit',
btnName: '编辑',
},
{ {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@ -141,30 +129,27 @@ const tableProps = [
label: '产品编码', label: '产品编码',
}, },
{ {
prop: 'goodSpecificationName1', prop: 'specification',
label: '产品规格', label: '产品规格',
align: 'center', filter: codeFilter('specification'),
},
{
prop: 'number',
label: '数量',
subcomponent: inputArea,
}, },
{ {
prop: 'quality', prop: 'quality',
label: '品质', label: '品质',
align: 'center',
filter: codeFilter('quality'), filter: codeFilter('quality'),
subcomponent: selectQuality,
}, },
{ {
prop: 'cureTime', prop: 'cureTime',
label: '需要熟化时间(小时)', label: '需要熟化时间(小时)',
align: 'center',
}, },
]; ];
const tableProps1 = [
{
prop: 'number',
label: '数量',
align: 'center',
},
];
const processArr = [ const processArr = [
{ {
name: '开始', name: '开始',
@ -189,58 +174,35 @@ const processArr = [
]; ];
export default { export default {
components: { productAttrAdd, SmallTitle }, components: { productAttrAdd, SmallTitle },
props: {
propType: {
type: Number,
default: 0,
},
},
data() { data() {
return { return {
visible: false, visible: false,
addOrUpdateVisible: false, addOrUpdateVisible: false,
tableBtn, tableBtn,
tableProps, tableProps,
tableProps1,
productAttributeList: [], productAttributeList: [],
addButtonShow: '新增', addButtonShow: '新增',
processArr, processArr,
dataForm: { dataForm: {
id: null, id: null,
name: '', warehouseName: '',
code: '', warehouseCode: '',
processId: '', process: '',
}, },
listQuery: { listQuery: {
pageSize: 10, pageSize: 10,
pageNo: 1, pageNo: 1,
total: 0,
}, },
dataRule: { dataRule: {},
// name: [
// {
// required: true,
// message: '',
// trigger: 'blur',
// },
// ],
},
isdetail: false,
}; };
}, },
methods: { methods: {
initData() { initData() {
this.productAttributeList.splice(0); this.productAttributeList.splice(0);
}, },
init(val, isdetail) { init(val) {
console.log(val) this.dataForm = val;
this.dataForm.name = val.warehouseName
this.dataForm.code = val.warehouseCode
this.dataForm.processId = val.process
let id = val.id
this.initData(); this.initData();
this.isdetail = isdetail || false;
this.dataForm.id = id || null;
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
@ -263,9 +225,24 @@ export default {
}; };
getWarehouseStorehouseGoodsSpecificationPage(params).then((response) => { getWarehouseStorehouseGoodsSpecificationPage(params).then((response) => {
this.productAttributeList = response.data.list; this.productAttributeList = response.data.list;
this.listQuery.total = response.data.total;
}); });
}, },
inputChange(data) {
switch (data.sType) {
case 1:
this.productAttributeList[data._pageIndex - 1][data.prop] =
data[data.prop];
break;
case 2:
this.productAttributeList[data._pageIndex - 1][data.prop] =
data.string ? data.string.split('+')[0] : '';
this.productAttributeList[data._pageIndex - 1][data.prop + 'Name'] =
data.string ? data.string.split('+')[1] : '';
break;
default:
console.log(val);
}
},
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.$confirm( this.$confirm(
@ -282,29 +259,26 @@ export default {
} }
) )
.then(() => { .then(() => {
deleteWarehouseStorehouseGoodsSpecification(raw.data.id).then(({ data }) => { this.productAttributeList.splice(raw.data._pageIndex - 1, 1);
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getList();
},
});
});
}) })
.catch(() => {}); .catch(() => {});
} else { } else {
this.addNew(raw.data.id); this.addNew(raw.data._pageIndex);
} }
}, },
// //
dataFormSubmit() { dataFormSubmit() {
this.productAttributeList.forEach((item) => {
item.id = '';
item.warehouseStorehouseId = this.dataForm.id
item.warehouseId = '';
});
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.dataForm.list = this.productAttributeList;
// //
if (this.dataForm.id) { if (this.dataForm.id) {
updateProduct(this.dataForm).then((response) => { updateWarehouseStorehouse(this.dataForm).then((response) => {
this.$modal.msgSuccess('修改成功'); this.$modal.msgSuccess('修改成功');
this.visible = false; this.visible = false;
this.$emit('refreshDataList'); this.$emit('refreshDataList');
@ -314,16 +288,16 @@ export default {
} }
}); });
}, },
goEdit() {
this.isdetail = false;
},
// / // /
addNew(id) { addNew(index) {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(id); this.$refs.addOrUpdate.init(index);
}); });
}, },
addList(data) {
this.productAttributeList.push(data.productInfo);
},
goback() { goback() {
this.$emit('refreshDataList'); this.$emit('refreshDataList');
this.visible = false; this.visible = false;

View File

@ -19,17 +19,18 @@
:rules="dataRule" :rules="dataRule"
label-width="100px" label-width="100px"
@keyup.enter.native="dataFormSubmit()"> @keyup.enter.native="dataFormSubmit()">
<el-form-item label="产品" prop="productId"> <el-form-item label="产品" prop="productInfo">
<el-select <el-select
v-model="dataForm.productId" v-model="dataForm.productInfo"
style="width: 100%" style="width: 100%"
@change="setProduct" filterable
value-key="id"
placeholder="请选择产品"> placeholder="请选择产品">
<el-option <el-option
v-for="item in productArr" v-for="item in productArr"
:key="item.id" :key="item.id"
:label="item.goodSpecificationName" :label="item.goodSpecificationName"
:value="item.id" /> :value="item" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -42,7 +43,6 @@
</template> </template>
<script> <script>
import { createWarehouseStorehouseGoodsSpecification } from '@/api/asrs/warehouseStorehouseGoodsSpecification';
import { getGoodSpecificationPage } from '@/api/asrs/goodSpecification'; import { getGoodSpecificationPage } from '@/api/asrs/goodSpecification';
export default { export default {
@ -56,52 +56,52 @@ export default {
return { return {
visible: false, visible: false,
dataForm: { dataForm: {
id: 0, index: -1,
productId: '', productInfo: '',
value: '',
}, },
productArr: [], productArr: [],
dataRule: { dataRule: {
productId: [{ required: true, message: '产品不能为空', trigger: 'blur' }], productId: [
{ required: true, message: '产品不能为空', trigger: 'blur' },
],
}, },
}; };
}, },
methods: { methods: {
init(id) { init(index) {
this.dataForm.id = id || ''; if (index >= 0) {
this.dataForm.index = index;
}
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields(); this.$refs['dataForm'].resetFields();
const params = { const params = {
pageSize: 100, pageSize: 100,
pageNo: 1, pageNo: 1,
warehouseId: this.warehouseId,
}; };
getGoodSpecificationPage(params).then((response) => { getGoodSpecificationPage(params).then((response) => {
this.productArr = response.data.list; this.productArr = response.data.list;
}); });
}); });
}, },
setProduct(val) {
let data = this.productArr.find((item) => {
return (item.id === val);
});
const { id, ...newData } = data;
this.dataForm.value = newData;
this.dataForm.value.goodSpecificationId = id;
},
// //
dataFormSubmit() { dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// this.dataForm.productInfo.goodSpecificationId =
createWarehouseStorehouseGoodsSpecification({ this.dataForm.productInfo.id;
...this.dataForm.value, //
warehouseStorehouseId: this.warehouseId, if (this.dataForm.index >= 0) {
}).then((response) => { this.$modal.msgSuccess('修改成功');
this.$modal.msgSuccess('添加成功');
this.visible = false; this.visible = false;
this.$emit('refreshDataList'); this.$emit('refreshDataList', this.dataForm);
}); return;
}
//
this.$modal.msgSuccess('新增成功');
this.visible = false;
this.$emit('refreshDataList', this.dataForm);
} }
}); });
}, },

View File

@ -53,7 +53,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作">
<template v-slot="scope"> <template v-slot="scope">
<el-button <el-button
size="mini" size="mini"
@ -62,7 +62,7 @@
v-hasPermi="[ v-hasPermi="[
'asrs:warehouse-storehouse-goods-specification:update', 'asrs:warehouse-storehouse-goods-specification:update',
]"> ]">
编辑 <span class="iconfont icon-edit primary-color"></span>
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>

View File

@ -53,7 +53,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作">
<template v-slot="scope"> <template v-slot="scope">
<el-button <el-button
size="mini" size="mini"
@ -62,7 +62,7 @@
v-hasPermi="[ v-hasPermi="[
'asrs:warehouse-storehouse-goods-specification:update', 'asrs:warehouse-storehouse-goods-specification:update',
]"> ]">
编辑 <span class="iconfont icon-edit primary-color"></span>
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>

View File

@ -0,0 +1,46 @@
<!--
* @Author: zwq
* @Date: 2023-09-22 15:36:40
* @LastEditors: zwq
* @LastEditTime: 2023-09-26 15:59:57
* @Description:
-->
<template>
<div class="tableInner">
<el-input v-model="list[itemProp]" @blur="changeInput" />
</div>
</template>
<script>
export default {
name: "InputArea",
props: {
injectData: {
type: Object,
default: () => ({}),
},
itemProp: {
type: String,
},
},
data() {
return {
list: this.injectData,
};
},
methods: {
changeInput() {
this.list.sType = 1
this.$emit("emitData", this.list,1);
},
},
};
</script>
<style scoped>
.tableInner >>> .el-input__inner {
color: #409EFF;
border: 1px rgb(232, 231, 231) solid;
padding: 0;
text-align: center;
height: 30px;
}
</style>

View File

@ -0,0 +1,59 @@
<template>
<div class="tableInner">
<el-select v-model="list[itemProp]" @change="changeInput">
<el-option
v-for="item in QArr"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</div>
</template>
<script>
export default {
name: 'InputArea',
props: {
injectData: {
type: Object,
default: () => ({}),
},
itemProp: {
type: String,
},
},
data() {
return {
list: this.injectData,
QArr: [
{
name: 'A',
id: 0,
},
{
name: 'B',
id: 1,
},
{
name: 'C',
id: 2,
},
],
};
},
methods: {
changeInput() {
this.list.sType = 1;
this.$emit('emitData', this.list);
},
},
};
</script>
<style scoped>
.tableInner >>> .el-input__inner {
color: #409EFF;
border: 1px rgb(232, 231, 231) solid;
padding: 0;
text-align: center;
height: 30px;
}
</style>

View File

@ -2,6 +2,7 @@
<el-drawer <el-drawer
:visible.sync="visible" :visible.sync="visible"
:show-close="false" :show-close="false"
:destroy-on-close="true"
:wrapper-closable="false" :wrapper-closable="false"
class="drawer" class="drawer"
size="60%"> size="60%">
@ -22,7 +23,6 @@
<el-input <el-input
v-model="dataForm.code" v-model="dataForm.code"
readonly readonly
:disabled="isdetail"
placeholder="请输入仓库编码" /> placeholder="请输入仓库编码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -31,7 +31,6 @@
<el-input <el-input
v-model="dataForm.name" v-model="dataForm.name"
readonly readonly
:disabled="isdetail"
placeholder="请输入仓库名" /> placeholder="请输入仓库名" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -42,7 +41,6 @@
<el-select <el-select
v-model="dataForm.processId" v-model="dataForm.processId"
style="width: 100%" style="width: 100%"
:disabled="isdetail"
placeholder="请选择工序"> placeholder="请选择工序">
<el-option <el-option
v-for="item in processArr" v-for="item in processArr"
@ -59,20 +57,22 @@
style="margin: 16px 0; padding-left: 8px" style="margin: 16px 0; padding-left: 8px"
:no-padding="true"> :no-padding="true">
产品信息 产品信息
<el-alert title="产品信息新增和修改后,需点击最下方保存按钮确定修改" type="warning" show-icon></el-alert>
</small-title> </small-title>
<div class="attr-list"> <div class="attr-list">
<base-table <base-table
:table-props=" :table-props="
propType === 1 ? [...tableProps, ...tableProps1] : tableProps tableProps
" "
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:add-button-show="addButtonShow" :add-button-show="addButtonShow"
@emitButtonClick="addNew" @emitButtonClick="addNew"
@emitFun="inputChange"
:height="400"
:table-data="productAttributeList"> :table-data="productAttributeList">
<method-btn <method-btn
v-if="!isdetail"
slot="handleBtn" slot="handleBtn"
:width="120" :width="120"
label="操作" label="操作"
@ -85,25 +85,16 @@
<div style="position: absolute; bottom: 24px; right: 24px"> <div style="position: absolute; bottom: 24px; right: 24px">
<el-button style="margin-right: 10px" @click="goback()">返回</el-button> <el-button style="margin-right: 10px" @click="goback()">返回</el-button>
<el-button v-if="isdetail" type="primary" @click="goEdit()"> <span>
编辑
</el-button>
<span v-if="!isdetail">
<el-button type="primary" @click="dataFormSubmit()">保存</el-button> <el-button type="primary" @click="dataFormSubmit()">保存</el-button>
<!-- <el-button
v-if="dataForm.id && !isdetail"
type="primary"
@click="addNew()">
添加属性
</el-button> -->
</span> </span>
</div> </div>
<product-attr-add <product-attr-add
v-if="addOrUpdateVisible" v-if="addOrUpdateVisible"
ref="addOrUpdate" ref="addOrUpdate"
:warehouse-id="dataForm.id" :warehouse-id="dataForm.warehouseId"
@refreshDataList="getList" /> @refreshDataList="addList" />
</el-drawer> </el-drawer>
</template> </template>
@ -117,15 +108,13 @@ import {
deleteWarehouseStorehouseGoodsSpecification, deleteWarehouseStorehouseGoodsSpecification,
} from '@/api/asrs/warehouseStorehouseGoodsSpecification'; } from '@/api/asrs/warehouseStorehouseGoodsSpecification';
import productAttrAdd from './attr-add'; import productAttrAdd from './attr-add';
import inputArea from '../mixins/inputArea';
import selectQuality from '../mixins/selectQuality';
import { parseTime } from '../mixins/code-filter'; import { parseTime } from '../mixins/code-filter';
import codeFilter from '../mixins/code-filter'; import codeFilter from '../mixins/code-filter';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
const tableBtn = [ const tableBtn = [
{
type: 'edit',
btnName: '编辑',
},
{ {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@ -141,35 +130,27 @@ const tableProps = [
label: '产品编码', label: '产品编码',
}, },
{ {
prop: 'goodSpecificationName1', prop: 'specification',
label: '产品规格', label: '产品规格',
align: 'center', filter: codeFilter('specification'),
}, },
{ {
prop: 'number', prop: 'number',
label: '数量', label: '数量',
align: 'center', subcomponent: inputArea,
}, },
{ {
prop: 'quality', prop: 'quality',
label: '品质', label: '品质',
align: 'center',
filter: codeFilter('quality'), filter: codeFilter('quality'),
subcomponent: selectQuality,
}, },
{ {
prop: 'cureTime', prop: 'cureTime',
label: '需要熟化时间(小时)', label: '需要熟化时间(小时)',
align: 'center',
}, },
]; ];
const tableProps1 = [
{
prop: 'number',
label: '数量',
align: 'center',
},
];
const processArr = [ const processArr = [
{ {
name: '开始', name: '开始',
@ -194,19 +175,12 @@ const processArr = [
]; ];
export default { export default {
components: { productAttrAdd, SmallTitle }, components: { productAttrAdd, SmallTitle },
props: {
propType: {
type: Number,
default: 0,
},
},
data() { data() {
return { return {
visible: false, visible: false,
addOrUpdateVisible: false, addOrUpdateVisible: false,
tableBtn, tableBtn,
tableProps, tableProps,
tableProps1,
productAttributeList: [], productAttributeList: [],
addButtonShow: '新增', addButtonShow: '新增',
processArr, processArr,
@ -230,21 +204,15 @@ export default {
// }, // },
// ], // ],
}, },
isdetail: false,
}; };
}, },
methods: { methods: {
initData() { initData() {
this.productAttributeList.splice(0); this.productAttributeList.splice(0);
}, },
init(val, isdetail) { init(val) {
this.dataForm.name = val.warehouseName this.dataForm = val;
this.dataForm.code = val.warehouseCode
this.dataForm.processId = val.process
let id = val.id
this.initData(); this.initData();
this.isdetail = isdetail || false;
this.dataForm.id = id || null;
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
@ -270,6 +238,22 @@ export default {
this.listQuery.total = response.data.total; this.listQuery.total = response.data.total;
}); });
}, },
inputChange(data) {
switch (data.sType) {
case 1:
this.productAttributeList[data._pageIndex - 1][data.prop] =
data[data.prop];
break;
case 2:
this.productAttributeList[data._pageIndex - 1][data.prop] =
data.string ? data.string.split('+')[0] : '';
this.productAttributeList[data._pageIndex - 1][data.prop + 'Name'] =
data.string ? data.string.split('+')[1] : '';
break;
default:
console.log(val);
}
},
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.$confirm( this.$confirm(
@ -286,27 +270,24 @@ export default {
} }
) )
.then(() => { .then(() => {
deleteWarehouseStorehouseGoodsSpecification(raw.data.id).then(({ data }) => { this.productAttributeList.splice(raw.data._pageIndex - 1, 1);
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getList();
},
});
});
}) })
.catch(() => {}); .catch(() => {});
} else { } else {
this.addNew(raw.data.id); this.addNew(raw.data._pageIndex);
} }
}, },
// //
dataFormSubmit() { dataFormSubmit() {
this.productAttributeList.forEach((item) => {
item.id = '';
item.warehouseStorehouseId = this.dataForm.id
item.warehouseId = '';
});
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// //
this.dataForm.list = this.productAttributeList;
if (this.dataForm.id) { if (this.dataForm.id) {
updateProduct(this.dataForm).then((response) => { updateProduct(this.dataForm).then((response) => {
this.$modal.msgSuccess('修改成功'); this.$modal.msgSuccess('修改成功');
@ -318,16 +299,16 @@ export default {
} }
}); });
}, },
goEdit() {
this.isdetail = false;
},
// / // /
addNew(id) { addNew(index) {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(id); this.$refs.addOrUpdate.init(index);
}); });
}, },
addList(data) {
this.productAttributeList.push(data.productInfo);
},
goback() { goback() {
this.$emit('refreshDataList'); this.$emit('refreshDataList');
this.visible = false; this.visible = false;

View File

@ -19,17 +19,18 @@
:rules="dataRule" :rules="dataRule"
label-width="100px" label-width="100px"
@keyup.enter.native="dataFormSubmit()"> @keyup.enter.native="dataFormSubmit()">
<el-form-item label="产品" prop="productId"> <el-form-item label="产品" prop="productInfo">
<el-select <el-select
v-model="dataForm.productId" v-model="dataForm.productInfo"
style="width: 100%" style="width: 100%"
@change="setProduct" filterable
value-key="id"
placeholder="请选择产品"> placeholder="请选择产品">
<el-option <el-option
v-for="item in productArr" v-for="item in productArr"
:key="item.id" :key="item.id"
:label="item.goodSpecificationName" :label="item.goodSpecificationName"
:value="item.id" /> :value="item" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -42,7 +43,6 @@
</template> </template>
<script> <script>
import { createWarehouseStorehouseGoodsSpecification } from '@/api/asrs/warehouseStorehouseGoodsSpecification';
import { getGoodSpecificationPage } from '@/api/asrs/goodSpecification'; import { getGoodSpecificationPage } from '@/api/asrs/goodSpecification';
export default { export default {
@ -56,9 +56,8 @@ export default {
return { return {
visible: false, visible: false,
dataForm: { dataForm: {
id: 0, index: -1,
productId: '', productInfo: '',
value: '',
}, },
productArr: [], productArr: [],
dataRule: { dataRule: {
@ -67,41 +66,39 @@ export default {
}; };
}, },
methods: { methods: {
init(id) { init(index) {
this.dataForm.id = id || ''; if (index >= 0) {
this.dataForm.index = index;
}
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields(); this.$refs['dataForm'].resetFields();
const params = { const params = {
pageSize: 100, pageSize: 100,
pageNo: 1, pageNo: 1,
warehouseId: this.warehouseId,
}; };
getGoodSpecificationPage(params).then((response) => { getGoodSpecificationPage(params).then((response) => {
this.productArr = response.data.list; this.productArr = response.data.list;
}); });
}); });
}, },
setProduct(val) {
let data = this.productArr.find((item) => {
return (item.id === val);
});
const { id, ...newData } = data;
this.dataForm.value = newData;
this.dataForm.value.goodSpecificationId = id;
},
// //
dataFormSubmit() { dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// this.dataForm.productInfo.goodSpecificationId = this.dataForm.productInfo.id
createWarehouseStorehouseGoodsSpecification({ //
...this.dataForm.value, if (this.dataForm.index >= 0) {
warehouseStorehouseId: this.warehouseId, this.$modal.msgSuccess('修改成功');
}).then((response) => {
this.$modal.msgSuccess('添加成功');
this.visible = false; this.visible = false;
this.$emit('refreshDataList'); this.$emit('refreshDataList', this.dataForm);
}); return;
}
//
this.$modal.msgSuccess('新增成功');
this.visible = false;
this.$emit('refreshDataList', this.dataForm);
} }
}); });
}, },

View File

@ -17,7 +17,7 @@
ref="dataList"> ref="dataList">
<el-table-column type="expand"> <el-table-column type="expand">
<template slot-scope="scope"> <template slot-scope="scope">
<product :warehouse-id="scope.row.id" :prop-type="2"></product> <product :warehouse-id="scope.row.id"></product>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="warehouseName" label="仓库名"></el-table-column> <el-table-column prop="warehouseName" label="仓库名"></el-table-column>
@ -55,7 +55,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作">
<template v-slot="scope"> <template v-slot="scope">
<el-button <el-button
size="mini" size="mini"
@ -67,7 +67,7 @@
</el-button> </el-button>
<el-button <el-button
size="mini" size="mini"
v-else-if="scope.row.warehouseStorehouseState === 1" v-if="scope.row.warehouseStorehouseState === 2"
type="text" type="text"
@click="handleClick({ data: scope.row, type: 'out' })" @click="handleClick({ data: scope.row, type: 'out' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']"> v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
@ -75,7 +75,7 @@
</el-button> </el-button>
<el-button <el-button
size="mini" size="mini"
v-else-if="scope.row.warehouseStorehouseState === 2" v-if="scope.row.warehouseStorehouseState === 2"
type="text" type="text"
@click="handleClick({ data: scope.row, type: 'move' })" @click="handleClick({ data: scope.row, type: 'move' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']"> v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
@ -211,23 +211,6 @@ export default {
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{
type: 'button',
btnName: '重置',
name: 'reset',
},
// {
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
// },
// {
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
// btnName: '',
// name: 'export',
// color: 'warning',
// },
], ],
}; };
}, },
@ -255,6 +238,7 @@ export default {
case 'reset': case 'reset':
this.$refs.searchBarForm.resetForm(); this.$refs.searchBarForm.resetForm();
this.listQuery = { this.listQuery = {
warehouseId:'1696803324030865409',
pageSize: 10, pageSize: 10,
pageNo: 1, pageNo: 1,
total: 1, total: 1,

View File

@ -17,7 +17,7 @@
ref="dataList"> ref="dataList">
<el-table-column type="expand"> <el-table-column type="expand">
<template slot-scope="scope"> <template slot-scope="scope">
<product :warehouse-id="scope.row.id" :prop-type="2"></product> <product :warehouse-id="scope.row.id"></product>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="warehouseName" label="仓库名"></el-table-column> <el-table-column prop="warehouseName" label="仓库名"></el-table-column>
@ -55,7 +55,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作">
<template v-slot="scope"> <template v-slot="scope">
<el-button <el-button
size="mini" size="mini"
@ -67,7 +67,7 @@
</el-button> </el-button>
<el-button <el-button
size="mini" size="mini"
v-else-if="scope.row.warehouseStorehouseState === 1" v-if="scope.row.warehouseStorehouseState === 2"
type="text" type="text"
@click="handleClick({ data: scope.row, type: 'out' })" @click="handleClick({ data: scope.row, type: 'out' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']"> v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
@ -75,7 +75,7 @@
</el-button> </el-button>
<el-button <el-button
size="mini" size="mini"
v-else-if="scope.row.warehouseStorehouseState === 2" v-if="scope.row.warehouseStorehouseState === 2"
type="text" type="text"
@click="handleClick({ data: scope.row, type: 'move' })" @click="handleClick({ data: scope.row, type: 'move' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']"> v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
@ -212,23 +212,6 @@ export default {
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{
type: 'button',
btnName: '重置',
name: 'reset',
},
// {
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
// },
// {
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
// btnName: '',
// name: 'export',
// color: 'warning',
// },
], ],
}; };
}, },

View File

@ -17,7 +17,7 @@
ref="dataList"> ref="dataList">
<el-table-column type="expand"> <el-table-column type="expand">
<template slot-scope="scope"> <template slot-scope="scope">
<product :warehouse-id="scope.row.id" :prop-type="3"></product> <product :warehouse-id="scope.row.id" :prop-type="'2'"></product>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="warehouseName" label="仓库名"></el-table-column> <el-table-column prop="warehouseName" label="仓库名"></el-table-column>
@ -29,6 +29,15 @@
prop="warehouseStorehouseCode" prop="warehouseStorehouseCode"
label="库位编码"></el-table-column> label="库位编码"></el-table-column>
<el-table-column prop="trayCode" label="托盘编码"></el-table-column> <el-table-column prop="trayCode" label="托盘编码"></el-table-column>
<el-table-column prop="process" label="工序">
<template slot-scope="scope">
<span>
{{
scope.row.process >= 0 ? processArr[scope.row.process].name : ''
}}
</span>
</template>
</el-table-column>
<el-table-column prop="createDate" label="出入库时间"> <el-table-column prop="createDate" label="出入库时间">
<template v-slot="scope"> <template v-slot="scope">
<span>{{ parseTime(scope.row.createDate) }}</span> <span>{{ parseTime(scope.row.createDate) }}</span>
@ -76,6 +85,28 @@ const warehouseStorehouseStorageState = [
id: 2, id: 2,
}, },
]; ];
const processArr = [
{
name: '开始',
id: 0,
},
{
name: '一次分切后',
id: 1,
},
{
name: '一次分拣后',
id: 2,
},
{
name: '二次分切后',
id: 3,
},
{
name: '二次分拣后',
id: 4,
},
];
export default { export default {
mixins: [basicPage], mixins: [basicPage],
data() { data() {
@ -83,13 +114,14 @@ export default {
urlOptions: { urlOptions: {
getDataListURL: getWarehouseStorehouseStoragePage, getDataListURL: getWarehouseStorehouseStoragePage,
}, },
processArr,
tableData: [], tableData: [],
warehouseStorehouseStorageState, warehouseStorehouseStorageState,
formConfig: [ formConfig: [
{ {
type: 'input', type: 'input',
label: '库名', label: '名',
placeholder: '库名', placeholder: '名',
param: 'name', param: 'name',
}, },
{ {
@ -108,7 +140,7 @@ export default {
type: 'select', type: 'select',
label: '库位状态', label: '库位状态',
selectOptions: warehouseStorehouseStorageState, selectOptions: warehouseStorehouseStorageState,
param: 'warehouseStorehouseStateId', param: 'state',
defaultSelect: '', defaultSelect: '',
filterable: true, filterable: true,
}, },
@ -117,7 +149,7 @@ export default {
label: '出入库时间', label: '出入库时间',
dateType: 'daterange', dateType: 'daterange',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd hh:mm:ss',
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
@ -154,8 +186,8 @@ export default {
this.listQuery.warehouseStorehouseName = val.name; this.listQuery.warehouseStorehouseName = val.name;
this.listQuery.warehouseStorehouseCode = val.kcode; this.listQuery.warehouseStorehouseCode = val.kcode;
this.listQuery.trayCode = val.tcode; this.listQuery.trayCode = val.tcode;
this.listQuery.warehouseStorehouseStorageState = this.listQuery.warehouseStorehouseStorageState =val.state;
val.warehouseStorehouseStorageStateId; this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : ''; this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : ''; this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
this.getDataList(); this.getDataList();

View File

@ -17,7 +17,7 @@
ref="dataList"> ref="dataList">
<el-table-column type="expand"> <el-table-column type="expand">
<template slot-scope="scope"> <template slot-scope="scope">
<product :warehouse-id="scope.row.id" :prop-type="3"></product> <product :warehouse-id="scope.row.id" :prop-type="2"></product>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="warehouseName" label="仓库名"></el-table-column> <el-table-column prop="warehouseName" label="仓库名"></el-table-column>
@ -29,6 +29,15 @@
prop="warehouseStorehouseCode" prop="warehouseStorehouseCode"
label="库位编码"></el-table-column> label="库位编码"></el-table-column>
<el-table-column prop="trayCode" label="托盘编码"></el-table-column> <el-table-column prop="trayCode" label="托盘编码"></el-table-column>
<el-table-column prop="process" label="工序">
<template slot-scope="scope">
<span>
{{
scope.row.process >= 0 ? processArr[scope.row.process].name : ''
}}
</span>
</template>
</el-table-column>
<el-table-column prop="createDate" label="出入库时间"> <el-table-column prop="createDate" label="出入库时间">
<template v-slot="scope"> <template v-slot="scope">
<span>{{ parseTime(scope.row.createDate) }}</span> <span>{{ parseTime(scope.row.createDate) }}</span>
@ -76,6 +85,28 @@ const warehouseStorehouseStorageState = [
id: 2, id: 2,
}, },
]; ];
const processArr = [
{
name: '开始',
id: 0,
},
{
name: '一次分切后',
id: 1,
},
{
name: '一次分拣后',
id: 2,
},
{
name: '二次分切后',
id: 3,
},
{
name: '二次分拣后',
id: 4,
},
];
export default { export default {
mixins: [basicPage], mixins: [basicPage],
data() { data() {
@ -83,13 +114,14 @@ export default {
urlOptions: { urlOptions: {
getDataListURL: getWarehouseStorehouseStoragePage, getDataListURL: getWarehouseStorehouseStoragePage,
}, },
processArr,
tableData: [], tableData: [],
warehouseStorehouseStorageState, warehouseStorehouseStorageState,
formConfig: [ formConfig: [
{ {
type: 'input', type: 'input',
label: '库名', label: '名',
placeholder: '库名', placeholder: '名',
param: 'name', param: 'name',
}, },
{ {
@ -108,7 +140,7 @@ export default {
type: 'select', type: 'select',
label: '库位状态', label: '库位状态',
selectOptions: warehouseStorehouseStorageState, selectOptions: warehouseStorehouseStorageState,
param: 'warehouseStorehouseStateId', param: 'state',
defaultSelect: '', defaultSelect: '',
filterable: true, filterable: true,
}, },
@ -117,7 +149,7 @@ export default {
label: '出入库时间', label: '出入库时间',
dateType: 'daterange', dateType: 'daterange',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd hh:mm:ss',
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
@ -156,7 +188,10 @@ export default {
this.listQuery.warehouseStorehouseName = val.name; this.listQuery.warehouseStorehouseName = val.name;
this.listQuery.warehouseStorehouseCode = val.kcode; this.listQuery.warehouseStorehouseCode = val.kcode;
this.listQuery.trayCode = val.tcode; this.listQuery.trayCode = val.tcode;
this.listQuery.warehouseStorehouseStorageState = val.warehouseStorehouseStorageStateId; this.listQuery.warehouseStorehouseStorageState =val.state;
this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
this.getDataList(); this.getDataList();
break; break;
case 'reset': case 'reset':

View File

@ -51,27 +51,22 @@ const tableProps = [
{ {
prop: 'code', prop: 'code',
label: '工厂编码', label: '工厂编码',
align: 'center',
}, },
{ {
prop: 'name', prop: 'name',
label: '工厂名称', label: '工厂名称',
align: 'center',
}, },
{ {
prop: 'address', prop: 'address',
label: '地址', label: '地址',
align: 'center',
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
{ {
prop: 'createTime', prop: 'createTime',
label: '创建时间', label: '创建时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
]; ];

View File

@ -37,19 +37,16 @@ const tableProps = [
{ {
prop: 'lineName', prop: 'lineName',
label: '产线', label: '产线',
align: 'center',
}, },
{ {
prop: 'productName', prop: 'productName',
label: '在制产品', label: '在制产品',
align: 'center',
list: [], list: [],
subcomponent: selectProduct, subcomponent: selectProduct,
}, },
{ {
prop: 'recordTime', prop: 'recordTime',
label: '开始时间', label: '开始时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
]; ];

View File

@ -29,23 +29,19 @@ const tableProps = [
{ {
prop: 'productionLineName', prop: 'productionLineName',
label: '产线', label: '产线',
align: 'center',
}, },
{ {
prop: 'productName', prop: 'productName',
label: '在制产品', label: '在制产品',
align: 'center',
}, },
{ {
prop: 'startTime', prop: 'startTime',
label: '开始时间', label: '开始时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
{ {
prop: 'endTime', prop: 'endTime',
label: '结束时间', label: '结束时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
]; ];

View File

@ -2,6 +2,7 @@
<el-drawer <el-drawer
:visible.sync="visible" :visible.sync="visible"
:show-close="false" :show-close="false"
:destroy-on-close="true"
:wrapper-closable="false" :wrapper-closable="false"
class="drawer" class="drawer"
size="60%"> size="60%">

View File

@ -51,28 +51,23 @@ const tableProps = [
{ {
prop: 'code', prop: 'code',
label: '产品编码', label: '产品编码',
align: 'center',
}, },
{ {
prop: 'name', prop: 'name',
label: '产品名称', label: '产品名称',
align: 'center',
}, },
{ {
prop: 'specifications', prop: 'specifications',
label: '规格', label: '规格',
align: 'center',
}, },
{ {
prop: 'unitDictValue', prop: 'unitDictValue',
label: '单位', label: '单位',
align: 'center',
subcomponent: unitDict, subcomponent: unitDict,
}, },
{ {
prop: 'createTime', prop: 'createTime',
label: '创建时间', label: '创建时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
]; ];

View File

@ -53,43 +53,35 @@ const tableProps = [
{ {
prop: 'code', prop: 'code',
label: '产线编码', label: '产线编码',
align: 'center',
}, },
{ {
prop: 'name', prop: 'name',
label: '产线名称', label: '产线名称',
align: 'center',
}, },
{ {
prop: 'factoryName', prop: 'factoryName',
label: '工厂', label: '工厂',
align: 'center',
}, },
{ {
prop: 'externalCode', prop: 'externalCode',
label: '额外编码', label: '额外编码',
align: 'center',
}, },
{ {
prop: 'status', prop: 'status',
label: '当前状态', label: '当前状态',
align: 'center',
filter: codeFilter('lineStatus'), filter: codeFilter('lineStatus'),
}, },
{ {
prop: 'description', prop: 'description',
label: '描述', label: '描述',
align: 'center',
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
{ {
prop: 'createTime', prop: 'createTime',
label: '创建时间', label: '创建时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
]; ];

View File

@ -51,32 +51,26 @@ const tableProps = [
{ {
prop: 'code', prop: 'code',
label: '工段编码', label: '工段编码',
align: 'center',
}, },
{ {
prop: 'name', prop: 'name',
label: '工段名称', label: '工段名称',
align: 'center',
}, },
{ {
prop: 'productionLineName', prop: 'productionLineName',
label: '产线', label: '产线',
align: 'center',
}, },
{ {
prop: 'sort', prop: 'sort',
label: '排序', label: '排序',
align: 'center',
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
{ {
prop: 'createTime', prop: 'createTime',
label: '创建时间', label: '创建时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
]; ];

View File

@ -51,17 +51,14 @@ const tableProps = [
{ {
prop: 'code', prop: 'code',
label: '仓库编码', label: '仓库编码',
align: 'center',
}, },
{ {
prop: 'name', prop: 'name',
label: '仓库名称', label: '仓库名称',
align: 'center',
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-06-01 10:47:42 * @Date: 2023-06-01 10:47:42
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-08-31 16:23:08 * @LastEditTime: 2023-10-08 15:48:49
* @Description: * @Description:
--> -->
<template> <template>
@ -33,10 +33,6 @@ export default {
type: String, type: String,
default: '300px', default: '300px',
}, },
occupancyData: {
type: Number,
default: 0,
},
}, },
name: 'echarts', name: 'echarts',
data() { data() {
@ -52,7 +48,7 @@ export default {
this.chart = null; this.chart = null;
}, },
methods: { methods: {
initChart() { initChart(occupancyData) {
this.chart = echarts.init(this.$el, 'macarons'); this.chart = echarts.init(this.$el, 'macarons');
this.chart.setOption({ this.chart.setOption({
@ -169,7 +165,7 @@ export default {
}, },
data: [ data: [
{ {
value: this.occupancyData * 100, value: occupancyData,
}, },
], ],
radius: '90%', radius: '90%',

View File

@ -57,17 +57,14 @@ const tableProps = [
{ {
prop: 'goodSpecificationCode', prop: 'goodSpecificationCode',
label: '产品编码', label: '产品编码',
align: 'center',
}, },
{ {
prop: 'goodSpecificationName', prop: 'goodSpecificationName',
label: '产品名称', label: '产品名称',
align: 'center',
}, },
{ {
prop: 'deactivate', prop: 'deactivate',
label: '是否启用', label: '是否启用',
align: 'center',
filter: codeFilter('deactivate'), filter: codeFilter('deactivate'),
}, },
]; ];

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-06 15:16:08 * @LastEditTime: 2023-09-26 15:07:27
* @Description: * @Description:
--> -->
<template> <template>
@ -103,6 +103,7 @@ export default {
if (val.name) { if (val.name) {
this.listQuery.goodName = val.name; this.listQuery.goodName = val.name;
if (val.searchTime) { if (val.searchTime) {
this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime this.listQuery.startTime = val.searchTime
? val.searchTime[0] ? val.searchTime[0]
: ''; : '';

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-06 15:23:37 * @LastEditTime: 2023-10-08 15:47:56
* @Description: * @Description:
--> -->
<template> <template>
@ -12,8 +12,7 @@
<gaugeChart <gaugeChart
ref="gaugeChart" ref="gaugeChart"
title="仓库占用率" title="仓库占用率"
height="500px" height="500px"/>
:occupancy-data="occupancyData" />
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<barChart <barChart
@ -28,6 +27,7 @@
<script> <script>
import basicPage from '../mixins/basic-page'; import basicPage from '../mixins/basic-page';
import { mul } from '../mixins/code-filter';
import barChart from '../chart/BarChart.vue'; import barChart from '../chart/BarChart.vue';
import gaugeChart from '../chart/GaugeChart.vue'; import gaugeChart from '../chart/GaugeChart.vue';
import { import {
@ -56,9 +56,10 @@ export default {
// //
getDataList() { getDataList() {
this.urlOptions.occupancyURL(this.aId).then((response) => { this.urlOptions.occupancyURL(this.aId).then((response) => {
this.occupancyData = response.data; this.occupancyData = response.data.toFixed(2);
const num = mul(this.occupancyData,100)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.gaugeChart.initChart(); this.$refs.gaugeChart.initChart(num);
}); });
}); });
this.urlOptions.allURL(this.aId).then((response) => { this.urlOptions.allURL(this.aId).then((response) => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:54 * @Date: 2023-08-22 15:01:54
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-06 15:15:27 * @LastEditTime: 2023-09-27 10:52:07
* @Description: * @Description:
--> -->
<template> <template>
@ -14,11 +14,13 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="23"> <el-col :span="23">
<pieChart <pieChart
title="饼状图分析" title="饼状图分析"
ref="pieChart" ref="pieChart"
height="500px" height="500px"
:total-number="tableData.totalNumber" v-if="tableData.totalNumber"
:total-number="tableData.totalNumber"
:pie-data="tableData.list" /> :pie-data="tableData.list" />
<el-empty v-else></el-empty>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -64,17 +66,18 @@ export default {
components: { components: {
pieChart, pieChart,
}, },
created() { created() {},
},
methods: { methods: {
// //
getDataList() { getDataList() {
if (this.listQuery.startTime) { if (this.listQuery.startTime) {
this.urlOptions.getDataListURL(this.listQuery).then((response) => { this.urlOptions.getDataListURL(this.listQuery).then((response) => {
this.tableData = response.data; if (response.data) {
this.$nextTick(() => { this.tableData = response.data;
this.$refs.pieChart.initChart(); this.$nextTick(() => {
}); this.$refs.pieChart.initChart();
});
}
}); });
} }
}, },
@ -82,6 +85,7 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
if (val.searchTime) { if (val.searchTime) {
this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : ''; this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : ''; this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
this.getDataList(); this.getDataList();

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-09-06 14:28:30 * @Date: 2023-09-06 14:28:30
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-06 15:05:52 * @LastEditTime: 2023-09-27 09:15:27
* @Description: * @Description:
--> -->
<template> <template>
@ -57,23 +57,19 @@ const tableProps = [
{ {
prop: 'finishProductCode', prop: 'finishProductCode',
label: '库位编码', label: '库位编码',
align: 'center',
}, },
{ {
prop: 'finishProductName', prop: 'finishProductName',
label: '库位名称', label: '库位名称',
align: 'center',
}, },
{ {
prop: 'deactivate', prop: 'deactivate',
label: '是否停用', label: '是否启用',
align: 'center',
filter: codeFilter('deactivate'), filter: codeFilter('deactivate'),
}, },
{ {
prop: 'notes', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];

View File

@ -2,6 +2,7 @@
<el-drawer <el-drawer
:visible.sync="visible" :visible.sync="visible"
:show-close="false" :show-close="false"
:destroy-on-close="true"
:wrapper-closable="false" :wrapper-closable="false"
class="drawer" class="drawer"
size="60%"> size="60%">
@ -18,20 +19,18 @@
@keyup.enter.native="dataFormSubmit"> @keyup.enter.native="dataFormSubmit">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="仓库编码" prop="code"> <el-form-item label="仓库编码" prop="finishProductCode">
<el-input <el-input
v-model="dataForm.code" v-model="dataForm.finishProductCode"
readonly readonly
:disabled="isdetail"
placeholder="请输入仓库编码" /> placeholder="请输入仓库编码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="仓库名" prop="name"> <el-form-item label="仓库名" prop="finishProductName">
<el-input <el-input
v-model="dataForm.name" v-model="dataForm.finishProductName"
readonly readonly
:disabled="isdetail"
placeholder="请输入仓库名" /> placeholder="请输入仓库名" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -39,8 +38,7 @@
<el-form-item label="托盘编码" prop="trayCode"> <el-form-item label="托盘编码" prop="trayCode">
<el-input <el-input
v-model="dataForm.trayCode" v-model="dataForm.trayCode"
readonly @input="$forceUpdate()"
:disabled="isdetail"
placeholder="请输入托盘编码" /> placeholder="请输入托盘编码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -51,6 +49,7 @@
style="margin: 16px 0; padding-left: 8px" style="margin: 16px 0; padding-left: 8px"
:no-padding="true"> :no-padding="true">
产品信息 产品信息
<el-alert title="产品信息新增和修改后,需点击最下方保存按钮确定修改" type="warning" show-icon></el-alert>
</small-title> </small-title>
<div class="attr-list"> <div class="attr-list">
@ -60,11 +59,11 @@
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:add-button-show="addButtonShow" :add-button-show="addButtonShow"
@emitButtonClick="addNew" @emitButtonClick="addNew"
@emitFun="inputChange"
:table-data="productAttributeList"> :table-data="productAttributeList">
<method-btn <method-btn
v-if="!isdetail"
slot="handleBtn" slot="handleBtn"
:width="120" :width="80"
label="操作" label="操作"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
@ -75,17 +74,8 @@
<div style="position: absolute; bottom: 24px; right: 24px"> <div style="position: absolute; bottom: 24px; right: 24px">
<el-button style="margin-right: 10px" @click="goback()">返回</el-button> <el-button style="margin-right: 10px" @click="goback()">返回</el-button>
<el-button v-if="isdetail" type="primary" @click="goEdit()"> <span>
编辑
</el-button>
<span v-if="!isdetail">
<el-button type="primary" @click="dataFormSubmit()">保存</el-button> <el-button type="primary" @click="dataFormSubmit()">保存</el-button>
<!-- <el-button
v-if="dataForm.id && !isdetail"
type="primary"
@click="addNew()">
添加属性
</el-button> -->
</span> </span>
</div> </div>
@ -93,29 +83,25 @@
v-if="addOrUpdateVisible" v-if="addOrUpdateVisible"
ref="addOrUpdate" ref="addOrUpdate"
:warehouse-id="dataForm.id" :warehouse-id="dataForm.id"
@refreshDataList="getList" /> @refreshDataList="addList" />
</el-drawer> </el-drawer>
</template> </template>
<script> <script>
import { import {
updateProduct, updateFinishProductWarehouse,
} from '@/api/core/base/product'; } from '@/api/fpw/finishProductWarehouse';
import { import {
getFinishProductWarehouseGoodsPage, getFinishProductWarehouseGoodsPage,
deleteFinishProductWarehouseGoods,
} from '@/api/fpw/finishProductWarehouseGoods'; } from '@/api/fpw/finishProductWarehouseGoods';
import productAttrAdd from './attr-add'; import productAttrAdd from './attr-add';
import selectQuality from '../mixins/selectQuality';
import { parseTime } from '../mixins/code-filter'; import { parseTime } from '../mixins/code-filter';
import codeFilter from '../mixins/code-filter'; import codeFilter from '../mixins/code-filter';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
const tableBtn = [ const tableBtn = [
{
type: 'edit',
btnName: '编辑',
},
{ {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@ -131,19 +117,19 @@ const tableProps = [
label: '产品编码', label: '产品编码',
}, },
{ {
prop: 'goodSpecificationCode', prop: 'boxCode',
label: '箱子编码', label: '箱子编码',
}, },
{ {
prop: 'specification', prop: 'specification',
label: '产品规格', label: '产品规格',
align: 'center', filter: codeFilter('specification'),
}, },
{ {
prop: 'quality', prop: 'quality',
label: '品质', label: '品质',
align: 'center',
filter: codeFilter('quality'), filter: codeFilter('quality'),
subcomponent: selectQuality,
}, },
]; ];
@ -164,9 +150,8 @@ export default {
productAttributeList: [], productAttributeList: [],
addButtonShow: '新增', addButtonShow: '新增',
dataForm: { dataForm: {
id: null, finishProductName: '',
name: '', finishProductCode: '',
code: '',
trayCode: '', trayCode: '',
}, },
listQuery: { listQuery: {
@ -183,26 +168,19 @@ export default {
// }, // },
// ], // ],
}, },
isdetail: false,
}; };
}, },
methods: { methods: {
initData() { initData() {
this.productAttributeList.splice(0); this.productAttributeList.splice(0);
}, },
init(val, isdetail) { init(val) {
this.dataForm.name = val.finishProductName this.dataForm = val;
this.dataForm.code = val.finishProductCode
this.dataForm.trayCode = val.trayCode
let id = val.id
this.initData(); this.initData();
this.isdetail = isdetail || false;
this.dataForm.id = id || null;
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields(); this.$refs['dataForm'].resetFields();
if (this.dataForm.id) { if (this.dataForm.id) {
// //
// //
@ -216,13 +194,29 @@ export default {
const params = { const params = {
pageSize: 100, pageSize: 100,
pageNo: 1, pageNo: 1,
warehouseStorehouseId: this.dataForm.id, finishProductWarehouseId: this.dataForm.id,
}; };
getFinishProductWarehouseGoodsPage(params).then((response) => { getFinishProductWarehouseGoodsPage(params).then((response) => {
this.productAttributeList = response.data.list; this.productAttributeList = response.data.list;
this.listQuery.total = response.data.total; this.listQuery.total = response.data.total;
}); });
}, },
inputChange(data) {
switch (data.sType) {
case 1:
this.productAttributeList[data._pageIndex - 1][data.prop] =
data[data.prop];
break;
case 2:
this.productAttributeList[data._pageIndex - 1][data.prop] =
data.string ? data.string.split('+')[0] : '';
this.productAttributeList[data._pageIndex - 1][data.prop + 'Name'] =
data.string ? data.string.split('+')[1] : '';
break;
default:
console.log(val);
}
},
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.$confirm( this.$confirm(
@ -239,29 +233,25 @@ export default {
} }
) )
.then(() => { .then(() => {
deleteFinishProductWarehouseGoods(raw.data.id).then(({ data }) => { this.productAttributeList.splice(raw.data._pageIndex - 1, 1);
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getList();
},
});
});
}) })
.catch(() => {}); .catch(() => {});
} else { } else {
this.addNew(raw.data.id); this.addNew(raw.data._pageIndex);
} }
}, },
// //
dataFormSubmit() { dataFormSubmit() {
this.productAttributeList.forEach((item) => {
item.id = '';
item.finishProductWarehouseId = this.dataForm.id
});
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.dataForm.list = this.productAttributeList;
// //
if (this.dataForm.id) { if (this.dataForm.id) {
updateProduct(this.dataForm).then((response) => { updateFinishProductWarehouse(this.dataForm).then((response) => {
this.$modal.msgSuccess('修改成功'); this.$modal.msgSuccess('修改成功');
this.visible = false; this.visible = false;
this.$emit('refreshDataList'); this.$emit('refreshDataList');
@ -271,16 +261,16 @@ export default {
} }
}); });
}, },
goEdit() {
this.isdetail = false;
},
// / // /
addNew(id) { addNew(index) {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(id); this.$refs.addOrUpdate.init(index);
}); });
}, },
addList(data) {
this.productAttributeList.push(data.productInfo);
},
goback() { goback() {
this.$emit('refreshDataList'); this.$emit('refreshDataList');
this.visible = false; this.visible = false;

View File

@ -19,17 +19,17 @@
:rules="dataRule" :rules="dataRule"
label-width="100px" label-width="100px"
@keyup.enter.native="dataFormSubmit()"> @keyup.enter.native="dataFormSubmit()">
<el-form-item label="产品" prop="productId"> <el-form-item label="产品" prop="productInfo">
<el-select <el-select
v-model="dataForm.productId" v-model="dataForm.productInfo"
style="width: 100%" style="width: 100%"
@change="setProduct" value-key="id"
placeholder="请选择产品"> placeholder="请选择产品">
<el-option <el-option
v-for="item in productArr" v-for="item in productArr"
:key="item.id" :key="item.id"
:label="item.goodSpecificationName" :label="item.goodSpecificationName"
:value="item.id" /> :value="item" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -42,11 +42,7 @@
</template> </template>
<script> <script>
import { createFinishProductWarehouseGoods import { getFinishGoodSpecificationPage } from '@/api/fpw/finishGoodSpecification';
} from '@/api/fpw/finishProductWarehouseGoods';
import {
getFinishGoodSpecificationPage
} from "@/api/fpw/finishGoodSpecification";
export default { export default {
props: { props: {
@ -59,19 +55,22 @@ export default {
return { return {
visible: false, visible: false,
dataForm: { dataForm: {
id: 0, index: -1,
productId: '', productInfo: '',
value: '',
}, },
productArr: [], productArr: [],
dataRule: { dataRule: {
productId: [{ required: true, message: '产品不能为空', trigger: 'blur' }], productId: [
{ required: true, message: '产品不能为空', trigger: 'blur' },
],
}, },
}; };
}, },
methods: { methods: {
init(id) { init(index) {
this.dataForm.id = id || ''; if (index >= 0) {
this.dataForm.index = index;
}
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields(); this.$refs['dataForm'].resetFields();
@ -84,27 +83,27 @@ export default {
}); });
}); });
}, },
setProduct(val) {
let data = this.productArr.find((item) => {
return (item.id === val);
});
const { id, ...newData } = data;
this.dataForm.value = newData;
this.dataForm.value.goodSpecificationId = id;
},
// //
dataFormSubmit() { dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// this.dataForm.productInfo.goodsName =
createFinishProductWarehouseGoods({ this.dataForm.productInfo.goodSpecificationName;
...this.dataForm.value, this.dataForm.productInfo.goodsCode =
finishProductWarehouseId: this.warehouseId, this.dataForm.productInfo.goodSpecificationCode;
}).then((response) => { this.dataForm.productInfo.goodSpecificationId =
this.$modal.msgSuccess('添加成功'); this.dataForm.productInfo.id;
//
if (this.dataForm.index >= 0) {
this.$modal.msgSuccess('修改成功');
this.visible = false; this.visible = false;
this.$emit('refreshDataList'); this.$emit('refreshDataList', this.dataForm);
}); return;
}
//
this.$modal.msgSuccess('新增成功');
this.visible = false;
this.$emit('refreshDataList', this.dataForm);
} }
}); });
}, },

View File

@ -31,18 +31,19 @@
<span> <span>
{{ {{
scope.row.finishProductWarehouseState >= 0 scope.row.finishProductWarehouseState >= 0
? warehouseStorehouseState[scope.row.finishProductWarehouseState] ? warehouseStorehouseState[
.name scope.row.finishProductWarehouseState
].name
: '' : ''
}} }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作">
<template v-slot="scope"> <template v-slot="scope">
<el-button <el-button
size="mini" size="mini"
v-if="scope.row.warehouseStorehouseState === 0" v-if="scope.row.finishProductWarehouseState === 0"
type="text" type="text"
@click="handleClick({ data: { id: scope.row }, type: 'in' })" @click="handleClick({ data: { id: scope.row }, type: 'in' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']"> v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
@ -50,7 +51,7 @@
</el-button> </el-button>
<el-button <el-button
size="mini" size="mini"
v-else-if="scope.row.warehouseStorehouseState === 1" v-else-if="scope.row.finishProductWarehouseState === 1"
type="text" type="text"
@click="handleClick({ data: scope.row, type: 'out' })" @click="handleClick({ data: scope.row, type: 'out' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']"> v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
@ -90,9 +91,7 @@ import product from '../product-mini';
import basicPage from '../mixins/basic-page'; import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter'; import { parseTime } from '../mixins/code-filter';
import { import { getFinishProductWarehousePage } from '@/api/fpw/finishProductWarehouse';
getFinishProductWarehousePage,
} from "@/api/fpw/finishProductWarehouse";
const warehouseStorehouseState = [ const warehouseStorehouseState = [
{ {
@ -191,6 +190,10 @@ export default {
this.listQuery.productCode = val.pcode; this.listQuery.productCode = val.pcode;
this.listQuery.finishProductWarehouseState = this.listQuery.finishProductWarehouseState =
val.warehouseStorehouseStateId; val.warehouseStorehouseStateId;
Object.keys(this.listQuery).forEach(
(key) =>
this.listQuery[key] === null || (this.listQuery[key] === '' && delete this.listQuery[key])
);
this.getDataList(); this.getDataList();
break; break;
case 'reset': case 'reset':

View File

@ -85,8 +85,8 @@ export default {
formConfig: [ formConfig: [
{ {
type: 'input', type: 'input',
label: '库名', label: '名',
placeholder: '库名', placeholder: '名',
param: 'name', param: 'name',
}, },
{ {
@ -105,7 +105,7 @@ export default {
type: 'select', type: 'select',
label: '出入库状态', label: '出入库状态',
selectOptions: warehouseStorehouseStorageState, selectOptions: warehouseStorehouseStorageState,
param: 'warehouseStorehouseStateId', param: 'finishProductWarehouseDataState',
defaultSelect: '', defaultSelect: '',
filterable: true, filterable: true,
}, },
@ -114,11 +114,11 @@ export default {
label: '出入库时间', label: '出入库时间',
dateType: 'daterange', dateType: 'daterange',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd hh:mm:ss',
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
param: 'searchTime2', param: 'searchTime',
}, },
{ {
type: 'button', type: 'button',
@ -151,7 +151,8 @@ export default {
this.listQuery.finishProductName = val.name; this.listQuery.finishProductName = val.name;
this.listQuery.finishProductWarehouseCode = val.kcode; this.listQuery.finishProductWarehouseCode = val.kcode;
this.listQuery.trayCode = val.tcode; this.listQuery.trayCode = val.tcode;
this.listQuery.finishProductWarehouseDataState = val.warehouseStorehouseStorageStateId; this.listQuery.createTime = val.searchTime;
this.listQuery.finishProductWarehouseDataState = val.finishProductWarehouseDataState;
this.getDataList(); this.getDataList();
break; break;
case 'reset': case 'reset':

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2022-08-24 11:19:43 * @Date: 2022-08-24 11:19:43
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-05 15:10:13 * @LastEditTime: 2023-10-08 10:42:06
* @Description: * @Description:
*/ */
export default { export default {
@ -19,8 +19,6 @@ export default {
optionArrUrl: [], optionArrUrl: [],
optionArr: {} optionArr: {}
}, },
aId: '1696803324030865409',
bId: '1698950657556340737',
visible: false, visible: false,
setData: false setData: false
} }
@ -30,17 +28,12 @@ export default {
activated() { activated() {
}, },
methods: { methods: {
init(id,bPage) { init(id) {
this.dataForm.id = id || ""; this.dataForm.id = id || "";
this.visible = true; this.visible = true;
if (this.urlOptions.getOption) { if (this.urlOptions.getOption) {
this.getArr() this.getArr()
} }
if(bPage){
this.dataForm.warehouseId = this.bId;
}else{
this.dataForm.warehouseId = this.bId;
}
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["dataForm"].resetFields(); this.$refs["dataForm"].resetFields();
if (this.dataForm.id) { if (this.dataForm.id) {
@ -90,17 +83,25 @@ export default {
// 修改的提交 // 修改的提交
if (this.dataForm.id) { if (this.dataForm.id) {
this.urlOptions.updateURL(this.dataForm).then(response => { this.urlOptions.updateURL(this.dataForm).then(response => {
this.$modal.msgSuccess("修改成功"); if(response.data){
this.visible = false; this.$modal.msgSuccess("修改成功");
this.$emit("refreshDataList"); this.visible = false;
this.$emit("refreshDataList");
}else{
this.$modal.msgWarning('名称或编码不能重复');;
}
}); });
return; return;
} }
// 添加的提交 // 添加的提交
this.urlOptions.createURL(this.dataForm).then(response => { this.urlOptions.createURL(this.dataForm).then(response => {
this.$modal.msgSuccess("新增成功"); if(response.data){
this.visible = false; this.$modal.msgSuccess("新增成功");
this.$emit("refreshDataList"); this.visible = false;
this.$emit("refreshDataList");
}else{
this.$modal.msgWarning('名称或编码不能重复');;
}
}); });
}); });
}, },

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2022-08-24 11:19:43 * @Date: 2022-08-24 11:19:43
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-06 14:52:03 * @LastEditTime: 2023-09-27 09:30:22
* @Description: * @Description:
*/ */
export default { export default {
@ -39,7 +39,7 @@ export default {
this.dataListLoading = true; this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then(response => { this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.list; this.tableData = response.data.list;
this.total = response.data.total; this.listQuery.total = response.data.total;
this.dataListLoading = false; this.dataListLoading = false;
}); });
}, },

View File

@ -2,7 +2,7 @@
/* /*
* @Date: 2020-12-29 16:49:28 * @Date: 2020-12-29 16:49:28
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-01 16:35:27 * @LastEditTime: 2023-10-08 15:48:34
* @FilePath: \basic-admin\src\filters\basicData\index.js * @FilePath: \basic-admin\src\filters\basicData\index.js
* @Description: * @Description:
*/ */
@ -69,6 +69,20 @@ export function parseTime(time, pattern) {
}) })
return time_str return time_str
} }
// 去除浮点相乘
export function mul(num1, num2) {
if (parseFloat(num1).toString() == "NaN" || parseFloat(num2).toString() == "NaN") return;
var m = 0, s1 = num1.toString(), s2 = num2.toString();
try {
m += s1.split(".")[1].length
} catch (e) {
}
try {
m += s2.split(".")[1].length
} catch (e) {
}
return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m);
}
export default function (dictTable) { export default function (dictTable) {
return function (val) { return function (val) {
return table?.[dictTable]?.[val] return table?.[dictTable]?.[val]

View File

@ -0,0 +1,59 @@
<template>
<div class="tableInner">
<el-select v-model="list[itemProp]" @change="changeInput">
<el-option
v-for="item in QArr"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</div>
</template>
<script>
export default {
name: 'InputArea',
props: {
injectData: {
type: Object,
default: () => ({}),
},
itemProp: {
type: String,
},
},
data() {
return {
list: this.injectData,
QArr: [
{
name: 'A',
id: 0,
},
{
name: 'B',
id: 1,
},
{
name: 'C',
id: 2,
},
],
};
},
methods: {
changeInput() {
this.list.sType = 1;
this.$emit('emitData', this.list);
},
},
};
</script>
<style scoped>
.tableInner >>> .el-input__inner {
color: #409EFF;
border: 1px rgb(232, 231, 231) solid;
padding: 0;
text-align: center;
height: 30px;
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-24 14:47:58 * @Date: 2023-08-24 14:47:58
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-06 15:41:33 * @LastEditTime: 2023-10-08 15:35:04
* @Description: * @Description:
--> -->
<template> <template>
@ -32,24 +32,21 @@ import { number } from 'echarts';
const tableProps = [ const tableProps = [
{ {
prop: 'goodSpecificationName', prop: 'goodsName',
label: '产品名', label: '产品名',
align: 'center',
}, },
{ {
prop: 'goodSpecificationCode', prop: 'goodsCode',
label: '产品编码', label: '产品编码',
align: 'center',
}, },
{ {
prop: 'goodSpecificationName1', prop: 'specification',
label: '产品规格', label: '产品规格',
align: 'center', filter: codeFilter('specification'),
}, },
{ {
prop: 'quality', prop: 'quality',
label: '品质', label: '品质',
align: 'center',
filter: codeFilter('quality'), filter: codeFilter('quality'),
}, },
]; ];
@ -57,7 +54,6 @@ const tableProps1 = [
{ {
prop: 'createTime', prop: 'createTime',
label: '入库时间', label: '入库时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
] ]
@ -85,7 +81,7 @@ export default {
pageSize: 100, pageSize: 100,
pageNo: 1, pageNo: 1,
total: 1, total: 1,
finishProductWarehouseDataId:this.warehouseId, finishProductWarehouseId:this.warehouseId,
finishProductWarehouseDataId:this.warehouseId, finishProductWarehouseDataId:this.warehouseId,
}, },
}; };

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-21 14:26:23 * @Date: 2023-08-21 14:26:23
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-08-31 14:36:15 * @LastEditTime: 2023-10-08 09:20:40
* @Description: * @Description:
--> -->
<template> <template>
@ -11,92 +11,98 @@
:formConfigs="formConfig" :formConfigs="formConfig"
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />
<div class="mainbody"> <div class="tips">
<div v-for="a in 3" :key="a"> <el-tag effect="dark"></el-tag>
<el-row type="flex" justify="space-around"> <el-tag type="success" effect="dark"></el-tag>
<el-col :span="5" v-for="i in 4" :key="i"> <el-tag type="warning" effect="dark"></el-tag>
<el-row type="flex" justify="space-between"> </div>
<el-col :span="12" v-for="j in 2" :key="j"> <div class="mainbody">
<div <div v-for="i in listQuery.total" :key="i">
class="dashboard-layout-item" <el-row>
v-for="z in 2" <el-col :span="24">
:key="z" <el-row>
style="background: #ffd781; float: left"> <div
<div class="dashboard-layout-item"
class="dashboard-layout-item-cricle" v-for="a in wareData.one"
style="background: #16dc09" /> :key="a.id+a.warehouseStorehouseCode"
{{ i + '+' + j + '+' + z }} :style="{background: bgColor[a.warehouseStorehouseState], float: 'left'}">
</div> <!-- <div
</el-col> class="dashboard-layout-item-cricle"
</el-row> style="background: #16dc09" /> -->
<el-row type="flex" justify="space-between"> {{ a.warehouseStorehouseCode }}
<el-col :span="12" v-for="j in 2" :key="j"> </div>
<div </el-row>
class="dashboard-layout-item" <el-row>
v-for="z in 2" <div
:key="z" class="dashboard-layout-item"
style="background: #ffd781; float: left"> v-for="b in wareData.two"
<div :key="b.id+b.warehouseStorehouseCode"
class="dashboard-layout-item-cricle" :style="{background: bgColor[b.warehouseStorehouseState], float: 'left'}">
style="background: #16dc09" /> <!-- <div
{{ i + '+' + j + '+' + z }} class="dashboard-layout-item-cricle"
</div> style="background: #16dc09" /> -->
</el-col> {{ b.warehouseStorehouseCode }}
</el-row> </div>
</el-col> </el-row>
</el-row> </el-col>
<el-divider class="divider"></el-divider> </el-row>
<el-row type="flex" justify="space-around"> <el-divider class="divider"></el-divider>
<el-col :span="5" v-for="i in 4" :key="i"> <el-row>
<el-row type="flex" justify="space-between"> <el-col :span="24">
<el-col :span="12" v-for="j in 2" :key="j"> <el-row>
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="z in 2" v-for="c in wareData.there"
:key="z" :key="c.id+c.warehouseStorehouseCode"
style="background: #ffd781; float: left"> :style="{background: bgColor[c.warehouseStorehouseState], float: 'left'}">
<div <!-- <div
class="dashboard-layout-item-cricle" class="dashboard-layout-item-cricle"
style="background: #16dc09" /> style="background: #16dc09" /> -->
{{ i + '+' + j + '+' + z }} {{ c.warehouseStorehouseCode }}
</div> </div>
</el-col> </el-row>
</el-row> <el-row>
<el-row type="flex" justify="space-between"> <div
<el-col :span="12" v-for="j in 2" :key="j"> class="dashboard-layout-item"
<div v-for="d in wareData.four"
class="dashboard-layout-item" :key="d.id+d.warehouseStorehouseCode"
v-for="z in 2" :style="{background: bgColor[d.warehouseStorehouseState], float: 'left'}">
:key="z" <!-- <div
style="background: #ffd781; float: left"> class="dashboard-layout-item-cricle"
<div style="background: #16dc09" /> -->
class="dashboard-layout-item-cricle" {{ d.warehouseStorehouseCode }}
style="background: #16dc09" /> </div>
{{ i + '+' + j + '+' + z }} </el-row>
</div> </el-col>
</el-col> </el-row>
</el-row> </div>
</el-col>
</el-row>
</div> </div>
</div>
</div> </div>
</template> </template>
<script> <script>
import basicPage from '../mixins/basic-page'; import basicPage from '../mixins/basic-page';
import { getWarehouseStorehousePage } from '@/api/asrs/warehouseStorehouse'; import { getWarehouseStorehouseList
} from "@/api/fpw/finishProductWarehouse";
export default { export default {
mixins: [basicPage], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
getDataListURL: getWarehouseStorehousePage, getDataListURL: getWarehouseStorehouseList,
}, },
listQuery: { listQuery: {
wareLayer: 1, wareLayer: 1,
total: 0,
}, },
wareData: {
one: [],
two: [],
there: [],
four: [],
},
bgColor:['#37d97f','#ffbd02','#0b58ff'],
formConfig: [ formConfig: [
{ {
type: 'select', type: 'select',
@ -122,8 +128,34 @@ export default {
}; };
}, },
components: {}, components: {},
created() {}, created() {
},
methods: { methods: {
//
getDataList() {
this.dataListLoading = true;
this.wareData= {
one: [],
two: [],
there: [],
four: [],
},
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
response.data.forEach((a, b) => {
if (b % 4 === 0) {
this.wareData.one.push(a);
} else if (b % 4 === 1) {
this.wareData.two.push(a);
} else if (b % 4 === 2) {
this.wareData.there.push(a);
} else if (b % 4 === 3) {
this.wareData.four.push(a);
}
});
this.listQuery.total = Math.ceil(response.data.length / 120);
this.dataListLoading = false;
});
},
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
@ -139,18 +171,19 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.mainbody{ .mainbody {
display: flex; display: flex;
gap: 50px; gap: 50px;
flex-direction: column; flex-direction: column;
} }
.dashboard-layout-item { .dashboard-layout-item {
width: 80px; color: white;
width: 3.3%;
text-align: center; text-align: center;
height: 32px; height: 40px;
box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8); box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8);
border-radius: 2px 4px 4px 2px; border-radius: 2px 4px 4px 2px;
margin-bottom: 8px; margin-bottom: 4px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -161,11 +194,22 @@ export default {
border-radius: 6px; border-radius: 6px;
margin-right: 6px; margin-right: 6px;
} }
&:hover {
background-color: rgba(85, 136, 253, 0.8) !important;
color: #ffffff;
cursor: pointer;
transform: scaleY(1.3) translateZ(0);
}
} }
.el-divider--horizontal { .el-divider--horizontal {
margin: 10px 0; margin: 10px 0;
} }
.el-divider{ .el-divider {
background-color: black; background-color: black;
}
.tips {
position: absolute;
top: 22px;
left: 370px;
} }
</style> </style>

View File

@ -17,8 +17,8 @@
<el-tabs class="form" v-model="loginForm.loginType" style=" float:none;"> <el-tabs class="form" v-model="loginForm.loginType" style=" float:none;">
<el-tab-pane label="账号密码登录" name="uname"> <el-tab-pane label="账号密码登录" name="uname">
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="短信验证码登录" name="sms"> <!-- <el-tab-pane label="短信验证码登录" name="sms">
</el-tab-pane> </el-tab-pane> -->
</el-tabs> </el-tabs>
<div> <div>
<el-form ref="loginForm" :model="loginForm" :rules="LoginRules" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="LoginRules" class="login-form">
@ -205,6 +205,7 @@ export default {
}, },
methods: { methods: {
getCode() { getCode() {
this.captchaEnable = false
// //
if (!this.captchaEnable) { if (!this.captchaEnable) {
this.handleLogin({}) this.handleLogin({})

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-24 14:47:58 * @Date: 2023-08-24 14:47:58
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-09-07 16:07:50 * @LastEditTime: 2023-09-27 09:31:15
* @Description: * @Description:
--> -->
<template> <template>
@ -24,17 +24,14 @@ const tableProps = [
{ {
prop: 'goodsName', prop: 'goodsName',
label: '货物名', label: '货物名',
align: 'center',
}, },
{ {
prop: 'goodsCode', prop: 'goodsCode',
label: '货物编码', label: '货物编码',
align: 'center',
}, },
{ {
prop: 'number', prop: 'number',
label: '数量(箱)', label: '数量(箱)',
align: 'center',
}, },
]; ];
export default { export default {
@ -55,7 +52,7 @@ export default {
listQuery: { listQuery: {
pageSize: 100, pageSize: 100,
pageNo: 1, pageNo: 1,
total: 1, orderId: this.orderId,
}, },
}; };
}, },
@ -71,7 +68,6 @@ export default {
this.dataListLoading = true; this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then((response) => { this.urlOptions.getDataListURL(this.listQuery).then((response) => {
this.tableData = response.data.list; this.tableData = response.data.list;
this.total = response.data.total;
this.dataListLoading = false; this.dataListLoading = false;
}); });
}, },

View File

@ -33,17 +33,16 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作">
<template v-slot="scope"> <template v-slot="scope">
<el-popconfirm <el-popconfirm
@confirm="setShipment" @confirm="setShipment(scope.row.id)"
title="请再次确认出货是否已完成!"> title="请再次确认出货是否已完成!">
<el-button <el-button
slot="reference" slot="reference"
size="mini" size="mini"
v-if="scope.row.shipment === 0" v-if="scope.row.shipment === 0"
type="text" type="text">
@click="handleClick({ data: { id: scope.row }, type: 'in' })">
出货完成 出货完成
</el-button> </el-button>
</el-popconfirm> </el-popconfirm>
@ -60,7 +59,7 @@
<script> <script>
import product from './good-mini'; import product from './good-mini';
import { getOrderPage } from '@/api/po/order'; import { getOrderPage, updateOrder } from '@/api/po/order';
export default { export default {
data() { data() {
@ -93,7 +92,7 @@ export default {
label: '订单出货日期', label: '订单出货日期',
dateType: 'daterange', dateType: 'daterange',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd hh:mm:ss',
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
@ -130,7 +129,7 @@ export default {
this.dataListLoading = true; this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then((response) => { this.urlOptions.getDataListURL(this.listQuery).then((response) => {
this.tableData = response.data.list; this.tableData = response.data.list;
this.total = response.data.total; this.listQuery.total = response.data.total;
this.dataListLoading = false; this.dataListLoading = false;
}); });
}, },
@ -170,9 +169,16 @@ export default {
console.log(val); console.log(val);
} }
}, },
setShipment(){ setShipment(id) {
console.log(111111111) const data = {
} id: id,
shipment: 1,
};
updateOrder(data).then((response) => {
this.$modal.msgSuccess('修改成功');
this.getDataList();
});
},
}, },
}; };
</script> </script>

View File

@ -8,7 +8,7 @@ function resolve(dir) {
const CompressionPlugin = require('compression-webpack-plugin') const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE || '芋道管理系统' // 网页标题 const name = process.env.VUE_APP_TITLE || '南京锂膜管理系统' // 网页标题
const port = process.env.port || process.env.npm_config_port || 80 // 端口 const port = process.env.port || process.env.npm_config_port || 80 // 端口