|
@@ -9,8 +9,8 @@
|
|
|
ref="productFormRef" style="max-width: 1000px;" class="flex a-c f-wrap" :size="fromSize">
|
|
ref="productFormRef" style="max-width: 1000px;" class="flex a-c f-wrap" :size="fromSize">
|
|
|
<ElCol :md="24" :lg="12">
|
|
<ElCol :md="24" :lg="12">
|
|
|
<el-form-item label="产品类型" prop="productType">
|
|
<el-form-item label="产品类型" prop="productType">
|
|
|
- <el-select v-model="productform.productType" :disabled="productType == '2' || type=='edit'" @change="productTypeChange"
|
|
|
|
|
- placeholder="请选择产品类型" clearable filterable>
|
|
|
|
|
|
|
+ <el-select v-model="productform.productType" :disabled="productType == '2' || type == 'edit'"
|
|
|
|
|
+ @change="productTypeChange" placeholder="请选择产品类型" clearable filterable>
|
|
|
<el-option label="主险" value="1" />
|
|
<el-option label="主险" value="1" />
|
|
|
<el-option label="附加险" value="2" />
|
|
<el-option label="附加险" value="2" />
|
|
|
</el-select>
|
|
</el-select>
|
|
@@ -18,7 +18,8 @@
|
|
|
</ElCol>
|
|
</ElCol>
|
|
|
<ElCol :md="24" :lg="12" v-if="productform.productType != '1'">
|
|
<ElCol :md="24" :lg="12" v-if="productform.productType != '1'">
|
|
|
<el-form-item label="上级产品" prop="parentId">
|
|
<el-form-item label="上级产品" prop="parentId">
|
|
|
- <el-select v-model="productform.parentId" :disabled="productType == '2' || type=='edit'" placeholder="请选择产品" clearable>
|
|
|
|
|
|
|
+ <el-select v-model="productform.parentId" :disabled="productType == '2' || type == 'edit'"
|
|
|
|
|
+ placeholder="请选择产品" clearable>
|
|
|
<el-option v-for="(item, index) in parentList" :key="index" :label="item.productName"
|
|
<el-option v-for="(item, index) in parentList" :key="index" :label="item.productName"
|
|
|
:value="item.id" />
|
|
:value="item.id" />
|
|
|
</el-select>
|
|
</el-select>
|
|
@@ -162,7 +163,7 @@
|
|
|
<ElButton type="primary" @click="submitForm(productFormRef)">
|
|
<ElButton type="primary" @click="submitForm(productFormRef)">
|
|
|
保存
|
|
保存
|
|
|
</ElButton>
|
|
</ElButton>
|
|
|
- <ElButton type="primary" @click="submitForm(productFormRef)">
|
|
|
|
|
|
|
+ <ElButton type="primary" @click="submitForm1(productFormRef)">
|
|
|
保存并继续添加
|
|
保存并继续添加
|
|
|
</ElButton>
|
|
</ElButton>
|
|
|
</FixedActionBar>
|
|
</FixedActionBar>
|
|
@@ -434,6 +435,47 @@ const submitForm = async (formEl: FormInstance | undefined) => {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+const submitForm1 = async (formEl: FormInstance | undefined) => {
|
|
|
|
|
+ if (!formEl) return
|
|
|
|
|
+ await formEl.validate((valid) => {
|
|
|
|
|
+ if (valid) {
|
|
|
|
|
+ if (id.value && type.value == 'edit') {
|
|
|
|
|
+ api.product.jyxupdateById(productform).then((res: any) => {
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: res.msg,
|
|
|
|
|
+ plain: true,
|
|
|
|
|
+ })
|
|
|
|
|
+ router.push({
|
|
|
|
|
+ name: 'reload',
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ api.product.jyxConfigAdd(productform).then((res: any) => {
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: res.msg,
|
|
|
|
|
+ plain: true,
|
|
|
|
|
+ })
|
|
|
|
|
+ router.push({
|
|
|
|
|
+ name: 'reload',
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'error',
|
|
|
|
|
+ message: '信息不完整',
|
|
|
|
|
+ plain: true,
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const blamesbimit = async (formEl: FormInstance | undefined) => {
|
|
const blamesbimit = async (formEl: FormInstance | undefined) => {
|
|
|
if (!formEl) return
|
|
if (!formEl) return
|
|
|
await formEl.validate((valid) => {
|
|
await formEl.validate((valid) => {
|