Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lxyl-vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李苏
lxyl-vue
Commits
5f505780
Commit
5f505780
authored
Jun 28, 2024
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
动态展示ck
parent
ddc890e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
140 additions
and
108 deletions
+140
-108
edit.vue
src/views/ccgl/rkgl/slk/top/edit.vue
+140
-108
No files found.
src/views/ccgl/rkgl/slk/top/edit.vue
View file @
5f505780
<
template
>
<RelDialog
ref=
"RelDialog"
bigTitle
@
getForm=
'getForm
'
@
getFormDetail=
'getFormDetail'
width=
"70%"
:type=
'type'
:editApp=
'editApp'
:app=
'app'
:buttonApp=
'buttonApp'
>
<RelDialog
ref=
"RelDialog"
bigTitle
@
getForm=
'getForm'
@
getFormDetail=
'getFormDetail'
width=
"70%"
:type=
'type
'
:editApp=
'editApp'
:app=
'app'
:buttonApp=
'buttonApp'
>
<el-form
slot=
"form"
ref=
"form"
:model=
"form"
label-width=
"100px"
:rules=
"rules"
>
<el-row
:gutter=
"20"
:app=
"this"
class=
"editRow"
>
<el-col
v-show=
'lydjid'
:span=
"8"
>
<el-form-item
label=
"仓库"
>
<RelSelect
clearable
style=
"width: 100%;"
:params=
"
{
flid:'L'
}" :readonly="readonly" src='lxyl/common/ck/queryCkidByRktzid' :match="{value:'id',label:'name'}"
v-model='form.ckid'>
</RelSelect>
</el-form-item>
</el-col>
<el-col
v-show=
'!lydjid'
:span=
"8"
>
<el-form-item
label=
"仓库"
>
<RelSelect
clearable
style=
"width: 100%;"
:params=
"
{
flid:'L'
}" :readonly="readonly" src='lxyl/jcsj/uck/ck/queryCjckid' :match="{value:'id',label:'name'}"
v-model='form.ckid'>
</RelSelect>
</el-form-item>
</el-col>
<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"
/>
...
...
@@ -14,11 +33,9 @@
ref=
"editTableForEdit"
:editTableTitle=
'editTableTitle'
v-if=
"editTableForEdit"
:computedRow=
'computedRow'
:editTableData=
"formDetail"
>
<template
v-if=
"type!='view'"
#
toolbar=
"ctx"
>
<AuxButton
:queryParams=
"
{
<AuxButton
:queryParams=
"
{
rktzid:that.form.lydjid
}"
:dynamic='true' :component='Wym' rename='选择唯一码' code='dynamic' @save="savewym" />
}" :dynamic='true' :component='Wym' rename='选择唯一码' code='dynamic' @save="savewym" />
</
template
>
</editTableForEdit>
</div>
...
...
@@ -54,14 +71,14 @@
mixins
:
[
editMixin
,
editMixin_expand
],
methods
:
{
save
()
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$post
(
'lxyl/rkgl/sjrw/lkrk/save'
,
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$post
(
'lxyl/rkgl/sjrw/lkrk/save'
,
{
...
this
.
form
,
datas
:
this
.
formDetail
}).
then
(
res
=>
{
datas
:
this
.
formDetail
}).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
$success
(
'操作成功'
)
this
.
$refs
.
RelDialog
.
closeAll
()
this
.
app
.
refresh
()
...
...
@@ -82,11 +99,11 @@
/* 选择库存回调 */
savewym
(
list
)
{
debugger
let
packidList
=
this
.
formDetail
.
map
(
pitem
=>
pitem
.
packid
)
let
packidList
=
this
.
formDetail
.
map
(
pitem
=>
pitem
.
packid
)
list
.
forEach
(
item
=>
{
if
(
packidList
.
includes
(
item
.
packid
))
{
if
(
packidList
.
includes
(
item
.
packid
))
{
console
.
log
(
'重复'
)
}
else
{
}
else
{
delete
item
.
id
this
.
formDetail
.
push
(
_
.
cloneDeep
(
item
))
}
...
...
@@ -101,33 +118,50 @@
// this.form.llrName = this.username
// this.form.llrid = this.userid
},
watch
:
{
lydjid
(
val
)
{
if
(
val
)
{
}
else
{
this
.
form
.
ckid
=
''
}
}
},
computed
:
{
lydjid
()
{
return
this
.
form
.
lydjid
}
},
data
()
{
return
{
that
:
this
,
that
:
this
,
Wym
:
Wym
,
form
:
{
ckid
:
''
// djly:'M'
},
/* 常规edit数据 */
editColItemList
:
[{
"label"
:
"仓库"
,
"prop"
:
"ckid"
,
"span"
:
8
,
"type"
:
"RelSelect"
,
"value"
:
""
,
"required"
:
true
,
"typeConfig"
:
{
"src"
:
"lxyl/jcsj/uck/ck/queryCjckid"
,
"match"
:
{
"value"
:
"id"
,
"label"
:
"name"
},
params
:{
flid
:
'L'
}
}
},
editColItemList
:
[
// {
// "label": "仓库",
// "prop": "ckid",
// "span": 8,
// "type": "RelSelect",
// "value": "",
// "required": true,
// "typeConfig": {
// "src": "lxyl/common/ck/queryCkidByRktzid",
// "match": {
// "value": "id",
// "label": "name"
// },
// params:{
// flid:'L'
// }
// }
// },
{
"label"
:
"库区"
,
"prop"
:
"kqid"
,
...
...
@@ -159,15 +193,15 @@
value
:
'id'
,
label
:
'code'
},
give
:
(
item
)
=>
{
this
.
$post
(
'wms/common/queryRqmxByCode'
,{
code
:
item
.
code
}).
then
(
res
=>
{
if
(
res
.
success
)
{
let
length
=
this
.
formDetail
.
length
this
.
formDetail
.
splice
(
0
,
length
)
list
.
forEach
(
item
=>
{
item
.
sl
=
item
.
packmxSl
give
:
(
item
)
=>
{
this
.
$post
(
'wms/common/queryRqmxByCode'
,
{
code
:
item
.
code
}).
then
(
res
=>
{
if
(
res
.
success
)
{
let
length
=
this
.
formDetail
.
length
this
.
formDetail
.
splice
(
0
,
length
)
list
.
forEach
(
item
=>
{
item
.
sl
=
item
.
packmxSl
delete
item
.
id
this
.
formDetail
.
push
(
item
)
...
...
@@ -183,9 +217,9 @@
span
:
8
,
type
:
'AuxInput'
,
typeConfig
:
{
queryParams
:
()
=>
{
return
{
ckid
:
this
.
form
.
ckid
queryParams
:
()
=>
{
return
{
ckid
:
this
.
form
.
ckid
}
},
isRequest
:
false
,
...
...
@@ -231,30 +265,28 @@
value
:
'id'
,
label
:
'djid'
},
give
:(
item
)
=>
{
this
.
$post
(
'lxyl/common/ck/queryCkidByRktzid'
,{
rktzid
:
item
.
id
,
flid
:
'L'
}).
then
(
res
=>
{
if
(
res
.
success
){
let
list
=
res
.
data
.
records
||
[]
if
(
list
.
length
==
1
){
}
this
.
form
.
ckid
=
list
[
0
].
id
give
:
(
item
)
=>
{
this
.
$post
(
'lxyl/common/ck/queryCkidByRktzid'
,
{
rktzid
:
item
.
id
,
flid
:
'L'
}).
then
(
res
=>
{
if
(
res
.
success
)
{
let
list
=
res
.
data
.
records
||
[]
if
(
list
.
length
==
1
)
{}
this
.
form
.
ckid
=
list
[
0
].
id
}
})
}
}
}
],
editColItemList2
:[
{
editColItemList2
:
[{
"label"
:
"状态"
,
"prop"
:
"zt"
,
"span"
:
8
,
"type"
:
"RelSelect"
,
"value"
:
""
,
readonly
:
true
,
readonly
:
true
,
"typeConfig"
:
{
"src"
:
"wms/rkgl/sjrw/init/zt"
,
"match"
:
{
...
...
@@ -268,7 +300,7 @@
prop
:
'whr'
,
type
:
'input'
,
span
:
8
,
readonly
:
true
,
readonly
:
true
,
},
{
...
...
@@ -276,8 +308,8 @@
prop
:
'whsj'
,
span
:
8
,
type
:
'datetime'
,
readonly
:
true
,
value
:
new
Date
().
getTime
()
readonly
:
true
,
value
:
new
Date
().
getTime
()
}
],
/* 从表编辑数据 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment