add:叫料管理
This commit is contained in:
@@ -10,6 +10,15 @@
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="单据编码">
|
||||
<el-input
|
||||
v-model="query.bom_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单据编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
@@ -108,12 +117,15 @@
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column prop="bom_code" label="工单单号" :min-width="flexWidth('bom_code',crud.data,'工单单号')" />
|
||||
<el-table-column prop="bom_status" label="工单状态" :formatter="formattStatus" :min-width="flexWidth('bom_status',crud.data,'工单状态')" />
|
||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
<el-table-column prop="device_code" label="机台编码" :min-width="flexWidth('device_code',crud.data,'机台编码')" />
|
||||
<el-table-column prop="call_qty" label="叫料重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="real_qty" label="实际重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="call_qty" label="计划叫料重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="real_qty" label="实际叫料重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="real_weigh_qty" label="实际用料重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" :min-width="flexWidth('qty_unit_name',crud.data,'单位')" />
|
||||
<el-table-column prop="create_name" label="叫料人" :min-width="flexWidth('create_name',crud.data,'叫料人')" />
|
||||
<el-table-column prop="create_time" label="叫料时间" :min-width="flexWidth('create_time',crud.data,'叫料时间')" />
|
||||
<el-table-column prop="confirm_time" label="结束时间" :min-width="flexWidth('confirm_time',crud.data,'结束时间')" />
|
||||
@@ -150,6 +162,7 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudGroup from '@/views/wms/basedata/group/group'
|
||||
|
||||
const defaultForm = {
|
||||
bom_code: null,
|
||||
material_spec: null,
|
||||
material_name: null,
|
||||
material_code: null,
|
||||
|
||||
@@ -118,7 +118,17 @@
|
||||
size="mini"
|
||||
@click="queryDtl()"
|
||||
>
|
||||
添加物料
|
||||
添加库内库存
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="queryDtlIos()"
|
||||
>
|
||||
添加叫料单据
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
@@ -153,6 +163,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column prop="source_bill_code" label="来源单据号" align="center" min-width="150px" show-overflow-tooltip />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="scope.row.remark" size="mini" />
|
||||
@@ -167,14 +178,14 @@
|
||||
</el-table>
|
||||
|
||||
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged" />
|
||||
<!-- <MaterDialog :dialog-show.sync="materShow" :mater-opt-code.sync="materType" @setMaterValue="setMaterValue" />-->
|
||||
<AddDtlIos :dialog-show.sync="dtlIosShow" @tableChanged="tableChanged2" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import AddDtl from '@/views/wms/st/outbill/AddDtl'
|
||||
import MaterDialog from '@/views/wms/pub/MaterDialog'
|
||||
import AddDtlIos from '@/views/wms/st/outbill/AddDtlIos'
|
||||
import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
|
||||
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
|
||||
|
||||
@@ -195,7 +206,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { AddDtl, MaterDialog },
|
||||
components: { AddDtl, AddDtlIos },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
props: {
|
||||
dialogShow: {
|
||||
@@ -208,6 +219,7 @@ export default {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
dtlShow: false,
|
||||
dtlIosShow: false,
|
||||
materType: '',
|
||||
materShow: false,
|
||||
flagnow: false,
|
||||
@@ -319,6 +331,17 @@ export default {
|
||||
this.storId = this.form.stor_id
|
||||
this.dtlShow = true
|
||||
},
|
||||
queryDtlIos(index, row) {
|
||||
if (this.form.bill_type === '') {
|
||||
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.form.stor_id === '') {
|
||||
this.crud.notify('请选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.dtlIosShow = true
|
||||
},
|
||||
tableChanged(rows) {
|
||||
rows.forEach((item) => {
|
||||
// 添加plan_qty
|
||||
@@ -343,6 +366,31 @@ export default {
|
||||
})
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
tableChanged2(rows) {
|
||||
rows.forEach((item) => {
|
||||
// 添加plan_qty
|
||||
item.plan_qty = item.call_qty
|
||||
item.source_bill_code = item.bom_code
|
||||
if (this.form.tableData.length !== 0) {
|
||||
this.flagnow = false
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
if (this.form.tableData[i].storagevehicle_code === item.storagevehicle_code && this.form.tableData[i].pcsn === item.pcsn) {
|
||||
this.flagnow = true
|
||||
}
|
||||
}
|
||||
if (!this.flagnow) {
|
||||
item.edit = true
|
||||
this.form.tableData.splice(-1, 0, item)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
||||
}
|
||||
} else {
|
||||
item.edit = true
|
||||
this.form.tableData.splice(-1, 0, item)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
||||
}
|
||||
})
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
setMaterValue(row) {
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
if (this.form.tableData[i].material_id === row.material_id) {
|
||||
|
||||
143
wms/nladmin-ui/src/views/wms/st/outbill/AddDtlIos.vue
Normal file
143
wms/nladmin-ui/src/views/wms/st/outbill/AddDtlIos.vue
Normal file
@@ -0,0 +1,143 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="单据选择"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="单据编码">
|
||||
<el-input
|
||||
v-model="query.bom_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单据编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="机台编码">
|
||||
<el-input
|
||||
v-model="query.device_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="机台编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="bom_code" label="工单单号" :min-width="flexWidth('bom_code',crud.data,'工单单号')" />
|
||||
<el-table-column prop="bom_status" label="工单状态" :formatter="formattStatus" :min-width="flexWidth('bom_status',crud.data,'工单状态')" />
|
||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
<el-table-column prop="device_code" label="机台编码" :min-width="flexWidth('device_code',crud.data,'机台编码')" />
|
||||
<el-table-column prop="call_qty" label="叫料重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="create_name" label="叫料人" :min-width="flexWidth('create_name',crud.data,'叫料人')" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" :min-width="flexWidth('qty_unit_name',crud.data,'单位')" />
|
||||
<el-table-column prop="create_time" label="叫料时间" :min-width="flexWidth('create_time',crud.data,'叫料时间')" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
export default {
|
||||
name: 'AddDtlIos',
|
||||
components: { crudOperation, rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '叫料单据',
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
reset: true,
|
||||
download: false
|
||||
},
|
||||
url: 'api/bomCallMaterial',
|
||||
query: { 'bom_status': '1' },
|
||||
idField: 'bom_id',
|
||||
sort: 'bom_id,desc'
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
dicts: ['BOM_STATUS'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formattStatus(row) {
|
||||
return this.dict.label.BOM_STATUS[row.bom_status]
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
this.rows = this.$refs.table.selection
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先勾选仓位')
|
||||
return
|
||||
}
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.rows)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<span class="role-span">出库明细</span>
|
||||
<div class="crud-opts-form">
|
||||
<el-form ref="form" :inline="true" :model="form" size="mini">
|
||||
<el-form-item label="库区" prop="gender2">
|
||||
<!-- <el-form-item label="库区" prop="gender2">
|
||||
<el-cascader
|
||||
placeholder="请选择"
|
||||
:options="sects"
|
||||
@@ -31,7 +31,7 @@
|
||||
clearable
|
||||
@change="sectQueryChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item>-->
|
||||
</el-form>
|
||||
</div>
|
||||
<span class="crud-opts-right2">
|
||||
@@ -131,6 +131,8 @@
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="数量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="assign_qty" label="已分配数量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="unassign_qty" label="未分配数量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column prop="source_bill_code" label="来源单据号" align="center" min-width="150px" show-overflow-tooltip />
|
||||
<el-table-column prop="is_check" label="是否拣选" align="center" min-width="100px" show-overflow-tooltip :formatter="isCheck" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div class="crud-opts2">
|
||||
@@ -297,7 +299,7 @@ export default {
|
||||
sects: [],
|
||||
pointList: [],
|
||||
rules: {
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -324,7 +326,7 @@ export default {
|
||||
this.sects = res.content
|
||||
})
|
||||
|
||||
const area_type = 'OUT01'
|
||||
const area_type = 'INOUR01'
|
||||
crudPoint.getPointList({ 'region_code': area_type }).then(res => {
|
||||
this.pointList = res
|
||||
})
|
||||
@@ -338,6 +340,9 @@ export default {
|
||||
bill_statusFormat(row, column) {
|
||||
return this.dict.label.io_bill_status[row.bill_status]
|
||||
},
|
||||
isCheck(row, column) {
|
||||
return this.dict.label.IS_OR_NOT[row.is_check]
|
||||
},
|
||||
PointChanged(row) {
|
||||
this.form2.point_code = row.point_code
|
||||
},
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
<el-table-column prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量" align="center" width="100px" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column prop="source_bill_code" label="源单号" align="center" width="130px" />
|
||||
<el-table-column prop="is_check" label="是否拣选" align="center" min-width="100px" show-overflow-tooltip :formatter="isCheck" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
@@ -237,6 +238,9 @@ export default {
|
||||
taskdtl_typeFormat(row) {
|
||||
return this.dict.label.SCH_TASK_TYPE_DTL[row.taskdtl_type]
|
||||
},
|
||||
isCheck(row, column) {
|
||||
return this.dict.label.IS_OR_NOT[row.is_check]
|
||||
},
|
||||
formatOverdue(row, column) {
|
||||
return this.dict.label.IS_OR_NOT[row.is_overdue]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user