+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+ 标签总数:{{ detailStatistics.totalCount }}
+ 物料总数:{{ detailStatistics.totalQty }}
+ 已盘点数:{{ detailStatistics.checkedQty }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.checkedFlag === 'Y' ? '是' : '否' }}
+
+
+
+
+
+ 关闭
+
+
+
@@ -151,7 +211,8 @@ import {
countingReportUpdate,
countingReportBatchDelete,
countingReportUpdateStatus,
- countingReportBatchUpdateStatus
+ countingReportBatchUpdateStatus,
+ countingReportDetailList
} from '@/api/warehouse/countingReport.js'
import {getSiteAndBuByUserName} from "@/api/qc/qc.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
@@ -219,6 +280,23 @@ export default {
message: ' ',
trigger: ['blur','change']
}]
+ },
+ // 盘点清单对话框
+ detailFlag: false,
+ detailLoading: false,
+ detailList: [],
+ detailSearchData: {
+ site: '',
+ buNo: '',
+ reportId: '',
+ rollNo: '',
+ partNo: '',
+ checkedFlag: ''
+ },
+ detailStatistics: {
+ totalCount: 0, // 标签总数
+ totalQty: 0, // 物料总数(所有标签数量总和)
+ checkedQty: 0 // 已盘点数(已盘点标签数量总和)
}
}
},
@@ -442,23 +520,92 @@ export default {
// 查看盘点清单
viewDetail(row) {
- this.$message.info('盘点清单功能待开发')
- // TODO: 打开盘点清单对话框
+ this.detailFlag = true
+ this.detailSearchData = {
+ site: row.site,
+ buNo: row.buNo,
+ reportId: row.reportId,
+ rollNo: '',
+ partNo: '',
+ checkedFlag: ''
+ }
+ this.getDetailList()
+ },
+
+ // 获取盘点清单列表
+ getDetailList() {
+ this.detailLoading = true
+ countingReportDetailList(this.detailSearchData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.detailList = data.detailList || []
+ // 计算统计数据
+ this.calculateStatistics()
+ } else {
+ this.detailList = []
+ this.$message.error(data.msg || '查询失败')
+ }
+ this.detailLoading = false
+ }).catch(() => {
+ this.detailLoading = false
+ })
+ },
+
+ // 计算统计数据
+ calculateStatistics() {
+ this.detailStatistics.totalCount = this.detailList.length
+ this.detailStatistics.totalQty = this.detailList.reduce((sum, item) => sum + (item.rollQty || 0), 0)
+ this.detailStatistics.checkedQty = this.detailList
+ .filter(item => item.checkedFlag === 'Y')
+ .reduce((sum, item) => sum + (item.rollQty || 0), 0)
},
// 输入校验
- supplierBlur (tagNo) {
+ warehouseBlur (tagNo) {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and WareHouseID = '" + this.modalData.warehouseId + "'" + " and site = '" + this.modalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.modalData.bu.split('_')[1] + "'"
+ }
+ verifyData(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.modalData.warehouseId = data.baseListData[0].WareHouseID
+ this.modalData.warehouseName = data.baseListData[0].WareHouseName
+ } else {
+ this.modalData.warehouseName = ''
+ }
+ }
+ })
+ },
+
+ locationBlur (tagNo) {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and LocationID = '" + this.modalData.locationId + "'" + " and site = '" + this.modalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.modalData.bu.split('_')[1] + "'"
+ }
+ verifyData(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.modalData.locationId = data.baseListData[0].LocationID
+ this.modalData.locationName = data.baseListData[0].LocationName
+ } else {
+ this.modalData.locationName = ''
+ }
+ }
+ })
+ },
+
+ partBlur (tagNo) {
let tempData = {
tagno: tagNo,
- conditionSql: " and SupplierID = '" + this.modalData.supplierId + "'" + " and site = '" + this.modalData.site + "'"
+ conditionSql: " and PartNo = '" + this.modalData.partNo + "'" + " and site = '" + this.modalData.bu.split('_')[0] + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
- this.modalData.supplierId = data.baseListData[0].SupplierID
- this.modalData.supplierName = data.baseListData[0].SupplierName
+ this.modalData.partNo = data.baseListData[0].PartNo
+ this.modalData.partDesc = data.baseListData[0].PartDescription
} else {
- this.modalData.supplierName = ''
+ this.modalData.partDesc = ''
}
}
})
@@ -470,8 +617,16 @@ export default {
this.tagType = type
this.$nextTick(() => {
let strVal = ''
- if (val === 506) {
- strVal = this.modalData.supplierId
+ if (val === 20) {
+ strVal = this.modalData.warehouseId
+ this.$refs.baseList.init(val, strVal)
+ }
+ if (val === 22) {
+ strVal = this.modalData.locationId
+ this.$refs.baseList.init(val, strVal)
+ }
+ if (val === 509) {
+ strVal = this.modalData.partNo
this.$refs.baseList.init(val, strVal)
}
})
@@ -479,9 +634,17 @@ export default {
// 列表方法的回调
getBaseData (val) {
- if (this.tagNo === 506) {
- this.modalData.supplierId = val.SupplierID
- this.modalData.supplierName = val.SupplierName
+ if (this.tagNo === 20) {
+ this.modalData.warehouseId = val.WareHouseID
+ this.modalData.warehouseName = val.WareHouseName
+ }
+ if (this.tagNo === 22) {
+ this.modalData.locationId = val.LocationID
+ this.modalData.locationName = val.LocationName
+ }
+ if (this.tagNo === 509) {
+ this.modalData.partNo = val.PartNo
+ this.modalData.partDesc = val.PartDescription
}
},
@@ -495,3 +658,4 @@ export default {
+