lilei 3 anos atrás
pai
commit
a11deaa192

+ 5 - 0
src/views/common/productBrand.js

@@ -7,6 +7,7 @@ const ProductBrand = {
         allowClear
         :value="defaultVal"
         :showSearch="true"
+        :disabled="disabled"
         @change="handleChange"
         option-filter-prop="children"
         :filter-option="filterOption">
@@ -29,6 +30,10 @@ const ProductBrand = {
     brandType: {
       type: String,
       default: ''
+    },
+    disabled: {
+      type: Boolean,
+      default: false
     }
   },
   data() {

+ 5 - 0
src/views/common/productTypeAll.js

@@ -7,6 +7,7 @@ const ProductType = {
         :value="defaultVal"
         expand-trigger="hover"
         :options="productTypeList"
+        :disabled="disabled"
         :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
         :id="id"
         placeholder="请选择产品分类"
@@ -22,6 +23,10 @@ const ProductType = {
     id: {
       type: String,
       default: ''
+    },
+    disabled: {
+      type: Boolean,
+      default: false
     }
   },
   data () {

+ 8 - 2
src/views/expenseManagement/expenseReimbursement/productInfoModal.vue

@@ -44,11 +44,17 @@
             </template>
             <!-- 产品品牌 -->
             <template slot="productBrand" slot-scope="text,record,index">
-              <ProductBrand style="width: 100%;" :id="'productBrand-'+index" @change="productBrandChange" v-model="record.productBrandSn"></ProductBrand>
+              <ProductBrand style="width: 100%;" :disabled="!!record.productCode" :id="'productBrand-'+index" @change="productBrandChange" v-model="record.productBrandSn"></ProductBrand>
             </template>
             <!-- 产品分类 -->
             <template slot="productType" slot-scope="text,record,index">
-              <ProductTypeAll style="width: 100%;" :ref="'productType-'+record.no" :id="'productType-'+index" v-model="record.productType" @change="changeProductType"></ProductTypeAll>
+              <ProductTypeAll
+                style="width: 100%;"
+                :disabled="!!record.productCode"
+                :ref="'productType-'+record.no"
+                :id="'productType-'+index"
+                v-model="record.productType"
+                @change="changeProductType"></ProductTypeAll>
             </template>
             <!-- 产品编码 -->
             <template slot="productCode" slot-scope="text,record,index">