opt:提交用料出库

This commit is contained in:
DESKTOP-5DIJMF9\admin
2025-07-15 20:31:11 +08:00
parent 336a6d9594
commit ec304e2cb4
10 changed files with 256 additions and 353 deletions

View File

@@ -116,7 +116,7 @@
type="primary"
icon="el-icon-plus"
size="mini"
@click="queryDtl()"
@click="queryOrderDtl()"
>
用料清单物料
</el-button>
@@ -142,12 +142,11 @@
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="190" align="center" />
<el-table-column prop="material_code" label="物料编码" width="190" align="center" />
<el-table-column prop="material_name" label="物料名称" align="center" min-width="150px" show-overflow-tooltip />
<el-table-column show-overflow-tooltip prop="pcsn" label="批次号" width="150px" align="center" />
<el-table-column prop="plan_qty" label="出库重量" width="150" align="center" />
<el-table-column prop="plan_qty" label="数量" width="150" align="center" />
<el-table-column prop="qty_unit_name" label="单位" align="center" />
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
<el-table-column prop="source_bill_code" label="用料清单号" :min-width="flexWidth('source_bill_code',crud.data,'用料清单号')" />
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="120" fixed="right">
<template scope="scope">
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="deleteRow(scope.$index, form.tableData)" />
@@ -155,12 +154,14 @@
</el-table-column>
</el-table>
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged" />
<AddOrderDtl :dialog-show.sync="dtlShow2" :stor-id="storId" @tableChanged="tableChanged" />
</el-dialog>
</template>
<script>
import CRUD, { crud, form } from '@crud/crud'
import AddDtl from '@/views/wms/st/outbill/AddDtl'
import AddOrderDtl from '@/views/wms/st/outbill/AddOrderDtl'
import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
@@ -181,7 +182,7 @@ const defaultForm = {
}
export default {
name: 'AddDialog',
components: { AddDtl },
components: { AddDtl, AddOrderDtl },
mixins: [crud(), form(defaultForm)],
props: {
dialogShow: {
@@ -194,13 +195,9 @@ export default {
return {
dialogVisible: false,
dtlShow: false,
materType: '',
materShow: false,
dtlShow2: false,
flagnow: false,
nowrow: {},
nowindex: '',
storlist: [],
invtypelist: [],
storId: null,
rules: {
stor_id: [
@@ -250,6 +247,22 @@ export default {
}
})
},
queryOrderDtl(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
}
if (this.form.bill_type !== '1001') {
this.crud.notify('请选择用料出库!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.storId = this.form.stor_id
this.dtlShow2 = true
},
queryDtl(index, row) {
if (this.form.bill_type === '') {
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
@@ -259,6 +272,10 @@ export default {
this.crud.notify('请选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.form.bill_type !== '1009') {
this.crud.notify('请选择手工出库!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.storId = this.form.stor_id
this.dtlShow = true
},

View File

@@ -66,7 +66,7 @@
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
<el-table-column prop="qty" label="重量" :formatter="crud.formatNum3" :min-width="flexWidth('qty',crud.data,'重量')" />
<el-table-column prop="frozen_qty" label="冻结数量" :formatter="crud.formatNum3" :min-width="flexWidth('frozen_qty',crud.data,'冻结数量')" />
<el-table-column prop="qty_unit_name" label="重量单位" :min-width="flexWidth('qty_unit_name',crud.data,'重量单位')" />
<el-table-column prop="qty_unit_name" label="单位" :min-width="flexWidth('qty_unit_name',crud.data,'单位')" />
</el-table>
<!--分页组件-->
<pagination />
@@ -176,7 +176,7 @@ export default {
submit() {
this.rows = this.$refs.table.selection
if (this.rows.length <= 0) {
this.$message('请先勾选仓位')
this.$message('请先勾选记录')
return
}
this.$emit('update:dialogShow', false)

View File

@@ -0,0 +1,161 @@
<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-select
v-model="query.stor_id"
:disabled="true"
placeholder="仓库"
class="filter-item"
style="width: 210px"
>
<el-option
v-for="item in storlist"
:key="item.stor_id"
:label="item.stor_name"
:value="item.stor_id"
/>
</el-select>
</el-form-item>
<el-form-item label="用料清单">
<el-input
v-model="query.code"
clearable
size="mini"
placeholder="用料清单模糊查询"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="物料编码">
<el-input
v-model="query.material_code"
clearable
size="mini"
placeholder="物料"
style="width: 200px;"
class="filter-item"
@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="source_form_date" label="日期" :min-width="flexWidth('source_form_date',crud.data,'日期')" />
<el-table-column prop="source_bill_code" label="用料清单号" :min-width="flexWidth('source_bill_code',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="qty" label="订单数量" :formatter="crud.formatNum3" :min-width="flexWidth('qty',crud.data,'订单数量')" />
<el-table-column prop="qty_unit_name" label="单位" :min-width="flexWidth('qty_unit_name',crud.data,'单位')" />
<el-table-column prop="stor_name" label="仓库" :min-width="flexWidth('stor_name',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, { header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import pagination from '@crud/Pagination'
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
export default {
name: 'AddOrderDtl',
components: { rrOperation, pagination },
cruds() {
return CRUD({
title: '库存物料',
optShow: {
add: false,
edit: false,
del: false,
reset: true,
download: false
},
url: 'api/checkoutbill/getOrderDtl',
idField: 'storagevehicleext_id',
sort: 'storagevehicleext_id,desc'
})
},
mixins: [presenter(), header()],
dicts: [],
props: {
dialogShow: {
type: Boolean,
default: false
},
storId: {
type: String
}
},
data() {
return {
storlist: [],
dialogVisible: false,
sect: {},
rows: []
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
}
},
methods: {
open() {
this.crud.resetQuery(false)
crudBsrealstorattr.getStor().then(res => {
this.storlist = res
})
this.query.stor_id = this.storId
this.crud.toQuery()
},
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>