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
5b28d3fe
Commit
5b28d3fe
authored
May 14, 2020
by
康振飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product
parents
e50fbf3b
87028f68
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
179 additions
and
127 deletions
+179
-127
dictionary.vue
components/page/dictionary.vue
+17
-0
zh-CN.js
i18n/locale/zh-CN.js
+2
-2
add.vue
pages/technology/details/routingqccard/add.vue
+27
-75
edit.vue
pages/technology/details/routingqccard/edit.vue
+133
-50
No files found.
components/page/dictionary.vue
View file @
5b28d3fe
...
...
@@ -17,6 +17,23 @@
<span
:title=
"item.value"
>
{{
item
.
label
}}
</span>
</Radio>
</RadioGroup>
<CheckboxGroup
v-else-if=
"type === 'checkbox'"
ref=
"dicradio"
v-model=
"name"
@
on-change=
"change"
:vertical=
"vertical"
>
<Checkbox
v-for=
"(item, index) in dic"
:disabled=
"item.disabled"
:label=
"item.value"
:key=
"index"
:border=
"border"
>
<span
:title=
"item.value"
>
{{
item
.
label
}}
</span>
</Checkbox>
</CheckboxGroup>
<Select
v-else
:placeholder=
"placeholder"
...
...
i18n/locale/zh-CN.js
View file @
5b28d3fe
...
...
@@ -1329,12 +1329,12 @@ export default {
routingHeaderId
:
'工艺ID'
,
routingHeaderName
:
'工艺'
,
routingDetailId
:
'工序ID'
,
routingDetailName
:
'工序
名称
'
,
routingDetailName
:
'工序'
,
routingDetailNo
:
'工序号'
,
routingStepId
:
'工步ID'
,
checkContent
:
'检测内容'
,
checkType
:
'检测类型'
,
checkParams
:
'检测
要求
'
,
checkParams
:
'检测
参数
'
,
measurementUnit
:
'测量单位'
,
fillintype
:
'填报类型'
,
isphotograph
:
'是否拍照'
,
...
...
pages/technology/details/routingqccard/add.vue
View file @
5b28d3fe
...
...
@@ -70,6 +70,11 @@
</Select>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('checkType')"
prop=
"checkType"
>
<Dictionary
code=
"QC.checktype"
v-model=
"entity.checkType"
type=
"checkbox"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('checkParams')"
prop=
"checkParams"
>
<Input
v-model=
"entity.checkParams"
></Input>
...
...
@@ -80,23 +85,15 @@
<Input
v-model=
"entity.standard"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('checkType')"
prop=
"checkType"
>
<Dictionary
code=
"QC.checktype"
v-model=
"entity.checkType"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('isphotograph')"
prop=
"isphotograph"
>
<Dictionary
code=
"Process.state"
v-model=
"entity.isphotograph"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('fillintype')"
prop=
"fillintype"
>
<Dictionary
code=
"QC.fillintype"
v-model=
"entity.fillintype"
></Dictionary>
<Dictionary
code=
"QC.fillintype"
v-model=
"entity.fillintype"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"24"
>
...
...
@@ -110,12 +107,11 @@
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('qualityTemplateName')"
prop=
"qualityTemplateName"
>
<!--
<files
ref=
"refFile"
:parms=
"parms"
files
singleFile
/>
-->
<InputFile
v-model=
"entity.qualityTemplateName"
/>
<FormItem
:label=
"l('qualityTemplate')"
prop=
"qualityTemplate"
>
<InputFile
v-model=
"entity.qualityTemplate"
:parms=
"parms"
/>
</FormItem>
</Col>
<Col
:span=
"8
"
>
<Col
:span=
"12
"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"QC.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
...
...
@@ -159,11 +155,7 @@
</FormItem>
</Col>
<Col
:span=
"8"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"Process.Status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"24"
>
...
...
@@ -193,10 +185,10 @@ export default {
routingDetailId
:
null
,
routingStepId
:
0
,
checkContent
:
""
,
checkType
:
1
,
checkType
:
[
1
]
,
checkParams
:
""
,
measurementUnit
:
""
,
fillintype
:
null
,
fillintype
:
2
,
qualityTemplate
:
""
,
isphotograph
:
0
,
status
:
1
,
...
...
@@ -215,12 +207,21 @@ export default {
tempFile
:
""
,
rules
:
{
routingDetailId
:
[
{
required
:
true
,
message
:
"请选择工序
名称
"
,
type
:
"number"
}
{
required
:
true
,
message
:
"请选择工序"
,
type
:
"number"
}
],
checkContent
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
checkContent
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
checkType
:
[
{
required
:
true
,
message
:
"检测类型至少选择一项"
,
type
:
"array"
,
min
:
1
,
trigger
:
"change"
}
]
},
routingDetailList
:
[],
parms
:
"app=qccard&eid="
+
this
.
$u
.
guid
()
+
"&name=
''
"
parms
:
"app=qccard&eid="
+
this
.
$u
.
guid
()
+
"&name=
qualityTemplateName
"
// parms: {
// app: "qccard",
// eid: null,
...
...
@@ -236,8 +237,6 @@ export default {
},
mounted
()
{
this
.
loadDetails
();
this
.
parms
.
eid
=
this
.
$u
.
guid
();
this
.
$refs
.
refFile
.
intFiles
();
},
methods
:
{
handleSubmit
()
{
...
...
@@ -252,23 +251,7 @@ export default {
this
.
entity
.
qualityTemplateName
=
""
;
this
.
entity
.
qualityTemplate
=
""
;
}
// if (this.$refs.refFile.nameList.length > 0) {
// let nameList = this.$refs.refFile.nameList;
// let names = [];
// let url = [];
// nameList.forEach(e => {
// names.push(e.fileName);
// url.push(e.filePath);
// });
// this.entity.qualityTemplateName = JSON.stringify(names)
// .replace("[", "")
// .replace("]", "")
// .replace(/\"/g, ""); //附件本地库暂存文件名称
// this.entity.qualityTemplate = JSON.stringify(url)
// .replace("[", "")
// .replace("]", "")
// .replace(/\"/g, "");
// }
this
.
entity
.
routingHeaderId
=
this
.
headid
;
Api
.
create
(
this
.
entity
)
...
...
@@ -277,8 +260,6 @@ export default {
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
//let newId = r.result
//this.updateEid(newId) //更新服务器上的id
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
...
...
@@ -311,41 +292,12 @@ export default {
tempDetails
.
forEach
(
data
=>
{
let
tempObj
=
{};
tempObj
.
value
=
data
.
id
;
tempObj
.
label
=
data
.
name
;
tempObj
.
label
=
data
.
taskSeq
+
" "
+
data
.
name
;
tempD
.
push
(
tempObj
);
});
this
.
routingDetailList
=
tempD
;
});
},
//新增时将uid转为eid
updateEid
(
newId
)
{
let
parms
=
{
eid
:
this
.
parms
.
eid
,
id
:
newId
+
""
};
this
.
$http
.
sysUser
.
updateEid
(
parms
).
then
(
res
=>
{
if
(
res
.
status
)
{
// this.$Message.success('修改成功!')
}
else
{
//this.$Message.error('修改失败!')
}
});
},
checkChange
(
v
)
{
if
(
v
==
1
||
v
==
2
)
{
this
.
raidoDis
=
false
;
this
.
entity
.
isphotograph
=
null
;
}
else
{
this
.
raidoDis
=
true
;
if
(
this
.
entity
.
isphotograph
==
null
)
{
this
.
entity
.
isphotograph
=
0
;
}
}
},
clearCheck
()
{
this
.
raidoDis
=
false
;
this
.
entity
.
isphotograph
=
null
;
},
l
(
key
)
{
key
=
"routing_qc_card"
+
"."
+
key
;
return
this
.
$t
(
key
);
...
...
pages/technology/details/routingqccard/edit.vue
View file @
5b28d3fe
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.creationTime"
></DatePicker>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
<InputNumber
v-model=
"entity.creatorUserId"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('lastModificationTime')"
prop=
"lastModificationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.lastModificationTime"
></DatePicker>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
<InputNumber
v-model=
"entity.lastModifierUserId"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('isDeleted')"
prop=
"isDeleted"
>
<Input
v-model=
"entity.isDeleted"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('deleterUserId')"
prop=
"deleterUserId"
>
<InputNumber
v-model=
"entity.deleterUserId"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('deletionTime')"
prop=
"deletionTime"
>
<DatePicker
type=
"date"
v-model=
"entity.deletionTime"
></DatePicker>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('extend')"
prop=
"extend"
>
<Input
v-model=
"entity.extend"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('routingStepId')"
prop=
"routingStepId"
>
<InputNumber
v-model=
"entity.routingStepId"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('routingHeaderName')"
prop=
"routingHeaderId"
>
<InputNumber
v-model=
"entity.routingHeaderId"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('qualityTemplate')"
prop=
"qualityTemplate"
>
<Input
v-model=
"entity.qualityTemplate"
type=
"textarea"
:rows=
"2"
></Input>
</FormItem>
</Col>
-->
<Col
:span=
"12"
>
<FormItem
:label=
"l('routingDetailName')"
prop=
"routingDetailId"
>
<Select
v-model=
"entity.routingDetailId"
>
...
...
@@ -12,6 +70,11 @@
</Select>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('checkType')"
prop=
"checkType"
>
<Dictionary
code=
"QC.checktype"
v-model=
"entity.checkType"
type=
"checkbox"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('checkParams')"
prop=
"checkParams"
>
<Input
v-model=
"entity.checkParams"
></Input>
...
...
@@ -22,23 +85,15 @@
<Input
v-model=
"entity.standard"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('checkType')"
prop=
"checkType"
>
<Dictionary
code=
"QC.checktype"
v-model=
"entity.checkType"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('isphotograph')"
prop=
"isphotograph"
>
<Dictionary
code=
"Process.state"
v-model=
"entity.isphotograph"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('fillintype')"
prop=
"fillintype"
>
<Dictionary
code=
"QC.fillintype"
v-model=
"entity.fillintype"
></Dictionary>
<Dictionary
code=
"QC.fillintype"
v-model=
"entity.fillintype"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"24"
>
...
...
@@ -52,23 +107,64 @@
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('qualityTemplateName')"
prop=
"qualityTemplateName"
>
<inputFile
ref=
"inputfile"
v-model=
"tempFile"
:parms=
"parms"
/>
<!--
<files
ref=
"refFile"
:parms=
"parms"
files
singleFile
/>
<a
:href=
"fileUrlPath"
@
click=
"downFile(entity.qualityTemplate)"
target=
"_blank"
>
{{
entity
.
qualityTemplateName
}}
</a>
-->
</FormItem>
</Col>
<Col
:span=
"8"
>
<FormItem
:label=
"l('qualityTemplate')"
prop=
"qualityTemplate"
>
<InputFile
v-model=
"entity.qualityTemplate"
:parms=
"parms"
/>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"QC.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<!--
<files
ref=
"refFile"
:parms=
"parms"
files
singleFile
/>
<Col
:span=
"12"
>
<FormItem
:label=
"l('isImportant')"
prop=
"isImportant"
>
<Dictionary
code=
"Process.state"
v-model=
"entity.isImportant"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('firstCheck')"
prop=
"firstCheck"
>
<Dictionary
code=
"Process.state"
v-model=
"entity.firstCheck"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"6"
>
<FormItem
:label=
"l('inspection')"
prop=
"inspection"
>
<Dictionary
code=
"Process.state"
v-model=
"entity.inspection"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"6"
>
<FormItem
:label=
"l('inspectionTime')"
prop=
"inspectionTime"
>
<InputNumber
v-model=
"entity.inspectionTime"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"6"
>
<FormItem
:label=
"l('sampling')"
prop=
"sampling"
>
<Dictionary
code=
"Process.state"
v-model=
"entity.sampling"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"6"
>
<FormItem
:label=
"l('samplingBatch')"
prop=
"samplingBatch"
>
<Input
v-model=
"entity.samplingBatch"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('measurementUnit')"
prop=
"measurementUnit"
>
<Input
v-model=
"entity.measurementUnit"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"entity.remark"
type=
"textarea"
:rows=
"2"
></Input>
</FormItem>
</Col>
-->
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
...
...
@@ -90,16 +186,22 @@ export default {
tempFile
:
""
,
tempFileName
:
""
,
tempFilePath
:
""
,
entity
:
{
qualityTemplateName
:
""
,
qualityTemplate
:
""
},
entity
:
{},
rules
:
{
routingDetailId
:
[
{
required
:
true
,
message
:
"请选择工序
名称
"
,
type
:
"number"
}
{
required
:
true
,
message
:
"请选择工序"
,
type
:
"number"
}
],
checkContent
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
checkContent
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
checkType
:
[
{
required
:
true
,
message
:
"检测类型至少选择一项"
,
type
:
"array"
,
min
:
1
,
trigger
:
"change"
}
]
},
routingDetailList
:
[],
parms
:
"app=qccard&eid="
+
this
.
$u
.
guid
()
+
"&name=''"
...
...
@@ -124,11 +226,8 @@ export default {
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
$refs
.
inputfile
.
newName
=
this
.
entity
.
qualityTemplate
;
this
.
$refs
.
inputfile
.
newPath
=
this
.
entity
.
qualityTemplate
;
});
},
downFile
(
path
)
{
...
...
@@ -138,11 +237,6 @@ export default {
this
.
$refs
.
form
.
validate
(
v
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
if
(
this
.
tempFile
!=
""
)
{
let
tempName
=
JSON
.
parse
(
this
.
$u
.
clone
(
this
.
tempFile
));
this
.
entity
.
qualityTemplateName
=
tempName
[
0
].
fileName
;
this
.
entity
.
qualityTemplate
=
tempName
[
0
].
filePath
;
}
Api
.
update
(
this
.
entity
)
.
then
(
r
=>
{
this
.
disabled
=
false
;
...
...
@@ -175,23 +269,12 @@ export default {
tempDetails
.
forEach
(
data
=>
{
let
tempObj
=
{};
tempObj
.
value
=
data
.
id
;
tempObj
.
label
=
data
.
name
;
tempObj
.
label
=
data
.
taskSeq
+
" "
+
data
.
name
;
tempD
.
push
(
tempObj
);
});
this
.
routingDetailList
=
tempD
;
});
},
checkChange
(
v
)
{
if
(
v
==
1
||
v
==
2
)
{
this
.
raidoDis
=
false
;
this
.
entity
.
isphotograph
=
null
;
}
else
{
this
.
raidoDis
=
true
;
if
(
this
.
entity
.
isphotograph
==
null
)
{
this
.
entity
.
isphotograph
=
1
;
}
}
},
l
(
key
)
{
key
=
"routing_qc_card"
+
"."
+
key
;
return
this
.
$t
(
key
);
...
...
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