10 changed files with 668 additions and 10 deletions
-
2src/api/partspare/partSpareLocation.js
-
10src/api/partspare/smartCabinet.js
-
132src/views/modules/partspare/partSpareLocation.vue
-
86src/views/modules/partspare/repairtransdetail.vue
-
143src/views/modules/partspare/smartCabinetSyncLog.vue
-
99src/views/modules/partspare/spareBorrowRecord.vue
-
188src/views/modules/partspare/spareStocktake.vue
-
6src/views/modules/reportWorkOrder/reportDefectOrder.vue
-
6src/views/modules/reportWorkOrder/reportDefectOrder2.vue
-
6src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue
@ -0,0 +1,10 @@ |
|||||
|
import { createAPI } from '@/utils/httpRequest.js' |
||||
|
|
||||
|
export const searchStocktakeList = data => createAPI('/pms/smartcabinet/stocktake/list', 'POST', data) |
||||
|
export const getStocktakeInfo = data => createAPI('/pms/smartcabinet/stocktake/info', 'POST', data) |
||||
|
export const confirmStocktake = data => createAPI('/pms/smartcabinet/stocktake/confirm', 'POST', data) |
||||
|
export const cancelStocktake = data => createAPI('/pms/smartcabinet/stocktake/cancel', 'POST', data) |
||||
|
export const searchBorrowList = data => createAPI('/pms/smartcabinet/borrow/list', 'POST', data) |
||||
|
export const searchSyncLogList = data => createAPI('/pms/smartcabinet/syncLog/list', 'POST', data) |
||||
|
export const retrySyncLog = data => createAPI('/pms/smartcabinet/syncLog/retry', 'POST', data) |
||||
|
export const pickCreate = data => createAPI('/pms/smartcabinet/pick/create', 'POST', data) |
||||
@ -0,0 +1,143 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<el-form :inline="true" label-position="top" :model="queryForm"> |
||||
|
<el-form-item label="方向"> |
||||
|
<el-select v-model="queryForm.direction" clearable style="width: 120px"> |
||||
|
<el-option value="INBOX" label="收件箱"></el-option> |
||||
|
<el-option value="OUTBOX" label="发件箱"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="状态"> |
||||
|
<el-select v-model="queryForm.processStatus" clearable style="width: 120px"> |
||||
|
<el-option value="NEW" label="NEW"></el-option> |
||||
|
<el-option value="PROCESSING" label="PROCESSING"></el-option> |
||||
|
<el-option value="SUCCESS" label="SUCCESS"></el-option> |
||||
|
<el-option value="RETRY" label="RETRY"></el-option> |
||||
|
<el-option value="DEAD" label="DEAD"></el-option> |
||||
|
<el-option value="REJECT" label="REJECT"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="业务类型"> |
||||
|
<el-input v-model="queryForm.bizType" clearable style="width: 160px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="MES单号"> |
||||
|
<el-input v-model="queryForm.mesTransNo" clearable style="width: 140px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="柜侧单号"> |
||||
|
<el-input v-model="queryForm.cabinetBillNo" clearable style="width: 140px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="getDataList()">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-table :data="dataList" border v-loading="dataListLoading" style="width: 100%;"> |
||||
|
<el-table-column type="expand"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-table :data="scope.row.attempts || []" border size="mini"> |
||||
|
<el-table-column prop="attemptNo" label="次数" width="70"></el-table-column> |
||||
|
<el-table-column prop="direction" label="方向" width="90"></el-table-column> |
||||
|
<el-table-column prop="httpStatus" label="HTTP" width="80"></el-table-column> |
||||
|
<el-table-column prop="attemptStatus" label="结果" width="90"></el-table-column> |
||||
|
<el-table-column prop="costMs" label="耗时ms" width="80"></el-table-column> |
||||
|
<el-table-column prop="startTime" label="开始" min-width="150"></el-table-column> |
||||
|
<el-table-column prop="endTime" label="结束" min-width="150"></el-table-column> |
||||
|
<el-table-column prop="errorMsg" label="错误" min-width="160" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="reqBody" label="请求原文" min-width="220" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="respBody" label="响应原文" min-width="220" show-overflow-tooltip></el-table-column> |
||||
|
</el-table> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="id" label="ID" width="80"></el-table-column> |
||||
|
<el-table-column prop="direction" label="方向" width="90"></el-table-column> |
||||
|
<el-table-column prop="bizType" label="业务类型" min-width="140"></el-table-column> |
||||
|
<el-table-column prop="processStatus" label="状态" width="110"></el-table-column> |
||||
|
<el-table-column prop="mesTransNo" label="MES单号" min-width="140"></el-table-column> |
||||
|
<el-table-column prop="cabinetBillNo" label="柜侧单号" min-width="140"></el-table-column> |
||||
|
<el-table-column prop="retryCount" label="重试" width="70"></el-table-column> |
||||
|
<el-table-column prop="lastError" label="最近错误" min-width="180" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="createDate" label="创建时间" min-width="160"></el-table-column> |
||||
|
<el-table-column label="操作" width="90" fixed="right"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
v-if="scope.row.processStatus === 'RETRY' || scope.row.processStatus === 'DEAD'" |
||||
|
type="text" |
||||
|
@click="retryRow(scope.row)">重试</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
@size-change="sizeChangeHandle" |
||||
|
@current-change="currentChangeHandle" |
||||
|
:current-page="pageIndex" |
||||
|
:page-sizes="[20, 50, 100]" |
||||
|
:page-size="pageSize" |
||||
|
:total="totalPage" |
||||
|
layout="total, sizes, prev, pager, next, jumper"> |
||||
|
</el-pagination> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { searchSyncLogList, retrySyncLog } from '@/api/partspare/smartCabinet.js' |
||||
|
|
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
queryForm: { |
||||
|
direction: '', |
||||
|
processStatus: '', |
||||
|
bizType: '', |
||||
|
mesTransNo: '', |
||||
|
cabinetBillNo: '', |
||||
|
page: 1, |
||||
|
limit: 20 |
||||
|
}, |
||||
|
dataList: [], |
||||
|
dataListLoading: false, |
||||
|
pageIndex: 1, |
||||
|
pageSize: 20, |
||||
|
totalPage: 0 |
||||
|
} |
||||
|
}, |
||||
|
created () { |
||||
|
this.getDataList() |
||||
|
}, |
||||
|
methods: { |
||||
|
getDataList () { |
||||
|
this.dataListLoading = true |
||||
|
this.queryForm.page = this.pageIndex |
||||
|
this.queryForm.limit = this.pageSize |
||||
|
searchSyncLogList(this.queryForm).then(({ data }) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.dataList = data.page.list |
||||
|
this.totalPage = data.page.totalCount |
||||
|
} else { |
||||
|
this.$message.error(data.msg || '查询失败') |
||||
|
} |
||||
|
this.dataListLoading = false |
||||
|
}).catch(() => { |
||||
|
this.dataListLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
retryRow (row) { |
||||
|
retrySyncLog({ id: row.id }).then(({ data }) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.$message.success('已触发重试') |
||||
|
this.getDataList() |
||||
|
} else { |
||||
|
this.$message.error(data.msg || '重试失败') |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
sizeChangeHandle (val) { |
||||
|
this.pageSize = val |
||||
|
this.pageIndex = 1 |
||||
|
this.getDataList() |
||||
|
}, |
||||
|
currentChangeHandle (val) { |
||||
|
this.pageIndex = val |
||||
|
this.getDataList() |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,99 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<el-form :inline="true" label-position="top" :model="queryForm"> |
||||
|
<el-form-item label="类型"> |
||||
|
<el-select v-model="queryForm.actionType" clearable style="width: 120px"> |
||||
|
<el-option value="BORROW" label="借用"></el-option> |
||||
|
<el-option value="RETURN" label="归还"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="备件编码"> |
||||
|
<el-input v-model="queryForm.partNo" clearable style="width: 140px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="柜侧单号"> |
||||
|
<el-input v-model="queryForm.cabinetBillNo" clearable style="width: 160px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="getDataList()">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-table :data="dataList" border v-loading="dataListLoading" style="width: 100%;"> |
||||
|
<el-table-column prop="recordNo" label="流水号" min-width="160"></el-table-column> |
||||
|
<el-table-column prop="actionType" label="类型" min-width="80"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ scope.row.actionType === 'BORROW' ? '借用' : '归还' }} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="partNo" label="备件编码" min-width="120"></el-table-column> |
||||
|
<el-table-column prop="partDescription" label="名称" min-width="140"></el-table-column> |
||||
|
<el-table-column prop="batchNo" label="批次" min-width="100"></el-table-column> |
||||
|
<el-table-column prop="qty" label="数量" min-width="80"></el-table-column> |
||||
|
<el-table-column prop="operatorName" label="操作人" min-width="100"></el-table-column> |
||||
|
<el-table-column prop="relatedRecordNo" label="关联借用号" min-width="160"></el-table-column> |
||||
|
<el-table-column prop="cabinetBillNo" label="柜侧单号" min-width="140"></el-table-column> |
||||
|
<el-table-column prop="operateTime" label="操作时间" min-width="160"></el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
@size-change="sizeChangeHandle" |
||||
|
@current-change="currentChangeHandle" |
||||
|
:current-page="pageIndex" |
||||
|
:page-sizes="[20, 50, 100]" |
||||
|
:page-size="pageSize" |
||||
|
:total="totalPage" |
||||
|
layout="total, sizes, prev, pager, next, jumper"> |
||||
|
</el-pagination> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { searchBorrowList } from '@/api/partspare/smartCabinet.js' |
||||
|
|
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
queryForm: { |
||||
|
actionType: '', |
||||
|
partNo: '', |
||||
|
cabinetBillNo: '', |
||||
|
page: 1, |
||||
|
limit: 20 |
||||
|
}, |
||||
|
dataList: [], |
||||
|
dataListLoading: false, |
||||
|
pageIndex: 1, |
||||
|
pageSize: 20, |
||||
|
totalPage: 0 |
||||
|
} |
||||
|
}, |
||||
|
created () { |
||||
|
this.getDataList() |
||||
|
}, |
||||
|
methods: { |
||||
|
getDataList () { |
||||
|
this.dataListLoading = true |
||||
|
this.queryForm.page = this.pageIndex |
||||
|
this.queryForm.limit = this.pageSize |
||||
|
searchBorrowList(this.queryForm).then(({ data }) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.dataList = data.page.list |
||||
|
this.totalPage = data.page.totalCount |
||||
|
} else { |
||||
|
this.$message.error(data.msg || '查询失败') |
||||
|
} |
||||
|
this.dataListLoading = false |
||||
|
}).catch(() => { |
||||
|
this.dataListLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
sizeChangeHandle (val) { |
||||
|
this.pageSize = val |
||||
|
this.pageIndex = 1 |
||||
|
this.getDataList() |
||||
|
}, |
||||
|
currentChangeHandle (val) { |
||||
|
this.pageIndex = val |
||||
|
this.getDataList() |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,188 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<el-form :inline="true" label-position="top" :model="queryForm"> |
||||
|
<el-form-item label="盘点单号"> |
||||
|
<el-input v-model="queryForm.stocktakeNo" clearable style="width: 160px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="柜侧单号"> |
||||
|
<el-input v-model="queryForm.cabinetBillNo" clearable style="width: 160px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="状态"> |
||||
|
<el-select v-model="queryForm.status" clearable style="width: 120px"> |
||||
|
<el-option value="待确认" label="待确认"></el-option> |
||||
|
<el-option value="已确认" label="已确认"></el-option> |
||||
|
<el-option value="已作废" label="已作废"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="仓库"> |
||||
|
<el-select v-model="queryForm.warehouseId" clearable style="width: 150px"> |
||||
|
<el-option |
||||
|
v-for="item in wareHouseList" |
||||
|
:key="item.warehouseId" |
||||
|
:value="item.warehouseId" |
||||
|
:label="item.warehouseName"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="getDataList()">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-table :data="dataList" border v-loading="dataListLoading" style="width: 100%;"> |
||||
|
<el-table-column prop="stocktakeNo" label="盘点单号" min-width="160"></el-table-column> |
||||
|
<el-table-column prop="cabinetBillNo" label="柜侧单号" min-width="140"></el-table-column> |
||||
|
<el-table-column prop="buDesc" label="BU" min-width="80"></el-table-column> |
||||
|
<el-table-column prop="warehouseId" label="仓库" min-width="100"></el-table-column> |
||||
|
<el-table-column prop="status" label="状态" min-width="90"></el-table-column> |
||||
|
<el-table-column prop="createDate" label="创建时间" min-width="160"></el-table-column> |
||||
|
<el-table-column prop="confirmBy" label="确认人" min-width="100"></el-table-column> |
||||
|
<el-table-column label="操作" width="180" fixed="right"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="text" @click="showInfo(scope.row)">明细</el-button> |
||||
|
<el-button v-if="scope.row.status === '待确认'" type="text" @click="confirmRow(scope.row)">确认</el-button> |
||||
|
<el-button v-if="scope.row.status === '待确认'" type="text" @click="cancelRow(scope.row)">作废</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
@size-change="sizeChangeHandle" |
||||
|
@current-change="currentChangeHandle" |
||||
|
:current-page="pageIndex" |
||||
|
:page-sizes="[20, 50, 100]" |
||||
|
:page-size="pageSize" |
||||
|
:total="totalPage" |
||||
|
layout="total, sizes, prev, pager, next, jumper"> |
||||
|
</el-pagination> |
||||
|
|
||||
|
<el-dialog title="盘点差异明细" :visible.sync="infoVisible" width="80%"> |
||||
|
<div style="margin-bottom: 10px;">差异合计:{{ diffSum }}</div> |
||||
|
<el-table :data="detailList" border> |
||||
|
<el-table-column prop="partNo" label="备件编码"></el-table-column> |
||||
|
<el-table-column prop="partDescription" label="名称"></el-table-column> |
||||
|
<el-table-column prop="batchNo" label="批次"></el-table-column> |
||||
|
<el-table-column prop="mesQty" label="MES数量"></el-table-column> |
||||
|
<el-table-column prop="cabinetQty" label="柜数量"></el-table-column> |
||||
|
<el-table-column prop="diffQty" label="差异"></el-table-column> |
||||
|
<el-table-column prop="adjustTransNo" label="调整单号"></el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { searchStocktakeList, getStocktakeInfo, confirmStocktake, cancelStocktake } from '@/api/partspare/smartCabinet.js' |
||||
|
import { getWareHouseList } from '@/api/partspare/wareHouseEntity.js' |
||||
|
|
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
queryForm: { |
||||
|
stocktakeNo: '', |
||||
|
cabinetBillNo: '', |
||||
|
status: '', |
||||
|
warehouseId: '', |
||||
|
page: 1, |
||||
|
limit: 20 |
||||
|
}, |
||||
|
wareHouseList: [], |
||||
|
dataList: [], |
||||
|
dataListLoading: false, |
||||
|
pageIndex: 1, |
||||
|
pageSize: 20, |
||||
|
totalPage: 0, |
||||
|
infoVisible: false, |
||||
|
detailList: [], |
||||
|
diffSum: 0, |
||||
|
currentStocktakeNo: '' |
||||
|
} |
||||
|
}, |
||||
|
created () { |
||||
|
this.getWareHouseList() |
||||
|
this.getDataList() |
||||
|
}, |
||||
|
methods: { |
||||
|
getWareHouseList () { |
||||
|
getWareHouseList({ |
||||
|
username: this.$store.state.user.name, |
||||
|
warehousetype: '备品备件仓' |
||||
|
}).then(({ data }) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.wareHouseList = data.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
getDataList () { |
||||
|
this.dataListLoading = true |
||||
|
this.queryForm.page = this.pageIndex |
||||
|
this.queryForm.limit = this.pageSize |
||||
|
searchStocktakeList(this.queryForm).then(({ data }) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.dataList = data.page.list |
||||
|
this.totalPage = data.page.totalCount |
||||
|
} else { |
||||
|
this.$message.error(data.msg || '查询失败') |
||||
|
} |
||||
|
this.dataListLoading = false |
||||
|
}).catch(() => { |
||||
|
this.dataListLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
showInfo (row) { |
||||
|
this.currentStocktakeNo = row.stocktakeNo |
||||
|
getStocktakeInfo({ stocktakeNo: row.stocktakeNo }).then(({ data }) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.detailList = data.data.details || [] |
||||
|
this.diffSum = this.detailList.reduce((sum, item) => sum + Number(item.diffQty || 0), 0) |
||||
|
this.infoVisible = true |
||||
|
} else { |
||||
|
this.$message.error(data.msg || '查询明细失败') |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
confirmRow (row) { |
||||
|
getStocktakeInfo({ stocktakeNo: row.stocktakeNo }).then(({ data }) => { |
||||
|
if (!(data && data.code === 0)) { |
||||
|
this.$message.error(data.msg || '查询明细失败') |
||||
|
return |
||||
|
} |
||||
|
const details = data.data.details || [] |
||||
|
const diffSum = details.reduce((sum, item) => sum + Number(item.diffQty || 0), 0) |
||||
|
this.$confirm('确认后将按差异调整库存并生成PDTZ,差异合计:' + diffSum + ',是否继续?', '确认盘点', { |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
confirmStocktake({ stocktakeNo: row.stocktakeNo }).then(({ data }) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.$message.success('确认成功') |
||||
|
this.getDataList() |
||||
|
} else { |
||||
|
this.$message.error(data.msg || '确认失败') |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}) |
||||
|
}, |
||||
|
cancelRow (row) { |
||||
|
this.$confirm('作废后不调整库存,确认作废该盘点单?', '作废', { type: 'warning' }).then(() => { |
||||
|
cancelStocktake({ stocktakeNo: row.stocktakeNo }).then(({ data }) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.$message.success('已作废') |
||||
|
this.getDataList() |
||||
|
} else { |
||||
|
this.$message.error(data.msg || '作废失败') |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
sizeChangeHandle (val) { |
||||
|
this.pageSize = val |
||||
|
this.pageIndex = 1 |
||||
|
this.getDataList() |
||||
|
}, |
||||
|
currentChangeHandle (val) { |
||||
|
this.pageIndex = val |
||||
|
this.getDataList() |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue