|
@@ -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 }"
|
|
@@ -91,7 +92,7 @@ export default {
|
|
|
this.disabled = true
|
|
|
delete parameter.tableId
|
|
|
delete parameter.index
|
|
|
- return salesStockoutDetail({ isOos: 1, salesBillSn: this.salesBillSn }).then(res => {
|
|
|
+ return salesStockoutDetail({ salesBillSn: this.salesBillSn }).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
@@ -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
|
|
|
}
|
|
@@ -136,7 +135,7 @@ export default {
|
|
|
_this.exportLoading = true
|
|
|
_this.disabled = true
|
|
|
_this.spinning = true
|
|
|
- hdExportExcel(exportStockout, { isOos: 1, salesBillSn: _this.salesBillSn }, '销售单缺货产品导出', function () {
|
|
|
+ hdExportExcel(exportStockout, { salesBillSn: _this.salesBillSn }, '销售单缺货产品导出', function () {
|
|
|
_this.exportLoading = false
|
|
|
_this.spinning = false
|
|
|
_this.disabled = false
|
|
@@ -147,7 +146,7 @@ export default {
|
|
|
_this.exportClassifyLoading = true
|
|
|
_this.disabled = true
|
|
|
_this.spinning = true
|
|
|
- hdExportExcel(exportGroupStockout, { isOos: 1, salesBillSn: _this.salesBillSn }, '销售单缺货产品分类导出', function () {
|
|
|
+ hdExportExcel(exportGroupStockout, { salesBillSn: _this.salesBillSn }, '销售单缺货产品分类导出', function () {
|
|
|
_this.exportClassifyLoading = false
|
|
|
_this.spinning = false
|
|
|
_this.disabled = false
|