Commit e3bcf861 authored by 李苏's avatar 李苏 💬

忽略bac 明细改单表

parent 689fd114
.DS_Store
node_modules/
dist/
_bac/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
......
<template>
<div class="outer">
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
<el-tabs class="full" v-model="activeName" >
<el-tab-pane class="full" label="明细" name="first">
<Mx ref="mx" class="full" />
</el-tab-pane>
</el-tabs>
<BasePage ref="basePage" :power='power' class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<el-button v-if="ctx.basePage.powerObj['21']" @click="doConfirm(ctx.basePage)" size='mini' type="primary">解锁</el-button>
</template>
</div>
</div>
</div>
</div>
</BasePage>
</template>
<script>
import Top from './top/index.vue'
import Mx from './mx.vue'
import Edit from './edit.vue'
export default {
components: {
Top,
Mx,
data() {
return {
config: {
queryDetail: true,
/* 基本配置*/
url: 'lxyl/zlgl/uLothold',
tableTitle: [{
title: "单据编号",
field: "djid",
width: 140
},
{
title: "业务日期",
field: "ywrq",
fieldType: 'ftDate'
},
{
title: "SAP变更类型",
field: "bglx",
width: 140
},
{
title: "锁定状态",
field: "zt",
width: 100,
"transform": {
"url": "lxyl/zlgl/uLothold/init/zt",
"label": "name",
"value": "id"
}
},
{
title: "锁定说明",
field: "sdsm",
width: 200
},
{
title: "备注",
field: "bz",
},
{
title: "维护人",
field: "whr",
width: 140
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime'
},
],
queryParams: [
[
{
label: '物料',
prop: 'wlxxInfo',
span: 5,
type: 'input',
value: ''
},
{
label: '批号',
prop: 'wlph',
span: 5,
type: 'input',
value: ''
},
{
label: '业务日期',
startProp: "start",
endProp: "end",
span: 8,
type: 'RelDaterangeV2',
startValue: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
endValue: new Date().getTime(),
},
{
"label": "状态",
"prop": "zt",
"span": 6,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src":"lxyl/zlgl/uLothold/init/zt",
"match": {
"value": "id",
"label": "name"
}
}
},
},
data(){
return{
activeName:'first'
]
],
/* 默认启停用 */
}
}
},
methods: {
topGetRow(row) {
/* dom赋值*/
let mid = row.id
this.$refs.mx.$refs.basePage.queryParams.mid = mid
this.$refs.mx.$refs.basePage.$refs['TablePager'].pageQuery({
setFirstCurrent: true
})
doConfirm(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
this.$confirm('是否确认?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
this.$post('lxyl/zlgl/uLothold/releaseHold', {
id: ctx.singleItem.id
}).then(res => {
if (res.success) {
ctx.refresh()
}
})
})
} else {
this.$warning('请选中一条数据')
}
},
}
}
</script>
<style lang="scss" scoped>
.outer {
overflow: auto;
height: calc(100vh - 84px);
width: 100%;
.top {
width: 100%;
height: 45%;
}
.bottom {
width: 100%;
height: 55%;
.left {
width: 50%;
height: 100%;
}
.right {
width: 50%;
height: 100%;
getRow(val) {
this.$emit('getRow', val)
}
},
components: {
Edit
}
}
.higher {
height: 140vh;
}
</script>
.flex-column {
display: flex;
flex-direction: column;
}
::v-deep .el-tabs__content{
height: calc(100% - 40px);
}
::v-deep .el-tabs__nav-scroll{
padding-left: 10px;
}
<style>
</style>
<template>
<BasePage @getRow='getRow' ref="basePage" :power='power' :toolButton='false' class="min_full" style="height: 100%;" :autoQuery='false'
:config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
</template>
</BasePage>
</template>
<script>
export default {
data() {
return {
power: {
add: false,
copy: false,
/* 手动控制删除 */
delButton: false,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: false,
saveSelected: false
},
config: {
/* 基本配置*/
url: 'lxyl/zlgl/uLothold/query/detail',
queryUrl: 'lxyl/zlgl/uLothold/query/detail',
tableTitle: [{
title: "物料编码",
field: "wlxxCode",
fieldType: "upper",
width: 140
},
{
title: "物料名称",
field: "wlxxName",
width: 140
},
{
title: "物料规格",
field: "wlxxGg",
width: 140
},
{
title: "物料批号",
field: "wlph",
width: 140
},
// {
// title: "入库数量",
// field: "rksl",
// width: 100,
// },
{
title: "制令号",
field: "zlh",
width: 180,
},
{
title: "唯一码",
field: "packCode",
width: 120,
},
{
title: "容器",
field: "rqCode",
width: 120,
},
{
title: "工厂",
field: "hzName",
width: 120,
}
],
queryParams: [],
}
}
},
methods: {
getRow(val){
this.$emit('getRow',val)
},
demo(ctx){
if(ctx.singleItem&&ctx.singleItem.id){
console.log(ctx.singleItem)
}else{
this.$warning('请选中一条数据')
}
}
},
components: {
}
}
</script>
<style>
</style>
<template>
<BasePage @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<el-button v-if="ctx.basePage.powerObj['21']" @click="doConfirm(ctx.basePage)" size='mini' type="primary">解锁</el-button>
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
data() {
return {
config: {
queryDetail: true,
/* 基本配置*/
url: 'lxyl/zlgl/uLothold',
tableTitle: [{
title: "单据编号",
field: "djid",
width: 140
},
{
title: "业务日期",
field: "ywrq",
fieldType: 'ftDate'
},
{
title: "SAP变更类型",
field: "bglx",
width: 140
},
{
title: "锁定状态",
field: "zt",
width: 100,
"transform": {
"url": "lxyl/zlgl/uLothold/init/zt",
"label": "name",
"value": "id"
}
},
{
title: "锁定说明",
field: "sdsm",
width: 200
},
{
title: "备注",
field: "bz",
},
{
title: "维护人",
field: "whr",
width: 140
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime'
},
],
queryParams: [
[
{
label: '物料',
prop: 'wlxxInfo',
span: 5,
type: 'input',
value: ''
},
{
label: '批号',
prop: 'wlph',
span: 5,
type: 'input',
value: ''
},
{
label: '业务日期',
startProp: "start",
endProp: "end",
span: 8,
type: 'RelDaterangeV2',
startValue: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
endValue: new Date().getTime(),
},
{
"label": "状态",
"prop": "zt",
"span": 6,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src":"lxyl/zlgl/uLothold/init/zt",
"match": {
"value": "id",
"label": "name"
}
}
},
]
],
/* 默认启停用 */
}
}
},
methods: {
doConfirm(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
this.$confirm('是否确认?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
this.$post('lxyl/zlgl/uLothold/releaseHold', {
id: ctx.singleItem.id
}).then(res => {
if (res.success) {
ctx.refresh()
}
})
})
} else {
this.$warning('请选中一条数据')
}
},
getRow(val) {
this.$emit('getRow', val)
}
},
components: {
Edit
}
}
</script>
<style>
</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