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">
<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>
......@@ -12,8 +13,8 @@
</BasePage>
</div>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<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>
......@@ -21,14 +22,12 @@
</DefaultDialog>
</template>
<script>
export default {
props: {
app: {
type: Object,
default: ()=>{
default: () => {
return {}
}
}
......@@ -54,7 +53,7 @@
config: {
/* 基本配置*/
url: 'wms/kcgl/kcpd/query/kwmx',
queryUrl:'wms/kcgl/kcpd/query/kwmx',
queryUrl: 'wms/kcgl/kcpd/query/kwmx',
tableTitle: [{
title: "库位",
field: "kwCode",
......@@ -97,7 +96,11 @@
field: "wlph",
width: 140,
},
{title: "库存数量", field: "kcsl",fieldType:'float'},
{
title: "库存数量",
field: "kcsl",
fieldType: 'float'
},
{
title: "库位名称",
field: "wlxxName",
......@@ -127,14 +130,14 @@
[{
label: '盘点日期',
prop: 'pdrq',
span: 6,
span: 8,
type: 'date',
value: ''
},
{
"label": "仓库",
"prop": "ckid",
"span": 6,
"span": 8,
"type": "RelSelect",
"value": this.app.form.ckid,
"typeConfig": {
......@@ -148,10 +151,11 @@
{
label: '批号',
prop: 'wlph',
span: 6,
span: 8,
type: 'input',
value: ''
},
// {
// "label": "含0库存",
// "prop": "zero",
......@@ -174,7 +178,14 @@
// }
// }
]
],
[{
label: '物料信息',
prop: 'wlxxInfos',
span: 24,
type: 'input',
value: ''
}]
],
/* 默认启停用 */
showqt: false,
......@@ -185,27 +196,41 @@
}
},
methods: {
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){
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){
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
} 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