2022-07-11 00:44:25 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
|
<!--工具栏-->
|
|
|
|
|
|
<div class="head-container">
|
|
|
|
|
|
<div v-if="crud.props.searchToggle">
|
|
|
|
|
|
<!-- 搜索 -->
|
|
|
|
|
|
<el-form
|
|
|
|
|
|
:inline="true"
|
|
|
|
|
|
class="demo-form-inline"
|
|
|
|
|
|
label-position="right"
|
|
|
|
|
|
label-width="90px"
|
|
|
|
|
|
label-suffix=":"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-form-item label="所属仓库">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="query.stor_id"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
placeholder="全部"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
@change="crud.toQuery"
|
|
|
|
|
|
>
|
|
|
|
|
|
<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-select
|
|
|
|
|
|
v-model="query.bill_type"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
filterable
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
placeholder="业务类型"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
@change="crud.toQuery"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in billtypelist"
|
|
|
|
|
|
:key="item.code"
|
|
|
|
|
|
:label="item.name"
|
|
|
|
|
|
:value="item.code"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="单据日期">
|
|
|
|
|
|
<el-date-picker
|
|
|
|
|
|
v-model="query.createTime"
|
|
|
|
|
|
type="daterange"
|
|
|
|
|
|
@input="onInput()"
|
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
|
:default-time="['00:00:00', '23:59:59']"
|
|
|
|
|
|
@change="crud.toQuery"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="物料">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="query.material_code"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
placeholder="物料编码或名称模糊查询"
|
|
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="批次">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="query.pcsn"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
placeholder="批次模糊查询"
|
|
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
2022-07-12 17:06:59 +08:00
|
|
|
|
<el-form-item label="工令">
|
|
|
|
|
|
<el-input v-model="query.source_bill_code" size="mini" placeholder="工令号" disabled class="input-with-select">
|
|
|
|
|
|
<el-button slot="append" icon="el-icon-search" @click="queryMater" />
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</el-form-item>
|
2022-07-11 00:44:25 +08:00
|
|
|
|
<el-form-item label="人员">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="query.username"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
placeholder="人员"
|
|
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<rrOperation />
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
|
|
|
|
|
<crudOperation :permission="permission">
|
|
|
|
|
|
</crudOperation>
|
|
|
|
|
|
<!--表格渲染-->
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
ref="table"
|
|
|
|
|
|
v-loading="crud.loading"
|
|
|
|
|
|
size="mini"
|
2022-08-23 16:18:17 +08:00
|
|
|
|
height="420"
|
2022-07-11 00:44:25 +08:00
|
|
|
|
:data="crud.data"
|
|
|
|
|
|
style="width: 100%;"
|
|
|
|
|
|
:highlight-current-row="true"
|
|
|
|
|
|
@selection-change="crud.selectionChangeHandler"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-table-column type="index" label="序号" width="50" align="center" />
|
|
|
|
|
|
<el-table-column prop="material_code" label="物料编码" width="150" align="center" />
|
|
|
|
|
|
<el-table-column prop="material_name" label="物料名称" width="150" align="center" />
|
|
|
|
|
|
<el-table-column min-width="90" prop="pcsn" label="批次号" align="center" />
|
|
|
|
|
|
<el-table-column prop="sum_plan_qty" label="计划重量(KG)" :formatter="crud.formatNum3" width="150" align="center" />
|
|
|
|
|
|
<el-table-column prop="sum_real_qty" label="实际重量(KG)" :formatter="crud.formatNum3" width="150" align="center" />
|
|
|
|
|
|
<el-table-column prop="quality_scode" label="品质类型" align="center" width="110px" :formatter="quality_scodeFormat" />
|
|
|
|
|
|
<el-table-column prop="ivt_level" label="库存等级" align="center" width="100px" :formatter="ivt_levelFormat" />
|
|
|
|
|
|
<el-table-column prop="is_active" label="是否可用" align="center" width="110px" :formatter="is_activeFormat" />
|
|
|
|
|
|
<el-table-column min-width="120" prop="qty_unit_name" label="单位" align="center" />
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
<!--分页组件-->
|
|
|
|
|
|
<pagination />
|
|
|
|
|
|
</div>
|
2022-07-12 17:06:59 +08:00
|
|
|
|
<StructIvt :dialog-show.sync="structshow" @StructIvtClosed="queryTableDtl" />
|
2022-07-11 00:44:25 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import checkoutbill from '@/api/wms/st/core/outbill/checkoutbill'
|
|
|
|
|
|
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'
|
|
|
|
|
|
import crudStorattr from '@/api/wms/basedata/st/storattr'
|
|
|
|
|
|
import Date from '@/utils/datetime'
|
2022-07-12 17:06:59 +08:00
|
|
|
|
import StructIvt from '@/views/wms/statistics/outStorQuery/StructIvt'
|
2022-07-11 00:44:25 +08:00
|
|
|
|
import crudRawAssist from '@/api/wms/st/core/inbill/rawassist'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: 'outStorQuery',
|
2022-07-12 17:06:59 +08:00
|
|
|
|
components: { StructIvt, crudOperation, rrOperation, pagination },
|
2022-07-11 00:44:25 +08:00
|
|
|
|
cruds() {
|
|
|
|
|
|
return CRUD({ title: '生产配粉领料', idField: 'iostorinv_id', url: 'api/checkoutbill/queryDtl', crudMethod: { ...checkoutbill },
|
|
|
|
|
|
optShow: {
|
|
|
|
|
|
add: false,
|
|
|
|
|
|
edit: false,
|
|
|
|
|
|
del: false,
|
|
|
|
|
|
reset: true,
|
|
|
|
|
|
download: false
|
|
|
|
|
|
}})
|
|
|
|
|
|
},
|
|
|
|
|
|
mixins: [presenter(), header(), crud()],
|
|
|
|
|
|
// 数据字典
|
|
|
|
|
|
dicts: ['ST_QUALITY_SCODE', 'ST_IVT_LEVEL', 'is_used', 'is_again_put', 'is_usable'],
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
height: document.documentElement.clientHeight - 180 + 'px;',
|
|
|
|
|
|
permission: {
|
|
|
|
|
|
},
|
2022-07-12 17:06:59 +08:00
|
|
|
|
structshow: false,
|
2022-07-11 00:44:25 +08:00
|
|
|
|
currentRow: null,
|
|
|
|
|
|
storlist: [],
|
|
|
|
|
|
billtypelist: []
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
mounted: function() {
|
|
|
|
|
|
const that = this
|
|
|
|
|
|
window.onresize = function temp() {
|
|
|
|
|
|
that.height = document.documentElement.clientHeight - 180 + 'px;'
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
|
|
|
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
|
|
|
|
|
|
this.storlist = res.content
|
|
|
|
|
|
})
|
|
|
|
|
|
crudRawAssist.getType({ 'io_code': '0103', 'io_flag': '01' }).then(res => {
|
|
|
|
|
|
this.billtypelist = res
|
|
|
|
|
|
})
|
|
|
|
|
|
this.crud.query.createTime = [new Date(), new Date()]
|
|
|
|
|
|
this.crud.toQuery()
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
onInput() {
|
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
|
},
|
2022-07-12 17:06:59 +08:00
|
|
|
|
async queryMater() {
|
|
|
|
|
|
this.structshow = true
|
2022-07-11 00:44:25 +08:00
|
|
|
|
},
|
|
|
|
|
|
quality_scodeFormat(row, column) {
|
|
|
|
|
|
return this.dict.label.ST_QUALITY_SCODE[row.quality_scode]
|
|
|
|
|
|
},
|
|
|
|
|
|
ivt_levelFormat(row, column) {
|
|
|
|
|
|
return this.dict.label.ST_IVT_LEVEL[row.ivt_level]
|
|
|
|
|
|
},
|
|
|
|
|
|
is_activeFormat(row, column) {
|
|
|
|
|
|
return this.dict.label.is_usable[row.is_active]
|
|
|
|
|
|
},
|
2022-07-12 17:06:59 +08:00
|
|
|
|
queryTableDtl(rows) {
|
|
|
|
|
|
let devices = ''
|
|
|
|
|
|
for (let i = 0; i < rows.length; i++) {
|
|
|
|
|
|
if ( i === 0 ) {
|
|
|
|
|
|
devices = rows[i].workorder_code
|
|
|
|
|
|
}else{
|
|
|
|
|
|
devices = devices + ',' + rows[i].workorder_code
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if(rows.length > 0){
|
|
|
|
|
|
this.crud.query.source_bill_code = devices
|
|
|
|
|
|
this.crud.toQuery()
|
2022-07-11 00:44:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
|
|
|
::v-deep .el-dialog__body {
|
|
|
|
|
|
padding-top: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|