From ed6c6350015d52ea1cb033c7558f72b721ece84a Mon Sep 17 00:00:00 2001
From: WangHan <wwh_work@126,com>
Date: 星期四, 19 十二月 2024 19:58:55 +0800
Subject: [PATCH] 打包名称修改,去除错误输出

---
 admin-web/src/views/foundation/material/edit.vue |   22 +++++++---------------
 1 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/admin-web/src/views/foundation/material/edit.vue b/admin-web/src/views/foundation/material/edit.vue
index 37b9590..7ea95fd 100644
--- a/admin-web/src/views/foundation/material/edit.vue
+++ b/admin-web/src/views/foundation/material/edit.vue
@@ -9,10 +9,6 @@
                   style="width: 100%"/>
       </el-form-item>
       <el-form-item label="鐗╁搧鍒嗙被" prop="categoryId">
-        <!--        <el-select v-model="formData.categoryId" clearable placeholder="璇烽�夋嫨" style="width: 100%">
-                  <el-option v-for="item in categoryList" :key="item.id" :label="item.categoryName"
-                             :value="item.id"></el-option>
-                </el-select>-->
         <el-cascader
             clearable
             filterable
@@ -25,7 +21,7 @@
       <el-row :gutter="20" v-for="(m, i) in formData.models">
         <el-col :span="9">
           <el-form-item label="瑙勬牸鍨嬪彿" :prop="`models.${i}.modelName`" :rules="rules.modelName">
-            <el-input v-model="m.modelName" placeholder="璇疯緭鍏ヨ鏍煎瀷鍙峰悕绉�" clearable maxlength="20" show-word-limit
+            <el-input :disabled="!!setting.id" v-model="m.modelName" placeholder="璇疯緭鍏ヨ鏍煎瀷鍙峰悕绉�" clearable maxlength="20" show-word-limit
                       style="width: 100%"/>
           </el-form-item>
         </el-col>
@@ -57,7 +53,7 @@
 <script>
 import winMd from '@/components/win/win-md'
 import myButton from '@/components/myButton/myButton'
-import * as finsystenant from '@/api/baseSetting/finsystenant'
+import {addGoods,editGoods,goodsDetail} from "@/api/foudation/material";
 import {getTree} from '@/api/foudation/classification';
 import {mapGetters} from 'vuex'
 
@@ -111,7 +107,7 @@
   },
   async created() {
     if (this.setting.id) {
-      await finsystenant.editmaterial(this.setting.id).then(res => {
+      await goodsDetail(this.setting.id).then(res => {
         this.formData = res
         if (!this.formData.agencyId) {
           this.formData.agencyId = this.userInfo.tenantId
@@ -155,7 +151,7 @@
           this.loading = true
           if (this.setting.id) {
             // 缂栬緫鎺ュ彛
-            finsystenant.editcode(params).then(res => {
+            editGoods(params).then(res => {
               this.loading = false
               if (res) {
                 this.$message.success('淇濆瓨鎴愬姛锛�')
@@ -164,12 +160,10 @@
               } else {
                 this.$message.error('淇濆瓨澶辫触')
               }
-            }).catch(() => {
-              this.loading = false
-            });
+            })
           } else {
             params.orgId = this.setting.orgId
-            finsystenant.addcode(params).then(res => {
+            addGoods(params).then(res => {
               this.loading = false
               if (res) {
                 this.$message.success('淇濆瓨鎴愬姛锛�')
@@ -178,9 +172,7 @@
               } else {
                 this.$message.error('淇濆瓨澶辫触')
               }
-            }).catch(() => {
-              this.loading = false
-            });
+            })
           }
         } else {
           this.$message.error('鏍¢獙鏈�氳繃锛岃妫�鏌ャ��')

--
Gitblit v1.9.1