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

包装调整Ⅲ

parent e8e71ee7
<template> <template>
<DefaultDialog :app='app'> <DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;"> <div slot="form" style="display: flex;">
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false "
v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label"
:prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</div> </div>
<div slot="reFooter" class="refooter" > <div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer" > <span slot="footer" class="dialog-footer">
<el-button @click="app.showDialog=false">取 消</el-button> <el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button> <el-button type="primary" @click="save()">保 存</el-button>
</span> </span>
...@@ -11,29 +18,134 @@ ...@@ -11,29 +18,134 @@
</DefaultDialog> </DefaultDialog>
</template> </template>
<script> <script>
import {
editMixin
} from 'common'
export default { export default {
mixins: [editMixin],
props: { props: {
app: { app: {
type: Object, type: Object,
default: ()=>{ default: () => {
return {} return {}
} }
} }
}, },
async mounted() { async mounted() {
const {
id
} = _.cloneDeep(this.app.singleItem)
this.$post('wms/kcgl/bzdj/query/detail', {
mid: id
}).then(res => {
let source = _.cloneDeep(res.data.records[0])
source.packmxid = source.id
delete source.id
this.form = source
})
}, },
data() { data() {
return { return {
readonly: false,
editColItemList: [{
label: '唯一码',
prop: 'packCode',
span: 12,
type: 'input',
readonly: true
},
{
label: '物料编码',
prop: 'wlxxCode',
span: 12,
type: 'input',
readonly: true
},
{
label: '物料规格',
prop: 'wlxxGg',
span: 12,
type: 'input',
readonly: true
},
{
label: '制令号',
prop: 'zlh',
span: 12,
type: 'input',
readonly: true
},
{
label: '批号',
prop: 'wlph',
span: 12,
type: 'input',
readonly: true
},
{
label: '货主',
prop: 'hzName',
span: 12,
type: 'input',
readonly: true
},
{
label: '装包数量',
prop: 'zbsl',
span: 12,
type: 'inputNumber',
readonly: true
},
{
label: '拆分数量',
prop: 'cfsl',
span: 12,
type: 'inputNumber',
required: true,
value: 0
},
]
} }
}, },
methods: { methods: {
save() {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.cfsl > this.form.zbsl) {
this.$warning('拆分数量不能大于装包数量')
} else {
let params = {
packid: this.app.singleItem.packid,
"djly": "M",
"datas": [this.form].map(item => {
let nitem = {}
nitem.wlid = item.wlid
nitem.wlph = item.wlph
nitem.zlh = item.zlh
nitem.zbsl = item.zbsl
nitem.cfsl = item.cfsl
nitem.hzid = item.hzid
nitem.packmxid = item.packmxid
return nitem
})
}
this.$post('wms/kcgl/bzdj/split', params).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.showDialog = false
this.app.refresh()
}
})
}
}
})
}
} }
} }
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
<template #dialog="ctx"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<zb :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='装包'" /> <zb :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='装包'" />
<cb :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='拆包'" /> <cb :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='调整'" />
</template> </template>
<template #toolbar="ctx"> <template #toolbar="ctx">
<el-button @click="zb(ctx.basePage)" size='mini' type="primary">装包</el-button> <el-button @click="zb(ctx.basePage)" size='mini' type="primary">装包</el-button>
<el-button @click="cb(ctx.basePage)" size='mini' type="primary">拆包</el-button> <el-button @click="cb(ctx.basePage)" size='mini' type="primary">调整</el-button>
</template> </template>
</BasePage> </BasePage>
...@@ -152,9 +152,14 @@ ...@@ -152,9 +152,14 @@
ctx.showDialog=true ctx.showDialog=true
}, },
cb(ctx){ cb(ctx){
if(ctx.singleItem&&ctx.singleItem.id){
ctx.DialogWidth='50vw' ctx.DialogWidth='50vw'
ctx.DialogTitle='拆包' ctx.DialogTitle='调整'
ctx.showDialog=true ctx.showDialog=true
}else{
this.$warning('请选择一条数据操作')
}
}, },
}, },
components: { components: {
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
}, },
data() { data() {
return { return {
source:{},
readonly:false, readonly:false,
editColItemList: [ editColItemList: [
{ {
......
<template> <template>
<div class="app-container home"> <div class="min_full">
<el-skeleton animated style="width: 100%"> <!-- <iframe src="https://web.wetab.link/" class="full" ></iframe> -->
<template slot="template"> <iframe src=" https://chat12.aichatos.xyz/" class="full" ></iframe>
<span style="line-height: 45px;color: #d9d9d9;font-weight: 700;">
{{version}} LOADING...
</span>
<el-skeleton :rows="15" />
</template>
</el-skeleton>
</div> </div>
</template> </template>
<script>
import {
getRouters
} from '@/api/menu'
import {
menus
} from '@/assets/menu'
export default {
name: "Index",
mounted() {
}, <script>
export default {
data() { data() {
return { return {
// 版本号
version: "3.8.3",
};
},
methods: {
},
};
</script>
<style scoped lang="scss">
.home {
blockquote {
padding: 10px 20px;
margin: 0 0 20px;
font-size: 17.5px;
border-left: 5px solid #eee;
}
hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid #eee;
}
.col-item {
margin-bottom: 20px;
}
ul {
padding: 0;
margin: 0;
}
font-family: "open sans",
"Helvetica Neue",
Helvetica,
Arial,
sans-serif;
font-size: 13px;
color: #676a6c;
overflow-x: hidden;
ul {
list-style-type: none;
}
h4 {
margin-top: 0px;
} }
},
methods: {
h2 {
margin-top: 10px;
font-size: 26px;
font-weight: 100;
} }
}
</script>
p { <style scoped>
margin-top: 10px;
b {
font-weight: 700;
}
}
.update-log {
ol {
display: block;
list-style-type: decimal;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0;
margin-inline-end: 0;
padding-inline-start: 40px;
}
}
}
</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