lilei vor 2 Jahren
Ursprung
Commit
4283d5a53b
1 geänderte Dateien mit 15 neuen und 11 gelöschten Zeilen
  1. 15 11
      src/views/salesManagement/sendOutOrder/chooseImportModal.vue

+ 15 - 11
src/views/salesManagement/sendOutOrder/chooseImportModal.vue

@@ -37,16 +37,6 @@
         :scroll="{ y: 200 }"
         :pagination="false"
         bordered>
-        <template slot="errorMsg" slot-scope="text,record">
-          <a-popover placement="topRight">
-            <template slot="content">
-              <p v-for="d in record.importErrorMsgList">{{ d }}</p>
-            </template>
-            <a-button type="link">
-              查看
-            </a-button>
-          </a-popover>
-        </template>
       </a-table>
       <!-- 按钮 -->
       <div class="btn-con">
@@ -103,6 +93,20 @@ export default {
       }
       return obj
     }
+    const renderContentError = (value, row, index) => {
+      const obj = {
+        children: <a-popover placement="topRight">
+          <template slot="content">
+            { row.importErrorMsgList.map(item => { return <div>{item}</div> }) }
+          </template>
+          <a-button type="link">
+            查看
+          </a-button>
+        </a-popover>,
+        attrs: { rowSpan: row.sendBillDetailList ? row.sendBillDetailList.length : 0 }
+      }
+      return obj
+    }
     return {
       bloading: false,
       isShow: this.openModal, //  是否打开弹框
@@ -152,7 +156,7 @@ export default {
         { title: '送货费(元)', dataIndex: 'sendAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '其他(元)', dataIndex: 'otherAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '保价(万)', dataIndex: 'supportValue', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '错误说明', scopedSlots: { customRender: 'errorMsg' }, width: '10%', align: 'center' }
+        { title: '错误说明', dataIndex: 'importErrorMsgList', width: '10%', align: 'center', customRender: renderContentError }
       ],
       unLoadData: [],
       loading: false