仓库-出库单:出库计划,样式功能调整,打印功能添加
This commit is contained in:
@@ -74,4 +74,26 @@ export function getMaterialList(params) {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 根据出货单号,查询出货单物料信息
|
||||||
|
*/
|
||||||
|
export function getOutoderMatrials(params) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/WmOutOrder/getoutorder_matrials',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据出货单号 4 生成出货单的出货计划
|
||||||
|
*/
|
||||||
|
export function generateOutorderplan(params) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/WmOutOrder/generate_outorderplan',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog v-bind="$attrs" v-on="$listeners" @open="onOpen" @close="onClose" title="出库单打印" width="860px">
|
<el-dialog v-loading="loading" v-bind="$attrs" v-on="$listeners" @open="onOpen" @close="onClose" title="出库单打印" width="860px">
|
||||||
<div class="print" id="printDom" ref="printRef">
|
<div class="print" id="printDom" ref="printRef">
|
||||||
<div class="print-body-box">
|
<div class="print-body-box">
|
||||||
<div class="title">出库单 {{ printData.shipmentNum }}</div>
|
<div class="title">出库单 {{ printData.shipmentNum }}</div>
|
||||||
@@ -42,10 +42,10 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="item in printData.materialList">
|
<tr v-for="item in printData.materialList">
|
||||||
<td>{{ item.partnumber }}</td>
|
<td>{{ item.partnumber }}</td>
|
||||||
<td>{{ item.description }}</td>
|
<td>{{ item.productName }}</td>
|
||||||
<td>{{ item.requireOutNum }}</td>
|
<td>{{ item.requireOutNum }}</td>
|
||||||
<td>20</td>
|
<td>{{ item.packageNum }}</td>
|
||||||
<td>200</td>
|
<td>{{ item.itemNum }}</td>
|
||||||
<!-- <td>{{ item.stockQuantity }}</td>
|
<!-- <td>{{ item.stockQuantity }}</td>
|
||||||
<td>{{ item.stockQuantity2 }}</td> -->
|
<td>{{ item.stockQuantity2 }}</td> -->
|
||||||
</tr>
|
</tr>
|
||||||
@@ -70,15 +70,15 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-if="item.package_code_client !==null" v-for="item in printData.planlList">
|
<tr v-if="item.package_code_client !== null" v-for="item in printData.planlList">
|
||||||
<td>{{ item.package_code_client }}</td>
|
<td>{{ item.patchcode }}</td>
|
||||||
<td>{{ item.partnumber }}</td>
|
<td>{{ item.materialCode }}</td>
|
||||||
<td>{{ item.location_code }}</td>
|
<td>{{ item.warehouseCode }}</td>
|
||||||
<td>{{ item.count }}</td>
|
<td>{{ item.packageNum }}</td>
|
||||||
<td>{{ item.goods_num_action_count }}</td>
|
<td>{{ item.partnumberNum }}</td>
|
||||||
<td>{{ item.outhouse_num }}</td>
|
<td>{{ item.requireNum }}</td>
|
||||||
<td>{{ item.time }}</td>
|
<td>{{ item.patchtime }}</td>
|
||||||
<td>{{ item.sort }}</td>
|
<td>{{ item.outorder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-else>
|
<tr v-else>
|
||||||
<td :colspan="8"><div class="line"></div></td>
|
<td :colspan="8"><div class="line"></div></td>
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getWmOutOrder } from '@/api/wmsManagement/wmOutOrder.js'
|
import * as WmOutOrderApi from '@/api/wmsManagement/wmOutOrder.js'
|
||||||
import print from 'print-js'
|
import print from 'print-js'
|
||||||
export default {
|
export default {
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
@@ -108,6 +108,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
loading: false,
|
||||||
clearData: {},
|
clearData: {},
|
||||||
// 待打印的数据
|
// 待打印的数据
|
||||||
printData: {
|
printData: {
|
||||||
@@ -143,60 +144,40 @@ export default {
|
|||||||
this.$emit('update:visible', false)
|
this.$emit('update:visible', false)
|
||||||
},
|
},
|
||||||
getPrintData() {
|
getPrintData() {
|
||||||
|
this.loading = true
|
||||||
|
setTimeout(() => {
|
||||||
|
this.loading = false
|
||||||
|
}, 30000)
|
||||||
// 出库单主键
|
// 出库单主键
|
||||||
const getKey = this.printKey
|
const getKey = this.printKey
|
||||||
if (getKey === null) {
|
if (getKey === null) {
|
||||||
this.$message('打印参数异常!', getKey)
|
this.$message('打印参数异常!', getKey)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
getWmOutOrder(getKey).then((res) => {
|
WmOutOrderApi.getWmOutOrder(getKey).then((res) => {
|
||||||
const { code, data } = res
|
const { code, data } = res
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
|
// 基本数据
|
||||||
this.printData = data
|
this.printData = data
|
||||||
this.printData.planlList = [
|
// 需求物料清单数据
|
||||||
{
|
WmOutOrderApi.getOutoderMatrials({ shipment_num: getKey }).then((res) => {
|
||||||
package_code_client: 'BNW240318005',
|
if (res.code === 200) {
|
||||||
partnumber: '26255122',
|
this.printData.materialList = res.data
|
||||||
location_code: 'A1-01',
|
}
|
||||||
count: 15,
|
})
|
||||||
goods_num_action_count: 100,
|
WmOutOrderApi.generateOutorderplan({ shipment_num: getKey }).then((res) => {
|
||||||
outhouse_num: 100,
|
if (res.code === 200) {
|
||||||
time: '240317',
|
this.printData.planlList = res.data
|
||||||
sort: 1,
|
console.log('generateOutorderplan', res.data)
|
||||||
},
|
// 计划出库批次清单
|
||||||
{
|
this.loading = false
|
||||||
package_code_client: null,
|
} else {
|
||||||
partnumber: null,
|
this.$message.error('打印参数异常!' + res.msg + getKey)
|
||||||
location_code: null,
|
this.loading = false
|
||||||
count: null,
|
}
|
||||||
goods_num_action_count: null,
|
})
|
||||||
outhouse_num: null,
|
|
||||||
time: null,
|
|
||||||
sort: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
package_code_client: 'BNW240318006',
|
|
||||||
partnumber: '26372445',
|
|
||||||
location_code: 'A1-01',
|
|
||||||
count: 5,
|
|
||||||
goods_num_action_count: 50,
|
|
||||||
outhouse_num: 100,
|
|
||||||
time: '240318',
|
|
||||||
sort: 2,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
package_code_client: 'BNW240318007',
|
|
||||||
partnumber: '26372445',
|
|
||||||
location_code: 'A1-01',
|
|
||||||
count: 5,
|
|
||||||
goods_num_action_count: 50,
|
|
||||||
outhouse_num: 100,
|
|
||||||
time: '240318',
|
|
||||||
sort: 3,
|
|
||||||
},
|
|
||||||
]
|
|
||||||
} else {
|
} else {
|
||||||
this.$message('打印参数异常!', getKey)
|
this.$message.error('打印参数异常!' + getKey)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -302,22 +302,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<PrintView ref="printViewRef" :visible.sync="showPrintDialog" :printKey="printKey"></PrintView>
|
<PrintView ref="printViewRef" :visible.sync="showPrintDialog" :printKey="printKey"></PrintView>
|
||||||
|
<TheOutboundPlan :visible.sync="TheOutboundPlanDialogVisible" :planKey="planKey"></TheOutboundPlan>
|
||||||
<TheChouseMaterial :visible.sync="TheChouseMaterialDialogVisible" @materialChoused="handlerMaterialChoused"></TheChouseMaterial>
|
<TheChouseMaterial :visible.sync="TheChouseMaterialDialogVisible" @materialChoused="handlerMaterialChoused"></TheChouseMaterial>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { listWmOutOrder, addWmOutOrder, delWmOutOrder, updateWmOutOrder, getWmOutOrder, getCustomList } from '@/api/wmsManagement/wmOutOrder.js'
|
import { listWmOutOrder, addWmOutOrder, delWmOutOrder, updateWmOutOrder, getWmOutOrder, getCustomList } from '@/api/wmsManagement/wmOutOrder.js'
|
||||||
import TheChouseMaterial from './components/TheChouseMaterial/TheChouseMaterial.vue'
|
import TheChouseMaterial from './components/TheChouseMaterial/TheChouseMaterial.vue'
|
||||||
|
import TheOutboundPlan from './components/TheOutboundPlan'
|
||||||
import PrintView from '@/components/Print/出库单.vue'
|
import PrintView from '@/components/Print/出库单.vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'wmoutorder',
|
name: 'wmoutorder',
|
||||||
components: {
|
components: {
|
||||||
TheChouseMaterial,
|
TheChouseMaterial,
|
||||||
|
TheOutboundPlan,
|
||||||
PrintView,
|
PrintView,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
TheChouseMaterialDialogVisible: false,
|
TheChouseMaterialDialogVisible: false,
|
||||||
|
TheOutboundPlanDialogVisible:false,
|
||||||
showPrintDialog:false,
|
showPrintDialog:false,
|
||||||
printKey:'',
|
printKey:'',
|
||||||
labelWidth: '100px',
|
labelWidth: '100px',
|
||||||
@@ -526,7 +530,6 @@ export default {
|
|||||||
this.open = true
|
this.open = true
|
||||||
this.title = '编辑出库单数据'
|
this.title = '编辑出库单数据'
|
||||||
this.opertype = 2
|
this.opertype = 2
|
||||||
console.log('getWmOutOrder', res, data)
|
|
||||||
this.form = {
|
this.form = {
|
||||||
...data,
|
...data,
|
||||||
}
|
}
|
||||||
@@ -595,13 +598,11 @@ export default {
|
|||||||
handlePrint(row) {
|
handlePrint(row) {
|
||||||
this.printKey = row.shipmentNum
|
this.printKey = row.shipmentNum
|
||||||
this.showPrintDialog = true;
|
this.showPrintDialog = true;
|
||||||
// this.$refs.printViewRef.handlePrint(row)
|
|
||||||
console.log(row)
|
|
||||||
// this.$message('打印出库单功能待完善!')
|
|
||||||
},
|
},
|
||||||
// 配置出库计划
|
// 配置出库计划
|
||||||
handlePlan(){
|
handlePlan(row){
|
||||||
this.$message('此功能待完善')
|
this.planKey = row.shipmentNum
|
||||||
|
this.TheOutboundPlanDialogVisible = true;
|
||||||
},
|
},
|
||||||
// ====================================================
|
// ====================================================
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
|||||||
115
src/views/wmsManagement/components/TheOutboundPlan/index.vue
Normal file
115
src/views/wmsManagement/components/TheOutboundPlan/index.vue
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-dialog v-bind="$attrs" v-on="$listeners" @open="onOpen" @close="onClose" :title="title" width="800px">
|
||||||
|
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px"> </el-form>
|
||||||
|
<!-- 出库计划列表 -->
|
||||||
|
<div>
|
||||||
|
<!-- 数据区域 -->
|
||||||
|
<el-table :data="dataList" v-loading="loading" ref="table" border highlight-current-row max-height="400px">
|
||||||
|
<el-table-column prop="patchcode" label="批次号" align="center" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column prop="materialCode" label="物料号" align="center" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column prop="warehouseCode" label="所属仓库" align="center" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column prop="packageNum" label="批次箱数" align="center" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column prop="partnumberNum" label="批次零件数" align="center" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column prop="requireNum" label="需求零件数" align="center" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column prop="patchtime" label="批次时间" align="center" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column prop="outorder" label="出库顺序" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model.number="scope.row.outorder" placeholder="请输入出库顺序" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" fixed="right" width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
v-hasPermi="['business:wmoutorder:edit']"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
title="保存"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- <pagination
|
||||||
|
class="mt10"
|
||||||
|
background
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/> -->
|
||||||
|
</div>
|
||||||
|
<div slot="footer">
|
||||||
|
<el-button @click="close">取消</el-button>
|
||||||
|
<el-button type="primary" @click="handelConfirm">确定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import * as WmOutOrderApi from '@/api/wmsManagement/wmOutOrder.js'
|
||||||
|
export default {
|
||||||
|
inheritAttrs: false,
|
||||||
|
components: {},
|
||||||
|
props: ['planKey'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading:false,
|
||||||
|
formData: {},
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
// 弹出层标题
|
||||||
|
title: '出库计划',
|
||||||
|
// 数据列表
|
||||||
|
dataList: [],
|
||||||
|
// 总记录数
|
||||||
|
total: 0,
|
||||||
|
rules: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
created() {},
|
||||||
|
mounted() {},
|
||||||
|
methods: {
|
||||||
|
onOpen() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
onClose() {
|
||||||
|
this.$refs['elForm'].resetFields()
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$emit('update:visible', false)
|
||||||
|
},
|
||||||
|
handelConfirm() {
|
||||||
|
this.$refs['elForm'].validate((valid) => {
|
||||||
|
if (!valid) return
|
||||||
|
this.close()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
setTimeout(() => {
|
||||||
|
this.loading = false
|
||||||
|
}, 30000)
|
||||||
|
WmOutOrderApi.generateOutorderplan({ shipment_num: this.planKey }).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.dataList = res.data
|
||||||
|
// 计划出库批次清单
|
||||||
|
this.loading = false
|
||||||
|
} else {
|
||||||
|
this.$message.error('获取列表失败!' + res.msg + this.planKey)
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style></style>
|
||||||
Reference in New Issue
Block a user