Browse Source

bug修复 包装数

chenrui 4 years ago
parent
commit
f673da6b38

+ 1 - 1
src/views/productManagement/productInfo/detailModal.vue

@@ -17,7 +17,7 @@
         <a-descriptions-item label="产品品牌:">{{ detailsData.productBrandName || '--' }}</a-descriptions-item>
         <a-descriptions-item label="产品分类:">{{ productTypeName || '--' }}</a-descriptions-item>
         <a-descriptions-item label="其他编码:">{{ detailsData.otherCode || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="包装规格:">{{ detailsData.packQty || '--' }}{{ detailsData.packQtyUnit || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="包装数:">{{ detailsData.packQty || '--' }}{{ detailsData.unit || '--' }}/{{ detailsData.packQtyUnit || '--' }}</a-descriptions-item>
         <a-descriptions-item label="箭冠产品:">{{ detailsData.arrowFalgDictValue || '--' }}</a-descriptions-item>
         <a-descriptions-item label="产品图片:" :span="2">
           <div style="display: flex;">

+ 1 - 1
src/views/productManagement/productInfo/edit.vue

@@ -101,7 +101,7 @@
                     :min="1"
                     :max="999999"
                     placeholder="请输入"
-                    style="width: 70%;" /><span>/单位</span>
+                    style="width: 70%;" /><span>{{ form.unit }}/</span>
                 </a-col>
                 <a-col :span="10">
                   <v-select

+ 6 - 2
src/views/productManagement/productLevel/list.vue

@@ -73,7 +73,7 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1310 }"
+      :scroll="{ x: 1590 }"
       bordered>
       <!-- 产品分类 -->
       <template slot="productType" slot-scope="text, record">
@@ -122,7 +122,7 @@ export default {
         { title: '原厂编码', dataIndex: 'origCode', width: 220, 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' },
-        { title: '装箱数', dataIndex: 'packQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '包装数', dataIndex: 'packQtyV', width: 150, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'packQtyUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品级别', dataIndex: 'level', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
@@ -138,6 +138,10 @@ export default {
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
+            const packQty = (data.list[i].packQty || data.list[i].packQty == 0) ? data.list[i].packQty : '--'
+            const unit = data.list[i].unit || '--'
+            const packQtyUnit = data.list[i].packQtyUnit || '--'
+            data.list[i].packQtyV = packQty + unit + '/' + packQtyUnit
           }
           this.disabled = false
           return data