From d9461a1740bbc5d8d03258e4db0722aa9655d712 Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期日, 07 四月 2024 08:34:00 +0800
Subject: [PATCH] 修改
---
web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue b/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
index 65addad..6a7cc85 100644
--- a/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
+++ b/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
@@ -42,7 +42,7 @@
name: '',
productType: '',
operatImg: '',
- operatImgName:'',
+ operatImgName: '',
sort: '',
status: ''
}
@@ -52,7 +52,7 @@
PictureSelect
},
methods: {
- init(id,params) {
+ init(id, params) {
if (params.type === 'tree') {
this.isTree = true
this.isShow = false
@@ -61,7 +61,11 @@
this.dataForm.pid = params.pid
this.dataForm.productType = params.type
}
+ if (this.dataForm.productType==='10'){
+
+ }
},
+
// 鑾峰彇绯荤粺鍒楄〃
async getProductList() {
let res = await this.$http.get('/basicInfo/XhProductModel/getProductList')
@@ -73,7 +77,7 @@
let params = {
productType: selected
}
- let res = await this.$http.get(`/sysPictureBase/getDefaultImg`, {params:params})
+ let res = await this.$http.get(`/sysPictureBase/getDefaultImg`, {params: params})
this.dataForm.operatImgName = res.data.name
this.dataForm.operatImg = res.data.id
},
@@ -95,6 +99,22 @@
},
// 琛ㄥ崟鎻愪氦
async formSubmit() {
+ let flag = true
+ if (this.isTree){
+ if (this.dataForm.productType !== '5' || this.dataForm.productType !== '4') {
+ this.$alert("涓嶆敮鎸佹柊澧炴鑺傜偣")
+ flag =false
+ }
+ }else{
+ if (this.dataForm.productType === '5' || this.dataForm.productType === '4') {
+ this.$alert("涓嶆敮鎸佹柊澧炴鑺傜偣")
+ flag =false
+ }
+ }
+
+ if (!flag){
+ return
+ }
let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/basicInfo/XhProductModel/', this.dataForm)
if (res.success) {
await this.$tip.success()
--
Gitblit v1.9.1