rev:质检模块和原材料入库优化
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_IN_TYPE"
|
||||
v-for="item in dict.ST_INV_RAW_IN_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -281,7 +281,7 @@ export default {
|
||||
name: 'AddDialog',
|
||||
components: { MaterDtl, BillDtl },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_RAW_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_IN_TYPE"
|
||||
v-for="item in dict.ST_INV_RAW_IN_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -237,7 +237,7 @@ export default {
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_IN_TYPE', 'product_area', 'ST_INV_CREATE'],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_RAW_IN_TYPE', 'product_area', 'ST_INV_CREATE'],
|
||||
data() {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
@@ -310,7 +310,7 @@ export default {
|
||||
}
|
||||
},
|
||||
bill_typeFormat(row, column) {
|
||||
return this.dict.label.ST_INV_IN_TYPE[row.bill_type]
|
||||
return this.dict.label.ST_INV_RAW_IN_TYPE[row.bill_type]
|
||||
},
|
||||
toView(row) {
|
||||
this.mstrow = row
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
<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="80px"
|
||||
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-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
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.struct_search"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="仓位编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material_search"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="物料编码、名称、规格"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
size="mini"
|
||||
:data="crud.data"
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip prop="stor_name" label="仓库名称" />
|
||||
<el-table-column show-overflow-tooltip prop="sect_name" label="库区名称" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位编码" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_name" label="仓位名称" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可用数量" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="frozen_qty" label="冻结数量" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="ivt_qty" label="库存数量" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="warehousing_qty" label="待入数量" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" />
|
||||
<el-table-column show-overflow-tooltip prop="instorage_time" label="入库时间" min-width="150" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudStorattr, { getStor } from '@/views/wms/storage_manage/basedata/basedata'
|
||||
import ProductIvt from '@/views/wms/storage_manage/product/productIvt/productivt'
|
||||
|
||||
export default {
|
||||
name: 'RawProductIvt',
|
||||
components: { crudOperation, rrOperation, udOperation, pagination, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '原材料库存',
|
||||
optShow: { add: false, reset: true },
|
||||
idField: 'stockrecord_id',
|
||||
url: '/api/stIvtStructivtYl/getAllRawIvt',
|
||||
crudMethod: { ...ProductIvt }
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
data() {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
permission: {},
|
||||
storlist: [],
|
||||
storId: null
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 180 + 'px;'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudStorattr.getStor({ 'stor_type': '3' }).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,31 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/stIvtStructivtCp',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/stIvtStructivtCp/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/stIvtStructivtCp/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
del
|
||||
}
|
||||
@@ -59,10 +59,11 @@
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="业务类型"
|
||||
@change="billTypeChange"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_OUT_TYPE"
|
||||
v-for="item in dict.ST_INV_RAW_OUT_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -158,6 +159,7 @@
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
:disabled="bill_btn"
|
||||
size="mini"
|
||||
@click="insertBill()"
|
||||
>
|
||||
@@ -168,6 +170,7 @@
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
:disabled="mater_btn"
|
||||
size="mini"
|
||||
@click="insertEvent()"
|
||||
>
|
||||
@@ -265,14 +268,14 @@ const defaultForm = {
|
||||
remark: '',
|
||||
biz_date: new Date(),
|
||||
create_mode: '',
|
||||
tableData: []
|
||||
tableData: [],
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { StructIvt, MaterDtl, BillDtl },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_OUT_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_RAW_OUT_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -287,6 +290,8 @@ export default {
|
||||
dialogVisible: false,
|
||||
materShow: false,
|
||||
billShow: false,
|
||||
bill_btn:true,
|
||||
mater_btn:true,
|
||||
struct_id: '',
|
||||
sect_id: '',
|
||||
opendtlParam: null,
|
||||
@@ -359,6 +364,18 @@ export default {
|
||||
row.struct_id = this.struct_id
|
||||
}
|
||||
},
|
||||
billTypeChange(value){
|
||||
if (value === '21'){
|
||||
this.bill_btn = false
|
||||
this.mater_btn = true
|
||||
}else if (value === '23'){
|
||||
this.bill_btn = true
|
||||
this.mater_btn = false
|
||||
}else {
|
||||
this.bill_btn = true
|
||||
this.mater_btn = true
|
||||
}
|
||||
},
|
||||
storChange(value) {
|
||||
crudStructattr.getSectCascader({ 'stor_id': value }).then(res => {
|
||||
this.sects = res.content
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_OUT_TYPE"
|
||||
v-for="item in dict.ST_INV_RAW_OUT_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -237,7 +237,7 @@ export default {
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_OUT_TYPE', 'product_area', 'ST_INV_CREATE'],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_RAW_OUT_TYPE', 'product_area', 'ST_INV_CREATE'],
|
||||
data() {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
@@ -305,7 +305,7 @@ export default {
|
||||
}
|
||||
},
|
||||
bill_typeFormat(row, column) {
|
||||
return this.dict.label.ST_INV_OUT_TYPE[row.bill_type]
|
||||
return this.dict.label.ST_INV_RAW_OUT_TYPE[row.bill_type]
|
||||
},
|
||||
toView(row) {
|
||||
this.mstrow = row
|
||||
|
||||
Reference in New Issue
Block a user