Commit 4dc52143 authored by 秦嘉's avatar 秦嘉

Merge remote-tracking branch 'origin/master'

parents 24a77e6b 927627b7
// 不良定义api // 不良定义api
import request from '@/utils/request' import request from '@/utils/request'
import Qs from 'qs'
// 分页查询列表 // 新增
export function nltmodelAdd(data) { export function nltmodelAdd(data) {
return request({ return request({
url: '/nltmodel/add', url: '/nltmodel/add',
...@@ -12,3 +12,42 @@ export function nltmodelAdd(data) { ...@@ -12,3 +12,42 @@ export function nltmodelAdd(data) {
} }
}) })
} }
// 编辑
export function nltmodelUpdate(data) {
return request({
url: '/nltmodel/update',
method: 'put',
data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 查看详情
export function nltmodelDetail(data) {
return request({
url: '/nltmodel/detail/' + data.businessId,
method: 'get'
})
}
// 工单查看详情
export function nltordermodelDetail(data) {
return request({
url: '/nltordermodel/detail/' + data.businessId,
method: 'get'
})
}
// 工单编辑
// 编辑
export function nltordermodelUpdate(data) {
return request({
url: '/nltordermodel/update',
method: 'put',
data,
headers: {
'Content-Type': 'application/json'
}
})
}
...@@ -510,7 +510,16 @@ export default { ...@@ -510,7 +510,16 @@ export default {
}) })
}, },
/** 编辑按钮方法 */ /** 编辑按钮方法 */
handleUpdate() {}, handleUpdate(row) {
console.log(row, 'row')
this.$router.push({
path: '/ProductionProcess/ModelDetails',
query: {
businessId: row.businessId,
type: '2'
}
})
},
/** 对话框关闭按钮方法 */ /** 对话框关闭按钮方法 */
cancel() { cancel() {
this.open = false this.open = false
......
This diff is collapsed.
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
size="mini" size="mini"
type="danger" type="danger"
style="margin-left: 10px" style="margin-left: 10px"
@click="handleDelete(scope.row)" @click="handleQueryInfo(scope.row)"
>详情</el-link> >详情</el-link>
</template> </template>
</el-table-column> </el-table-column>
...@@ -208,7 +208,30 @@ export default { ...@@ -208,7 +208,30 @@ export default {
handleAdd() { handleAdd() {
this.title = '生产模型信息' this.title = '生产模型信息'
this.$router.push({ this.$router.push({
name: '/productionInfo/ModelDetails' name: '/productionInfo/ModelDetails',
query: {
type: '3'
}
})
},
// 修改生产模型
handleUpdate(row) {
this.$router.push({
path: '/productionInfo/ModelDetails',
query: {
businessId: row.businessId,
type: '1'
}
})
},
// 详情
handleQueryInfo(row) {
this.$router.push({
path: '/productionInfo/ModelDetails',
query: {
businessId: row.businessId,
type: '4'
}
}) })
} }
} }
......
<template>
<div class="synchronization">
<div class="badSearch" style="border-bottom: 14px solid #f4f4f4">
<el-form ref="queryForm" style="padding: 0 0 0 10px" class="formClass" :model="queryParams" :inline="true" label-width="auto">
<el-form-item label="时间">
<div slot="label" class="labelClass">
<div>时间</div>
<div>Synchronization Time</div>
</div>
<el-date-picker
v-model="queryParams.synchronizationTime"
size="small"
style="width: 300px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
/>
</el-form-item>
<el-form-item>
<el-button class="redBtn" type="danger" size="small" @click="handleQuery">查询 Query</el-button>
<el-button class="resetBtn" size="small" @click="resetQuery">重置 Reset</el-button>
</el-form-item>
</el-form>
</div>
<div>
<el-row :gutter="20">
<!--不良定义数据-->
<el-col :span="24" :xs="24">
<div style="float: right;margin: 10px">
<el-button
class="redBtn"
type="danger"
size="small"
@click="handleMaterial"
>同步物料</el-button>
<el-button
type="danger"
size="small"
class="redBtn"
@click="handleOrder"
>同步工单</el-button>
</div>
<div class="mb12 font-small-bold" style="margin-top: 20px;padding-left: 10px">数据同步列表</div>
<el-table
v-loading="loading"
border
style="padding-right: 10px;padding-left: 10px"
:data="badList"
>
<el-table-column type="index" label="序号" width="50" />
<el-table-column align="center" prop="synchronizationTime" width="200" :show-overflow-tooltip="true">
<template slot="header">
<div>时间</div>
<div>Synchronization Time</div>
</template>
<template v-slot:default="scope">
{{ scope.row.synchronizationTime || '-' }}
</template>
</el-table-column>
<el-table-column align="center" prop="type" :show-overflow-tooltip="true">
<template slot="header">
<div>类型</div>
<div>Type</div>
</template>
<template slot-scope="scope">
{{ scope.row.type || '-' }}
</template>
</el-table-column>
<el-table-column align="center" width="200" prop="result" :show-overflow-tooltip="true">
<template slot="header">
<div>结果</div>
<div>Result</div>
</template>
<template slot-scope="scope">
{{ scope.row.result || '-' }}
</template>
</el-table-column>
<el-table-column align="center" prop="remarks" :show-overflow-tooltip="true">
<template slot="header">
<div>备注</div>
<div>Remarks</div>
</template>
<template slot-scope="scope">
{{ scope.row.remarks || '-' }}
</template>
</el-table-column>
<el-table-column
align="center"
width="180"
class-name="small-padding fixed-width"
>
<template slot="header">
<div>操作</div>
<div>Operation</div>
</template>
<template slot-scope="scope">
<el-link
size="mini"
type="danger"
style="margin-left: 10px"
@click="handleDelete(scope.row)"
>删除</el-link>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
export default {
name: 'Index',
data() {
return {
loading: false,
badList: [],
queryParams: {
page: 1,
rows: 10,
synchronizationTime: '',
startTime: '',
endTime: ''
},
total: 0
}
},
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
created() {
if (this.$store.getters.searchParams[this.$route.path]) {
const { searchParams } = this.$store.getters; const { path } = this.$route
const param = JSON.parse(searchParams[path]) // 保留着的查询条件
this.queryParams = { ...param }
}
this.getList()
},
methods: {
getList() {
console.log('查询成功')
},
handleQuery() {
this.queryParams.page = 1
this.getList()
},
resetQuery() {
this.queryParams.rows = 10
this.queryParams.page = 1
this.queryParams.synchronizationTime = undefined
this.handleQuery()
},
handleDelete() {
this.$confirm('所选择数据被删除后不可再恢复,是否继续?', '提示', {
confirmButtonText: '确定 Confirm',
cancelButtonText: '取消 Cancel',
cancelButtonClass: 'btn-custom-cancel',
type: 'warning'
}).then(function() {
console.log('删除')
})
},
// 同步物料
handleMaterial() {
console.log('同步物料')
},
// 同步工单
handleOrder() {
console.log('同步工单')
}
}
}
</script>
<style lang="scss" scoped>
.synchronization {
font-size: 18px;
.placeholder{
height:14px;
background-color: #F4F4F4
}
.badSearch {
.el-form-item--small .el-form-item__label{
line-height: 17px;
}
.labelClass{
text-align: center;
}
}
.formClass {
}
.el-form-item__label-wrap {
margin-left: 0!important;
}
}
</style>
<style lang="scss">
.synchronization {
.badSearch{
.el-form-item--small .el-form-item__label{
line-height: 17px;
}
.labelClass{
text-align: center;
}
}
.el-table th .cell{
display: inline-block!important;
}
.formClass {
}
.el-form-item__label-wrap {
margin-left: 0!important;
}
}
.badDialog{
.labelHeight{
.el-form-item__label{
height: 40px;
}
}
.el-form-item--small .el-form-item__label{
line-height: 17px;
}
.labelName{
display: flex;
justify-content: end;
}
.labelClass{
position: relative;
right: 13px;
text-align: center;
}
.labelClassRequired{
text-align: center;
position: relative;
bottom: 17px;
right: 13px;
}
.el-input .el-input__inner {
padding: 0 10px;
}
}
</style>
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