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

乐心调整

parent 9e9b6ebe
......@@ -158,7 +158,7 @@
prop: 'gzzt',
span: 6,
type: "RelSelect",
value: "",
value: "F",
typeConfig: {
src: "lxyl/common/init/gzzt",
match: {
......
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
<BasePage :handleSourceData='handleSourceData' fePage ref="basePage" :power='power' class="min_full" style="height: 100%;" :config="config"> ref="basePage" :power='power' class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
<BasePage :changeQueryParams='changeQueryParams' :handleSourceData='handleSourceData' fePage ref="basePage" :power='power' class="min_full"
style="height: 100%;" :config="config"> ref="basePage" :power='power' class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
</div>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
<div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer">
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</div>
</DefaultDialog>
</template>
<script>
export default {
props: {
app: {
type: Object,
default: ()=>{
return {}
}
default: () => {
return {}
}
}
},
async mounted() {
......@@ -40,22 +39,22 @@
data() {
return {
power: {
add: false,
copy: false,
delButton: false,
editButton: false,
operateButtons: false,
workFlow: false,
/* 表格 */
showSelection: true,
saveSelected: true
},
config: {
/* 基本配置*/
url: 'wms/kcgl/kcpd/query/kwmx',
queryUrl:'wms/kcgl/kcpd/query/kwmx',
tableTitle: [{
power: {
add: false,
copy: false,
delButton: false,
editButton: false,
operateButtons: false,
workFlow: false,
/* 表格 */
showSelection: true,
saveSelected: true
},
config: {
/* 基本配置*/
url: 'wms/kcgl/kcpd/query/kwmx',
queryUrl: 'wms/kcgl/kcpd/query/kwmx',
tableTitle: [{
title: "库位",
field: "kwCode",
width: 100,
......@@ -97,7 +96,11 @@
field: "wlph",
width: 140,
},
{title: "库存数量", field: "kcsl",fieldType:'float'},
{
title: "库存数量",
field: "kcsl",
fieldType: 'float'
},
{
title: "库位名称",
field: "wlxxName",
......@@ -122,91 +125,113 @@
},
],
queryParams: [
[{
label: '盘点日期',
prop: 'pdrq',
span: 6,
type: 'date',
value: ''
},
{
"label": "仓库",
"prop": "ckid",
"span": 6,
"type": "RelSelect",
"value": this.app.form.ckid,
"typeConfig": {
"src": "lxyl/jcsj/uck/ck/queryCjckid",
"match": {
"value": "id",
"label": "name"
}
}
},
{
label: '批号',
prop: 'wlph',
span: 6,
type: 'input',
value: ''
},
// {
// "label": "含0库存",
// "prop": "zero",
// "span": 6,
// "type": "RelSelect",
// "value": "N",
// "typeConfig": {
// optionsData:[{
// id:'N',
// name:'不包含0库存'
// },
// {
// id:'Y',
// name:'包含0库存'
// }],
// "match": {
// "value": "id",
// "label": "name"
// }
// }
// }
]
],
/* 默认启停用 */
showqt: false,
],
queryParams: [
[{
label: '盘点日期',
prop: 'pdrq',
span: 8,
type: 'date',
value: ''
},
{
"label": "仓库",
"prop": "ckid",
"span": 8,
"type": "RelSelect",
"value": this.app.form.ckid,
"typeConfig": {
"src": "lxyl/jcsj/uck/ck/queryCjckid",
"match": {
"value": "id",
"label": "name"
}
}
},
{
label: '批号',
prop: 'wlph',
span: 8,
type: 'input',
value: ''
},
// {
// "label": "含0库存",
// "prop": "zero",
// "span": 6,
// "type": "RelSelect",
// "value": "N",
// "typeConfig": {
// optionsData:[{
// id:'N',
// name:'不包含0库存'
// },
// {
// id:'Y',
// name:'包含0库存'
// }],
// "match": {
// "value": "id",
// "label": "name"
// }
// }
// }
],
[{
label: '物料信息',
prop: 'wlxxInfos',
span: 24,
type: 'input',
value: ''
}]
],
/* 默认启停用 */
showqt: false,
}
}
}
},
methods: {
handleSourceData(list) {
list.forEach((item, index) => {
item.id = index
})
},
save(){
let list=this.$refs.basePage.$refs.TablePager.selectedList||[]
if(list.length==0){
changeQueryParams(queryParams){
let str=queryParams.wlxxInfos
let trimmedStr = str.replace(/\s/g, ''); // 使用正则表达式去除空格
trimmedStr=trimmedStr.replace(/,/s, ',')
let arr = trimmedStr.split(",");
queryParams.wlxxInfos=arr
},
handleSourceData(list) {
list.forEach((item, index) => {
item.id = index
})
},
save() {
let list = this.$refs.basePage.$refs.TablePager.selectedList || []
if (list.length == 0) {
this.$warning('请至少勾选一条数据')
}else{
let obj={
list:list
} else {
let obj = {
list: list
}
/* 判定仓库 ckid是否存在不同*/
let ckid= list.map(item => item.ckid)
ckid = [...new Set(ckid)]
if (ckid.length > 1) {
this.$warning('所选项仓库不唯一,请选择相同仓库的数据。')
return
}
/* 判定list wlid是否重复*/
let hzid = list.map(item => item.hzid)
hzid = [...new Set(hzid)]
if (hzid.length > 1) {
this.$warning('所选项工厂不唯一,请选择相同工厂的数据。')
} else {
this.$emit('save', obj)
this.app.showDialog = false
}
/* 判定list wlid是否重复*/
let hzid=list.map(item=>item.hzid)
hzid=[...new Set(hzid)]
if(hzid.length>1){
this.$warning('所选项工厂不唯一,请选择相同工厂的数据。')
}else{
this.$emit('save',obj)
this.app.showDialog=false
}
}
}
......
......@@ -155,7 +155,7 @@
prop: 'gzzt',
span: 6,
type: "RelSelect",
value: "",
value: "F",
typeConfig: {
src: "lxyl/common/init/gzzt",
match: {
......
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