Commit 628a9b85 authored by 李苏's avatar 李苏 💬

选择拣货人

parent 72e6be7a
...@@ -46,30 +46,20 @@ ...@@ -46,30 +46,20 @@
}, },
data() { data() {
return { return {
$datas:null,
showDialog:false, showDialog:false,
DialogTitle:'选择拣货人', DialogTitle:'选择拣货人',
DialogWidth:'30vw', DialogWidth:'64vw',
row:{}, row:{},
activeName: 'first' activeName: 'first'
} }
}, },
methods: { methods: {
finSave(form){ finSave(datas){
let map=this.$refs.rkqd.detailList
let keyList= Object.keys(map)
let datas=[]
keyList.forEach(key=>{
map[key].forEach(item=>{
item.fpsl=item.jhsl
// delete item.id
datas.push(item)
})
})
let params={ let params={
cktzid:this.$refs.rkqd.$refs.basePage.queryParams.mid, cktzid:this.$refs.rkqd.$refs.basePage.queryParams.mid,
datas:datas, datas:datas,
jhrid:form.jhrid
} }
this.$post('/lxyl/rkgl/jhtz/addUJhtz',params).then(res=>{ this.$post('/lxyl/rkgl/jhtz/addUJhtz',params).then(res=>{
if(res.success){ if(res.success){
...@@ -87,7 +77,14 @@ ...@@ -87,7 +77,14 @@
this.$warning('请先选择明细') this.$warning('请先选择明细')
return return
} }
let datas=[]
keyList.forEach(key=>{
map[key].forEach(item=>{
item.fpsl=item.jhsl
datas.push(item)
})
})
this.$datas=datas
this.showDialog=true this.showDialog=true
}, },
getRow(val) { getRow(val) {
......
<template> <template>
<DefaultDialog :app='app'> <DefaultDialog :app='app'>
<div slot="form" style=""> <div slot="form" style="height: 50vh;">
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules"> <EditTable ref="editTable1" :app='editTableConfig'>
<el-row :gutter="20" :app="this" class="editRow"> </EditTable>
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false "
v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label"
:prop='item.prop' :key="item.prop" :type="item.type"
:typeConfig='item.typeConfig' :rule="item.rule" />
<!-- 额外数据 -->
</el-row>
</el-form>
</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>
let that;
import { import {
editMixin, editMixin,
editMixin_expand editMixin_expand
} from 'common' } from 'common'
export default { export default {
mixins: [editMixin, editMixin_expand], mixins: [editMixin, editMixin_expand],
props: { props: {
...@@ -36,50 +31,84 @@ ...@@ -36,50 +31,84 @@
}, },
async mounted() { async mounted() {
/* 初始化数据 */ /* 初始化数据 */
that = this
console.log(that, 'that')
}, },
data() { data() {
return { return {
editTableConfig: {
editTableTitle: [{
label: '仓库',
prop: 'ckName',
width: 180,
},
{
label: '物料',
prop: 'wlxxName',
width: 130,
},
// {
// label: '唯一码',
// prop: 'packCode',
// width: 130,
// },
{
label: '库存数量',
prop: 'kcsl',
width: 130,
},
{
label: '物料组',
prop: 'wlzName',
width: 130,
},
{
label: '拣货人',
prop: 'jhrid',
width: 130,
type: 'AuxInput',
typeConfig: {
isRequest: false,
code: 'USER',
label: 'jhrName',
transform: {
value: 'id',
label: 'username'
},
give() {
/* v2在批量渲染复杂组件,虽然通过forEach来对数组进行了特殊处理,延迟后进行渲染,明显是响应式
但是由于diff进行一些奇怪的性能增强,导致这些dom刷新排到了下个队列
所以为了符合预期直接改变list的地址让vue2认为这是重新的渲染而不用错误的优化导致展示延迟
*/
let list =_.cloneDeep(that.editTableConfig.editTableData)
list.forEach(item => {
if (item.wlid == this.form.wlid && item.ckid == this.form.ckid) {
item.jhrName = this.form.jhrName
item.jhrid = this.form.jhrid
}
})
that.editTableConfig.editTableData=list
readonly: false,
editColItemList: [
{ }
label: '拣货人', }
prop: 'jhrid', },
span: 24, {
type: 'AuxInput', label: '库存数量',
typeConfig: { prop: 'kcsl',
code: 'USER', width: 130,
label: 'jhrName', },
transform: { ],
value: 'id', editTableData:_.cloneDeep(this.app.$datas)
label: 'username'
}
}, },
"required": true,
},
// {
// label: '退货单号',
// prop: 'ddh',
// span: 24,
// type: 'input',
// value: '',
// }
]
} }
}, },
methods: { methods: {
save() { save() {
this.$refs['form'].validate((valid) => { this.app.showDialog = false
if (valid) { this.$emit('save', that.editTableConfig.editTableData)
this.app.showDialog = false
// this.app.DialogWidth='80vw'
this.$emit('save',this.form)
}
})
} }
} }
...@@ -87,8 +116,7 @@ ...@@ -87,8 +116,7 @@
</script> </script>
<style scoped> <style scoped>
::v-deep .el-icon-close{ ::v-deep .el-icon-close {
/* display: none; */ /* display: none; */
} }
</style> </style>
...@@ -146,6 +146,21 @@ ...@@ -146,6 +146,21 @@
width: 130, width: 130,
}, },
{
label: '库存数量',
prop: 'kcsl',
width: 130,
},
{
label: '物料组',
prop: 'wlzName',
width: 130,
},
{
label: '拣货人',
prop: 'jhrName',
width: 130,
},
{ {
label: '库存数量', label: '库存数量',
prop: 'kcsl', prop: 'kcsl',
......
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