Преглед на файлове

Merge branch 'deploy' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into deploy

lilei преди 4 години
родител
ревизия
08b951c0d5

+ 16 - 5
src/views/productManagement/productInfo/detailModal.vue

@@ -29,11 +29,18 @@
             @click="getPreview(item.url)" />
         </a-descriptions-item>
         <a-descriptions-item label="单位:">{{ detailsData.unit || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="产品尺寸:">{{ (detailsData.size || detailsData.size==0) ? detailsData.size : '--' }}</a-descriptions-item>
-        <a-descriptions-item label="产品重量:">{{ (detailsData.weight || detailsData.weight==0) ? detailsData.weight : '--' }}</a-descriptions-item>
-        <a-descriptions-item label="颜色:">{{ detailsData.color || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="产品说明:">{{ detailsData.productBrandName || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="其他说明:">{{ detailsData.productBrandName || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="产品尺寸:">{{ detailsData.size || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="产品内盒尺寸:">{{ detailsData.boxSize || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="产品重量:">{{ detailsData.weight || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="颜色:" span="2">{{ detailsData.color || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="产品说明:" span="2">
+          <div v-html="detailsData.description" v-if="detailsData.description"></div>
+          <div v-else>--</div>
+        </a-descriptions-item>
+        <a-descriptions-item label="其他说明:" span="2">
+          <div v-html="detailsData.otherDesc" v-if="detailsData.otherDesc"></div>
+          <div v-else>--</div>
+        </a-descriptions-item>
       </a-descriptions>
       <div class="btn-cont"><a-button id="product-management-detail-modal-back" @click="isShow = false">返回列表</a-button></div>
     </div>
@@ -118,6 +125,7 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.detailsData = null
       }
     },
     itemSn (newValue, oldValue) {
@@ -143,5 +151,8 @@ export default {
       text-align: center;
       margin: 35px 0 10px;
     }
+    .ant-descriptions-item-label.ant-descriptions-item-colon{
+      width: 130px;
+    }
   }
 </style>

+ 29 - 17
src/views/productManagement/productInfo/edit.vue

@@ -25,7 +25,7 @@
               <a-input
                 id="productInfoEdit-code"
                 :maxLength="100"
-                :disabled="!!$route.params.id"
+                :disabled="form.state!='WAIT'"
                 v-model="form.code"
                 placeholder="请输入产品编码(最多100个字符)"
                 allowClear />
@@ -61,14 +61,14 @@
                 :showSearch="true"
                 option-filter-prop="children"
                 :filter-option="filterOption">
-                <a-select-option v-for="item in productBrandList" :key="item.productBrandSn" :value="item.productBrandSn" :disabled="item.enabledFlag==0">{{ item.productBrandName }}</a-select-option>
+                <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn" :disabled="item.enabledFlag==0">{{ item.brandName }}</a-select-option>
               </a-select>
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <a-form-model-item label="产品分类" prop="productType">
               <a-cascader
-                :disabled="!!$route.params.id"
+                :disabled="form.state!='WAIT'"
                 expand-trigger="hover"
                 @change="changeProductType"
                 :options="productTypeList"
@@ -81,13 +81,13 @@
           </a-col>
           <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <a-form-model-item label="单位" prop="unit">
-              <a-select
+              <v-select
+                code="PRODUCT_UNIT"
                 id="productInfoEdit-unit"
-                placeholder="请选择单位"
+                v-model="form.unit"
                 allowClear
-                v-model="form.unit">
-                <a-select-option v-for="item in productBrandList" :key="item.productBrandSn" :value="item.productBrandSn">{{ item.productBrandName }}</a-select-option>
-              </a-select>
+                placeholder="请选择单位"
+              ></v-select>
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
@@ -104,9 +104,13 @@
                     style="width: 70%;" /><span>/单位</span>
                 </a-col>
                 <a-col :span="10">
-                  <a-select placeholder="包装数单位" id="productLevelEdit-packQtyUnit" v-model="form.packQtyUnit">
-                    <a-select-option v-for="item in productBrandList" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
-                  </a-select>
+                  <v-select
+                    code="PRODUCT_UNIT"
+                    id="productLevelEdit-packQtyUnit"
+                    v-model="form.packQtyUnit"
+                    allowClear
+                    placeholder="包装数单位"
+                  ></v-select>
                 </a-col>
               </a-row>
             </a-form-model-item>
@@ -114,7 +118,7 @@
           <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <a-form-model-item label="箭冠产品" prop="arrowFalg">
               <v-select
-                code="FLAG"
+                code="ARROW_FALG"
                 id="productInfoEdit-arrowFalg"
                 v-model="form.arrowFalg"
                 allowClear
@@ -160,19 +164,22 @@
           </a-col>
           <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <a-form-model-item label="颜色" prop="color">
-              <a-select placeholder="请选择颜色" id="productLevelEdit-color" allowClear v-model="form.color">
-                <a-select-option v-for="item in productBrandList" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
-              </a-select>
+              <a-input
+                v-model.trim="form.color"
+                id="productLevelEdit-color"
+                :maxLength="50"
+                allowClear
+                placeholder="请输入颜色(最多50个字符)" />
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <a-form-model-item label="产品内尺寸" prop="boxSize">
+            <a-form-model-item label="产品内尺寸" prop="boxSize">
               <a-input
                 v-model.trim="form.boxSize"
                 id="productInfoEdit-boxSize"
                 :maxLength="50"
                 allowClear
-                placeholder="请输入产品内尺寸(最多50个字符)" />
+                placeholder="请输入产品内尺寸(最多50个字符)" />
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
@@ -222,6 +229,8 @@ export default {
         origCode: '', //  原厂编码
         otherCode: '', // 其他编码
         productBrandSn: undefined, //  产品品牌
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
         productType: [], //  产品分类
         unit: undefined, //  单位
@@ -270,6 +279,7 @@ export default {
         if (res.status == 200) {
           const data = res.data
           this.form = Object.assign(this.form, data)
+          console.log(this.form)
           this.form.productType = [ this.form.productTypeSn1, this.form.productTypeSn2, this.form.productTypeSn3 ]
           this.$refs.editor.setHtml(res.data.description)
           this.$refs.otherDesc.setHtml(res.data.otherDesc)
@@ -323,6 +333,8 @@ export default {
     },
     //  产品分类  change
     changeProductType (val, opt) {
+      this.form.productTypeSn1 = val[0] ? val[0] : ''
+      this.form.productTypeSn2 = val[1] ? val[1] : ''
       this.form.productTypeSn3 = val[2] ? val[2] : ''
     },
     //  产品品牌  列表

+ 2 - 2
src/views/productManagement/productInfo/list.vue

@@ -101,7 +101,7 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 2090, y: tableHeight }"
+      :scroll="{ x: 2150, y: tableHeight }"
       bordered>
       <!-- 自定义表头 -->
       <template slot="arrowFalgTitle">
@@ -193,7 +193,7 @@ export default {
         { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'code', width: 220, align: 'center' },
         { title: '原厂编码', dataIndex: 'origCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'productBrandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'productBrandName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
         { slots: { title: 'arrowFalgTitle' }, scopedSlots: { customRender: 'arrowFalg' }, width: 100, align: 'center' },
         { title: '最近修改时间', dataIndex: 'updateDate', width: 160, align: 'center' },