优化
This commit is contained in:
@@ -43,7 +43,7 @@ public class UnitServiceImpl implements UnitService {
|
||||
if (!StrUtil.isEmpty(search)) {
|
||||
where = " AND (unit_code like '%" + search + "%' OR unit_name like '%" + search + "%' ) ";
|
||||
}
|
||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "is_delete='0' " + where, "update_time desc");
|
||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "is_delete='0' " + where, "unit_code");
|
||||
final JSONObject json = rb.pageResult();
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.nl.wms.statistics.service.impl;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
@@ -33,8 +34,14 @@ public class PowderOrderQueryServiceImpl implements PowderOrderQueryService {
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "1");
|
||||
map.put("begin_time", MapUtil.getStr(whereJson, "begin_time"));
|
||||
map.put("end_time", MapUtil.getStr(whereJson, "end_time"));
|
||||
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||
if (StrUtil.isNotEmpty(begin_time)) {
|
||||
map.put("begin_time", begin_time.substring(0,10)+" 00:00:00");
|
||||
}
|
||||
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||
if (StrUtil.isNotEmpty(end_time)) {
|
||||
map.put("end_time", end_time.substring(0,10)+" 23:59:59");
|
||||
}
|
||||
map.put("status", MapUtil.getStr(whereJson, "status"));
|
||||
if (ObjectUtil.isNotEmpty(pcsn)) map.put("pcsn", "%"+pcsn+"%");
|
||||
if (ObjectUtil.isNotEmpty(material_code)) map.put("material_code", "%"+material_code+"%");
|
||||
|
||||
@@ -44,7 +44,7 @@ import clipboard from '@/utils/clipboard'
|
||||
import svgIcons from './svg-icons'
|
||||
import elementIcons from './element-icons'
|
||||
export default {
|
||||
name: 'Icons',
|
||||
name: 'icons',
|
||||
data() {
|
||||
return {
|
||||
svgIcons,
|
||||
|
||||
@@ -182,7 +182,7 @@ import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
|
||||
const defaultForm = { material_type_id: null, maint_item_id: null, maint_item_code: null, maint_item_name: null, item_level: null, contents: null, requirement: null, acceptancecriteria: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, remark: null }
|
||||
export default {
|
||||
name: 'Devicemaintenanceitems',
|
||||
name: 'Devicemaintain',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
|
||||
@@ -133,14 +133,14 @@
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column prop="supp_code" label="供应商编码" />
|
||||
<el-table-column prop="supp_name" label="供应商名称 " />
|
||||
<el-table-column prop="corp_address" label="公司地址" />
|
||||
<el-table-column prop="corp_tele_no" label="公司电话" />
|
||||
<el-table-column prop="jurid_name" label="法人代表" />
|
||||
<el-table-column prop="update_optname" label="修改者" />
|
||||
<el-table-column prop="update_time" label="修改时间" width="150" />
|
||||
<el-table-column label="启用" align="center" prop="is_used">
|
||||
<el-table-column prop="supp_code" label="供应商编码" min-width="100" />
|
||||
<el-table-column prop="supp_name" label="供应商名称 " min-width="150" />
|
||||
<el-table-column prop="corp_address" label="公司地址" min-width="100" />
|
||||
<el-table-column prop="corp_tele_no" label="公司电话" min-width="100" />
|
||||
<el-table-column prop="jurid_name" label="法人代表" min-width="100" />
|
||||
<el-table-column prop="update_optname" label="修改者" min-width="100" />
|
||||
<el-table-column prop="update_time" label="修改时间" min-width="150" />
|
||||
<el-table-column label="启用" align="center" prop="is_used" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.is_used"
|
||||
@@ -155,7 +155,7 @@
|
||||
<el-table-column
|
||||
v-permission="['admin','Supplierbase:edit','Supplierbase:del']"
|
||||
label="操作"
|
||||
width="150px"
|
||||
min-width="150px"
|
||||
lign="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="产品工艺参数设置"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
>
|
||||
<el-form :inline="true" :model="formData" class="demo-form-inline">
|
||||
<el-form-item label="产品编码">
|
||||
<el-input v-model.trim="formData.material_code" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品名称">
|
||||
<el-input v-model.trim="formData.material_name" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="工序编码">
|
||||
<el-input v-model.trim="formData.workprocedure_code" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="工序名称">
|
||||
<el-input v-model.trim="formData.workprocedure_name" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">保存</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-divider />
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
:data="tableData"
|
||||
stripe
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
prop="para_code"
|
||||
label="项点编码"
|
||||
width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="para_name"
|
||||
label="项点名称"
|
||||
width="180"
|
||||
/>
|
||||
<el-table-column prop="value" label="参数值">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="tableData[scope.$index].value"
|
||||
:controls="false"
|
||||
controls-position="right"
|
||||
precision="2"
|
||||
style="width: 100px"
|
||||
:min="0"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
</span>-->
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { crud } from '@crud/crud'
|
||||
import crudProductProcessParam from '@/api/wms/basedata/pdm/productProcessParam'
|
||||
|
||||
export default {
|
||||
name: 'SetDialog',
|
||||
mixins: [crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
cols: [],
|
||||
tableData: [],
|
||||
formData: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
if (newValue) {
|
||||
const param = {
|
||||
workprocedure_code: this.openParam.workprocedure_code,
|
||||
material_id: this.openParam.optRow
|
||||
}
|
||||
crudProductProcessParam.getSetData(param).then(res => {
|
||||
this.formData = res.formData
|
||||
this.tableData = res.tableData
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
const param = {
|
||||
formData: this.formData,
|
||||
tableData: this.tableData
|
||||
}
|
||||
crudProductProcessParam.saveData(param).then(res => {
|
||||
this.notify('操作成功', 'success')
|
||||
this.close()
|
||||
})
|
||||
},
|
||||
notify(title, type) {
|
||||
this.$notify({
|
||||
title: title,
|
||||
type: type,
|
||||
duration: 2500
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
178
mes/qd/src/views/wms/basedata/pdm/productProcessParam1/index.vue
Normal file
178
mes/qd/src/views/wms/basedata/pdm/productProcessParam1/index.vue
Normal file
@@ -0,0 +1,178 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
style="width: 300px"
|
||||
size="mini"
|
||||
placeholder="输入产品编码或名称"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
/>
|
||||
<rrOperation />
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="130" fixed />
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="100" fixed />
|
||||
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-table-column v-if="col.isVisiable" :prop="col.prop" :label="col.label" width="130px" />
|
||||
</template>
|
||||
<el-table-column v-permission="[]" label="操作" fixed="right" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div class="btn1">
|
||||
<udOperation
|
||||
:is-visiable-del="false"
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</div>
|
||||
<div class="btn2">
|
||||
<el-button slot="left" type="text" icon="el-icon-delete" size="mini" @click="delid(scope.row)" >删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
|
||||
<SetDialog :dialog-show.sync="setShow" :open-param="openParam" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudWorkProcedure from '@/api/wms/basedata/pdm/workProcedure'
|
||||
import crudProductProcessParam from '@/api/wms/basedata/pdm/productProcessParam'
|
||||
import CRUD, { crud, form, 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 SetDialog from '@/views/wms/basedata/pdm/productProcessParam/SetDialog'
|
||||
import crudBagrecord from '@/api/wms/basedata/master/bagrecord'
|
||||
|
||||
export default {
|
||||
name: 'ProductProcessParam1',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, SetDialog },
|
||||
mixins: [presenter(), header(), form(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '工序',
|
||||
url: 'api/productProcessParam',
|
||||
idField: 'workprocedure_id',
|
||||
sort: 'workprocedure_id,desc',
|
||||
crudMethod: { ...crudWorkProcedure },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
workprocedure_code: null,
|
||||
setShow: false,
|
||||
openParam: {},
|
||||
// 行转列:https://www.jb51.net/article/196058.htm
|
||||
cols: [],
|
||||
rules: {
|
||||
workProcedure_id: [
|
||||
{ required: true, message: '工序标识不能为空', trigger: 'blur' }
|
||||
],
|
||||
workprocedure_code: [
|
||||
{ required: true, message: '工序编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
workprocedure_name: [
|
||||
{ required: true, message: '工序名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_keyworkprocedure: [
|
||||
{ required: true, message: '是否关键工序不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_finishback: [
|
||||
{ required: true, message: '是否完工汇报不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_used: [
|
||||
{ required: true, message: '是否启用不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
setShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.setShow = newValue
|
||||
if (!newValue) {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 根据菜单配置路径获取工序编码(qm/GX002)
|
||||
// 获取最后5位
|
||||
var str = this.$route.path
|
||||
var workprocedure_code = str.substring(str.length - 5)
|
||||
this.workprocedure_code = workprocedure_code
|
||||
crudProductProcessParam.getTableTitle(workprocedure_code).then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.beforeToEdit](v1, v2) {
|
||||
this.openParam = {
|
||||
optRow: v2.material_id,
|
||||
workprocedure_code: this.workprocedure_code
|
||||
}
|
||||
this.setShow = true
|
||||
return false
|
||||
},
|
||||
delid(row) {
|
||||
const msg = '是否确认删除?'
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
row.workprocedure_code = this.workprocedure_code
|
||||
crudProductProcessParam.del(row).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.btn1{
|
||||
float: left;
|
||||
margin-left: 40px;
|
||||
}
|
||||
.btn2{
|
||||
float: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -81,7 +81,7 @@ import AddDialog from '@/views/wms/basedata/st/materialSet/AddDialog'
|
||||
|
||||
const defaultForm = { sect_id: null, cascader: null, material_type_id: null, set_id: null, set_name: null, set_time: null }
|
||||
export default {
|
||||
name: 'Structrelamaterial',
|
||||
name: 'MaterialSet',
|
||||
components: { AddDialog, pagination, crudOperation, rrOperation, crudClass, Treeselect },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
|
||||
@@ -102,7 +102,7 @@ const defaultForm = {
|
||||
set_time: null
|
||||
}
|
||||
export default {
|
||||
name: 'Materialsafeivt',
|
||||
name: 'Safeivt',
|
||||
components: { pagination, crudOperation, rrOperation, Treeselect },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
|
||||
@@ -72,7 +72,7 @@ import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
export default {
|
||||
name: 'Performancemst',
|
||||
name: 'Performance',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, AddDialog },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
|
||||
@@ -83,7 +83,7 @@ import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
export default {
|
||||
name: 'Performancemst',
|
||||
name: 'Workloadreview',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, AddDialog },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
|
||||
@@ -71,7 +71,7 @@ import {download} from "@/api/data";
|
||||
import {downloadFile} from "@/utils";
|
||||
|
||||
export default {
|
||||
name: 'Performancemst',
|
||||
name: 'Workloadstat',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
|
||||
@@ -151,7 +151,7 @@ import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import crudMaterialbase from "@/api/wms/basedata/master/materialbase";
|
||||
|
||||
export default {
|
||||
name: 'PcsIfPurchaseorderproc',
|
||||
name: 'Orderproc',
|
||||
components: { importOrder, pagination, crudOperation, rrOperation, udOperation, DateRangePicker, Treeselect },
|
||||
mixins: [presenter(), header(),crud()],
|
||||
cruds() {
|
||||
|
||||
@@ -263,7 +263,7 @@ const defaultForm = {
|
||||
update_time: null
|
||||
}
|
||||
export default {
|
||||
name: 'Productplanproc',
|
||||
name: 'Productplansum',
|
||||
dicts: ['product_mode'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, SumShowDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
|
||||
@@ -120,7 +120,7 @@ import AddDialog from '@/views/wms/pdm/base/CapacityTemplate/AddDialog'
|
||||
import ViewDialog2 from '@/views/wms/pdm/base/CapacityTemplate/ViewDialog2'
|
||||
|
||||
export default {
|
||||
name: 'capacitytemplate',
|
||||
name: 'Capacitytemplate',
|
||||
components: { AddDialog, ViewDialog2, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '工令', idField: 'captemplate_id', url: 'api/capacitytemplate', crudMethod: { ...capacitytemplate },
|
||||
|
||||
@@ -86,7 +86,7 @@ import pagination from '@crud/Pagination'
|
||||
|
||||
|
||||
export default {
|
||||
name: 'StorageVehicleCleaning',
|
||||
name: 'SeriesProcessRoute',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
|
||||
@@ -88,7 +88,7 @@ import AddDialog from '@/views/wms/pdm/base/wcchange/AddDialog'
|
||||
import ViewDialog from '@/views/wms/pdm/produce/workorder/ViewDialog'
|
||||
|
||||
export default {
|
||||
name: 'wcchange',
|
||||
name: 'Wcchange',
|
||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '碳化钨总碳修正维护', idField: 'change_id', url: 'api/wcchange', crudMethod: { ...wcchange },
|
||||
|
||||
@@ -222,7 +222,6 @@ import CRUD, { presenter, header, 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 { getToken } from '@/utils/auth'
|
||||
import { mapGetters } from 'vuex'
|
||||
import workorder from '@/api/wms/pdm/workorder'
|
||||
@@ -232,9 +231,9 @@ import { downloadFile } from '@/utils'
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
export default {
|
||||
name: 'dailyplan',
|
||||
name: 'Dailyplan',
|
||||
dicts: ['product_mode', 'workorder_type2', 'planstatus'],
|
||||
components: { crudOperation, rrOperation, udOperation, AddDialog, pagination, StructIvt4 },
|
||||
components: { crudOperation, rrOperation, udOperation, AddDialog, StructIvt4 },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
|
||||
@@ -203,7 +203,7 @@ import crudseriesProcessRoute from '@/api/wms/pdm/seriesProcessRoute'
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
export default {
|
||||
name: 'mouthtask',
|
||||
name: 'Mouthtask',
|
||||
dicts: ['product_mode', 'is_proc2'],
|
||||
components: { pagination, crudOperation, rrOperation, AddDialog },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
|
||||
@@ -229,7 +229,7 @@ import workorder from '@/api/wms/pdm/workorder'
|
||||
import producetask from '@/api/wms/pdm/producetask'
|
||||
|
||||
export default {
|
||||
name: 'producetask',
|
||||
name: 'Producetask',
|
||||
dicts: ['product_mode', 'is_proc'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
|
||||
@@ -196,7 +196,7 @@ import {mapGetters} from "vuex";
|
||||
import PicDialog from '@/views/wms/pf/formula/PicDialog'
|
||||
|
||||
export default {
|
||||
name: 'formula2',
|
||||
name: 'Formula2',
|
||||
components: { ViewDialog, DivDialog, crudOperation, rrOperation, udOperation, pagination, PicDialog },
|
||||
cruds() {
|
||||
return CRUD({ title: '工令', idField: 'formula_id', url: 'api/formula',
|
||||
|
||||
@@ -172,7 +172,6 @@ import workorder from '@/api/wms/pdm/workorder'
|
||||
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 DivDialog from '@/views/wms/pf/initformula/DivDialog'
|
||||
import ViewDialog from '@/views/wms/pdm/produce/workorder/ViewDialog'
|
||||
@@ -181,8 +180,8 @@ import initformula, {getCanOpen} from "@/api/wms/pf/initformula";
|
||||
import crudseriesProcessRoute from "@/api/wms/pdm/seriesProcessRoute";
|
||||
|
||||
export default {
|
||||
name: 'initformula',
|
||||
components: { ViewDialog, DivDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||
name: 'Initformula',
|
||||
components: { ViewDialog, DivDialog, crudOperation, rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '工令', idField: 'workorder_id', url: 'api/workorder/query2', crudMethod: { ...workorder },
|
||||
optShow: {
|
||||
|
||||
@@ -225,7 +225,7 @@ import { mapGetters } from 'vuex'
|
||||
import crudStorattr from '@/api/wms/basedata/st/storattr'
|
||||
|
||||
export default {
|
||||
name: 'Handle',
|
||||
name: 'SparePart',
|
||||
components: {
|
||||
ViewDialog,
|
||||
AddDialog,
|
||||
|
||||
@@ -210,7 +210,7 @@ import { mapGetters } from 'vuex'
|
||||
import crudStorattr from '@/api/wms/basedata/st/storattr'
|
||||
|
||||
export default {
|
||||
name: 'Handle',
|
||||
name: 'Consuming',
|
||||
components: {
|
||||
ViewDialog,
|
||||
AddDialog,
|
||||
|
||||
@@ -177,7 +177,7 @@ import AddDialog from '@/views/wms/sb/repair/devicerepairplan/AddDialog'
|
||||
import CopyAddDialog from '@/views/wms/sb/repair/devicerepairplan/CopyAddDialog'
|
||||
|
||||
export default {
|
||||
name: 'Devicerepairplanmst',
|
||||
name: 'Devicerepairplan',
|
||||
dicts: ['EM_DEVICE_WX_CYCLE', 'IS_OR_NOT', 'EM_DEVICE_WX_TYPE'],
|
||||
components: { AddDialog, pagination, crudOperation, rrOperation, udOperation, DateRangePicker, Treeselect, CopyAddDialog },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
|
||||
@@ -145,7 +145,7 @@ import { mapGetters } from 'vuex'
|
||||
import crudStorattr from '@/api/wms/basedata/st/storattr'
|
||||
|
||||
export default {
|
||||
name: 'Handle',
|
||||
name: 'ReturnBack',
|
||||
components: {
|
||||
ViewDialog,
|
||||
AddDialog,
|
||||
|
||||
@@ -210,7 +210,7 @@ import { mapGetters } from 'vuex'
|
||||
import crudStorattr from '@/api/wms/basedata/st/storattr'
|
||||
|
||||
export default {
|
||||
name: 'Handle',
|
||||
name: 'Scrap',
|
||||
components: {
|
||||
ViewDialog,
|
||||
AddDialog,
|
||||
|
||||
@@ -80,7 +80,7 @@ import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
|
||||
const defaultForm = { }
|
||||
export default {
|
||||
name: 'safetyqtyquery',
|
||||
name: 'Devicesafetyqtyquery2',
|
||||
components: { pagination, crudOperation, rrOperation, Treeselect },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
|
||||
@@ -183,7 +183,7 @@ import crudStorattr from '@/api/wms/basedata/st/storattr'
|
||||
import crudRawAssist from '@/api/wms/st/core/inbill/rawassist'
|
||||
|
||||
export default {
|
||||
name: 'backoutbill',
|
||||
name: 'Backoutbill',
|
||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '用户', props: {
|
||||
|
||||
483
mes/qd/src/views/wms/st/return/inAndOutReturn2/index.vue
Normal file
483
mes/qd/src/views/wms/st/return/inAndOutReturn2/index.vue
Normal file
@@ -0,0 +1,483 @@
|
||||
<template>
|
||||
<div v-loading.fullscreen.lock="fullscreenLoading" 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.io_type"
|
||||
size="mini"
|
||||
disabled
|
||||
placeholder="出入类型"
|
||||
class="filter-item"
|
||||
@change="ioTypeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.io_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</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-select
|
||||
v-model="query.bill_status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.io_bill_status"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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>
|
||||
<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.pcsn"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="批次"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="模糊查询">
|
||||
<el-input
|
||||
v-model="query.bill_code"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="出入库单号"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否回传">
|
||||
<el-select
|
||||
v-model="query.is_upload"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="是否回传"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.is_upload"
|
||||
:key="item.value"
|
||||
: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"
|
||||
@click="upload2"
|
||||
>
|
||||
合并回传
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="upload"
|
||||
>
|
||||
按单回传
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="disupload"
|
||||
>
|
||||
不回传
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
size="mini"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
:max-height="590"
|
||||
show-summary
|
||||
:summary-method="getSum"
|
||||
:highlight-current-row="true"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" label="序号" min-width="50" align="center" />
|
||||
<el-table-column prop="is_upload" label="是否回传" :formatter="formatIsUpload" />
|
||||
<el-table-column prop="bill_code" min-width="130" label="单据号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="stor_name" label="仓库" min-width="100" />
|
||||
<el-table-column min-width="130" prop="bill_type" :formatter="bill_typeFormat" label="业务类型" />
|
||||
<el-table-column min-width="135" prop="biz_date" label="业务日期" />
|
||||
<el-table-column :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="100" />
|
||||
<el-table-column label="明细数" align="center" prop="detail_count" min-width="100" />
|
||||
<el-table-column prop="total_qty" label="总重量" min-width="100" :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="remark" label="备注" min-width="100" />
|
||||
<el-table-column prop="input_optname" label="制单人" min-width="100" />
|
||||
<el-table-column prop="input_time" label="制单时间" min-width="150" />
|
||||
<el-table-column prop="update_optname" label="修改人" min-width="100" />
|
||||
<el-table-column prop="update_time" label="修改时间" min-width="150" />
|
||||
<el-table-column prop="confirm_optname" label="审核人" min-width="100" />
|
||||
<el-table-column prop="confirm_time" label="审核时间" min-width="150" />
|
||||
<el-table-column prop="upload_name" label="回传人" min-width="100" />
|
||||
<el-table-column prop="upload_time" label="回传时间" min-width="150" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import inandoutreturn from '@/api/wms/st/return/inandoutreturn'
|
||||
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 ViewDialog from '@/views/wms/st/core/inbill/rawassist/ViewDialog'
|
||||
import crudRawAssist from '@/api/wms/st/core/inbill/rawassist'
|
||||
|
||||
export default {
|
||||
name: 'OutReturn',
|
||||
components: { crudOperation, rrOperation, pagination, ViewDialog },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '出入库单报表', props: {
|
||||
// 每页数据条数
|
||||
size: 20
|
||||
}, idField: 'iostorinv_id', url: 'api/inandoutreturn', crudMethod: { ...inandoutreturn },
|
||||
query: { is_upload: '0' },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
reset: true,
|
||||
download: false
|
||||
}
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['io_bill_status', 'ST_CREATE_MODE', 'io_type', 'is_upload'],
|
||||
data() {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
permission: {},
|
||||
viewShow: false,
|
||||
mstrow: {},
|
||||
fullscreenLoading: false,
|
||||
storlist: [],
|
||||
billtypelist: []
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 180 + 'px;'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 根据菜单配置路径获取工序编码(qm/GX002)
|
||||
// 获取最后5位
|
||||
const str = this.$route.path
|
||||
const io_flag = str.substring(str.length - 2)
|
||||
if (io_flag === '00') {
|
||||
this.crud.query.io_type = '0'
|
||||
}
|
||||
if (io_flag === '01') {
|
||||
this.crud.query.io_type = '1'
|
||||
}
|
||||
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
crudRawAssist.getType({ 'io_code': '', 'io_flag': io_flag }).then(res => {
|
||||
this.billtypelist = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
const str = this.$route.path
|
||||
const io_flag = str.substring(str.length - 2)
|
||||
if (io_flag === '00') {
|
||||
this.crud.query.io_type = '0'
|
||||
}
|
||||
if (io_flag === '01') {
|
||||
this.crud.query.io_type = '1'
|
||||
}
|
||||
return true
|
||||
},
|
||||
querytable() {
|
||||
this.onSelectAll()
|
||||
this.crud.toQuery()
|
||||
},
|
||||
toView(index, row) {
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
},
|
||||
bill_typeFormat(row) {
|
||||
for (const item of this.billtypelist) {
|
||||
if (item.code === row.bill_type) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
create_modeFormat(row) {
|
||||
return this.dict.label.ST_CREATE_MODE[row.create_mode]
|
||||
},
|
||||
upload() {
|
||||
const res = this.$refs.table.selection
|
||||
if (!res || res.length < 1) {
|
||||
this.crud.notify('请选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const upload_flag = res.some(row => row.is_upload === '1')
|
||||
if (upload_flag) {
|
||||
this.$confirm('存在已经回传的单据, 是否继续回传?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.fullscreenLoading = true
|
||||
const data = {}
|
||||
data.rows = res
|
||||
inandoutreturn.upload(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('单据回传成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消回传'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.fullscreenLoading = true
|
||||
const data = {}
|
||||
data.rows = res
|
||||
inandoutreturn.upload(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('单据回传成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
disupload() {
|
||||
const res = this.$refs.table.selection
|
||||
if (!res || res.length < 1) {
|
||||
this.crud.notify('请选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
const data = {}
|
||||
data.rows = res
|
||||
inandoutreturn.disupload(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
upload2() {
|
||||
const res = this.$refs.table.selection
|
||||
if (!res || res.length < 1) {
|
||||
this.crud.notify('请选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const upload_flag = res.some(row => row.is_upload === '1')
|
||||
if (upload_flag) {
|
||||
this.$confirm('存在已经回传的单据, 是否继续回传?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const data = {}
|
||||
data.rows = res
|
||||
this.fullscreenLoading = true
|
||||
data.bill_type = this.crud.query.bill_type
|
||||
inandoutreturn.upload2(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('单据回传成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消回传'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
const data = {}
|
||||
data.rows = res
|
||||
this.fullscreenLoading = true
|
||||
data.bill_type = this.crud.query.bill_type
|
||||
inandoutreturn.upload2(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('单据回传成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
ioTypeChange(value) {
|
||||
if (value === '1') {
|
||||
crudRawAssist.getType({ 'io_code': '', 'io_flag': '01' }).then(res => {
|
||||
this.billtypelist = res
|
||||
})
|
||||
} else {
|
||||
crudRawAssist.getType({ 'io_code': '', 'io_flag': '00' }).then(res => {
|
||||
this.billtypelist = res
|
||||
})
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
formatIsUpload(row) {
|
||||
if (row.is_upload === '0') {
|
||||
return '否'
|
||||
} else if (row.is_upload === '1') {
|
||||
return '是'
|
||||
}
|
||||
},
|
||||
getSum(param) {
|
||||
// 将所有number的字段合计
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
let values = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 1) {
|
||||
sums[index] = '合计'
|
||||
return
|
||||
}
|
||||
values = data.map(item => Number(item[column.property]))
|
||||
if (column.property === 'total_qty') {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] = sums[index].toFixed(3) + 'kg' // 保留三位小数
|
||||
} else if (column.property === 'detail_count') {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] = sums[index].toFixed(0) // 保留三位小数
|
||||
} else {
|
||||
sums[index] = '--'
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -87,11 +87,11 @@
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="100" align="center" fixed />
|
||||
<el-table-column prop="0" label="日期" min-width="150" show-overflow-tooltip fixed />
|
||||
<el-table-column prop="1" label="产品编码" min-width="100" show-overflow-tooltip fixed />
|
||||
<el-table-column prop="2" label="批号" min-width="100" show-overflow-tooltip fixed />
|
||||
<el-table-column prop="0" label="日期" min-width="150" fixed />
|
||||
<el-table-column prop="1" label="产品编码" min-width="100" fixed />
|
||||
<el-table-column prop="2" label="批号" min-width="100" fixed />
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-table-column v-if="col" :prop="col.prop" :label="col.label" width="120px" show-overflow-tooltip />
|
||||
<el-table-column v-if="col" :prop="col.prop" :label="col.label" width="120px" />
|
||||
</template>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
@@ -114,7 +114,7 @@ import {downloadFile} from "@/utils";
|
||||
export default {
|
||||
name: 'Powderorder',
|
||||
dicts: ['workorder_status'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker },
|
||||
components: { pagination, crudOperation, rrOperation, DateRangePicker },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
|
||||
@@ -88,7 +88,7 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
export default {
|
||||
name: 'productday',
|
||||
name: 'Productday',
|
||||
dicts: ['product_mode', 'workorder_type2', 'planstatus'],
|
||||
components: { rrOperation, crudOperation, pagination },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
|
||||
@@ -70,7 +70,7 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
export default {
|
||||
name: 'productmouth',
|
||||
name: 'Productmouth',
|
||||
dicts: ['product_mode', 'workorder_type2', 'planstatus'],
|
||||
components: { rrOperation, crudOperation, pagination },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
|
||||
@@ -175,7 +175,7 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
export default {
|
||||
name: 'producttask',
|
||||
name: 'Producttask',
|
||||
dicts: ['product_mode', 'workorder_type2', 'planstatus'],
|
||||
components: { rrOperation, crudOperation, pagination },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
|
||||
202
mes/qd/src/views/wms/statistics/rawUatCbQuery/index.vue
Normal file
202
mes/qd/src/views/wms/statistics/rawUatCbQuery/index.vue
Normal file
@@ -0,0 +1,202 @@
|
||||
<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="到货日期">
|
||||
<date-range-picker v-model="query.createTime" class="date-item" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="单据编号">
|
||||
<el-input
|
||||
v-model="query.receive_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入单据编号"
|
||||
style="width: 230px;"
|
||||
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: 230px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="批次">
|
||||
<label slot="label">批 次:</label>
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入批次"
|
||||
style="width: 230px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="单据状态">
|
||||
<el-select
|
||||
v-model="query.bill_status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 210px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusList"
|
||||
: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-check"
|
||||
size="mini"
|
||||
@click="downdtl"
|
||||
>
|
||||
导出Excel
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
:max-height="590"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="100" align="center" fixed />
|
||||
<el-table-column prop="1" label="物料编码" min-width="100" show-overflow-tooltip fixed />
|
||||
<el-table-column prop="2" label="物料名称" min-width="100" show-overflow-tooltip fixed />
|
||||
<el-table-column prop="3" label="批号" min-width="100" show-overflow-tooltip fixed />
|
||||
<el-table-column prop="4" label="重量" min-width="100" show-overflow-tooltip fixed />
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-table-column v-if="col" :prop="col.prop" :label="col.label" width="120px" show-overflow-tooltip />
|
||||
</template>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudRawuatwcquery from '@/api/wms/statistics/rawuatwcquery'
|
||||
import CRUD, { presenter, header, 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 DateRangePicker from '@/components/DateRangePicker'
|
||||
import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst'
|
||||
import {download} from "@/api/data";
|
||||
import {downloadFile} from "@/utils";
|
||||
|
||||
export default {
|
||||
name: 'RawUatCbQuery',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '原材料碳化钨查询',
|
||||
url: 'api/rawUatWcQuery',
|
||||
idField: 'performance_id',
|
||||
sort: 'performance_id,desc',
|
||||
crudMethod: { ...crudRawuatwcquery },
|
||||
props: {
|
||||
// 每页数据条数
|
||||
size: 20
|
||||
},
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols: [],
|
||||
statusList: [],
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
}}
|
||||
},
|
||||
beforeCreate() {
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
var str = this.$route.path
|
||||
// var material_type_id = str.substring(str.length - 2)
|
||||
// 截取最后一个/之后的内容
|
||||
var index = str.lastIndexOf('\/')
|
||||
str = str.substring(index + 1, str.length)
|
||||
const material_type_id = str
|
||||
crudRawuatwcquery.getHeader(material_type_id).then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
crudInspectionsheetmst.getStatus().then(res => {
|
||||
this.statusList = res
|
||||
})
|
||||
this.query.material_type_id = str
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
downdtl() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
download('/api/rawUatWcQuery/download', this.crud.query).then(result => {
|
||||
downloadFile(result, '原材料碳化钨', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
}).catch(() => {
|
||||
crud.downloadLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -124,7 +124,7 @@ import {download} from "@/api/data";
|
||||
import {downloadFile} from "@/utils";
|
||||
|
||||
export default {
|
||||
name: 'RawUatCbQuery',
|
||||
name: 'RawUatWcQuery',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
|
||||
Reference in New Issue
Block a user