Commit 1ce2b12c authored by 秦嘉's avatar 秦嘉

Merge remote-tracking branch 'origin/master'

parents f920b596 a7a6c2f9
// 生产模型api
import request from '@/utils/request'
// 分页查询列表
export function listModel(query) {
return request({
url: '/nltmodel/queryNltModelByPagination',
method: 'get',
params: query
})
}
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="labelHeight" label="成品料号" prop="partNo" style="margin-left: 20px"> <el-form-item class="labelHeight" label="成品料号" prop="modelCode" style="margin-left: 20px">
<div slot="label" class="labelClassRequired"> <div slot="label" class="labelClassRequired">
<div class="labelName">成品料号</div> <div class="labelName">成品料号</div>
<div class="labelName">Part No.</div> <div class="labelName">Part No.</div>
</div> </div>
{{ form.partNo }} {{ form.modelCode }}
<el-link type="primary" @click="choice">选择</el-link> <el-link type="primary" style="margin-left: 10px" @click="choice">选择</el-link>
</el-form-item> </el-form-item>
<el-form-item style="float: right"> <el-form-item style="float: right">
<el-button class="canleBtn" @click="cancelPosition">取 消 Cancel</el-button> <el-button class="canleBtn" @click="cancelPosition">取 消 Cancel</el-button>
...@@ -50,31 +50,31 @@ ...@@ -50,31 +50,31 @@
:data="positionList" :data="positionList"
> >
<el-table-column type="index" label="序号" width="50" /> <el-table-column type="index" label="序号" width="50" />
<el-table-column align="center" prop="positionNo" :show-overflow-tooltip="true"> <el-table-column align="center" prop="staCode" :show-overflow-tooltip="true">
<template slot="header"> <template slot="header">
<div>工站编号</div> <div>工站编号</div>
<div>Position No.</div> <div>Position No.</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.positionNo || '-' }} {{ scope.row.staCode || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="positionName" :show-overflow-tooltip="true"> <el-table-column align="center" prop="staName" :show-overflow-tooltip="true">
<template slot="header"> <template slot="header">
<div>工站名称</div> <div>工站名称</div>
<div>Position Name</div> <div>Position Name</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.positionName || '-' }} {{ scope.row.staName || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="positionType" :show-overflow-tooltip="true"> <el-table-column align="center" prop="dictLabel" :show-overflow-tooltip="true">
<template slot="header"> <template slot="header">
<div>工站类型</div> <div>工站类型</div>
<div>Position Type</div> <div>Position Type</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.positionType || '-' }} {{ scope.row.dictLabel || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="sort" :show-overflow-tooltip="true"> <el-table-column align="center" prop="sort" :show-overflow-tooltip="true">
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</el-row> </el-row>
<!-- 添加工站--> <!-- 添加工站-->
<el-dialog :close-on-click-modal="false" class="modelDialog" :title="title" :visible.sync="openPosition" width="70%" append-to-body> <el-dialog :close-on-click-modal="false" class="modelDialog" :title="title" :visible.sync="openPosition" width="70%" append-to-body>
<el-form ref="form" :model="queryParams" :rules="rules" label-width="auto" :inline="true"> <el-form ref="form" :model="queryParams" label-width="auto" :inline="true">
<el-form-item label="工站名称" prop="staName"> <el-form-item label="工站名称" prop="staName">
<div slot="label"> <div slot="label">
<div class="labelName">工站名称</div> <div class="labelName">工站名称</div>
...@@ -141,6 +141,7 @@ ...@@ -141,6 +141,7 @@
border border
style="padding-right: 10px;padding-left: 10px;margin-top: 10px" style="padding-right: 10px;padding-left: 10px;margin-top: 10px"
:data="addPositionList" :data="addPositionList"
@selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="50" /> <el-table-column type="selection" width="50" />
<!-- <el-table-column type="index" label="序号" width="50" />--> <!-- <el-table-column type="index" label="序号" width="50" />-->
...@@ -208,7 +209,7 @@ ...@@ -208,7 +209,7 @@
<el-button class="redBtn" type="danger" size="small" @click="queryCode">查询 Query</el-button> <el-button class="redBtn" type="danger" size="small" @click="queryCode">查询 Query</el-button>
<el-button class="resetBtn" size="small" @click="resetCode">重置 Reset</el-button> <el-button class="resetBtn" size="small" @click="resetCode">重置 Reset</el-button>
</el-form-item> </el-form-item>
<el-row :gutter="20" > <el-row :gutter="20">
<!--选择成品料号数据--> <!--选择成品料号数据-->
<el-col :span="24" :xs="24" style="height: 300px"> <el-col :span="24" :xs="24" style="height: 300px">
<el-table <el-table
...@@ -216,6 +217,7 @@ ...@@ -216,6 +217,7 @@
border border
style="padding-right: 10px;padding-left: 10px;margin-top: 10px" style="padding-right: 10px;padding-left: 10px;margin-top: 10px"
:data="selectPartNum" :data="selectPartNum"
@selection-change="handlePartNum"
> >
<el-table-column type="selection" width="50" /> <el-table-column type="selection" width="50" />
<el-table-column type="index" label="序号" width="50" /> <el-table-column type="index" label="序号" width="50" />
...@@ -291,7 +293,7 @@ ...@@ -291,7 +293,7 @@
class="redBtn" class="redBtn"
type="danger" type="danger"
size="small" size="small"
@click="choice" @click="choiceOne"
>添加物料 Add Part No.</el-button> >添加物料 Add Part No.</el-button>
</div> </div>
<el-table <el-table
...@@ -319,33 +321,6 @@ ...@@ -319,33 +321,6 @@
{{ scope.row.replacement || '-' }} {{ scope.row.replacement || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="totalDigits" width="170px" :show-overflow-tooltip="true">
<template slot="header">
<div>总位数</div>
<div>Total Digits</div>
</template>
<template slot-scope="scope">
<el-input
v-model="scope.row.totalDigits"
style="width: 150px"
onkeyup="value=value.replace(/[^\x00-\xff]/g, '')"
/>
</template>
</el-table-column>
<el-table-column align="center" prop="configurationRules" width="170px" :show-overflow-tooltip="true">
<template slot="header">
<div>配置规则</div>
<div>Configuration Rules</div>
</template>
<template slot-scope="scope">
<el-input
v-model="scope.row.configurationRules"
type="text"
style="width: 150px"
onkeyup="value=value.replace(/[^\x00-\xff]/g, '')"
/>
</template>
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
...@@ -360,7 +335,7 @@ ...@@ -360,7 +335,7 @@
size="mini" size="mini"
type="primary" type="primary"
style="margin-left: 10px" style="margin-left: 10px"
@click="choice(scope.row)" @click="choiceOne(scope.row)"
>替换物料</el-link> >替换物料</el-link>
<el-link <el-link
size="mini" size="mini"
...@@ -371,13 +346,6 @@ ...@@ -371,13 +346,6 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
...@@ -392,7 +360,7 @@ ...@@ -392,7 +360,7 @@
<script> <script>
import { listMaterial } from '@/api/material' import { listMaterial } from '@/api/material'
import {listStation} from "@/api/station"; import { listStation } from '@/api/station'
export default { export default {
name: 'ModelDetails', name: 'ModelDetails',
...@@ -405,33 +373,22 @@ export default { ...@@ -405,33 +373,22 @@ export default {
// 添加工站遮罩 // 添加工站遮罩
loadingPosition: false, loadingPosition: false,
// 配置工站表格数据 // 配置工站表格数据
positionList: [ positionList: [],
{
positionNo: 'GZ001',
positionName: '扫描工站1',
positionType: 'Scanning'
}
],
// 添加工站表格数据 // 添加工站表格数据
addPositionList: [], addPositionList: [],
// 替代选中工站表格数据
addPositionListOne: [],
// 选择成品表格料号数据 // 选择成品表格料号数据
selectPartNum: [], selectPartNum: [],
// 配置物料表格数据 // 配置物料表格数据
configuringList: [ configuringList: [],
{
partNo: '45454',
replacement: '123',
totalDigits: '123',
configurationRules: '321'
}
],
total: 0, total: 0,
queryParams: { queryParams: {
page: 1, page: 1,
rows: 10, rows: 10,
rejectCode: undefined,
partNumber: undefined, partNumber: undefined,
materCode: undefined materCode: undefined,
staName: undefined
}, },
// 添加工站弹窗 // 添加工站弹窗
openPosition: false, openPosition: false,
...@@ -442,17 +399,21 @@ export default { ...@@ -442,17 +399,21 @@ export default {
title: '', title: '',
form: { form: {
modelType: '', modelType: '',
partNo: '' modelCode: ''
}, },
rules: { rules: {
modelType: [ modelType: [
{ required: true, message: '请选择模型类型', trigger: 'change' } { required: true, message: '请选择模型类型', trigger: 'change' }
], ],
partNo: [ modelCode: [
{ required: true, message: '请选择模型类型', trigger: 'change' } { required: true, message: '请选择模型类型', trigger: 'change' }
] ]
}, },
modelOption: [] // 模型类型
modelOption: [],
// 成品料号替代
modelCodeOne: '',
type: ''
} }
}, },
created() { created() {
...@@ -491,6 +452,13 @@ export default { ...@@ -491,6 +452,13 @@ export default {
this.openPartNo = true this.openPartNo = true
this.title = '选择成品料号' this.title = '选择成品料号'
this.partNum() this.partNum()
this.type = '1'
},
choiceOne() {
this.openPartNo = true
this.title = '选择物料料号'
this.partNum()
this.type = '2'
}, },
// 成品料号表格获取 // 成品料号表格获取
partNum() { partNum() {
...@@ -511,6 +479,12 @@ export default { ...@@ -511,6 +479,12 @@ export default {
this.queryParams.materCode = undefined this.queryParams.materCode = undefined
this.partNum() this.partNum()
}, },
// 料号选择
handlePartNum(data) {
data.forEach(item => {
this.modelCodeOne = item.materCode
})
},
// 添加工站弹窗 // 添加工站弹窗
addPosition() { addPosition() {
this.openPosition = true this.openPosition = true
...@@ -526,6 +500,20 @@ export default { ...@@ -526,6 +500,20 @@ export default {
this.loadingPosition = false this.loadingPosition = false
}) })
}, },
// 工站选择框
handleSelectionChange(data) {
this.addPositionListOne = data
},
// 工站查询按钮
queryPosition() {
this.queryParams.page = 1
this.getStaTable()
},
// 工站重置按钮
resetPosition() {
this.queryParams.staName = undefined
this.getStaTable()
},
// 打开配置物料 // 打开配置物料
handleConfigure() { handleConfigure() {
this.title = '配置物料' this.title = '配置物料'
...@@ -546,18 +534,24 @@ export default { ...@@ -546,18 +534,24 @@ export default {
// 关闭添加工站弹窗 // 关闭添加工站弹窗
cancelAddPosition() { cancelAddPosition() {
this.openPosition = false this.openPosition = false
this.addPositionListOne = []
}, },
// 确定关闭添加工站弹窗 // 确定关闭添加工站弹窗
submitAddPosition() { submitAddPosition() {
this.openPosition = false this.openPosition = false
this.addPositionListOne.forEach(item => {
this.positionList.push(item)
})
}, },
// 关闭选择成品料号弹窗 // 关闭选择成品料号弹窗
cancelChoicePart() { cancelChoicePart() {
this.openPartNo = false this.openPartNo = false
this.modelCodeOne = ''
}, },
// 确定关闭选择成品料号弹窗 // 确定关闭选择成品料号弹窗
submitChoicePart() { submitChoicePart() {
this.openPartNo = false this.openPartNo = false
this.form.modelCode = this.modelCodeOne
}, },
// 关闭配置物料窗口 // 关闭配置物料窗口
cancelConfiguring() { cancelConfiguring() {
......
...@@ -55,13 +55,13 @@ ...@@ -55,13 +55,13 @@
:data="modelList" :data="modelList"
> >
<el-table-column type="index" label="序号" width="50" /> <el-table-column type="index" label="序号" width="50" />
<el-table-column align="center" prop="partNo" width="200" :show-overflow-tooltip="true"> <el-table-column align="center" prop="materCode" width="200" :show-overflow-tooltip="true">
<template slot="header"> <template slot="header">
<div>成品料号</div> <div>成品料号</div>
<div>Part No.</div> <div>Part No.</div>
</template> </template>
<template v-slot:default="scope"> <template v-slot:default="scope">
{{ scope.row.partNo || '-' }} {{ scope.row.materCode || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="modelType" :show-overflow-tooltip="true"> <el-table-column align="center" prop="modelType" :show-overflow-tooltip="true">
...@@ -73,22 +73,22 @@ ...@@ -73,22 +73,22 @@
{{ scope.row.modelType || '-' }} {{ scope.row.modelType || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="200" prop="createTime" :show-overflow-tooltip="true"> <el-table-column align="center" width="200" prop="createDate" :show-overflow-tooltip="true">
<template slot="header"> <template slot="header">
<div>创建时间</div> <div>创建时间</div>
<div>Build Time</div> <div>Build Time</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.createTime || '-' }} {{ scope.row.createDate || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="200" prop="operator" :show-overflow-tooltip="true"> <el-table-column align="center" width="200" prop="updatePerName" :show-overflow-tooltip="true">
<template slot="header"> <template slot="header">
<div>操作人</div> <div>操作人</div>
<div>Operator</div> <div>Operator</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.operator || '-' }} {{ scope.row.updatePerName || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="100" prop="flag"> <el-table-column align="center" width="100" prop="flag">
...@@ -157,6 +157,8 @@ ...@@ -157,6 +157,8 @@
</template> </template>
<script> <script>
import { listModel } from '@/api/model'
export default { export default {
name: 'ProductionModel', name: 'ProductionModel',
data() { data() {
...@@ -183,7 +185,12 @@ export default { ...@@ -183,7 +185,12 @@ export default {
methods: { methods: {
/** 列表获取 */ /** 列表获取 */
getList() { getList() {
console.log('查询成功') this.loading = true
listModel(this.queryParams).then(response => {
this.modelList = response.rows
this.total = response.total
this.loading = false
})
}, },
/** 查询按钮操作 */ /** 查询按钮操作 */
handleQuery() { handleQuery() {
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
<div class="bad_definition"> <div class="bad_definition">
<div class="badSearch" style="border-bottom: 14px solid #f4f4f4"> <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 ref="queryForm" style="padding: 0 0 0 10px" class="formClass" :model="queryParams" :inline="true" label-width="auto">
<el-form-item label="不良编" prop="rejectCode"> <el-form-item label="不良编" prop="rejectCode">
<div slot="label" class="labelClass"> <div slot="label" class="labelClass">
<div>不良编</div> <div>不良编</div>
<div>Reject Code</div> <div>Reject Code</div>
</div> </div>
<el-input <el-input
v-model.trim="queryParams.rejectCode" v-model.trim="queryParams.rejectCode"
placeholder="请输入不良编" placeholder="请输入不良编"
clearable clearable
:maxlength="20" :maxlength="20"
size="small" size="small"
...@@ -74,7 +74,8 @@ ...@@ -74,7 +74,8 @@
<div>Reject Code</div> <div>Reject Code</div>
</template> </template>
<template v-slot:default="scope"> <template v-slot:default="scope">
{{ scope.row.rejectType || '-' }} {{ scope.row.rejectCode || '-' }} {{ scope.row.rejectType || '-' }}-{{ scope.row.rejectCode || '-' }}
<!-- {{ scope.row.rejectCode || '-' }}-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="rejectDescription" :show-overflow-tooltip="true"> <el-table-column align="center" prop="rejectDescription" :show-overflow-tooltip="true">
...@@ -84,6 +85,7 @@ ...@@ -84,6 +85,7 @@
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.rejectDescription || '-' }} / {{ scope.row.specificExplanation || '-' }} {{ scope.row.rejectDescription || '-' }} / {{ scope.row.specificExplanation || '-' }}
<!-- {{ scope.row.rejectDescription || '-' }}-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="200" prop="createDate" :show-overflow-tooltip="true"> <el-table-column align="center" width="200" prop="createDate" :show-overflow-tooltip="true">
...@@ -173,9 +175,9 @@ ...@@ -173,9 +175,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item class="labelHeight" label="不良编" prop="rejectCode"> <el-form-item class="labelHeight" label="不良编" prop="rejectCode">
<div slot="label" class="labelClassRequired"> <div slot="label" class="labelClassRequired">
<div class="labelName">不良编</div> <div class="labelName">不良编</div>
<div class="labelName">Reject Code</div> <div class="labelName">Reject Code</div>
</div> </div>
<el-row> <el-row>
...@@ -183,7 +185,7 @@ ...@@ -183,7 +185,7 @@
<el-input v-model="form.rejectTypes" type="text" :disabled="true" /> <el-input v-model="form.rejectTypes" type="text" :disabled="true" />
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<el-input v-model.trim="form.rejectCode" :maxlength="20" placeholder="请输入不良编" /> <el-input v-model.trim="form.rejectCode" :maxlength="20" placeholder="请输入不良编" />
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
...@@ -258,8 +260,7 @@ ...@@ -258,8 +260,7 @@
<em>点击上传</em> <em>点击上传</em>
</div> </div>
<div slot="tip" class="el-upload__tip"> <div slot="tip" class="el-upload__tip">
<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据 <el-link type="primary" style="font-size:14px" @click="importTemplate">下载模板</el-link>
<el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
</div> </div>
<div slot="tip" class="el-upload__tip" style="color:red">提示:仅允许导入“xls”或“xlsx”格式文件!</div> <div slot="tip" class="el-upload__tip" style="color:red">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
</el-upload> </el-upload>
...@@ -325,7 +326,7 @@ export default { ...@@ -325,7 +326,7 @@ export default {
{ required: true, message: '请选择不良类型', trigger: 'change' } { required: true, message: '请选择不良类型', trigger: 'change' }
], ],
rejectCode: [ rejectCode: [
{ required: true, message: '请输入不良编', trigger: 'blur' }, { required: true, message: '请输入不良编', trigger: 'blur' },
{ min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' } { min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' }
], ],
rejectDescription: [ rejectDescription: [
...@@ -569,7 +570,7 @@ export default { ...@@ -569,7 +570,7 @@ export default {
rejectCode: this.queryParams.rejectCode, rejectCode: this.queryParams.rejectCode,
rejectDescription: this.queryParams.rejectDescription rejectDescription: this.queryParams.rejectDescription
} }
this.$confirm('是否确认导出所有用户信息?', '警告', { this.$confirm('是否确认导出所有不良定义信息?', '警告', {
confirmButtonText: '确定 Confirm', confirmButtonText: '确定 Confirm',
cancelButtonText: '取消 Cancel', cancelButtonText: '取消 Cancel',
cancelButtonClass: 'btn-custom-cancel', cancelButtonClass: 'btn-custom-cancel',
......
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