Browse Source

2025-10-22

仓库盘点管理 、ipqc检验优化
master
fengyuan_yang 3 months ago
parent
commit
837c56f83a
  1. 102
      src/api/warehouse/countingReport.js
  2. 20
      src/views/modules/qc/IPQCResultEntry.vue
  3. 4
      src/views/modules/shopOrder/shopOrder/shopOrderList.vue
  4. 496
      src/views/modules/warehouse/countingReport.vue

102
src/api/warehouse/countingReport.js

@ -0,0 +1,102 @@
import http from '@/utils/httpRequest'
/**
* 查询盘点单列表
*/
export function countingReportList(data) {
return http({
url: http.adornUrl('/warehouse/countingReport/list'),
method: 'post',
data: http.adornData(data)
})
}
/**
* 根据主键查询盘点单
*/
export function countingReportInfo(data) {
return http({
url: http.adornUrl('/warehouse/countingReport/info'),
method: 'post',
data: http.adornData(data)
})
}
/**
* 新增盘点单
*/
export function countingReportSave(data) {
return http({
url: http.adornUrl('/warehouse/countingReport/save'),
method: 'post',
data: http.adornData(data)
})
}
/**
* 修改盘点单
*/
export function countingReportUpdate(data) {
return http({
url: http.adornUrl('/warehouse/countingReport/update'),
method: 'post',
data: http.adornData(data)
})
}
/**
* 删除盘点单
*/
export function countingReportDelete(data) {
return http({
url: http.adornUrl('/warehouse/countingReport/delete'),
method: 'post',
data: http.adornData(data)
})
}
/**
* 批量删除盘点单
*/
export function countingReportBatchDelete(data) {
return http({
url: http.adornUrl('/warehouse/countingReport/batchDelete'),
method: 'post',
data: http.adornData(data)
})
}
/**
* 更新盘点单状态
*/
export function countingReportUpdateStatus(data) {
return http({
url: http.adornUrl('/warehouse/countingReport/updateStatus'),
method: 'post',
data: http.adornData(data)
})
}
/**
* 批量更新盘点单状态审核
*/
export function countingReportBatchUpdateStatus(data) {
return http({
url: http.adornUrl('/warehouse/countingReport/batchUpdateStatus'),
method: 'post',
data: http.adornData(data)
})
}
/**
* 查询盘点单明细列表
*/
export function countingReportDetailList(data) {
return http({
url: http.adornUrl('/warehouse/countingReport/detailList'),
method: 'post',
data: http.adornData(data)
})
}

20
src/views/modules/qc/IPQCResultEntry.vue

@ -589,9 +589,14 @@
<el-input v-model="seqDetailData.sku" clearable style="width: 150px"></el-input>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="seqDetailData.status" style="width: 100px" placeholder="请选择">
<el-option label="下达" value="下达"></el-option>
<el-option label="关闭" value="关闭"></el-option>
<el-select v-model="seqDetailData.status" style="width: 100px" clearable placeholder="请选择">
<el-option label="已计划" value="已计划"></el-option>
<el-option label="已下达" value="已下达"></el-option>
<el-option label="已排产" value="已排产"></el-option>
<el-option label="已开工" value="已开工"></el-option>
<el-option label="已开工" value="已停工"></el-option>
<el-option label="已开工" value="已关闭"></el-option>
<el-option label="已取消" value="已取消"></el-option>
</el-select>
</el-form-item>
</el-form>
@ -2815,7 +2820,7 @@
this.modalData.rollNo = item.value
this.modalData.seqNo = item.seqNo
this.modalData.orderNo = item.orderNo
this.getOperationList()
//this.getOperationList()
},
//
@ -2941,7 +2946,7 @@
this.modalData.orderNo = val.orderno
this.modalData.operationDesc = ''
this.modalData.resourceId = ''
this.getOperationList()
//this.getOperationList()
}
if (this.tagNo === 505) {
this.modalData.resourceId = val.resource_id
@ -3115,7 +3120,10 @@
this.modalData.qtyrequired = row.qtyrequired
this.modalData.rollQty = row.qtyrequired
this.modalData.sjzs = row.sjzs
this.getOperationList()
this.modalData.resourceId = row.resourceId
this.modalData.resourceDesc = row.resourceDesc
this.modalData.workCenterNo = row.workCenterNo
//this.getOperationList()
this.seqDetailFlag = false
},

4
src/views/modules/shopOrder/shopOrder/shopOrderList.vue

@ -24,8 +24,7 @@
</el-date-picker>
</el-form-item>
<el-form-item label="状态:">
<el-select multiple collapse-tags v-model="searchData.statusList" style="width: 130px">
<el-option label="全部" value=""></el-option>
<el-select multiple collapse-tags v-model="searchData.statusList" clearable style="width: 130px">
<el-option label="已计划" value="已计划"></el-option>
<el-option label="已下达" value="已下达"></el-option>
<el-option label="已排产" value="已排产"></el-option>
@ -33,7 +32,6 @@
<el-option label="已开工" value="已停工"></el-option>
<el-option label="已开工" value="已关闭"></el-option>
<el-option label="已取消" value="已取消"></el-option>
</el-select>
</el-form-item>
<el-form-item label="要求开工日期:" style="margin-left: 0px">

496
src/views/modules/warehouse/countingReport.vue

@ -0,0 +1,496 @@
<template>
<div class="mod-config">
<!-- 条件查询 -->
<el-form :inline="true" label-position="top" :model="searchData">
<el-form-item label="BU">
<el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 100px">
<el-option
v-for="i in userBuList"
:key="i.buNo"
:label="i.buDesc"
:value="i.buDesc">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="盘点任务单号">
<el-input v-model="searchData.reportId" clearable style="width: 150px"></el-input>
</el-form-item>
<el-form-item label="盘点维度">
<el-select v-model="searchData.checkDimension" placeholder="请选择" clearable style="width: 100px">
<el-option label="按仓库" value="按仓库"></el-option>
<el-option label="按货位" value="按货位"></el-option>
<el-option label="按物料" value="按物料"></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="searchData.status" placeholder="请选择" clearable style="width: 100px">
<el-option label="草稿" :value="0"></el-option>
<el-option label="盘点中" :value="1"></el-option>
<el-option label="待核销" :value="2"></el-option>
<el-option label="已完成" :value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="getDataList()">查询</el-button>
<el-button type="primary" @click="addModal()">新增</el-button>
<el-button type="primary" @click="batchDelete()">删除</el-button>
<el-button type="primary" @click="batchAudit()">审核</el-button>
</el-form-item>
</el-form>
<!-- 展示列表 -->
<el-table
:height="height"
:data="dataList"
border
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
style="width: 100%;">
<el-table-column
type="selection"
header-align="center"
align="center"
width="50">
</el-table-column>
<el-table-column prop="buNo" label="BU" header-align="center" align="center" min-width="80"></el-table-column>
<el-table-column prop="reportId" label="盘点任务单号" header-align="center" align="left" min-width="150"></el-table-column>
<el-table-column prop="checkDimension" label="盘点维度" header-align="center" align="center" min-width="100"></el-table-column>
<el-table-column prop="warehouseDesc" label="盘点仓库" header-align="center" align="left" min-width="120"></el-table-column>
<el-table-column prop="locationDesc" label="盘点货位" header-align="center" align="left" min-width="120"></el-table-column>
<el-table-column prop="partDesc" label="盘点物料" header-align="center" align="left" min-width="200"></el-table-column>
<el-table-column prop="statusDesc" label="状态" header-align="center" align="center" min-width="80"></el-table-column>
<el-table-column prop="createBy" label="创建人" header-align="center" align="center" min-width="100"></el-table-column>
<el-table-column prop="createDate" label="创建时间" header-align="center" align="center" min-width="150"></el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="180"
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" v-if="scope.row.status === 0" @click="updateStatus(scope.row, 1)">下达</el-link>
<el-link style="cursor: pointer" v-if="scope.row.status === 1" @click="updateStatus(scope.row, 2)">结束</el-link>
<el-link style="cursor: pointer" v-if="scope.row.status === 2" @click="updateStatus(scope.row, 3)">核销</el-link>
<el-link style="cursor: pointer" v-if="scope.row.status === 0" @click="updateModal(scope.row)">编辑</el-link>
<el-link style="cursor: pointer" @click="viewDetail(scope.row)">盘点清单</el-link>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 0px"
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 新增/修改对话框 -->
<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: 120px">
<el-option
v-for="i in userBuList"
:key="i.buNo"
:label="i.sitename"
:value="i.buNo">
<span style="float: left;width: 100px">{{ i.sitename }}</span>
<span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px">
{{ i.buDesc }}
</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="盘点维度" prop="checkDimension">
<el-select v-model="modalData.checkDimension" placeholder="请选择" @change="dimensionChange" style="width: 120px">
<el-option label="按仓库" value="按仓库"></el-option>
<el-option label="按货位" value="按货位"></el-option>
<el-option label="按物料" value="按物料"></el-option>
</el-select>
</el-form-item>
</el-form>
<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: 100px"></el-input>
<el-input v-model="modalData.warehouseName" disabled style="width: 300px"></el-input>
</el-form-item>
</el-form>
<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>
<el-form-item label="盘点物料" prop="partNo" style="width: 100%">
<el-input v-model="modalData.partNo" placeholder="请选择盘点物料(盘点维度:按仓库、按货位、按物料)" style="width: 100%"></el-input>
</el-form-item>
<el-form-item label="备注" style="width: 100%">
<el-input type="textarea" v-model="modalData.remark" :rows="3" style="width: 100%"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:35px;margin-top: 55px;text-align:center">
<el-button type="primary" :loading="saveLoading" @click="saveData">确定</el-button>
<el-button type="primary" @click="modalFlag = false">取消</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {
countingReportList,
countingReportSave,
countingReportUpdate,
countingReportBatchDelete,
countingReportUpdateStatus,
countingReportBatchUpdateStatus
} from '@/api/warehouse/countingReport.js'
import {getSiteAndBuByUserName} from "@/api/qc/qc.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
import {verifyData} from "@/api/chooselist/chooselist.js"
export default {
components: {
Chooselist,
},
data() {
return {
searchData: {
buNo: '',
reportId: '',
checkDimension: '',
status: null
},
dataList: [],
dataListLoading: false,
dataListSelections: [],
pageIndex: 1,
pageSize: 20,
totalPage: 0,
height: window.innerHeight - 170,
// BU
userBuList: [],
// /
modalFlag: false,
modalTitle: '',
modalDisableFlag: false,
modalData: {
flag: 'add',
bu: '',
site: '',
buNo: '',
reportId: '',
checkDimension: '',
warehouseId: '',
warehouseName: '',
locationId: '',
locationName: '',
partNo: '',
partDesc: '',
remark: ''
},
saveLoading: false,
rules: {
bu: [{
required: true,
message: ' ',
trigger: ['blur','change']
}],
checkDimension: [{
required: true,
message: ' ',
trigger: ['blur','change']
}],
warehouseId: [{
required: true,
message: ' ',
trigger: ['blur','change']
}],
partNo: [{
required: true,
message: ' ',
trigger: ['blur','change']
}]
}
}
},
mounted() {
this.getSiteAndBuByUserName()
this.getDataList()
},
methods: {
// BU
getSiteAndBuByUserName() {
let tempData = {
username: this.$store.state.user.name
}
getSiteAndBuByUserName(tempData).then(({data}) => {
if (data && data.code === 0) {
this.userBuList = data.rows
}
})
},
//
getDataList() {
this.dataListLoading = true
this.searchData.page = this.pageIndex
this.searchData.limit = this.pageSize
countingReportList(this.searchData).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
//
sizeChangeHandle(val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle(val) {
this.pageIndex = val
this.getDataList()
},
//
selectionChangeHandle(val) {
this.dataListSelections = val
},
//
addModal() {
this.modalFlag = true
this.modalTitle = '盘点任务生成'
this.modalDisableFlag = false
this.modalData = {
flag: 'add',
bu: this.userBuList.length > 0 ? this.userBuList[0].buNo : '',
site: '',
buNo: '',
reportId: '',
checkDimension: '',
warehouseId: '',
warehouseName: '',
locationId: '',
locationName: '',
partNo: '',
partDesc: '',
remark: ''
}
this.$nextTick(() => {
if (this.$refs.modalForm) {
this.$refs.modalForm.clearValidate()
}
})
},
//
updateModal(row) {
this.modalFlag = true
this.modalTitle = '修改盘点任务'
this.modalDisableFlag = true
this.modalData = {
flag: 'update',
bu: row.site + '_' + row.buNo,
site: row.site,
buNo: row.buNo,
reportId: row.reportId,
checkDimension: row.checkDimension,
warehouseId: row.warehouseId,
warehouseName: row.warehouseName,
locationId: row.locationId,
locationName: row.locationName,
partNo: row.partNo,
partDesc: row.partDesc,
remark: row.remark
}
this.$nextTick(() => {
if (this.$refs.modalForm) {
this.$refs.modalForm.clearValidate()
}
})
},
//
dimensionChange() {
//
if (this.modalData.checkDimension === '按物料') {
this.modalData.locationId = ''
this.modalData.locationName = ''
}
},
//
saveData() {
this.$refs.modalForm.validate((valid) => {
if (valid) {
this.saveLoading = true
const apiMethod = this.modalData.flag === 'add' ? countingReportSave : countingReportUpdate
apiMethod(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.$message.success(data.msg)
this.modalFlag = false
this.getDataList()
} else {
this.$message.error(data.msg)
}
this.saveLoading = false
}).catch(() => {
this.saveLoading = false
})
}
})
},
//
batchDelete() {
if (this.dataListSelections.length === 0) {
this.$message.warning('请选择要删除的盘点单')
return
}
//
const hasIssued = this.dataListSelections.some(item => item.status !== 0)
if (hasIssued) {
this.$message.error('已下达的盘点单不允许删除')
return
}
this.$confirm('确定要删除选中的盘点单吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const reportIds = this.dataListSelections.map(item => item.reportId)
countingReportBatchDelete({ reportIds }).then(({data}) => {
if (data && data.code === 0) {
this.$message.success(data.msg)
this.getDataList()
} else {
this.$message.error(data.msg)
}
})
})
},
//
batchAudit() {
if (this.dataListSelections.length === 0) {
this.$message.warning('请选择要审核的盘点单')
return
}
this.$confirm('确定要审核选中的盘点单吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const reportIds = this.dataListSelections.map(item => item.reportId)
countingReportBatchUpdateStatus({ reportIds, status: 3 }).then(({data}) => {
if (data && data.code === 0) {
this.$message.success(data.msg)
this.getDataList()
} else {
this.$message.error(data.msg)
}
})
})
},
//
updateStatus(row, status) {
let statusText = ''
if (status === 1) statusText = '下达'
else if (status === 2) statusText = '结束'
else if (status === 3) statusText = '核销'
this.$confirm(`确定要${statusText}该盘点单吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const params = {
site: row.site,
buNo: row.buNo,
reportId: row.reportId,
status: status
}
countingReportUpdateStatus(params).then(({data}) => {
if (data && data.code === 0) {
this.$message.success(data.msg)
this.getDataList()
} else {
this.$message.error(data.msg)
}
})
})
},
//
viewDetail(row) {
this.$message.info('盘点清单功能待开发')
// TODO:
},
//
supplierBlur (tagNo) {
let tempData = {
tagno: tagNo,
conditionSql: " and SupplierID = '" + this.modalData.supplierId + "'" + " and site = '" + this.modalData.site + "'"
}
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
} else {
this.modalData.supplierName = ''
}
}
})
},
// S
getBaseList (val, type) {
this.tagNo = val
this.tagType = type
this.$nextTick(() => {
let strVal = ''
if (val === 506) {
strVal = this.modalData.supplierId
this.$refs.baseList.init(val, strVal)
}
})
},
//
getBaseData (val) {
if (this.tagNo === 506) {
this.modalData.supplierId = val.SupplierID
this.modalData.supplierName = val.SupplierName
}
},
}
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save