Commit 83ed0627 authored by 刘宇扬's avatar 刘宇扬

入库

parent e3427136
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</template> </template>
<script> <script>
import { getDictData, addIncome } from '@/api/income' import { add, updatadevice } from '@/api/magnagement'
export default { export default {
name: 'Role', name: 'Role',
...@@ -102,17 +102,40 @@ export default { ...@@ -102,17 +102,40 @@ export default {
}, },
// 提交时要调的接口 // 提交时要调的接口
submitForm() { submitForm() {
}, this.$refs.form.validate((valid) => {
// 调数据字典查询 if (valid) {
getDict() { console.log('form', this.form)
const obj = { // 校验通过,提交表单或进行其他操作
key: 'GX_CODE' if (this.form.businessId !== undefined) {
updatadevice(this.form).then(res => {
if (res.code === 200) {
this.open = false
this.$message.success('操作成功')
this.getList()
this.reFrom()
} else if (res.code === null) {
this.$message.error(res.message)
}
})
} else {
add(this.form).then(res => {
if (res.code === 200) {
this.open = false
this.$message.success('操作成功')
this.getList()
this.reFrom()
} else if (res.code === null) {
this.$message.error(res.message)
} }
getDictData(obj).then(res => { })
if (res.code === 200 && res.data !== null) { }
this.pissbList = res.data } else {
// 校验失败,显示错误信息或进行其他操作
} }
}) })
},
// 调数据字典查询
getDict() {
} }
} }
} }
......
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