Commit b5a4c071 authored by jingnan's avatar jingnan 👀

Merge branch 'dev' of http://94.191.100.41/tfmom/tf-mom-web into dev

parents b2515e00 52e7a8c6
<template>
<dee-dialog
id="dee-dialog"
title="物料确认"
custom-class="mobile-dialog"
:dialog-visible.sync="visible"
width="90%"
:before-close="handleClose"
close-on-click-modal
class="material-confirmation-dialog"
>
<Header ref="header" />
<Footer ref="footer" />
</dee-dialog>
</template>
<script>
import Header from './header'
import Footer from './footer'
export default {
components: {
Header,
Footer
},
data() {
return {
visible: false
}
},
created() {},
methods: {
// 打开弹出框
open() {
this.visible = true
this.$nextTick(() => {
this.$refs.header.init()
this.$refs.footer.init()
})
},
handleClose() {}
}
}
</script>
<style lang="scss" >
.material-confirmation-dialog {
.el-table thead th {
color: #2e2e2e;
font-weight: 700;
font-size: 14px;
padding: 0;
background-color: #f3f6f7;
line-height: 46px !important;
}
.el-table .highlight {
border: 1px solid #1497f5;
padding: 0;
.cell {
padding: 0;
input {
border: 0;
height: 35px;
background-color: transparent;
text-align: center;
padding-right: 0;
}
}
}
.el-table .cell i.el-icon-loading {
font-size: 16px;
color: #ff0c00;
font-weight: bold;
position: absolute;
right: 10px;
top: 10px;
}
.el-pagination {
text-align: right;
padding: 10px 0;
}
.el-loading-spinner {
width: 100%;
}
}
</style>
<template>
<dee-dialog
title="试验记录维护"
custom-class="mobile-dialog"
:dialog-visible.sync="visible"
width="90%"
:before-close="handleClose"
close-on-click-modal
class="record-maintenance-dialog"
>
<div>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
height="60vh"
border
size="mini"
>
<el-table-column type="index" :width="80" label="序号" align="center" />
<el-table-column :width="160" label="操作" align="center">
<template slot-scope="scope">
<el-popover
placement="right"
width="660"
trigger="hover"
popper-class="record-maintenance-popper"
@show="getList(scope.row.id)"
>
<upload-files v-model="objFileLinks" />
<span slot="reference" style="cursor: pointer;olor: #409eff;">
附件浏览
</span>
</el-popover>
<el-button
size="mini"
type="danger"
@click="deleteRow(scope.row.id)"
>删除</el-button>
</template>
</el-table-column>
<el-table-column
v-for="c in colums"
:key="c.key"
:min-width="c.width"
:prop="c.key"
:label="c.title"
align="center"
sortable
:formatter="c.formatter"
show-overflow-tooltip
/>
</el-table>
</div>
</dee-dialog>
</template>
<script>
import { post } from '@/utils/http'
// import UploadFiles from '@/components/Lean/UploadFiles'
export default {
// components: { UploadFiles },
data() {
return {
visible: false,
// 加载中
loading: false,
// 搜索条件
form: {
status: 'Apply',
serialNumber: ''
},
// 分页
tablePagination: {
currentPage: 1,
pageSize: 10,
total: 0,
pageSizes: [10, 20, 50, 100]
},
// 所有可动态配置的表格列
colums: [
{
title: 'AO号',
show: true,
key: 'extProcessPlan.serialNumber',
sortable: true,
width: 260
},
{
title: 'AO名称',
show: true,
key: 'extProcessPlan.name',
sortable: true,
width: 150
},
{
title: '工序号',
show: true,
key: 'extProcessOperation.serialNumber',
sortable: true,
width: 120
},
{
title: '工序名称',
show: true,
key: 'extProcessOperation.name',
sortable: true,
width: 120
},
{
title: '操作者',
show: true,
key: 'creator.userName',
sortable: true,
width: 120
},
{
title: '申请时间',
show: true,
key: 'appTime',
sortable: true,
width: 120,
formatter: (row, column, cellValue, index) =>
cellValue && cellValue.split(' ').length > 1
? cellValue.split(' ')[0]
: cellValue
},
{
title: '状态',
show: true,
key: 'status',
sortable: true,
width: 120,
formatter: (row, column, cellValue, index) => {
if (cellValue === 'Apply') {
return '未确认'
} else {
return '已确认'
}
}
},
{
title: '试验类型',
show: true,
key: 'experimentType',
sortable: true,
width: 120
},
{
title: '试验报告号',
show: true,
key: 'reportNumber',
sortable: true,
width: 160
},
{
title: '试验结论',
show: true,
key: 'conclusion',
sortable: true,
width: 120
}
],
objFileLinks: [],
// 表格数据
tableData: []
}
},
created() {},
methods: {
// 打开弹出框
open() {
this.visible = true
this.$nextTick(() => {
this.init()
})
},
handleClose() {},
// 初始化数据
init() {
// 设置数据
this.loading = true
this.tableData = []
const params = {
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'extProcessOperationId',
'operator': 'EQ',
'value': this.$parent.editor.tableId
}
],
'operator': 'AND'
}
],
'items': [],
'operator': 'AND'
},
'openProps': [
{
'name': 'extProcessPlan'
},
{
'name': 'extProcessOperation'
},
{
'name': 'objFileLinks',
'openProps': [
{
'name': 'target'
}
]
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
],
'toValidateKeys': ''
}
// 发送请求
post('/ExperimentRecord/search', params)
.then((res) => {
this.tableData = res.items.content
this.tablePagination.total = res.items.totalElements
})
.catch((err) => console.log(err))
.finally(() => {
this.loading = false
})
},
getList(sourceId) {
const params = {
indices: ['ObjFileLink'],
searchItems: {
items: [
{
fieldName: 'sourceId',
operator: 'EQ',
value: sourceId
}
],
operator: 'AND'
},
openProps: [
{
pageFrom: 1,
pageSize: 1,
name: 'target'
}
]
}
post('/FileUtil/checkFile', params)
.then((res) => {
this.objFileLinks = res.items.content[0].objFileLinks
})
.catch((err) => console.error(err))
.finally(() => {})
},
deleteRow(id) {
this.$confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
const params = {
operator: 'REMOVE',
dxClassname: 'com.tf.mes.vo.prod.ExperimentRecordVo',
id: id
}
this.HttpRequest('/ExperimentRecord/recursion', params, 'post')
.then((res) => {
if (res && !res.message.includes('成功')) {
this.$message({
showClose: true,
message: res.message,
type: 'error'
})
}
})
.catch((err) => console.error(err))
.finally(() => {
this.init()
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
})
}
}
}
</script>
<style lang="scss">
.record-maintenance-dialog {
header {
display: flex;
margin-bottom: 10px;
> div {
display: flex;
margin-right: 20px;
align-items: center;
> span {
white-space: nowrap;
margin-right: 4px;
}
}
}
.dee-table-body {
height: 500px;
}
.el-table thead th {
color: #2e2e2e;
font-weight: 700;
font-size: 14px;
padding: 0;
background-color: #f3f6f7;
line-height: 46px !important;
}
.el-table .cell i.el-icon-loading {
font-size: 16px;
color: #ff0c00;
font-weight: bold;
position: absolute;
right: 10px;
top: 10px;
}
.el-pagination {
text-align: right;
padding: 10px 0;
}
.el-loading-spinner {
width: 100%;
}
}
.record-maintenance-popper {
.el-form-item__label {
display: none !important;
}
.el-form-item__content {
padding-left: 0px !important;
}
.el-col {
padding: 0px !important;
}
.dee-upload-page,
.el-form-item {
margin-bottom: 0px !important;
}
.dee-table-header {
display: none;
}
.el-form-item {
margin-bottom: 0px;
}
}
</style>
...@@ -51,7 +51,10 @@ export default { ...@@ -51,7 +51,10 @@ export default {
}, },
methods: { methods: {
// 打开弹出框 // 打开弹出框
open() { open(data) {
this.versionChangeDesc = data.versionChangeDesc
this.workDescription = data.workDescription
this.prepareDescription = data.prepareDescription
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.getTablesData(1) this.getTablesData(1)
...@@ -69,7 +72,6 @@ export default { ...@@ -69,7 +72,6 @@ export default {
} }
this.$refs.table1.loading = true this.$refs.table1.loading = true
this.$refs.table2.loading = true this.$refs.table2.loading = true
// this.$refs.table3.loading = true
const params = { const params = {
'searchItems': { 'searchItems': {
'children': [ 'children': [
...@@ -115,9 +117,6 @@ export default { ...@@ -115,9 +117,6 @@ export default {
} else { } else {
this.tableFile = res.items.content || [] this.tableFile = res.items.content || []
} }
// this.versionChangeDesc = res.items.dxProcessPlanVo.versionChangeDesc
// this.prepareDescription = res.items.dxProcessPlanVo.prepareDescription
// this.workDescription = res.items.dxProcessPlanVo.workDescription
this.$nextTick(() => { this.$nextTick(() => {
if (value === 1) { if (value === 1) {
this.$refs.table1.init() this.$refs.table1.init()
...@@ -140,9 +139,6 @@ export default { ...@@ -140,9 +139,6 @@ export default {
} else { } else {
this.$refs.table2.loading = false this.$refs.table2.loading = false
} }
// this.$refs.table1.loading = false
// this.$refs.table2.loading = false
// this.$refs.table3.loading = false
}) })
}, },
getFrockTable() { getFrockTable() {
...@@ -156,7 +152,6 @@ export default { ...@@ -156,7 +152,6 @@ export default {
{ {
'fieldName': 'source.targetExtProcessUsageLink.sourceId', 'fieldName': 'source.targetExtProcessUsageLink.sourceId',
'operator': 'EQ', 'operator': 'EQ',
// 'value': '249391817076000'
'value': this.$parent.headerData.aoId 'value': this.$parent.headerData.aoId
}, },
{ {
......
...@@ -293,7 +293,7 @@ ...@@ -293,7 +293,7 @@
class="gooey-menu-item" class="gooey-menu-item"
:disabled="isOK" :disabled="isOK"
content="技术要求" content="技术要求"
@click="!isOK && $refs.TechnicalRequirements.open()" @click="!isOK && $refs.TechnicalRequirements.open(headerData)"
> >
<el-badge :value="12" class="item" hidden> <el-badge :value="12" class="item" hidden>
<svg class="icon" aria-hidden="true"> <svg class="icon" aria-hidden="true">
...@@ -509,7 +509,7 @@ ...@@ -509,7 +509,7 @@
</div> </div>
</div> </div>
<!-- 物料确认 --> <!-- 物料确认 -->
<!-- <ConfirmMaterial ref="ConfirmMaterial" /> --> <ConfirmMaterial ref="ConfirmMaterial" />
<!--胶漆申领 --> <!--胶漆申领 -->
<!-- <LacClaims ref="LacClaims" /> --> <!-- <LacClaims ref="LacClaims" /> -->
<!-- 技术要求 --> <!-- 技术要求 -->
...@@ -522,7 +522,7 @@ ...@@ -522,7 +522,7 @@
<InspectionRejected ref="InspectionRejected" /> <InspectionRejected ref="InspectionRejected" />
<AttachmentUpload ref="AttachmentUpload" /> <AttachmentUpload ref="AttachmentUpload" />
<!-- 物料确认 --> <!-- 物料确认 -->
<!-- <RecordMaintenance ref="RecordMaintenance" /> --> <RecordMaintenance ref="RecordMaintenance" />
<!-- 物料确认 --> <!-- 物料确认 -->
</div> </div>
</template> </template>
...@@ -535,13 +535,13 @@ import '@/api/jq-signature' ...@@ -535,13 +535,13 @@ import '@/api/jq-signature'
import '@/icons/app/iconfont' import '@/icons/app/iconfont'
import { post, get } from '@/utils/http' import { post, get } from '@/utils/http'
// import Table from './components/table' // import Table from './components/table'
// import ConfirmMaterial from './components/ConfirmMaterial/index' import ConfirmMaterial from './components/ConfirmMaterial/index'
// import LacClaims from './components/LacClaims/index' // import LacClaims from './components/LacClaims/index'
import TechnicalRequirements from './components/TechnicalRequirements/index' import TechnicalRequirements from './components/TechnicalRequirements/index'
import AssemblyProcess from './components/AssemblyProcess/index' import AssemblyProcess from './components/AssemblyProcess/index'
import InspectionRejected from './components/chatBox/index' import InspectionRejected from './components/chatBox/index'
// import ProblemDeclare from './components/ProblemDeclare/index' // import ProblemDeclare from './components/ProblemDeclare/index'
// import RecordMaintenance from './components/RecordMaintenance/index' import RecordMaintenance from './components/RecordMaintenance/index'
// import scan from '@/components/scanCode/scanCode' // import scan from '@/components/scanCode/scanCode'
import AttachmentUpload from './components/AttachmentUpload/dialog' import AttachmentUpload from './components/AttachmentUpload/dialog'
export default { export default {
...@@ -551,7 +551,9 @@ export default { ...@@ -551,7 +551,9 @@ export default {
AttachmentUpload, AttachmentUpload,
TechnicalRequirements, TechnicalRequirements,
InspectionRejected, InspectionRejected,
AssemblyProcess AssemblyProcess,
RecordMaintenance,
ConfirmMaterial
}, },
data() { data() {
return { return {
...@@ -722,7 +724,10 @@ export default { ...@@ -722,7 +724,10 @@ export default {
scheduledEnd: data.scheduledEnd, scheduledEnd: data.scheduledEnd,
planStateCode: data.planState, planStateCode: data.planState,
disabled: true, disabled: true,
aoId: data.extProcessPlan.id aoId: data.extProcessPlan.id,
workDescription: data.extProcessPlan.workDescription,
versionChangeDesc: data.workDescription,
prepareDescription: data.extProcessPlan.prepareDescription
// 不合格 // 不合格
} }
that.getWorkingProcedure() that.getWorkingProcedure()
...@@ -791,44 +796,44 @@ export default { ...@@ -791,44 +796,44 @@ export default {
if (res && res.items) { if (res && res.items) {
that.workingProcedure = (res.items || []).map((p) => { that.workingProcedure = (res.items || []).map((p) => {
return { return {
id: p.joExecuteOpPlan[0].id, id: p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].id,
tableId: p.id, tableId: p.id,
serialNumber: p.code, serialNumber: p.code,
title: p.name, title: p.name,
html: p.joExecuteOpPlan[0].longdescription, html: p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].longdescription,
keyOperation: p.keyOperation, keyOperation: p.keyOperation,
checkFlag: p.checkFlag === 'true', checkFlag: p.checkFlag === 'true',
airFlag: p.airFlag === 'AAD' || p.airFlag === '目击', airFlag: p.airFlag === 'AAD' || p.airFlag === '目击',
versionKey: p.gaceVersion, versionKey: p.gaceVersion,
statusCode: p.joExecuteOpPlan[0].status, statusCode: p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].status,
isQualified: p.joExecuteOpPlan[0].isQualified, isQualified: p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].isQualified,
countOBJReject: p.joExecuteOpPlan[0].countOBJReject, countOBJReject: p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].countOBJReject,
countRecord: p.joExecuteOpPlan[0].countRecord, countRecord: p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].countRecord,
countProblem: p.joExecuteOpPlan[0].countProblem, countProblem: p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].countProblem,
countDebugging: p.joExecuteOpPlan[0].countDebugging, countDebugging: p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].countDebugging,
countQuality: p.joExecuteOpPlan[0].countQuality, countQuality: p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].countQuality,
revoke: p.joExecuteOpPlan[0].revoke, revoke: p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].revoke,
// 工装 // 工装
isOKClothesLink: p.joExecuteOpPlan[0].isOKClothesLink, isOKClothesLink: p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].isOKClothesLink,
isOKToolLink: p.joExecuteOpPlan[0].isOKToolLink, isOKToolLink: p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].isOKToolLink,
deviceLink: p.joExecuteOpPlan[0].deviceLink, deviceLink: p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].deviceLink,
operator: p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].jrExecuteOpPlans && operator: p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].jrExecuteOpPlans &&
p.joExecuteOpPlan[0].jrExecuteOpPlans.length && p.joExecuteOpPlan[0].jrExecuteOpPlans[0].operatorUser p.joExecuteOpPlan[0].jrExecuteOpPlans.length && p.joExecuteOpPlan[0].jrExecuteOpPlans[0].operatorUser
? p.joExecuteOpPlan[0].jrExecuteOpPlans[0].operatorUser.userName + ? p.joExecuteOpPlan[0].jrExecuteOpPlans[0].operatorUser.userName +
' ' + ' ' +
p.joExecuteOpPlan[0].jrExecuteOpPlans[0].operatorTime p.joExecuteOpPlan[0].jrExecuteOpPlans[0].operatorTime
: '', : '',
testor: testor:
p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].jrExecuteOpPlans && p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].jrExecuteOpPlans &&
p.joExecuteOpPlan[0].jrExecuteOpPlans.length && p.joExecuteOpPlan[0].jrExecuteOpPlans[0].testor ? p.joExecuteOpPlan[0].jrExecuteOpPlans[0].testor.userName + p.joExecuteOpPlan[0].jrExecuteOpPlans.length && p.joExecuteOpPlan[0].jrExecuteOpPlans[0].testor ? p.joExecuteOpPlan[0].jrExecuteOpPlans[0].testor.userName +
' ' + ' ' +
p.joExecuteOpPlan[0].jrExecuteOpPlans[0].testorTime : '', p.joExecuteOpPlan[0].jrExecuteOpPlans[0].testorTime : '',
dmir: { dmir: {
dmriImg: dmriImg:
p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].jrExecuteOpPlans && p.joExecuteOpPlan[0].jrExecuteOpPlans.length && p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].jrExecuteOpPlans && p.joExecuteOpPlan[0].jrExecuteOpPlans.length &&
p.joExecuteOpPlan[0].jrExecuteOpPlans[0].dmriImg, p.joExecuteOpPlan[0].jrExecuteOpPlans[0].dmriImg,
dmirTime: dmirTime:
p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].jrExecuteOpPlans && p.joExecuteOpPlan[0].jrExecuteOpPlans.length && p.joExecuteOpPlan && p.joExecuteOpPlan.length && p.joExecuteOpPlan[0].jrExecuteOpPlans && p.joExecuteOpPlan[0].jrExecuteOpPlans.length &&
p.joExecuteOpPlan[0].jrExecuteOpPlans[0].dmirTime p.joExecuteOpPlan[0].jrExecuteOpPlans[0].dmirTime
}, },
fileList: p.objFileLinks ? p.objFileLinks : [] fileList: p.objFileLinks ? p.objFileLinks : []
...@@ -1144,12 +1149,18 @@ export default { ...@@ -1144,12 +1149,18 @@ export default {
* 试验申请 * 试验申请
*/ */
testApplication() { testApplication() {
this.HttpRequest( const params = {
`ExperimentRecord/saveOpRecord?opId=${ 'operator': 'ADD',
this.editor.tableId 'status': 'Apply',
}&userId=${localStorage.getItem('userId')}`, 'extProcessPlanId': this.headerData.aoId,
{}, 'extProcessPlanIdType': 'ExtProcessPlan',
'post' 'extProcessOperationId': this.editor.tableId,
'extProcessOperationIdType': 'ExtProcessOperation',
'appTime': this.formatTime()
}
post(
`ExperimentRecord/recursion`,
params
) )
.then((res) => { .then((res) => {
if (res && res.message.includes('成功')) { if (res && res.message.includes('成功')) {
...@@ -1191,6 +1202,21 @@ export default { ...@@ -1191,6 +1202,21 @@ export default {
}) })
} }
}, },
getHandledValue(num) {
return num < 10 ? '0' + num : num
},
formatTime() {
const d = new Date()
const year = d.getFullYear()
const month = this.getHandledValue(d.getMonth() + 1)
const date = this.getHandledValue(d.getDate())
const hours = this.getHandledValue(d.getHours())
const minutes = this.getHandledValue(d.getMinutes())
const second = this.getHandledValue(d.getSeconds())
let resStr = ''
resStr = year + '-' + month + '-' + date + ' ' + hours + ':' + minutes + ':' + second
return resStr
},
inspectionDioge() { inspectionDioge() {
var that = this var that = this
this.$confirm('确定检验完成吗', '提示', { this.$confirm('确定检验完成吗', '提示', {
......
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