|
|
@ -9,7 +9,7 @@ |
|
|
|
<div v-show="isSearchShow" class="search"> |
|
|
|
<el-form ref="queryInfo" :inline="true" :model="queryInfo" class="tab-header"> |
|
|
|
<el-form-item label="入库单号"> |
|
|
|
<el-input v-model="queryInfo.query" placeholder="请输入入库单号" clearable /> |
|
|
|
<el-input v-model="queryInfo.params.no" placeholder="请输入入库单号" clearable /> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<div class="btn" style="text-align: center;"> |
|
|
@ -18,67 +18,60 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-table :data="inStorehouseList.slice((queryInfo.pageNum-1)*queryInfo.pageSize,queryInfo.pageNum*queryInfo.pageSize)" |
|
|
|
style="width: 100%" |
|
|
|
stripe border fixed |
|
|
|
@selection-change="handleSelectionChange"> |
|
|
|
<el-table-column |
|
|
|
fixed="left" |
|
|
|
type="selection" |
|
|
|
width="55"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="inStorehouseId" |
|
|
|
label="入库单号" |
|
|
|
width="180"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="locationId" |
|
|
|
label="货位编号" |
|
|
|
width="180"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="receivingId" |
|
|
|
label="接货单号" |
|
|
|
width="180"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="createPerson" |
|
|
|
label="创建者" |
|
|
|
width="180"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="createTime" |
|
|
|
label="创建时间" |
|
|
|
width="180"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="checkPerson" |
|
|
|
label="审批人" |
|
|
|
width="180"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="checkTime" |
|
|
|
label="审批时间" |
|
|
|
width="180"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="status" |
|
|
|
label="状态" |
|
|
|
width="180"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="remarks" |
|
|
|
label="备注"> |
|
|
|
</el-table-column> |
|
|
|
<el-table :data="inStorehouseList" |
|
|
|
style="width: 100%" border> |
|
|
|
<el-table-column label="序号" type="index" width="60" :index="indexMethod" align="center" /> |
|
|
|
<el-table-column |
|
|
|
prop="createTime" |
|
|
|
label="入库日期" |
|
|
|
align="center" |
|
|
|
width="180"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="custerName" |
|
|
|
label="客户名称" |
|
|
|
align="center" |
|
|
|
width="180"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="no" |
|
|
|
label="订单编号" |
|
|
|
align="center" |
|
|
|
width="180"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="applicationDate" |
|
|
|
label="订单日期" |
|
|
|
align="center" |
|
|
|
width="180"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="locationName" |
|
|
|
label="货位名称" |
|
|
|
align="center" |
|
|
|
width="180"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="storeHouseName" |
|
|
|
label="仓库名称" |
|
|
|
align="center" |
|
|
|
width="180"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="state" |
|
|
|
label="状态" |
|
|
|
align="center" |
|
|
|
:formatter="formatorderdegree" |
|
|
|
width="180"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<div class="pages"> |
|
|
|
<div class="tit" /> |
|
|
|
<pagination |
|
|
|
v-show="inStorehouseList.length > 0" |
|
|
|
:total="total" |
|
|
|
:page.sync="queryInfo.pageNum" |
|
|
|
:limit.sync="queryInfo.pageSize" |
|
|
|
:total="queryInfo.total" |
|
|
|
:page.sync="queryInfo.current" |
|
|
|
:limit.sync="queryInfo.size" |
|
|
|
class="pagination" |
|
|
|
@pagination="getInStorehouseList" |
|
|
|
/> |
|
|
@ -105,9 +98,12 @@ export default { |
|
|
|
btndisabled: false, |
|
|
|
isSearchShow: false, |
|
|
|
queryInfo: { |
|
|
|
query: '', |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 10 |
|
|
|
total: 0, |
|
|
|
current: 1, |
|
|
|
size: 10, |
|
|
|
params: { |
|
|
|
no:'' |
|
|
|
} |
|
|
|
}, |
|
|
|
total: 0, |
|
|
|
user: '', |
|
|
@ -115,27 +111,6 @@ export default { |
|
|
|
selectList: '', |
|
|
|
data: '', |
|
|
|
btnList: [ |
|
|
|
{ |
|
|
|
type: 'success', |
|
|
|
size: 'small', |
|
|
|
icon: 'submit', |
|
|
|
btnKey: 'check', |
|
|
|
btnLabel: '审核' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'danger', |
|
|
|
size: 'small', |
|
|
|
icon: 'cross', |
|
|
|
btnKey: 'cancel', |
|
|
|
btnLabel: '撤销审核' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'danger', |
|
|
|
size: 'small', |
|
|
|
icon: 'cross', |
|
|
|
btnKey: 'cancelInStorehouse', |
|
|
|
btnLabel: '撤销入库' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'info', |
|
|
|
size: 'small', |
|
|
@ -149,15 +124,6 @@ export default { |
|
|
|
methods: { |
|
|
|
btnHandle(btnKey) { |
|
|
|
switch (btnKey) { |
|
|
|
case 'check': |
|
|
|
this.check() |
|
|
|
break |
|
|
|
case 'cancel': |
|
|
|
this.cancel() |
|
|
|
break |
|
|
|
case 'cancelInStorehouse': |
|
|
|
this.cancelInStorehouse() |
|
|
|
break |
|
|
|
case 'doClose': // 关闭 |
|
|
|
this.doClose() |
|
|
|
break |
|
|
@ -167,85 +133,39 @@ export default { |
|
|
|
}, |
|
|
|
resetQuery() { |
|
|
|
this.queryInfo={ |
|
|
|
query: '', |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 10 |
|
|
|
total: 0, |
|
|
|
current: 1, |
|
|
|
size: 10, |
|
|
|
params: { |
|
|
|
no:'' |
|
|
|
} |
|
|
|
}, |
|
|
|
this.getInStorehouseList() |
|
|
|
}, |
|
|
|
handleSizeChange (val) { |
|
|
|
this.queryInfo.pageSize = val |
|
|
|
this.getInStorehouseList() |
|
|
|
}, |
|
|
|
|
|
|
|
handleCurrentChange (val) { |
|
|
|
this.queryInfo.pageNum = val |
|
|
|
this.getInStorehouseList() |
|
|
|
}, |
|
|
|
|
|
|
|
handleSelectionChange (val) { |
|
|
|
this.selectList = val |
|
|
|
}, |
|
|
|
// 序号 |
|
|
|
indexMethod(index) { |
|
|
|
var pagestart = (this.queryInfo.current - 1) * this.queryInfo.size |
|
|
|
var pageindex = index + 1 + pagestart |
|
|
|
return pageindex |
|
|
|
}, |
|
|
|
|
|
|
|
async getInStorehouseList () { |
|
|
|
const { data: result } = await this.$http.get('/putIn/list', { params: this.queryInfo }) |
|
|
|
if (result.status === 201) return this.$message.error('获取列表失败') |
|
|
|
this.inStorehouseList = result.data.rows |
|
|
|
this.total = result.data.total |
|
|
|
}, |
|
|
|
|
|
|
|
check () { |
|
|
|
for (var i = 0; i < this.selectList.length; i++) { |
|
|
|
if (this.selectList[i].status === '待审核') { |
|
|
|
this.selectList[i].status = '已审核' |
|
|
|
this.selectList[i].checkPerson = this.user |
|
|
|
this.updataInStorehouse(this.selectList[i]) |
|
|
|
this.$message.success('入库单' + this.selectList[i].inStorehouseId + '审核成功') |
|
|
|
} else if (this.selectList[i].status === '已审核') { |
|
|
|
this.$message.error('入库单' + this.selectList[i].inStorehouseId + '已审核') |
|
|
|
} else { |
|
|
|
this.$message.error('入库单' + this.selectList[i].inStorehouseId + '进行中') |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
cancel () { |
|
|
|
for (var i = 0; i < this.selectList.length; i++) { |
|
|
|
if (this.selectList[i].status === '已审核') { |
|
|
|
this.selectList[i].status = '待审核' |
|
|
|
this.updataInStorehouse(this.selectList[i]) |
|
|
|
this.$message.success('入库单' + this.selectList[i].inStorehouseId + '撤销审核成功') |
|
|
|
} else if (this.selectList[i].status === '待审核') { |
|
|
|
this.$message.error('入库单' + this.selectList[i].inStorehouseId + '未审核') |
|
|
|
} else { |
|
|
|
this.$message.error('入库单' + this.selectList[i].inStorehouseId + '进行中') |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async cancelInStorehouse () { |
|
|
|
for (var i = 0; i < this.selectList.length; i++) { |
|
|
|
if (this.selectList[i].status === '待审核') { |
|
|
|
this.deleteInStorehouse(this.selectList[i]) |
|
|
|
this.$message.success('入库单' + this.selectList[i].inStorehouseId + this.data) |
|
|
|
} else { |
|
|
|
this.$message.error('入库单' + this.selectList[i].inStorehouseId + '进行中') |
|
|
|
} |
|
|
|
const { data: result } = await this.$http.post('/input/listPage', this.queryInfo ) |
|
|
|
if (result.code == 200){ |
|
|
|
this.inStorehouseList = result.data.records |
|
|
|
this.queryInfo.total = result.data.total |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async updataInStorehouse (inStorehouse) { |
|
|
|
const { data: result } = await this.$http.put('/putIn/updataInStorehouse', inStorehouse) |
|
|
|
if (result.status !== 200) return this.$message.error('修改失败') |
|
|
|
this.getInStorehouseList() |
|
|
|
}, |
|
|
|
|
|
|
|
async deleteInStorehouse (inStorehouse) { |
|
|
|
const { data: result } = await this.$http.delete(`/putIn/deleteInStorehouse/${inStorehouse.inStorehouseId}/${inStorehouse.receivingId}`) |
|
|
|
if (result.status !== 200) return this.$message.error('撤销失败') |
|
|
|
this.data = result.data |
|
|
|
this.getInStorehouseList() |
|
|
|
}, |
|
|
|
formatorderdegree: function( row, column) { |
|
|
|
if(row.state === '1'){ |
|
|
|
return '已出库' |
|
|
|
} else if(row.state === '2') { |
|
|
|
return '重要' |
|
|
|
} else{ |
|
|
|
return '' |
|
|
|
} |
|
|
|
}, |
|
|
|
doClose() { |
|
|
|
this.$store.dispatch('tagsView/delView', this.$route) |
|
|
|
this.$router.go(-1) |
|
|
@ -256,7 +176,6 @@ export default { |
|
|
|
mounted () { |
|
|
|
this.$refs['btnbar'].setButtonList(this.btnList) |
|
|
|
this.getInStorehouseList() |
|
|
|
// this.user = window.sessionStorage.getItem('token').substr(32) |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|