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

码盘调整

parent 6ffe60e8
...@@ -19,73 +19,31 @@ ...@@ -19,73 +19,31 @@
queryDetail: true, queryDetail: true,
/* 基本配置*/ /* 基本配置*/
url: 'lxyl/kcgl/zlhbg', url: 'lxyl/kcgl/zlhbg',
tableTitle: [ tableTitle: [{
{
title: "变更单号", title: "变更单号",
field: "bgdh",
width: 140
},
{
title: "变更日期",
field: "bgrq",
fieldType: 'ftDate'
},
{
title: "SAP变更类型",
field: "sapbglx",
fieldType: 'ftDate'
},
{
title: "入库单号",
field: "djid", field: "djid",
width: 140 width: 140
}, },
{ {
title: "入库日期", title: "变更日期",
field: "ywrq", field: "ywrq",
fieldType: 'ftDate' fieldType: 'ftDate'
}, },
{ {
title: "入库人", title: "SAP变更类型",
field: "rkr", field: "bglx",
width: 140
},
{
title: "事务类型",
field: "swlxName",
width: 100
},
{
title: "仓库",
field: "ckid",
width: 140,
hidden: true
},
{
title: "仓库",
field: "ckName",
width: 140
},
{
title: "入库部门",
field: "bmName",
width: 140 width: 140
}, },
{ {
title: "单据来源", title: "状态",
field: "djly", field: "zt",
width: 140, width: 100,
"transform": { "transform": {
"url": "wms/rkgl/rktz/init/djly", "url": "lxyl/kcgl/zlhbg/init/zt",
"label": "name", "label": "name",
"value": "id" "value": "id"
} }
}, },
// {
// title: "来源单据号",
// field: "lydjDjid",
// width: 140
// },
{ {
title: "备注", title: "备注",
field: "bz", field: "bz",
...@@ -108,8 +66,8 @@ ...@@ -108,8 +66,8 @@
endProp: "end", endProp: "end",
span: 8, span: 8,
type: 'RelDaterangeV2', type: 'RelDaterangeV2',
startValue: new Date().getTime()-1000*60*60*24*30, startValue: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
endValue:new Date().getTime(), endValue: new Date().getTime(),
}, },
{ {
"label": "仓库", "label": "仓库",
...@@ -126,34 +84,21 @@ ...@@ -126,34 +84,21 @@
} }
}, },
{ {
label: '单据编号', label: '变更单号',
prop: 'djid', prop: 'djid',
span: 6, span: 6,
type: 'input', type: 'input',
value: '' value: ''
}
],[
{
label: '状态',
prop: 'zt',
span: 6,
type: 'RelSelect',
typeConfig: {
src: 'wms/rkgl/rktz/init/zt'
}
}, },
{ {
label: '事务类型', label: '负责人',
prop: 'swlxid', prop: 'fzr',
span: 6, span: 4,
type: 'RelSelect', type: 'input',
typeConfig: { value: ''
src: 'wms/rkgl/rktz/init/swlx'
}
} }
] ]
], ],
/* 默认启停用 */ /* 默认启停用 */
...@@ -162,8 +107,8 @@ ...@@ -162,8 +107,8 @@
}, },
methods: { methods: {
getRow(val){ getRow(val) {
this.$emit('getRow',val) this.$emit('getRow', val)
} }
}, },
components: { components: {
......
...@@ -97,7 +97,6 @@ ...@@ -97,7 +97,6 @@
this.$warning('请选择一条入库单') this.$warning('请选择一条入库单')
} else { } else {
this.showDialog = true this.showDialog = true
console.log(this.form.lydjid)
/* 开启弹框*/ /* 开启弹框*/
} }
}, },
......
...@@ -27,19 +27,21 @@ ...@@ -27,19 +27,21 @@
label:'packCode'}" :match="{ label:'packCode'}" :match="{
label:'packCode', label:'packCode',
value:'packid' value:'packid'
}" code='WMSBZGLMX' :form='form' /> }" :queryParams='{
id:app.app.singleItem.id
}' code='WMSBZGLMXMPZY' :form='form' />
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<!-- --> <!-- -->
</div> </div>
<EditTable staticHeader ref="editTable" :app='editTableConfig' > <EditTable staticHeader ref="editTable" :app='editTableConfig'>
<template slot="tabCustom"> <template slot="tabCustom">
<el-table-column label="操作" width="90" header-align="center" fixed="right" > <el-table-column label="操作" width="90" header-align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button style="text-align: center;color: red;width: 100%;" <el-button style="text-align: center;color: red;width: 100%;" @click.native.prevent="del(scope.$index)"
@click.native.prevent="del(scope.$index)" type="text" size="small"> type="text" size="small">
<i class="el-icon-delete"></i>删除 <i class="el-icon-delete"></i>删除
</el-button> </el-button>
</template> </template>
...@@ -80,9 +82,8 @@ ...@@ -80,9 +82,8 @@
}, },
data() { data() {
return { return {
editTableConfig:{ editTableConfig: {
editTableTitle:[ editTableTitle: [{
{
label: "容器", label: "容器",
prop: "rqCode", prop: "rqCode",
width: 170 width: 170
...@@ -123,13 +124,13 @@ ...@@ -123,13 +124,13 @@
width: 240 width: 240
} }
], ],
editTableData:[] editTableData: []
}, },
form: { form: {
rqid: '', rqid: '',
rqCode: '', rqCode: '',
id:'', id: '',
code:'' code: ''
} }
...@@ -137,76 +138,89 @@ ...@@ -137,76 +138,89 @@
}, },
methods: { methods: {
/* 重新渲染表格 */ /* 重新渲染表格 */
del(index){ del(index) {
this.editTableConfig.editTableData.splice(index,1) this.editTableConfig.editTableData.splice(index, 1)
}, },
save() { save() {
if( if (
this.editTableConfig.editTableData.length>0 this.editTableConfig.editTableData.length > 0
){ ) {
let list =this.editTableConfig.editTableData||[] let list = this.editTableConfig.editTableData || []
list.forEach(item=>item.mpsl=item.sl) list.forEach(item => item.mpsl = item.sl)
this.$emit('save',list) this.$emit('save', list)
this.app.showDialog=false this.app.showDialog = false
/* 触发传递事件*/ /* 触发传递事件*/
}else{ } else {
this.$warning('请添加数据后保存') this.$warning('请添加数据后保存')
} }
}, },
search() { search() {
/* 卡下数据*/ /* 卡下数据*/
if (this.form.packCode&&this.form.rqid) { if (this.form.packCode && this.form.rqid) {
// this.$refs.basePage.queryParams.code = this.form.packCode // this.$refs.basePage.queryParams.code = this.form.packCode
// this.$refs.basePage.refresh() // this.$refs.basePage.refresh()
/* 查询*/ /* 查询*/
let params={ this.$post('wms/rkgl/mpzy/checkRqAndPack', {
code:this.form.packCode id: this.app.app.singleItem.id,
} rqid: this.form.rqid,
this.$post('wms/common/queryPackmxByCode',params).then(res=>{ packid: this.form.packid
if(res.success){ }).then(res => {
let list=res.data.records||[] if (res.success) {
this.$post('wms/common/queryPackmxByCode', params).then(res => {
if (res.success) {
let list = res.data.records || []
/* 判定1*/ /* 判定1*/
if(list.length==0){ if (list.length == 0) {
this.$warning('暂未查询到数据') this.$warning('暂未查询到数据')
}else{ } else {
let newList=list.map(item=>{ let newList = list.map(item => {
item.rqid=this.form.rqid item.rqid = this.form.rqid
item.rqCode=this.form.rqCode item.rqCode = this.form.rqCode
item.lydjid=item.id item.lydjid = item.id
delete item.id delete item.id
return item return item
}) })
/* 判定重复*/ /* 判定重复*/
let iscf=false let iscf = false
let lydjidList=this.editTableConfig.editTableData.map(item=>item.lydjid) let lydjidList = this.editTableConfig.editTableData.map(item => item.lydjid)
newList.forEach(item=>{ newList.forEach(item => {
if(lydjidList.includes(item.lydjid)){ if (lydjidList.includes(item.lydjid)) {
iscf=true iscf = true
}else{ } else {
this.editTableConfig.editTableData.push(_.cloneDeep(item)) this.editTableConfig.editTableData.push(_.cloneDeep(item))
} }
}) })
/* 添加完毕要做的*/ /* 添加完毕要做的*/
if(iscf){ if (iscf) {
this.$warning('存在重复数据,已自动过滤') this.$warning('存在重复数据,已自动过滤')
} }
/* 清除数据*/ /* 清除数据*/
this.form['rqCode']='' this.form['rqCode'] = ''
this.form['rqid']='' this.form['rqid'] = ''
this.form['packid']='' this.form['packid'] = ''
this.form['packCode']='' this.form['packCode'] = ''
this.$forceUpdate() this.$forceUpdate()
} }
} }
}) })
}
})
let params = {
code: this.form.packCode
}
} else { } else {
this.$warning('请选择唯一码和容器') this.$warning('请选择唯一码和容器')
} }
} }
} }
} }
......
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