From 48dcf2c7f01de5078f6a7f94dbc59400100e9ab6 Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期三, 23 十月 2024 11:05:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue |   27 +++++++++++++++++----------
 1 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue b/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
index cf6daf8..ccdfae3 100644
--- a/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
+++ b/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
@@ -1,22 +1,25 @@
 <template>
-  <zt-dialog ref="dialog" @confirm="formSubmit">
+  <zt-dialog ref="dialog" @confirm="formSubmit" :hasConfirm="true">
     <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px">
-      <zt-form-item label="涓婄骇绯荤粺" prop="pid" v-if="isShow">
+      <zt-form-item label="涓婄骇鑺傜偣" prop="pid" v-if="isShow">
         <zt-combo-tree v-model="dataForm.pid" :datas="productList"/>
       </zt-form-item>
       <zt-form-item label="鍚嶇О" prop="name" rules="required">
         <el-input v-model="dataForm.name"></el-input>
       </zt-form-item>
+      <zt-form-item v-if="dataForm.productType==='5'" prop="equipType" label="璁惧绫诲瀷" rules="required">
+        <el-input v-model="dataForm.equipType"></el-input>
+      </zt-form-item>
       <zt-form-item label="鑺傜偣绫诲瀷" prop="productType" rules="required">
         <zt-dict v-model="dataForm.productType" dict="product" @input="getDefaultImg"
                  :disabled="disabled"></zt-dict>
       </zt-form-item>
-      <zt-form-item label="杩愯鐘舵�佸浘" prop="operatImg">
+      <zt-form-item  v-if="dataForm.productType!=='1'" label="杩愯鐘舵�佸浘" prop="operatImg">
         <el-input v-model="dataForm.operatImgName" @focus="selectPicture()"></el-input>
         <el-image v-if="dataForm.operatImg" :src="url+dataForm.operatImg" style="height: 50px;width: 50px"></el-image>
       </zt-form-item>
       <zt-form-item label="鎺掑簭" prop="sort">
-        <el-input v-model="dataForm.sort" :readonly="readonly"></el-input>
+        <el-input v-model="dataForm.sort" readonly="false"></el-input>
       </zt-form-item>
     </el-form>
     <PictureSelect ref="pictureSelect" @setPicture="openAddWin">
@@ -40,10 +43,12 @@
           id: '',
           pid: '',
           name: '',
+          shipId: '',
           productType: '',
           operatImg: '',
           operatImgName: '',
           sort: '',
+          equipType: '',
           status: ''
         }
       }
@@ -53,21 +58,24 @@
     },
     methods: {
       init(id, params) {
+        this.getProductList()
+        if (params.shipId) {
+          this.dataForm.shipId = params.shipId
+        }
         if (params.type === 'xh') {
           this.isShow = false
           this.dataForm.pid = null
-          this.dataForm.productType = 1
+          this.dataForm.productType = '1'
           this.getDefaultImg(this.dataForm.productType)
         } else if (params.type === 'zt') {
           this.dataForm.pid = params.pid
-          this.dataForm.productType = 2
-          this.getProductList()
+          this.dataForm.productType = '2'
           this.getDefaultImg(this.dataForm.productType)
         } else {
           this.dataForm.pid = params.pid
           this.dataForm.productType = params.type
         }
-        if (this.dataForm.productType === 10 && id == null) {
+        if (this.dataForm.productType === '10' && id == null) {
           this.isShow = false
           this.getDefaultImg(this.dataForm.productType)
         }
@@ -84,7 +92,7 @@
           productType: selected
         }
         let res = await this.$http.get(`/sysPictureBase/getDefaultImg`, {params: params})
-        if (res.data){
+        if (res.data) {
           this.dataForm.operatImgName = res.data.name
           this.dataForm.operatImg = res.data.id
         }
@@ -122,7 +130,6 @@
           await this.$tip.success()
           this.$refs.dialog.close()
           this.$emit('refreshDataList')
-          this.map.clear()
         }
       }
     }

--
Gitblit v1.9.1