@ -55,8 +55,8 @@
< el -table -column prop = "buNo" label = "BU" header -align = " center " align = "center" min -width = " 80 " > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "reportId" label = "盘点任务单号" header -align = " center " align = "left" min -width = " 150 " > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "checkDimension" label = "盘点维度" header -align = " center " align = "center" min -width = " 100 " > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "warehouseDesc " label = "盘点仓库" header -align = " center " align = "left" min -width = " 120 " > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "locationDesc " label = "盘点货位" header -align = " center " align = "left" min -width = " 120 " > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "warehouseName " label = "盘点仓库" header -align = " center " align = "left" min -width = " 120 " > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "locationName " label = "盘点货位" header -align = " center " align = "left" min -width = " 120 " > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "partDesc" label = "盘点物料" header -align = " center " align = "left" min -width = " 200 " > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "statusDesc" label = "状态" header -align = " center " align = "center" min -width = " 80 " > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "createBy" label = "创建人" header -align = " center " align = "center" min -width = " 100 " > < / e l - t a b l e - c o l u m n >
@ -93,7 +93,7 @@
< el -dialog :title ="modalTitle" :close-on-click-modal ="false" v -drag :visible.sync ="modalFlag" width = "500px" >
< el -form ref = "modalForm" :inline ="true" label -position = " top " :model ="modalData" :rules ="rules" style = "margin-left: 7px;margin-top: -5px;" >
< el -form -item label = "BU" prop = "bu" >
< el -select v-model ="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 120 px" >
< el -select v-model ="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 135 px" >
< el -option
v - for = "i in userBuList"
: key = "i.buNo"
@ -115,22 +115,29 @@
< / e l - f o r m - i t e m >
< / e l - f o r m >
< el -form :inline ="true" label -position = " top " :model ="modalData" :rules ="rules" style = "margin-left: 7px" >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(506 )" > < a href = "#" > 盘点仓库 < / a > < / span >
< el -input v-model ="modalData.warehouseId" @change="supplierBlur(506)" style="width: 100 px" > < / el -input >
< el -input v-model ="modalData.warehouseName" disabled style="width: 30 0px" > < / el -input >
< el -form -item prop = "warehouseId" >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(20 )" > < a href = "#" > 盘点仓库 < / a > < / span >
< el -input v-model ="modalData.warehouseId" @change="warehouseBlur(20)" style="width: 135 px" > < / el -input >
< el -input v-model ="modalData.warehouseName" disabled style="width: 32 0px" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< el -form :inline ="true" label -position = " top " :model ="modalData" :rules ="rules" style = "margin-left: 7px" >
< el -form -item label = "盘点货位" prop = "locationId" style = "width: 100%" >
< el -input v-model ="modalData.locationId" placeholder="请选择盘点货位(盘点维度:按仓库、按货位)" style="width: 100%" > < / el -input >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(22)" > < a href = "#" > 盘点货位 < / a > < / span >
< el -input v-model ="modalData.locationId" @change="locationBlur(22)" style="width: 135px" > < / el -input >
< el -input v-model ="modalData.locationName" disabled style="width: 320px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item label = "盘点物料" prop = "partNo" style = "width: 100%" >
< el -input v-model ="modalData.partNo" placeholder="请选择盘点物料(盘点维度:按仓库、按货位、按物料)" style="width: 100%" > < / el -input >
< / e l - f o r m >
< el -form :inline ="true" label -position = " top " :model ="modalData" :rules ="rules" style = "margin-left: 7px" >
< el -form -item prop = "partNo" >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(509)" > < a href = "#" > 盘点物料 < / a > < / span >
< el -input v-model ="modalData.partNo" @change="partBlur(509)" style="width: 135px" > < / el -input >
< el -input v-model ="modalData.partDesc" disabled style="width: 320px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item label = "备注" style = "width: 100%" >
< el -input type = "textarea" v-model ="modalData.remark" :rows="3" style="width: 100%" > < / el -input >
< / e l - f o r m >
< el -form :inline ="true" label -position = " top " :model ="modalData" :rules ="rules" style = "margin-left: 7px" >
< el -form -item label = "备注" >
< el -input type = "textarea" v-model ="modalData.remark" :rows="3" style="width: 460px" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< el -footer style = "height:35px;margin-top: 55px;text-align:center" >
@ -141,6 +148,59 @@
< Chooselist ref = "baseList" @getBaseData ="getBaseData" > < / Chooselist >
<!-- 盘点清单对话框 -- >
< el -dialog title = "盘点清单" :close-on-click-modal ="false" v -drag :visible.sync ="detailFlag" width = "90%" >
<!-- 查询条件 -- >
< el -form :inline ="true" label -position = " top " :model ="detailSearchData" style = "margin-bottom: 10px;" >
< el -form -item label = "标签条码" >
< el -input v-model ="detailSearchData.rollNo" clearable style="width: 150px" placeholder="请输入查询信息" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item label = "物料编码" >
< el -input v-model ="detailSearchData.partNo" clearable style="width: 150px" placeholder="请输入查询信息" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item label = "是否盘点" >
< el -select v-model ="detailSearchData.checkedFlag" placeholder="请选择" clearable style="width: 100px" >
< el -option label = "是" value = "Y" > < / e l - o p t i o n >
< el -option label = "否" value = "N" > < / e l - o p t i o n >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< el -form -item label = " " >
< el -button type = "primary" @click ="getDetailList()" > 查询 < / el -button >
< / e l - f o r m - i t e m >
< / e l - f o r m >
<!-- 统计信息 -- >
< div style = "margin-bottom: 15px; padding: 10px; background-color: #f5f7fa; border-radius: 4px;" >
< span style = "margin-right: 30px;" > < strong > 标签总数 : < / strong > < span style = "color: #409EFF; font-size: 18px;" > { { detailStatistics . totalCount } } < / span > < / span >
< span style = "margin-right: 30px;" > < strong > 物料总数 : < / strong > < span style = "color: #67C23A; font-size: 18px;" > { { detailStatistics . totalQty } } < / span > < / span >
< span > < strong > 已盘点数 : < / strong > < span style = "color: #E6A23C; font-size: 18px;" > { { detailStatistics . checkedQty } } < / span > < / span >
< / div >
<!-- 明细列表 -- >
< el -table
: height = "500"
: data = "detailList"
border
v - loading = "detailLoading"
style = "width: 100%;" >
< el -table -column type = "index" label = "NO." header -align = " center " align = "center" width = "60" > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "rollNo" label = "标签条码" header -align = " center " align = "left" min -width = " 150 " > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "rollQty" label = "标签数量" header -align = " center " align = "right" min -width = " 100 " > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "labelType" label = "标签类型" header -align = " center " align = "center" min -width = " 100 " > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "partNo" label = "物料编码" header -align = " center " align = "left" min -width = " 150 " > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "partDesc" label = "物料名称" header -align = " center " align = "left" min -width = " 200 " > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "checkedFlag" label = "是否盘点" header -align = " center " align = "center" min -width = " 100 " >
< template slot -scope = " scope " >
{ { scope . row . checkedFlag === 'Y' ? '是' : '否' } }
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
< el -footer style = "height:35px;margin-top: 20px;text-align:center" >
< el -button type = "primary" @ click = "detailFlag = false" > 关闭 < / e l - b u t t o n >
< / e l - f o o t e r >
< / e l - d i a l o g >
< / div >
< / template >
@ -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 ( '盘点清单功能待开发' )
/ / T O D O : 打 开 盘 点 清 单 对 话 框
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 SupplierID = '" + this . modalData . supplierId + "'" + " and site = '" + this . modalData . site + "'"
conditionSql : " and Location ID = '" + this . modalData . location Id + "'" + " 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 . supplierId = data . baseListData [ 0 ] . SupplierID
this . modalData . supplierName = data . baseListData [ 0 ] . SupplierName
this . modalData . location Id = data . baseListData [ 0 ] . Location ID
this . modalData . location Name = data . baseListData [ 0 ] . Location Name
} else {
this . modalData . supplierName = ''
this . modalData . locationName = ''
}
}
} )
} ,
partBlur ( tagNo ) {
let tempData = {
tagno : tagNo ,
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 . partNo = data . baseListData [ 0 ] . PartNo
this . modalData . partDesc = data . baseListData [ 0 ] . PartDescription
} else {
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 {