lilei 1 year ago
parent
commit
3bb1d35761
1 changed files with 10 additions and 11 deletions
  1. 10 11
      src/views/salesManagement/salesQueryNew/stockOutDetailModal.vue

+ 10 - 11
src/views/salesManagement/salesQueryNew/stockOutDetailModal.vue

@@ -19,7 +19,8 @@
         class="sTable fixPagination"
         ref="table"
         size="small"
-        :rowKey="(record) => record.id"
+        :rowKey="(record) => record.no"
+        rowKeyName="no"
         :columns="columns"
         :data="loadData"
         :scroll="{ y: 500 }"
@@ -112,20 +113,18 @@ export default {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: '15%', align: 'center', scopedSlots: { customRender: 'productCode' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位', dataIndex: 'productEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售数量', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '销售价', dataIndex: 'price', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        // { title: '销售金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '缺货数量', dataIndex: 'lackQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', scopedSlots: { customRender: 'productCode' } },
+        { title: '产品名称', dataIndex: 'product.name', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'product.origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'product.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售数量', dataIndex: 'salesQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '缺货数量', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       
       if (this.$hasPermissions('B_salesDetail_salesPrice')) { // 售价权限
         arr.splice(6, 0, { title: '销售价', dataIndex: 'price', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(7, 0, { title: '销售金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(8, 0, { title: '缺货金额', dataIndex: 'lackAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(7, 0, { title: '销售金额', dataIndex: 'salesAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(8, 0, { title: '缺货金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }