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"
style="height: 100%;" :config="config"> ref="basePage" :power='power' class="min_full" :config="config">
<template #dialog="ctx"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template> </template>
...@@ -12,8 +13,8 @@ ...@@ -12,8 +13,8 @@
</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>
...@@ -21,14 +22,12 @@ ...@@ -21,14 +22,12 @@
</DefaultDialog> </DefaultDialog>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
app: { app: {
type: Object, type: Object,
default: ()=>{ default: () => {
return {} return {}
} }
} }
...@@ -54,7 +53,7 @@ ...@@ -54,7 +53,7 @@
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",
...@@ -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",
...@@ -127,14 +130,14 @@ ...@@ -127,14 +130,14 @@
[{ [{
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": {
...@@ -148,10 +151,11 @@ ...@@ -148,10 +151,11 @@
{ {
label: '批号', label: '批号',
prop: 'wlph', prop: 'wlph',
span: 6, span: 8,
type: 'input', type: 'input',
value: '' value: ''
}, },
// { // {
// "label": "含0库存", // "label": "含0库存",
// "prop": "zero", // "prop": "zero",
...@@ -174,7 +178,14 @@ ...@@ -174,7 +178,14 @@
// } // }
// } // }
] ],
[{
label: '物料信息',
prop: 'wlxxInfos',
span: 24,
type: 'input',
value: ''
}]
], ],
/* 默认启停用 */ /* 默认启停用 */
showqt: false, showqt: false,
...@@ -185,27 +196,41 @@ ...@@ -185,27 +196,41 @@
} }
}, },
methods: { 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) { handleSourceData(list) {
list.forEach((item, index) => { list.forEach((item, index) => {
item.id = index item.id = index
}) })
}, },
save(){ save() {
let list=this.$refs.basePage.$refs.TablePager.selectedList||[] let list = this.$refs.basePage.$refs.TablePager.selectedList || []
if(list.length==0){ 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是否重复*/ /* 判定list wlid是否重复*/
let hzid=list.map(item=>item.hzid) let hzid = list.map(item => item.hzid)
hzid=[...new Set(hzid)] hzid = [...new Set(hzid)]
if(hzid.length>1){ if (hzid.length > 1) {
this.$warning('所选项工厂不唯一,请选择相同工厂的数据。') this.$warning('所选项工厂不唯一,请选择相同工厂的数据。')
}else{ } else {
this.$emit('save',obj) this.$emit('save', obj)
this.app.showDialog=false 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