Commit 0a4927d3 authored by 李苏's avatar 李苏 💬

调整

parent 8f68344f
......@@ -107,7 +107,7 @@
<b class="data-title-right">]</b>
</div>
<div class="kwMain full ">
<component @eclick='eclick' ref="dynamic" class="full" :is="dynamicComponent">
<component :app='this' @eclick='eclick' ref="dynamic" class="full" :is="dynamicComponent">
</component>
</div>
......@@ -149,8 +149,24 @@
export default {
mounted() {
this.$post('wms/jcsj/kw/init/zt').then(res=>{
if(res.data.records){
let list =res.data.records
list.forEach(item=>{
this.ztMap[item.id]=item.name
})
console.log(this.ztMap)
}
})
this.$post('wms/jcsj/kw/init/kczt').then(res=>{
if(res.data.records){
let list =res.data.records
list.forEach(item=>{
this.ccztMap[item.id]=item.name
})
console.log(this.ccztMap)
}
})
/* 测试时间*/
this.newTime = this.$moment(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
this.timer = setInterval(() => {
......@@ -170,6 +186,12 @@
},
data() {
return {
cjztMap:{
Y:'是',
N:'否'
},
ccztMap:{},
ztMap:{},
showDialog:false,
DialogTitle:'详情',
DialogWidth:'75vw',
......
......@@ -3,54 +3,69 @@
<div ref="infoBox" class="infoCar">
</div>
<div class="full container">
<div @click='eclick(item)' :code='item.code' :item='JSON.stringify(item)' ref="mx1" v-for="(item,index) in boxList" :key="item.code" class="box" :class="{
<div @click='eclick(item)' :code='item.code' :item='JSON.stringify(item)' ref="mx1"
v-for="(item,index) in boxList" :key="item.code" class="box" :class="{
yh:item.kczt=='U', wh:item.kczt=='E', dj:item.zt=='F', sd:item.zt=='L', kccj:item.cjzt=='Y',sdkccj:item.cjzt=='Y'&&item.zt=='L',sdkccj:item.cjzt=='Y'&&item.zt=='F'
}" >
<!-- {{item.code}} -->
}">
<!-- {{item.code}} -->
</div>
</div>
</div>
</template>
<script>
export default{
mounted(){
this.getBoxList()
export default {
props: {
app: {
type: Object,
default: () => {
return {}
}
}
},
mounted() {
this.getBoxList()
},
data(){
return{
boxList:[]
data() {
return {
boxList: []
}
},
methods:{
eclick(item){
this.$emit('eclick',item)
methods: {
eclick(item) {
this.$emit('eclick', item)
},
getBoxList(){
this.$post('lxyl/cxfx/kw/query',{
hjCode :'HJ1',
kwx:'1'
}).then(res=>{
if(res.data.records){
this.boxList=res.data.records
getBoxList() {
this.$post('lxyl/cxfx/kw/query', {
hjCode: 'HJ1',
kwx: '1'
}).then(res => {
if (res.data.records) {
this.boxList = res.data.records
/* 开始监听dom*/
this.$nextTick(()=>{
var infoBox = this.$refs.infoBox
this.$nextTick(() => {
var infoBox = this.$refs.infoBox
$(this.$refs.mx1).each((index, element) => {
element.addEventListener('mouseover', (event)=>{
let info= this.boxList[index]
element.addEventListener('mouseover', (event) => {
let info = this.boxList[index]
let content =
`
`
<br />
仓库编码:${info.ckCode}
<br />
库区编码:${info.kqCode}
<br />
库位编码:${info.code}
<br />
状态:${this.app.ztMap[info.zt]||'未知' }
<br />
存储状态:${this.app.ccztMap[info.kczt]||'未知'}
<br />
重检状态:${this.app.cjztMap[info.cjzt]||'未知'}
`
$(infoBox).empty()
$(infoBox).append(content)
infoBox.style.top = (event.layerY + 25) + 'px'; // 信息框距离顶部10像素
infoBox.style.left = (event.layerX +25) + 'px'; // 信息框距离左侧10像素
infoBox.style.left = (event.layerX + 25) + 'px'; // 信息框距离左侧10像素
infoBox.style.display = 'block';
});
element.addEventListener('mouseout', function(event) {
......@@ -75,20 +90,25 @@
grid-template-rows: repeat(9, 8%);
gap: 6px;
overflow-y: hidden;
&::-webkit-scrollbar {
height: 10px;
/* background-color: #032d60; */
/* background-color: #032d60; */
}
&::-webkit-scrollbar-thumb {
background: #032d60; /* 滚动条滑块颜色 */
}
background: #032d60;
/* 滚动条滑块颜色 */
}
}
.box {
width: 30px;
height: 30px;
background-color: #4CAF50;
}
.infoCar {
border: 2px solid #032d60;
-webkit-box-shadow: #07417a 0px 0px 10px;
......@@ -104,7 +124,7 @@
right: 10px;
top: 10px;
line-height: 16px;
height: 106px;
height: 145px;
width: 150px
}
</style>
......@@ -74,6 +74,14 @@
return (Array(length).join('0') + num).slice(-length);
}
export default {
props: {
app: {
type: Object,
default: () => {
return {}
}
}
},
beforeDestroy() {
$(this.$refs.mx1).each((index, item) => {
item.removeEventListener('mouseover');
......@@ -159,6 +167,12 @@
库区编码:${info.kqCode}
<br />
库位编码:${info.code}
<br />
状态:${this.app.ztMap[info.zt]||'未知' }
<br />
存储状态:${this.app.ccztMap[info.kczt]||'未知'}
<br />
重检状态:${this.app.cjztMap[info.cjzt]||'未知'}
`
$(infoBox).empty()
$(infoBox).append(content)
......@@ -199,6 +213,12 @@
库区编码:${info.kqCode}
<br />
库位编码:${info.code}
<br />
状态:${this.app.ztMap[info.zt]||'未知' }
<br />
存储状态:${this.app.ccztMap[info.kczt]||'未知'}
<br />
重检状态:${this.app.cjztMap[info.cjzt]||'未知'}
`
$(infoBox).empty()
$(infoBox).append(content)
......@@ -238,6 +258,12 @@
库区编码:${info.kqCode}
<br />
库位编码:${info.code}
<br />
状态:${this.app.ztMap[info.zt]||'未知' }
<br />
存储状态:${this.app.ccztMap[info.kczt]||'未知'}
<br />
重检状态:${this.app.cjztMap[info.cjzt]||'未知'}
`
$(infoBox).empty()
$(infoBox).append(content)
......@@ -277,6 +303,12 @@
库区编码:${info.kqCode}
<br />
库位编码:${info.code}
<br />
状态:${this.app.ztMap[info.zt]||'未知' }
<br />
存储状态:${this.app.ccztMap[info.kczt]||'未知'}
<br />
重检状态:${this.app.cjztMap[info.cjzt]||'未知'}
`
$(infoBox).empty()
$(infoBox).append(content)
......@@ -317,6 +349,12 @@
库区编码:${info.kqCode}
<br />
库位编码:${info.code}
<br />
状态:${this.app.ztMap[info.zt]||'未知' }
<br />
存储状态:${this.app.ccztMap[info.kczt]||'未知'}
<br />
重检状态:${this.app.cjztMap[info.cjzt]||'未知'}
`
$(infoBox).empty()
$(infoBox).append(content)
......@@ -357,6 +395,12 @@
库区编码:${info.kqCode}
<br />
库位编码:${info.code}
<br />
状态:${this.app.ztMap[info.zt]||'未知' }
<br />
存储状态:${this.app.ccztMap[info.kczt]||'未知'}
<br />
重检状态:${this.app.cjztMap[info.cjzt]||'未知'}
`
$(infoBox).empty()
$(infoBox).append(content)
......@@ -397,6 +441,12 @@
库区编码:${info.kqCode}
<br />
库位编码:${info.code}
<br />
状态:${this.app.ztMap[info.zt]||'未知' }
<br />
存储状态:${this.app.ccztMap[info.kczt]||'未知'}
<br />
重检状态:${this.app.cjztMap[info.cjzt]||'未知'}
`
$(infoBox).empty()
$(infoBox).append(content)
......@@ -437,6 +487,12 @@
库区编码:${info.kqCode}
<br />
库位编码:${info.code}
<br />
状态:${this.app.ztMap[info.zt]||'未知' }
<br />
存储状态:${this.app.ccztMap[info.kczt]||'未知'}
<br />
重检状态:${this.app.cjztMap[info.cjzt]||'未知'}
`
$(infoBox).empty()
$(infoBox).append(content)
......@@ -475,8 +531,8 @@
right: 10px;
top: 10px;
line-height: 16px;
height: 106px;
width: 150px
height: 145px;
width: 150px
}
.containerAll {}
.container1 {
......
......@@ -81,7 +81,7 @@
title: "存储状态",
field: "kczt",
"transform": {
"url": "wms/jcsj/kw/init/kczt ",
"url": "wms/jcsj/kw/init/kczt",
"label": "name",
"value": "id"
}
......
<template>
<BasePage :setFirstCurrent='false' :power='power' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">直接入库</el-button> -->
<BasePage :setFirstCurrent='false' :power='power' @getRow='getRow' class="min_full" style="height: 100%;"
:config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">直接入库</el-button> -->
</template>
</template>
</BasePage>
</BasePage>
</template>
<script>
// import Edit from './edit.vue'
export default {
data() {
return {
power:{
add: false,
copy: false,
delButton: false,
editButton: false,
operateButtons: false,
workFlow: false,
/* 表格 */
showSelection: false,
saveSelected: false
// import Edit from './edit.vue'
export default {
data() {
return {
power: {
add: false,
copy: false,
delButton: false,
editButton: false,
operateButtons: false,
workFlow: false,
/* 表格 */
showSelection: false,
saveSelected: false
},
config: {
queryDetail: true,
/* 基本配置*/
url: 'lxyl/zlgl/kccj/queryKccjKchz',
queryUrl:'lxyl/zlgl/kccj/queryKccjKchz',
tableTitle: [
{
title: "仓库编码",
field: "ckCode",
width: 140
},
queryDetail: true,
/* 基本配置*/
url: 'lxyl/zlgl/kccj/queryKccjKchz',
queryUrl: 'lxyl/zlgl/kccj/queryKccjKchz',
tableTitle: [{
title: "仓库编码",
field: "ckCode",
width: 140
},
{
title: "仓库",
field: "ckName",
width: 140
},
{
title: "仓库",
field: "ckName",
width: 140
title: "物料编码",
field: "wlCode",
width: 140
},
{
title: "物料编码",
field: "wlCode",
width: 140
title: "物料名称",
field: "wlName",
width: 140
},
{
title: "物料名称",
field: "wlName",
width: 140
title: "物料批号",
field: "wlph",
width: 140
},
{
title: "物料批号",
field: "wlph",
width: 140
title: "生产日期",
field: "scrq",
fieldType: 'ftDate'
},
{
title: "生产日期",
field: "scrq",
fieldType: 'ftDate'
},
{
title: "过期日期",
field: "gqrq",
fieldType: 'ftDate'
title: "过期日期",
field: "gqrq",
fieldType: 'ftDate'
},
{
title: "检验日期",
field: "jyrq",
fieldType: 'ftDate'
title: "检验日期",
field: "jyrq",
fieldType: 'ftDate'
},
{
title: "物料描述",
field: "wlms",
width: 240
}
],
queryParams: [
[{
label: '日期',
startProp: "begin",
endProp: "end",
span: 8,
type: 'RelDaterangeV2',
startValue: new Date().getTime()-1000*60*60*24*30,
endValue:new Date().getTime(),
},
{
label: '物料批号',
prop: 'wlph',
span: 6,
type: 'input',
value: ''
},
{
title: "物料描述",
field: "wlms",
width: 240
}
],
queryParams: [
[{
label: '检验日期',
startProp: "begin",
endProp: "end",
span: 8,
type: 'RelDaterangeV2',
startValue:'',
endValue: '',
},
{
label: '物料批号',
prop: 'wlph',
span: 6,
type: 'input',
value: ''
},
{
label: '物料编码',
prop: 'wlcode',
span: 6,
type: 'input',
value: ''
label: '物料编码',
prop: 'wlcode',
span: 6,
type: 'input',
value: ''
}
]
],
/* 默认启停用 */
]
],
/* 默认启停用 */
}
}
}
},
methods: {
getRow(val){
this.$emit('getRow',val)
},
methods: {
getRow(val) {
this.$emit('getRow', val)
}
},
components: {
// Edit
}
},
components: {
// Edit
}
}
}
</script>
<style>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment