Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
周远喜
mes-ui
Commits
3a6749f3
Commit
3a6749f3
authored
Jun 04, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料分类管理
parent
260f5b82
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
145 additions
and
54 deletions
+145
-54
files.vue
components/page/files.vue
+2
-2
add.vue
pages/materiel/classification/add.vue
+121
-37
api.js
pages/materiel/classification/api.js
+3
-4
edit.vue
pages/materiel/classification/edit.vue
+3
-0
index.vue
pages/materiel/classification/index.vue
+11
-7
add.vue
pages/technology/productMix/product/add.vue
+3
-2
edit.vue
pages/technology/productMix/product/edit.vue
+2
-2
No files found.
components/page/files.vue
View file @
3a6749f3
...
@@ -128,7 +128,7 @@ export default {
...
@@ -128,7 +128,7 @@ export default {
},
},
methods
:
{
methods
:
{
listData
(
li
,
index
)
{
listData
(
li
,
index
)
{
this
.
$emit
(
"clickItem"
,
this
.
downUrl
+
li
.
filePath
);
this
.
$emit
(
"clickItem"
,
this
.
downUrl
+
li
.
filePath
,
li
.
filePath
);
this
.
isactive
=
index
;
this
.
isactive
=
index
;
},
},
...
@@ -136,7 +136,7 @@ export default {
...
@@ -136,7 +136,7 @@ export default {
this
.
per
=
0
;
this
.
per
=
0
;
this
.
vshowPro
=
true
;
this
.
vshowPro
=
true
;
},
},
//上传成功文件
//上传成功文件
uploadSuccess
(
response
,
file
,
fileList
)
{
uploadSuccess
(
response
,
file
,
fileList
)
{
if
(
this
.
Photos
)
{
if
(
this
.
Photos
)
{
...
...
pages/materiel/classification/add.vue
View file @
3a6749f3
...
@@ -3,48 +3,57 @@
...
@@ -3,48 +3,57 @@
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Row>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
label=
"编码"
prop=
"
userUnit
"
>
<FormItem
label=
"编码"
prop=
"
code
"
>
<Input
v-model=
"entity.
userUnit"
placeholder=
"请输入"
></Input>
<Input
v-model=
"entity.
code"
placeholder=
"请输入"
disabled
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
label=
"名称"
prop=
"
taskBased
"
>
<FormItem
label=
"名称"
prop=
"
name
"
>
<Input
v-model=
"entity.
taskBased
"
placeholder=
"请输入"
></Input>
<Input
v-model=
"entity.
name
"
placeholder=
"请输入"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
label=
"状态"
prop=
"productName"
placeholder=
"请选择"
>
<FormItem
label=
"状态"
prop=
"status"
placeholder=
"请选择"
>
<Select
v-model=
"entity.productName"
>
<Dictionary
<Option
value=
"0"
>
New York
</Option>
code=
"materail.category.status"
<Option
value=
"1"
disabled
>
London
</Option>
v-model=
"entity.status"
<Option
value=
"2"
>
Sydney
</Option>
type=
"select"
</Select>
:value=
"entity.status"
:key=
"entity.status"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<FormItem
label=
"描述"
prop=
"
productName
"
>
<FormItem
label=
"描述"
prop=
"
description
"
>
<Input
v-model=
"entity.
productName
"
type=
"textarea"
placeholder=
"请输入..."
></Input>
<Input
v-model=
"entity.
description
"
type=
"textarea"
placeholder=
"请输入..."
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<h4>
属性配置
</h4>
<h4>
属性配置
</h4>
</Col>
</Col>
<Col
:span=
"24"
style=
"padding:20px 0 0px 10px;margin-bottom:10px;"
class=
"table-solt"
>
<Col
:span=
"24"
style=
"padding:20px 0 0px 10px;margin-bottom:10px;"
class=
"table-solt"
>
<Table
border
:columns=
"columns"
:data=
"checkList"
class=
"tableCommon"
>
<Table
border
:columns=
"columns"
:data=
"checkList"
class=
"tableCommon"
height=
"300"
>
<template
slot-scope=
"
{ row, index }" slot="n
am
e">
<template
slot-scope=
"
{ row, index }" slot="n
ot
e">
<Input
v-model=
"row.n
am
e"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
/>
<Input
v-model=
"row.n
ot
e"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
/>
</
template
>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"require"
>
<
template
slot-scope=
"{ row, index }"
slot=
"datatype"
>
<Input
v-model=
"row.require"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
/>
<!--
<Input
v-model=
"row.datatype"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
/>
-->
<Select
v-model=
"row.datatype"
style=
"width:200px"
@
on-change=
"setRow(row,index)"
>
<Option
v-for=
"item in cityList"
:value=
"item.value"
:key=
"item.value"
>
{{
item
.
label
}}
</Option>
</Select>
</
template
>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"result"
>
<
!-- <
template slot-scope="{ row, index }" slot="result">
<Input v-model="row.result" placeholder="请输入" @on-blur="setRow(row,index)" />
<Input v-model="row.result" placeholder="请输入" @on-blur="setRow(row,index)" />
</template>-->
<
template
slot-scope=
"{ row, index }"
slot=
"required"
>
<Checkbox
v-model=
"row.required"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"pash"
>
<
template
slot-scope=
"{ row, index }"
slot=
"isunique"
>
<inputFile
v-model=
"row.file"
:files=
"true"
:parms=
"getParams(row.fileId)"
/>
<Checkbox
v-model=
"row.isunique"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"remark"
>
<Input
v-model=
"row.remark"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
/>
</
template
>
</
template
>
</Table>
</Table>
</Col>
</Col>
...
@@ -62,10 +71,36 @@
...
@@ -62,10 +71,36 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Api
from
"./api"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
entity
:
{},
entity
:
{
upId
:
0
,
code
:
0
},
cityList
:
[
{
value
:
"0"
,
label
:
"Number"
},
{
value
:
"1"
,
label
:
"string"
},
{
value
:
"2"
,
label
:
"Null"
},
{
value
:
"3"
,
label
:
"Boolean"
},
{
value
:
"4"
,
label
:
"Undefined"
}
],
disabled
:
false
,
disabled
:
false
,
columns
:
[
columns
:
[
{
{
...
@@ -75,38 +110,87 @@ export default {
...
@@ -75,38 +110,87 @@ export default {
align
:
"center"
align
:
"center"
},
},
{
{
title
:
"检验项目"
,
title
:
"属性名称"
,
key
:
"name"
,
key
:
"title"
,
align
:
"center"
},
{
title
:
"备注"
,
key
:
"note"
,
align
:
"center"
,
slot
:
"note"
},
{
title
:
"属性类型"
,
key
:
"datatype"
,
align
:
"center"
,
align
:
"center"
,
slot
:
"
nam
e"
slot
:
"
datatyp
e"
},
},
// {
// title: "是否显示",
// key: "result",
// align: "center",
// slot: "result"
// },
{
{
title
:
"
要求
"
,
title
:
"
是否必填
"
,
key
:
"require"
,
key
:
"require
d
"
,
align
:
"center"
,
align
:
"center"
,
slot
:
"require"
slot
:
"require
d
"
},
},
{
{
title
:
"
预测结果
"
,
title
:
"
是否唯一属性
"
,
key
:
"
result
"
,
key
:
"
isunique
"
,
align
:
"center"
,
align
:
"center"
,
slot
:
"
result
"
slot
:
"
isunique
"
}
}
],
],
checkList
:
[],
checkList
:
[],
rules
:
{
rules
:
{
businessName
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
businessCode
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
}
};
};
},
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
mounted
()
{
this
.
tableData
();
},
methods
:
{
methods
:
{
tableData
()
{
let
conditions
=
[];
Api
.
listTable
({
conditions
:
conditions
}).
then
(
r
=>
{
if
(
r
.
result
)
{
console
.
log
(
r
);
this
.
checkList
=
r
.
result
;
}
});
},
setRow
()
{
setRow
()
{
this
.
checkList
=
r
.
result
;
this
.
$set
(
this
.
checkList
,
index
,
row
)
;
},
},
addNew
()
{},
addNew
()
{},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{});
this
.
$refs
.
form
.
validate
(
v
=>
{
if
(
v
)
{
let
categoryDto
=
this
.
entity
;
let
pro
=
this
.
checkList
;
Api
.
create
({
categoryDto
:
categoryDto
,
pro
:
pro
})
.
then
(
r
=>
{
if
(
r
.
result
)
{
this
.
$Message
.
success
(
"保存成功"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
});
}
});
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
"on-close"
);
this
.
$emit
(
"on-close"
);
...
...
pages/materiel/classification/api.js
View file @
3a6749f3
import
Api
from
'@/plugins/request'
import
Api
from
'@/plugins/request'
export
default
{
export
default
{
// index:`${systemUrl}/category/paged`,
listTable
(
params
){
// getleveltree(params){
return
Api
.
post
(
`
${
systemUrl
}
/custompropertydefinition/list`
,
params
);
// return Api.post(`${systemUrl}/category/paged`,params);
},
// },
list
(
params
){
list
(
params
){
return
Api
.
post
(
`
${
systemUrl
}
/category/list`
,
params
);
return
Api
.
post
(
`
${
systemUrl
}
/category/list`
,
params
);
},
},
...
...
pages/materiel/classification/edit.vue
0 → 100644
View file @
3a6749f3
<
template
>
<div>
55555555
</div>
</
template
>
\ No newline at end of file
pages/materiel/classification/index.vue
View file @
3a6749f3
...
@@ -85,7 +85,9 @@ export default {
...
@@ -85,7 +85,9 @@ export default {
}
}
};
};
},
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
created
()
{
created
()
{
this
.
loadTree
();
this
.
loadTree
();
},
},
...
@@ -100,20 +102,22 @@ export default {
...
@@ -100,20 +102,22 @@ export default {
this
.
curId
=
0
;
this
.
curId
=
0
;
},
},
addNew
()
{
addNew
()
{
this
.
nodeInfo
.
id
=
0
;
// this.nodeInfo.id = 0;
// let conditions = [];
// debugger
this
.
add
();
this
.
add
();
},
},
add
()
{
add
()
{
this
.
curId
=
0
;
//
this.curId = 0;
this
.
title
=
"新增"
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
this
.
modal
=
true
;
},
},
edit
()
{
edit
()
{
//
this.curId = this.nodeInfo.id;
this
.
curId
=
this
.
nodeInfo
.
id
;
//
this.title = "编辑";
this
.
title
=
"编辑"
;
//
this.detail = () => import("./edit");
this
.
detail
=
()
=>
import
(
"./edit"
);
//
this.modal = true;
this
.
modal
=
true
;
},
},
remove
()
{
remove
()
{
// console.log(this.nodeInfo);
// console.log(this.nodeInfo);
...
...
pages/technology/productMix/product/add.vue
View file @
3a6749f3
...
@@ -132,8 +132,9 @@ export default {
...
@@ -132,8 +132,9 @@ export default {
// this.$refs.refFile.intFiles();
// this.$refs.refFile.intFiles();
},
},
methods
:
{
methods
:
{
clickData
(
data
)
{
clickData
(
data
,
liUrl
)
{
this
.
img
=
data
;
this
.
img
=
data
;
this
.
entity
.
productUrl
=
liUrl
;
},
},
handleSelect1
(
data
)
{
handleSelect1
(
data
)
{
if
(
data
.
length
>
0
)
{
if
(
data
.
length
>
0
)
{
...
@@ -151,8 +152,8 @@ export default {
...
@@ -151,8 +152,8 @@ export default {
this
.
disabled
=
true
;
this
.
disabled
=
true
;
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
this
.
entity
.
productUrlList
=
this
.
parms
.
eid
;
this
.
entity
.
productUrlList
=
this
.
parms
.
eid
;
this
.
entity
.
productUrl
=
this
.
img
;
}
else
{
}
else
{
this
.
entity
.
productUrl
=
""
;
this
.
entity
.
productUrlList
=
""
;
this
.
entity
.
productUrlList
=
""
;
}
}
...
...
pages/technology/productMix/product/edit.vue
View file @
3a6749f3
...
@@ -115,9 +115,9 @@ export default {
...
@@ -115,9 +115,9 @@ export default {
},
},
methods
:
{
methods
:
{
clickData
(
data
)
{
clickData
(
data
,
liUrl
)
{
this
.
img
=
data
;
this
.
img
=
data
;
this
.
entity
.
productUrl
=
data
;
this
.
entity
.
productUrl
=
liUrl
;
},
},
handleSelect1
(
data
)
{
handleSelect1
(
data
)
{
if
(
data
.
length
>
0
)
{
if
(
data
.
length
>
0
)
{
...
...
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