Merge branch 'master' of http://121.40.234.130:8899/root/wuHanXinRui
This commit is contained in:
@@ -113,9 +113,9 @@
|
||||
<el-table-column prop="bill_status" label="单据状态" :formatter="formatStatus" />
|
||||
<el-table-column v-if="false" prop="biz_date" label="业务日期" />
|
||||
<el-table-column v-if="false" prop="material_id" label="物料标识" />
|
||||
<el-table-column prop="material_code" label="物料编码" show-overflow-tooltip />
|
||||
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip />
|
||||
<el-table-column prop="pcsn" label="批号" />
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="pcsn" label="批号" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="is_effective" label="是否有效" :formatter="format_is_active" />
|
||||
<el-table-column prop="result" label="结果" :formatter="format_result" />
|
||||
<el-table-column prop="remark" show-overflow-tooltip label="备注" />
|
||||
|
||||
277
mes/qd/src/views/wms/sb/run/devicescrap/index.vue
Normal file
277
mes/qd/src/views/wms/sb/run/devicescrap/index.vue
Normal file
@@ -0,0 +1,277 @@
|
||||
<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="110px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="启用日期">
|
||||
<date-range-picker v-model="query.createTime" class="date-item" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类别">
|
||||
<treeselect
|
||||
v-model="query.material_type_id"
|
||||
:load-options="loadClass"
|
||||
:options="classes"
|
||||
style="width: 200px;"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
</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>
|
||||
<el-form-item label="生产厂家">
|
||||
<el-input
|
||||
v-model="query.manufacturer"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入生产厂家"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商">
|
||||
<el-input
|
||||
v-model="query.supplier_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入供应商编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备属性">
|
||||
<el-select
|
||||
v-model="query.device_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.DEVICE_ATTRIBUTE_SCODE"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备状态">
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.EM_BI_DEVICESTATUS"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产用途">
|
||||
<el-select
|
||||
v-model="query.is_produceuse"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.EM_BI_DEVICEUSE"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="scrap"
|
||||
>
|
||||
报废
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="device_code" label="设备代码" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="device_name" label="设备名称" width="120px" show-overflow-tooltip/>
|
||||
<el-table-column prop="extend_code" label="外部编码" width="120px" show-overflow-tooltip/>
|
||||
<el-table-column prop="device_model" label="设备型号" width="120px" show-overflow-tooltip/>
|
||||
<el-table-column prop="device_spec" label="设备规格" />
|
||||
<el-table-column prop="class_name" label="设备类类别" />
|
||||
<el-table-column prop="is_produceuse" label="生产用途" :formatter="formatProduceName" />
|
||||
<el-table-column prop="status" label="设备状态" :formatter="formatStatusName" />
|
||||
<el-table-column prop="beginuse_date" label="启用日期" width="120px" show-overflow-tooltip/>
|
||||
<el-table-column prop="use_deptid_name" label="使用部门" />
|
||||
<el-table-column prop="use_groupid_name" label="使用班组" show-overflow-tooltip />
|
||||
<el-table-column prop="supplier_name" label="供应商" show-overflow-tooltip />
|
||||
<el-table-column prop="manufacturer" label="制造商" show-overflow-tooltip />
|
||||
<el-table-column prop="leavefactory_date" label="出厂日期" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="leavefactory_number" label="出厂编号" show-overflow-tooltip />
|
||||
<el-table-column prop="drawing_number" label="图号" show-overflow-tooltip />
|
||||
<el-table-column prop="device_type" label="设备属性" :formatter="formatTypeName" />
|
||||
<el-table-column prop="workprocedure_name" label="工序" />
|
||||
<el-table-column prop="assets_code" label="资产编码" show-overflow-tooltip />
|
||||
<el-table-column prop="assets_name" label="资产名称" show-overflow-tooltip />
|
||||
<el-table-column prop="create_name" label="生成人" />
|
||||
<el-table-column prop="create_time" label="生成时间" width="150px" show-overflow-tooltip/>
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" width="150px" show-overflow-tooltip/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudDevicescrap from '@/api/wms/sb/devicescrap'
|
||||
import CRUD, { presenter, header, form, crud } 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 crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
import DateRangePicker from '@/components/DateRangePicker'
|
||||
|
||||
const defaultForm = { status: null }
|
||||
export default {
|
||||
name: 'Devicescrap',
|
||||
dicts: ['EM_BI_DEVICEUSE', 'EM_BI_DEVICESTATUS', 'DEVICE_ATTRIBUTE_SCODE'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect, DateRangePicker },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '设备报废',
|
||||
url: 'api/devicescrap',
|
||||
idField: 'devicerecord_id',
|
||||
sort: 'devicerecord_id,desc',
|
||||
crudMethod: { ...crudDevicescrap },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
classes: [],
|
||||
class_idStr: null,
|
||||
materOpt_code: '23',
|
||||
deviceDialog: false,
|
||||
permission: {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const param = {
|
||||
'materOpt_code': this.materOpt_code
|
||||
}
|
||||
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||
this.class_idStr = res.class_idStr
|
||||
this.crud.query.class_idStr = this.class_idStr
|
||||
this.crud.toQuery()
|
||||
this.queryClassId()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
loadClass({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
setTimeout(() => {
|
||||
callback()
|
||||
}, 100)
|
||||
})
|
||||
}
|
||||
},
|
||||
queryClassId() {
|
||||
const param = {
|
||||
'class_idStr': this.class_idStr
|
||||
}
|
||||
crudClassstandard.queryClassById(param).then(res => {
|
||||
this.classes = res.content.map(obj => {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
})
|
||||
},
|
||||
formatProduceName(row, cloum) {
|
||||
return this.dict.label.EM_BI_DEVICEUSE[row.is_produceuse]
|
||||
},
|
||||
formatStatusName(row, cloum) {
|
||||
return this.dict.label.EM_BI_DEVICESTATUS[row.status]
|
||||
},
|
||||
formatTypeName(row, cloum) {
|
||||
return this.dict.label.DEVICE_ATTRIBUTE_SCODE[row.device_type]
|
||||
},
|
||||
scrap() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = _selectData[0]
|
||||
if (data.is_active !== '1') {
|
||||
return this.crud.notify('设备未启用或不存在', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
if (data.device_is_delete === '1') {
|
||||
return this.crud.notify('设备不存在或被删除', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
if (data.status === '10' || data.status === '11') {
|
||||
crudDevicescrap.scrap(data).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
} else {
|
||||
return this.crud.notify('设备状态不为正常或者闲置', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
154
mes/qd/src/views/wms/sb/stat/deviceivtquery/index.vue
Normal file
154
mes/qd/src/views/wms/sb/stat/deviceivtquery/index.vue
Normal file
@@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
size="mini"
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="所属库区">
|
||||
<el-cascader
|
||||
placeholder="所属库区"
|
||||
:options="sects"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
class="filter-item"
|
||||
@change="sectQueryChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备件物料">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
placeholder="编码、名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="按备件" label-width="120px">
|
||||
<el-switch v-model="query.is_all" active-value="1" inactive-value="0" @change="crud.toQuery()" />
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="downdtl"
|
||||
>
|
||||
导出Excel
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="sect_code" label="库区编码" />
|
||||
<el-table-column prop="sect_name" label="库区名称" />
|
||||
<el-table-column prop="material_code" label="物料编码" />
|
||||
<el-table-column prop="material_name" label="名称" />
|
||||
<el-table-column prop="material_model" label="型号" />
|
||||
<el-table-column prop="material_spec" label="技术规格" />
|
||||
<el-table-column prop="pcsn" label="批次" />
|
||||
<el-table-column prop="ivt_qty" label="库存数" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" />
|
||||
<el-table-column prop="instorage_time" label="入库时间" width="150px" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudDevicesparepartivt from '@/api/wms/sb/devicesparepartivt'
|
||||
import CRUD, { presenter, header, form, crud } 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 crudSectattr from '@/api/wms/basedata/st/sectattr'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
const defaultForm = { stockrecord_id: null, sparepart_only_id: null, material_id: null, pcsn: null, stor_id: null, stor_name: null, struct_id: null, struct_code: null, struct_name: null, ivt_qty: null, qty_unit_id: null, qty_unit_name: null, instorage_time: null }
|
||||
export default {
|
||||
name: 'Deviceivtquery',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '备件库存查询',
|
||||
url: 'api/devicesparepartivt',
|
||||
idField: 'stockrecord_id',
|
||||
sort: 'stockrecord_id,desc',
|
||||
crudMethod: { ...crudDevicesparepartivt },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sects: [],
|
||||
permission: {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudSectattr.getSect({ 'is_attachment': '1' }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
if (val.length === 1) {
|
||||
this.query.stor_id = val[0]
|
||||
this.query.sect_id = ''
|
||||
}
|
||||
if (val.length === 0) {
|
||||
this.query.sect_id = ''
|
||||
this.query.stor_id = ''
|
||||
}
|
||||
if (val.length === 2) {
|
||||
this.query.stor_id = val[0]
|
||||
this.query.sect_id = val[1]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
downdtl() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
download('/api/devicesparepartivt/download', this.crud.query).then(result => {
|
||||
downloadFile(result, '备件库存', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
}).catch(() => {
|
||||
crud.downloadLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -236,9 +236,9 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudSectattr.getSect().then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
// crudSectattr.getSect().then(res => {
|
||||
// this.sects = res.content
|
||||
// })
|
||||
crudSectattr.getSect({ 'is_materialstore': '1' }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user