소스 검색

bug修复【ID1007628】

chenrui 4 년 전
부모
커밋
cab4c6c364
1개의 변경된 파일11개의 추가작업 그리고 11개의 파일을 삭제
  1. 11 11
      src/views/productManagement/productPricing/list.vue

+ 11 - 11
src/views/productManagement/productPricing/list.vue

@@ -83,6 +83,16 @@
       <template slot="pricingState" slot-scope="text, record">
         <a-badge :color="record.pricingState=='WAIT_PRICING'?'gold':record.pricingState=='WAIT_PRICING_AUDIT'?'volcano':'#87d068'" :text="record.pricingStateDictValue" />
       </template>
+      <!-- 成本价 -->
+      <template slot="sterminaldsdPrice" slot-scope="text, record">
+        <div v-if="record.supplierProductList">
+          <p v-for="(item, index) in record.supplierProductList" :key="index" style="margin: 0;">
+            <span>{{ (item.cost || item.cost==0) ? item.cost.toFixed(2):'--' }}</span>元 -
+            <span>{{ item.supplierName }}</span>;
+          </p>
+        </div>
+        <span v-else>--</span>
+      </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
         <a-button
@@ -136,7 +146,7 @@ export default {
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
         { title: '产品状态', dataIndex: 'stateDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '定价状态', scopedSlots: { customRender: 'pricingState' }, width: 140, align: 'center' },
-        { title: '成本价', dataIndex: 'sterminaldsdPrice', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '成本价', scopedSlots: { customRender: 'sterminaldsdPrice' }, width: 200, align: 'center' },
         { title: '省级价', dataIndex: 'provincePrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '市级价', dataIndex: 'cityPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '特约价', dataIndex: 'specialPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -155,16 +165,6 @@ 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 supplierProductList = data.list[i].supplierProductList
-            if (supplierProductList && supplierProductList.length > 0) {
-              data.list[i].sterminaldsdPrice = ''
-              supplierProductList.map(item => {
-                data.list[i].sterminaldsdPrice += '【' + ((item.cost || item.cost == 0) ? item.cost.toFixed(2) : '--') + '元 - ' + item.supplierName + '】'
-              })
-            } else {
-              data.list[i].sterminaldsdPrice = ''
-            }
           }
           this.total = data.count || 0
           this.disabled = false