Commit 37bc7bab authored by wdy's avatar wdy

再利用

parent 13e3bd34
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 表单区域-->
<el-form ref="form" :model="form" :rules="rule" label-width="80px"> <el-form ref="form" :model="form" :rules="rule" label-width="80px">
<!-- 标题-->
<div class="info"><span class="title">再利用</span></div> <div class="info"><span class="title">再利用</span></div>
<el-row :gutter="40"> <el-row :gutter="40">
<el-col :span="12" style="padding-left: 10%;"> <el-col :span="12" style="padding-left: 10%;">
...@@ -91,6 +93,7 @@ export default { ...@@ -91,6 +93,7 @@ export default {
created() { created() {
}, },
methods: { methods: {
// 回车跳转下一个输入框
focusNextInput(form) { focusNextInput(form) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs[form].$refs.input.focus() this.$refs[form].$refs.input.focus()
...@@ -107,7 +110,7 @@ export default { ...@@ -107,7 +110,7 @@ export default {
that.$refs['input' + index].focus() that.$refs['input' + index].focus()
}) })
}, },
// 提价时要调的接口 // 提价
submitForm() { submitForm() {
this.$confirm('是否确认提交?', '提示', { this.$confirm('是否确认提交?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -116,6 +119,7 @@ export default { ...@@ -116,6 +119,7 @@ export default {
}).then(res => { }).then(res => {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
// 提价时要调的接口
recycle(this.form).then(res => { recycle(this.form).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success('操作成功') this.$message.success('操作成功')
...@@ -128,6 +132,7 @@ export default { ...@@ -128,6 +132,7 @@ export default {
}) })
}) })
}, },
// 重置表单
resetFrom() { resetFrom() {
this.form = { this.form = {
pn: '', pn: '',
...@@ -141,6 +146,7 @@ export default { ...@@ -141,6 +146,7 @@ export default {
ptype: '', ptype: '',
pstatus: 0 pstatus: 0
} }
// 重置表单校验
this.$refs.form.clearValidate() this.$refs.form.clearValidate()
} }
} }
......
...@@ -169,6 +169,7 @@ export default { ...@@ -169,6 +169,7 @@ export default {
}, },
total: 0, total: 0,
loading: false, loading: false,
// 查询参数
queryParams: { queryParams: {
page: 1, page: 1,
rows: 10, rows: 10,
...@@ -176,7 +177,7 @@ export default { ...@@ -176,7 +177,7 @@ export default {
dname: '', dname: '',
dno: '' dno: ''
}, },
statusOptions: {}, // 表格绑定数据
basicinfoMationList: [] basicinfoMationList: []
} }
}, },
......
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