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

选择拣货人

parent 72e6be7a
......@@ -46,30 +46,20 @@
},
data() {
return {
$datas:null,
showDialog:false,
DialogTitle:'选择拣货人',
DialogWidth:'30vw',
DialogWidth:'64vw',
row:{},
activeName: 'first'
}
},
methods: {
finSave(form){
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)
})
})
finSave(datas){
let params={
cktzid:this.$refs.rkqd.$refs.basePage.queryParams.mid,
datas:datas,
jhrid:form.jhrid
}
this.$post('/lxyl/rkgl/jhtz/addUJhtz',params).then(res=>{
if(res.success){
......@@ -87,7 +77,14 @@
this.$warning('请先选择明细')
return
}
let datas=[]
keyList.forEach(key=>{
map[key].forEach(item=>{
item.fpsl=item.jhsl
datas.push(item)
})
})
this.$datas=datas
this.showDialog=true
},
getRow(val) {
......
<template>
<DefaultDialog :app='app'>
<div slot="form" style="">
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this" class="editRow">
<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 slot="form" style="height: 50vh;">
<EditTable ref="editTable1" :app='editTableConfig'>
</EditTable>
</div>
<div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer">
......@@ -20,10 +13,12 @@
</DefaultDialog>
</template>
<script>
let that;
import {
editMixin,
editMixin_expand
} from 'common'
export default {
mixins: [editMixin, editMixin_expand],
props: {
......@@ -36,50 +31,84 @@
},
async mounted() {
/* 初始化数据 */
that = this
console.log(that, 'that')
},
data() {
return {
readonly: false,
editColItemList: [
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',
span: 24,
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
}
}
},
"required": true,
{
label: '库存数量',
prop: 'kcsl',
width: 130,
},
// {
// label: '退货单号',
// prop: 'ddh',
// span: 24,
// type: 'input',
// value: '',
// }
]
],
editTableData:_.cloneDeep(this.app.$datas)
},
}
},
methods: {
save() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.app.showDialog = false
// this.app.DialogWidth='80vw'
this.$emit('save',this.form)
}
})
this.$emit('save', that.editTableConfig.editTableData)
}
}
......@@ -87,8 +116,7 @@
</script>
<style scoped>
::v-deep .el-icon-close{
::v-deep .el-icon-close {
/* display: none; */
}
</style>
......@@ -146,6 +146,21 @@
width: 130,
},
{
label: '库存数量',
prop: 'kcsl',
width: 130,
},
{
label: '物料组',
prop: 'wlzName',
width: 130,
},
{
label: '拣货人',
prop: 'jhrName',
width: 130,
},
{
label: '库存数量',
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