
9 changed files with 1489 additions and 15233 deletions
File diff suppressed because it is too large
@ -0,0 +1,301 @@ |
|||
<template> |
|||
<div> |
|||
<el-card > |
|||
<el-row :gutter="20"> |
|||
<el-col :span="9"> |
|||
<el-input clearable v-model="queryInfo.no" placeholder="请输入入库单号" prefix-icon="el-icon-search"> |
|||
<el-button slot="append" icon="el-icon-search" @click="getInStorehouseList"></el-button> |
|||
</el-input> |
|||
</el-col> |
|||
<el-col :span="9"> |
|||
<el-button type="success" @click="check" icon = "el-icon-success">审核</el-button> |
|||
<el-button type="danger" @click="cancel" icon = "el-icon-error">撤销审核</el-button> |
|||
<el-button type="danger" @click="cancelInStorehouse" icon = "el-icon-error">撤销入库</el-button> |
|||
</el-col> |
|||
</el-row> |
|||
<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 |
|||
align="center" |
|||
label="入库单编号" |
|||
width="150"> |
|||
<template slot-scope="scope" > |
|||
<span @click="handleCheck(scope.row.sid)" style="color: #00afff;cursor:pointer;">{{ scope.row.no }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="applicationDate" |
|||
label="制单日期" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="creatorName" |
|||
label="制单人员" |
|||
width="90"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="custerName" |
|||
label="客户(企业)名称" |
|||
width="180"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="storeHouseName" |
|||
label="仓库" |
|||
width="120"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="auditorName" |
|||
label="审核人" |
|||
width="90"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="state" |
|||
label="状态" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="approvedDate" |
|||
label="审核日期" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="prodNum" |
|||
label="商品信息"> |
|||
<template slot-scope="scope" > |
|||
<span @click="handleCheckProdInfo(scope.row.sid)" |
|||
style="color: #00afff;cursor:pointer;">{{ scope.row.prodNum }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<el-pagination |
|||
@size-change="handleSizeChange" |
|||
@current-change="handleCurrentChange" |
|||
:current-page="queryInfo.pageNum" |
|||
:page-sizes="[10, 20, 30, 40]" |
|||
:page-size="queryInfo.pageSize" |
|||
layout="total, sizes, prev, pager, next, jumper" |
|||
:total="total"> |
|||
</el-pagination> |
|||
|
|||
</el-card> |
|||
<el-dialog :title="title" :visible.sync="inputDialogVisible" width="75%" @close="closeSupplierDialog"> |
|||
|
|||
<el-form :model="inputDetail" ref="supplierRuleForm" label-width="200px" class="demo-ruleForm" :inline="true"> |
|||
<el-form-item label="制单日期:" prop="contacts" align="center" v-show="inputDialogVisible2"> |
|||
{{inputDetail.applicationDate}} |
|||
</el-form-item> |
|||
<el-form-item label="申请单编号:" prop="no" align="center" v-show="inputDialogVisible2"> |
|||
{{inputDetail.no}} |
|||
</el-form-item> |
|||
<el-form-item label="企业名称:" prop="no" align="center" v-show="inputDialogVisible2"> |
|||
{{inputDetail.custerName}} |
|||
</el-form-item> |
|||
<el-table :data="inputDetail.list" |
|||
style="width: 100%" |
|||
stripe border fixed |
|||
@selection-change="handleSelectionChange"> |
|||
<el-table-column |
|||
align="center" |
|||
label="质物名称" |
|||
width="150"> |
|||
<template slot-scope="scope" > |
|||
<span @click="handleCheck(scope.row.sid)" style="color: #00afff;cursor:pointer;">{{ scope.row.proName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="proModel" |
|||
label="规格(型号)" |
|||
width="130"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="manufacturer" |
|||
label="生产厂家(产地)" |
|||
width="150"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="num" |
|||
label="数量" |
|||
width="80"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="weight" |
|||
label="重量" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="confirmedPrice" |
|||
label="质权人确认的单价" |
|||
width="90"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="calculatedValue" |
|||
label="核算的价值" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="locationNumber" |
|||
label="货位号" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="remarks" |
|||
label="备注"> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</el-dialog> |
|||
</div> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data () { |
|||
return { |
|||
queryInfo: { |
|||
query: '', |
|||
pageNum: 1, |
|||
pageSize: 10 |
|||
}, |
|||
inputDetail:{}, |
|||
inputDialogVisible: false, |
|||
inputDialogVisible2: false, |
|||
total: 0, |
|||
user: '', |
|||
inStorehouseList: [], |
|||
selectList: '', |
|||
data: '', |
|||
title: '' |
|||
} |
|||
}, |
|||
methods: { |
|||
async handleCheck(sid){ |
|||
const { data: result } = await this.$http.get('/input/getInStorehouse/' + sid, { }) |
|||
if (result.code !== "200") return this.$message.error('获取列表失败') |
|||
this.inputDetail = result.data |
|||
this.title = '入库单详情' |
|||
this.inputDialogVisible = true |
|||
this.inputDialogVisible2 = true |
|||
}, |
|||
async handleCheckProdInfo(sid){ |
|||
const { data: result } = await this.$http.get('/input/getInStorehouse/' + sid, { }) |
|||
if (result.code !== "200") return this.$message.error('获取列表失败') |
|||
this.inputDetail = result.data |
|||
this.title = '商品详情' |
|||
this.inputDialogVisible = true |
|||
this.inputDialogVisible2 = false |
|||
}, |
|||
closeSupplierDialog(){ |
|||
this.inputDialogVisible2 = false |
|||
this.inputDialogVisible = false |
|||
}, |
|||
handleSizeChange (val) { |
|||
this.queryInfo.pageSize = val |
|||
this.getInStorehouseList() |
|||
}, |
|||
|
|||
handleCurrentChange (val) { |
|||
this.queryInfo.pageNum = val |
|||
this.getInStorehouseList() |
|||
}, |
|||
|
|||
handleSelectionChange (val) { |
|||
this.selectList = val |
|||
}, |
|||
|
|||
async getInStorehouseList () { |
|||
const { data: result } = await this.$http.post('/input/listPage', { params: this.queryInfo }) |
|||
if (result.code !== "200") return this.$message.error('获取列表失败') |
|||
this.inStorehouseList = result.data.records |
|||
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 + '进行中') |
|||
} |
|||
} |
|||
}, |
|||
|
|||
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() |
|||
} |
|||
|
|||
}, |
|||
|
|||
mounted () { |
|||
this.getInStorehouseList() |
|||
this.user = window.sessionStorage.getItem('token').substr(32) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
|
|||
</style> |
@ -0,0 +1,461 @@ |
|||
<template> |
|||
<div> |
|||
<el-card > |
|||
<el-row :gutter="20"> |
|||
<el-col :span="9"> |
|||
<el-input clearable v-model="queryInfo.no" placeholder="请输入出库单号" prefix-icon="el-icon-search"> |
|||
<el-button slot="append" icon="el-icon-search" @click="getOutStorehouseList"></el-button> |
|||
</el-input> |
|||
</el-col> |
|||
<el-col :span="13"> |
|||
<el-button type="primary" @click="addOutStorehouseDialogVisible=true">新增</el-button> |
|||
<el-button type="success" @click="check" icon = "el-icon-success">审核</el-button> |
|||
<el-button type="danger" @click="cancel" icon = "el-icon-error">撤销审核</el-button> |
|||
<el-button type="success" @click="out" icon = "el-icon-success">出库</el-button> |
|||
</el-col> |
|||
</el-row> |
|||
<el-table :data="outStorehouseList.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 |
|||
align="center" |
|||
label="出库单编号" |
|||
width="150"> |
|||
<template slot-scope="scope" > |
|||
<span @click="handleCheck(scope.row.sid)" style="color: #00afff;cursor:pointer;">{{ scope.row.no }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="applicationDate" |
|||
label="制单日期" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="creatorName" |
|||
label="制单人员" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="custerName" |
|||
label="客户(企业)名称" |
|||
width="180"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="storeHouseName" |
|||
label="仓库" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="auditorName" |
|||
label="审核人" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="state" |
|||
label="状态" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="approvedDate" |
|||
label="审核日期" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="prodNum" |
|||
label="商品信息"> |
|||
<template slot-scope="scope" > |
|||
<span @click="handleCheckProdInfo(scope.row.sid)" |
|||
style="color: #00afff;cursor:pointer;">{{ scope.row.prodNum }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<el-pagination |
|||
@size-change="handleSizeChange" |
|||
@current-change="handleCurrentChange" |
|||
:current-page="queryInfo.pageNum" |
|||
:page-sizes="[10, 20, 30, 40]" |
|||
:page-size="queryInfo.pageSize" |
|||
layout="total, sizes, prev, pager, next, jumper" |
|||
:total="total"> |
|||
</el-pagination> |
|||
|
|||
</el-card> |
|||
<el-dialog :title="title" :visible.sync="outputDialogVisible" width="75%" @close="closeSupplierDialog"> |
|||
|
|||
<el-form :model="outputDetail" ref="supplierRuleForm" label-width="200px" class="demo-ruleForm" :inline="true"> |
|||
<el-form-item label="制单日期:" prop="contacts" align="center" v-show="outputDialogVisible2"> |
|||
{{outputDetail.applicationDate}} |
|||
</el-form-item> |
|||
<el-form-item label="申请单编号:" prop="no" align="center" v-show="outputDialogVisible2"> |
|||
{{outputDetail.no}} |
|||
</el-form-item> |
|||
<el-form-item label="企业名称:" prop="no" align="center" v-show="outputDialogVisible2"> |
|||
{{outputDetail.custerName}} |
|||
</el-form-item> |
|||
<el-table :data="outputDetail.list" |
|||
style="width: 100%" |
|||
stripe border fixed |
|||
@selection-change="handleSelectionChange"> |
|||
<el-table-column |
|||
align="center" |
|||
label="质物名称" |
|||
width="150"> |
|||
<template slot-scope="scope" > |
|||
<span @click="handleCheck(scope.row.sid)" style="color: #00afff;cursor:pointer;">{{ scope.row.proName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="proModel" |
|||
label="规格(型号)" |
|||
width="130"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="manufacturer" |
|||
label="生产厂家(产地)" |
|||
width="150"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
label="预计出库量" |
|||
width="80"> |
|||
<el-table-column |
|||
align="center" |
|||
prop="estimateNum" |
|||
label="数量" |
|||
width="80"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="estimateWeight" |
|||
label="重量" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="estimateConfirmedPrice" |
|||
label="质权人确认的单价" |
|||
width="90"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="estimateCalculatedValue" |
|||
label="核算的价值" |
|||
width="90"> |
|||
</el-table-column> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
label="实际出库量" |
|||
width="80"> |
|||
<el-table-column |
|||
align="center" |
|||
prop="realityNum" |
|||
label="数量" |
|||
width="80"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="realityWeight" |
|||
label="重量" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="realityConfirmedPrice" |
|||
label="质权人确认的单价" |
|||
width="90"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="realityCalculatedValue" |
|||
label="核算的价值" |
|||
width="90"> |
|||
</el-table-column> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="locationNumber" |
|||
label="货位号" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="remarks" |
|||
label="备注"> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data () { |
|||
return { |
|||
queryInfo: { |
|||
no: '', |
|||
pageNum: 1, |
|||
pageSize: 10 |
|||
}, |
|||
outputDetail: {}, |
|||
title:"", |
|||
outputDialogVisible: false, |
|||
outputDialogVisible2: false, |
|||
total: 0, |
|||
user: '', |
|||
outStorehouseList: [], |
|||
addOutStorehouseDialogVisible: false, |
|||
updataOutStorehouseDialogVisible: false, |
|||
outStorehouseForm: { |
|||
outStorehouseId: '', |
|||
productName: '', |
|||
count: '', |
|||
locationId: '', |
|||
status: '', |
|||
receivePerson: '', |
|||
addr: '', |
|||
outTime: '', |
|||
createPerson: '', |
|||
createTime: '', |
|||
checkPerson: '', |
|||
checkTime: '' |
|||
}, |
|||
storehouseList: '', |
|||
barCodeList: '', |
|||
locationIdList: '', |
|||
availableQuantity: 0, |
|||
outStorehouse: '', |
|||
selectOutStorehouseList: [], |
|||
|
|||
rules: { |
|||
barCode: [ |
|||
{ required: true, message: '请输入条码', trigger: 'blur' } |
|||
], |
|||
locationId: [ |
|||
{ required: true, message: '请输入货位', trigger: 'blur' } |
|||
], |
|||
count: [ |
|||
{ required: true, message: '请输入数量', trigger: 'blur' } |
|||
], |
|||
receivePerson: [ |
|||
{ required: true, message: '请输入收货人', trigger: 'blur' } |
|||
], |
|||
addr: [ |
|||
{ required: true, message: '请输入地址', trigger: 'blur' } |
|||
] |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
async handleCheck(sid){ |
|||
const { data: result } = await this.$http.get('/output/getOutStorehouse/' + sid, { }) |
|||
if (result.code !== "200") return this.$message.error('获取列表失败') |
|||
this.outputDetail = result.data |
|||
this.title = '出库单详情' |
|||
this.outputDialogVisible = true |
|||
this.outputDialogVisible2 = true |
|||
}, |
|||
async handleCheckProdInfo(sid){ |
|||
const { data: result } = await this.$http.get('/output/getOutStorehouse/' + sid, { }) |
|||
if (result.code !== "200") return this.$message.error('获取列表失败') |
|||
this.outputDetail = result.data |
|||
this.title = '商品详情' |
|||
this.outputDialogVisible = true |
|||
this.outputDialogVisible2 = false |
|||
}, |
|||
closeSupplierDialog(){ |
|||
this.inputDialogVisible2 = false |
|||
this.inputDialogVisible = false |
|||
}, |
|||
handleSizeChange (val) { |
|||
this.queryInfo.pageSize = val |
|||
this.getOutStorehouseList() |
|||
}, |
|||
|
|||
handleCurrentChange (val) { |
|||
this.queryInfo.pageNum = val |
|||
this.getOutStorehouseList() |
|||
}, |
|||
|
|||
closeAddOutStorehouseDialog () { |
|||
this.$refs.addOutStorehouseRuleForm.resetFields() |
|||
}, |
|||
|
|||
closeUpdataOutStorehouseDialog () { |
|||
this.$refs.updataOutStorehouseRuleForm.resetFields() |
|||
}, |
|||
|
|||
handleSelectionChange (val) { |
|||
this.selectOutStorehouseList = val |
|||
}, |
|||
|
|||
check () { |
|||
for (var i = 0; i < this.selectOutStorehouseList.length; i++) { |
|||
if (this.selectOutStorehouseList[i].status === '待审核') { |
|||
this.selectOutStorehouseList[i].status = '已审核' |
|||
this.selectOutStorehouseList[i].checkPerson = this.user |
|||
this.outStorehouse = this.selectOutStorehouseList[i] |
|||
this.checkAcancel() |
|||
this.$message.success('订单' + this.selectOutStorehouseList[i].outStorehouseId + '审核成功') |
|||
} else if (this.selectOutStorehouseList[i].status === '已审核') { |
|||
this.$message.error('订单' + this.selectOutStorehouseList[i].outStorehouseId + '已审核') |
|||
} else { |
|||
this.$message.error('订单' + this.selectOutStorehouseList[i].outStorehouseId + '进行中') |
|||
} |
|||
} |
|||
}, |
|||
|
|||
cancel () { |
|||
for (var i = 0; i < this.selectOutStorehouseList.length; i++) { |
|||
if (this.selectOutStorehouseList[i].status === '已审核') { |
|||
this.selectOutStorehouseList[i].status = '待审核' |
|||
this.selectOutStorehouseList[i].createTime = '' |
|||
this.selectOutStorehouseList[i].createPerson = '' |
|||
this.outStorehouse = this.selectOutStorehouseList[i] |
|||
this.checkAcancel() |
|||
this.$message.success('订单' + this.selectOutStorehouseList[i].outStorehouseId + '撤销审核成功') |
|||
} else if (this.selectOutStorehouseList[i].status === '待审核') { |
|||
this.$message.error('订单' + this.selectOutStorehouseList[i].outStorehouseId + '未审核') |
|||
} else { |
|||
this.$message.error('订单' + this.selectOutStorehouseList[i].outStorehouseId + '进行中') |
|||
} |
|||
} |
|||
}, |
|||
|
|||
async checkAcancel () { |
|||
const { data: result } = await this.$http.put('/outStorehouse/updataOutStorehouse', this.outStorehouse) |
|||
if (result.status !== 200) return this.$message.error('更新失败') |
|||
this.getOutStorehouseList() |
|||
}, |
|||
|
|||
async getQuery () { |
|||
const { data: result } = await this.$http.get('/outStorehouse/getQuery', { params: this.outStorehouseForm }) |
|||
if (result.status !== 200) return this.$message.error('获取列表失败') |
|||
this.barCodeList = result.data.barCodeList |
|||
this.locationIdList = result.data.locationIdList |
|||
this.availableQuantity = result.data.availableQuantity |
|||
this.outStorehouseForm.productName = result.data.productName |
|||
console.log(this.barCodeList) |
|||
}, |
|||
|
|||
async getOutStorehouseList () { |
|||
const { data: result } = await this.$http.post('/output/listPage', { params: this.queryInfo }) |
|||
console.log(result); |
|||
if (result.code !== "200") return this.$message.error('获取列表失败') |
|||
this.total = result.data.total |
|||
this.outStorehouseList = result.data.records |
|||
}, |
|||
|
|||
getId () { |
|||
const now = new Date() |
|||
this.outStorehouseForm.outStorehouseId = 'OT' + now.getTime() |
|||
}, |
|||
|
|||
addOutStorehouse () { |
|||
this.$refs.addOutStorehouseRuleForm.validate(async validate => { |
|||
this.getId() |
|||
this.outStorehouseForm.status = '待审核' |
|||
this.outStorehouseForm.createPerson = this.user |
|||
if (!validate) return this.$message.error('请填写必填项') |
|||
const { data: result } = await this.$http.post('/outStorehouse/addOutStorehouse', this.outStorehouseForm) |
|||
if (result.status !== 200) return this.$message.error('添加失败') |
|||
this.$message.success('添加成功') |
|||
this.getOutStorehouseList() |
|||
this.addOutStorehouseDialogVisible = false |
|||
}) |
|||
}, |
|||
|
|||
open (outStorehouse) { |
|||
// this.outStorehouseForm.outStorehouseId = outStorehouse.outStorehouse |
|||
// this.outStorehouseForm.barCode = outStorehouse.barCode |
|||
// this.outStorehouseForm.productName = outStorehouse.productName |
|||
// this.outStorehouseForm.locationId = outStorehouse.locationId |
|||
// this.outStorehouseForm.count = outStorehouse.locationId |
|||
// this.outStorehouseForm.status = outStorehouse.status |
|||
// this.outStorehouseForm.receivePerson = outStorehouse.receivePerson |
|||
// this.outStorehouseForm.addr = outStorehouse.addr |
|||
// this.outStorehouseForm.createPerson = outStorehouse.createPerson |
|||
if (outStorehouse.status !== '待审核') return this.$message.error('订单' + outStorehouse.outStorehouseId + '进行中') |
|||
outStorehouse.count = 0 |
|||
this.outStorehouse = outStorehouse |
|||
this.updataOutStorehouseDialogVisible = true |
|||
}, |
|||
|
|||
updataOutStorehouse () { |
|||
this.$refs.updataOutStorehouseRuleForm.validate(async validate => { |
|||
if (!validate) return this.$message.error('请输入必填项') |
|||
const { data: result } = await this.$http.put('/outStorehouse/updataOutStorehouse', this.outStorehouse) |
|||
if (result.status !== 200) return this.$message.error('更新数据失败') |
|||
this.$message.success('更新成功') |
|||
this.getOutStorehouseList() |
|||
this.updataOutStorehouseDialogVisible = false |
|||
}) |
|||
}, |
|||
|
|||
deleteOutStrorehouse (outStorehouse) { |
|||
console.log(outStorehouse) |
|||
if (outStorehouse.status !== '待审核') return this.$message.error('订单' + this.outStorehouse.outStorehouseId + '进行中') |
|||
this.outStorehouse = outStorehouse |
|||
console.log(this.outStorehouse) |
|||
this.deleteOutStorehouse() |
|||
this.getOutStorehouseList() |
|||
this.outStorehouse = '' |
|||
}, |
|||
|
|||
async deleteOutStorehouse (outStorehouse) { |
|||
const result = await this.$confirm('此操作将永久删除' + outStorehouse.outStorehouseId + ', 是否继续?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).catch(error => error) |
|||
if (result !== 'confirm') return this.$message.info('用户取消操作') |
|||
const { data: resultDB } = await this.$http.delete(`/outStorehouse/delete/${outStorehouse.outStorehouseId}/${outStorehouse.count}/${outStorehouse.locationId}`) |
|||
if (resultDB.status !== 200) return this.$message.error('删除订单失败') |
|||
this.getStorehouseList() |
|||
this.$message.success('订单删除成功') |
|||
}, |
|||
|
|||
async out () { |
|||
for (var i = 0; i < this.selectOutStorehouseList.length; i++) { |
|||
if (this.selectOutStorehouseList[i].status === '已拣货') { |
|||
this.selectOutStorehouseList[i].status = '已出库' |
|||
this.outStorehouse = this.selectOutStorehouseList[i] |
|||
const { data: result } = await this.$http.put('/outStorehouse/out', this.outStorehouse) |
|||
this.$message.success('订单' + this.selectOutStorehouseList[i].outStorehouseId + '出库成功') |
|||
} else { |
|||
this.$message.error('订单' + this.selectOutStorehouseList[i].outStorehouseId + '进行中') |
|||
} |
|||
} |
|||
this.getOutStorehouseList() |
|||
} |
|||
|
|||
}, |
|||
mounted () { |
|||
this.getOutStorehouseList() |
|||
this.getQuery() |
|||
// this.getStorehouse() |
|||
this.user = window.sessionStorage.getItem('token').substr(32) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
@ -0,0 +1,139 @@ |
|||
<template> |
|||
<div> |
|||
<el-card class="box-card"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="9"> |
|||
<el-input clearable v-model="queryInfo.query" placeholder="请输入商品名" prefix-icon="el-icon-search"> |
|||
<el-button slot="append" icon="el-icon-search" @click="getStockList"></el-button> |
|||
</el-input> |
|||
</el-col> |
|||
</el-row> |
|||
<el-table :data="stockList.slice((queryInfo.pageNum-1)*queryInfo.pageSize,queryInfo.pageNum*queryInfo.pageSize)" |
|||
style="width: 100%" |
|||
stripe border fixed> |
|||
<el-table-column |
|||
align="center" |
|||
prop="proName" |
|||
label="商品名称" |
|||
width="180"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="proModel" |
|||
label="商品规格(型号)" |
|||
width="180"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="custerName" |
|||
label="客户名称(企业)" |
|||
width="180"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="manufacturer" |
|||
label="生成厂家(产地)" |
|||
width="180"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="num" |
|||
label="数量" |
|||
width="80"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="weight" |
|||
label="重量" |
|||
width="80"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="proUnit" |
|||
label="规格单位" |
|||
width="80"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="confirmedPrice" |
|||
label="质权人确认的单价" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="calculatedValue" |
|||
label="核算的价值" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="locationNumber" |
|||
label="货位号" |
|||
width="120"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
align="center" |
|||
prop="storeHouseName" |
|||
label="仓库名称" |
|||
width="120"> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<el-pagination |
|||
@size-change="handleSizeChange" |
|||
@current-change="handleCurrentChange" |
|||
:current-page="queryInfo.pageNum" |
|||
:page-sizes="[10, 20, 30, 40]" |
|||
:page-size="queryInfo.pageSize" |
|||
layout="total, sizes, prev, pager, next, jumper" |
|||
:total="total"> |
|||
</el-pagination> |
|||
|
|||
</el-card> |
|||
|
|||
</div> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data () { |
|||
return { |
|||
queryInfo: { |
|||
query: '', |
|||
pageNum: 1, |
|||
pageSize: 10 |
|||
}, |
|||
total: 0, |
|||
stockList: [] |
|||
} |
|||
}, |
|||
methods: { |
|||
handleSizeChange (val) { |
|||
this.queryInfo.pageSize = val |
|||
this.getStockList() |
|||
}, |
|||
|
|||
handleCurrentChange (val) { |
|||
this.queryInfo.pageNum = val |
|||
this.getStockList() |
|||
}, |
|||
|
|||
async getStockList () { |
|||
const { data: result } = await this.$http.post('/stock/listPage', { params: this.queryInfo }) |
|||
if (result.code !== "200") return this.$message.error('获取列表失败') |
|||
this.total = result.data.total |
|||
this.stockList = result.data.records |
|||
} |
|||
|
|||
}, |
|||
|
|||
mounted () { |
|||
this.getStockList() |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
|
|||
</style> |
Loading…
Reference in new issue