Commit ec8c41d9 authored by wdy's avatar wdy

Merge remote-tracking branch 'origin/project1' into project1

parents e1f92e18 7ccb526a
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<div class="mb12 font-small-bold">基本信息</div> <div class="mb12 font-small-bold">基本信息</div>
<el-table v-loading="loading" border :data="basicInfoList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="basicInfoList" @selection-change="handleSelectionChange">
<el-table-column type="index" label="序号" width="50" /> <el-table-column type="index" label="序号" width="50" />
<el-table-column label="pn" prop="pn"> <el-table-column label="pn" prop="pn" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.pn || '-' }} {{ scope.row.pn || '-' }}
</template> </template>
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
{{ scope.row.ptype || '-' }} {{ scope.row.ptype || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="prank" prop="prank"> <el-table-column label="prank" prop="prank" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.prank || '-' }} {{ scope.row.prank || '-' }}
</template> </template>
...@@ -89,12 +89,12 @@ ...@@ -89,12 +89,12 @@
<span v-else></span> <span v-else></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="psm" prop="psm"> <el-table-column label="psm" prop="psm" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.prank || '-' }} {{ scope.row.prank || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="psy" prop="psy"> <el-table-column label="psy" prop="psy" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.prank || '-' }} {{ scope.row.prank || '-' }}
</template> </template>
...@@ -216,6 +216,7 @@ ...@@ -216,6 +216,7 @@
import { add, listBasicInfo, updataInfo, getDetailById, deleteLogical } from '@/api/equipment/basicInfo' import { add, listBasicInfo, updataInfo, getDetailById, deleteLogical } from '@/api/equipment/basicInfo'
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
import { getDictData } from '@/api/equipment/application' import { getDictData } from '@/api/equipment/application'
import { resetForm } from '@/utils/common'
export default { export default {
name: 'BasicInfo', name: 'BasicInfo',
data() { data() {
...@@ -298,16 +299,15 @@ export default { ...@@ -298,16 +299,15 @@ export default {
], ],
prank: [ prank: [
{ required: true, message: '请输入prank', trigger: 'change' }, { required: true, message: '请输入prank', trigger: 'change' },
{ pattern: /^[0-9]+(\.[0-9]+)?$/, message: '请输入纯数字或小数', trigger: 'change' }], { pattern: /^-?\d+$/, message: '请输入纯数字', trigger: 'change' }],
pissb: [ pissb: [
{ required: true, message: '请选择pissb', trigger: 'blur' } { required: true, message: '请选择pissb', trigger: 'blur' }
], ],
psm: [ psm: [
{ required: true, message: '请输入psm', trigger: 'change' }, { required: true, message: '请输入psm', trigger: 'change' },
{ pattern: /^[0-9]+(\.[0-9]+)?$/, message: '请输入纯数字或小数', trigger: 'change' }], { pattern: /^-?\d+$/, message: '请输入纯数字', trigger: 'change' }],
psy: [ psy: [
{ required: true, message: '请输入psy', trigger: 'change' }, { required: true, message: '请输入psy', trigger: 'change' }
{ pattern: /^[0-9]+(\.[0-9]+)?$/, message: '请输入纯数字或小数', trigger: 'change' }
] ]
}, },
deptOptions: [] deptOptions: []
...@@ -471,6 +471,7 @@ export default { ...@@ -471,6 +471,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.open = false this.open = false
this.$message.success('操作成功') this.$message.success('操作成功')
this.queryParams.page = 1
this.getList() this.getList()
this.reFrom() this.reFrom()
} else if (res.code === null) { } else if (res.code === null) {
...@@ -482,6 +483,7 @@ export default { ...@@ -482,6 +483,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.open = false this.open = false
this.$message.success('操作成功') this.$message.success('操作成功')
this.queryParams.page = 1
this.getList() this.getList()
this.reFrom() this.reFrom()
} else if (res.code === null) { } else if (res.code === null) {
......
...@@ -317,9 +317,18 @@ export default { ...@@ -317,9 +317,18 @@ export default {
}, },
// 表单校验 // 表单校验
rules: { rules: {
pn: [{ required: true, message: '请输入pn', trigger: 'blur' }], pn: [
lot: [{ required: true, message: '请输入lot', trigger: 'blur' }], { required: true, message: '请输入pn', trigger: 'change' },
plocation: [{ required: true, message: '请输入plocation', trigger: 'blur' }], { pattern: /^[^[\uD800-\uDFFF]+$/, message: '不能包含表情符号', trigger: 'change' }
],
lot: [
{ required: true, message: '请输入lot', trigger: 'blur' },
{ pattern: /^[^[\uD800-\uDFFF]+$/, message: '不能包含表情符号', trigger: 'change' }
],
plocation: [
{ required: true, message: '请输入plocation', trigger: 'blur' },
{ pattern: /^[^[\uD800-\uDFFF]+$/, message: '不能包含表情符号', trigger: 'change' }
],
phd: [{ pattern: /^[0-9]{1,9}(\.[0-9]{1,3})?$/, message: '仅能输入数字和小数,限制三位小数', trigger: 'change' }], phd: [{ pattern: /^[0-9]{1,9}(\.[0-9]{1,3})?$/, message: '仅能输入数字和小数,限制三位小数', trigger: 'change' }],
psm: [{ pattern: /^[0-9]{1,9}(\.[0-9]{1,3})?$/, message: '仅能输入数字和小数,限制三位小数', trigger: 'change' }], psm: [{ pattern: /^[0-9]{1,9}(\.[0-9]{1,3})?$/, message: '仅能输入数字和小数,限制三位小数', trigger: 'change' }],
pzl: [{ pattern: /^[0-9]{1,9}(\.[0-9]{1,3})?$/, message: '仅能输入数字和小数,限制三位小数', trigger: 'change' }], pzl: [{ pattern: /^[0-9]{1,9}(\.[0-9]{1,3})?$/, message: '仅能输入数字和小数,限制三位小数', trigger: 'change' }],
......
...@@ -673,7 +673,7 @@ export default { ...@@ -673,7 +673,7 @@ export default {
this.queryParams={ this.queryParams={
page: 1, page: 1,
rows: 10, rows: 10,
ptype: 2 ptype: 1
} }
this.resetForm('queryForm') this.resetForm('queryForm')
this.handleQuery() this.handleQuery()
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<div class="mb12 font-small-bold">设备领用</div> <div class="mb12 font-small-bold">设备领用</div>
<el-table v-loading="loading" border :data="equipmentapplyList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="equipmentapplyList" @selection-change="handleSelectionChange">
<el-table-column type="index" label="序号" width="50" /> <el-table-column type="index" label="序号" width="50" />
<el-table-column label="pn" prop="pn"> <el-table-column label="pn" prop="pn" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.pn || '-' }} {{ scope.row.pn || '-' }}
</template> </template>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
{{ scope.row.phd || '-' }} {{ scope.row.phd || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="prank" prop="prank"> <el-table-column label="prank" prop="prank" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.prank || '-' }} {{ scope.row.prank || '-' }}
</template> </template>
...@@ -459,6 +459,7 @@ export default { ...@@ -459,6 +459,7 @@ export default {
next() next()
}, },
created() { created() {
this.resetQuery()
if (this.$store.getters.searchParams[this.$route.path]) { if (this.$store.getters.searchParams[this.$route.path]) {
const { searchParams } = this.$store.getters; const { path } = this.$route const { searchParams } = this.$store.getters; const { path } = this.$route
const param = JSON.parse(searchParams[path]) // 保留着的查询条件 const param = JSON.parse(searchParams[path]) // 保留着的查询条件
...@@ -598,8 +599,15 @@ export default { ...@@ -598,8 +599,15 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams = {
page: 1,
rows: 10,
pn: '',
phd: '',
prank: '',
pstatus: ''
}
// this.dateRange = [] // this.dateRange = []
this.resetForm('queryForm')
this.handleQuery() this.handleQuery()
}, },
// warehouse的重置按钮 // warehouse的重置按钮
......
...@@ -109,14 +109,17 @@ export default { ...@@ -109,14 +109,17 @@ export default {
rule: { rule: {
pn: [ pn: [
{ required: true, message: '请输入pn', trigger: 'blur' }, { required: true, message: '请输入pn', trigger: 'blur' },
{ pattern: /^[^[\uD800-\uDFFF]+$/, message: '不能包含表情符号', trigger: 'change' },
{ max: 100, message: '输入长度不能超过100个字符', trigger: 'change' } { max: 100, message: '输入长度不能超过100个字符', trigger: 'change' }
], ],
lot: [ lot: [
{ required: true, message: '请输入lot', trigger: 'blur' }, { required: true, message: '请输入lot', trigger: 'blur' },
{ pattern: /^[^[\uD800-\uDFFF]+$/, message: '不能包含表情符号', trigger: 'change' },
{ max: 100, message: '输入长度不能超过100个字符', trigger: 'change' } { max: 100, message: '输入长度不能超过100个字符', trigger: 'change' }
], ],
plocation: [ plocation: [
{ required: true, message: '请输入位置', trigger: 'blur' }, { required: true, message: '请输入位置', trigger: 'blur' },
{ pattern: /^[^[\uD800-\uDFFF]+$/, message: '不能包含表情符号', trigger: 'change' },
{ max: 100, message: '输入长度不能超过100个字符', trigger: 'change' } { max: 100, message: '输入长度不能超过100个字符', trigger: 'change' }
], ],
phd: [{ pattern: /^\d+$/, message: '仅能输入整数', trigger: 'change' }] phd: [{ pattern: /^\d+$/, message: '仅能输入整数', trigger: 'change' }]
......
...@@ -336,9 +336,18 @@ export default { ...@@ -336,9 +336,18 @@ export default {
}, },
// 表单校验 // 表单校验
rules: { rules: {
pn: [{ required: true, message: '请输入pn', trigger: 'blur' }], pn: [
lot: [{ required: true, message: '请输入lot', trigger: 'blur' }], { required: true, message: '请输入pn', trigger: 'change' },
plocation: [{ required: true, message: '请输入plocation', trigger: 'blur' }], { pattern: /^[^[\uD800-\uDFFF]+$/, message: '不能包含表情符号', trigger: 'change' }
],
lot: [
{ required: true, message: '请输入lot', trigger: 'blur' },
{ pattern: /^[^[\uD800-\uDFFF]+$/, message: '不能包含表情符号', trigger: 'change' }
],
plocation: [
{ required: true, message: '请输入plocation', trigger: 'blur' },
{ pattern: /^[^[\uD800-\uDFFF]+$/, message: '不能包含表情符号', trigger: 'change' }
],
phd: [{ pattern: /^[0-9]{1,9}(\.[0-9]{1,3})?$/, message: '仅能输入数字和小数,限制三位小数', trigger: 'change' }], phd: [{ pattern: /^[0-9]{1,9}(\.[0-9]{1,3})?$/, message: '仅能输入数字和小数,限制三位小数', trigger: 'change' }],
psm: [{ pattern: /^[0-9]{1,9}(\.[0-9]{1,3})?$/, message: '仅能输入数字和小数,限制三位小数', trigger: 'change' }], psm: [{ pattern: /^[0-9]{1,9}(\.[0-9]{1,3})?$/, message: '仅能输入数字和小数,限制三位小数', trigger: 'change' }],
pzl: [{ pattern: /^[0-9]{1,9}(\.[0-9]{1,3})?$/, message: '仅能输入数字和小数,限制三位小数', trigger: 'change' }], pzl: [{ pattern: /^[0-9]{1,9}(\.[0-9]{1,3})?$/, message: '仅能输入数字和小数,限制三位小数', trigger: 'change' }],
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<div class="mb12 font-small-bold">设备领用</div> <div class="mb12 font-small-bold">设备领用</div>
<el-table v-loading="loading" border :data="equipmentapplyList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="equipmentapplyList" @selection-change="handleSelectionChange">
<el-table-column type="index" label="序号" width="50" /> <el-table-column type="index" label="序号" width="50" />
<el-table-column label="pn" prop="pn"> <el-table-column label="pn" prop="pn" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.pn || '-' }} {{ scope.row.pn || '-' }}
</template> </template>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
{{ scope.row.phd || '-' }} {{ scope.row.phd || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="prank" prop="prank"> <el-table-column label="prank" prop="prank" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.prank || '-' }} {{ scope.row.prank || '-' }}
</template> </template>
...@@ -235,13 +235,6 @@ ...@@ -235,13 +235,6 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <pagination-->
<!-- v-show="totalDetail>0"-->
<!-- :total="totalDetail"-->
<!-- :page.sync="queryParams.page"-->
<!-- :limit.sync="queryParams.rows"-->
<!-- @pagination="getDeviceList"-->
<!-- />-->
</el-dialog> </el-dialog>
<!-- TODO: 处理 --> <!-- TODO: 处理 -->
...@@ -348,7 +341,7 @@ ...@@ -348,7 +341,7 @@
import { listWbApply, deleteLogical, detailList, batchAddition, detail } from '@/api/equipment/draw' import { listWbApply, deleteLogical, detailList, batchAddition, detail } from '@/api/equipment/draw'
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
export default { export default {
name: 'Role', name: 'Draw',
data() { data() {
return { return {
totalApplyDetail: 0, totalApplyDetail: 0,
...@@ -431,7 +424,7 @@ export default { ...@@ -431,7 +424,7 @@ export default {
pn: undefined, pn: undefined,
lot: undefined, lot: undefined,
plocation: undefined, plocation: undefined,
ptype: 2, ptype: 1,
delFlag: 0 delFlag: 0
}, },
// 查询warehouse的参数 // 查询warehouse的参数
...@@ -441,7 +434,7 @@ export default { ...@@ -441,7 +434,7 @@ export default {
pn: undefined, pn: undefined,
lot: undefined, lot: undefined,
plocation: undefined, plocation: undefined,
ptype: 1, ptype: 2,
delFlag: 0 delFlag: 0
}, },
// 表单参数 // 表单参数
...@@ -466,6 +459,7 @@ export default { ...@@ -466,6 +459,7 @@ export default {
next() next()
}, },
created() { created() {
this.resetQuery()
if (this.$store.getters.searchParams[this.$route.path]) { if (this.$store.getters.searchParams[this.$route.path]) {
const { searchParams } = this.$store.getters; const { path } = this.$route const { searchParams } = this.$store.getters; const { path } = this.$route
const param = JSON.parse(searchParams[path]) // 保留着的查询条件 const param = JSON.parse(searchParams[path]) // 保留着的查询条件
...@@ -605,8 +599,15 @@ export default { ...@@ -605,8 +599,15 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams = {
page: 1,
rows: 10,
pn: '',
phd: '',
prank: '',
pstatus: ''
}
// this.dateRange = [] // this.dateRange = []
this.resetForm('queryForm')
this.handleQuery() this.handleQuery()
}, },
// warehouse的重置按钮 // warehouse的重置按钮
......
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