|
@@ -34,8 +34,8 @@
|
|
:disabled="localDataSource.length==0"
|
|
:disabled="localDataSource.length==0"
|
|
@click="handlePrint('export')">导出Excel</a-button>
|
|
@click="handlePrint('export')">导出Excel</a-button>
|
|
</div>
|
|
</div>
|
|
- <a-descriptions size="small" :column="3">
|
|
|
|
- <a-descriptions-item label="盘点单号" :span="3">
|
|
|
|
|
|
+ <a-descriptions size="small" :column="2">
|
|
|
|
+ <a-descriptions-item label="盘点单号" :span="2">
|
|
{{ (basicInfoData&&basicInfoData.checkWarehouseNo) || '--' }}
|
|
{{ (basicInfoData&&basicInfoData.checkWarehouseNo) || '--' }}
|
|
<div style="display: inline-block;margin-left: 10px;">
|
|
<div style="display: inline-block;margin-left: 10px;">
|
|
<a-tag color="red" v-if="basicInfoData&&basicInfoData.stateDictValue">{{ basicInfoData.stateDictValue }}</a-tag>
|
|
<a-tag color="red" v-if="basicInfoData&&basicInfoData.stateDictValue">{{ basicInfoData.stateDictValue }}</a-tag>
|
|
@@ -43,7 +43,7 @@
|
|
</a-descriptions-item>
|
|
</a-descriptions-item>
|
|
<a-descriptions-item label="盘点类型">{{ (basicInfoData&&basicInfoData.checkTypeDictValue) || '--' }}</a-descriptions-item>
|
|
<a-descriptions-item label="盘点类型">{{ (basicInfoData&&basicInfoData.checkTypeDictValue) || '--' }}</a-descriptions-item>
|
|
<a-descriptions-item label="是否区分仓库" v-if="basicInfoData&&basicInfoData.checkType=='SELECT'">{{ (basicInfoData&&basicInfoData.warehouseFlagDictValue) || '--' }}</a-descriptions-item>
|
|
<a-descriptions-item label="是否区分仓库" v-if="basicInfoData&&basicInfoData.checkType=='SELECT'">{{ (basicInfoData&&basicInfoData.warehouseFlagDictValue) || '--' }}</a-descriptions-item>
|
|
- <a-descriptions-item label="盘点仓库" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'" :span="3">{{ (basicInfoData&&basicInfoData.warehouseNameList) || '--' }}</a-descriptions-item>
|
|
|
|
|
|
+ <a-descriptions-item label="盘点仓库" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'" :span="2">{{ (basicInfoData&&basicInfoData.warehouseNameList) || '--' }}</a-descriptions-item>
|
|
<a-descriptions-item label="创建人">{{ (basicInfoData&&basicInfoData.creatorName) || '--' }}</a-descriptions-item>
|
|
<a-descriptions-item label="创建人">{{ (basicInfoData&&basicInfoData.creatorName) || '--' }}</a-descriptions-item>
|
|
<a-descriptions-item label="创建时间">{{ (basicInfoData&&basicInfoData.createDate) || '--' }}</a-descriptions-item>
|
|
<a-descriptions-item label="创建时间">{{ (basicInfoData&&basicInfoData.createDate) || '--' }}</a-descriptions-item>
|
|
<a-descriptions-item label="审核时间">{{ (basicInfoData&&basicInfoData.checkSuperviseTime) || '--' }}</a-descriptions-item>
|
|
<a-descriptions-item label="审核时间">{{ (basicInfoData&&basicInfoData.checkSuperviseTime) || '--' }}</a-descriptions-item>
|
|
@@ -139,6 +139,10 @@
|
|
<template slot="checkProfitLossQty" slot-scope="text, record">
|
|
<template slot="checkProfitLossQty" slot-scope="text, record">
|
|
<span :style="{ color: record.checkProfitLossQty>0?'red':record.checkProfitLossQty<0?'green':'', fontWeight: record.checkProfitLossQty!=0?'bold':'' }">{{ (record.checkProfitLossQty || record.checkProfitLossQty==0) ? Math.abs(record.checkProfitLossQty) : '--' }}</span>
|
|
<span :style="{ color: record.checkProfitLossQty>0?'red':record.checkProfitLossQty<0?'green':'', fontWeight: record.checkProfitLossQty!=0?'bold':'' }">{{ (record.checkProfitLossQty || record.checkProfitLossQty==0) ? Math.abs(record.checkProfitLossQty) : '--' }}</span>
|
|
</template>
|
|
</template>
|
|
|
|
+ <!-- 盈亏成本 -->
|
|
|
|
+ <template slot="checkProfitLossCost" slot-scope="text, record">
|
|
|
|
+ <span :style="{ color: record.checkProfitLossCost>0?'red':record.checkProfitLossCost<0?'green':'', fontWeight: record.checkProfitLossCost!=0?'bold':'' }">{{ (record.checkProfitLossCost || record.checkProfitLossCost==0) ? '¥'+formatDecimal(Math.abs(record.checkProfitLossCost), 2) : '--' }}</span>
|
|
|
|
+ </template>
|
|
</s-table>
|
|
</s-table>
|
|
</a-card>
|
|
</a-card>
|
|
</a-spin>
|
|
</a-spin>
|
|
@@ -154,6 +158,7 @@ import { downloadExcel } from '@/libs/JGPrint.js'
|
|
import { STable } from '@/components'
|
|
import { STable } from '@/components'
|
|
import printModal from './printModal.vue'
|
|
import printModal from './printModal.vue'
|
|
import ProductType from '@/views/common/productType.js'
|
|
import ProductType from '@/views/common/productType.js'
|
|
|
|
+import { formatDecimal } from '@/libs/tools'
|
|
import { checkWarehouseDetailList, checkWarehouseDetail, checkWarehouseDetailCount, checkWarehouseDetailExport, checkWarehouseDetailPrint, checkWarehouseWarehouse } from '@/api/checkWarehouse'
|
|
import { checkWarehouseDetailList, checkWarehouseDetail, checkWarehouseDetailCount, checkWarehouseDetailExport, checkWarehouseDetailPrint, checkWarehouseWarehouse } from '@/api/checkWarehouse'
|
|
export default {
|
|
export default {
|
|
name: 'InventoryCheckingDetailModal',
|
|
name: 'InventoryCheckingDetailModal',
|
|
@@ -216,13 +221,14 @@ export default {
|
|
columns () {
|
|
columns () {
|
|
const arr = [
|
|
const arr = [
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
- { title: '产品编码', dataIndex: 'productCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '产品名称', dataIndex: 'productName', width: '19%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '产品分类', scopedSlots: { customRender: 'productType' }, align: 'center', width: '12%' },
|
|
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品名称', dataIndex: 'productName', width: '17%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '产品分类', scopedSlots: { customRender: 'productType' }, align: 'center', width: '11%' },
|
|
{ title: '单位', dataIndex: 'productUnit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '单位', dataIndex: 'productUnit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '库存数量', dataIndex: 'stockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '库存数量', dataIndex: 'stockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '盘点数量', dataIndex: 'checkQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '盘点数量', dataIndex: 'checkQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '盈亏数量', scopedSlots: { customRender: 'checkProfitLossQty' }, width: '6%', align: 'center' }
|
|
|
|
|
|
+ { title: '盈亏数量', scopedSlots: { customRender: 'checkProfitLossQty' }, width: '6%', align: 'center' },
|
|
|
|
+ { title: '盈亏成本', scopedSlots: { customRender: 'checkProfitLossCost' }, width: '6%', align: 'right' }
|
|
]
|
|
]
|
|
if (this.basicInfoData && this.basicInfoData.warehouseFlag == '1') {
|
|
if (this.basicInfoData && this.basicInfoData.warehouseFlag == '1') {
|
|
arr.splice(4, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
|
|
arr.splice(4, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
|
|
@@ -232,6 +238,8 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 保留两位小数(不四舍五入)
|
|
|
|
+ formatDecimal,
|
|
// 详情
|
|
// 详情
|
|
getDetail () {
|
|
getDetail () {
|
|
checkWarehouseDetail({ sn: this.itemSn }).then(res => {
|
|
checkWarehouseDetail({ sn: this.itemSn }).then(res => {
|
|
@@ -319,7 +327,7 @@ export default {
|
|
reader.readAsText(res)
|
|
reader.readAsText(res)
|
|
} else {
|
|
} else {
|
|
if (this.nowType == 'export' || this.nowType == 'typeExport') {
|
|
if (this.nowType == 'export' || this.nowType == 'typeExport') {
|
|
- downloadExcel(res, '库存盘点')
|
|
|
|
|
|
+ downloadExcel(res, '库存盘点')
|
|
} else {
|
|
} else {
|
|
this.print(res, objs.type)
|
|
this.print(res, objs.type)
|
|
}
|
|
}
|
|
@@ -338,7 +346,7 @@ export default {
|
|
window.frames['printficd'].focus()
|
|
window.frames['printficd'].focus()
|
|
window.frames['printficd'].print()
|
|
window.frames['printficd'].print()
|
|
}
|
|
}
|
|
- },
|
|
|
|
|
|
+ }
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
// 父页面传过来的弹框状态
|
|
// 父页面传过来的弹框状态
|