projects/mes-test #132

Manually merged
gtz217 merged 281 commits from projects/mes-test into projects/mes 2023-11-30 09:11:34 +08:00
82 changed files with 990 additions and 1033 deletions
Showing only changes of commit 960751a264 - Show all commits

View File

@ -1,7 +1,7 @@
/* /*
* @Author: zhp * @Author: zhp
* @Date: 2023-11-07 19:47:48 * @Date: 2023-11-07 19:47:48
* @LastEditTime: 2023-11-16 17:49:23 * @LastEditTime: 2023-11-23 13:57:41
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
*/ */
@ -104,3 +104,18 @@ export function getMaterialList(data) {
data: data data: data
}) })
} }
export function getMaterialCode(data) {
return request({
url: '/extend/process-equ-material-bom/getCode',
method: 'get',
params: data
})
}
export function createProcessEquMaterialBomDetList(data) {
return request({
url: '/extend/process-equ-material-bom-det/createByList',
method: 'post',
data: data
})
}

View File

@ -1,7 +1,7 @@
/* /*
* @Author: zhp * @Author: zhp
* @Date: 2023-11-09 09:37:14 * @Date: 2023-11-09 09:37:14
* @LastEditTime: 2023-11-16 17:47:21 * @LastEditTime: 2023-11-23 14:15:45
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
*/ */
@ -104,3 +104,19 @@ export function getValueList(data) {
params: data params: data
}) })
} }
export function getValueCode(data) {
return request({
url: '/extend/process-equ-value-bom/getCode',
method: 'get',
params: data
})
}
export function createProcessEquValueBomDetList(data) {
return request({
url: '/extend/process-equ-value-bom-det/createByList',
method: 'post',
data: data
})
}

View File

@ -37,6 +37,9 @@ $tabWidth: $tabW * 1px;
$rowHeight: $rowH * 1px; $rowHeight: $rowH * 1px;
$buttonHeight: $buttonH * 1px; $buttonHeight: $buttonH * 1px;
// 1080px 高度为基准的 1px
$base1px: 0.15vh; // 1px / 1080px;
// - - - - - 页面基础设置 // - - - - - 页面基础设置
.container { .container {
.login-code { .login-code {
@ -87,7 +90,7 @@ $buttonHeight: $buttonH * 1px;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #ffffff; background-color: #ffffff;
// box-shadow: 0px 16px 40px rgba(0, 0, 0, 0.07); // box-shadow: 0px calc(16 * 0.12vh) 40px rgba(0, 0, 0, 0.07);
// border-radius: 20px; // border-radius: 20px;
// 定位 // 定位
position: relative; position: relative;
@ -100,6 +103,7 @@ $buttonHeight: $buttonH * 1px;
// 元素 // 元素
// width: $picWidth; // width: $picWidth;
height: $picHeight; height: $picHeight;
// height: 10vh;
background-image: url($picImage); background-image: url($picImage);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
@ -118,7 +122,7 @@ $buttonHeight: $buttonH * 1px;
} }
.field { .field {
position: relative; position: relative;
margin-top: 8%; margin-top: 14vh;
flex: 2; flex: 2;
// width: 800px; // width: 800px;
display: flex; display: flex;
@ -130,17 +134,36 @@ $buttonHeight: $buttonH * 1px;
text-align: center; text-align: center;
clear: both; clear: both;
position: relative; position: relative;
top: -36px; top: calc(-32 * $base1px);
height: 128px; height: calc(128 * $base1px);
.title { .title {
margin: 0; margin: 0;
margin-left: 32px; margin-left: calc(28 * 0.12vh);
font-weight: 400; font-weight: 400;
user-select: none; user-select: none;
color: #000; color: #000;
font-size: 36px; font-size: calc(28 * 0.12vh);
line-height: 54px; line-height: calc(40 * 0.12vh);
letter-spacing: calc(2 * 0.12vh);
.cnbm_logo {
height: calc(40 * 0.12vh);
width: calc(40 * 0.12vh);
position: relative;
top: calc(8 * 0.12vh);
right: calc(8 * 0.12vh);
}
}
.sub-title {
margin: 0;
margin-left: calc(28 * 0.12vh);
font-weight: 400;
user-select: none;
color: #000;
font-size: calc(28 * 0.12vh);
line-height: calc(48 * 0.12vh);
letter-spacing: 2px; letter-spacing: 2px;
} }
} }
@ -159,10 +182,10 @@ $buttonHeight: $buttonH * 1px;
.footer { .footer {
user-select: none; user-select: none;
// 元素 // 元素
margin: 12px 0; margin: calc(12 * 0.12vh) 0;
height: 16px; height: calc(16 * 0.12vh);
line-height: 16px; line-height: calc(16 * 0.12vh);
font-size: 12px; font-size: calc(12 * 0.12vh);
color: #8c8c8c; color: #8c8c8c;
a, a,
@ -176,12 +199,8 @@ $buttonHeight: $buttonH * 1px;
.form { .form {
margin-top: 0; margin-top: 0;
box-sizing: border-box; box-sizing: border-box;
// width: $formWidth;
width: 100%; width: 100%;
// - - - tab
:deep(.el-tabs__nav) {
// background: #f0f3;
}
:deep(.el-tabs__content) { :deep(.el-tabs__content) {
padding: 20px 0 0; padding: 20px 0 0;
} }
@ -189,12 +208,13 @@ $buttonHeight: $buttonH * 1px;
user-select: none; user-select: none;
// 元素 // 元素
width: $tabWidth; width: $tabWidth;
height: $rowHeight; // height: $rowHeight;
height: calc(54 * 0.12vh);
padding: 0; padding: 0;
// 文字 // 文字
line-height: $rowHeight; line-height: $rowHeight;
color: #666666; color: #666666;
font-size: 18px; font-size: calc(14 * 0.12vh);
font-weight: 400; font-weight: 400;
text-align: center; text-align: center;
} }
@ -210,7 +230,8 @@ $buttonHeight: $buttonH * 1px;
:deep(.el-input__inner) { :deep(.el-input__inner) {
// 元素 // 元素
width: 100%; width: 100%;
height: $rowHeight; // height: $rowHeight;
height: calc(72 * 0.12vh);
background: #f5f5f5; background: #f5f5f5;
border: 0; border: 0;
border-radius: 28px; border-radius: 28px;
@ -280,7 +301,7 @@ $buttonHeight: $buttonH * 1px;
margin-bottom: 20px; margin-bottom: 20px;
// 文字 // 文字
line-height: 26px; line-height: 26px;
font-size: 20px; font-size: calc(18 * 0.12vh);
color: #ffffff; color: #ffffff;
} }
.button-active { .button-active {
@ -299,13 +320,14 @@ $buttonHeight: $buttonH * 1px;
:deep(.el-input__inner) { :deep(.el-input__inner) {
// 元素 // 元素
width: 420px; width: 420px;
height: 66px; height: calc(52 * 0.12vh);
// height: 66px;
color: #262626; color: #262626;
font-size: 18px; font-size: calc(14 * 0.12vh);
} }
:deep(.el-checkbox__label) { :deep(.el-checkbox__label) {
font-size: 18px; font-size: calc(14 * 0.12vh);
line-height: 14px; line-height: calc(12 * 0.12vh);
} }
} }
} }
@ -314,19 +336,42 @@ $buttonHeight: $buttonH * 1px;
@media screen and (min-width: 1920px) { @media screen and (min-width: 1920px) {
.container { .container {
.content { .content {
.field { .field {
flex: initial; flex: initial;
width: 800px; // width: 800px;
width: 40vw;
}
}
}
}
@media screen and (min-height: 1024px) {
.container {
.content {
.field {
margin-top: 16vh;
}
}
}
}
@media screen and (max-height: 1024px) {
.container {
.content {
.field {
margin-top: 8vh;
} }
} }
} }
} }
@media screen and (min-width: 599px) and (max-width: 1366px) { @media screen and (min-width: 599px) and (max-width: 1366px) {
.container { .container {
min-width: 599px; // min-width: 599px;
min-width: 42vw;
.content { .content {
// width: 710px; // width: 710px;
// height: 397px; // height: 397px;
@ -337,6 +382,7 @@ $buttonHeight: $buttonH * 1px;
display: none; display: none;
} }
.field { .field {
// margin-top: 6vh;
// width: calc(710px - 314px); // width: calc(710px - 314px);
// left: 314px; // left: 314px;
// justify-content: center; // justify-content: center;
@ -363,6 +409,14 @@ $buttonHeight: $buttonH * 1px;
} }
} }
// @media screen and (max-height: 1080px) {
// .container {
// .field {
// transform: scale(0.74);
// }
// }
// }
/* ===== MOBILE DESIGN ===== */ /* ===== MOBILE DESIGN ===== */
$mobileW: 375; $mobileW: 375;
$mobileH: 812; $mobileH: 812;
@ -503,7 +557,7 @@ $iconBgImage: '../assets/images/icon.png';
.footer { .footer {
// 元素 // 元素
font-size: 12px; font-size: calc(12 * 0.12vh);
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 400; font-weight: 400;
line-height: 17px; line-height: 17px;
@ -511,7 +565,7 @@ $iconBgImage: '../assets/images/icon.png';
opacity: 0.6; opacity: 0.6;
// 定位 // 定位
// position: absolute; // position: absolute;
bottom: -32px; bottom: -calc(32 * 0.12vh);
} }
} }
} }

View File

@ -347,6 +347,8 @@ export default {
console.log('setting code: ', response.data); console.log('setting code: ', response.data);
// //
this.form[opt.prop] = response.data; this.form[opt.prop] = response.data;
// dataFormcodebug
this.$emit('update', this.form)
} }
}); });
} }

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-11-22 13:58:30 * @LastEditTime: 2023-11-23 11:14:30
* @Description: * @Description:
--> -->
<template> <template>
@ -730,21 +730,21 @@ export default {
} }
}, },
// watch: { watch: {
// clientWidth(val) { clientWidth(val) {
// if (!this.timer) { if (!this.timer) {
// this.clientWidth = val this.clientWidth = val
// this.beilv2 = this.clientWidth / 1920 this.beilv2 = this.clientWidth / 1920
// this.timer = true this.timer = true
// let _this = this let _this = this
// setTimeout(function () { setTimeout(function () {
// _this.timer = false _this.timer = false
// }, 500) }, 500)
// } }
// // //
// this.windowWidth(val); this.windowWidth(val);
// } }
// }, },
created() { created() {
// this.fetchList('exception-alarm') // this.fetchList('exception-alarm')
// this.fetchList('inAndOutOfEachLine') // this.fetchList('inAndOutOfEachLine')
@ -941,7 +941,7 @@ export default {
</style> </style>
<style lang="scss"> <style lang="scss" >
.visual-container { .visual-container {
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 8px; width: 8px;

View File

@ -60,7 +60,7 @@
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
<base-container1 :beilv="1" :title="'设备状态监控'" :title-icon="'1_5'"> <base-container1 :beilv="1" :title="'设备状态监控'" :title-icon="'1_5'">
<div class="visual-select"> <div class="visual-select">
<el-select v-model="modelMonth" size="mini" placeholder=""> <el-select class="coldSelect" v-model="modelMonth" size="mini" placeholder="">
<el-option key="1" value="钢1线" label="钢1线" default /> <el-option key="1" value="钢1线" label="钢1线" default />
</el-select> </el-select>
</div> </div>
@ -634,21 +634,21 @@ export default {
} }
} }
}, },
watch: { // watch: {
clientWidth(val) { // clientWidth(val) {
if (!this.timer) { // if (!this.timer) {
this.clientWidth = val // this.clientWidth = val
this.beilv2 = this.clientWidth / 1920 // this.beilv2 = this.clientWidth / 1920
this.timer = true // this.timer = true
let _this = this // let _this = this
setTimeout(function () { // setTimeout(function () {
_this.timer = false // _this.timer = false
}, 500) // }, 500)
} // }
// // //
this.windowWidth(val); // this.windowWidth(val);
} // }
}, // },
created() { created() {
// this.fetchList('exception-alarm') // this.fetchList('exception-alarm')
// this.fetchList('inAndOutOfEachLine') // this.fetchList('inAndOutOfEachLine')
@ -658,6 +658,7 @@ export default {
this.windowWidth(document.documentElement.clientWidth) this.windowWidth(document.documentElement.clientWidth)
}, },
mounted() { mounted() {
console.log(1111);
const _this = this; const _this = this;
_this.beilv2 = document.documentElement.clientWidth / 1920 _this.beilv2 = document.documentElement.clientWidth / 1920
window.onresize = () => { window.onresize = () => {
@ -686,6 +687,7 @@ export default {
methods: { methods: {
windowWidth(value) { windowWidth(value) {
this.clientWidth = value this.clientWidth = value
this.beilv2 = this.clientWidth / 1920
}, },
// erd.listenTo(document.getElementById("box"), (element) => { // erd.listenTo(document.getElementById("box"), (element) => {
// var width = element.offsetWidth; // var width = element.offsetWidth;
@ -1057,7 +1059,7 @@ export default {
} }
</style> </style>
<style lang="scss"> <style lang="scss" >
.visual-container { .visual-container {
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 8px; width: 8px;
@ -1096,23 +1098,25 @@ export default {
background-color: rgba($color: #5bc4be, $alpha: 1); background-color: rgba($color: #5bc4be, $alpha: 1);
} }
} }
.el-input { .coldSelect{
min-height: 10px; .el-input {
} min-height: 10px;
}
.el-input__inner { .el-input__inner {
background-color: rgba($color: #31878c, $alpha: 0.29); background-color: rgba($color: #31878c, $alpha: 0.29);
border: rgba($color: #31878c, $alpha: 0.29); border: rgba($color: #31878c, $alpha: 0.29);
color: aliceblue; color: aliceblue;
} }
.el-divider--vertical { .el-divider--vertical {
height: 174px; height: 174px;
width: 1px; width: 1px;
border: rgba(255, 255, 255, 0.15); border: rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.15);
margin-left: 3em; margin-left: 3em;
} }
}
</style> </style>
<style scoped> <style scoped>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-10-17 11:10:22 * @LastEditTime: 2023-11-23 11:11:35
* @Description: * @Description:
--> -->
<template> <template>
@ -44,7 +44,7 @@
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
<base-container :title="'各工序缺陷汇总'" :title-icon="'5_2'"> <base-container :title="'各工序缺陷汇总'" :title-icon="'5_2'">
<div class="visual-select"> <div class="visual-select">
<el-select v-model="modelMonth" size="mini" placeholder=""> <el-select class="coldSelect" v-model="modelMonth" size="mini" placeholder="">
<el-option key="1" value="钢1线" label="钢1线" default /> <el-option key="1" value="钢1线" label="钢1线" default />
</el-select> </el-select>
</div> </div>
@ -740,16 +740,16 @@ export default {
// this.fetchList('order-process') // this.fetchList('order-process')
// this.fetchList('line-chart-data') // this.fetchList('line-chart-data')
this.init() this.init()
this.windowWidth(document.documentElement.clientWidth)
}, },
mounted() { mounted() {
const _this = this; this.windowWidth(document.documentElement.clientWidth)
window.onresize = () => { // const _this = this;
return (() => { // window.onresize = () => {
_this.clientWidth = `${document.documentElement.clientWidth}` // return (() => {
this.beilv2 = _this.clientWidth / 1920 // _this.clientWidth = `${document.documentElement.clientWidth}`
})() // this.beilv2 = _this.clientWidth / 1920
} // })()
// }
// this.beilv2 = window.innerWidth / 1920 // this.beilv2 = window.innerWidth / 1920
// addEventListener('resize', resizeFun = () => { // addEventListener('resize', resizeFun = () => {
// this.beilv2 = window.innerWidth / 1920 // this.beilv2 = window.innerWidth / 1920
@ -770,6 +770,7 @@ export default {
methods: { methods: {
windowWidth(value) { windowWidth(value) {
this.clientWidth = value this.clientWidth = value
this.beilv2 = this.clientWidth / 1920
}, },
// fetchList(type) { // fetchList(type) {
// switch (type) { // switch (type) {
@ -932,7 +933,8 @@ export default {
background-color: rgba($color: #5bc4be, $alpha: 1); background-color: rgba($color: #5bc4be, $alpha: 1);
} }
} }
.el-input { .coldSelect{
.el-input {
min-height: 10px; min-height: 10px;
} }
@ -949,6 +951,7 @@ export default {
color: rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.15);
margin-left: 3em; margin-left: 3em;
} }
}
</style> </style>

View File

@ -202,12 +202,11 @@ export default {
} }
}, },
created() { created() {
// this.init() // $('.hiprintEpContainer').empty()
// console.log('aaaaaa')
// this.otherPaper()
}, },
destroyed () { destroyed () {
$('.hiprintEpContainer').empty() $('.hiprintEpContainer').empty()
console.log(11111)
}, },
methods: { methods: {
// handleClose() { // handleClose() {
@ -215,6 +214,7 @@ export default {
// }, // },
closed() { closed() {
$('.hiprintEpContainer').empty() $('.hiprintEpContainer').empty()
$('.hiprint-printTemplate').empty()
}, },
init(data) { init(data) {
this.drawer = true this.drawer = true
@ -256,17 +256,17 @@ export default {
// console.log(this.modelData) // console.log(this.modelData)
// console.log($('#hiprint-printTemplate').empty()) // console.log($('#hiprint-printTemplate').empty())
if (this.modelData != {}) { // if () {
console.log(this.modelData); // console.log(this.modelData);
$('.hiprintEpContainer').empty() // $('.hiprintEpContainer').empty()
hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value) // hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
$('.hiprint-printTemplate').empty() // $('.hiprint-printTemplate').empty()
hiprintTemplate = new hiprint.PrintTemplate({ // hiprintTemplate = new hiprint.PrintTemplate({
template: JSON.parse(this.modelData), // template: JSON.parse(this.modelData),
settingContainer: '#PrintElementOptionSetting', // settingContainer: '#PrintElementOptionSetting',
paginationContainer: '.hiprint-printPagination' // paginationContainer: '.hiprint-printPagination'
}) // })
} else { // } else {
$('.hiprintEpContainer').empty() $('.hiprintEpContainer').empty()
console.log(this.modelData); console.log(this.modelData);
hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value) hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
@ -275,11 +275,11 @@ export default {
const template = provider.value const template = provider.value
// console.log(template) // console.log(template)
hiprintTemplate = new hiprint.PrintTemplate({ hiprintTemplate = new hiprint.PrintTemplate({
template: template, template: this.modelData != '' ? JSON.parse(this.modelData) : {},
settingContainer: '#PrintElementOptionSetting', settingContainer: '#PrintElementOptionSetting',
paginationContainer: '.hiprint-printPagination' paginationContainer: '.hiprint-printPagination'
}) })
} // }
hiprintTemplate.design('#hiprint-printTemplate') hiprintTemplate.design('#hiprint-printTemplate')
// console.log(hiprintTemplate) // console.log(hiprintTemplate)
console.log(hiprintTemplate); console.log(hiprintTemplate);

View File

@ -236,212 +236,10 @@ export const aProvider = function (ops) {
}; };
}; };
// 自定义设计元素2
export const bProvider = function (ops) {
var addElementTypes = function (context) {
context.removePrintElementTypes("bProviderModule");
context.addPrintElementTypes(
"bProviderModule",
[
new hiprint.PrintElementTypeGroup("常规", [
{
tid: 'bProviderModule.header', title: '单据表头', data: '单据表头', type: 'text',
options: {
testData: '单据表头',
height: 17,
fontSize: 16.5,
fontWeight: "700",
textAlign: "center",
hideTitle: true
}
},
{
tid: 'bProviderModule.type', title: '单据类型', data: '单据类型', type: 'text',
options: {
testData: '单据类型',
height: 16,
fontSize: 15,
fontWeight: "700",
textAlign: "center",
hideTitle: true
}
},
{
tid: 'bProviderModule.order', title: '订单编号', data: 'XS888888888', type: 'text',
options: {
field: 'orderId',
testData: 'XS888888888',
height: 16,
fontSize: 6.75,
fontWeight: "700",
textAlign: "left",
textContentVerticalAlign: "middle"
}
},
{
tid: 'bProviderModule.date', title: '业务日期', data: '2020-01-01', type: 'text',
options: {
field: 'date',
testData: '2020-01-01',
height: 16,
fontSize: 6.75,
fontWeight: "700",
textAlign: "left",
textContentVerticalAlign: "middle"
}
},
{
tid: 'bProviderModule.barcode', title: '条形码', data: 'XS888888888', type: 'text',
options: {
field: 'barcode',
testData: 'XS888888888',
height: 32,
fontSize: 12,
lineHeight: 18,
textType: "barcode"
}
},
{
tid: 'bProviderModule.qrcode', title: '二维码', data: 'XS888888888', type: 'text',
options: {
field: 'qrcode',
testData: 'XS888888888',
height: 32,
fontSize: 12,
lineHeight: 18,
textType: "qrcode"
}
},
{
tid: 'bProviderModule.platform', title: '平台名称', data: '平台名称', type: 'text',
options: {
testData: '平台名称',
height: 17,
fontSize: 16.5,
fontWeight: "700",
textAlign: "center",
hideTitle: true
}
},
{tid: 'bProviderModule.image', title: 'Logo', data: 'data: image/png;base64iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAHVklEQVR4nO2dT2wUVRzHv2/2T5eSAlvFilwgQUH+eLACaUxEiJLAxdh44MDZi2ChUIrSFtoCgbbSP4GDdwgeEA8kRTAI0iIGBL1ITLxgLAlCsCKBYndnx7zd35pl2+7On/de387OJ9l00515/z7z/szMmzfs7869mD0yCjw2gZAB4VhAiln4/dUaRGdU18aOnzw9dn24ioGJj0soFsJr1z2yNm+qN2/fvRFL8XyMYqTmFfxZ+TwMc1xKDsL/f2Ms8xGeLwuIRpCKx99MHf/i4uPrw5GQ9jIAfsCMXfw2HkuOX03Wb1qLh4+uIGFJjzecPoS5iEhUTg1hDMaM2GuRk6cGMTQUCYmPQQq86CMAkkPDkQirGAzXf7Du34ejN9IHmETCRjQGPL6D+4NnYDEJDQmXbaY6on/dm2Vm/jHdZe0Almm6Ll+YNQbzasX7765BNHI1o0sOYRghwExg7MG9dDQSiqsdwHuZmlFKMjLwQ3QcFtjlSxHTenLO3Lp7vfU09AOS41Ka+HC6CjIDIaqmguvIPgBtIgOcDhjVlMTQtarKOScumR/teCdpxoeNZGJCapjFt7Rcywrb2MYtnQBatCpZTzCkYCF+5suKRXf+6EvOmv0GSzwrhB/QpmGkBYZSpqvIZAlp8ZeMLFwKUH3z2gqWyd/+3F/5b1yRQQMCN8gQspeaKt+SAItSCxCiPjIjhDEkjRAMxmCZSbgZkYke537qdxl57KM8C0OkkD0ADohMXIlwgPIuBFFC9uS3p2XGflFSRAgpdxlZeBl84jUQr0ImjDTKGWZZBwE0eCkCL0J20UgjgGCwEDHNPjB86PbiilshfGRxOBCRD0tLCSWTnzMLO9yE4EbIzjIdTdmGpc8/rB4qK0c4FcKbqe7pyWZJ0k1lZhsnQnZq3EzV00dHDjupKXaFNGtcM7YA+Io+WzRIz2R0UxkWxY6QJgCHlCbfPlzAsZytj2ks5RCVZUGKCdkOoEt+Wl3RkCcjyzGv5wIS6aIynZJCQni7d0TTjPFaMFDg9wGNa8qRQn3KVEI+1rjPmKpm5KNzTemmMp7AZEK2AehXmz7bbC1SM/IZoH10pJ/K+hnyhXBrvZpmoBHAURf7HaV9daQ3v6Zk7hhWVr4AYDOAzzRNeKPHAyW7r459Yj/deUynMcyqqpY9/fXW+RTwkiF/ms5pADcd7nMbwAkBcfMM3wOwwOF+rys46TxCt+T72d2NG0YSg2fnC58ANDkbAZyVH41QNgAYVBTXNiMxeLYG6qawvagmGqGoTHOfwcAe6T8TvWwYlTC7OsALgRDNCIRoRiBEMwIhmhEI0YxAiGYEQjRDtZCY9iUyEaVpVi3kvuL4RKA0zSqF8Ad5TimMTxSnKO1KUCWEZ6hDVaYk0KFKigohbSUuI0uHiieKZQtp89kM+U7ZUmQKafHp4wpSH/eWJaTT5zPkD8g62GQI8cXqDTZok/HEsWgh+3Of2y4D2kU/0idKyEOaJdgqKLxSotXlfLFJESXkicKZGTrys6g0iRIyD8AvAFYLCq+UWC1yACOyD+Hrf1wAUCcwTN2pozzXiEqn6E59JoBvANQKDldHaimvM0WmTcawlydw2Oc1pY7yKFQGJJ4YxqiTXyEp/OlkBeVNyn0SmZdO5gC47rOOfjXlaY6sCGRfXKwA8LVP+pRaykuFzEhUXH7nR9P3AFYqiEsWKykP0mpGFlU3qKI0IlmlKD6RrKK0R1VEpvIW7uwSHXnVUdqVoHqSwz+K4xOB0jQH87I0IxCiGYEQzQiEaEYgRDMCIZoRCNGMQIhmBEI0gwuJK0xScKZemHiY1mzqUxThYgBLHO7zQOAzGnMBPOdwn8WC4rbDNjaSWVajQaEUp9wBsB7ALY/hLAVwHsB89VmwRXrhuGwf0q/xIl/z6f6105qVyxIKQ1cZjdlV/HI79V6N1yjk/dxlAMtc7LuM9lXZVzqhIXdxtvxR1kCxZUynkbl0o2ihgyQspH3mapqn7flrSE427O3TuKbwGZI/AlhuY9vltO08Belyw6T99lTnIQN2VmGeJqppskGhpfoW0DbVmuahaarVVQudGPZo3tH/RCOnfJbSbzp34D1T/VjsTL3X6esWFMJngJwDsCgnykX0P+mzQ1yyq9jqqtnzkGI0a7wgPz9pfJm+/6ZxB77bzus+7L7pkwdkarr8OBdwJee7jjQVaqZysVtDsuwK3j3lmGYnb5hwerW3S+PRl440OX3dh5vL7z0iXzXqY/bYbaZycXs/5KDdV/iUKc1URo7xcoOqq0yfui1Gq5e3EoUava1qzS/aJQGs8xKIj2jx+gCoVyGcoUBKGs8yIEgIAiliZEDwJAehL3ovIYS+2F9UDckyRH/fFhmoxuwTvdaJaCGc7+gyi9+br1YZSzTJEAIaffHrZG/JCFwDpK16JEsI5yK9uMdvzVe7zAUxZQrhXKKBwxqZkSikQ8aiZbnIFgKS4oea0i5bBhQJgQ+kKJEBhUJAUkqxo+cduJqVrQH8B6xBgBhvJFNDAAAAAElFTkSuQmCC', type: 'image', options: {
src: 'data: image/png;base64iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAHVklEQVR4nO2dT2wUVRzHv2/2T5eSAlvFilwgQUH+eLACaUxEiJLAxdh44MDZi2ChUIrSFtoCgbbSP4GDdwgeEA8kRTAI0iIGBL1ITLxgLAlCsCKBYndnx7zd35pl2+7On/de387OJ9l00515/z7z/szMmzfs7869mD0yCjw2gZAB4VhAiln4/dUaRGdU18aOnzw9dn24ioGJj0soFsJr1z2yNm+qN2/fvRFL8XyMYqTmFfxZ+TwMc1xKDsL/f2Ms8xGeLwuIRpCKx99MHf/i4uPrw5GQ9jIAfsCMXfw2HkuOX03Wb1qLh4+uIGFJjzecPoS5iEhUTg1hDMaM2GuRk6cGMTQUCYmPQQq86CMAkkPDkQirGAzXf7Du34ejN9IHmETCRjQGPL6D+4NnYDEJDQmXbaY6on/dm2Vm/jHdZe0Almm6Ll+YNQbzasX7765BNHI1o0sOYRghwExg7MG9dDQSiqsdwHuZmlFKMjLwQ3QcFtjlSxHTenLO3Lp7vfU09AOS41Ka+HC6CjIDIaqmguvIPgBtIgOcDhjVlMTQtarKOScumR/teCdpxoeNZGJCapjFt7Rcywrb2MYtnQBatCpZTzCkYCF+5suKRXf+6EvOmv0GSzwrhB/QpmGkBYZSpqvIZAlp8ZeMLFwKUH3z2gqWyd/+3F/5b1yRQQMCN8gQspeaKt+SAItSCxCiPjIjhDEkjRAMxmCZSbgZkYke537qdxl57KM8C0OkkD0ADohMXIlwgPIuBFFC9uS3p2XGflFSRAgpdxlZeBl84jUQr0ImjDTKGWZZBwE0eCkCL0J20UgjgGCwEDHNPjB86PbiilshfGRxOBCRD0tLCSWTnzMLO9yE4EbIzjIdTdmGpc8/rB4qK0c4FcKbqe7pyWZJ0k1lZhsnQnZq3EzV00dHDjupKXaFNGtcM7YA+Io+WzRIz2R0UxkWxY6QJgCHlCbfPlzAsZytj2ks5RCVZUGKCdkOoEt+Wl3RkCcjyzGv5wIS6aIynZJCQni7d0TTjPFaMFDg9wGNa8qRQn3KVEI+1rjPmKpm5KNzTemmMp7AZEK2AehXmz7bbC1SM/IZoH10pJ/K+hnyhXBrvZpmoBHAURf7HaV9daQ3v6Zk7hhWVr4AYDOAzzRNeKPHAyW7r459Yj/deUynMcyqqpY9/fXW+RTwkiF/ms5pADcd7nMbwAkBcfMM3wOwwOF+rys46TxCt+T72d2NG0YSg2fnC58ANDkbAZyVH41QNgAYVBTXNiMxeLYG6qawvagmGqGoTHOfwcAe6T8TvWwYlTC7OsALgRDNCIRoRiBEMwIhmhEI0YxAiGYEQjRDtZCY9iUyEaVpVi3kvuL4RKA0zSqF8Ad5TimMTxSnKO1KUCWEZ6hDVaYk0KFKigohbSUuI0uHiieKZQtp89kM+U7ZUmQKafHp4wpSH/eWJaTT5zPkD8g62GQI8cXqDTZok/HEsWgh+3Of2y4D2kU/0idKyEOaJdgqKLxSotXlfLFJESXkicKZGTrys6g0iRIyD8AvAFYLCq+UWC1yACOyD+Hrf1wAUCcwTN2pozzXiEqn6E59JoBvANQKDldHaimvM0WmTcawlydw2Oc1pY7yKFQGJJ4YxqiTXyEp/OlkBeVNyn0SmZdO5gC47rOOfjXlaY6sCGRfXKwA8LVP+pRaykuFzEhUXH7nR9P3AFYqiEsWKykP0mpGFlU3qKI0IlmlKD6RrKK0R1VEpvIW7uwSHXnVUdqVoHqSwz+K4xOB0jQH87I0IxCiGYEQzQiEaEYgRDMCIZoRCNGMQIhmBEI0gwuJK0xScKZemHiY1mzqUxThYgBLHO7zQOAzGnMBPOdwn8WC4rbDNjaSWVajQaEUp9wBsB7ALY/hLAVwHsB89VmwRXrhuGwf0q/xIl/z6f6105qVyxIKQ1cZjdlV/HI79V6N1yjk/dxlAMtc7LuM9lXZVzqhIXdxtvxR1kCxZUynkbl0o2ihgyQspH3mapqn7flrSE427O3TuKbwGZI/AlhuY9vltO08Belyw6T99lTnIQN2VmGeJqppskGhpfoW0DbVmuahaarVVQudGPZo3tH/RCOnfJbSbzp34D1T/VjsTL3X6esWFMJngJwDsCgnykX0P+mzQ1yyq9jqqtnzkGI0a7wgPz9pfJm+/6ZxB77bzus+7L7pkwdkarr8OBdwJee7jjQVaqZysVtDsuwK3j3lmGYnb5hwerW3S+PRl440OX3dh5vL7z0iXzXqY/bYbaZycXs/5KDdV/iUKc1URo7xcoOqq0yfui1Gq5e3EoUava1qzS/aJQGs8xKIj2jx+gCoVyGcoUBKGs8yIEgIAiliZEDwJAehL3ovIYS+2F9UDckyRH/fFhmoxuwTvdaJaCGc7+gyi9+br1YZSzTJEAIaffHrZG/JCFwDpK16JEsI5yK9uMdvzVe7zAUxZQrhXKKBwxqZkSikQ8aiZbnIFgKS4oea0i5bBhQJgQ+kKJEBhUJAUkqxo+cduJqVrQH8B6xBgBhvJFNDAAAAAElFTkSuQmCC',
fit: 'none'
}},
]),
new hiprint.PrintElementTypeGroup("客户", [
{
tid: 'bProviderModule.khname', title: '客户名称', data: '高级客户', type: 'text',
options: {
field: 'name',
testData: '高级客户',
height: 16,
fontSize: 6.75,
fontWeight: "700",
textAlign: "left",
textContentVerticalAlign: "middle"
}
},
{
tid: 'bProviderModule.tel', title: '客户电话', data: '18888888888', type: 'text',
options: {
field: 'tel',
testData: '18888888888',
height: 16,
fontSize: 6.75,
fontWeight: "700",
textAlign: "left",
textContentVerticalAlign: "middle"
}
},
]),
new hiprint.PrintElementTypeGroup("表格/其他", [
{
tid: 'bProviderModule.table', title: '订单数据',
type: 'table',
options: {
field: 'table',
fields: [
{text: '名称', field: 'NAME'},
{text: '数量', field: 'SL'},
{text: '规格', field: 'GG'},
{text: '条码', field: 'TM'},
{text: '单价', field: 'DJ'},
{text: '金额', field: 'JE'},
{text: '备注', field: 'DETAIL'},
],
},
editable: true,
columnDisplayEditable: true,//列显示是否能编辑
columnDisplayIndexEditable: true,//列顺序显示是否能编辑
columnTitleEditable: true,//列标题是否能编辑
columnResizable: true, //列宽是否能调整
columnAlignEditable: true,//列对齐是否调整
columns: [
[
{title: '名称', align: 'center', field: 'NAME', width: 100},
{title: '数量', align: 'center', field: 'SL', width: 100},
{title: '条码', align: 'center', field: 'TM', width: 100},
{title: '规格', align: 'center', field: 'GG', width: 100},
{title: '单价', align: 'center', field: 'DJ', width: 100},
{title: '金额', align: 'center', field: 'JE', width: 100},
{title: '备注', align: 'center', field: 'DETAIL', width: 100},
]
],
footerFormatter: function (options, rows, data, currentPageGridRowsData) {
if (data && data['totalCap']) {
return `<td style="padding:0 10px" colspan="100">${'应收金额大写: ' + data['totalCap']}</td>`
}
return '<td style="padding:0 10px" colspan="100">应收金额大写: </td>'
},
},
{tid: 'bProviderModule.customText', title: '文本', customText: '自定义文本', custom: true, type: 'text'},
{
tid: 'bProviderModule.longText', title: '长文本', type: 'longText', options: {
field: 'test.longText',
width: 200,
testData: '长文本分页/不分页测试'
},
}
]),
new hiprint.PrintElementTypeGroup("辅助", [
{
tid: 'bProviderModule.hline',
title: '横线',
type: 'hline'
},
{
tid: 'bProviderModule.vline',
title: '竖线',
type: 'vline'
},
{
tid: 'bProviderModule.rect',
title: '矩形',
type: 'rect'
},
{
tid: 'bProviderModule.oval',
title: '椭圆',
type: 'oval'
}
])
]
);
};
return {
addElementTypes: addElementTypes
};
};
// type: 1供货商 2经销商 // type: 1供货商 2经销商
export default [{ export default [{
name: 'A设计', name: 'A设计',
value: 'aProviderModule', value: 'aProviderModule',
type: 1, type: 1,
f: aProvider() f: aProvider()
}, {
name: 'B设计',
value: 'bProviderModule',
type: 2,
f: bProvider()
}] }]

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 14:55:51 * @Date: 2023-08-01 14:55:51
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-11-07 19:28:18 * @LastEditTime: 2023-11-22 14:40:59
* @Description: * @Description:
--> -->
<template> <template>
@ -77,7 +77,7 @@ const tableProps = [
{ {
prop: 'printStatus', prop: 'printStatus',
label: '打印状态', label: '打印状态',
// subcomponent: unitDict, filter: (val) => val == 1 ? '未打印' : '已打印',
}, },
{ {
prop: 'createTime', prop: 'createTime',
@ -96,7 +96,11 @@ export default {
exportURL: exportPackingExcel, exportURL: exportPackingExcel,
}, },
tableProps, tableProps,
tableBtn: [ tableBtn: [
{
type: 'print',
btnName: '打印',
},
this.$auth.hasPermi(`base:packaging-print-log:update`) this.$auth.hasPermi(`base:packaging-print-log:update`)
? { ? {
type: 'edit', type: 'edit',
@ -109,10 +113,6 @@ export default {
btnName: '删除', btnName: '删除',
} }
: undefined, : undefined,
{
type: 'print',
btnName: '打印',
},
].filter((v) => v), ].filter((v) => v),
tableData: [], tableData: [],
formConfig: [ formConfig: [

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 14:55:51 * @Date: 2023-08-01 14:55:51
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-11-01 10:28:29 * @LastEditTime: 2023-11-22 14:40:07
* @Description: * @Description:
--> -->
<template> <template>
@ -33,6 +33,11 @@ import {
} from '@/api/base/printModel'; } from '@/api/base/printModel';
const tableProps = [ const tableProps = [
{
prop: 'createTime',
label: '创建时间',
filter: parseTime
},
{ {
prop: 'name', prop: 'name',
label: '模板名称' label: '模板名称'
@ -64,7 +69,11 @@ export default {
}, },
tableProps, tableProps,
modelShow:false, modelShow:false,
tableBtn: [ tableBtn: [
{
type: 'print',
btnName: '查看',
},
this.$auth.hasPermi(`base:packaging-print-model:update`) this.$auth.hasPermi(`base:packaging-print-model:update`)
? { ? {
type: 'edit', type: 'edit',
@ -77,10 +86,6 @@ export default {
btnName: '删除', btnName: '删除',
} }
: undefined, : undefined,
{
type: 'print',
btnName: '查看',
},
].filter((v) => v), ].filter((v) => v),
tableData: [], tableData: [],
formConfig: [ formConfig: [

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 14:55:51 * @Date: 2023-08-01 14:55:51
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-10-18 16:11:22 * @LastEditTime: 2023-11-22 14:36:33
* @Description: * @Description:
--> -->
<template> <template>
@ -107,12 +107,12 @@ export default {
// valueFormat: 'yyyy-MM-dd', // valueFormat: 'yyyy-MM-dd',
// param: 'createTime', // param: 'createTime',
// }, // },
{ // {
type: 'button', // type: 'button',
btnName: '搜索', // btnName: '',
name: 'search', // name: 'search',
color: 'primary', // color: 'primary',
}, // },
// { // {
// type: 'separate', // type: 'separate',
// }, // },
@ -125,7 +125,7 @@ export default {
type: 'separate', type: 'separate',
}, },
{ {
type: this.$auth.hasPermi('base:packaging-print-log:create') ? 'button' : '', type: this.$auth.hasPermi('base:packaging-print-type:create') ? 'button' : '',
btnName: '新增', btnName: '新增',
name: 'add', name: 'add',
color: 'success', color: 'success',

View File

@ -61,7 +61,7 @@
rows: drawerBaseInfoRows, rows: drawerBaseInfoRows,
}, },
{ {
name: '属性列表', name: '采集参数',
key: 'attrs', key: 'attrs',
props: drawerListProps, props: drawerListProps,
url: '/base/equipment-plc-param/page', url: '/base/equipment-plc-param/page',
@ -75,18 +75,26 @@
pageSize: 10, pageSize: 10,
}, },
tableBtn: [ tableBtn: [
this.$auth.hasPermi('equipment:collection-config-param:update') {
? { type: 'edit',
type: 'edit', btnName: '修改',
btnName: '修改', },
} {
: undefined, type: 'delete',
this.$auth.hasPermi('equipment:collection-config-param:delete') btnName: '删除',
? { },
type: 'delete', // this.$auth.hasPermi('equipment:collection-config-param:update')
btnName: '删除', // ? {
} // type: 'edit',
: undefined, // btnName: '',
// }
// : undefined,
// this.$auth.hasPermi('equipment:collection-config-param:delete')
// ? {
// type: 'delete',
// btnName: '',
// }
// : undefined,
].filter((v) => v), ].filter((v) => v),
allowAdd: true, allowAdd: true,
}, },
@ -106,7 +114,6 @@ import {
getEquipmentPlcConnectPage, getEquipmentPlcConnectPage,
exportEquipmentPlcConnectExcel, exportEquipmentPlcConnectExcel,
} from '@/api/base/equipmentPlcConnect'; } from '@/api/base/equipmentPlcConnect';
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
// import './http'; // import './http';
import BasicDrawer from './components/BasicDrawer.vue'; import BasicDrawer from './components/BasicDrawer.vue';
@ -182,13 +189,15 @@ export default {
placeholder: '请选择设备', placeholder: '请选择设备',
param: 'equipmentId', param: 'equipmentId',
selectOptions: [], selectOptions: [],
filterable: true
}, },
{ {
type: 'select', type: 'select',
label: '编码', label: '关联表编码',
placeholder: '请选择编码', placeholder: '请选择关联表编码',
param: 'plcId', param: 'plcId',
selectOptions: [], selectOptions: [],
filterable: true
}, },
{ {
type: 'button', type: 'button',
@ -224,7 +233,9 @@ export default {
prop: 'plcId', prop: 'plcId',
labelKey: `plcTableName`, labelKey: `plcTableName`,
url: '/base/equipment-plc/listAll', url: '/base/equipment-plc/listAll',
rules: [{ required: true, message: '关联表名不能为空', trigger: 'blur' }], rules: [
{ required: true, message: '关联表名不能为空', trigger: 'blur' },
],
bind: { bind: {
filterable: true, filterable: true,
}, },
@ -236,7 +247,9 @@ export default {
label: '设备', label: '设备',
prop: 'equipmentId', prop: 'equipmentId',
url: '/base/core-equipment/page?pageNo=1&pageSize=99', url: '/base/core-equipment/page?pageNo=1&pageSize=99',
rules: [{ required: true, message: '设备不能为空', trigger: 'blur' }], rules: [
{ required: true, message: '设备不能为空', trigger: 'blur' },
],
bind: { bind: {
filterable: true, filterable: true,
}, },
@ -262,7 +275,9 @@ export default {
input: true, input: true,
label: '设备名', label: '设备名',
prop: 'equipmentName', prop: 'equipmentName',
rules: [{ required: true, message: '设备名不能为空', trigger: 'blur' }], rules: [
{ required: true, message: '设备名不能为空', trigger: 'blur' },
],
// bind: { // bind: {
// disabled: this.editMode == 'detail', // some condition, like detail mode... // disabled: this.editMode == 'detail', // some condition, like detail mode...
// } // }
@ -296,7 +311,8 @@ export default {
label: '生产参数类型', label: '生产参数类型',
filter: (val) => filter: (val) =>
val != null val != null
? ['', '进片数量', '出片数量', '破损数量', '无类型', ''][val] // ? ['', '', '', '', '', ''][val]
? ['', '进口计数', '出口计数', '损耗计数', '无类型', ''][val]
: '-', : '-',
}, },
{ {

View File

@ -59,7 +59,6 @@ import {
getEquipmentPlcPage, getEquipmentPlcPage,
exportEquipmentPlcExcel, exportEquipmentPlcExcel,
} from '@/api/base/equipmentPlc'; } from '@/api/base/equipmentPlc';
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
const switchBtn = { const switchBtn = {
@ -352,7 +351,7 @@ export default {
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;
this.$modal this.$modal
.confirm('是否确认删除实时数据采集配置编号为"' + id + '"的数据项?') .confirm('是否确认删除该配置?')
.then(function () { .then(function () {
return deleteEquipmentPlc(id); return deleteEquipmentPlc(id);
}) })

View File

@ -194,13 +194,17 @@ export default {
input: true, input: true,
label: '参数列名', label: '参数列名',
prop: 'plcParamName', prop: 'plcParamName',
rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }], rules: [
{ required: true, message: '参数列名不能为空', trigger: 'blur' },
],
}, },
{ {
input: true, input: true,
label: '参数名称', label: '参数名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '参数名称不能为空', trigger: 'blur' }], rules: [
{ required: true, message: '参数名称不能为空', trigger: 'blur' },
],
}, },
], ],
[ [
@ -230,19 +234,35 @@ export default {
{ label: '工艺参数', value: 2 }, { label: '工艺参数', value: 2 },
{ label: '报警参数', value: 3 }, { label: '报警参数', value: 3 },
], ],
rules: [{ required: true, message: '设备参数类型不能为空', trigger: 'blur' }], rules: [
{
required: true,
message: '设备参数类型不能为空',
trigger: 'blur',
},
],
}, },
{ {
select: true, select: true,
label: '生产参数类型', label: '生产参数类型',
prop: 'production_param_type', prop: 'production_param_type',
options: [ options: [
{ label: '进片数量', value: 1 }, // { label: '', value: 1 },
{ label: '出片数量', value: 2 }, // { label: '', value: 2 },
{ label: '破损数量', value: 3 }, // { label: '', value: 3 },
// { label: '', value: 4 },
{ label: '进口计数', value: 1 },
{ label: '出口计数', value: 2 },
{ label: '损耗计数', value: 3 },
{ label: '无类型', value: 4 }, { label: '无类型', value: 4 },
], ],
rules: [{ required: true, message: '生产参数类型不能为空', trigger: 'blur' }], rules: [
{
required: true,
message: '生产参数类型不能为空',
trigger: 'blur',
},
],
}, },
], ],
[ [
@ -305,6 +325,7 @@ export default {
infoQuery: null, // infoQuery: null, //
attrFormSubmitting: false, attrFormSubmitting: false,
attrListLoading: false, attrListLoading: false,
shouldRefreshPageView: false,
}; };
}, },
computed: { computed: {
@ -323,10 +344,12 @@ export default {
}); });
}, },
tableBtn() { tableBtn() {
return this.mode == 'detail' ? [] : this.sections[1].tableBtn; return this.sections[1].tableBtn;
// return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
}, },
}, },
mounted() { mounted() {
this.shouldRefreshPageView = false;
this.mode = this.defaultMode || 'detail'; this.mode = this.defaultMode || 'detail';
for (const section of this.sections) { for (const section of this.sections) {
// //
@ -403,6 +426,9 @@ export default {
}, },
handleCancel() { handleCancel() {
if (this.shouldRefreshPageView) {
this.$emit('refreshDataList');
}
this.visible = false; this.visible = false;
}, },
@ -426,7 +452,7 @@ export default {
remark: '', remark: '',
alarmContent: '', alarmContent: '',
}; };
this.attrTitle = '添加设备绑定信息'; this.attrTitle = '添加参数绑定信息';
this.attrFormVisible = true; this.attrFormVisible = true;
}, },
@ -439,14 +465,14 @@ export default {
}); });
if (res.code == 0) { if (res.code == 0) {
this.attrForm = res.data; this.attrForm = res.data;
this.attrTitle = '编辑设备绑定信息'; this.attrTitle = '编辑参数绑定信息';
this.attrFormVisible = true; this.attrFormVisible = true;
} }
}, },
// //
handleDeleteAttr(attrId) { handleDeleteAttr(attrId) {
this.$confirm('确定删除该分组报警?', '提示', { this.$confirm('确定删除该参数?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@ -458,6 +484,7 @@ export default {
params: { id: attrId }, params: { id: attrId },
}); });
if (res.code == 0) { if (res.code == 0) {
this.shouldRefreshPageView = true;
this.$message({ this.$message({
message: '删除成功', message: '删除成功',
type: 'success', type: 'success',
@ -472,35 +499,37 @@ export default {
}, },
// //
async submitAttrForm() { submitAttrForm() {
this.$refs['attrForm'].validate((valid) => { this.$refs['attrForm'].validate(async (valid) => {
if (!valid) { if (!valid) {
return; return;
} }
});
const isEdit = this.attrForm.id != null;
this.attrFormSubmitting = true;
const res = await this.$axios({
url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
method: isEdit ? 'put' : 'post',
data: {
...this.attrForm,
connectId: this.infoData.id,
},
});
if (res.code == 0) { const isEdit = this.attrForm.id != null;
this.closeAttrForm(); this.attrFormSubmitting = true;
this.$message({ const res = await this.$axios({
message: `${isEdit ? '更新' : '创建'}成功`, url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
type: 'success', method: isEdit ? 'put' : 'post',
duration: 1500, data: {
onClose: () => { ...this.attrForm,
this.getAttrList(); connectId: this.infoData.id,
}, },
}); });
}
this.attrFormSubmitting = false; if (res.code == 0) {
this.closeAttrForm();
this.$message({
message: `${isEdit ? '更新' : '创建'}成功`,
type: 'success',
duration: 1500,
onClose: () => {
this.getAttrList();
this.shouldRefreshPageView = true;
},
});
}
this.attrFormSubmitting = false;
});
}, },
closeAttrForm() { closeAttrForm() {
@ -509,7 +538,7 @@ export default {
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.$confirm(`确定删除该报警?`, '提示', { this.$confirm(`确定删除该参数?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',

View File

@ -482,7 +482,7 @@ export default {
async submitForm() { async submitForm() {
const { code, data } = await this.$axios({ const { code, data } = await this.$axios({
url: '/analysis/equipment-analysis/quantity', url: '/monitoring/equipment-monitor/quantity-series',
method: 'get', method: 'get',
params: this.queryParams, params: this.queryParams,
}); });

View File

@ -6,19 +6,29 @@
--> -->
<template> <template>
<div class="status-timegraph-container" style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column"> <div
<el-row class="" style=" class="status-timegraph-container"
style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
<el-row
class=""
style="
margin-bottom: 12px; margin-bottom: 12px;
background: #fff; background: #fff;
padding: 16px 16px 0; padding: 16px 16px 0;
border-radius: 8px; border-radius: 8px;
"> ">
<div class="blue-title">生产节拍时序图</div> <div class="blue-title">生产节拍时序图</div>
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" :remove-blue="true" <SearchBar
@select-changed="handleSearchBarSelectChange" @headBtnClick="handleSearchBarBtnClick" /> :formConfigs="searchBarFormConfig"
ref="search-bar"
:remove-blue="true"
@select-changed="handleSearchBarSelectChange"
@headBtnClick="handleSearchBarBtnClick" />
</el-row> </el-row>
<el-row class="" style=" <el-row
class=""
style="
height: 1px; height: 1px;
flex: 1; flex: 1;
margin-bottom: 12px; margin-bottom: 12px;
@ -47,17 +57,36 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div class="main-area" style="flex: 1; display: flex; flex-direction: column"> <div
<div class="graphs" v-show="graphList.length" id="status-chart" style="height: 1px; flex: 1"></div> class="main-area"
style="flex: 1; display: flex; flex-direction: column">
<div
class="graphs"
v-show="graphList.length"
id="status-chart"
style="height: 1px; flex: 1"></div>
<h2 v-if="!graphList || graphList.length == 0" class="no-data-bg"></h2> <h2 v-if="!graphList || graphList.length == 0" class="no-data-bg"></h2>
</div> </div>
</el-row> </el-row>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<base-dialog dialogTitle="添加设备" :dialogVisible="open" width="500px" @close="open = false" @cancel="open = false" <base-dialog
dialogTitle="添加设备"
:dialogVisible="open"
width="500px"
@close="open = false"
@cancel="open = false"
@confirm="submitForm"> @confirm="submitForm">
<el-select v-if="open" style="width: 100%" v-model="queryParams.equipmentId" placeholder="请选择一个设备"> <el-select
<el-option v-for="eq in eqList" :key="eq.id" :value="eq.id" :label="eq.name"></el-option> v-if="open"
style="width: 100%"
v-model="queryParams.equipmentId"
placeholder="请选择一个设备">
<el-option
v-for="eq in eqList"
:key="eq.id"
:value="eq.id"
:label="eq.name"></el-option>
</el-select> </el-select>
</base-dialog> </base-dialog>
</div> </div>
@ -129,7 +158,7 @@ export default {
open: false, open: false,
eqList: [], eqList: [],
startTime: null, startTime: null,
gantt: null gantt: null,
// demo: [ // demo: [
// [ // [
// { // {
@ -159,7 +188,7 @@ export default {
this.initEquipment(); this.initEquipment();
// this.getList(); // this.getList();
}, },
mounted() { }, mounted() {},
watch: { watch: {
graphList: { graphList: {
handler(val) { handler(val) {
@ -171,7 +200,6 @@ export default {
return; return;
} }
this.gantt.update(val); this.gantt.update(val);
}); });
} }
return; return;
@ -215,7 +243,9 @@ export default {
params: this.queryParams, params: this.queryParams,
}); });
if (code == 0) { if (code == 0) {
this.existingEquipments = Object.values(data).map((eq) => eq[0].equipmentId); this.existingEquipments = Object.values(data).map(
(eq) => eq[0].equipmentId
);
this.graphList = this.objectToArray(data); this.graphList = this.objectToArray(data);
} }
}, },
@ -302,26 +332,26 @@ export default {
return; return;
} }
this.startTime = new Date(payload.recordTime) this.startTime = new Date(payload.recordTime);
this.queryParams.lineId = payload.lineId || null; this.queryParams.lineId = payload.lineId || null;
this.queryParams.sectionId = payload.sectionId || null; this.queryParams.sectionId = payload.sectionId || null;
this.queryParams.equipmentId = payload.equipmentId || null; this.queryParams.equipmentId = payload.equipmentId || null;
this.queryParams.recordTime = payload.recordTime this.queryParams.recordTime = payload.recordTime
? [ ? [
payload.recordTime, payload.recordTime,
new Date( new Date(
new Date(payload.recordTime).getTime() + 24 * 3600 * 1000 new Date(payload.recordTime).getTime() + 24 * 3600 * 1000
) )
.toLocaleDateString() .toLocaleDateString()
.split('/') .split('/')
.map((value, index) => { .map((value, index) => {
if (index == 1 || index == 2) { if (index == 1 || index == 2) {
return value.padStart(2, '0'); return value.padStart(2, '0');
} }
return value; return value;
}) })
.join('-') + ' 00:00:00', .join('-') + ' 00:00:00',
] ]
: null; : null;
this.getList(); this.getList();
break; break;
@ -337,7 +367,7 @@ export default {
return; return;
} }
const { code, data } = await this.$axios({ const { code, data } = await this.$axios({
url: '/analysis/equipment-analysis/status', url: '/monitoring/equipment-monitor/status-series',
method: 'get', method: 'get',
params: this.queryParams, params: this.queryParams,
}); });
@ -444,7 +474,7 @@ export default {
} }
.running { .running {
background-color: #288AFF; background-color: #288aff;
// background-color: #84f04e; // background-color: #84f04e;
} }
@ -455,7 +485,7 @@ export default {
.fault { .fault {
// background-color: #ea5b5b; // background-color: #ea5b5b;
background-color: #FC9C91; background-color: #fc9c91;
} }
.full { .full {
@ -469,7 +499,7 @@ export default {
} }
.stop { .stop {
background-color: #FFDC94; background-color: #ffdc94;
} }
.legend-row { .legend-row {
@ -478,7 +508,7 @@ export default {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
>.legend:not(:last-child) { > .legend:not(:last-child) {
margin-right: 12px; margin-right: 12px;
} }
@ -521,7 +551,7 @@ export default {
background: #ccc; background: #ccc;
} }
.echarts__status-chart>div { .echarts__status-chart > div {
height: 100% !important; height: 100% !important;
width: 100% !important; width: 100% !important;
} }

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: zhp * @LastEditors: zhp
* @LastEditTime: 2023-11-10 16:26:08 * @LastEditTime: 2023-11-22 16:50:55
* @Description: * @Description:
--> -->
<template> <template>
@ -100,7 +100,8 @@ import {
updateProcessEquMaterialBom, updateProcessEquMaterialBom,
getEquipmentList, getEquipmentList,
processEquMaterialBomDetPage, processEquMaterialBomDetPage,
deleteProcessEquMaterialBomDet deleteProcessEquMaterialBomDet,
getMaterialCode
} from '@/api/extend/processEquMaterialBom'; } from '@/api/extend/processEquMaterialBom';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import { parseTime } from '../../core/mixins/code-filter'; import { parseTime } from '../../core/mixins/code-filter';
@ -197,7 +198,6 @@ export default {
}; };
}, },
mounted() { mounted() {
this.getDict()
}, },
methods: { methods: {
getCode(val) { getCode(val) {
@ -223,6 +223,9 @@ export default {
// console.log(response); // console.log(response);
this.equipmentList = res.data this.equipmentList = res.data
}) })
getMaterialCode().then(res => {
this.dataForm.code = res.data
})
}, },
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
@ -267,7 +270,8 @@ export default {
}); });
}, },
init(id, isdetail) { init(id, isdetail) {
this.initData(); this.initData()
this.getDict()
this.isdetail = isdetail || false; this.isdetail = isdetail || false;
this.dataForm.id = id || undefined; this.dataForm.id = id || undefined;
this.visible = true; this.visible = true;

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-08 15:30:27 * @Date: 2023-11-08 15:30:27
* @LastEditTime: 2023-11-09 14:11:02 * @LastEditTime: 2023-11-23 14:27:59
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -18,13 +18,16 @@
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px" <el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
@keyup.enter.native="dataFormSubmit()"> @keyup.enter.native="dataFormSubmit()">
<el-form-item label="物料名称" prop="materialId"> <el-form-item label="物料名称" prop="materialId">
<el-select v-model="dataForm.materialId" filterable placeholder="请选择物料名称"> <el-select v-model="dataForm.materialId" filterable placeholder="请选择物料名称" multiple>
<el-option v-for="dict in materialList" :key=" dict.id" :label="dict.name" :value="dict.id" /> <el-option v-for="dict in materialList" :key=" dict.id" :label="dict.name" :value="dict.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="数量" prop="num"> <el-form-item label="数量" prop="num">
<el-input v-model="dataForm.num" placeholder="请输入数量" clearable /> <el-input v-model="dataForm.num" placeholder="请输入数量" clearable />
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入备注" clearable />
</el-form-item>
</el-form> </el-form>
<el-row style="text-align: right"> <el-row style="text-align: right">
@ -37,7 +40,7 @@
<script> <script>
import { import {
getProcessEquMaterialBomDet, getProcessEquMaterialBomDet,
createProcessEquMaterialBomDet, createProcessEquMaterialBomDetList,
updateProcessEquMaterialBomDet, updateProcessEquMaterialBomDet,
getMaterialList getMaterialList
} from '@/api/extend/processEquMaterialBom'; } from '@/api/extend/processEquMaterialBom';
@ -56,11 +59,13 @@ export default {
dataForm: { dataForm: {
id: undefined, id: undefined,
bomId: undefined, bomId: undefined,
materialId:null, materialId:[],
num: undefined, num: undefined,
remark:undefined
}, },
dataRule: { dataRule: {
attrName: [{ required: true, message: '名称不能为空', trigger: 'blur' }], materialId: [{ required: true, message: '名称不能为空', trigger: 'change' }],
num: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
}, },
}; };
}, },
@ -79,8 +84,11 @@ export default {
getProcessEquMaterialBomDet({ getProcessEquMaterialBomDet({
id: this.dataForm.id id: this.dataForm.id
}).then((res) => { }).then((res) => {
this.dataForm = res.data; this.dataForm = res.data
// this.dataForm.materialId = materialId; const arr = []
arr.push(res.data.materialId)
this.dataForm.materialId =arr
console.log(this.dataForm.materialId);
// this.dataForm.value = value; // this.dataForm.value = value;
}); });
} }
@ -97,10 +105,16 @@ export default {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// //
if (this.dataForm.id) { if (this.dataForm.id) {
const dataObj = {
materialId: this.dataForm.materialId.toString(),
bomId: this.dataForm.bomId,
num: this.dataForm.num,
id: this.dataForm.id,
remark: this.dataForm.remark
}
updateProcessEquMaterialBomDet({ updateProcessEquMaterialBomDet({
...this.dataForm, ...dataObj
productId: this.productId,
}).then((response) => { }).then((response) => {
this.$modal.msgSuccess('修改成功'); this.$modal.msgSuccess('修改成功');
this.visible = false; this.visible = false;
@ -108,11 +122,16 @@ export default {
}); });
return; return;
} }
// //
createProcessEquMaterialBomDet({ const dataArr = this.dataForm.materialId.map(ele => {
...this.dataForm, return {
productId: this.productId, materialId: ele,
}).then((response) => { bomId: this.dataForm.bomId,
num: this.dataForm.num,
remark: this.dataForm.remark
}
});
createProcessEquMaterialBomDetList(dataArr).then((response) => {
this.$modal.msgSuccess('新增成功'); this.$modal.msgSuccess('新增成功');
this.visible = false; this.visible = false;
this.$emit('refreshDataList'); this.$emit('refreshDataList');

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: zhp * @LastEditors: zhp
* @LastEditTime: 2023-11-09 14:49:16 * @LastEditTime: 2023-11-23 09:20:12
* @Description: * @Description:
--> -->
<template> <template>
@ -53,7 +53,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="drawer-body__footer"> <div v-if="isdetail" class="drawer-body__footer">
<el-button style="" @click="goback()">取消</el-button> <el-button style="" @click="goback()">取消</el-button>
<el-button v-if="isdetail" type="primary" @click="goEdit()"> <el-button v-if="isdetail" type="primary" @click="goEdit()">
编辑 编辑
@ -63,7 +63,7 @@
<div class="attr-list" v-if="idAttrShow"> <div class="attr-list" v-if="idAttrShow">
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true"> <small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
设备物料明细 设备参数
</small-title> </small-title>
<div v-if="!isdetail" class="action_btn"> <div v-if="!isdetail" class="action_btn">
@ -100,7 +100,8 @@ import {
updateProcessEquValueBom, updateProcessEquValueBom,
getEquipmentList, getEquipmentList,
processEquValueBomDetPage, processEquValueBomDetPage,
deleteProcessEquValueBomDet deleteProcessEquValueBomDet,
getValueCode
} from '@/api/extend/processEquValueBom'; } from '@/api/extend/processEquValueBom';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import { parseTime } from '../../core/mixins/code-filter'; import { parseTime } from '../../core/mixins/code-filter';
@ -208,7 +209,6 @@ export default {
}; };
}, },
mounted() { mounted() {
this.getDict()
}, },
methods: { methods: {
getCode(val) { getCode(val) {
@ -234,6 +234,9 @@ export default {
// console.log(response); // console.log(response);
this.equipmentList = res.data this.equipmentList = res.data
}) })
getValueCode().then(res => {
this.dataForm.code = res.data
})
}, },
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
@ -277,8 +280,9 @@ export default {
this.listQuery.total = response.data.total; this.listQuery.total = response.data.total;
}); });
}, },
init(id, isdetail) { init(id, isdetail) {
this.initData(); this.getDict()
this.initData()
console.log(isdetail); console.log(isdetail);
this.isdetail = isdetail || false; this.isdetail = isdetail || false;
this.dataForm.id = id || undefined; this.dataForm.id = id || undefined;

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-08 15:30:27 * @Date: 2023-11-08 15:30:27
* @LastEditTime: 2023-11-09 14:44:49 * @LastEditTime: 2023-11-23 14:26:54
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -18,19 +18,19 @@
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px" <el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
@keyup.enter.native="dataFormSubmit()"> @keyup.enter.native="dataFormSubmit()">
<el-form-item label="参数名称" prop="paramId"> <el-form-item label="参数名称" prop="paramId">
<el-select v-model="dataForm.paramId" filterable placeholder="参数名称" @change="getData"> <el-select v-model="dataForm.paramId" filterable placeholder="参数名称" @change="getData" multiple >
<el-option v-for="dict in materialList" :key=" dict.id" :label="dict.name" :value="dict.id" /> <el-option v-for="dict in materialList" :key=" dict.id" :label="dict.name" :value="dict.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item label="参数编码" prop="code"> <!-- <el-form-item label="参数编码" prop="code">
<el-input v-model="dataForm.code" placeholder="请输入参数编码" clearable /> <el-input v-model="dataForm.code" placeholder="请输入参数编码" clearable />
</el-form-item> --> </el-form-item> -->
<el-form-item label="标准最小值" prop="standardMinValue"> <!-- <el-form-item label="标准最小值" prop="standardMinValue">
<el-input v-model="dataForm.standardMinValue" placeholder="请输入标准最小值" clearable /> <el-input v-model="dataForm.standardMinValue" placeholder="请输入标准最小值" clearable />
</el-form-item> </el-form-item>
<el-form-item label="标准最大值" prop="standardMaxValue"> <el-form-item label="标准最大值" prop="standardMaxValue">
<el-input v-model="dataForm.standardMaxValue" placeholder="请输入标准最大值" clearable /> <el-input v-model="dataForm.standardMaxValue" placeholder="请输入标准最大值" clearable />
</el-form-item> </el-form-item> -->
<el-form-item label="工艺最小值" prop="minValue"> <el-form-item label="工艺最小值" prop="minValue">
<el-input v-model="dataForm.minValue" placeholder="请输入工艺最小值" clearable /> <el-input v-model="dataForm.minValue" placeholder="请输入工艺最小值" clearable />
</el-form-item> </el-form-item>
@ -55,7 +55,7 @@
<script> <script>
import { import {
getProcessEquValueBomDet, getProcessEquValueBomDet,
createProcessEquValueBomDet, createProcessEquValueBomDetList,
updateProcessEquValueBomDet, updateProcessEquValueBomDet,
getValueList getValueList
} from '@/api/extend/processEquValueBom'; } from '@/api/extend/processEquValueBom';
@ -74,7 +74,7 @@ export default {
dataForm: { dataForm: {
id: undefined, id: undefined,
bomId: undefined, bomId: undefined,
paramId:undefined, paramId:[],
minValue:undefined, minValue:undefined,
maxValue: undefined, maxValue: undefined,
defaultValue: undefined, defaultValue: undefined,
@ -117,6 +117,10 @@ export default {
id: this.dataForm.id id: this.dataForm.id
}).then((res) => { }).then((res) => {
this.dataForm = res.data; this.dataForm = res.data;
const arr = []
arr.push(res.data.paramId)
this.dataForm.paramId = arr
console.log(this.dataForm.paramId);
// this.dataForm.materialId = materialId; // this.dataForm.materialId = materialId;
// this.dataForm.value = value; // this.dataForm.value = value;
}); });
@ -137,22 +141,41 @@ export default {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// //
if (this.dataForm.id) { if (this.dataForm.id) {
const dataObj = {
paramId: this.dataForm.paramId.toString(),
bomId: this.dataForm.bomId,
minValue: this.dataForm.minValue,
maxValue: this.dataForm.maxValue,
defaultValue: this.dataForm.defaultValue,
standardMinValue: this.dataForm.standardMinValue,
standardMaxValue: this.dataForm.standardMaxValue,
remark: this.dataForm.remark,
id: this.dataForm.id
}
updateProcessEquValueBomDet({ updateProcessEquValueBomDet({
...this.dataForm, ...dataObj,
productId: this.productId,
}).then((response) => { }).then((response) => {
this.$modal.msgSuccess('修改成功'); this.$modal.msgSuccess('修改成功');
this.visible = false; this.visible = false;
this.$emit('refreshDataList'); this.$emit('refreshDataList');
}); });
return; return;
} }
const dataArr = this.dataForm.paramId.map(ele => {
return {
paramId: ele,
bomId: this.dataForm.bomId,
minValue: this.dataForm.minValue,
maxValue: this.dataForm.maxValue,
defaultValue: this.dataForm.defaultValue,
standardMinValue: this.dataForm.standardMinValue,
standardMaxValue: this.dataForm.standardMaxValue,
remark: this.dataForm.remark
}
});
// //
createProcessEquValueBomDet({ createProcessEquValueBomDetList(dataArr).then((response) => {
...this.dataForm,
productId: this.productId,
}).then((response) => {
this.$modal.msgSuccess('新增成功'); this.$modal.msgSuccess('新增成功');
this.visible = false; this.visible = false;
this.$emit('refreshDataList'); this.$emit('refreshDataList');

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 14:55:51 * @Date: 2023-08-01 14:55:51
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-11-10 10:23:33 * @LastEditTime: 2023-11-22 14:23:40
* @Description: * @Description:
--> -->
<template> <template>
@ -70,7 +70,7 @@ const tableProps = [
}, },
{ {
prop: 'yield', prop: 'yield',
label: '成品率' label: '合格率'
} }
]; ];
@ -115,19 +115,19 @@ export default {
valueField: 'id', valueField: 'id',
param: 'orderName' param: 'orderName'
}, },
// { {
// 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",
// rangeSeparator: '-', rangeSeparator: '-',
// startPlaceholder: '', startPlaceholder: '开始时间',
// endPlaceholder: '', endPlaceholder: '结束时间',
// param: 'timeVal', param: 'timeVal',
// defaultSelect: [], defaultSelect: [],
// width: 250 width: 250
// }, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '搜索',
@ -238,13 +238,13 @@ export default {
if (val.btnName === 'search') { if (val.btnName === 'search') {
this.listQuery.orderName = val.orderName ? val.orderName :undefined this.listQuery.orderName = val.orderName ? val.orderName :undefined
// this.queryParams.status = val.status // this.queryParams.status = val.status
// if (val.timeVal && val.timeVal.length != 0 ) { if (val.timeVal && val.timeVal.length != 0 ) {
// this.listQuery.startTime = val.timeVal[0] + ' 00:00:00' this.listQuery.startTime = val.timeVal[0] + ' 00:00:00'
// this.listQuery.endTime = val.timeVal[1] + ' 23:59:59' this.listQuery.endTime = val.timeVal[1] + ' 23:59:59'
// } else { } else {
// this.listQuery.startTime = undefined this.listQuery.startTime = undefined
// this.listQuery.endTime = undefined this.listQuery.endTime = undefined
// } }
this.getList() this.getList()
} else { } else {
// this.handleExport() // this.handleExport()

View File

@ -71,29 +71,11 @@
<img <img
src="../assets/logo/cnbm.png" src="../assets/logo/cnbm.png"
alt="cnbm_logo" alt="cnbm_logo"
style=" style=""
height: 48px; class="cnbm_logo" />
width: 48px;
position: relative;
top: 12px;
right: 8px;
" />
<span>中建材智能自动化研究院有限公司</span> <span>中建材智能自动化研究院有限公司</span>
</h3> </h3>
<h3 <h3 class="sub-title" style="">MES</h3>
class="sub-title"
style="
margin: 0;
margin-left: 32px;
font-weight: 400;
user-select: none;
color: #000;
font-size: 36px;
line-height: 54px;
letter-spacing: 2px;
">
MES
</h3>
</h2> </h2>
<!-- 表单 --> <!-- 表单 -->
@ -193,9 +175,9 @@
style=" style="
cursor: pointer; cursor: pointer;
color: #0b58ff; color: #0b58ff;
font-size: 18px; font-size: calc(12 * 0.12vh);
line-height: 66px; line-height: calc(54 * 0.12vh);
padding-right: 12px; padding-right: calc(10 * 0.12vh);
"> ">
获取验证码 获取验证码
</span> </span>
@ -215,7 +197,11 @@
:loading="loading" :loading="loading"
size="medium" size="medium"
type="primary" type="primary"
style="width: 100%; height: 66px; font-size: 18px" style="
width: 100%;
height: calc(52 * 0.12vh);
font-size: calc(14 * 0.12vh);
"
@click.native.prevent="getCode"> @click.native.prevent="getCode">
<span v-if="!loading"> </span> <span v-if="!loading"> </span>
<span v-else> 中...</span> <span v-else> 中...</span>
@ -349,7 +335,7 @@ export default {
}; };
}, },
created() { created() {
document.body.style['min-height'] = '1024px'; // document.body.style['min-height'] = '1024px';
// //
this.tenantEnable = getTenantEnable(); this.tenantEnable = getTenantEnable();
if (this.tenantEnable) { if (this.tenantEnable) {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:54:28 * @LastEditTime: 2023-11-23 15:27:55
* @Description: * @Description:
--> -->
<template> <template>
@ -12,7 +12,8 @@
ref="dataForm" ref="dataForm"
v-if="visible" v-if="visible"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="100px"> label-width="100px"
label-position="top">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="物品名称" prop="name"> <el-form-item label="物品名称" prop="name">
@ -60,6 +61,7 @@
:min="0" :min="0"
v-model="dataForm.dailyUse" v-model="dataForm.dailyUse"
clearable clearable
style="width: 100%;"
placeholder="请输入单日消耗量" /> placeholder="请输入单日消耗量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -69,6 +71,7 @@
:min="0" :min="0"
v-model="dataForm.allowTime" v-model="dataForm.allowTime"
clearable clearable
style="width: 90%;"
placeholder="请输入允许留存时间" /> () placeholder="请输入允许留存时间" /> ()
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -75,6 +75,7 @@ const tableProps = [
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
width: 150
}, },
{ {
prop: 'dailyUse', prop: 'dailyUse',
@ -127,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

View File

@ -14,13 +14,6 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData"> :table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="100"
label="库位详情"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table> </base-table>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
@ -76,7 +69,7 @@ const tableProps = [
prop: 'operateTime', prop: 'operateTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'operator', prop: 'operator',
@ -96,14 +89,6 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [
this.$auth.hasPermi(`end-material:warehouse-realtime-location-his:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -143,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

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-11-03 16:20:19 * @LastEditTime: 2023-11-23 16:09:20
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,37 +25,31 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'batchCode', prop: 'batchCode',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -92,7 +92,7 @@ const tableProps = [
prop: 'createTime', prop: 'createTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'creator', prop: 'creator',
@ -115,7 +115,7 @@ export default {
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`end-material:warehouse-location-his:query`) this.$auth.hasPermi(`end-material:warehouse-location-his:query`)
? { ? {
type: 'info', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
@ -159,7 +159,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -205,7 +205,7 @@ export default {
} }
}, },
otherMethods(val) { otherMethods(val) {
if (val.type === 'info') { if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:14:18 * @LastEditTime: 2023-11-23 15:54:25
* @Description: * @Description:
--> -->
<template> <template>
@ -68,6 +68,7 @@
v-model="dataForm.goodsBatch" v-model="dataForm.goodsBatch"
filterable filterable
clearable clearable
style="width:100%"
placeholder="请选择物品名称"> placeholder="请选择物品名称">
<el-option <el-option
v-for="(item, index) in Batch" v-for="(item, index) in Batch"
@ -83,6 +84,7 @@
v-model="dataForm.numDet" v-model="dataForm.numDet"
clearable clearable
:min="0" :min="0"
style="width:100%"
placeholder="请输入数量" /> placeholder="请输入数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-11-03 16:37:06 * @Date: 2023-11-03 16:37:06
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-04 16:33:02 * @LastEditTime: 2023-11-23 15:54:31
* @Description: * @Description:
--> -->
<template> <template>
@ -67,7 +67,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width="50%"> width="40%">
<add-or-update <add-or-update
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update> @refreshDataList="successSubmit"></add-or-update>
@ -131,15 +131,18 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{ {
type: this.$auth.hasPermi('end-material:warehouse-realtime:create') ? 'button' : '', type: this.$auth.hasPermi('end-material:warehouse-realtime:create') ? 'button' : '',
btnName: '入库', btnName: '入库',
name: 'add', name: 'add',
color: 'success', color: 'primary',
plain: true, plain: true,
}, },
], ],

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-11-03 14:51:33 * @LastEditTime: 2023-11-23 16:08:09
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,48 +25,41 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
{ {
prop: 'leftTime', prop: 'leftTime',
label: '剩余留存时长(天)', label: '剩余留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
:visible.sync="visible" :visible.sync="visible"
:width="'35%'" :width="'30%'"
:append-to-body="true" :append-to-body="true"
:close-on-click-modal="false" :close-on-click-modal="false"
class="dialog"> class="dialog">
@ -22,7 +22,7 @@
<el-form-item label="产品" prop="productInfo"> <el-form-item label="产品" prop="productInfo">
<el-select <el-select
v-model="dataForm.productInfo" v-model="dataForm.productInfo"
style="width: 100%" style="width: 60%"
filterable filterable
value-key="id" value-key="id"
placeholder="请选择产品"> placeholder="请选择产品">
@ -79,7 +79,7 @@ export default {
// //
dataFormSubmit() { dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (this.dataForm.productInfo) {
this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id
this.dataForm.productInfo.remark = '' this.dataForm.productInfo.remark = ''
// //
@ -91,6 +91,8 @@ export default {
// //
this.visible = false; this.visible = false;
this.$emit('refreshDataList', this.dataForm); this.$emit('refreshDataList', this.dataForm);
} else {
this.$modal.msgWarning('请选择产品');
} }
}); });
}, },

View File

@ -20,9 +20,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="库位名称" prop="name"> <el-form-item label="库位名称" prop="name">
<el-input <el-input v-model="dataForm.name" disabled />
v-model="dataForm.name"
disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -47,15 +45,20 @@
</small-title> </small-title>
<div class="attr-list"> <div class="attr-list">
<div style="position: absolute; top: -40px; right: 15px">
<el-button @click="addNew" type="text">
<i class="el-icon-plus"></i>
新增
</el-button>
</div>
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:add-button-show="addButtonShow"
@emitButtonClick="addNew"
@emitFun="inputChange" @emitFun="inputChange"
:height="400" :height="400"
:table-data="productAttributeList"> :table-data="productAttributeList"
v-if="productAttributeList.length">
<method-btn <method-btn
slot="handleBtn" slot="handleBtn"
:width="70" :width="70"
@ -63,6 +66,8 @@
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</div> </div>
</div> </div>
</div> </div>
@ -85,8 +90,10 @@
import productAttrAdd from './attr-add'; import productAttrAdd from './attr-add';
import inputArea from '../../mixins/inputArea'; import inputArea from '../../mixins/inputArea';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import { inWarehouseRealtimeLocation, import {
getWarehouseRealtimeLocation } from '@/api/warehouse/warehouseRealtimeLocation'; inWarehouseRealtimeLocation,
getWarehouseRealtimeLocation,
} from '@/api/warehouse/warehouseRealtimeLocation';
const tableBtn = [ const tableBtn = [
{ {
@ -99,36 +106,30 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
@ -143,8 +144,7 @@ export default {
tableBtn, tableBtn,
tableProps, tableProps,
productAttributeList: [], productAttributeList: [],
addButtonShow: '新增', operator: '',
operator: '',
dataForm: { dataForm: {
id: null, id: null,
name: '', name: '',
@ -170,8 +170,8 @@ export default {
initData() { initData() {
this.productAttributeList.splice(0); this.productAttributeList.splice(0);
}, },
init(val,nickname) { init(val, nickname) {
this.operator = nickname this.operator = nickname;
this.dataForm.id = val.id; this.dataForm.id = val.id;
this.dataForm.name = val.name; this.dataForm.name = val.name;
this.dataForm.palletCode = val.palletCode; this.dataForm.palletCode = val.palletCode;
@ -213,12 +213,8 @@ export default {
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.$confirm( this.$confirm(
`确定对${ `是否确认删除名称为"${raw.data.name}"的数据项?`,
raw.data.name '系统提示',
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{ {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -238,12 +234,12 @@ export default {
this.productAttributeList.forEach((item) => { this.productAttributeList.forEach((item) => {
item.id = ''; item.id = '';
}); });
const data = { const data = {
realtimeLocationId : this.dataForm.id, realtimeLocationId: this.dataForm.id,
palletCode : this.dataForm.palletCode, palletCode: this.dataForm.palletCode,
operator : this.operator, operator: this.operator,
goodsInfos: this.productAttributeList goodsInfos: this.productAttributeList,
} };
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// //
@ -313,5 +309,6 @@ export default {
.drawer >>> .el-form, .drawer >>> .el-form,
.drawer >>> .attr-list { .drawer >>> .attr-list {
padding: 0 16px; padding: 0 16px;
position: relative;
} }
</style> </style>

View File

@ -100,7 +100,7 @@ const tableProps = [
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
@ -125,12 +125,6 @@ export default {
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`end-material:warehouse-realtime-location:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi(`end-material:warehouse-realtime-location:query`) this.$auth.hasPermi(`end-material:warehouse-realtime-location:query`)
? { ? {
type: 'out', type: 'out',
@ -143,6 +137,12 @@ export default {
btnName: '入库', btnName: '入库',
} }
: undefined, : undefined,
this.$auth.hasPermi(`end-material:warehouse-realtime-location:query`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
].filter((v) => v), ].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
@ -183,7 +183,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -262,7 +262,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.drawerRef.init(val.data, this.nickname); this.$refs.drawerRef.init(val.data, this.nickname);
}); });
} else if (val.type === 'info') { } else if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

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-11-14 15:59:53 * @LastEditTime: 2023-11-21 10:37:05
* @Description: * @Description:
*/ */
export default { export default {
@ -104,7 +104,7 @@ export default {
}, },
// 删除 // 删除
deleteHandle(id, name, index) { deleteHandle(id, name, index) {
this.$confirm(`确定对${name ? '[名称=' + name + ']' : '[序号=' + index + ']'}进行删除操作?`, "提示", { this.$confirm(`是否确认删除${name ? '名称为"' + name + '"' : '序号为"' + index + '"'}的数据项?`, "系统提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:54:39 * @LastEditTime: 2023-11-23 15:27:47
* @Description: * @Description:
--> -->
<template> <template>
@ -12,7 +12,8 @@
ref="dataForm" ref="dataForm"
v-if="visible" v-if="visible"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="100px"> label-width="100px"
label-position="top">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="物品名称" prop="name"> <el-form-item label="物品名称" prop="name">
@ -60,6 +61,7 @@
:min="0" :min="0"
v-model="dataForm.dailyUse" v-model="dataForm.dailyUse"
clearable clearable
style="width: 100%;"
placeholder="请输入单日消耗量" /> placeholder="请输入单日消耗量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -69,6 +71,7 @@
:min="0" :min="0"
v-model="dataForm.allowTime" v-model="dataForm.allowTime"
clearable clearable
style="width: 90%;"
placeholder="请输入允许留存时间" /> () placeholder="请输入允许留存时间" /> ()
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -75,6 +75,7 @@ const tableProps = [
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
width: 150
}, },
{ {
prop: 'dailyUse', prop: 'dailyUse',
@ -127,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

View File

@ -14,13 +14,6 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData"> :table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="100"
label="库位详情"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table> </base-table>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
@ -76,7 +69,7 @@ const tableProps = [
prop: 'operateTime', prop: 'operateTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'operator', prop: 'operator',
@ -96,14 +89,6 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [
this.$auth.hasPermi(`out-material:warehouse-realtime-location-his:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -143,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

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-11-03 16:20:19 * @LastEditTime: 2023-11-23 16:09:04
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,37 +25,31 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'batchCode', prop: 'batchCode',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -92,7 +92,7 @@ const tableProps = [
prop: 'createTime', prop: 'createTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'creator', prop: 'creator',
@ -115,7 +115,7 @@ export default {
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`out-material:warehouse-location-his:query`) this.$auth.hasPermi(`out-material:warehouse-location-his:query`)
? { ? {
type: 'info', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
@ -159,7 +159,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -205,7 +205,7 @@ export default {
} }
}, },
otherMethods(val) { otherMethods(val) {
if (val.type === 'info') { if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:14:00 * @LastEditTime: 2023-11-23 15:54:07
* @Description: * @Description:
--> -->
<template> <template>
@ -68,6 +68,7 @@
v-model="dataForm.goodsBatch" v-model="dataForm.goodsBatch"
filterable filterable
clearable clearable
style="width:100%"
placeholder="请选择物品名称"> placeholder="请选择物品名称">
<el-option <el-option
v-for="(item, index) in Batch" v-for="(item, index) in Batch"
@ -83,6 +84,7 @@
v-model="dataForm.numDet" v-model="dataForm.numDet"
clearable clearable
:min="0" :min="0"
style="width:100%"
placeholder="请输入数量" /> placeholder="请输入数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-11-03 16:37:06 * @Date: 2023-11-03 16:37:06
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-04 16:14:09 * @LastEditTime: 2023-11-23 15:54:14
* @Description: * @Description:
--> -->
<template> <template>
@ -67,7 +67,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width="50%"> width="40%">
<add-or-update <add-or-update
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update> @refreshDataList="successSubmit"></add-or-update>
@ -131,15 +131,18 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{ {
type: this.$auth.hasPermi('out-material:warehouse-realtime:create') ? 'button' : '', type: this.$auth.hasPermi('out-material:warehouse-realtime:create') ? 'button' : '',
btnName: '入库', btnName: '入库',
name: 'add', name: 'add',
color: 'success', color: 'primary',
plain: true, plain: true,
}, },
], ],

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-11-03 14:51:33 * @LastEditTime: 2023-11-23 16:07:43
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,48 +25,41 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150,
}, },
{ {
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
{ {
prop: 'leftTime', prop: 'leftTime',
label: '剩余留存时长(天)', label: '剩余留存时长(天)',
align: 'center', width: 150,
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -1,15 +1,13 @@
<template> <template>
<el-dialog <el-dialog
:visible.sync="visible" :visible.sync="visible"
:width="'35%'" :width="'30%'"
:append-to-body="true" :append-to-body="true"
:close-on-click-modal="false" :close-on-click-modal="false"
class="dialog"> class="dialog">
<template #title> <template #title>
<slot name="title"> <slot name="title">
<div class="titleStyle"> <div class="titleStyle">新增产品</div>
新增产品
</div>
</slot> </slot>
</template> </template>
@ -22,14 +20,14 @@
<el-form-item label="产品" prop="productInfo"> <el-form-item label="产品" prop="productInfo">
<el-select <el-select
v-model="dataForm.productInfo" v-model="dataForm.productInfo"
style="width: 100%" style="width: 60%"
filterable filterable
value-key="id" 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"
:disabled="!item.enabled" :disabled="!item.enabled"
:label="item.name" :label="item.name"
:value="item" /> :value="item" />
</el-select> </el-select>
@ -44,10 +42,7 @@
</template> </template>
<script> <script>
import { getListByType } from '@/api/warehouse/warehouseGoods';
import {
getListByType
} from "@/api/warehouse/warehouseGoods";
export default { export default {
data() { data() {
@ -59,7 +54,9 @@ export default {
}, },
productArr: [], productArr: [],
dataRule: { dataRule: {
productId: [{ required: true, message: '产品不能为空', trigger: 'blur' }], productId: [
{ required: true, message: '产品不能为空', trigger: 'blur' },
],
}, },
}; };
}, },
@ -79,9 +76,9 @@ export default {
// //
dataFormSubmit() { dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (this.dataForm.productInfo) {
this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id;
this.dataForm.productInfo.remark = '' this.dataForm.productInfo.remark = '';
// //
if (this.dataForm.index >= 0) { if (this.dataForm.index >= 0) {
this.visible = false; this.visible = false;
@ -91,6 +88,8 @@ export default {
// //
this.visible = false; this.visible = false;
this.$emit('refreshDataList', this.dataForm); this.$emit('refreshDataList', this.dataForm);
} else {
this.$modal.msgWarning('请选择产品');
} }
}); });
}, },

View File

@ -20,9 +20,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="库位名称" prop="name"> <el-form-item label="库位名称" prop="name">
<el-input <el-input v-model="dataForm.name" disabled />
v-model="dataForm.name"
disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -47,15 +45,20 @@
</small-title> </small-title>
<div class="attr-list"> <div class="attr-list">
<div style="position: absolute; top: -40px; right: 15px">
<el-button @click="addNew" type="text">
<i class="el-icon-plus"></i>
新增
</el-button>
</div>
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:add-button-show="addButtonShow"
@emitButtonClick="addNew"
@emitFun="inputChange" @emitFun="inputChange"
:height="400" :height="400"
:table-data="productAttributeList"> :table-data="productAttributeList"
v-if="productAttributeList.length">
<method-btn <method-btn
slot="handleBtn" slot="handleBtn"
:width="70" :width="70"
@ -63,6 +66,8 @@
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</div> </div>
</div> </div>
</div> </div>
@ -85,8 +90,10 @@
import productAttrAdd from './attr-add'; import productAttrAdd from './attr-add';
import inputArea from '../../mixins/inputArea'; import inputArea from '../../mixins/inputArea';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import { inWarehouseRealtimeLocation, import {
getWarehouseRealtimeLocation } from '@/api/warehouse/warehouseRealtimeLocation'; inWarehouseRealtimeLocation,
getWarehouseRealtimeLocation,
} from '@/api/warehouse/warehouseRealtimeLocation';
const tableBtn = [ const tableBtn = [
{ {
@ -99,36 +106,30 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
@ -143,8 +144,7 @@ export default {
tableBtn, tableBtn,
tableProps, tableProps,
productAttributeList: [], productAttributeList: [],
addButtonShow: '新增', operator: '',
operator: '',
dataForm: { dataForm: {
id: null, id: null,
name: '', name: '',
@ -170,8 +170,8 @@ export default {
initData() { initData() {
this.productAttributeList.splice(0); this.productAttributeList.splice(0);
}, },
init(val,nickname) { init(val, nickname) {
this.operator = nickname this.operator = nickname;
this.dataForm.id = val.id; this.dataForm.id = val.id;
this.dataForm.name = val.name; this.dataForm.name = val.name;
this.dataForm.palletCode = val.palletCode; this.dataForm.palletCode = val.palletCode;
@ -213,12 +213,8 @@ export default {
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.$confirm( this.$confirm(
`确定对${ `是否确认删除名称为"${raw.data.name}"的数据项?`,
raw.data.name '系统提示',
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{ {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -238,12 +234,12 @@ export default {
this.productAttributeList.forEach((item) => { this.productAttributeList.forEach((item) => {
item.id = ''; item.id = '';
}); });
const data = { const data = {
realtimeLocationId : this.dataForm.id, realtimeLocationId: this.dataForm.id,
palletCode : this.dataForm.palletCode, palletCode: this.dataForm.palletCode,
operator : this.operator, operator: this.operator,
goodsInfos: this.productAttributeList goodsInfos: this.productAttributeList,
} };
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// //
@ -313,5 +309,6 @@ export default {
.drawer >>> .el-form, .drawer >>> .el-form,
.drawer >>> .attr-list { .drawer >>> .attr-list {
padding: 0 16px; padding: 0 16px;
position: relative;
} }
</style> </style>

View File

@ -100,7 +100,7 @@ const tableProps = [
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
@ -125,12 +125,6 @@ export default {
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`out-material:warehouse-realtime-location:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi(`out-material:warehouse-realtime-location:query`) this.$auth.hasPermi(`out-material:warehouse-realtime-location:query`)
? { ? {
type: 'out', type: 'out',
@ -143,6 +137,12 @@ export default {
btnName: '入库', btnName: '入库',
} }
: undefined, : undefined,
this.$auth.hasPermi(`out-material:warehouse-realtime-location:query`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
].filter((v) => v), ].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
@ -183,7 +183,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -262,7 +262,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.drawerRef.init(val.data, this.nickname); this.$refs.drawerRef.init(val.data, this.nickname);
}); });
} else if (val.type === 'info') { } else if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:54:49 * @LastEditTime: 2023-11-23 15:27:37
* @Description: * @Description:
--> -->
<template> <template>
@ -12,7 +12,8 @@
ref="dataForm" ref="dataForm"
v-if="visible" v-if="visible"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="100px"> label-width="100px"
label-position="top">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="物品名称" prop="name"> <el-form-item label="物品名称" prop="name">
@ -60,6 +61,7 @@
:min="0" :min="0"
v-model="dataForm.dailyUse" v-model="dataForm.dailyUse"
clearable clearable
style="width: 100%;"
placeholder="请输入单日消耗量" /> placeholder="请输入单日消耗量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -69,6 +71,7 @@
:min="0" :min="0"
v-model="dataForm.allowTime" v-model="dataForm.allowTime"
clearable clearable
style="width: 90%;"
placeholder="请输入允许留存时间" /> () placeholder="请输入允许留存时间" /> ()
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -75,6 +75,7 @@ const tableProps = [
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
width: 150
}, },
{ {
prop: 'dailyUse', prop: 'dailyUse',
@ -127,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

View File

@ -14,13 +14,6 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData"> :table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="100"
label="库位详情"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table> </base-table>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
@ -76,7 +69,7 @@ const tableProps = [
prop: 'operateTime', prop: 'operateTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'operator', prop: 'operator',
@ -96,14 +89,6 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [
this.$auth.hasPermi(`pack-material:warehouse-realtime-location-his:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -143,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

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-11-03 16:20:19 * @LastEditTime: 2023-11-23 16:09:30
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,37 +25,31 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'batchCode', prop: 'batchCode',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -92,7 +92,7 @@ const tableProps = [
prop: 'createTime', prop: 'createTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'creator', prop: 'creator',
@ -115,7 +115,7 @@ export default {
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`pack-material:warehouse-location-his:query`) this.$auth.hasPermi(`pack-material:warehouse-location-his:query`)
? { ? {
type: 'info', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
@ -159,7 +159,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -205,7 +205,7 @@ export default {
} }
}, },
otherMethods(val) { otherMethods(val) {
if (val.type === 'info') { if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:13:37 * @LastEditTime: 2023-11-23 15:53:47
* @Description: * @Description:
--> -->
<template> <template>
@ -68,6 +68,7 @@
v-model="dataForm.goodsBatch" v-model="dataForm.goodsBatch"
filterable filterable
clearable clearable
style="width:100%"
placeholder="请选择物品名称"> placeholder="请选择物品名称">
<el-option <el-option
v-for="(item, index) in Batch" v-for="(item, index) in Batch"
@ -83,6 +84,7 @@
v-model="dataForm.numDet" v-model="dataForm.numDet"
clearable clearable
:min="0" :min="0"
style="width:100%"
placeholder="请输入数量" /> placeholder="请输入数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-11-03 16:37:06 * @Date: 2023-11-03 16:37:06
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-04 16:01:58 * @LastEditTime: 2023-11-23 15:53:54
* @Description: * @Description:
--> -->
<template> <template>
@ -67,7 +67,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width="50%"> width="40%">
<add-or-update <add-or-update
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update> @refreshDataList="successSubmit"></add-or-update>
@ -131,15 +131,18 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{ {
type: this.$auth.hasPermi('pack-material:warehouse-realtime:create') ? 'button' : '', type: this.$auth.hasPermi('pack-material:warehouse-realtime:create') ? 'button' : '',
btnName: '入库', btnName: '入库',
name: 'add', name: 'add',
color: 'success', color: 'primary',
plain: true, plain: true,
}, },
], ],

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-11-03 14:51:33 * @LastEditTime: 2023-11-23 16:08:22
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,48 +25,41 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
{ {
prop: 'leftTime', prop: 'leftTime',
label: '剩余留存时长(天)', label: '剩余留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
:visible.sync="visible" :visible.sync="visible"
:width="'35%'" :width="'30%'"
:append-to-body="true" :append-to-body="true"
:close-on-click-modal="false" :close-on-click-modal="false"
class="dialog"> class="dialog">
@ -22,7 +22,7 @@
<el-form-item label="产品" prop="productInfo"> <el-form-item label="产品" prop="productInfo">
<el-select <el-select
v-model="dataForm.productInfo" v-model="dataForm.productInfo"
style="width: 100%" style="width: 60%"
filterable filterable
value-key="id" value-key="id"
placeholder="请选择产品"> placeholder="请选择产品">
@ -59,7 +59,7 @@ export default {
}, },
productArr: [], productArr: [],
dataRule: { dataRule: {
productId: [{ required: true, message: '产品不能为空', trigger: 'blur' }], productId: [{ required: true, message: '产品不能为空', trigger: 'change' }],
}, },
}; };
}, },
@ -79,7 +79,7 @@ export default {
// //
dataFormSubmit() { dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (this.dataForm.productInfo) {
this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id
this.dataForm.productInfo.remark = '' this.dataForm.productInfo.remark = ''
// //
@ -91,6 +91,8 @@ export default {
// //
this.visible = false; this.visible = false;
this.$emit('refreshDataList', this.dataForm); this.$emit('refreshDataList', this.dataForm);
} else {
this.$modal.msgWarning('请选择产品');
} }
}); });
}, },

View File

@ -20,9 +20,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="库位名称" prop="name"> <el-form-item label="库位名称" prop="name">
<el-input <el-input v-model="dataForm.name" disabled />
v-model="dataForm.name"
disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -47,15 +45,20 @@
</small-title> </small-title>
<div class="attr-list"> <div class="attr-list">
<div style="position: absolute; top: -40px; right: 15px">
<el-button @click="addNew" type="text">
<i class="el-icon-plus"></i>
新增
</el-button>
</div>
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:add-button-show="addButtonShow"
@emitButtonClick="addNew"
@emitFun="inputChange" @emitFun="inputChange"
:height="400" :height="400"
:table-data="productAttributeList"> :table-data="productAttributeList"
v-if="productAttributeList.length">
<method-btn <method-btn
slot="handleBtn" slot="handleBtn"
:width="70" :width="70"
@ -63,6 +66,8 @@
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</div> </div>
</div> </div>
</div> </div>
@ -85,8 +90,10 @@
import productAttrAdd from './attr-add'; import productAttrAdd from './attr-add';
import inputArea from '../../mixins/inputArea'; import inputArea from '../../mixins/inputArea';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import { inWarehouseRealtimeLocation, import {
getWarehouseRealtimeLocation } from '@/api/warehouse/warehouseRealtimeLocation'; inWarehouseRealtimeLocation,
getWarehouseRealtimeLocation,
} from '@/api/warehouse/warehouseRealtimeLocation';
const tableBtn = [ const tableBtn = [
{ {
@ -99,36 +106,30 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
@ -143,8 +144,7 @@ export default {
tableBtn, tableBtn,
tableProps, tableProps,
productAttributeList: [], productAttributeList: [],
addButtonShow: '新增', operator: '',
operator: '',
dataForm: { dataForm: {
id: null, id: null,
name: '', name: '',
@ -170,8 +170,8 @@ export default {
initData() { initData() {
this.productAttributeList.splice(0); this.productAttributeList.splice(0);
}, },
init(val,nickname) { init(val, nickname) {
this.operator = nickname this.operator = nickname;
this.dataForm.id = val.id; this.dataForm.id = val.id;
this.dataForm.name = val.name; this.dataForm.name = val.name;
this.dataForm.palletCode = val.palletCode; this.dataForm.palletCode = val.palletCode;
@ -213,12 +213,8 @@ export default {
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.$confirm( this.$confirm(
`确定对${ `是否确认删除名称为"${raw.data.name}"的数据项?`,
raw.data.name '系统提示',
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{ {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -238,12 +234,12 @@ export default {
this.productAttributeList.forEach((item) => { this.productAttributeList.forEach((item) => {
item.id = ''; item.id = '';
}); });
const data = { const data = {
realtimeLocationId : this.dataForm.id, realtimeLocationId: this.dataForm.id,
palletCode : this.dataForm.palletCode, palletCode: this.dataForm.palletCode,
operator : this.operator, operator: this.operator,
goodsInfos: this.productAttributeList goodsInfos: this.productAttributeList,
} };
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// //
@ -313,5 +309,6 @@ export default {
.drawer >>> .el-form, .drawer >>> .el-form,
.drawer >>> .attr-list { .drawer >>> .attr-list {
padding: 0 16px; padding: 0 16px;
position: relative;
} }
</style> </style>

View File

@ -100,7 +100,7 @@ const tableProps = [
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
@ -125,12 +125,6 @@ export default {
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`pack-material:warehouse-realtime-location:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi(`pack-material:warehouse-realtime-location:query`) this.$auth.hasPermi(`pack-material:warehouse-realtime-location:query`)
? { ? {
type: 'out', type: 'out',
@ -143,6 +137,12 @@ export default {
btnName: '入库', btnName: '入库',
} }
: undefined, : undefined,
this.$auth.hasPermi(`pack-material:warehouse-realtime-location:query`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
].filter((v) => v), ].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
@ -183,7 +183,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -262,7 +262,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.drawerRef.init(val.data, this.nickname); this.$refs.drawerRef.init(val.data, this.nickname);
}); });
} else if (val.type === 'info') { } else if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:54:59 * @LastEditTime: 2023-11-23 15:27:28
* @Description: * @Description:
--> -->
<template> <template>
@ -12,7 +12,8 @@
ref="dataForm" ref="dataForm"
v-if="visible" v-if="visible"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="100px"> label-width="100px"
label-position="top">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="物品名称" prop="name"> <el-form-item label="物品名称" prop="name">
@ -60,6 +61,7 @@
:min="0" :min="0"
v-model="dataForm.dailyUse" v-model="dataForm.dailyUse"
clearable clearable
style="width: 100%;"
placeholder="请输入单日消耗量" /> placeholder="请输入单日消耗量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -69,6 +71,7 @@
:min="0" :min="0"
v-model="dataForm.allowTime" v-model="dataForm.allowTime"
clearable clearable
style="width: 90%;"
placeholder="请输入允许留存时间" /> () placeholder="请输入允许留存时间" /> ()
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -75,6 +75,7 @@ const tableProps = [
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
width: 150
}, },
{ {
prop: 'dailyUse', prop: 'dailyUse',
@ -127,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

View File

@ -14,13 +14,6 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData"> :table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="100"
label="库位详情"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table> </base-table>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
@ -76,7 +69,7 @@ const tableProps = [
prop: 'operateTime', prop: 'operateTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'operator', prop: 'operator',
@ -96,14 +89,6 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [
this.$auth.hasPermi(`part-material:warehouse-realtime-location-his:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -143,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

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-11-03 16:20:19 * @LastEditTime: 2023-11-23 16:09:38
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,37 +25,31 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'batchCode', prop: 'batchCode',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -92,7 +92,7 @@ const tableProps = [
prop: 'createTime', prop: 'createTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'creator', prop: 'creator',
@ -115,7 +115,7 @@ export default {
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`part-material:warehouse-location-his:query`) this.$auth.hasPermi(`part-material:warehouse-location-his:query`)
? { ? {
type: 'info', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
@ -159,7 +159,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -205,7 +205,7 @@ export default {
} }
}, },
otherMethods(val) { otherMethods(val) {
if (val.type === 'info') { if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:12:43 * @LastEditTime: 2023-11-23 15:53:35
* @Description: * @Description:
--> -->
<template> <template>
@ -68,6 +68,7 @@
v-model="dataForm.goodsBatch" v-model="dataForm.goodsBatch"
filterable filterable
clearable clearable
style="width:100%"
placeholder="请选择物品名称"> placeholder="请选择物品名称">
<el-option <el-option
v-for="(item, index) in Batch" v-for="(item, index) in Batch"
@ -83,6 +84,7 @@
v-model="dataForm.numDet" v-model="dataForm.numDet"
clearable clearable
:min="0" :min="0"
style="width:100%"
placeholder="请输入数量" /> placeholder="请输入数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-11-03 16:37:06 * @Date: 2023-11-03 16:37:06
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-04 16:24:57 * @LastEditTime: 2023-11-23 15:53:28
* @Description: * @Description:
--> -->
<template> <template>
@ -67,7 +67,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width="50%"> width="40%">
<add-or-update <add-or-update
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update> @refreshDataList="successSubmit"></add-or-update>
@ -131,15 +131,18 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{ {
type: this.$auth.hasPermi('part-material:warehouse-realtime:create') ? 'button' : '', type: this.$auth.hasPermi('part-material:warehouse-realtime:create') ? 'button' : '',
btnName: '入库', btnName: '入库',
name: 'add', name: 'add',
color: 'success', color: 'primary',
plain: true, plain: true,
}, },
], ],

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-11-03 14:51:33 * @LastEditTime: 2023-11-23 16:08:31
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,48 +25,41 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
{ {
prop: 'leftTime', prop: 'leftTime',
label: '剩余留存时长(天)', label: '剩余留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
:visible.sync="visible" :visible.sync="visible"
:width="'35%'" :width="'30%'"
:append-to-body="true" :append-to-body="true"
:close-on-click-modal="false" :close-on-click-modal="false"
class="dialog"> class="dialog">
@ -22,7 +22,7 @@
<el-form-item label="产品" prop="productInfo"> <el-form-item label="产品" prop="productInfo">
<el-select <el-select
v-model="dataForm.productInfo" v-model="dataForm.productInfo"
style="width: 100%" style="width: 60%"
filterable filterable
value-key="id" value-key="id"
placeholder="请选择产品"> placeholder="请选择产品">
@ -79,7 +79,7 @@ export default {
// //
dataFormSubmit() { dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (this.dataForm.productInfo) {
this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id
this.dataForm.productInfo.remark = '' this.dataForm.productInfo.remark = ''
// //
@ -91,6 +91,8 @@ export default {
// //
this.visible = false; this.visible = false;
this.$emit('refreshDataList', this.dataForm); this.$emit('refreshDataList', this.dataForm);
} else {
this.$modal.msgWarning('请选择产品');
} }
}); });
}, },

View File

@ -20,9 +20,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="库位名称" prop="name"> <el-form-item label="库位名称" prop="name">
<el-input <el-input v-model="dataForm.name" disabled />
v-model="dataForm.name"
disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -47,15 +45,20 @@
</small-title> </small-title>
<div class="attr-list"> <div class="attr-list">
<div style="position: absolute; top: -40px; right: 15px">
<el-button @click="addNew" type="text">
<i class="el-icon-plus"></i>
新增
</el-button>
</div>
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:add-button-show="addButtonShow"
@emitButtonClick="addNew"
@emitFun="inputChange" @emitFun="inputChange"
:height="400" :height="400"
:table-data="productAttributeList"> :table-data="productAttributeList"
v-if="productAttributeList.length">
<method-btn <method-btn
slot="handleBtn" slot="handleBtn"
:width="70" :width="70"
@ -63,6 +66,8 @@
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</div> </div>
</div> </div>
</div> </div>
@ -85,8 +90,10 @@
import productAttrAdd from './attr-add'; import productAttrAdd from './attr-add';
import inputArea from '../../mixins/inputArea'; import inputArea from '../../mixins/inputArea';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import { inWarehouseRealtimeLocation, import {
getWarehouseRealtimeLocation } from '@/api/warehouse/warehouseRealtimeLocation'; inWarehouseRealtimeLocation,
getWarehouseRealtimeLocation,
} from '@/api/warehouse/warehouseRealtimeLocation';
const tableBtn = [ const tableBtn = [
{ {
@ -99,36 +106,30 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
@ -143,8 +144,7 @@ export default {
tableBtn, tableBtn,
tableProps, tableProps,
productAttributeList: [], productAttributeList: [],
addButtonShow: '新增', operator: '',
operator: '',
dataForm: { dataForm: {
id: null, id: null,
name: '', name: '',
@ -170,8 +170,8 @@ export default {
initData() { initData() {
this.productAttributeList.splice(0); this.productAttributeList.splice(0);
}, },
init(val,nickname) { init(val, nickname) {
this.operator = nickname this.operator = nickname;
this.dataForm.id = val.id; this.dataForm.id = val.id;
this.dataForm.name = val.name; this.dataForm.name = val.name;
this.dataForm.palletCode = val.palletCode; this.dataForm.palletCode = val.palletCode;
@ -213,12 +213,8 @@ export default {
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.$confirm( this.$confirm(
`确定对${ `是否确认删除名称为"${raw.data.name}"的数据项?`,
raw.data.name '系统提示',
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{ {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -238,12 +234,12 @@ export default {
this.productAttributeList.forEach((item) => { this.productAttributeList.forEach((item) => {
item.id = ''; item.id = '';
}); });
const data = { const data = {
realtimeLocationId : this.dataForm.id, realtimeLocationId: this.dataForm.id,
palletCode : this.dataForm.palletCode, palletCode: this.dataForm.palletCode,
operator : this.operator, operator: this.operator,
goodsInfos: this.productAttributeList goodsInfos: this.productAttributeList,
} };
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// //
@ -313,5 +309,6 @@ export default {
.drawer >>> .el-form, .drawer >>> .el-form,
.drawer >>> .attr-list { .drawer >>> .attr-list {
padding: 0 16px; padding: 0 16px;
position: relative;
} }
</style> </style>

View File

@ -100,7 +100,7 @@ const tableProps = [
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
@ -125,12 +125,6 @@ export default {
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`part-material:warehouse-realtime-location:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi(`part-material:warehouse-realtime-location:query`) this.$auth.hasPermi(`part-material:warehouse-realtime-location:query`)
? { ? {
type: 'out', type: 'out',
@ -143,6 +137,12 @@ export default {
btnName: '入库', btnName: '入库',
} }
: undefined, : undefined,
this.$auth.hasPermi(`part-material:warehouse-realtime-location:query`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
].filter((v) => v), ].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
@ -183,7 +183,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -262,7 +262,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.drawerRef.init(val.data, this.nickname); this.$refs.drawerRef.init(val.data, this.nickname);
}); });
} else if (val.type === 'info') { } else if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:54:15 * @LastEditTime: 2023-11-23 15:25:57
* @Description: * @Description:
--> -->
<template> <template>
@ -12,7 +12,8 @@
ref="dataForm" ref="dataForm"
v-if="visible" v-if="visible"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="100px"> label-width="100px"
label-position="top">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="物品名称" prop="name"> <el-form-item label="物品名称" prop="name">
@ -58,6 +59,7 @@
<el-form-item label="单日消耗量" prop="dailyUse"> <el-form-item label="单日消耗量" prop="dailyUse">
<el-input-number <el-input-number
:min="0" :min="0"
style="width: 100%;"
v-model="dataForm.dailyUse" v-model="dataForm.dailyUse"
clearable clearable
placeholder="请输入单日消耗量" /> placeholder="请输入单日消耗量" />
@ -67,6 +69,7 @@
<el-form-item label="允许留存时间" prop="allowTime"> <el-form-item label="允许留存时间" prop="allowTime">
<el-input-number <el-input-number
:min="0" :min="0"
style="width: 90%;"
v-model="dataForm.allowTime" v-model="dataForm.allowTime"
clearable clearable
placeholder="请输入允许留存时间" /> () placeholder="请输入允许留存时间" /> ()

View File

@ -35,7 +35,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width="50%"> width="40%">
<add-or-update <add-or-update
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update> @refreshDataList="successSubmit"></add-or-update>
@ -75,6 +75,7 @@ const tableProps = [
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
width: 150
}, },
{ {
prop: 'dailyUse', prop: 'dailyUse',
@ -127,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

View File

@ -14,13 +14,6 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData"> :table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="100"
label="库位详情"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table> </base-table>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
@ -76,7 +69,7 @@ const tableProps = [
prop: 'operateTime', prop: 'operateTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'operator', prop: 'operator',
@ -96,14 +89,6 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [
this.$auth.hasPermi(`raw-material:warehouse-realtime-location-his:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -143,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

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-11-03 16:20:19 * @LastEditTime: 2023-11-23 16:09:47
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,37 +25,31 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'batchCode', prop: 'batchCode',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -92,7 +92,7 @@ const tableProps = [
prop: 'createTime', prop: 'createTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'creator', prop: 'creator',
@ -115,7 +115,7 @@ export default {
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`raw-material:warehouse-location-his:query`) this.$auth.hasPermi(`raw-material:warehouse-location-his:query`)
? { ? {
type: 'info', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
@ -159,7 +159,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -205,7 +205,7 @@ export default {
} }
}, },
otherMethods(val) { otherMethods(val) {
if (val.type === 'info') { if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:12:13 * @LastEditTime: 2023-11-23 15:52:41
* @Description: * @Description:
--> -->
<template> <template>
@ -68,6 +68,7 @@
v-model="dataForm.goodsBatch" v-model="dataForm.goodsBatch"
filterable filterable
clearable clearable
style="width:100%"
placeholder="请选择物品名称"> placeholder="请选择物品名称">
<el-option <el-option
v-for="(item, index) in Batch" v-for="(item, index) in Batch"
@ -82,6 +83,7 @@
<el-input-number <el-input-number
v-model="dataForm.numDet" v-model="dataForm.numDet"
clearable clearable
style="width:100%"
:min="0" :min="0"
placeholder="请输入数量" /> placeholder="请输入数量" />
<!-- :max="max?max:9999999" --> <!-- :max="max?max:9999999" -->

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-11-03 16:37:06 * @Date: 2023-11-03 16:37:06
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-04 14:13:47 * @LastEditTime: 2023-11-23 15:52:53
* @Description: * @Description:
--> -->
<template> <template>
@ -67,7 +67,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width="50%"> width="40%">
<add-or-update <add-or-update
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update> @refreshDataList="successSubmit"></add-or-update>
@ -131,15 +131,18 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{ {
type: this.$auth.hasPermi('raw-material:warehouse-realtime:create') ? 'button' : '', type: this.$auth.hasPermi('raw-material:warehouse-realtime:create') ? 'button' : '',
btnName: '入库', btnName: '入库',
name: 'add', name: 'add',
color: 'success', color: 'primary',
plain: true, plain: true,
}, },
], ],

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-11-03 14:51:33 * @LastEditTime: 2023-11-23 16:08:41
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,48 +25,41 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
{ {
prop: 'leftTime', prop: 'leftTime',
label: '剩余留存时长(天)', label: '剩余留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
:visible.sync="visible" :visible.sync="visible"
:width="'35%'" :width="'30%'"
:append-to-body="true" :append-to-body="true"
:close-on-click-modal="false" :close-on-click-modal="false"
class="dialog"> class="dialog">
@ -22,7 +22,7 @@
<el-form-item label="产品" prop="productInfo"> <el-form-item label="产品" prop="productInfo">
<el-select <el-select
v-model="dataForm.productInfo" v-model="dataForm.productInfo"
style="width: 100%" style="width: 60%"
filterable filterable
value-key="id" value-key="id"
placeholder="请选择产品"> placeholder="请选择产品">
@ -79,7 +79,7 @@ export default {
// //
dataFormSubmit() { dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (this.dataForm.productInfo) {
this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id
this.dataForm.productInfo.remark = '' this.dataForm.productInfo.remark = ''
// //
@ -91,6 +91,8 @@ export default {
// //
this.visible = false; this.visible = false;
this.$emit('refreshDataList', this.dataForm); this.$emit('refreshDataList', this.dataForm);
} else {
this.$modal.msgWarning('请选择产品');
} }
}); });
}, },

View File

@ -20,9 +20,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="库位名称" prop="name"> <el-form-item label="库位名称" prop="name">
<el-input <el-input v-model="dataForm.name" disabled />
v-model="dataForm.name"
disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -47,15 +45,20 @@
</small-title> </small-title>
<div class="attr-list"> <div class="attr-list">
<div style="position: absolute; top: -40px; right: 15px">
<el-button @click="addNew" type="text">
<i class="el-icon-plus"></i>
新增
</el-button>
</div>
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:add-button-show="addButtonShow"
@emitButtonClick="addNew"
@emitFun="inputChange" @emitFun="inputChange"
:height="400" :height="400"
:table-data="productAttributeList"> :table-data="productAttributeList"
v-if="productAttributeList.length">
<method-btn <method-btn
slot="handleBtn" slot="handleBtn"
:width="70" :width="70"
@ -63,6 +66,8 @@
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</div> </div>
</div> </div>
</div> </div>
@ -85,8 +90,10 @@
import productAttrAdd from './attr-add'; import productAttrAdd from './attr-add';
import inputArea from '../../mixins/inputArea'; import inputArea from '../../mixins/inputArea';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import { inWarehouseRealtimeLocation, import {
getWarehouseRealtimeLocation } from '@/api/warehouse/warehouseRealtimeLocation'; inWarehouseRealtimeLocation,
getWarehouseRealtimeLocation,
} from '@/api/warehouse/warehouseRealtimeLocation';
const tableBtn = [ const tableBtn = [
{ {
@ -99,36 +106,30 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
@ -143,8 +144,7 @@ export default {
tableBtn, tableBtn,
tableProps, tableProps,
productAttributeList: [], productAttributeList: [],
addButtonShow: '新增', operator: '',
operator: '',
dataForm: { dataForm: {
id: null, id: null,
name: '', name: '',
@ -170,8 +170,8 @@ export default {
initData() { initData() {
this.productAttributeList.splice(0); this.productAttributeList.splice(0);
}, },
init(val,nickname) { init(val, nickname) {
this.operator = nickname this.operator = nickname;
this.dataForm.id = val.id; this.dataForm.id = val.id;
this.dataForm.name = val.name; this.dataForm.name = val.name;
this.dataForm.palletCode = val.palletCode; this.dataForm.palletCode = val.palletCode;
@ -213,12 +213,8 @@ export default {
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.$confirm( this.$confirm(
`确定对${ `是否确认删除名称为"${raw.data.name}"的数据项?`,
raw.data.name '系统提示',
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{ {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -238,12 +234,12 @@ export default {
this.productAttributeList.forEach((item) => { this.productAttributeList.forEach((item) => {
item.id = ''; item.id = '';
}); });
const data = { const data = {
realtimeLocationId : this.dataForm.id, realtimeLocationId: this.dataForm.id,
palletCode : this.dataForm.palletCode, palletCode: this.dataForm.palletCode,
operator : this.operator, operator: this.operator,
goodsInfos: this.productAttributeList goodsInfos: this.productAttributeList,
} };
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// //
@ -313,5 +309,6 @@ export default {
.drawer >>> .el-form, .drawer >>> .el-form,
.drawer >>> .attr-list { .drawer >>> .attr-list {
padding: 0 16px; padding: 0 16px;
position: relative;
} }
</style> </style>

View File

@ -100,7 +100,7 @@ const tableProps = [
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
@ -125,12 +125,6 @@ export default {
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`raw-material:warehouse-realtime-location:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi(`raw-material:warehouse-realtime-location:query`) this.$auth.hasPermi(`raw-material:warehouse-realtime-location:query`)
? { ? {
type: 'out', type: 'out',
@ -143,6 +137,12 @@ export default {
btnName: '入库', btnName: '入库',
} }
: undefined, : undefined,
this.$auth.hasPermi(`raw-material:warehouse-realtime-location:query`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
].filter((v) => v), ].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
@ -183,7 +183,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -262,7 +262,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.drawerRef.init(val.data, this.nickname); this.$refs.drawerRef.init(val.data, this.nickname);
}); });
} else if (val.type === 'info') { } else if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-02 16:13:31 * @LastEditTime: 2023-11-23 15:14:37
* @Description: * @Description:
--> -->
<template> <template>
@ -12,9 +12,10 @@
ref="dataForm" ref="dataForm"
v-if="visible" v-if="visible"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="90px"> label-width="90px"
label-position="top">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="8">
<el-form-item label="仓库编码" prop="warehouseCode"> <el-form-item label="仓库编码" prop="warehouseCode">
<el-input <el-input
v-model="dataForm.warehouseCode" v-model="dataForm.warehouseCode"
@ -22,7 +23,7 @@
placeholder="请输入仓库编码" /> placeholder="请输入仓库编码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="8">
<el-form-item label="仓库名称" prop="warehouseName"> <el-form-item label="仓库名称" prop="warehouseName">
<el-input <el-input
v-model="dataForm.warehouseName" v-model="dataForm.warehouseName"
@ -30,7 +31,7 @@
placeholder="请输入仓库名称" /> placeholder="请输入仓库名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="8">
<el-form-item label="库位编码" prop="code"> <el-form-item label="库位编码" prop="code">
<el-input <el-input
v-model="dataForm.code" v-model="dataForm.code"
@ -38,7 +39,7 @@
placeholder="请输入库位编码" /> placeholder="请输入库位编码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="8">
<el-form-item label="库位名称" prop="name"> <el-form-item label="库位名称" prop="name">
<el-input <el-input
v-model="dataForm.name" v-model="dataForm.name"
@ -70,6 +71,7 @@
v-model="dataForm.type" v-model="dataForm.type"
filterable filterable
clearable clearable
style="width: 100%;"
placeholder="请选择库位类型"> placeholder="请选择库位类型">
<el-option <el-option
v-for="item in urlOptions.dictList.dict0" v-for="item in urlOptions.dictList.dict0"
@ -85,6 +87,7 @@
v-model="dataForm.enabled" v-model="dataForm.enabled"
filterable filterable
clearable clearable
style="width: 100%;"
placeholder="请选择是否可用"> placeholder="请选择是否可用">
<el-option <el-option
v-for="item in isorno" v-for="item in isorno"

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-02 15:45:53 * @LastEditTime: 2023-11-23 15:20:31
* @Description: * @Description:
--> -->
<template> <template>
@ -13,47 +13,61 @@
v-if="visible" v-if="visible"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="90px"> label-width="90px">
<el-form-item label="仓库编码" prop="code"> <el-row :gutter="20">
<el-input <el-col :span="isdetail?24:12">
v-model="dataForm.code" <el-form-item label="仓库编码" prop="code">
clearable <el-input
:disabled="isdetail" v-model="dataForm.code"
placeholder="请输入仓库编码" /> clearable
</el-form-item> :disabled="isdetail"
<el-form-item label="仓库名称" prop="name"> :style="{width: isdetail?'70%':'100%',}"
<el-input placeholder="请输入仓库编码" />
v-model="dataForm.name" </el-form-item>
clearable </el-col>
:disabled="isdetail" <el-col :span="isdetail?24:12">
placeholder="请输入仓库名称" /> <el-form-item label="仓库名称" prop="name">
</el-form-item> <el-input
<el-form-item prop="type" label="仓库类型"> v-model="dataForm.name"
<el-select clearable
v-model="dataForm.type" :disabled="isdetail"
:disabled="isdetail" :style="{width: isdetail?'70%':'100%',}"
filterable placeholder="请输入仓库名称" />
clearable </el-form-item>
placeholder="请选择仓库类型"> </el-col>
<el-option <el-col :span="isdetail?24:12">
v-for="item in urlOptions.dictList.dict0" <el-form-item prop="type" label="仓库类型">
:key="item.id" <el-select
:label="item.label" v-model="dataForm.type"
:value="parseInt(item.value)"></el-option> :disabled="isdetail"
</el-select> filterable
</el-form-item> clearable
<el-form-item prop="storageType" v-if="!isdetail" label="物料类型"> :style="{width: isdetail?'70%':'100%',}"
<el-select placeholder="请选择仓库类型">
v-model="dataForm.storageType" <el-option
filterable v-for="item in urlOptions.dictList.dict0"
clearable :key="item.id"
placeholder="请选择物料类型"> :label="item.label"
<el-option :value="parseInt(item.value)"></el-option>
v-for="item in urlOptions.dictList.dict1" </el-select>
:key="item.id" </el-form-item>
:label="item.label" </el-col>
:value="parseInt(item.value)"></el-option> <el-col :span="isdetail?24:12">
</el-select> <el-form-item prop="storageType" v-if="!isdetail" label="物料类型">
</el-form-item> <el-select
v-model="dataForm.storageType"
filterable
clearable
style="width: 100%;"
placeholder="请选择物料类型">
<el-option
v-for="item in urlOptions.dictList.dict1"
:key="item.id"
:label="item.label"
:value="parseInt(item.value)"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
</template> </template>

View File

@ -84,7 +84,7 @@
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
:destroy-on-close="true" :destroy-on-close="true"
width="50%"> width="40%">
<add-or-update <add-or-update
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update> @refreshDataList="successSubmit"></add-or-update>
@ -123,6 +123,7 @@ const tableProps = [
{ {
prop: 'code', prop: 'code',
label: '库位编码', label: '库位编码',
width: 180
}, },
{ {
prop: 'name', prop: 'name',
@ -131,24 +132,29 @@ const tableProps = [
{ {
prop: 'arrange', prop: 'arrange',
label: '排', label: '排',
width: 50
}, },
{ {
prop: 'col', prop: 'col',
label: '列', label: '列',
width: 50
}, },
{ {
prop: 'layer', prop: 'layer',
label: '层', label: '层',
width: 50
}, },
{ {
prop: 'type', prop: 'type',
label: '库位类型', label: '库位类型',
filter: codeFilter('wareType'), filter: codeFilter('wareType'),
width: 80
}, },
{ {
prop: 'enabled', prop: 'enabled',
label: '是否可用', label: '是否可用',
filter: codeFilter('deactivate'), filter: codeFilter('deactivate'),
width: 80
}, },
{ {
prop: 'remark', prop: 'remark',
@ -197,7 +203,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },