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

乐心调整

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