|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div class="my-title">{{ title }}</div>
|
|
|
+ <div class="my-title">{{ id ? '编辑' : '新增' }}</div>
|
|
|
<el-form
|
|
|
:model="dataForm"
|
|
|
:rules="dataRule"
|
|
@@ -394,8 +394,6 @@ export default {
|
|
|
methods: {
|
|
|
init (id, type) {
|
|
|
this.id = id || 0
|
|
|
- this.type = type
|
|
|
- this.setTitle(type)
|
|
|
if (this.id) {
|
|
|
this.getDetail(this.id)
|
|
|
}
|
|
@@ -404,17 +402,6 @@ export default {
|
|
|
this.worderVisible = false
|
|
|
this.$emit('onChose')
|
|
|
},
|
|
|
- setTitle (type) {
|
|
|
- if (type === 'detail') {
|
|
|
- this.title = '查看'
|
|
|
- } else if (type === 'insert') {
|
|
|
- this.title = '新增'
|
|
|
- } else if (type === 'update') {
|
|
|
- this.title = '更新'
|
|
|
- } else if (type === 'first') {
|
|
|
- this.title = '初次报价'
|
|
|
- }
|
|
|
- },
|
|
|
getDetail (priceId) {
|
|
|
getDetail(priceId).then(({ data }) => {
|
|
|
if (data && data.code === '200') {
|