Commit 8d283cd1 authored by 秦嘉's avatar 秦嘉

Merge remote-tracking branch 'origin/master'

parents 5b3133b9 e3b51906
...@@ -115,13 +115,13 @@ ...@@ -115,13 +115,13 @@
<!-- 添加工站--> <!-- 添加工站-->
<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" :rules="rules" label-width="auto" :inline="true">
<el-form-item label="工站名称" prop="rejectCode"> <el-form-item label="工站名称" prop="staName">
<div slot="label"> <div slot="label">
<div class="labelName">工站名称</div> <div class="labelName">工站名称</div>
<div class="labelName">Position Name</div> <div class="labelName">Position Name</div>
</div> </div>
<el-input <el-input
v-model="queryParams.rejectCode" v-model="queryParams.staName"
placeholder="请输入工站名称" placeholder="请输入工站名称"
clearable clearable
:maxlength="30" :maxlength="30"
...@@ -137,38 +137,38 @@ ...@@ -137,38 +137,38 @@
<!--添加工站数据--> <!--添加工站数据-->
<el-col :span="24" :xs="24"> <el-col :span="24" :xs="24">
<el-table <el-table
v-loading="loading" v-loading="loadingPosition"
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"
> >
<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" />-->
<el-table-column align="center" prop="rejectCode" width="200" :show-overflow-tooltip="true"> <el-table-column align="center" prop="staCode" width="200" :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 v-slot:default="scope"> <template v-slot:default="scope">
{{ scope.row.positionNo || '-' }} {{ scope.row.staCode || '-' }}
</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="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" width="200" prop="createDate" :show-overflow-tooltip="true"> <el-table-column align="center" width="200" 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> </el-table>
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
:total="total" :total="total"
:page.sync="queryParams.page" :page.sync="queryParams.page"
:limit.sync="queryParams.rows" :limit.sync="queryParams.rows"
@pagination="getList" @pagination="getStaTable"
/> />
</el-col> </el-col>
</el-row> </el-row>
...@@ -205,14 +205,14 @@ ...@@ -205,14 +205,14 @@
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button class="redBtn" type="danger" size="small" @click="queryPosition">查询 Query</el-button> <el-button class="redBtn" type="danger" size="small" @click="queryCode">查询 Query</el-button>
<el-button class="resetBtn" size="small" @click="resetPosition">重置 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"> <el-col :span="24" :xs="24" style="height: 300px">
<el-table <el-table
v-loading="loading" v-loading="loadingCode"
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"
...@@ -300,8 +300,8 @@ ...@@ -300,8 +300,8 @@
style="padding-right: 10px;padding-left: 10px;margin-top: 10px" style="padding-right: 10px;padding-left: 10px;margin-top: 10px"
:data="configuringList" :data="configuringList"
> >
<el-table-column type="selection" width="50" /> <el-table-column type="selection" width="50px" />
<el-table-column align="center" prop="partNo" :show-overflow-tooltip="true"> <el-table-column align="center" width="150px" prop="partNo" :show-overflow-tooltip="true">
<template slot="header"> <template slot="header">
<div>料号</div> <div>料号</div>
<div>Part No.</div> <div>Part No.</div>
...@@ -319,7 +319,7 @@ ...@@ -319,7 +319,7 @@
{{ scope.row.replacement || '-' }} {{ scope.row.replacement || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="totalDigits" :show-overflow-tooltip="true"> <el-table-column align="center" prop="totalDigits" width="170px" :show-overflow-tooltip="true">
<template slot="header"> <template slot="header">
<div>总位数</div> <div>总位数</div>
<div>Total Digits</div> <div>Total Digits</div>
...@@ -327,11 +327,12 @@ ...@@ -327,11 +327,12 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model="scope.row.totalDigits" v-model="scope.row.totalDigits"
style="width: 150px"
onkeyup="value=value.replace(/[^\x00-\xff]/g, '')" onkeyup="value=value.replace(/[^\x00-\xff]/g, '')"
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="configurationRules" :show-overflow-tooltip="true"> <el-table-column align="center" prop="configurationRules" width="170px" :show-overflow-tooltip="true">
<template slot="header"> <template slot="header">
<div>配置规则</div> <div>配置规则</div>
<div>Configuration Rules</div> <div>Configuration Rules</div>
...@@ -340,6 +341,7 @@ ...@@ -340,6 +341,7 @@
<el-input <el-input
v-model="scope.row.configurationRules" v-model="scope.row.configurationRules"
type="text" type="text"
style="width: 150px"
onkeyup="value=value.replace(/[^\x00-\xff]/g, '')" onkeyup="value=value.replace(/[^\x00-\xff]/g, '')"
/> />
</template> </template>
...@@ -347,7 +349,7 @@ ...@@ -347,7 +349,7 @@
<el-table-column <el-table-column
align="center" align="center"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
width="200px" width="200"
> >
<template slot="header"> <template slot="header">
<div>操作</div> <div>操作</div>
...@@ -390,12 +392,18 @@ ...@@ -390,12 +392,18 @@
<script> <script>
import { listMaterial } from '@/api/material' import { listMaterial } from '@/api/material'
import {listStation} from "@/api/station";
export default { export default {
name: 'ModelDetails', name: 'ModelDetails',
data() { data() {
return { return {
// 配置工站遮罩
loading: false, loading: false,
// 选择物料遮罩
loadingCode: false,
// 添加工站遮罩
loadingPosition: false,
// 配置工站表格数据 // 配置工站表格数据
positionList: [ positionList: [
{ {
...@@ -422,7 +430,8 @@ export default { ...@@ -422,7 +430,8 @@ export default {
page: 1, page: 1,
rows: 10, rows: 10,
rejectCode: undefined, rejectCode: undefined,
partNumber: undefined partNumber: undefined,
materCode: undefined
}, },
// 添加工站弹窗 // 添加工站弹窗
openPosition: false, openPosition: false,
...@@ -483,20 +492,39 @@ export default { ...@@ -483,20 +492,39 @@ export default {
this.title = '选择成品料号' this.title = '选择成品料号'
this.partNum() this.partNum()
}, },
// 成品料号表格获取
partNum() { partNum() {
const params = { this.loadingCode = true
page: 1, listMaterial(this.queryParams).then(res => {
rows: 10,
materCode: undefined
}
listMaterial(params).then(res => {
this.selectPartNum = res.rows this.selectPartNum = res.rows
this.total = res.total
this.loadingCode = false
}) })
}, },
// 成品料号表格查询
queryCode() {
this.queryParams.page = 1
this.partNum()
},
// 重置按钮
resetCode() {
this.queryParams.materCode = undefined
this.partNum()
},
// 添加工站弹窗 // 添加工站弹窗
addPosition() { addPosition() {
this.openPosition = true this.openPosition = true
this.title = '添加工站' this.title = '添加工站'
this.getStaTable()
},
/** 查询工站表方法 **/
getStaTable() {
this.loadingPosition = true
listStation(this.queryParams).then(response => {
this.addPositionList = response.rows
this.total = response.total
this.loadingPosition = false
})
}, },
// 打开配置物料 // 打开配置物料
handleConfigure() { handleConfigure() {
......
...@@ -207,7 +207,7 @@ ...@@ -207,7 +207,7 @@
<div class="labelName">工站简称</div> <div class="labelName">工站简称</div>
<div class="labelName">Position Abbr</div> <div class="labelName">Position Abbr</div>
</div> </div>
<el-input :maxlength="50" v-model.trim="form.staAbbreviation" placeholder="请输入工站简称" /> <el-input v-model.trim="form.staAbbreviation" :maxlength="50" placeholder="请输入工站简称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
<div class="labelName">备注</div> <div class="labelName">备注</div>
<div class="labelName">PS</div> <div class="labelName">PS</div>
</div> </div>
<el-input :maxlength="256" v-model.trim="form.remarks" type="textarea" :row="3" placeholder="请输入备注" /> <el-input v-model.trim="form.remarks" :maxlength="256" type="textarea" :row="3" placeholder="请输入备注" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
<div>Reject Code</div> <div>Reject Code</div>
</div> </div>
<el-input <el-input
v-model="queryParams.rejectCode" v-model.trim="queryParams.rejectCode"
placeholder="请输入不良编号" placeholder="请输入不良编号"
clearable clearable
:maxlength="30" :maxlength="20"
size="small" size="small"
style="width: 200px" style="width: 200px"
/> />
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
<div>Reject Description</div> <div>Reject Description</div>
</div> </div>
<el-input <el-input
v-model="queryParams.rejectDescription" v-model.trim="queryParams.rejectDescription"
placeholder="请选择不良描述" placeholder="请输入不良描述"
clearable clearable
:maxlength="200" :maxlength="200"
size="small" size="small"
...@@ -70,11 +70,11 @@ ...@@ -70,11 +70,11 @@
<el-table-column type="index" label="序号" width="50" /> <el-table-column type="index" label="序号" width="50" />
<el-table-column align="center" prop="rejectCode" width="200" :show-overflow-tooltip="true"> <el-table-column align="center" prop="rejectCode" width="200" :show-overflow-tooltip="true">
<template slot="header"> <template slot="header">
<div>不良编</div> <div>不良编</div>
<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 || '-' }}
</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">
...@@ -183,22 +183,13 @@ ...@@ -183,22 +183,13 @@
<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="form.rejectCode" :maxlength="30" 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>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12">
<el-form-item class="labelHeight" label="不良描述" prop="rejectDescription">
<div slot="label" class="labelClassRequired">
<div class="labelName">不良描述</div>
<!-- <div class="labelName">Reject Description</div>-->
</div>
<el-input v-model="form.rejectDescription" :maxlength="128" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item class="labelHeight" label="状态" prop="flag"> <el-form-item class="labelHeight" label="状态" prop="flag">
<div slot="label" class="labelClass"> <div slot="label" class="labelClass">
...@@ -212,14 +203,23 @@ ...@@ -212,14 +203,23 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="24">
<el-form-item class="labelHeight" label="不良描述" prop="rejectDescription">
<div slot="label" class="labelClassRequired">
<div class="labelName">不良描述</div>
</div>
<el-input v-model.trim="form.rejectDescription" :maxlength="128" placeholder="请输入不良描述" />
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item class="labelHeight" prop="specificExplanation"> <el-form-item class="labelHeight" prop="specificExplanation">
<div slot="label" class="labelClassRequired"> <div slot="label" class="labelClassRequired">
<!-- <div class="labelName">具体解释</div>-->
<div class="labelName">Reject Description</div> <div class="labelName">Reject Description</div>
</div> </div>
<el-input v-model="form.specificExplanation" :maxlength="128" placeholder="请输入" /> <el-input v-model.trim="form.specificExplanation" :maxlength="128" placeholder="请输入Reject Description" />
<!-- <el-col v-for="(item, index) in form.specificExplanations" :key="item" :span="18" style="width: 70%">--> <!-- <el-col v-for="(item, index) in form.specificExplanations" :key="item" :span="18" style="width: 70%">-->
<!-- <el-input v-model="item.specificExplanation" :maxlength="200" placeholder="" style="width: 80%;margin-bottom: 10px" />--> <!-- <el-input v-model="item.specificExplanation" :maxlength="200" placeholder="" style="width: 80%;margin-bottom: 10px" />-->
<!-- <el-button v-if="form.specificExplanations.length > 1" style="margin-left: 5%" icon="el-icon-minus" @click.prevent="removeDomain(item,index)" />--> <!-- <el-button v-if="form.specificExplanations.length > 1" style="margin-left: 5%" icon="el-icon-minus" @click.prevent="removeDomain(item,index)" />-->
...@@ -321,20 +321,20 @@ export default { ...@@ -321,20 +321,20 @@ export default {
}, },
// 表单校验 // 表单校验
rules: { rules: {
rejectCode: [
{ required: true, message: '请输入不良编号', trigger: 'blur' },
{ min: 1, max: 50, message: '长度在 1 到 50 个字符', trigger: 'blur' }
],
rejectType: [ rejectType: [
{ required: true, message: '请选择不良类型', trigger: 'change' } { required: true, message: '请选择不良类型', trigger: 'change' }
], ],
rejectCode: [
{ required: true, message: '请输入不良编号', trigger: 'blur' },
{ min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' }
],
rejectDescription: [ rejectDescription: [
{ required: true, message: '请输入不良描述', trigger: 'blur' }, { required: true, message: '请输入不良描述', trigger: 'blur' },
{ min: 1, max: 100, message: '长度在 1 到 100 个字符', trigger: 'blur' } { min: 1, max: 128, message: '长度在 1 到 128 个字符', trigger: 'blur' }
], ],
specificExplanation: [ specificExplanation: [
{ required: true, message: '请输入具体解释', trigger: 'blur' }, { required: true, message: '请输入Reject Description', trigger: 'blur' },
{ min: 1, max: 100, message: '长度在 1 到 100 个字符', trigger: 'blur' } { min: 1, max: 128, message: '长度在 1 到 128 个字符', trigger: 'blur' }
] ]
}, },
title: '', title: '',
...@@ -377,9 +377,8 @@ export default { ...@@ -377,9 +377,8 @@ export default {
}, },
// 不良类型value存放 // 不良类型value存放
code(dict) { code(dict) {
console.log(dict) this.$forceUpdate()
this.form.rejectTypes = dict this.form.rejectTypes = dict
console.log(this.form.rejectTypes)
}, },
/** 表单重置操作 */ /** 表单重置操作 */
reset() { reset() {
...@@ -388,6 +387,8 @@ export default { ...@@ -388,6 +387,8 @@ export default {
positionId: undefined, positionId: undefined,
positionName: undefined, positionName: undefined,
rejectCode: undefined, rejectCode: undefined,
rejectType: undefined,
rejectTypes: undefined,
rejectDescription: undefined, rejectDescription: undefined,
delFlag: undefined, delFlag: undefined,
flag: undefined, flag: undefined,
...@@ -414,7 +415,17 @@ export default { ...@@ -414,7 +415,17 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.getDictFun() const params = {
dictType: 'defectType',
flag: '1'
}
listData(params).then(response => {
this.positionOption = response.rows
if (this.positionOption[0] !== null) {
this.form.rejectType = this.positionOption[0].dictValue
this.form.rejectTypes = this.positionOption[0].dictValue
}
})
this.reset() this.reset()
this.openBad = true this.openBad = true
this.form.flag = '1' this.form.flag = '1'
...@@ -423,7 +434,7 @@ export default { ...@@ -423,7 +434,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const badId = row.businessId const badId = row.businessId
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