Commit e3b51906 authored by 11528's avatar 11528

bug:55568,55566,55563,55561,55559,5555777,55496

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