lilei 6 月之前
父节点
当前提交
6db5000f86
共有 1 个文件被更改,包括 6 次插入14 次删除
  1. 6 14
      src/views/salesManagement/waitDispatchNew/detailProductList.vue

+ 6 - 14
src/views/salesManagement/waitDispatchNew/detailProductList.vue

@@ -119,22 +119,14 @@ export default {
       }
       // 单号
       const codeFormat = function (record, data, h) {
-        let ftext = ''
-        let fcolor = ''
-        if (record.promotionFlag == 'GIFT') {
-          ftext = '促'
-          fcolor = '#52c41a'
-        }
-        if (record.promotionFlag == 'GATE') {
-          ftext = '槛'
-          fcolor = '#108ee9'
-        }
-
         return (
           <div>
-            <span style="padding-right: 15px;">{data}</span>
-            {ftext ? (<a-badge count={ftext} number-style={{ backgroundColor: fcolor, zoom: '80%' }}></a-badge>) : ''}
-            {Number(record.stockQty || 0) < Number(record.unpushedQty || 0) ? (<a-badge count="缺" number-style={{ zoom: '80%' }}></a-badge>) : ''}
+            <span style="padding-right: 10px;">{data}</span>
+            {record.promotionFlag.indexOf('GIFT') >= 0 ? <a-badge count="促" numberStyle={{ backgroundColor: '#52c41a', zoom: '0.7' }}/> : ''}
+            {record.promotionFlag.indexOf('DISCOUNT') >= 0 ? <a-badge count="特" numberStyle={{ backgroundColor: '#faad14', zoom: '0.7' }}/> : ''}
+            {record.promotionFlag.indexOf('GATE') >= 0 ? <a-badge count="槛" numberStyle={{ backgroundColor: '#108ee9', zoom: '0.7' }}/> : ''}
+            {record.promotionFlag.indexOf('REGULAR') >= 0 ? <a-badge count="正" numberStyle={{ backgroundColor: '#ff5500', zoom: '0.7' }}/> : ''}
+            {Number(record.stockQty || 0) < Number(record.unpushedQty || 0) ? (<a-badge count="缺" number-style={{ zoom: '0.7' }}></a-badge>) : ''}
           </div>
         )
       }