Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
ceea2e2674
|
|
@ -175,24 +175,31 @@ export default {
|
||||||
// .el-table thead.is-group th.el-table__cell.colorheader4{
|
// .el-table thead.is-group th.el-table__cell.colorheader4{
|
||||||
// background-color: rgb(168, 218, 228)!important;
|
// background-color: rgb(168, 218, 228)!important;
|
||||||
// }
|
// }
|
||||||
|
.el-table thead th.el-table__cell.colorheader1,
|
||||||
.el-table thead.is-group th.el-table__cell.colorheader1{
|
.el-table thead.is-group th.el-table__cell.colorheader1{
|
||||||
background-color: rgba(246, 98, 98, 0.323)!important;
|
background-color: rgba(246, 98, 98, 0.323)!important;
|
||||||
}
|
}
|
||||||
|
.el-table thead th.el-table__cell.colorheader2,
|
||||||
.el-table thead.is-group th.el-table__cell.colorheader2{
|
.el-table thead.is-group th.el-table__cell.colorheader2{
|
||||||
background-color: rgba(250, 130, 11, 0.325)!important;
|
background-color: rgba(250, 130, 11, 0.325)!important;
|
||||||
}
|
}
|
||||||
|
.el-table thead th.el-table__cell.colorheader3,
|
||||||
.el-table thead.is-group th.el-table__cell.colorheader3{
|
.el-table thead.is-group th.el-table__cell.colorheader3{
|
||||||
background-color: rgba(247, 235, 9, 0.311)!important;
|
background-color: rgba(247, 235, 9, 0.311)!important;
|
||||||
}
|
}
|
||||||
|
.el-table thead th.el-table__cell.colorheader4,
|
||||||
.el-table thead.is-group th.el-table__cell.colorheader4{
|
.el-table thead.is-group th.el-table__cell.colorheader4{
|
||||||
background-color: rgba(30, 252, 10, 0.202)!important;
|
background-color: rgba(30, 252, 10, 0.202)!important;
|
||||||
}
|
}
|
||||||
|
.el-table thead th.el-table__cell.colorheader5,
|
||||||
.el-table thead.is-group th.el-table__cell.colorheader5{
|
.el-table thead.is-group th.el-table__cell.colorheader5{
|
||||||
background-color: rgba(11, 251, 231, 0.326)!important;
|
background-color: rgba(11, 251, 231, 0.326)!important;
|
||||||
}
|
}
|
||||||
|
.el-table thead th.el-table__cell.colorheader6,
|
||||||
.el-table thead.is-group th.el-table__cell.colorheader6{
|
.el-table thead.is-group th.el-table__cell.colorheader6{
|
||||||
background-color: rgba(12, 85, 255, 0.326)!important;
|
background-color: rgba(12, 85, 255, 0.326)!important;
|
||||||
}
|
}
|
||||||
|
.el-table thead th.el-table__cell.colorheader7,
|
||||||
.el-table thead.is-group th.el-table__cell.colorheader7{
|
.el-table thead.is-group th.el-table__cell.colorheader7{
|
||||||
background-color: rgba(51, 15, 253, 0.317)!important;
|
background-color: rgba(51, 15, 253, 0.317)!important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -592,11 +592,23 @@ export default {
|
||||||
return await http.post(`${config.API_URL}/wpmw/wpr/new_number/`, data);
|
return await http.post(`${config.API_URL}/wpmw/wpr/new_number/`, data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
numberOutLast: {
|
||||||
|
name: "最新编号",
|
||||||
|
req: async function (data) {
|
||||||
|
return await http.get(`${config.API_URL}/wpmw/wpr/number_out_last/`, data);
|
||||||
|
}
|
||||||
|
},
|
||||||
query: {
|
query: {
|
||||||
name: "动态产品",
|
name: "动态产品",
|
||||||
req: async function (data) {
|
req: async function (data) {
|
||||||
return await http.post(`${config.API_URL}/wpmw/wpr/cquery/`, data);
|
return await http.post(`${config.API_URL}/wpmw/wpr/cquery/`, data);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
assginNumberOut: {
|
||||||
|
name: "分配出库对外编号",
|
||||||
|
req: async function (data) {
|
||||||
|
return await http.post(`${config.API_URL}/wpmw/wpr/assgin_number_out/`, data);
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ export default {
|
||||||
if(that.g!==null){
|
if(that.g!==null){
|
||||||
that.updateGraph();
|
that.updateGraph();
|
||||||
}else{
|
}else{
|
||||||
that.g = new dagreD3.graphlib.Graph().setGraph({
|
that.g = new dagreD3.graphlib.Graph({multigraph: true}).setGraph({
|
||||||
rankdir: that.rankdir,
|
rankdir: that.rankdir,
|
||||||
nodesep: 40,
|
nodesep: 40,
|
||||||
edgesep: 25, //两条线之间的距离
|
edgesep: 25, //两条线之间的距离
|
||||||
|
|
@ -89,8 +89,9 @@ export default {
|
||||||
that.edges.forEach((transition0) => {
|
that.edges.forEach((transition0) => {
|
||||||
that.g.setEdge(transition0.source,transition0.target,{
|
that.g.setEdge(transition0.source,transition0.target,{
|
||||||
label: transition0.label,// 边标签
|
label: transition0.label,// 边标签
|
||||||
|
id: transition0.id,
|
||||||
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px", // 根据后台数据来改变连线的颜色
|
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px", // 根据后台数据来改变连线的颜色
|
||||||
});
|
},transition0.id);
|
||||||
});
|
});
|
||||||
// 创建渲染器
|
// 创建渲染器
|
||||||
let render = new dagreD3.render();
|
let render = new dagreD3.render();
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,8 @@
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="sc-form-table" ref="scFormTable">
|
<div class="sc-form-table" ref="scFormTable">
|
||||||
<el-table :data="data" ref="table" border :height="tableHeight">
|
<el-table :data="data" ref="table" border :height="tableHeight" @select="select" @select-all="selectAll">
|
||||||
|
<el-table-column v-if="canMultiple" type="selection" width="45"></el-table-column>
|
||||||
<el-table-column type="index" width="50" fixed="left">
|
<el-table-column type="index" width="50" fixed="left">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-button v-if="!hideAdd" type="primary" icon="el-icon-plus" size="small" circle @click="rowAdd"></el-button>
|
<el-button v-if="!hideAdd" type="primary" icon="el-icon-plus" size="small" circle @click="rowAdd"></el-button>
|
||||||
|
|
@ -50,11 +51,13 @@
|
||||||
hideAdd: { type: Boolean, default: false },
|
hideAdd: { type: Boolean, default: false },
|
||||||
hideDelete: { type: Boolean, default: false },
|
hideDelete: { type: Boolean, default: false },
|
||||||
hideIndex: { type: Boolean, default: false },
|
hideIndex: { type: Boolean, default: false },
|
||||||
|
canMultiple: { type: Boolean, default: false },
|
||||||
pushType: { type: String, default: 'push' }
|
pushType: { type: String, default: 'push' }
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
data: []
|
data: [],
|
||||||
|
defaultValue:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
|
|
@ -118,7 +121,32 @@
|
||||||
//根据index删除
|
//根据index删除
|
||||||
deleteRow(index){
|
deleteRow(index){
|
||||||
this.data.splice(index, 1)
|
this.data.splice(index, 1)
|
||||||
|
},
|
||||||
|
//表格勾选事件
|
||||||
|
select(rows, row){
|
||||||
|
var isSelect = rows.length && rows.indexOf(row) !== -1
|
||||||
|
if(isSelect){
|
||||||
|
this.defaultValue.push(row)
|
||||||
|
}else{
|
||||||
|
this.defaultValue.splice(this.defaultValue.findIndex(item => item.id == row.id), 1)
|
||||||
}
|
}
|
||||||
|
this.$emit('selectChange', this.defaultValue);
|
||||||
|
},
|
||||||
|
//表格全选事件
|
||||||
|
selectAll(rows){
|
||||||
|
var isAllSelect = rows.length > 0
|
||||||
|
if(isAllSelect){
|
||||||
|
rows.forEach(row => {
|
||||||
|
var isHas = this.defaultValue.find(item => item.id == row.id)
|
||||||
|
if(!isHas){
|
||||||
|
this.defaultValue.push(row)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.defaultValue = [];
|
||||||
|
}
|
||||||
|
this.$emit('selectAllChange', this.defaultValue);
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@
|
||||||
v-if="multiple"
|
v-if="multiple"
|
||||||
type="selection"
|
type="selection"
|
||||||
width="40"
|
width="40"
|
||||||
|
:selectable="selectable"
|
||||||
:reserve-selection="true"
|
:reserve-selection="true"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<slot v-if="!isFixOptions"></slot>
|
<slot v-if="!isFixOptions"></slot>
|
||||||
|
|
@ -89,7 +90,7 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(["update:modelValue", "update:obj", "update:label", "change"]);
|
const emit = defineEmits(["update:modelValue", "update:obj", "update:label", "change"]);
|
||||||
|
const selectable = (row) => row.count_canhandover?row.count_canhandover>0:true;
|
||||||
// 控制 popover 显示与隐藏的状态
|
// 控制 popover 显示与隐藏的状态
|
||||||
const showPopover = ref(false);
|
const showPopover = ref(false);
|
||||||
const inputRef = ref();
|
const inputRef = ref();
|
||||||
|
|
|
||||||
|
|
@ -214,3 +214,12 @@ export const certStateEnum = new EnumFactory({
|
||||||
20: { text: '临期', type: 'warning' },
|
20: { text: '临期', type: 'warning' },
|
||||||
30: { text: '过期', type: 'danger' }
|
30: { text: '过期', type: 'danger' }
|
||||||
}, parseInt)
|
}, parseInt)
|
||||||
|
|
||||||
|
export const actStateEnum = new EnumFactory({
|
||||||
|
0: { text: '草稿中', type: 'primary' },
|
||||||
|
1: { text: '进行中', type: 'primary' },
|
||||||
|
2: { text: '被退回', type: 'danger' },
|
||||||
|
3: { text: '被撤回', type: 'warning' },
|
||||||
|
4: { text: '已完成', type: 'success' },
|
||||||
|
5: { text: '已关闭', type: 'info' },
|
||||||
|
})
|
||||||
|
|
@ -18,6 +18,11 @@
|
||||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||||
<el-table-column label="名称" prop="name" width="240" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column label="名称" prop="name" width="240" :show-overflow-tooltip="true"></el-table-column>
|
||||||
<el-table-column label="代号" prop="code" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column label="代号" prop="code" :show-overflow-tooltip="true"></el-table-column>
|
||||||
|
<el-table-column label="启用" prop="enabled">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-switch v-model="scope.row.enabled" disabled></el-switch>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="left" width="200">
|
<el-table-column label="操作" fixed="right" align="left" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" plain size="small" @click="handleShow(scope.row)"
|
<el-button type="primary" plain size="small" @click="handleShow(scope.row)"
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,11 @@
|
||||||
<el-input v-model="form.echart_options" clearable type="textarea" :rows="8"></el-input>
|
<el-input v-model="form.echart_options" clearable type="textarea" :rows="8"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="24" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="是否启用">
|
||||||
|
<el-switch v-model="form.enabled"></el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-main>
|
</el-main>
|
||||||
|
|
@ -64,7 +69,7 @@ export default {
|
||||||
edit: "编辑",
|
edit: "编辑",
|
||||||
show: "查看",
|
show: "查看",
|
||||||
},
|
},
|
||||||
form: {},
|
form: {enabled:true},
|
||||||
rules: {
|
rules: {
|
||||||
name: [{ required: true, message: "请输入" }],
|
name: [{ required: true, message: "请输入" }],
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -318,11 +318,16 @@ export default {
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
barCategoryGap: 50,
|
barCategoryGap: 50,
|
||||||
barWidth: 10,
|
barWidth: 10,
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: "right",
|
||||||
|
color: "#fff",
|
||||||
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
barBorderRadius: 5,
|
barBorderRadius: 5,
|
||||||
color: function (params) {
|
color: function (params) {
|
||||||
return myColor[params.dataIndex];
|
return myColor[params.dataIndex%5];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
|
|
@ -391,10 +396,15 @@ export default {
|
||||||
{name:'一次复丝',value:0},
|
{name:'一次复丝',value:0},
|
||||||
{name:'捆二次棒',value:0},
|
{name:'捆二次棒',value:0},
|
||||||
{name:'二次复丝',value:0},
|
{name:'二次复丝',value:0},
|
||||||
]
|
],
|
||||||
|
showValue: true
|
||||||
} ,
|
} ,
|
||||||
config_left2:{
|
config_left2:{
|
||||||
data:[]
|
data:[],
|
||||||
|
digitalFlopStyle: {
|
||||||
|
fontSize: 16,
|
||||||
|
fill: '#fff'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
config_middle_top:{
|
config_middle_top:{
|
||||||
rowNum:10,
|
rowNum:10,
|
||||||
|
|
@ -425,6 +435,7 @@ export default {
|
||||||
today: "",
|
today: "",
|
||||||
end_time:'',
|
end_time:'',
|
||||||
start_time:'',
|
start_time:'',
|
||||||
|
deptName:"拉丝排板班组",
|
||||||
mgroups:['洗棒','捆棒','拉单丝','捆一次棒','一次复丝','捆二次棒','二次复丝'],
|
mgroups:['洗棒','捆棒','拉单丝','捆一次棒','一次复丝','捆二次棒','二次复丝'],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -438,7 +449,7 @@ export default {
|
||||||
that.mgroupsforEach();
|
that.mgroupsforEach();
|
||||||
that.getMgroups();
|
that.getMgroups();
|
||||||
//每个人日生产量:个人绩效
|
//每个人日生产量:个人绩效
|
||||||
// that.getEveryoneCount(that.deptName1);
|
that.getEveryoneCount();
|
||||||
// that.getEveryoneCount(that.deptName2);
|
// that.getEveryoneCount(that.deptName2);
|
||||||
// that.getEveryoneCount(that.deptName3);
|
// that.getEveryoneCount(that.deptName3);
|
||||||
that.materialAll();
|
that.materialAll();
|
||||||
|
|
@ -494,7 +505,7 @@ export default {
|
||||||
mgroupsforEach(){
|
mgroupsforEach(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.mgroups.forEach((item)=>{
|
that.mgroups.forEach((item)=>{
|
||||||
that.getEquipment(item);
|
// that.getEquipment(item);
|
||||||
that.getMtask1(item);
|
that.getMtask1(item);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -533,9 +544,9 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//车间设备列表
|
//车间设备列表
|
||||||
getEquipment(name) {
|
getEquipment() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let params = {page: 0, mgroup__name:name,
|
let params = {page: 0, belong_dept__name:'拉丝排板班组',
|
||||||
// query: " { id, name, number, model, state ,mgroup_name }"
|
// query: " { id, name, number, model, state ,mgroup_name }"
|
||||||
};
|
};
|
||||||
that.config_middle_bottom.data = [];
|
that.config_middle_bottom.data = [];
|
||||||
|
|
@ -556,13 +567,12 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//每个人日产量
|
//每个人日产量
|
||||||
getEveryoneCount(deptName){
|
getEveryoneCount(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.config_right_top.data = [];
|
that.config_right_top.data = [];
|
||||||
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
||||||
let params = {
|
let params = {
|
||||||
// query: {start_date:date,end_date:date,dept_name:that.deptName},
|
query: {start_date:date,end_date:date,dept_name:that.deptName},
|
||||||
query: {start_date:'2025-05-04',end_date:'2025-05-04',dept_name:deptName},
|
|
||||||
};
|
};
|
||||||
this.$API.bi.dataset.exec.req("performance", params).then((res) => {
|
this.$API.bi.dataset.exec.req("performance", params).then((res) => {
|
||||||
if(res.data2.ds0.length>0){
|
if(res.data2.ds0.length>0){
|
||||||
|
|
|
||||||
|
|
@ -318,11 +318,16 @@ export default {
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
barCategoryGap: 50,
|
barCategoryGap: 50,
|
||||||
barWidth: 10,
|
barWidth: 10,
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: "right",
|
||||||
|
color: "#fff",
|
||||||
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
barBorderRadius: 5,
|
barBorderRadius: 5,
|
||||||
color: function (params) {
|
color: function (params) {
|
||||||
return myColor[params.dataIndex];
|
return myColor[params.dataIndex%5];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
|
|
@ -388,10 +393,15 @@ export default {
|
||||||
{name:'排二次棒',value:0},
|
{name:'排二次棒',value:0},
|
||||||
{name:'切丝',value:0},
|
{name:'切丝',value:0},
|
||||||
{name:'排板',value:0},
|
{name:'排板',value:0},
|
||||||
]
|
],
|
||||||
|
showValue: true
|
||||||
} ,
|
} ,
|
||||||
config_left2:{
|
config_left2:{
|
||||||
data:[]
|
data:[],
|
||||||
|
digitalFlopStyle: {
|
||||||
|
fontSize: 16,
|
||||||
|
fill: '#fff'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
config_middle_top:{
|
config_middle_top:{
|
||||||
rowNum:10,
|
rowNum:10,
|
||||||
|
|
|
||||||
|
|
@ -5,77 +5,16 @@
|
||||||
<div class="timer">{{ currentDay }} {{ currentTime }}</div>
|
<div class="timer">{{ currentDay }} {{ currentTime }}</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main>
|
<el-main>
|
||||||
<el-row style="margin-bottom: 1vh;">
|
|
||||||
<el-col :span="3" class="numBlock">
|
|
||||||
<dv-border-box-12>
|
|
||||||
<div class="numBlock_title">本月产量</div>
|
|
||||||
<div class="numBlock_value">123</div>
|
|
||||||
</dv-border-box-12>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="3" class="numBlock">
|
|
||||||
<dv-border-box-12>
|
|
||||||
<div class="numBlock_title">今日产量</div>
|
|
||||||
<div class="numBlock_value">123</div>
|
|
||||||
</dv-border-box-12>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="3" class="numBlock">
|
|
||||||
<dv-border-box-12>
|
|
||||||
<div class="numBlock_title">今日工序报工量</div>
|
|
||||||
<div class="numBlock_value">123</div>
|
|
||||||
</dv-border-box-12>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="3" class="numBlock">
|
|
||||||
<dv-border-box-12>
|
|
||||||
<div class="numBlock_title">在产产品数</div>
|
|
||||||
<div class="numBlock_value">123</div>
|
|
||||||
</dv-border-box-12>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="3" class="numBlock">
|
|
||||||
<dv-border-box-12>
|
|
||||||
<div class="numBlock_title">本月完工工单</div>
|
|
||||||
<div class="numBlock_value">123</div>
|
|
||||||
</dv-border-box-12>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="3" class="numBlock">
|
|
||||||
<dv-border-box-12>
|
|
||||||
<div class="numBlock_title">本月计划产量</div>
|
|
||||||
<div class="numBlock_value">123</div>
|
|
||||||
</dv-border-box-12>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="3" class="numBlock">
|
|
||||||
<dv-border-box-12>
|
|
||||||
<div class="numBlock_title">本月产量</div>
|
|
||||||
<div class="numBlock_value">123</div>
|
|
||||||
</dv-border-box-12>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="3" class="numBlock">
|
|
||||||
<dv-border-box-12>
|
|
||||||
<div class="numBlock_title">本月产量</div>
|
|
||||||
<div class="numBlock_value">123</div>
|
|
||||||
</dv-border-box-12>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div class="leftBlock">
|
<div class="leftBlock">
|
||||||
<el-row style="margin-bottom: 1vh;">
|
<div style="height: 55vh;position: relative;">
|
||||||
<el-col :span="12" class="numBlock">
|
|
||||||
<dv-border-box-12>
|
|
||||||
<div class="numBlock_title">在制工序数</div>
|
|
||||||
<div class="numBlock_value">123</div>
|
|
||||||
</dv-border-box-12>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12" class="numBlock">
|
|
||||||
<dv-border-box-12>
|
|
||||||
<div class="numBlock_title">今日完成工序</div>
|
|
||||||
<div class="numBlock_value">123</div>
|
|
||||||
</dv-border-box-12>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<div style="height: 34vh;position: relative;">
|
|
||||||
<dv-border-box-1>
|
<dv-border-box-1>
|
||||||
<div class="chartBlockTitle">车间各工段生产产品数</div>
|
<div class="chartBlockTitle">本月各工段生产产品数</div>
|
||||||
<dv-capsule-chart :config="config_left1" class="leftChartBlock1"/>
|
<div class="echartsWrap">
|
||||||
|
<dv-capsule-chart id="barCharts" :config="config_left1" class="leftChartBlock1" style="height: 140vh;width: 90%;left: 2%;position: absolute;top: 0px;"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
</dv-border-box-1>
|
</dv-border-box-1>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 34vh;">
|
<div style="height: 34vh;">
|
||||||
|
|
@ -88,9 +27,35 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="middleBlock">
|
<div class="middleBlock">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6" class="numBlock">
|
||||||
|
<dv-border-box-12>
|
||||||
|
<div class="numBlock_title">在产产品数</div>
|
||||||
|
<div class="numBlock_value">123</div>
|
||||||
|
</dv-border-box-12>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" class="numBlock">
|
||||||
|
<dv-border-box-12>
|
||||||
|
<div class="numBlock_title">本月计划产量</div>
|
||||||
|
<div class="numBlock_value">123</div>
|
||||||
|
</dv-border-box-12>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" class="numBlock">
|
||||||
|
<dv-border-box-12>
|
||||||
|
<div class="numBlock_title">本月产量</div>
|
||||||
|
<div class="numBlock_value">123</div>
|
||||||
|
</dv-border-box-12>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" class="numBlock">
|
||||||
|
<dv-border-box-12>
|
||||||
|
<div class="numBlock_title">今日产量</div>
|
||||||
|
<div class="numBlock_value">123</div>
|
||||||
|
</dv-border-box-12>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<div style="height: 38vh;">
|
<div style="height: 38vh;">
|
||||||
<dv-border-box-1>
|
<dv-border-box-1>
|
||||||
<div class="chartBlockTitle">车间工段任务展示</div>
|
<div class="chartBlockTitle">车间物料展示</div>
|
||||||
<dv-scroll-board :config="config_middle_top" class="middleTableBlock1"/>
|
<dv-scroll-board :config="config_middle_top" class="middleTableBlock1"/>
|
||||||
</dv-border-box-1>
|
</dv-border-box-1>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -117,6 +82,18 @@
|
||||||
<div class="numBlock_value">123</div>
|
<div class="numBlock_value">123</div>
|
||||||
</dv-border-box-12>
|
</dv-border-box-12>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12" class="numBlock">
|
||||||
|
<dv-border-box-12>
|
||||||
|
<div class="numBlock_title">在制工单数</div>
|
||||||
|
<div class="numBlock_value">123</div>
|
||||||
|
</dv-border-box-12>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" class="numBlock">
|
||||||
|
<dv-border-box-12>
|
||||||
|
<div class="numBlock_title">本月交付数</div>
|
||||||
|
<div class="numBlock_value">123</div>
|
||||||
|
</dv-border-box-12>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="height: 34vh;">
|
<div style="height: 34vh;">
|
||||||
<dv-border-box-1>
|
<dv-border-box-1>
|
||||||
|
|
@ -317,11 +294,16 @@ export default {
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
barCategoryGap: 50,
|
barCategoryGap: 50,
|
||||||
barWidth: 10,
|
barWidth: 10,
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: "right",
|
||||||
|
color: "#fff",
|
||||||
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
barBorderRadius: 5,
|
barBorderRadius: 5,
|
||||||
color: function (params) {
|
color: function (params) {
|
||||||
return myColor[params.dataIndex];
|
return myColor[params.dataIndex%5];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
|
|
@ -382,17 +364,22 @@ export default {
|
||||||
data:[]
|
data:[]
|
||||||
},
|
},
|
||||||
config_left1:{
|
config_left1:{
|
||||||
data:[]
|
data:[],
|
||||||
|
showValue: true
|
||||||
} ,
|
} ,
|
||||||
config_left2:{
|
config_left2:{
|
||||||
data:[]
|
data:[],
|
||||||
|
digitalFlopStyle: {
|
||||||
|
fontSize: 16,
|
||||||
|
fill: '#fff'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
config_middle_top:{
|
config_middle_top:{
|
||||||
rowNum:10,
|
rowNum:10,
|
||||||
headerBGC: 'rgba(47,102,107,.34)',
|
headerBGC: 'rgba(47,102,107,.34)',
|
||||||
oddRowBGC: 'rgba(0,0,0,0)',
|
oddRowBGC: 'rgba(0,0,0,0)',
|
||||||
evenRowBGC: 'rgba(0,0,0,0)',
|
evenRowBGC: 'rgba(0,0,0,0)',
|
||||||
header: ['任务编号', '产出产品', '任务量', '合格数'],
|
header: ['批次号','物料名称', '当前工序', '当前状态', '当前数量'],
|
||||||
data: []
|
data: []
|
||||||
},
|
},
|
||||||
config_middle_bottom:{
|
config_middle_bottom:{
|
||||||
|
|
@ -414,12 +401,13 @@ export default {
|
||||||
currentTime: "",
|
currentTime: "",
|
||||||
currentDay: "",
|
currentDay: "",
|
||||||
today: "",
|
today: "",
|
||||||
end_time:'',
|
end_date:'',
|
||||||
start_time:'',
|
start_date:'',
|
||||||
deptName1: "毛坯加工班组",
|
deptName1: "毛坯加工班组",
|
||||||
deptName2: "辅助班组",
|
deptName2: "辅助班组",
|
||||||
deptName3: "精雕机班组",
|
deptName3: "精雕机班组",
|
||||||
deptName4: "成品精加工班组",
|
deptName4: "成品精加工班组",
|
||||||
|
setIntervalChart : null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -428,7 +416,18 @@ export default {
|
||||||
this.dayInterval = setInterval(() => {
|
this.dayInterval = setInterval(() => {
|
||||||
this.showTime();
|
this.showTime();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
let date = new Date();
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = date.getMonth() + 1;
|
||||||
|
month = month < 10 ? "0" + month : month;
|
||||||
|
let days = new Date(year, month, 0).getDate();
|
||||||
|
that.start_date = year + "-" + month + "-01";
|
||||||
|
that.end_date = year + "-" + month + "-" + days;
|
||||||
that.materialAll();
|
that.materialAll();
|
||||||
|
that.getmgroupMaterial(that.deptName1);
|
||||||
|
that.getmgroupMaterial(that.deptName2);
|
||||||
|
that.getmgroupMaterial(that.deptName3);
|
||||||
|
that.getmgroupMaterial(that.deptName4);
|
||||||
that.getMgroups(that.deptName1);
|
that.getMgroups(that.deptName1);
|
||||||
that.getMgroups(that.deptName2);
|
that.getMgroups(that.deptName2);
|
||||||
that.getMgroups(that.deptName3);
|
that.getMgroups(that.deptName3);
|
||||||
|
|
@ -443,11 +442,23 @@ export default {
|
||||||
that.getEveryoneCount(that.deptName2);
|
that.getEveryoneCount(that.deptName2);
|
||||||
that.getEveryoneCount(that.deptName3);
|
that.getEveryoneCount(that.deptName3);
|
||||||
that.getEveryoneCount(that.deptName4);
|
that.getEveryoneCount(that.deptName4);
|
||||||
//任务进度
|
if(that.setIntervalChart !== null){
|
||||||
that.getMtask1(that.deptName1);
|
clearInterval(that.setIntervalChart);
|
||||||
that.getMtask1(that.deptName2);
|
that.setIntervalChart = null;
|
||||||
that.getMtask1(that.deptName3);
|
}
|
||||||
that.getMtask1(that.deptName4);
|
that.setIntervalChart = setInterval(() => {
|
||||||
|
let top = document.getElementById("barCharts").style.top;
|
||||||
|
top = top.substring(0,top.length-2);
|
||||||
|
let topNumber = Number(top);
|
||||||
|
let newTop = 0;
|
||||||
|
if(topNumber <= -90){
|
||||||
|
newTop = 0;
|
||||||
|
}else{
|
||||||
|
newTop =Number(top)-2.5;
|
||||||
|
}
|
||||||
|
document.getElementById("barCharts").style.top = newTop + 'vh';
|
||||||
|
|
||||||
|
},2000)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getMondayOfCurrentWeek() {
|
getMondayOfCurrentWeek() {
|
||||||
|
|
@ -492,51 +503,45 @@ export default {
|
||||||
if(res.length > 0){
|
if(res.length > 0){
|
||||||
res.forEach((item)=>{
|
res.forEach((item)=>{
|
||||||
that.mgroupsId += item.id + ',';
|
that.mgroupsId += item.id + ',';
|
||||||
that.getmgroupMaterial(item.name);
|
//车间库存
|
||||||
//工段太多了,暂时不显示全部,只显示有数据的工段
|
that.getInms(item);
|
||||||
// that.config_left1.data.push({name:item.name,value:0});
|
// that.getmgroupMaterial(item.name);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//任务进度
|
//车间物料展示车间库存
|
||||||
getMtask1(deptName) {
|
getInms(item){
|
||||||
let that = this;
|
let that = this;
|
||||||
let params = {
|
let params = { tag: 'done',page:0,mgroup: item.id };
|
||||||
state: 20,mgroup__belong_dept__name: deptName,page:0,
|
that.$API.wpm.wmaterial.list.req(params).then((res) => {
|
||||||
query: " { id, material_out_name, number, count, count_ok }"
|
|
||||||
};
|
|
||||||
that.config_middle_top.data = [];
|
|
||||||
that.$API.pm.mtask.list.req(params).then((res) => {
|
|
||||||
if(res.length>0){
|
if(res.length>0){
|
||||||
res.forEach((item) => {
|
res.forEach((item)=>{
|
||||||
let arr = [];
|
let arr = [];
|
||||||
arr[0] = item.number;
|
arr[0] = item.batch;
|
||||||
arr[1] = item.material_out_name;
|
arr[1] = item.material_.name;
|
||||||
arr[2] = item.count;
|
arr[2] = item.material_.process_name;
|
||||||
arr[3] = item.count_ok;
|
arr[3] = item.state==10?'合格品':'不合格品';
|
||||||
|
arr[4] = item.count;
|
||||||
that.config_middle_top.data.push(arr);
|
that.config_middle_top.data.push(arr);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
//车间各工段生产产品数
|
//车间各工段生产产品数
|
||||||
getmgroupMaterial(deptName) {
|
getmgroupMaterial(deptName) {
|
||||||
let that = this;
|
let that = this;
|
||||||
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
|
||||||
let params = {
|
let params = {
|
||||||
// query: {start_date:date,end_date:date,mgroup_name:item.name},
|
query: {start_date:that.start_date,end_date:that.end_date,dept_name:deptName}
|
||||||
query: {start_date:date,end_date:date,dept_name:deptName},
|
|
||||||
};
|
};
|
||||||
this.$API.bi.dataset.exec.req("mlog_okrate", params).then((res) => {
|
this.$API.bi.dataset.exec.req("mlog_okrate", params).then((res) => {
|
||||||
if(res.data2.ds0.length>0){
|
if(res.data2.ds0.length>0){
|
||||||
let data = res.data2.ds0;
|
let data = res.data2.ds0;
|
||||||
data.forEach((item) => {
|
data.forEach((item)=>{
|
||||||
that.config_left1.data.forEach((obj,index2) => {
|
let obj = {};
|
||||||
if (item.name == obj.工段){
|
obj.name = item.工段;
|
||||||
that.config_left1.data[index2].value = item.合格数;
|
obj.value = item.合格数;
|
||||||
}
|
that.config_left1.data.push(obj);
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -629,6 +634,9 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
beforeUnmount() {
|
||||||
|
clearInterval(this.setIntervalChart);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
@ -725,4 +733,19 @@ export default {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
border-bottom: 1px solid rgb(83 198 243);
|
border-bottom: 1px solid rgb(83 198 243);
|
||||||
}
|
}
|
||||||
|
.echartsWrap{
|
||||||
|
height: 49vh;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
#barCharts{
|
||||||
|
height: 70.5vh;
|
||||||
|
width: 96%;
|
||||||
|
left: 2%;
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
}
|
||||||
|
.active-ring-name{
|
||||||
|
font-size: 20px!important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="height: 34vh;position: relative;">
|
<div style="height: 34vh;position: relative;">
|
||||||
<dv-border-box-1>
|
<dv-border-box-1>
|
||||||
<div class="chartBlockTitle">车间各工段生产产品数</div>
|
<div class="chartBlockTitle">本月各工段生产产品数</div>
|
||||||
<dv-capsule-chart :config="config_left1" class="leftChartBlock1"/>
|
<dv-capsule-chart :config="config_left1" class="leftChartBlock1"/>
|
||||||
</dv-border-box-1>
|
</dv-border-box-1>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -317,11 +317,16 @@ export default {
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
barCategoryGap: 50,
|
barCategoryGap: 50,
|
||||||
barWidth: 10,
|
barWidth: 10,
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: "right",
|
||||||
|
color: "#fff",
|
||||||
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
barBorderRadius: 5,
|
barBorderRadius: 5,
|
||||||
color: function (params) {
|
color: function (params) {
|
||||||
return myColor[params.dataIndex];
|
return myColor[params.dataIndex%5];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
|
|
@ -382,17 +387,22 @@ export default {
|
||||||
data:[]
|
data:[]
|
||||||
},
|
},
|
||||||
config_left1:{
|
config_left1:{
|
||||||
data:[]
|
data:[],
|
||||||
|
showValue: true
|
||||||
} ,
|
} ,
|
||||||
config_left2:{
|
config_left2:{
|
||||||
data:[]
|
data:[],
|
||||||
|
digitalFlopStyle: {
|
||||||
|
fontSize: 16,
|
||||||
|
fill: '#fff'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
config_middle_top:{
|
config_middle_top:{
|
||||||
rowNum:10,
|
rowNum:10,
|
||||||
headerBGC: 'rgba(47,102,107,.34)',
|
headerBGC: 'rgba(47,102,107,.34)',
|
||||||
oddRowBGC: 'rgba(0,0,0,0)',
|
oddRowBGC: 'rgba(0,0,0,0)',
|
||||||
evenRowBGC: 'rgba(0,0,0,0)',
|
evenRowBGC: 'rgba(0,0,0,0)',
|
||||||
header:['批次号','物料名称', '当前工序', '状态', '数量'],
|
header:['批次号','物料名称', '当前工序', '当前状态', '当前数量'],
|
||||||
data: []
|
data: []
|
||||||
},
|
},
|
||||||
config_middle_bottom:{
|
config_middle_bottom:{
|
||||||
|
|
@ -425,20 +435,15 @@ export default {
|
||||||
this.dayInterval = setInterval(() => {
|
this.dayInterval = setInterval(() => {
|
||||||
this.showTime();
|
this.showTime();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
that.$API.system.dept.list.req({name:that.deptName,page:0}).then((res) => {
|
|
||||||
if(res.length > 0){
|
|
||||||
that.deptId = res[0].id;
|
|
||||||
that.getMgroups();
|
that.getMgroups();
|
||||||
//设备列表:各个工段的设备列表
|
//设备列表:各个工段的设备列表
|
||||||
that.getEquipment();
|
that.getEquipment();
|
||||||
//每个人日生产量:个人绩效
|
//每个人日生产量:个人绩效
|
||||||
that.getEveryoneCount();
|
that.getEveryoneCount();
|
||||||
//车间库存
|
|
||||||
that.getInms();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
//车间整体产品统计
|
//车间整体产品统计
|
||||||
that.materialAll();
|
that.materialAll();
|
||||||
|
//车间各工段生产产品数
|
||||||
|
that.getmgroupMaterial();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getMondayOfCurrentWeek() {
|
getMondayOfCurrentWeek() {
|
||||||
|
|
@ -487,7 +492,6 @@ export default {
|
||||||
obj.name = item.name;
|
obj.name = item.name;
|
||||||
obj.value = 0;
|
obj.value = 0;
|
||||||
that.config_left1.data.push(obj);
|
that.config_left1.data.push(obj);
|
||||||
that.getmgroupMaterial();
|
|
||||||
that.getInms(item);
|
that.getInms(item);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -514,10 +518,16 @@ export default {
|
||||||
//车间各工段生产产品数
|
//车间各工段生产产品数
|
||||||
getmgroupMaterial() {
|
getmgroupMaterial() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
let date = new Date();
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = date.getMonth() + 1;
|
||||||
|
month = month < 10 ? "0" + month : month;
|
||||||
|
let days = new Date(year, month, 0).getDate();
|
||||||
|
let start_date = year + "-" + month + "-01";
|
||||||
|
let end_date = year + "-" + month + "-" + days;
|
||||||
|
// let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
||||||
let params = {
|
let params = {
|
||||||
// query: {start_date:date,end_date:date,mgroup_name:item.name},
|
query: {start_date:start_date,end_date:end_date,dept_name:that.deptName},
|
||||||
query: {start_date:date,end_date:date,dept_name:that.deptName},
|
|
||||||
};
|
};
|
||||||
this.$API.bi.dataset.exec.req("mlog_okrate", params).then((res) => {
|
this.$API.bi.dataset.exec.req("mlog_okrate", params).then((res) => {
|
||||||
if(res.data2.ds0.length>0){
|
if(res.data2.ds0.length>0){
|
||||||
|
|
@ -536,8 +546,8 @@ export default {
|
||||||
getEquipment() {
|
getEquipment() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let params = {
|
let params = {
|
||||||
page: 0, belong_dept:that.deptId,
|
page: 0, belong_dept__name:that.deptName,
|
||||||
// query: " { id, name, number, model, state ,mgroup_name }"
|
query: " { id, name, number, model, state ,mgroup_name,running_state }"
|
||||||
};
|
};
|
||||||
that.config_middle_bottom.data = [];
|
that.config_middle_bottom.data = [];
|
||||||
that.$API.em.equipment.list.req(params).then((res) => {
|
that.$API.em.equipment.list.req(params).then((res) => {
|
||||||
|
|
@ -563,7 +573,6 @@ export default {
|
||||||
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
||||||
let params = {
|
let params = {
|
||||||
query: {start_date:date,end_date:date,dept_name:that.deptName},
|
query: {start_date:date,end_date:date,dept_name:that.deptName},
|
||||||
// query: {start_date:'2025-05-04',end_date:'2025-05-04',dept_name:that.deptName},
|
|
||||||
};
|
};
|
||||||
this.$API.bi.dataset.exec.req("performance", params).then((res) => {
|
this.$API.bi.dataset.exec.req("performance", params).then((res) => {
|
||||||
if(res.data2.ds0.length>0){
|
if(res.data2.ds0.length>0){
|
||||||
|
|
@ -619,28 +628,6 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//任务进度
|
|
||||||
getMtask1() {
|
|
||||||
let that = this;
|
|
||||||
let params = {
|
|
||||||
state: 20,mgroup__belong_dept: that.deptId,page:0,
|
|
||||||
query: " { id, material_out_name, number, count, count_ok }"
|
|
||||||
};
|
|
||||||
that.config_middle_top.data = [];
|
|
||||||
that.$API.pm.mtask.list.req(params).then((res) => {
|
|
||||||
if(res.length>0){
|
|
||||||
res.forEach((item) => {
|
|
||||||
let arr = [];
|
|
||||||
arr[0] = item.number;
|
|
||||||
arr[1] = item.material_out_name;
|
|
||||||
arr[2] = item.count;
|
|
||||||
arr[3] = item.count_ok;
|
|
||||||
// arr[4] = item.count_ok/item.count*100+'%';
|
|
||||||
that.config_middle_top.data.push(arr);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="height: 34vh;position: relative;">
|
<div style="height: 34vh;position: relative;">
|
||||||
<dv-border-box-1>
|
<dv-border-box-1>
|
||||||
<div class="chartBlockTitle">车间各工段生产产品数</div>
|
<div class="chartBlockTitle">本月各工段生产产品数</div>
|
||||||
<dv-capsule-chart :config="config_left1" class="leftChartBlock1"/>
|
<dv-capsule-chart :config="config_left1" class="leftChartBlock1"/>
|
||||||
</dv-border-box-1>
|
</dv-border-box-1>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -317,11 +317,16 @@ export default {
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
barCategoryGap: 50,
|
barCategoryGap: 50,
|
||||||
barWidth: 10,
|
barWidth: 10,
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: "right",
|
||||||
|
color: "#fff",
|
||||||
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
barBorderRadius: 5,
|
barBorderRadius: 5,
|
||||||
color: function (params) {
|
color: function (params) {
|
||||||
return myColor[params.dataIndex];
|
return myColor[params.dataIndex%5];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
|
|
@ -382,17 +387,22 @@ export default {
|
||||||
data:[]
|
data:[]
|
||||||
},
|
},
|
||||||
config_left1:{
|
config_left1:{
|
||||||
data:[]
|
data:[],
|
||||||
|
showValue: true
|
||||||
} ,
|
} ,
|
||||||
config_left2:{
|
config_left2:{
|
||||||
data:[]
|
data:[],
|
||||||
|
digitalFlopStyle: {
|
||||||
|
fontSize: 16,
|
||||||
|
fill: '#fff'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
config_middle_top:{
|
config_middle_top:{
|
||||||
rowNum:10,
|
rowNum:10,
|
||||||
headerBGC: 'rgba(47,102,107,.34)',
|
headerBGC: 'rgba(47,102,107,.34)',
|
||||||
oddRowBGC: 'rgba(0,0,0,0)',
|
oddRowBGC: 'rgba(0,0,0,0)',
|
||||||
evenRowBGC: 'rgba(0,0,0,0)',
|
evenRowBGC: 'rgba(0,0,0,0)',
|
||||||
header:['批次号','物料名称', '当前工序', '状态', '数量'],
|
header:['批次号','物料名称', '当前工序', '当前状态', '当前数量'],
|
||||||
data: []
|
data: []
|
||||||
},
|
},
|
||||||
config_middle_bottom:{
|
config_middle_bottom:{
|
||||||
|
|
@ -425,18 +435,11 @@ export default {
|
||||||
this.dayInterval = setInterval(() => {
|
this.dayInterval = setInterval(() => {
|
||||||
this.showTime();
|
this.showTime();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
that.$API.system.dept.list.req({name:that.deptName,page:0}).then((res) => {
|
|
||||||
if(res.length > 0){
|
|
||||||
that.deptId = res[0].id;
|
|
||||||
that.getMgroups();
|
that.getMgroups();
|
||||||
//设备列表:各个工段的设备列表
|
//设备列表:各个工段的设备列表
|
||||||
that.getEquipment();
|
that.getEquipment();
|
||||||
//每个人日生产量:个人绩效
|
//每个人日生产量:个人绩效
|
||||||
that.getEveryoneCount();
|
that.getEveryoneCount();
|
||||||
//车间库存
|
|
||||||
that.getInms();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
//车间整体产品统计
|
//车间整体产品统计
|
||||||
that.materialAll();
|
that.materialAll();
|
||||||
},
|
},
|
||||||
|
|
@ -515,10 +518,16 @@ export default {
|
||||||
//车间各工段生产产品数
|
//车间各工段生产产品数
|
||||||
getmgroupMaterial() {
|
getmgroupMaterial() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
let date = new Date();
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = date.getMonth() + 1;
|
||||||
|
month = month < 10 ? "0" + month : month;
|
||||||
|
let days = new Date(year, month, 0).getDate();
|
||||||
|
let start_date = year + "-" + month + "-01";
|
||||||
|
let end_date = year + "-" + month + "-" + days;
|
||||||
|
// let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
||||||
let params = {
|
let params = {
|
||||||
// query: {start_date:date,end_date:date,mgroup_name:item.name},
|
query: {start_date:start_date,end_date:end_date,dept_name:that.deptName},
|
||||||
query: {start_date:date,end_date:date,dept_name:that.deptName},
|
|
||||||
};
|
};
|
||||||
this.$API.bi.dataset.exec.req("mlog_okrate", params).then((res) => {
|
this.$API.bi.dataset.exec.req("mlog_okrate", params).then((res) => {
|
||||||
if(res.data2.ds0.length>0){
|
if(res.data2.ds0.length>0){
|
||||||
|
|
@ -537,8 +546,8 @@ export default {
|
||||||
getEquipment() {
|
getEquipment() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let params = {
|
let params = {
|
||||||
page: 0, belong_dept:that.deptId,
|
page: 0, belong_dept__name:that.deptName,
|
||||||
// query: " { id, name, number, model, state ,mgroup_name }"
|
query: " { id, name, number, model, state ,mgroup_name,running_state }"
|
||||||
};
|
};
|
||||||
that.config_middle_bottom.data = [];
|
that.config_middle_bottom.data = [];
|
||||||
that.$API.em.equipment.list.req(params).then((res) => {
|
that.$API.em.equipment.list.req(params).then((res) => {
|
||||||
|
|
@ -563,8 +572,8 @@ export default {
|
||||||
that.config_right_top.data = [];
|
that.config_right_top.data = [];
|
||||||
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
||||||
let params = {
|
let params = {
|
||||||
// query: {start_date:date,end_date:date,dept_name:that.deptName},
|
query: {start_date:date,end_date:date,dept_name:that.deptName},
|
||||||
query: {start_date:'2025-05-04',end_date:'2025-05-04',dept_name:that.deptName},
|
// query: {start_date:'2025-05-04',end_date:'2025-05-04',dept_name:that.deptName},
|
||||||
};
|
};
|
||||||
this.$API.bi.dataset.exec.req("performance", params).then((res) => {
|
this.$API.bi.dataset.exec.req("performance", params).then((res) => {
|
||||||
if(res.data2.ds0.length>0){
|
if(res.data2.ds0.length>0){
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
<header class="pageHeader">
|
<header class="pageHeader">
|
||||||
<div class="header_center_text">{{ bigScreenName }}</div>
|
<div class="header_center_text">{{ bigScreenName }}</div>
|
||||||
<div class="header_left">
|
<div class="header_left">
|
||||||
<span>{{ currentYear }}年{{ currentMonth }}月{{ currentDay }}日{{currentWeek}}</span>
|
<!-- <span>{{ currentYear }}年{{ currentMonth }}月{{ currentDay }}日{{currentWeek}}</span> -->
|
||||||
|
<span>{{ currentDate }}{{currentWeek}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="header_right">
|
<div class="header_right">
|
||||||
<span>{{ currentTime }}</span>
|
<span>{{ currentTime }}</span>
|
||||||
|
|
@ -40,7 +41,7 @@
|
||||||
<div style="display: flex;justify-content: space-around;">
|
<div style="display: flex;justify-content: space-around;">
|
||||||
<div class="block1NumberWrap">
|
<div class="block1NumberWrap">
|
||||||
<div class="block1Numberinner">
|
<div class="block1Numberinner">
|
||||||
<span class="block1Text">日产量</span>
|
<span class="block1Text">今日产量</span>
|
||||||
<span class="block1Number">{{ count_day }}</span>
|
<span class="block1Number">{{ count_day }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -48,7 +49,7 @@
|
||||||
<div style="display: flex;justify-content: space-around;">
|
<div style="display: flex;justify-content: space-around;">
|
||||||
<div class="block1NumberWrap">
|
<div class="block1NumberWrap">
|
||||||
<div class="block1Numberinner">
|
<div class="block1Numberinner">
|
||||||
<span class="block1Text">周产量</span>
|
<span class="block1Text">本周产量</span>
|
||||||
<span class="block1Number">{{ count_week }}</span>
|
<span class="block1Number">{{ count_week }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -56,7 +57,7 @@
|
||||||
<div style="display: flex;justify-content: space-around;">
|
<div style="display: flex;justify-content: space-around;">
|
||||||
<div class="block1NumberWrap">
|
<div class="block1NumberWrap">
|
||||||
<div class="block1Numberinner">
|
<div class="block1Numberinner">
|
||||||
<span class="block1Text">月产量</span>
|
<span class="block1Text">本月产量</span>
|
||||||
<span class="block1Number">{{ count_month }}</span>
|
<span class="block1Number">{{ count_month }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -535,10 +536,7 @@ export default {
|
||||||
let end_date = that.$TOOL.dateFormat(nowDate, 'yyyy-MM-dd');
|
let end_date = that.$TOOL.dateFormat(nowDate, 'yyyy-MM-dd');
|
||||||
that.start_date = start_date;
|
that.start_date = start_date;
|
||||||
that.end_date = end_date;
|
that.end_date = end_date;
|
||||||
console.log('that.start_date',that.start_date)
|
|
||||||
console.log('that.end_date',that.end_date)
|
|
||||||
this.bigScreenName = this.$TOOL.data.get("BASE_INFO").base.bigScreen_name;
|
this.bigScreenName = this.$TOOL.data.get("BASE_INFO").base.bigScreen_name;
|
||||||
console.log('this.bigScreenName',this.bigScreenName)
|
|
||||||
this.showTime();
|
this.showTime();
|
||||||
loadBabylon().then(()=>{
|
loadBabylon().then(()=>{
|
||||||
this.initView()
|
this.initView()
|
||||||
|
|
@ -617,6 +615,10 @@ export default {
|
||||||
that.getTaskNumber();
|
that.getTaskNumber();
|
||||||
that.getArticles();
|
that.getArticles();
|
||||||
that.getpurinrate();
|
that.getpurinrate();
|
||||||
|
let nowDate = new Date();
|
||||||
|
that.currentYear = nowDate.getFullYear();
|
||||||
|
that.currentMonth = nowDate.getMonth() + 1;
|
||||||
|
that.currentDay = nowDate.getDate();
|
||||||
}, 300000);
|
}, 300000);
|
||||||
},
|
},
|
||||||
//获取公告和视频
|
//获取公告和视频
|
||||||
|
|
@ -639,6 +641,7 @@ export default {
|
||||||
},
|
},
|
||||||
//时间
|
//时间
|
||||||
showTime() {
|
showTime() {
|
||||||
|
console.log(this.currentDate, this.currentWeek)
|
||||||
this.currentTime = this.$TOOL.dateFormat(new Date(), "hh:mm:ss");
|
this.currentTime = this.$TOOL.dateFormat(new Date(), "hh:mm:ss");
|
||||||
this.currentWeek = this.$TOOL.dateFormat(new Date(), "week");
|
this.currentWeek = this.$TOOL.dateFormat(new Date(), "week");
|
||||||
this.currentDate = this.$TOOL.dateFormat(new Date(),"yyyy年MM月dd日");
|
this.currentDate = this.$TOOL.dateFormat(new Date(),"yyyy年MM月dd日");
|
||||||
|
|
@ -703,11 +706,14 @@ export default {
|
||||||
let month = that.currentMonth>9?that.currentMonth:'0'+that.currentMonth;
|
let month = that.currentMonth>9?that.currentMonth:'0'+that.currentMonth;
|
||||||
let day = that.currentDay>9?that.currentDay:'0'+that.currentDay;
|
let day = that.currentDay>9?that.currentDay:'0'+that.currentDay;
|
||||||
let current_date = that.currentYear+'-'+month+'-'+day;
|
let current_date = that.currentYear+'-'+month+'-'+day;
|
||||||
let objDay = {query:{start_date:current_date,end_date:current_date,mgroup_name:'二次超洗'}};
|
let objDay = {query:{start_date:current_date,end_date:current_date,mgroup_name:'一次超洗'}};
|
||||||
that.$API.bi.dataset.exec.req('lineDay_m2', objDay).then((res0) => {
|
that.$API.bi.dataset.exec.req('lineDay_m2', objDay).then((res0) => {
|
||||||
if(res0.data2.ds0&&res0.data2.ds0.length>0){
|
if(res0.data2.ds0&&res0.data2.ds0.length>0){
|
||||||
that.count_day = res0.data2.ds0[0].生产数;
|
that.count_day = res0.data2.ds0[0].生产数;
|
||||||
|
}else{
|
||||||
|
that.count_day = 0;
|
||||||
}
|
}
|
||||||
|
console.log('that.count_day',that.count_day)
|
||||||
});
|
});
|
||||||
let ondDayTime = 86400000;
|
let ondDayTime = 86400000;
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
|
|
@ -717,26 +723,32 @@ export default {
|
||||||
let first = that.$TOOL.dateFormat2(new Date(nowDate.getTime() - (weekFirst * ondDayTime)));//本周周一
|
let first = that.$TOOL.dateFormat2(new Date(nowDate.getTime() - (weekFirst * ondDayTime)));//本周周一
|
||||||
let last = that.$TOOL.dateFormat2(new Date(nowDate.getTime() + (weekLast * ondDayTime)));//本周周日
|
let last = that.$TOOL.dateFormat2(new Date(nowDate.getTime() + (weekLast * ondDayTime)));//本周周日
|
||||||
let objWeek = {query:{
|
let objWeek = {query:{
|
||||||
start_date:first,end_date:last,mgroup_name:'二次超洗',
|
start_date:first,end_date:last,mgroup_name:'一次超洗',
|
||||||
group_bys_date:',月,周',order_bys_date:',月,周',
|
group_bys_date:',月,周',order_bys_date:',月,周',
|
||||||
select_cols_date:', EXTRACT ( MONTH FROM mlog.handle_date) AS 月,EXTRACT(WEEK FROM mlog.handle_date) AS 周'
|
select_cols_date:', EXTRACT ( MONTH FROM mlog.handle_date) AS 月,EXTRACT(WEEK FROM mlog.handle_date) AS 周'
|
||||||
}};
|
}};
|
||||||
that.$API.bi.dataset.exec.req('lineDay_m2', objWeek).then((res1) => {
|
that.$API.bi.dataset.exec.req('lineDay_m2', objWeek).then((res1) => {
|
||||||
if(res1.data2.ds0&&res1.data2.ds0.length>0){
|
if(res1.data2.ds0&&res1.data2.ds0.length>0){
|
||||||
that.count_week = res1.data2.ds0[0].生产数;
|
that.count_week = res1.data2.ds0[0].生产数;
|
||||||
|
}else{
|
||||||
|
that.count_week = 0;
|
||||||
}
|
}
|
||||||
|
console.log('that.count_week',that.count_week)
|
||||||
});
|
});
|
||||||
let start_month = that.currentYear+'-'+month+'-01';
|
let start_month = that.currentYear+'-'+month+'-01';
|
||||||
let end_month = that.currentYear+'-'+month+'-'+new Date(that.currentYear, month, 0).getDate();
|
let end_month = that.currentYear+'-'+month+'-'+new Date(that.currentYear, month, 0).getDate();
|
||||||
let objMonth = {query:{
|
let objMonth = {query:{
|
||||||
start_date:start_month,end_date:end_month,mgroup_name:'二次超洗',
|
start_date:start_month,end_date:end_month,mgroup_name:'一次超洗',
|
||||||
group_bys_date:',月',order_bys_date:',月',
|
group_bys_date:',月',order_bys_date:',月',
|
||||||
select_cols_date:', EXTRACT ( MONTH FROM mlog.handle_date) AS 月'
|
select_cols_date:', EXTRACT ( MONTH FROM mlog.handle_date) AS 月'
|
||||||
}};
|
}};
|
||||||
that.$API.bi.dataset.exec.req('lineDay_m2', objMonth).then((res2) => {
|
that.$API.bi.dataset.exec.req('lineDay_m2', objMonth).then((res2) => {
|
||||||
if(res2.data2.ds0&&res2.data2.ds0.length>0){
|
if(res2.data2.ds0&&res2.data2.ds0.length>0){
|
||||||
that.count_month = res2.data2.ds0[0].生产数;
|
that.count_month = res2.data2.ds0[0].生产数;
|
||||||
|
}else{
|
||||||
|
that.count_month = 0;
|
||||||
}
|
}
|
||||||
|
console.log('that.count_month',that.count_month)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//不合格分布
|
//不合格分布
|
||||||
|
|
|
||||||
|
|
@ -143,25 +143,23 @@
|
||||||
:apiObj="apiObjPrint"
|
:apiObj="apiObjPrint"
|
||||||
></print-dialog>
|
></print-dialog>
|
||||||
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
|
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
|
||||||
<degrad3
|
<scDegra
|
||||||
v-if="limitedWatch"
|
v-if="limitedWatch"
|
||||||
ref="degraDialogs"
|
ref="degraDialogs"
|
||||||
:nodes="nodes"
|
:nodes="nodes"
|
||||||
:edges="edges"
|
:edges="edges"
|
||||||
:rankdir="'LR'"
|
:rankdir="'LR'"
|
||||||
>
|
>
|
||||||
</degrad3>
|
</scDegra>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import degrad3 from "./../template/degraD3.vue";
|
|
||||||
import printDialog from "./../template/printmaterial.vue";
|
import printDialog from "./../template/printmaterial.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "halfgood",
|
name: "halfgood",
|
||||||
components: {
|
components: {
|
||||||
printDialog,
|
printDialog,
|
||||||
degrad3
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,27 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="add('do_out')"
|
@click="add('do_out')"
|
||||||
v-auth="'mio.do'"
|
v-auth="'mio.do'"
|
||||||
>生产领料</el-button
|
>生产领料</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="add('pur_in')"
|
@click="add('pur_in')"
|
||||||
v-auth="'mio.pur'"
|
v-auth="'mio.pur'"
|
||||||
>采购入库</el-button
|
>采购入库</el-button>
|
||||||
>
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="add('borrow_out')"
|
||||||
|
v-auth="'mio.pur'"
|
||||||
|
>领用出库</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="add('return_in')"
|
||||||
|
v-auth="'mio.pur'"
|
||||||
|
>退还入库</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="add('pur_out')"
|
||||||
|
v-auth="'mio.pur'"
|
||||||
|
>采购退货</el-button>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.type"
|
v-model="query.type"
|
||||||
clearable
|
clearable
|
||||||
|
|
@ -177,15 +190,24 @@ export default {
|
||||||
typeDict: {
|
typeDict: {
|
||||||
pur_in: "采购入库",
|
pur_in: "采购入库",
|
||||||
do_out: "领料出库",
|
do_out: "领料出库",
|
||||||
|
pur_out: "退货",
|
||||||
|
borrow_out: "领用出库",
|
||||||
|
return_in: "退还入库",
|
||||||
},
|
},
|
||||||
cateOptions: [{ id: "pur_in", name: "采购入库" }, { id: "do_out", name: "领料出库" }],
|
cateOptions: [
|
||||||
|
{ id: "pur_in", name: "采购入库" },
|
||||||
|
{ id: "do_out", name: "领料出库" },
|
||||||
|
{ id: "borrow_out", name: "领用出库" },
|
||||||
|
{ id: "return_in", name: "退还入库" },
|
||||||
|
{ id: "other_out", name: "退货"},
|
||||||
|
],
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
record: false,
|
record: false,
|
||||||
},
|
},
|
||||||
query: {},
|
query: {},
|
||||||
params: {
|
params: {
|
||||||
type__in: "pur_in,do_out",
|
type__in: "pur_in,pur_out,do_out,other_out,borrow_out,return_in",
|
||||||
materials__type__in: "40, 50, 60, 70",
|
materials__type__in: "40, 50, 60, 70",
|
||||||
},
|
},
|
||||||
form: {},
|
form: {},
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,11 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="编号">
|
<el-form-item label="编号">
|
||||||
<el-input v-model="form.number" placeholder="编号" />
|
<el-input v-model="form.number" disabled placeholder="编号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="出入库日期">
|
<el-form-item label="出入库日期" prop="inout_date">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.inout_date"
|
v-model="form.inout_date"
|
||||||
type="date"
|
type="date"
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24" v-if="urlCode == 'helpso_in'">
|
<!-- <el-col :md="12" :sm="24" v-if="urlCode == 'helpso_in'">
|
||||||
<el-form-item label="供应商">
|
<el-form-item label="供应商">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.supplier"
|
v-model="form.supplier"
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :md="12" :sm="24" v-if="urlCode == 'helpso_out'">
|
<el-col :md="12" :sm="24" v-if="urlCode == 'helpso_out'">
|
||||||
<el-form-item label="执行部门">
|
<el-form-item label="执行部门">
|
||||||
<el-select
|
<el-select
|
||||||
|
|
@ -134,7 +134,7 @@
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="table_add"
|
@click="table_add"
|
||||||
v-if="params.mio!==null"
|
v-if="params.mio!==null"
|
||||||
style="position: absolute;right: 20px;top: 10px"
|
style="position: absolute;left: 120px;top: 10px"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
<div style="height: 8px"></div>
|
<div style="height: 8px"></div>
|
||||||
<scTable
|
<scTable
|
||||||
|
|
@ -160,12 +160,18 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="仓库" prop="warehouse_name">
|
<el-table-column label="仓库" prop="warehouse_name">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="单位" prop="material_unit">
|
||||||
|
<template #default="scope">{{scope.row.material_.unit}}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="数量">
|
<el-table-column label="数量">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.material_&&scope.row.material_.tracking==10">{{scope.row.count}}</span>
|
<span v-if="scope.row.material_&&scope.row.material_.tracking==10">{{scope.row.count}}</span>
|
||||||
<el-link v-else :underline="false" type="primary" @click="showWpr(scope.row)">{{scope.row.count}}</el-link>
|
<el-link v-else :underline="false" type="primary" @click="showWpr(scope.row)">{{scope.row.count}}</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="出/入库单位">
|
||||||
|
<template #default="scope">{{scope.row.note}}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="create_time"
|
prop="create_time"
|
||||||
|
|
@ -248,6 +254,11 @@ export default {
|
||||||
urlCode: "helpso_in",
|
urlCode: "helpso_in",
|
||||||
cate: "helpso",
|
cate: "helpso",
|
||||||
type: "",
|
type: "",
|
||||||
|
rules: {
|
||||||
|
inout_date: [
|
||||||
|
{ required: true, message: "请选择出入库日期", trigger: "blur" },
|
||||||
|
],
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -258,7 +269,7 @@ export default {
|
||||||
that.getSupplierOptions();
|
that.getSupplierOptions();
|
||||||
that.urlCode = window.location.hash.split('/')[2];
|
that.urlCode = window.location.hash.split('/')[2];
|
||||||
if (that.urlCode == "helpso_out") {
|
if (that.urlCode == "helpso_out") {
|
||||||
that.form.type = "do_out";
|
that.form.type = "borrow_out";
|
||||||
}else{
|
}else{
|
||||||
that.form.type = "pur_in";
|
that.form.type = "pur_in";
|
||||||
}
|
}
|
||||||
|
|
@ -314,6 +325,7 @@ export default {
|
||||||
that.mioSaveing = false;
|
that.mioSaveing = false;
|
||||||
that.mioId = res.id;
|
that.mioId = res.id;
|
||||||
that.params.mio = res.id;
|
that.params.mio = res.id;
|
||||||
|
that.form = res;
|
||||||
that.apiObj = that.$API.inm.mioitem.list;
|
that.apiObj = that.$API.inm.mioitem.list;
|
||||||
that.$API.inm.mio.item.req(res.id).then((res1) => {
|
that.$API.inm.mio.item.req(res.id).then((res1) => {
|
||||||
that.mioObj = res1;
|
that.mioObj = res1;
|
||||||
|
|
@ -329,7 +341,8 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.saveDialog.open("add", that.form.type);
|
console.log('that.form', that.form);
|
||||||
|
this.$refs.saveDialog.open("add", that.form.type,40);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//编辑
|
//编辑
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="仓库位号" prop="bin_number_main">
|
<el-table-column label="仓库位号" prop="bin_number_main">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="总库存" prop="count">
|
<el-table-column label="类型" prop="cate">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="安全库存" prop="count_safe">
|
<el-table-column label="安全库存" prop="count_safe">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="供应商"
|
label="供应商"
|
||||||
v-if="form.type == 'other_in' || form.type == 'pur_in'"
|
v-if="form.type == 'other_in' || form.type == 'pur_in'||form.type == 'pur_out'"
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.supplier"
|
v-model="form.supplier"
|
||||||
|
|
@ -95,8 +95,27 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="执行部门"
|
label="操作工段"
|
||||||
v-if="form.type == 'do_in' || form.type == 'do_out'"
|
v-if="form.type == 'do_in' || form.type == 'do_out'|| form.type == 'borrow_out' || form.type == 'return_in'"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="form.mgroup"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="为空时代表领料/入库到车间"
|
||||||
|
@change="mgroupChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in mgroupOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="操作部门"
|
||||||
|
v-if="form.type == 'do_in' || form.type == 'do_out' || form.type == 'borrow_out' || form.type == 'return_in'"
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.belong_dept"
|
v-model="form.belong_dept"
|
||||||
|
|
@ -112,27 +131,10 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
|
||||||
label="工段"
|
|
||||||
v-if="form.type == 'do_in' || form.type == 'do_out'"
|
|
||||||
>
|
|
||||||
<el-select
|
|
||||||
v-model="form.mgroup"
|
|
||||||
clearable
|
|
||||||
style="width: 100%"
|
|
||||||
placeholder="为空时代表领料/入库到车间"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in mgroupOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="部门执行人"
|
label="部门执行人"
|
||||||
v-if="form.type == 'do_in' || form.type == 'do_out'"
|
v-if="form.type == 'do_in' || form.type == 'do_out'|| form.type == 'borrow_out' || form.type == 'return_in'"
|
||||||
>
|
>
|
||||||
<el-select v-model="form.do_user" clearable style="width: 100%">
|
<el-select v-model="form.do_user" clearable style="width: 100%">
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -185,9 +187,12 @@ export default {
|
||||||
do_out: "生产领料",
|
do_out: "生产领料",
|
||||||
sale_out: "销售发货",
|
sale_out: "销售发货",
|
||||||
pur_in: "采购入库",
|
pur_in: "采购入库",
|
||||||
|
pur_out: "退货",
|
||||||
do_in: "生产入库",
|
do_in: "生产入库",
|
||||||
other_in: "其他入库",
|
other_in: "其他入库",
|
||||||
other_out: "其他出库",
|
other_out: "其他出库",
|
||||||
|
borrow_out: "领用出库",
|
||||||
|
return_in: "退还入库",
|
||||||
},
|
},
|
||||||
form: {},
|
form: {},
|
||||||
rules: {
|
rules: {
|
||||||
|
|
@ -226,7 +231,7 @@ export default {
|
||||||
} else if (type == "sale_out") {
|
} else if (type == "sale_out") {
|
||||||
this.getOrderOptions();
|
this.getOrderOptions();
|
||||||
this.getCustomerOptions();
|
this.getCustomerOptions();
|
||||||
} else if (type == "do_in" || type == "do_out") {
|
} else if (type == "do_in" || type == "do_out" || type == "borrow_out" || type == "return_in") {
|
||||||
this.getDeptOptions();
|
this.getDeptOptions();
|
||||||
this.getmgroupOptions();
|
this.getmgroupOptions();
|
||||||
this.getgetDeptUsers();
|
this.getgetDeptUsers();
|
||||||
|
|
@ -236,6 +241,14 @@ export default {
|
||||||
this.getCustomerOptions();
|
this.getCustomerOptions();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mgroupChange(){
|
||||||
|
let that = this;
|
||||||
|
that.mgroupOptions.forEach(item=>{
|
||||||
|
if(item.id == that.form.mgroup){
|
||||||
|
this.form.belong_dept = item.belong_dept;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getmgroupOptions() {
|
getmgroupOptions() {
|
||||||
this.$API.mtm.mgroup.list.req({page: 0}).then(res=>{
|
this.$API.mtm.mgroup.list.req({page: 0}).then(res=>{
|
||||||
this.mgroupOptions = res;
|
this.mgroupOptions = res;
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="组合件信息"
|
label="组合件信息"
|
||||||
v-if="cate == 'good'"
|
v-if="cate == 'good'&&project_code=='gzerp'"
|
||||||
width="300"
|
width="300"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -230,6 +230,7 @@
|
||||||
:belongDeptId="belongDeptId"
|
:belongDeptId="belongDeptId"
|
||||||
:belongDeptName="mioObj.belong_dept_name"
|
:belongDeptName="mioObj.belong_dept_name"
|
||||||
:mioObj="mioObj"
|
:mioObj="mioObj"
|
||||||
|
:tableDatas="tableDatas"
|
||||||
:cate="cate"
|
:cate="cate"
|
||||||
@success="handleSaveSuccess"
|
@success="handleSaveSuccess"
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
|
|
@ -256,6 +257,7 @@
|
||||||
<template #default>
|
<template #default>
|
||||||
<scTable ref="wprTable" hidePagination :data="wprList">
|
<scTable ref="wprTable" hidePagination :data="wprList">
|
||||||
<el-table-column label="产品编号" prop="number" min-width="100px"></el-table-column>
|
<el-table-column label="产品编号" prop="number" min-width="100px"></el-table-column>
|
||||||
|
<el-table-column v-if="project_code=='bxerp'&&mioObj.type == 'sale_out'" label="发货编号" prop="number_out" min-width="100px"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
|
|
@ -327,6 +329,7 @@ export default {
|
||||||
wprList:[],
|
wprList:[],
|
||||||
selection: [],
|
selection: [],
|
||||||
tableData:[],
|
tableData:[],
|
||||||
|
tableDatas:[],
|
||||||
stateDict: {
|
stateDict: {
|
||||||
10: "创建中",
|
10: "创建中",
|
||||||
20: "已提交",
|
20: "已提交",
|
||||||
|
|
@ -386,7 +389,17 @@ export default {
|
||||||
//添加
|
//添加
|
||||||
table_add() {
|
table_add() {
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log(this.mioType);
|
console.log(this.$refs.table);
|
||||||
|
console.log(this.$refs.table.tableData);
|
||||||
|
let tableData = this.$refs.table.tableData;
|
||||||
|
let datas = [];
|
||||||
|
tableData.forEach(item => {
|
||||||
|
let obj = {};
|
||||||
|
obj.batch = item.batch;
|
||||||
|
obj.count = Number(item.count);
|
||||||
|
datas.push(obj);
|
||||||
|
});
|
||||||
|
that.tableDatas = datas;
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.saveDialog.open("add", that.mioType);
|
this.$refs.saveDialog.open("add", that.mioType);
|
||||||
|
|
|
||||||
|
|
@ -1390,21 +1390,9 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let ftestdefects = [],ftestitems = [];
|
let ftestdefects = [],ftestitems = [];
|
||||||
let obj = {};
|
let obj = {};
|
||||||
if(row.ftest!==null){
|
|
||||||
ftestdefects = row.ftest.ftestdefects;
|
|
||||||
ftestdefects.forEach((item) => {
|
|
||||||
item.test_user = that.formbw.test_user;
|
|
||||||
item.test_date = that.formbw.test_date;
|
|
||||||
item.has = row[item.defect_name]?row[item.defect_name]:false;
|
|
||||||
})
|
|
||||||
ftestitems = row.ftest.ftestitems;
|
|
||||||
ftestitems.forEach((item1) => {
|
|
||||||
item1.test_user = that.formbw.test_user;
|
|
||||||
item1.test_date = that.formbw.test_date;
|
|
||||||
item1.test_val_json = row[item1.testitem_name]?row[item1.testitem_name]:null;
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
that.qct_testitems.forEach((item) => {
|
that.qct_testitems.forEach((item) => {
|
||||||
|
console.log('row[item.testitem_name]',row[item.testitem_name]);
|
||||||
|
if(row[item.testitem_name]!==''&&row[item.testitem_name]!==null){
|
||||||
let obj0 = {};
|
let obj0 = {};
|
||||||
obj0.testitem = item.testitem;
|
obj0.testitem = item.testitem;
|
||||||
obj0.test_user = that.formbw.test_user;
|
obj0.test_user = that.formbw.test_user;
|
||||||
|
|
@ -1412,8 +1400,10 @@ export default {
|
||||||
obj0.testitem_name = item.testitem_name;
|
obj0.testitem_name = item.testitem_name;
|
||||||
obj0.test_val_json = row[item.testitem_name]?row[item.testitem_name]:null;
|
obj0.test_val_json = row[item.testitem_name]?row[item.testitem_name]:null;
|
||||||
ftestitems.push(obj0);
|
ftestitems.push(obj0);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
that.qct_defects.forEach((item1) => {
|
that.qct_defects.forEach((item1) => {
|
||||||
|
if(row[item1.defect_name]!==''&&row[item1.defect_name]!==null){
|
||||||
let obj1 = {};
|
let obj1 = {};
|
||||||
obj1.defect = item1.defect;
|
obj1.defect = item1.defect;
|
||||||
obj1.test_user = that.formbw.test_user;
|
obj1.test_user = that.formbw.test_user;
|
||||||
|
|
@ -1421,8 +1411,8 @@ export default {
|
||||||
obj1.test_date = that.formbw.test_date;
|
obj1.test_date = that.formbw.test_date;
|
||||||
obj1.has = row[item1.defect_name]?row[item1.defect_name]:false;
|
obj1.has = row[item1.defect_name]?row[item1.defect_name]:false;
|
||||||
ftestdefects.push(obj1);
|
ftestdefects.push(obj1);
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
obj.note = row.note;
|
obj.note = row.note;
|
||||||
obj.number = row.number;
|
obj.number = row.number;
|
||||||
obj.mioitem = row.mioitem;
|
obj.mioitem = row.mioitem;
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-if="form.type == 'pur_in'||form.type == 'other_in'||form.type == 'do_out'||form.type=='sale_out'">
|
<el-col v-if="form.type == 'pur_in'||form.type == 'pur_out'||form.type == 'other_in'||form.type == 'do_out'||form.type=='sale_out'||form.type=='other_out'||form.type=='pur_out'||form.type=='borrow_out'">
|
||||||
<el-form-item label="仓库已有批次">
|
<el-form-item label="仓库已有批次">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="selectBatch"
|
v-model="selectBatch"
|
||||||
|
|
@ -125,7 +125,18 @@
|
||||||
v-model="form.count"
|
v-model="form.count"
|
||||||
:min="1"
|
:min="1"
|
||||||
:precision="3"
|
:precision="3"
|
||||||
:disabled="form.type == 'do_out'"
|
style="width: 100%"
|
||||||
|
@change="countChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" v-if="mTracking==20&&form.type == 'sale_out'&&project_code=='bxerp'">
|
||||||
|
<el-form-item label="数量">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count"
|
||||||
|
:min="0"
|
||||||
|
:precision="3"
|
||||||
|
:max="batchcount"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="countChange"
|
@change="countChange"
|
||||||
/>
|
/>
|
||||||
|
|
@ -136,16 +147,40 @@
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.count"
|
v-model="form.count"
|
||||||
:min="1"
|
:min="1"
|
||||||
|
:disabled="form.type == 'do_out'"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" v-if="mtype==40&&project_code=='gx'">
|
||||||
|
<el-form-item label="物料单位">
|
||||||
|
<el-input v-model="form.unit" disabled placeholder="物料单位"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" v-if="mtype==40&&project_code=='gx'">
|
||||||
|
<el-form-item label="出库单位">
|
||||||
|
<el-input v-model="form.note" placeholder="出库单位"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" v-if="form.type == 'sale_out'&&project_code=='bxerp'">
|
||||||
|
<el-form-item label="编号前缀">
|
||||||
|
<el-input v-model="prefix" placeholder="编号前缀"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-button v-if="form.type == 'sale_out'&&project_code=='bxerp'" type="primary" @click="getNumber">获取编号</el-button>
|
||||||
|
<el-col :md="12" :sm="24" v-if="digitNum!==null">
|
||||||
|
<el-form-item label="流水位数">
|
||||||
|
<el-input-number controls-position="right" precision="0" @change="digitChange" v-model="digitNum"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row v-if="mTracking==20&&form.count>1&&(form.type == 'pur_in'||form.type == 'other_in')">
|
<el-row v-if="mTracking==20&&form.count>0&&(form.type == 'pur_in'||form.type == 'other_in'||(form.type == 'sale_out'&&project_code=='bxerp'))">
|
||||||
<el-col :md="12" :sm="24" v-for="i in form.count" :key="i">
|
<el-col :md="12" :sm="24" v-for="i in form.count" :key="i">
|
||||||
<el-form-item :label="'编号'+i" required>
|
<el-form-item :label="'编号'+i" required>
|
||||||
<!-- <el-input-number v-if="i==1" v-model="mioitems[0]" @change="firstNumberChange" placeholder="请输入编号" controls-position="right" style="width:100%"/> -->
|
<template v-if="form.type == 'sale_out'&&project_code=='bxerp'">
|
||||||
<el-input v-model="mioitems[i-1]" placeholder="请输入编号" :disabled="cate == 'mainso'" />
|
<el-input v-model="mioitems[i-1]" placeholder="请输入编号" disabled />
|
||||||
|
</template>
|
||||||
|
<el-input v-else v-model="mioitems[i-1]" placeholder="请输入编号" :disabled="cate == 'mainso'" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -200,6 +235,17 @@
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button @click="visible = false">取消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog title="设置发货流水位数" v-model="showDigit">
|
||||||
|
<h4>没有找到该前缀的发货编号,请完善发货流水号位数(填整数)</h4>
|
||||||
|
<el-form :model="wprParams" label-width="80px">
|
||||||
|
<el-form-item label="流水位数">
|
||||||
|
<el-input-number controls-position="right" precision="0" v-model="digitNum"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="digitSure">确定</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
|
|
@ -216,6 +262,7 @@ export default {
|
||||||
belongDeptId: { type: String, default: null },
|
belongDeptId: { type: String, default: null },
|
||||||
mgroup: { type: String, default: null },
|
mgroup: { type: String, default: null },
|
||||||
mioObj: { type: Object },
|
mioObj: { type: Object },
|
||||||
|
tableDatas: { type: Array ,default:function(){return []}},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -230,7 +277,7 @@ export default {
|
||||||
other_in: "其他入库",
|
other_in: "其他入库",
|
||||||
other_out: "其他出库",
|
other_out: "其他出库",
|
||||||
},
|
},
|
||||||
form: {count: 1,},
|
form: {count: 1,note: ''},
|
||||||
rules: {
|
rules: {
|
||||||
batch:[
|
batch:[
|
||||||
{
|
{
|
||||||
|
|
@ -255,6 +302,7 @@ export default {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
selectObj:{},
|
selectObj:{},
|
||||||
|
showDigit:false,
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
materialOptions: [],
|
materialOptions: [],
|
||||||
|
|
@ -270,7 +318,12 @@ export default {
|
||||||
wbatchOptions: [],
|
wbatchOptions: [],
|
||||||
mioitems:[''],
|
mioitems:[''],
|
||||||
mioitemw:[],
|
mioitemw:[],
|
||||||
|
wprList:[],
|
||||||
|
prefix:'',
|
||||||
project_code:'',
|
project_code:'',
|
||||||
|
digitNum:null,
|
||||||
|
mtype:null,
|
||||||
|
batchcount:null,
|
||||||
mTracking:10,
|
mTracking:10,
|
||||||
apiObj:this.$API.mtm.material.list,
|
apiObj:this.$API.mtm.material.list,
|
||||||
};
|
};
|
||||||
|
|
@ -287,6 +340,7 @@ export default {
|
||||||
this.getMaterialOptions();
|
this.getMaterialOptions();
|
||||||
this.getWarehouseOptions();
|
this.getWarehouseOptions();
|
||||||
},
|
},
|
||||||
|
|
||||||
getWarehouseOptions() {
|
getWarehouseOptions() {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$API.inm.warehouse.list.req({ page: 0 }).then((res) => {
|
this.$API.inm.warehouse.list.req({ page: 0 }).then((res) => {
|
||||||
|
|
@ -303,11 +357,18 @@ export default {
|
||||||
//获取车间物料批次号
|
//获取车间物料批次号
|
||||||
getWBatchs() {
|
getWBatchs() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
let params = {material: this.form.material,page: 0};
|
||||||
if (this.mgroup != null) {
|
if (this.mgroup != null) {
|
||||||
this.$API.wpm.wmaterial.list.req({mgroup: this.mgroup,material: this.form.material,state:10,page: 0}).then((res) => {
|
params.mgroup= this.mgroup;
|
||||||
|
if(that.type=='do_in'){
|
||||||
|
params.state = 10;
|
||||||
|
}
|
||||||
|
}else if (this.mioObj.belong_dept != null){
|
||||||
|
params.belong_dept = this.mioObj.belong_dept;
|
||||||
|
}
|
||||||
|
this.$API.wpm.wmaterial.list.req(params).then((res) => {
|
||||||
this.wbatchOptions = res;
|
this.wbatchOptions = res;
|
||||||
});
|
});
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getMaterialOptions() {
|
getMaterialOptions() {
|
||||||
var type = this.form.type;
|
var type = this.form.type;
|
||||||
|
|
@ -363,9 +424,22 @@ export default {
|
||||||
orderitem_material__order: this.mioObj.order,
|
orderitem_material__order: this.mioObj.order,
|
||||||
};
|
};
|
||||||
this.inputBatchDisable = true;
|
this.inputBatchDisable = true;
|
||||||
} else {
|
} else if (type == "other_out") {
|
||||||
|
this.inputBatchDisable = true;
|
||||||
|
} else if (type == "pur_out"||type == "borrow_out"||type == "return_in") {
|
||||||
|
query = {
|
||||||
|
page: 0,
|
||||||
|
type__in: 40,
|
||||||
|
is_hidden: false,
|
||||||
|
orderitem_material__order: this.mioObj.order?this.mioObj.order:null,
|
||||||
|
};
|
||||||
|
this.inputBatchDisable = true;
|
||||||
|
}else {
|
||||||
query = { page: 0 ,is_hidden:false};
|
query = { page: 0 ,is_hidden:false};
|
||||||
}
|
}
|
||||||
|
if(type == "return_in"){
|
||||||
|
this.inputBatchDisable = false;
|
||||||
|
}
|
||||||
this.query = query;
|
this.query = query;
|
||||||
this.apiObj=this.$API.mtm.material.list;
|
this.apiObj=this.$API.mtm.material.list;
|
||||||
// this.$API.mtm.material.list.req(query).then((res) => {
|
// this.$API.mtm.material.list.req(query).then((res) => {
|
||||||
|
|
@ -419,10 +493,12 @@ export default {
|
||||||
},
|
},
|
||||||
selectMaterialChange() {
|
selectMaterialChange() {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
console.log('that.selectObj',that.selectObj);
|
||||||
var type = this.form.type;
|
var type = this.form.type;
|
||||||
that.form.material = that.selectObj.id;
|
that.form.material = that.selectObj.id;
|
||||||
|
that.form.unit = that.selectObj.unit;
|
||||||
that.form.unit_price = that.selectObj.unit_price;
|
that.form.unit_price = that.selectObj.unit_price;
|
||||||
that.form.batch = that.cate=='helpso'?that.selectObj.bin_number_main:that.selectObj.batch;
|
that.form.batch = that.cate=='helpso'?that.selectObj.bin_number_main:'';
|
||||||
that.mTracking = that.selectObj.tracking;
|
that.mTracking = that.selectObj.tracking;
|
||||||
if (type == "do_in") {
|
if (type == "do_in") {
|
||||||
if (that.selectObj.is_assemb) {
|
if (that.selectObj.is_assemb) {
|
||||||
|
|
@ -445,12 +521,19 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectBatchChange(item) {
|
selectBatchChange(item) {
|
||||||
this.form.batch = item.batch;
|
let that = this;
|
||||||
this.form.mb = item.id;
|
if(item){
|
||||||
this.form.count = Number(item.count);
|
that.$API.wpm.wpr.list.req({ page: 0, mb: item.id }).then((res) => {
|
||||||
this.form.warehouse = item.warehouse;
|
that.wprList = res;
|
||||||
// this.warehouseDisable = true;
|
})
|
||||||
this.inputBatchDisable = true;
|
// that.getnumberOutLast();
|
||||||
|
that.form.batch = item.batch;
|
||||||
|
that.form.mb = item.id;
|
||||||
|
that.batchcount = Number(item.count);
|
||||||
|
that.form.count = Number(item.count);
|
||||||
|
that.form.warehouse = item.warehouse;
|
||||||
|
that.inputBatchDisable = true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
selectBatchClear() {
|
selectBatchClear() {
|
||||||
this.form.mb = "";
|
this.form.mb = "";
|
||||||
|
|
@ -462,8 +545,9 @@ export default {
|
||||||
this.inputBatchDisable = false;
|
this.inputBatchDisable = false;
|
||||||
},
|
},
|
||||||
//显示
|
//显示
|
||||||
open(mode = "add", type = "") {
|
open(mode = "add", type = "",mtype) {
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
|
this.mtype = mtype?mtype:null;
|
||||||
this.form.type = this.type = type;
|
this.form.type = this.type = type;
|
||||||
if (mode == "add") {
|
if (mode == "add") {
|
||||||
this.init();
|
this.init();
|
||||||
|
|
@ -496,12 +580,80 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.mioitemw = [];
|
that.mioitemw = [];
|
||||||
let numbers = that.mioitems[0];
|
let numbers = that.mioitems[0];
|
||||||
|
if(that.type== 'sale_out'){
|
||||||
|
let num = numbers.slice(-3)
|
||||||
|
let str = numbers.slice(0,-3)
|
||||||
|
console.log(str,num)
|
||||||
|
for(let i=0;i<that.form.count;i++){
|
||||||
|
let numb = Number(num)+i;
|
||||||
|
that.mioitems[i] =str + numb;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
for(let i=0;i<that.form.count;i++){
|
for(let i=0;i<that.form.count;i++){
|
||||||
that.mioitems[i] = Number(numbers)+i;
|
that.mioitems[i] = Number(numbers)+i;
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.number = that.form.batch+'-'+(i+1);
|
obj.number = that.form.batch+'-'+(i+1);
|
||||||
that.mioitemw.push(obj);
|
that.mioitemw.push(obj);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getnumberOutLast(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.wpm.wpr.numberOutLast.req({prefix:that.prefix}).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//没有找到前缀的发货编号,从1开始编号时
|
||||||
|
digitSure(){
|
||||||
|
let that = this;
|
||||||
|
that.showDigit = false;
|
||||||
|
//根据前缀和流水位数获取编号
|
||||||
|
for(let i=0;i<that.form.count;i++){
|
||||||
|
let numb = i+1,str = '';
|
||||||
|
numb+= '';
|
||||||
|
let len = numb.length;
|
||||||
|
for(let j=0;j<that.digitNum-len;j++){
|
||||||
|
str+='0';
|
||||||
|
}
|
||||||
|
that.mioitems[i] =that.prefix + str + numb;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//流水位数变化后重新获取编号
|
||||||
|
digitChange(){
|
||||||
|
let that = this;
|
||||||
|
that.mioitems = [];
|
||||||
|
console.log('that.digitNum',that.digitNum)
|
||||||
|
that.digitSure();
|
||||||
|
},
|
||||||
|
|
||||||
|
getNumber(){
|
||||||
|
let that = this;
|
||||||
|
that.mioitemw = [];
|
||||||
|
let params0 = {};
|
||||||
|
params0.prefix = that.prefix;
|
||||||
|
that.$API.wpm.wpr.numberOutLast.req(params0).then((res) => {
|
||||||
|
let numbers = '';
|
||||||
|
if(res.number_out_last==null){//没有该前缀的发货编号
|
||||||
|
that.number_out_last = null;
|
||||||
|
that.showDigit = true;
|
||||||
|
}else{//有该前缀的发货编号
|
||||||
|
numbers = res.number_out_last;
|
||||||
|
let str = numbers.replace(/[^a-zA-Z]/g, ''); // 提取字母
|
||||||
|
let num = numbers.replace(/[^0-9]/g, ''); // 提取数字
|
||||||
|
let length = num.length;//流水号的长度
|
||||||
|
for(let i=0;i<that.form.count;i++){
|
||||||
|
let numb = Number(num)+i+1;
|
||||||
|
let numbs = numb+'';
|
||||||
|
let len = numbs.length;
|
||||||
|
let zoreStr = '';
|
||||||
|
for(let j=0;j<length-len;j++){
|
||||||
|
zoreStr+='0';
|
||||||
|
}
|
||||||
|
that.mioitems[i] =str + zoreStr + numb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
},
|
},
|
||||||
validateInput(i){
|
validateInput(i){
|
||||||
this.mioitems[i] = this.mioitems[i].replace(/\D/g, '');
|
this.mioitems[i] = this.mioitems[i].replace(/\D/g, '');
|
||||||
|
|
@ -533,6 +685,25 @@ export default {
|
||||||
that.$message.error("请输入正确数量的编号")
|
that.$message.error("请输入正确数量的编号")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}else if(that.form.type == 'sale_out'&&that.project_code=='bxerp'){
|
||||||
|
let count = 0;
|
||||||
|
if(that.tableDatas.length>0){
|
||||||
|
that.tableDatas.forEach((item) => {
|
||||||
|
if(item.batch==that.form.batch){
|
||||||
|
count += item.count;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
let mioitemw = [];
|
||||||
|
that.mioitems.forEach((item,index) => {
|
||||||
|
let index0 = count+index;
|
||||||
|
mioitemw[index]={
|
||||||
|
number: that.wprList[index0]? that.wprList[index0].number:'' ,
|
||||||
|
number_out : item,
|
||||||
|
wpr:that.wprList[index0]? that.wprList[index0].id:null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
that.form.mioitemw = mioitemw.filter(item=>item.wpr!==null);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res;
|
let res;
|
||||||
|
|
|
||||||
|
|
@ -32,74 +32,114 @@
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main style="padding: 0;">
|
<el-main style="padding: 0;">
|
||||||
<scTable
|
<el-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:apiObj="apiObj"
|
:data="tableData"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
:params="params"
|
border
|
||||||
:query="query"
|
style="height: 100%;"
|
||||||
:summary-method="getSummaries"
|
:summary-method="getSummaries"
|
||||||
show-summary
|
show-summary
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="日期" prop="inout_date">
|
<el-table-column label="日期" prop="inout_date" sortable>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="物料编号" show-overflow-tooltip>
|
<el-table-column label="物料编号" show-overflow-tooltip min-width="80"
|
||||||
|
:filters="nameFilters1"
|
||||||
|
:filter-method="filterName1"
|
||||||
|
filter-placement="bottom-end">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.material_">{{ scope.row.material_.number }}</span>
|
<span v-if="scope.row.material_">{{ scope.row.material_.number }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="名称" show-overflow-tooltip>
|
<el-table-column label="名称" show-overflow-tooltip min-width="80"
|
||||||
|
:filters="nameFilters2"
|
||||||
|
:filter-method="filterName2"
|
||||||
|
filter-placement="bottom-end">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.material_">{{ scope.row.material_.name }}</span>
|
<span v-if="scope.row.material_">{{ scope.row.material_.name }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="货位号">
|
<el-table-column label="货位号"
|
||||||
|
:filters="nameFilters3"
|
||||||
|
:filter-method="filterName3"
|
||||||
|
filter-placement="bottom-end">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.material_">{{ scope.row.material_.bin_number_main }}</span>
|
<span v-if="scope.row.material_">{{ scope.row.material_.bin_number_main }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="规格" prop="batch">
|
<el-table-column label="规格"
|
||||||
|
:filters="nameFilters4"
|
||||||
|
:filter-method="filterName4"
|
||||||
|
filter-placement="bottom-end">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.material_">{{ scope.row.material_.specification }}</span>
|
<span v-if="scope.row.material_">{{ scope.row.material_.specification }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="品牌型号" prop="batch">
|
<el-table-column label="品牌型号"
|
||||||
|
:filters="nameFilters5"
|
||||||
|
:filter-method="filterName5"
|
||||||
|
filter-placement="bottom-end">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.material_">{{ scope.row.material_.model }}</span>
|
<span v-if="scope.row.material_">{{ scope.row.material_.model }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单位" prop="batch">
|
<el-table-column label="单位" prop="batch"
|
||||||
|
:filters="nameFilters6"
|
||||||
|
:filter-method="filterName6"
|
||||||
|
filter-placement="bottom-end">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.material_">{{ scope.row.material_.unit }}</span>
|
<span v-if="scope.row.material_">{{ scope.row.material_.unit }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="入库数量" prop="count">
|
<el-table-column label="入库数量" prop="count" sortable>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单价" prop="unit_price">
|
<el-table-column label="单价" prop="unit_price" sortable>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="总金额" prop="price">
|
<el-table-column label="总金额" prop="price" sortable>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="入库人">
|
<el-table-column label="入库人"
|
||||||
|
:filters="nameFilters7"
|
||||||
|
:filter-method="filterName7"
|
||||||
|
filter-placement="bottom-end">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.mio_">{{ scope.row.mio_.submit_user_name }}</span>
|
<span v-if="scope.row.mio_">{{ scope.row.mio_.submit_user_name }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="入库凭证号">
|
<el-table-column label="入库凭证号"
|
||||||
|
:filters="nameFilters8"
|
||||||
|
:filter-method="filterName8"
|
||||||
|
filter-placement="bottom-end">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.mio_">{{ scope.row.mio_.number }}</span>
|
<span v-if="scope.row.mio_">{{ scope.row.mio_.number }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="类别" prop="type">
|
<el-table-column label="类别" prop="type"
|
||||||
|
:filters="nameFilters9"
|
||||||
|
:filter-method="filterName9"
|
||||||
|
filter-placement="bottom-end">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.mio_">{{ typeDict[scope.row.mio_.type] }}</span>
|
<span v-if="scope.row.mio_">{{ typeDict[scope.row.mio_.type] }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="供应商" prop="supplier_name">
|
<el-table-column label="供应商" prop="supplier_name">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</el-table>
|
||||||
</el-main>
|
</el-main>
|
||||||
|
<el-footer>
|
||||||
|
<el-pagination
|
||||||
|
background
|
||||||
|
:small="true"
|
||||||
|
:total="dataTotal"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:page-size="params.page_size"
|
||||||
|
:page-sizes="[20, 50, 100, 200]"
|
||||||
|
:current-page="params.page"
|
||||||
|
@current-change="getList"
|
||||||
|
@update:page-size="getList2"
|
||||||
|
></el-pagination>
|
||||||
|
</el-footer>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -108,9 +148,24 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
params: {with_mio:'yes',material__type:40,mio__state:20},
|
params: {
|
||||||
|
page:1,
|
||||||
|
page_size:20,
|
||||||
|
with_mio:'yes',
|
||||||
|
material__type:40,
|
||||||
|
mio__state:20
|
||||||
|
},
|
||||||
selection: [],
|
selection: [],
|
||||||
tableData:[],
|
tableData:[],
|
||||||
|
nameFilters1: [],
|
||||||
|
nameFilters2: [],
|
||||||
|
nameFilters3: [],
|
||||||
|
nameFilters4: [],
|
||||||
|
nameFilters5: [],
|
||||||
|
nameFilters6: [],
|
||||||
|
nameFilters7: [],
|
||||||
|
nameFilters8: [],
|
||||||
|
nameFilters9: [],
|
||||||
query: {
|
query: {
|
||||||
search: "",
|
search: "",
|
||||||
mio__inout_date__gte: "",
|
mio__inout_date__gte: "",
|
||||||
|
|
@ -129,16 +184,103 @@ export default {
|
||||||
other_out: "其他出库",
|
other_out: "其他出库",
|
||||||
},
|
},
|
||||||
project_code:'',
|
project_code:'',
|
||||||
|
dataTotal:0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.checkTemplate = this.checkTemplate+"?t=" + new Date().getTime();
|
this.checkTemplate = this.checkTemplate+"?t=" + new Date().getTime();
|
||||||
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
|
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
|
||||||
this.params.mio = this.mioId;
|
this.params.mio = this.mioId;
|
||||||
|
// this.apiObj = this.$API.inm.mioitem.list;
|
||||||
this.apiObj = this.$API.inm.mioitem.list;
|
let that = this;
|
||||||
|
that.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getList(val){
|
||||||
|
let that = this;
|
||||||
|
that.params.page = val?val:1;
|
||||||
|
that.$API.inm.mioitem.list.req(that.params).then((res) => {
|
||||||
|
if (res.count > 0) {
|
||||||
|
that.tableData = res.results;
|
||||||
|
that.dataTotal = res.count;
|
||||||
|
let numberList=[],nameList = [],batchlist=[],specificationList=[],modelList=[],unitList=[],userList=[],mioNumberList=[],typeList=[];
|
||||||
|
res.results.forEach((ite) => {
|
||||||
|
if (numberList.indexOf(ite.material_.number) > -1) {} else {
|
||||||
|
numberList.push(ite.material_.number);
|
||||||
|
let obj = {};
|
||||||
|
obj.text = ite.material_.number;
|
||||||
|
obj.value = ite.material_.number;
|
||||||
|
that.nameFilters1.push(obj);
|
||||||
|
}
|
||||||
|
if (nameList.indexOf(ite.material_.name) > -1) {} else {
|
||||||
|
nameList.push(ite.material_.name);
|
||||||
|
let obj = {};
|
||||||
|
obj.text = ite.material_.name;
|
||||||
|
obj.value = ite.material_.name;
|
||||||
|
that.nameFilters2.push(obj);
|
||||||
|
}
|
||||||
|
if (batchlist.indexOf(ite.material_.bin_number_main) > -1) {} else {
|
||||||
|
batchlist.push(ite.material_.bin_number_main);
|
||||||
|
let obj = {};
|
||||||
|
obj.text = ite.material_.bin_number_main;
|
||||||
|
obj.value = ite.material_.bin_number_main;
|
||||||
|
that.nameFilters3.push(obj);
|
||||||
|
}
|
||||||
|
if (specificationList.indexOf(ite.material_.specification) > -1) {} else {
|
||||||
|
specificationList.push(ite.material_.specification);
|
||||||
|
let obj = {};
|
||||||
|
obj.text = ite.material_.specification;
|
||||||
|
obj.value = ite.material_.specification;
|
||||||
|
that.nameFilters4.push(obj);
|
||||||
|
}
|
||||||
|
if (modelList.indexOf(ite.material_.model) > -1) {} else {
|
||||||
|
modelList.push(ite.material_.model);
|
||||||
|
let obj = {};
|
||||||
|
obj.text = ite.material_.model;
|
||||||
|
obj.value = ite.material_.model;
|
||||||
|
that.nameFilters5.push(obj);
|
||||||
|
}
|
||||||
|
if (unitList.indexOf(ite.material_.unit) > -1) {} else {
|
||||||
|
unitList.push(ite.material_.unit);
|
||||||
|
let obj = {};
|
||||||
|
obj.text = ite.material_.unit;
|
||||||
|
obj.value = ite.material_.unit;
|
||||||
|
that.nameFilters6.push(obj);
|
||||||
|
}
|
||||||
|
if (userList.indexOf(ite.mio_.submit_user_name) > -1) {} else {
|
||||||
|
userList.push(ite.mio_.submit_user_name);
|
||||||
|
let obj = {};
|
||||||
|
obj.text = ite.mio_.submit_user_name;
|
||||||
|
obj.value = ite.mio_.submit_user_name;
|
||||||
|
that.nameFilters7.push(obj);
|
||||||
|
}
|
||||||
|
if (mioNumberList.indexOf(ite.mio_.number) > -1) {} else {
|
||||||
|
mioNumberList.push(ite.mio_.number);
|
||||||
|
let obj = {};
|
||||||
|
obj.text = ite.mio_.number;
|
||||||
|
obj.value = ite.mio_.number;
|
||||||
|
that.nameFilters8.push(obj);
|
||||||
|
}
|
||||||
|
if (typeList.indexOf(ite.mio_.type) > -1) {} else {
|
||||||
|
typeList.push(ite.mio_.type);
|
||||||
|
let obj = {};
|
||||||
|
obj.text = that.typeDict[ite.mio_.type];
|
||||||
|
obj.value = that.typeDict[ite.mio_.type];
|
||||||
|
that.nameFilters9.push(obj);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
that.tableData = [];
|
||||||
|
that.dataTotal = 0;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getList2(val){
|
||||||
|
let that = this;
|
||||||
|
that.params.page = 1;
|
||||||
|
that.params.page_size = val;
|
||||||
|
that.getList(1);
|
||||||
|
},
|
||||||
handleCheckSuccess() {
|
handleCheckSuccess() {
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.refresh();
|
||||||
this.dialog.check = false;
|
this.dialog.check = false;
|
||||||
|
|
@ -213,6 +355,33 @@ export default {
|
||||||
});
|
});
|
||||||
return sums;
|
return sums;
|
||||||
},
|
},
|
||||||
|
filterName1(value, row) {
|
||||||
|
return row.物料编号 === value;
|
||||||
|
},
|
||||||
|
filterName2(value, row) {
|
||||||
|
return row.名称 === value;
|
||||||
|
},
|
||||||
|
filterName3(value, row) {
|
||||||
|
return row.货位号 === value;
|
||||||
|
},
|
||||||
|
filterName4(value, row) {
|
||||||
|
return row.规格 === value;
|
||||||
|
},
|
||||||
|
filterName5(value, row) {
|
||||||
|
return row.品牌型号 === value;
|
||||||
|
},
|
||||||
|
filterName6(value, row) {
|
||||||
|
return row.单位 === value;
|
||||||
|
},
|
||||||
|
filterName7(value, row) {
|
||||||
|
return row.单价 === value;
|
||||||
|
},
|
||||||
|
filterName8(value, row) {
|
||||||
|
return row.入库人 === value;
|
||||||
|
},
|
||||||
|
filterName9(value, row) {
|
||||||
|
return row. 入库凭证号 === value;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,23 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" v-if="form.type==40">
|
||||||
|
<el-form-item label="辅料类别" prop="cate">
|
||||||
|
<el-select
|
||||||
|
v-model="form.cate"
|
||||||
|
placeholder="辅料类别"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cateOptions"
|
||||||
|
:key="item"
|
||||||
|
:label="item"
|
||||||
|
:value="item"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="规格">
|
<el-form-item label="规格">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -91,7 +108,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 玻纤 -->
|
<!-- 玻纤 -->
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24" v-if="project_code == 'bxerp'">
|
||||||
<el-form-item label="追踪方式" prop="tracking">
|
<el-form-item label="追踪方式" prop="tracking">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.tracking"
|
v-model="form.tracking"
|
||||||
|
|
@ -115,9 +132,7 @@
|
||||||
<!-- 光芯 -->
|
<!-- 光芯 -->
|
||||||
<el-col :md="12" :sm="24" v-if="form.type == 40">
|
<el-col :md="12" :sm="24" v-if="form.type == 40">
|
||||||
<el-form-item label="仓库位号">
|
<el-form-item label="仓库位号">
|
||||||
<el-input
|
<el-input v-model="form.bin_number_main"/>
|
||||||
v-model="form.bin_number_main"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24" v-if="form.type !== 20">
|
<el-col :md="12" :sm="24" v-if="form.type !== 20">
|
||||||
|
|
@ -139,23 +154,26 @@
|
||||||
<el-switch v-model="form.into_wm" />
|
<el-switch v-model="form.into_wm" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24" v-if="form.type==10||form.type==20">
|
|
||||||
<el-form-item label="产品图纸">
|
|
||||||
<sc-upload v-model="form.photo" :modelValue="form.photo" title="产品图纸"></sc-upload>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24" v-if="form.type==10||form.type==20">
|
<el-col :md="12" :sm="24" v-if="form.type==10||form.type==20">
|
||||||
<el-form-item label="图纸编号">
|
<el-form-item label="图纸编号">
|
||||||
<el-input v-model="form.photo_number" placeholder="图纸编号"/>
|
<el-input v-model="form.photo_number" placeholder="图纸编号"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<el-input v-model="form.note" placeholder="备注"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" v-if="form.type==10||form.type==20||(form.type==40&&project_code == 'gx')">
|
||||||
|
<el-form-item label="产品图纸">
|
||||||
|
<sc-upload v-model="form.photo" :modelValue="form.photo" title="产品图纸"></sc-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
<el-button type="primary" :loading="isSaveing" @click="submit"
|
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||||
>保存</el-button
|
|
||||||
>
|
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button @click="visible = false">取消</el-button>
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
@ -189,6 +207,13 @@ export default {
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
cate: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择辅料类别",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
number: [
|
number: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
|
|
@ -220,6 +245,7 @@ export default {
|
||||||
{ id: 30, name: "主要原料" },
|
{ id: 30, name: "主要原料" },
|
||||||
// { id: 40, name: "辅助材料" },
|
// { id: 40, name: "辅助材料" },
|
||||||
],
|
],
|
||||||
|
cateOptions: ['主要辅材','办公辅料','设备维护辅料','包装辅材','标识辅材','防护辅材','其他辅材'],
|
||||||
handle_user: [],
|
handle_user: [],
|
||||||
selectionFilters: [],
|
selectionFilters: [],
|
||||||
materialOptions: [],
|
materialOptions: [],
|
||||||
|
|
|
||||||
|
|
@ -190,27 +190,15 @@
|
||||||
ref="showDialog"
|
ref="showDialog"
|
||||||
@closed="dialog.show = false"
|
@closed="dialog.show = false"
|
||||||
></show-dialog>
|
></show-dialog>
|
||||||
<!-- <el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
|
|
||||||
<degrad3
|
|
||||||
v-if="limitedWatch"
|
|
||||||
ref="degraDialogs"
|
|
||||||
:nodes="nodes"
|
|
||||||
:edges="edges"
|
|
||||||
:rankdir="'DL'"
|
|
||||||
>
|
|
||||||
</degrad3>
|
|
||||||
</el-drawer> -->
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./routepack_form.vue";
|
import saveDialog from "./routepack_form.vue";
|
||||||
import showDialog from "./route_show.vue";
|
import showDialog from "./route_show.vue";
|
||||||
import degrad3 from "./../template/degraD3.vue";
|
|
||||||
export default {
|
export default {
|
||||||
name: "route",
|
name: "route",
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,
|
||||||
showDialog,
|
showDialog,
|
||||||
degrad3
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-side style="width: 50%;overflow: scroll;">
|
<el-side style="width: 50%;overflow: scroll;">
|
||||||
<div style="font-weight: 600;color: #303133;font-size: 16px;padding: 10px 0;position: fixed;width: 30px;">工艺路线流程图</div>
|
<div style="font-weight: 600;color: #303133;font-size: 16px;padding: 10px 0;position: fixed;width: 30px;">工艺路线流程图</div>
|
||||||
<degrad3
|
<scDegra
|
||||||
style="margin-top: 50px;"
|
style="margin-top: 50px;"
|
||||||
v-if="limitedWatch"
|
v-if="limitedWatch"
|
||||||
ref="degraDialogs"
|
ref="degraDialogs"
|
||||||
|
|
@ -103,7 +103,7 @@
|
||||||
:edges="edges"
|
:edges="edges"
|
||||||
:rankdir="'DL'"
|
:rankdir="'DL'"
|
||||||
>
|
>
|
||||||
</degrad3>
|
</scDegra>
|
||||||
</el-side>
|
</el-side>
|
||||||
<el-main style="width: 50%;overflow: scroll;">
|
<el-main style="width: 50%;overflow: scroll;">
|
||||||
<el-container>
|
<el-container>
|
||||||
|
|
@ -200,10 +200,9 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./route_form.vue";
|
import saveDialog from "./route_form.vue";
|
||||||
import degrad3 from "./../template/degraD3.vue";
|
|
||||||
export default {
|
export default {
|
||||||
name: "routepack_form",
|
name: "routepack_form",
|
||||||
components: { saveDialog,degrad3 },
|
components: { saveDialog },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
active: 0,
|
active: 0,
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,19 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="任务等级" prop="priority" width="75">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.priority == 10" type="primary">
|
||||||
|
{{ priority_[scope.row.priority] }}
|
||||||
|
</el-tag>
|
||||||
|
<el-tag v-else-if="scope.row.priority == 20" type="warning">
|
||||||
|
{{ priority_[scope.row.priority] }}
|
||||||
|
</el-tag>
|
||||||
|
<el-tag v-else type="danger">
|
||||||
|
{{ priority_[scope.row.priority] }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="工艺路线"
|
label="工艺路线"
|
||||||
prop="material_"
|
prop="material_"
|
||||||
|
|
@ -84,7 +97,7 @@
|
||||||
{{ scope.row.material_.name }}
|
{{ scope.row.material_.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="任务状态" prop="state">
|
<el-table-column label="任务状态" prop="state" width="85">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag
|
<el-tag
|
||||||
v-if="scope.row.state == 40"
|
v-if="scope.row.state == 40"
|
||||||
|
|
@ -264,6 +277,11 @@ export default {
|
||||||
34: "终止",
|
34: "终止",
|
||||||
40: "已提交",
|
40: "已提交",
|
||||||
},
|
},
|
||||||
|
priority_: {
|
||||||
|
10: "低",
|
||||||
|
20: "中",
|
||||||
|
30: "高",
|
||||||
|
},
|
||||||
start_date: "",
|
start_date: "",
|
||||||
newDate: "",
|
newDate: "",
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -64,19 +64,19 @@
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="任务等级">
|
<el-form-item label="任务等级">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.level"
|
v-model="form.priority"
|
||||||
value-key="id"
|
value-key="id"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
filterable
|
filterable
|
||||||
:disabled="mode == 'edit'"
|
:disabled="mode == 'edit'"
|
||||||
>
|
>
|
||||||
<el-option label="高" value="高"></el-option>
|
<el-option label="低" :value="10"></el-option>
|
||||||
<el-option label="中" value="中"></el-option>
|
<el-option label="中" :value="20"></el-option>
|
||||||
<el-option label="低" value="低"></el-option>
|
<el-option label="高" :value="30"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item>
|
||||||
<el-form-item label="产品" prop="material">
|
<el-form-item label="产品" prop="material">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.material"
|
v-model="form.material"
|
||||||
|
|
@ -153,7 +153,7 @@ export default {
|
||||||
routeOptions: [],
|
routeOptions: [],
|
||||||
currentRoute: "",
|
currentRoute: "",
|
||||||
form: {
|
form: {
|
||||||
// level: "低",
|
priority: 20,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
count: [
|
count: [
|
||||||
|
|
@ -305,6 +305,7 @@ export default {
|
||||||
//表单注入数据
|
//表单注入数据
|
||||||
setData(data) {
|
setData(data) {
|
||||||
Object.assign(this.form, data);
|
Object.assign(this.form, data);
|
||||||
|
this.getFinalMaterial(this.form.routepack);
|
||||||
},
|
},
|
||||||
//设置过滤项
|
//设置过滤项
|
||||||
setFilters(filters) {
|
setFilters(filters) {
|
||||||
|
|
|
||||||
|
|
@ -17,20 +17,13 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="批次号" prop="batch">
|
<el-table-column label="批次号" prop="batch">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="总袋(桶)数" prop="count_bag">
|
<el-table-column label="总数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="不合格数" prop="count_notok">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="抽样数量" prop="count_sampling">
|
<el-table-column label="抽样数量" prop="count_sampling">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="称重记录/Kg" prop="weight_kgs">
|
<!-- <el-table-column label="检验结论">
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="抽样计算总重量/Kg" prop="production_date">
|
|
||||||
<template #default="scope">
|
|
||||||
{{ countWeight(scope.row) }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="合同采购量/Kg" prop="buy_date">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="检验结论">
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag v-if="scope.row.is_testok" type="success">
|
<el-tag v-if="scope.row.is_testok" type="success">
|
||||||
合格
|
合格
|
||||||
|
|
@ -39,7 +32,7 @@
|
||||||
不合格
|
不合格
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column label="检验员" prop="test_user_name">
|
<el-table-column label="检验员" prop="test_user_name">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检验日期" prop="test_date">
|
<el-table-column label="检验日期" prop="test_date">
|
||||||
|
|
@ -90,7 +83,7 @@ export default {
|
||||||
query: {
|
query: {
|
||||||
test_date: '',
|
test_date: '',
|
||||||
},
|
},
|
||||||
params: { type: 20, mio__type: 'pur_in' },
|
params: { type: 20, mio__type: 'pur_in', test_date__isnull: false },
|
||||||
selection: [],
|
selection: [],
|
||||||
state_: {
|
state_: {
|
||||||
10: '',
|
10: '',
|
||||||
|
|
|
||||||
|
|
@ -46,27 +46,17 @@
|
||||||
@change="materialrowChange"
|
@change="materialrowChange"
|
||||||
>
|
>
|
||||||
<el-table-column label="物料名称" prop="full_name"></el-table-column>
|
<el-table-column label="物料名称" prop="full_name"></el-table-column>
|
||||||
<!-- <el-table-column label="工序" prop="process_name"></el-table-column>
|
|
||||||
<el-table-column label="规格" prop="specification"></el-table-column> -->
|
|
||||||
</xtSelect>
|
</xtSelect>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="time" label="追溯层级">
|
<el-table-column label="用于输入">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="!scope.row.isEdit">{{ tracing_[scope.row.tracing] }}</span>
|
<el-switch :disabled="!scope.row.isEdit" v-model="scope.row.use_for_in" active-color="#13ce66" inactive-color="#666666"></el-switch>
|
||||||
<el-select
|
</template>
|
||||||
v-else
|
</el-table-column>
|
||||||
v-model="scope.row.tracing"
|
<el-table-column label="用于输出">
|
||||||
filterable
|
<template #default="scope">
|
||||||
placeholder="请选择追溯层级"
|
<el-switch :disabled="!scope.row.isEdit" v-model="scope.row.use_for_out" active-color="#13ce66" inactive-color="#666666"></el-switch>
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in tracingOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="open" label="操作" width="125" align="center">
|
<el-table-column prop="open" label="操作" width="125" align="center">
|
||||||
|
|
@ -133,6 +123,12 @@
|
||||||
</xtSelect>
|
</xtSelect>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="addto_wpr" label="类型">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="!scope.row.isEdit" :type="scope.row.testitem_type == 20 ? 'success' : 'primary'">{{ scope.row.testitem_type == 20 ? '操作项':'检测项' }}</el-tag>
|
||||||
|
<el-tag v-else :type="testitemrow.type == 20 ? 'success' : 'primary'">{{ scope.row.type == 20 ? '操作项':'检测项' }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="addto_wpr" label="加入物料信息">
|
<el-table-column prop="addto_wpr" label="加入物料信息">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
|
|
@ -301,18 +297,11 @@ export default {
|
||||||
"process":"过程检验",
|
"process":"过程检验",
|
||||||
"performance":"性能检验"
|
"performance":"性能检验"
|
||||||
},
|
},
|
||||||
tracing_:{
|
|
||||||
"test":"检测项",
|
|
||||||
"defect":"缺陷项",
|
|
||||||
},
|
|
||||||
tracingOptions:[
|
|
||||||
{value:'test',label:'检测项'},
|
|
||||||
{value:'defect',label:'缺陷项'},
|
|
||||||
],
|
|
||||||
mataddTemplate:{
|
mataddTemplate:{
|
||||||
tracing: "",
|
|
||||||
qct: this.qctId,
|
qct: this.qctId,
|
||||||
material: "",
|
material: "",
|
||||||
|
use_for_in:false,
|
||||||
|
use_for_out:false,
|
||||||
isEdit: true,
|
isEdit: true,
|
||||||
},
|
},
|
||||||
defectaddTemplate:{
|
defectaddTemplate:{
|
||||||
|
|
@ -525,25 +514,23 @@ export default {
|
||||||
materialrowChange(){
|
materialrowChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.qctmatlist.forEach((item) => {
|
that.qctmatlist.forEach((item) => {
|
||||||
if (item.material&&(item.material == that.materialrow.id)) {
|
if (item.id&&(item.material == that.materialrow.id)) {
|
||||||
that.$message.warning("该物料已存在");
|
that.$message.warning("该物料已存在");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
defectrowChange(){
|
defectrowChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log('that.qctdefectlist',that.qctdefectlist);
|
|
||||||
that.qctdefectlist.forEach((item) => {
|
that.qctdefectlist.forEach((item) => {
|
||||||
if (item.defect&&(item.defect == that.defectrow.id)) {
|
if (item.id&&(item.defect == that.defectrow.id)) {
|
||||||
that.$message.warning("该缺陷项已存在");
|
that.$message.warning("该缺陷项已存在");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
testitemrowChange(){
|
testitemrowChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log('that.qcttestitemlist',that.qcttestitemlist);
|
|
||||||
that.qcttestitemlist.forEach((item) => {
|
that.qcttestitemlist.forEach((item) => {
|
||||||
if (item.testitem&&item.testitem == that.testitemrow.id) {
|
if (item.id&&item.testitem == that.testitemrow.id) {
|
||||||
that.$message.warning("该检测项已存在");
|
that.$message.warning("该检测项已存在");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,259 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="add('sale_out')"
|
||||||
|
v-auth="'mio.sale'"
|
||||||
|
>销售发货</el-button
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="query.state"
|
||||||
|
clearable
|
||||||
|
style="width: 120px; margin-left: 2px"
|
||||||
|
placeholder="状态"
|
||||||
|
@change="handleQuery"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in stateOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="right-panel">
|
||||||
|
<el-input
|
||||||
|
v-model="query.search"
|
||||||
|
placeholder="编号"
|
||||||
|
clearable
|
||||||
|
style="margin-right: 5px"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
:params="params"
|
||||||
|
:query="query"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column
|
||||||
|
label="记录编号"
|
||||||
|
prop="number"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="出/入库类型">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ typeDict[scope.row.type] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="记录状态">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ stateDict[scope.row.state] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="出/入库日期" prop="inout_date">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="执行部门" prop="belong_dept_name">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.belong_dept_name }} - {{ scope.row.mgroup_name }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建人" prop="create_by_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" prop="create_time">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
fixed="right"
|
||||||
|
align="center"
|
||||||
|
width="150px"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
@click="table_detail(scope.row)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
@click="table_submit(scope.row)"
|
||||||
|
v-auth="'mio.submit'"
|
||||||
|
v-if="scope.row.state == 10"
|
||||||
|
>
|
||||||
|
提交
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="warning"
|
||||||
|
@click="revert(scope.row)"
|
||||||
|
v-auth="'mio.submit'"
|
||||||
|
v-if="scope.row.state == 20"
|
||||||
|
>
|
||||||
|
撤销
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="danger"
|
||||||
|
@click="table_del(scope.row)"
|
||||||
|
v-auth="'mio.delete'"
|
||||||
|
v-if="scope.row.state == 10"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
<save-dialog
|
||||||
|
v-if="dialog.save"
|
||||||
|
ref="saveDialog"
|
||||||
|
@success="handleSaveSuccess"
|
||||||
|
@closed="dialog.save = false"
|
||||||
|
></save-dialog>
|
||||||
|
<record-dialog
|
||||||
|
ref="showDrawer"
|
||||||
|
v-if="visibleDrawer"
|
||||||
|
:type="type"
|
||||||
|
:cate="cate"
|
||||||
|
:mioId="mioId"
|
||||||
|
@closed="visibleDrawer = false"
|
||||||
|
>
|
||||||
|
</record-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import saveDialog from "./sale_form.vue";
|
||||||
|
import recordDialog from "./../inm/mioitem.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "mio",
|
||||||
|
components: {
|
||||||
|
saveDialog,
|
||||||
|
recordDialog,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
stateDict: {
|
||||||
|
10: "创建中",
|
||||||
|
20: "已提交",
|
||||||
|
},
|
||||||
|
stateOptions: [
|
||||||
|
{ id: 10, name: "创建中" },
|
||||||
|
{ id: 20, name: "已提交" },
|
||||||
|
],
|
||||||
|
typeDict: {
|
||||||
|
sale_out: "销售发货"
|
||||||
|
},
|
||||||
|
cateOptions: [
|
||||||
|
{ id: "sale_out", name: "销售发货" },
|
||||||
|
],
|
||||||
|
dialog: {
|
||||||
|
save: false,
|
||||||
|
record: false,
|
||||||
|
},
|
||||||
|
query: {},
|
||||||
|
params: {
|
||||||
|
type__in: "sale_out",
|
||||||
|
materials__type: 10,
|
||||||
|
},
|
||||||
|
form: {},
|
||||||
|
apiObj: this.$API.inm.mio.list,
|
||||||
|
selection: [],
|
||||||
|
type: "",
|
||||||
|
cate: "good",
|
||||||
|
mioId: "",
|
||||||
|
visibleDrawer: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//添加
|
||||||
|
add(type) {
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open("add", type);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//编辑
|
||||||
|
table_edit(row) {
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open("edit", type).setData(row);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//查看
|
||||||
|
table_detail(row) {
|
||||||
|
this.type = row.type;
|
||||||
|
this.mioId = row.id;
|
||||||
|
this.visibleDrawer = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.showDrawer.open();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//删除
|
||||||
|
table_del(row) {
|
||||||
|
this.$confirm(`确定删除吗?`, "提示", {
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$API.inm.mio.delete
|
||||||
|
.req(row.id)
|
||||||
|
.then((res) => {
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
return res;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
revert(row) {
|
||||||
|
this.$confirm(`确定撤销该操作吗?`, "提示", {
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$API.inm.mio.revert
|
||||||
|
.req(row.id)
|
||||||
|
.then((res) => {
|
||||||
|
this.$message.success("撤销成功");
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
return res;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
table_submit(row) {
|
||||||
|
this.$API.inm.mio.submit.req(row.id).then((res) => {
|
||||||
|
this.$message.success("提交成功");
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleQuery() {
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
|
resetQuery() {
|
||||||
|
this.query = {};
|
||||||
|
},
|
||||||
|
handleSaveSuccess() {
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -0,0 +1,348 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:title="titleMap[form.type]"
|
||||||
|
v-model="visible"
|
||||||
|
:size="1000"
|
||||||
|
destroy-on-close
|
||||||
|
@closed="$emit('closed')"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="dialogForm"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="120px"
|
||||||
|
>
|
||||||
|
<el-form-item label="编号">
|
||||||
|
<el-input v-model="form.number" placeholder="编号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="出入库日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.inout_date"
|
||||||
|
type="date"
|
||||||
|
placeholder="出入库日期"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="采购订单" v-if="form.type == 'pur_in'">
|
||||||
|
<el-select
|
||||||
|
v-model="form.pu_order"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in puOrderOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.number"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="供应商"
|
||||||
|
v-if="form.type == 'other_in' || form.type == 'pur_in'||form.type == 'pur_out'"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="form.supplier"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in supplierOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="销售订单" v-if="form.type == 'sale_out'">
|
||||||
|
<el-select v-model="form.order" clearable style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in orderOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.number"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户名称" v-if="form.type == 'sale_out'">
|
||||||
|
<el-select
|
||||||
|
v-model="form.customer"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in customerOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户" v-if="form.type == 'other_out'">
|
||||||
|
<el-select
|
||||||
|
v-model="form.customer"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in customerOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="操作工段"
|
||||||
|
v-if="form.type == 'do_in' || form.type == 'do_out'|| form.type == 'borrow_out' || form.type == 'return_in'"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="form.mgroup"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="为空时代表领料/入库到车间"
|
||||||
|
@change="mgroupChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in mgroupOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="操作部门"
|
||||||
|
v-if="form.type == 'do_in' || form.type == 'do_out' || form.type == 'borrow_out' || form.type == 'return_in'"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="form.belong_dept"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
@change="getgetDeptUsers"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in deptOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item
|
||||||
|
label="部门执行人"
|
||||||
|
v-if="form.type == 'do_in' || form.type == 'do_out'|| form.type == 'borrow_out' || form.type == 'return_in'"
|
||||||
|
>
|
||||||
|
<el-select v-model="form.do_user" clearable style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in userOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="仓库执行人"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="form.mio_user"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in userOption"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button type="primary" :loading="isSaveing" @click="submit">
|
||||||
|
保存
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="visible = false">取消</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
const defaultForm = {
|
||||||
|
state: 10,
|
||||||
|
type: "do_in",
|
||||||
|
};
|
||||||
|
export default {
|
||||||
|
emits: ["success", "closed"],
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
type: "do_in",
|
||||||
|
loading: false,
|
||||||
|
mode: "add",
|
||||||
|
titleMap: {
|
||||||
|
do_out: "生产领料",
|
||||||
|
sale_out: "销售发货",
|
||||||
|
pur_in: "采购入库",
|
||||||
|
pur_out: "退货",
|
||||||
|
do_in: "生产入库",
|
||||||
|
other_in: "其他入库",
|
||||||
|
other_out: "其他出库",
|
||||||
|
borrow_out: "领用出库",
|
||||||
|
return_in: "退还入库",
|
||||||
|
},
|
||||||
|
form: {},
|
||||||
|
rules: {
|
||||||
|
number: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请填写编号",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
visible: false,
|
||||||
|
isSaveing: false,
|
||||||
|
options: [],
|
||||||
|
setFiltersVisible: false,
|
||||||
|
deptOptions: [],
|
||||||
|
mgroupOptions: [],
|
||||||
|
userOptions: [],
|
||||||
|
userOption: [],
|
||||||
|
orderOptions: [],
|
||||||
|
puOrderOptions: [],
|
||||||
|
supplierOptions: [],
|
||||||
|
customerOptions: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.form.inout_date = this.$TOOL.dateFormat2(new Date());
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
this.getDeptUser();
|
||||||
|
var type = this.form.type;
|
||||||
|
if (type == "pur_in") {
|
||||||
|
this.getPuOrderOptions();
|
||||||
|
this.getSupplierOptions();
|
||||||
|
} else if (type == "sale_out") {
|
||||||
|
this.getOrderOptions();
|
||||||
|
this.getCustomerOptions();
|
||||||
|
} else if (type == "do_in" || type == "do_out" || type == "borrow_out" || type == "return_in") {
|
||||||
|
this.getDeptOptions();
|
||||||
|
this.getmgroupOptions();
|
||||||
|
this.getgetDeptUsers();
|
||||||
|
} else if (type == "other_in") {
|
||||||
|
this.getSupplierOptions();
|
||||||
|
} else if (type == "other_out") {
|
||||||
|
this.getCustomerOptions();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mgroupChange(){
|
||||||
|
let that = this;
|
||||||
|
that.mgroupOptions.forEach(item=>{
|
||||||
|
if(item.id == that.form.mgroup){
|
||||||
|
this.form.belong_dept = item.belong_dept;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getmgroupOptions() {
|
||||||
|
this.$API.mtm.mgroup.list.req({page: 0}).then(res=>{
|
||||||
|
this.mgroupOptions = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getSupplierOptions() {
|
||||||
|
this.$API.pum.supplier.list.req({ page: 0 }).then((res) => {
|
||||||
|
this.supplierOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getCustomerOptions() {
|
||||||
|
this.$API.sam.customer.list.req({ page: 0 }).then((res) => {
|
||||||
|
this.customerOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getDeptOptions() {
|
||||||
|
this.$API.system.dept.list
|
||||||
|
.req({ page: 0, type__in: "dept" })
|
||||||
|
.then((res) => {
|
||||||
|
this.deptOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getPuOrderOptions() {
|
||||||
|
this.$API.pum.order.list
|
||||||
|
.req({ page: 0, type__in: "20,30" })
|
||||||
|
.then((res) => {
|
||||||
|
this.puOrderOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getOrderOptions() {
|
||||||
|
this.$API.sam.order.list
|
||||||
|
.req({ page: 0, state__in: "20,30" })
|
||||||
|
.then((res) => {
|
||||||
|
this.orderOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getgetDeptUsers(){
|
||||||
|
this.$API.system.user.list.req({ depts: this.form.belong_dept, page: 0 }).then((res) => {
|
||||||
|
this.userOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getDeptUser() {
|
||||||
|
this.$API.system.user.list
|
||||||
|
.req({ posts__name: "库管", page: 0 })
|
||||||
|
.then((res) => {
|
||||||
|
this.userOption = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//显示
|
||||||
|
open(mode = "add", type = "") {
|
||||||
|
this.mode = mode;
|
||||||
|
this.form.type = type;
|
||||||
|
this.init();
|
||||||
|
this.visible = true;
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
//提交
|
||||||
|
submit() {
|
||||||
|
this.$refs.dialogForm.validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.isSaveing = true;
|
||||||
|
try {
|
||||||
|
var res;
|
||||||
|
if (this.mode == "add") {
|
||||||
|
res = await this.$API.inm.mio.create.req(this.form);
|
||||||
|
} else if (this.mode == "edit") {
|
||||||
|
res = await this.$API.inm.mio.update.req(
|
||||||
|
this.form.id,
|
||||||
|
this.form
|
||||||
|
);
|
||||||
|
}
|
||||||
|
this.isSaveing = false;
|
||||||
|
this.$emit("success", this.form, this.mode);
|
||||||
|
this.visible = false;
|
||||||
|
this.$message.success("操作成功");
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
//可以处理校验错误
|
||||||
|
this.isSaveing = false;
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//表单注入数据
|
||||||
|
setData(data) {
|
||||||
|
Object.assign(this.form, data);
|
||||||
|
},
|
||||||
|
//设置过滤项
|
||||||
|
setFilters(filters) {
|
||||||
|
this.selectionFilters = filters;
|
||||||
|
this.setFiltersVisible = true;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style></style>
|
||||||
|
|
@ -0,0 +1,150 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="right-panel">
|
||||||
|
<!-- <el-input v-model="query.name__contains"
|
||||||
|
placeholder="产品名称"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input> -->
|
||||||
|
<el-input v-model="query.batch__contains"
|
||||||
|
placeholder="批次号"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
@click="handleExport"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
:params="params"
|
||||||
|
:query="params"
|
||||||
|
id="exportDiv"
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" fixed="left"/>
|
||||||
|
<el-table-column label="批次号" fixed="left">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品尺寸检测_批次号 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="板号" prop="number" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="垂直度" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品尺寸检测_缺陷项_垂直度==undefined?scope.row.data.成品尺寸检测_缺陷项_垂直度:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="尖角" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品尺寸检测_缺陷项_尖角?scope.row.data.成品尺寸检测_缺陷项_尖角:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="有效" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品尺寸检测_缺陷项_有效?scope.row.data.成品尺寸检测_缺陷项_有效:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="面型" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品尺寸检测_缺陷项_面型?scope.row.data.成品尺寸检测_缺陷项_面型:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="台径小" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品尺寸检测_缺陷项_台径小?scope.row.data.成品尺寸检测_缺陷项_台径小:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="台径大" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品尺寸检测_缺陷项_台径大?scope.row.data.成品尺寸检测_缺陷项_台径大:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品尺寸检测_缺陷项_备注 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "statistics_guan",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
params: {
|
||||||
|
ordering:'data__成品尺寸检测_批次号',
|
||||||
|
querys:[[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品尺寸检测_批次号"}]],
|
||||||
|
},
|
||||||
|
query:{
|
||||||
|
name__contains:'',
|
||||||
|
batch__contains:'',
|
||||||
|
last_time__gte:'',
|
||||||
|
last_time__lte:'',
|
||||||
|
},
|
||||||
|
apiObj: this.$API.wpm.wpr.query,
|
||||||
|
options:[],
|
||||||
|
tableData:[],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleQuery(){
|
||||||
|
let that = this;
|
||||||
|
let querys = [[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品尺寸检测_批次号"}]];
|
||||||
|
let obj = {},obj1 = {},obj2 = {},obj3 = {};
|
||||||
|
obj.field = 'data__成品尺寸检测_批次号';
|
||||||
|
obj.value = that.query.batch__contains;
|
||||||
|
obj.compare = '';
|
||||||
|
|
||||||
|
obj1.field = 'last_time';
|
||||||
|
obj1.value = that.query.last_time__gte;
|
||||||
|
obj1.compare = 'gte';
|
||||||
|
|
||||||
|
obj2.field = 'last_time';
|
||||||
|
obj2.value = that.query.last_time__lte;
|
||||||
|
obj2.compare = 'lte';
|
||||||
|
|
||||||
|
obj3.field = 'data__成品尺寸检测_物料名';
|
||||||
|
obj3.value = that.query.name__contains;
|
||||||
|
obj3.compare = '';
|
||||||
|
|
||||||
|
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
|
||||||
|
querys[0].push(obj);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
|
||||||
|
querys[0].push(obj1);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
|
||||||
|
querys[0].push(obj2);
|
||||||
|
}
|
||||||
|
if(that.query.name__contains!==''&&that.query.name__contains!==null){
|
||||||
|
querys[0].push(obj3);
|
||||||
|
}
|
||||||
|
that.params.querys = querys;
|
||||||
|
this.$refs.table.queryData(that.params);
|
||||||
|
},
|
||||||
|
getCountQt(data,type){
|
||||||
|
let count_qt = 0,count = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,180 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="right-panel">
|
||||||
|
<!-- <el-input v-model="query.name__contains"
|
||||||
|
placeholder="产品名称"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input> -->
|
||||||
|
<el-input v-model="query.batch__contains"
|
||||||
|
placeholder="批次号"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
@click="handleExport"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
:params="params"
|
||||||
|
:query="params"
|
||||||
|
id="exportDiv"
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" fixed="left"/>
|
||||||
|
<el-table-column label="批次号" fixed="left">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观复检一_批次号 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="板号" prop="number" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="划伤" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观复检一_缺陷项_划伤? scope.row.data.成品外观复检一_缺陷项_划伤:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="腐蚀" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.成品外观复检一_缺陷项_腐蚀?scope.row.data.成品外观复检一_缺陷项_腐蚀:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="崩边" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.成品外观复检一_缺陷项_崩边?scope.row.data.成品外观复检一_缺陷项_崩边:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="纹路" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.成品外观复检一_缺陷项_纹路?scope.row.data.成品外观复检一_缺陷项_纹路:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="平台" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.成品外观复检一_缺陷项_平台?scope.row.data.成品外观复检一_缺陷项_平台:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="硌/坑" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['成品外观复检一_缺陷项_硌/坑']? scope.row.data['成品外观复检一_缺陷项_硌/坑']:0}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="麻点" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观复检一_缺陷项_麻点? scope.row.data.成品外观复检一_缺陷项_麻点:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="台阶" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观复检一_缺陷项_台阶?scope.row.data.成品外观复检一_缺陷项_台阶:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="柱面" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.成品外观复检一_缺陷项_柱面?scope.row.data.成品外观复检一_缺陷项_柱面:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="污染" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.成品外观复检一_缺陷项_污染?scope.row.data.成品外观复检一_缺陷项_污染:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="粗糙度" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.成品外观复检一_缺陷项_粗糙度?scope.row.data.成品外观复检一_缺陷项_粗糙度:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="水印" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.成品外观复检一_缺陷项_水印?scope.row.data.成品外观复检一_缺陷项_水印:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观复检一_缺陷项_备注 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "statistics_guan",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
params: {
|
||||||
|
ordering:'data__成品外观复检一_批次号',
|
||||||
|
querys:[[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品外观复检一_批次号"}]],
|
||||||
|
},
|
||||||
|
query:{
|
||||||
|
name__contains:'',
|
||||||
|
batch__contains:'',
|
||||||
|
last_time__gte:'',
|
||||||
|
last_time__lte:'',
|
||||||
|
},
|
||||||
|
apiObj: this.$API.wpm.wpr.query,
|
||||||
|
options:[],
|
||||||
|
tableData:[],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleQuery(){
|
||||||
|
let that = this;
|
||||||
|
let querys = [[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品外观复检一_批次号"}]];
|
||||||
|
let obj = {},obj1 = {},obj2 = {},obj3 = {};
|
||||||
|
obj.field = 'data__成品外观复检一_批次号';
|
||||||
|
obj.value = that.query.batch__contains;
|
||||||
|
obj.compare = '';
|
||||||
|
|
||||||
|
obj1.field = 'last_time';
|
||||||
|
obj1.value = that.query.last_time__gte;
|
||||||
|
obj1.compare = 'gte';
|
||||||
|
|
||||||
|
obj2.field = 'last_time';
|
||||||
|
obj2.value = that.query.last_time__lte;
|
||||||
|
obj2.compare = 'lte';
|
||||||
|
|
||||||
|
obj3.field = 'data__成品外观复检一_物料名';
|
||||||
|
obj3.value = that.query.name__contains;
|
||||||
|
obj3.compare = '';
|
||||||
|
|
||||||
|
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
|
||||||
|
querys[0].push(obj);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
|
||||||
|
querys[0].push(obj1);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
|
||||||
|
querys[0].push(obj2);
|
||||||
|
}
|
||||||
|
if(that.query.name__contains!==''&&that.query.name__contains!==null){
|
||||||
|
querys[0].push(obj3);
|
||||||
|
}
|
||||||
|
that.params.querys = querys;
|
||||||
|
this.$refs.table.queryData(that.params);
|
||||||
|
},
|
||||||
|
getCountQt(data,type){
|
||||||
|
let count_qt = 0,count = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,180 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="right-panel">
|
||||||
|
<!-- <el-input v-model="query.name__contains"
|
||||||
|
placeholder="产品名称"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input> -->
|
||||||
|
<el-input v-model="query.batch__contains"
|
||||||
|
placeholder="批次号"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
@click="handleExport"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
:params="params"
|
||||||
|
:query="params"
|
||||||
|
id="exportDiv"
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" fixed="left"/>
|
||||||
|
<el-table-column label="批次号" fixed="left">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观复检二_批次号 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="板号" prop="number" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="划伤" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观复检二_缺陷项_划伤?scope.row.data.成品外观复检二_缺陷项_划伤:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="腐蚀" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.成品外观复检二_缺陷项_腐蚀?scope.row.data.成品外观复检二_缺陷项_腐蚀:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="崩边" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.成品外观复检二_缺陷项_崩边?scope.row.data.成品外观复检二_缺陷项_崩边:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="纹路" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.成品外观复检二_缺陷项_纹路?scope.row.data.成品外观复检二_缺陷项_纹路:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="平台" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.成品外观复检二_缺陷项_平台?scope.row.data.成品外观复检二_缺陷项_平台:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="硌/坑" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['成品外观复检二_缺陷项_硌/坑']?scope.row.data['成品外观复检二_缺陷项_硌/坑']:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="麻点" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观复检二_缺陷项_麻点?scope.row.data.成品外观复检二_缺陷项_麻点:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="台阶" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观复检二_缺陷项_台阶?scope.row.data.成品外观复检二_缺陷项_台阶:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="柱面" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.成品外观复检二_缺陷项_柱面?scope.row.data.成品外观复检二_缺陷项_柱面:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="污染" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.成品外观复检二_缺陷项_污染?scope.row.data.成品外观复检二_缺陷项_污染:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="粗糙度" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.成品外观复检二_缺陷项_粗糙度?scope.row.data.成品外观复检二_缺陷项_粗糙度:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="水印" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.成品外观复检二_缺陷项_水印?scope.row.data.成品外观复检二_缺陷项_水印:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观复检二_缺陷项_备注 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "statistics_guan",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
params: {
|
||||||
|
ordering:'data__成品外观复检二_批次号',
|
||||||
|
querys:[[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品外观复检二_批次号"}]],
|
||||||
|
},
|
||||||
|
query:{
|
||||||
|
name__contains:'',
|
||||||
|
batch__contains:'',
|
||||||
|
last_time__gte:'',
|
||||||
|
last_time__lte:'',
|
||||||
|
},
|
||||||
|
apiObj: this.$API.wpm.wpr.query,
|
||||||
|
options:[],
|
||||||
|
tableData:[],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleQuery(){
|
||||||
|
let that = this;
|
||||||
|
let querys = [[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品外观复检二_批次号"}]];
|
||||||
|
let obj = {},obj1 = {},obj2 = {},obj3={};
|
||||||
|
obj.field = 'data__成品外观复检二_批次号';
|
||||||
|
obj.value = that.query.batch__contains;
|
||||||
|
obj.compare = '';
|
||||||
|
|
||||||
|
obj1.field = 'last_time';
|
||||||
|
obj1.value = that.query.last_time__gte;
|
||||||
|
obj1.compare = 'gte';
|
||||||
|
|
||||||
|
obj2.field = 'last_time';
|
||||||
|
obj2.value = that.query.last_time__lte;
|
||||||
|
obj2.compare = 'lte';
|
||||||
|
|
||||||
|
obj3.field = 'data__成品外观复检二_物料名';
|
||||||
|
obj3.value = that.query.name__contains;
|
||||||
|
obj3.compare = '';
|
||||||
|
|
||||||
|
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
|
||||||
|
querys[0].push(obj);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
|
||||||
|
querys[0].push(obj1);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
|
||||||
|
querys[0].push(obj2);
|
||||||
|
}
|
||||||
|
if(that.query.name__contains!==''&&that.query.name__contains!==null){
|
||||||
|
querys[0].push(obj3);
|
||||||
|
}
|
||||||
|
that.params.querys = querys;
|
||||||
|
this.$refs.table.queryData(that.params);
|
||||||
|
},
|
||||||
|
getCountQt(data,type){
|
||||||
|
let count_qt = 0,count = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,271 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="right-panel">
|
||||||
|
<!-- <el-input v-model="query.name__contains"
|
||||||
|
placeholder="产品名称"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input> -->
|
||||||
|
<el-input v-model="query.batch__contains"
|
||||||
|
placeholder="批次号"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
@click="handleExport"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
:params="params"
|
||||||
|
:query="params"
|
||||||
|
id="exportDiv"
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" fixed="left"/>
|
||||||
|
<el-table-column label="批次号" fixed="left">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_批次号 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="板号" prop="number" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="毛坯长点" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_毛坯长点?scope.row.data.成品外观内置初检_缺陷项_毛坯长点:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="毛坯点多" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_毛坯点多?scope.row.data.成品外观内置初检_缺陷项_毛坯点多:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="扭后点" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_扭后点?scope.row.data.成品外观内置初检_缺陷项_扭后点:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="黑网" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_黑网?scope.row.data.成品外观内置初检_缺陷项_黑网:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="白网" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_白网?scope.row.data.成品外观内置初检_缺陷项_白网:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="小网" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_小网?scope.row.data.成品外观内置初检_缺陷项_小网:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="花丝" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_花丝?scope.row.data.成品外观内置初检_缺陷项_花丝:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="花朵" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_花朵?scope.row.data.成品外观内置初检_缺陷项_花朵:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="六角" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_六角?scope.row.data.成品外观内置初检_缺陷项_六角:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="六角白点" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_六角白点?scope.row.data.成品外观内置初检_缺陷项_六角白点:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="六角黑点" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_六角黑点?scope.row.data.成品外观内置初检_缺陷项_六角黑点:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="复丝结构" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_复丝结构?scope.row.data.成品外观内置初检_缺陷项_复丝结构:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="炫光" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_炫光?scope.row.data.成品外观内置初检_缺陷项_炫光:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="包边丝" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_包边丝?scope.row.data.成品外观内置初检_缺陷项_包边丝:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="畸变" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_畸变?scope.row.data.成品外观内置初检_缺陷项_畸变:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="炸废" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_炸废?scope.row.data.成品外观内置初检_缺陷项_炸废:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="偏心" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_偏心?scope.row.data.成品外观内置初检_缺陷项_偏心:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="划伤" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_偏心?scope.row.data.成品外观内置初检_缺陷项_偏心:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="腐蚀" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_腐蚀?scope.row.data.成品外观内置初检_缺陷项_腐蚀:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="崩边" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_崩边?scope.row.data.成品外观内置初检_缺陷项_崩边:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="纹路" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_纹路?scope.row.data.成品外观内置初检_缺陷项_纹路:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="平台" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_平台?scope.row.data.成品外观内置初检_缺陷项_平台:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="硌/坑" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['成品外观内置初检_缺陷项_硌/坑']?scope.row.data['成品外观内置初检_缺陷项_硌/坑']:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="麻点" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_麻点?scope.row.data.成品外观内置初检_缺陷项_麻点:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="台阶" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_台阶?scope.row.data.成品外观内置初检_缺陷项_台阶:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="柱面" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_柱面?scope.row.data.成品外观内置初检_缺陷项_柱面:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="污染" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_污染?scope.row.data.成品外观内置初检_缺陷项_污染:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="粗糙度" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_粗糙度?scope.row.data.成品外观内置初检_缺陷项_粗糙度:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="水印" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_水印?scope.row.data.成品外观内置初检_缺陷项_水印:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="角偏" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_角偏?scope.row.data.成品外观内置初检_缺陷项_角偏:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品外观内置初检_缺陷项_备注 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "statistics_guan",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
params: {
|
||||||
|
ordering:'data__成品内外初检_批次号',
|
||||||
|
querys:[[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品内外初检_批次号"}]],
|
||||||
|
},
|
||||||
|
query:{
|
||||||
|
name__contains:'',
|
||||||
|
batch__contains:'',
|
||||||
|
last_time__gte:'',
|
||||||
|
last_time__lte:'',
|
||||||
|
},
|
||||||
|
apiObj: this.$API.wpm.wpr.query,
|
||||||
|
options:[],
|
||||||
|
tableData:[],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleQuery(){
|
||||||
|
let that = this;
|
||||||
|
let querys = [[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品内外初检_批次号"}]];
|
||||||
|
let obj = {},obj1 = {},obj2 = {},obj3 = {};
|
||||||
|
obj.field = 'data__成品内外初检_批次号';
|
||||||
|
obj.value = that.query.batch__contains;
|
||||||
|
obj.compare = '';
|
||||||
|
|
||||||
|
obj1.field = 'last_time';
|
||||||
|
obj1.value = that.query.last_time__gte;
|
||||||
|
obj1.compare = 'gte';
|
||||||
|
|
||||||
|
obj2.field = 'last_time';
|
||||||
|
obj2.value = that.query.last_time__lte;
|
||||||
|
obj2.compare = 'lte';
|
||||||
|
|
||||||
|
obj3.field = 'data__成品内外初检_物料名';
|
||||||
|
obj3.value = that.query.name__contains;
|
||||||
|
obj3.compare = '';
|
||||||
|
|
||||||
|
|
||||||
|
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
|
||||||
|
querys[0].push(obj);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
|
||||||
|
querys[0].push(obj1);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
|
||||||
|
querys[0].push(obj2);
|
||||||
|
}
|
||||||
|
if(that.query.name__contains!==''&&that.query.name__contains!==null){
|
||||||
|
querys[0].push(obj3);
|
||||||
|
}
|
||||||
|
that.params.querys = querys;
|
||||||
|
this.$refs.table.queryData(that.params);
|
||||||
|
},
|
||||||
|
getCountQt(data,type){
|
||||||
|
let count_qt = 0,count = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,190 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="right-panel">
|
||||||
|
<!-- <el-input v-model="query.name__contains"
|
||||||
|
placeholder="产品名称"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input> -->
|
||||||
|
<el-input v-model="query.batch__contains"
|
||||||
|
placeholder="批次号"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
@click="handleExport"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
:params="params"
|
||||||
|
:query="params"
|
||||||
|
id="exportDiv"
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" fixed="left"/>
|
||||||
|
<el-table-column label="批次号" fixed="left">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品性能检测_批次号 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="板号" prop="number" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="剪切" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品性能检测_缺陷项_剪切?scope.row.data.成品性能检测_缺陷项_剪切:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="分辨率" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品性能检测_缺陷项_分辨率?scope.row.data.成品性能检测_缺陷项_分辨率:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="直区" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品性能检测_缺陷项_直区?scope.row.data.成品性能检测_缺陷项_直区:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="S畸变不合格" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品性能检测_缺陷项_S畸变不合格?scope.row.data.成品性能检测_缺陷项_S畸变不合格:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="扭转角不合格" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品性能检测_缺陷项_扭转角不合格?scope.row.data.成品性能检测_缺陷项_扭转角不合格:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="角偏" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品性能检测_缺陷项_角偏?scope.row.data.成品性能检测_缺陷项_角偏:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="白边" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品性能检测_缺陷项_白边?scope.row.data.成品性能检测_缺陷项_白边:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="放大率" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品性能检测_缺陷项_放大率?scope.row.data.成品性能检测_缺陷项_放大率:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="复丝阴影" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品性能检测_缺陷项_复丝阴影?scope.row.data.成品性能检测_缺陷项_复丝阴影:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="灰边" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品性能检测_缺陷项_灰边?scope.row.data.成品性能检测_缺陷项_灰边:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="气密性" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品性能检测_缺陷项_气密性?scope.row.data.成品性能检测_缺陷项_气密性:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="像位移不合格" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品性能检测_缺陷项_像位移不合格?scope.row.data.成品性能检测_缺陷项_像位移不合格:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="垂直度" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品性能检测_缺陷项_垂直度?scope.row.data.成品性能检测_缺陷项_垂直度:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="角尖" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品性能检测_缺陷项_角尖?scope.row.data.成品性能检测_缺陷项_角尖:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.成品性能检测_缺陷项_备注 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "statistics_guan",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
params: {
|
||||||
|
ordering:'data__成品性能检测_批次号',
|
||||||
|
querys:[[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品性能检测_批次号"}]],
|
||||||
|
},
|
||||||
|
query:{
|
||||||
|
name__contains:'',
|
||||||
|
batch__contains:'',
|
||||||
|
last_time__gte:'',
|
||||||
|
last_time__lte:'',
|
||||||
|
},
|
||||||
|
apiObj: this.$API.wpm.wpr.query,
|
||||||
|
options:[],
|
||||||
|
tableData:[],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleQuery(){
|
||||||
|
let that = this;
|
||||||
|
let querys = [[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品性能检测_批次号"}]];
|
||||||
|
let obj = {},obj1 = {},obj2 = {},obj3 = {};
|
||||||
|
obj.field = 'data__成品性能检测_批次号';
|
||||||
|
obj.value = that.query.batch__contains;
|
||||||
|
obj.compare = '';
|
||||||
|
|
||||||
|
obj1.field = 'last_time';
|
||||||
|
obj1.value = that.query.last_time__gte;
|
||||||
|
obj1.compare = 'gte';
|
||||||
|
|
||||||
|
obj2.field = 'last_time';
|
||||||
|
obj2.value = that.query.last_time__lte;
|
||||||
|
obj2.compare = 'lte';
|
||||||
|
|
||||||
|
obj3.field = 'data__成品性能检测_物料名';
|
||||||
|
obj3.value = that.query.name__contains;
|
||||||
|
obj3.compare = '';
|
||||||
|
|
||||||
|
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
|
||||||
|
querys[0].push(obj);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
|
||||||
|
querys[0].push(obj1);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
|
||||||
|
querys[0].push(obj2);
|
||||||
|
}
|
||||||
|
if(that.query.name__contains!==''&&that.query.name__contains!==null){
|
||||||
|
querys[0].push(obj3);
|
||||||
|
}
|
||||||
|
that.params.querys = querys;
|
||||||
|
this.$refs.table.queryData(that.params);
|
||||||
|
},
|
||||||
|
getCountQt(data,type){
|
||||||
|
let count_qt = 0,count = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,230 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="right-panel">
|
||||||
|
<!-- <el-input v-model="query.name__contains"
|
||||||
|
placeholder="产品名称"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input> -->
|
||||||
|
<el-input v-model="query.batch__contains"
|
||||||
|
placeholder="批次号"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
@click="handleExport"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
:params="params"
|
||||||
|
:query="params"
|
||||||
|
id="exportDiv"
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" fixed="left"/>
|
||||||
|
<el-table-column label="批次号" fixed="left">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_批次号 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="板号" prop="number" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="腐蚀A" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_腐蚀A?scope.row.data.中检二_缺陷项_腐蚀A:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="亮道" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_亮道?scope.row.data.中检二_缺陷项_亮道:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="凹面坑" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_凹面坑?scope.row.data.中检二_缺陷项_凹面坑:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="小面坑" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_小面坑?scope.row.data.中检二_缺陷项_小面坑:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="台划" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_台划?scope.row.data.中检二_缺陷项_台划:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="台高" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_台高?scope.row.data.中检二_缺陷项_台高:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="倒角麻" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_倒角麻?scope.row.data.中检二_缺陷项_倒角麻:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="台" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_台?scope.row.data.中检二_缺陷项_台:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="大外划硌" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_大外划硌?scope.row.data.中检二_缺陷项_大外划硌:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="炸" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_炸?scope.row.data.中检二_缺陷项_炸:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="崩废" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_崩废?scope.row.data.中检二_缺陷项_崩废:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="小崩" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_小崩?scope.row.data.中检二_缺陷项_小崩:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="总厚" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_总厚?scope.row.data.中检二_缺陷项_总厚:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="前角崩" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_前角崩?scope.row.data.中检二_缺陷项_前角崩:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="小柱划" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_小柱划?scope.row.data.中检二_缺陷项_小柱划:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="前小柱划" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_前小柱划?scope.row.data.中检二_缺陷项_前小柱划:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="前角麻" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_前角麻?scope.row.data.中检二_缺陷项_前角麻:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="平麻" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_平麻?scope.row.data.中检二_缺陷项_平麻:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="圆角划" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_圆角划?scope.row.data.中检二_缺陷项_圆角划:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="平面划" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_平面划?scope.row.data.中检二_缺陷项_平面划:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="小面硌" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_小面硌?scope.row.data.中检二_缺陷项_小面硌:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="前台崩" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_前台崩?scope.row.data.中检二_缺陷项_前台崩:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_备注 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "statistics_guan",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
params: {
|
||||||
|
ordering:'data__成品自检_批次号',
|
||||||
|
querys:[[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品自检_批次号"}]],
|
||||||
|
},
|
||||||
|
query:{
|
||||||
|
name__contains:'',
|
||||||
|
batch__contains:'',
|
||||||
|
last_time__gte:'',
|
||||||
|
last_time__lte:'',
|
||||||
|
},
|
||||||
|
apiObj: this.$API.wpm.wpr.query,
|
||||||
|
options:[],
|
||||||
|
tableData:[],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleQuery(){
|
||||||
|
let that = this;
|
||||||
|
let querys = [[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品自检_批次号"}]];
|
||||||
|
let obj = {},obj1 = {},obj2 = {},obj3 = {};
|
||||||
|
obj.field = 'data__成品自检_批次号';
|
||||||
|
obj.value = that.query.batch__contains;
|
||||||
|
obj.compare = '';
|
||||||
|
|
||||||
|
obj1.field = 'last_time';
|
||||||
|
obj1.value = that.query.last_time__gte;
|
||||||
|
obj1.compare = 'gte';
|
||||||
|
|
||||||
|
obj2.field = 'last_time';
|
||||||
|
obj2.value = that.query.last_time__lte;
|
||||||
|
obj2.compare = 'lte';
|
||||||
|
|
||||||
|
obj3.field = 'data__成品自检_物料名';
|
||||||
|
obj3.value = that.query.name__contains;
|
||||||
|
obj3.compare = '';
|
||||||
|
|
||||||
|
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
|
||||||
|
querys[0].push(obj);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
|
||||||
|
querys[0].push(obj1);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
|
||||||
|
querys[0].push(obj2);
|
||||||
|
}
|
||||||
|
if(that.query.name__contains!==''&&that.query.name__contains!==null){
|
||||||
|
querys[0].push(obj3);
|
||||||
|
}
|
||||||
|
that.params.querys = querys;
|
||||||
|
this.$refs.table.queryData(that.params);
|
||||||
|
},
|
||||||
|
getCountQt(data,type){
|
||||||
|
let count_qt = 0,count = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,164 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="right-panel">
|
||||||
|
<!-- <el-input v-model="query.name__contains"
|
||||||
|
placeholder="产品名称"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input> -->
|
||||||
|
<el-input v-model="query.batch__contains"
|
||||||
|
placeholder="批次号"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
@click="handleExport"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
:params="params"
|
||||||
|
:query="params"
|
||||||
|
id="exportDiv"
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" fixed="left"/>
|
||||||
|
<el-table-column label="批次号" fixed="left">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.分检_批次号 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="板号" prop="number" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="S畸变" align="center" class-name="colorheader1">
|
||||||
|
<el-table-column label="差值" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.分检_检测项_S畸变 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合格数" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.分检_缺陷项_S畸变不合格?1-scope.row.data.分检_缺陷项_S畸变不合格:1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="像位移" align="center" class-name="colorheader2">
|
||||||
|
<el-table-column label="差值" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.分检_检测项_像位移 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合格数" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.分检_缺陷项_像位移不合格?1-scope.row.data.分检_缺陷项_像位移不合格:1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="炸废" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.分检_缺陷项_炸废?scope.row.data.分检_缺陷项_炸废:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="放大率" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.分检_缺陷项_放大率?scope.row.data.分检_缺陷项_放大率:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="角偏" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.分检_缺陷项_角偏?scope.row.data.分检_缺陷项_角偏:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="扭转角不合格" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.分检_缺陷项_扭转角不合格?scope.row.data.分检_缺陷项_扭转角不合格:0}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.分检_缺陷项_备注 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "statistics_guan",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
params: {
|
||||||
|
ordering:'data__分检_批次号',
|
||||||
|
querys:[[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"分检_批次号"}]],
|
||||||
|
},
|
||||||
|
query:{
|
||||||
|
name__contains:'',
|
||||||
|
batch__contains:'',
|
||||||
|
last_time__gte:'',
|
||||||
|
last_time__lte:'',
|
||||||
|
},
|
||||||
|
apiObj: this.$API.wpm.wpr.query,
|
||||||
|
options:[],
|
||||||
|
tableData:[],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleQuery(){
|
||||||
|
let that = this;
|
||||||
|
let querys = [[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"分检_批次号"}]];
|
||||||
|
let obj = {},obj1 = {},obj2 = {},obj3 = {};
|
||||||
|
obj.field = 'data__分检_批次号';
|
||||||
|
obj.value = that.query.batch__contains;
|
||||||
|
obj.compare = '';
|
||||||
|
|
||||||
|
obj1.field = 'last_time';
|
||||||
|
obj1.value = that.query.last_time__gte;
|
||||||
|
obj1.compare = 'gte';
|
||||||
|
|
||||||
|
obj2.field = 'last_time';
|
||||||
|
obj2.value = that.query.last_time__lte;
|
||||||
|
obj2.compare = 'lte';
|
||||||
|
|
||||||
|
obj3.field = 'data__分检_物料名';
|
||||||
|
obj3.value = that.query.name__contains;
|
||||||
|
obj3.compare = '';
|
||||||
|
|
||||||
|
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
|
||||||
|
querys[0].push(obj);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
|
||||||
|
querys[0].push(obj1);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
|
||||||
|
querys[0].push(obj2);
|
||||||
|
}
|
||||||
|
if(that.query.name__contains!==''&&that.query.name__contains!==null){
|
||||||
|
querys[0].push(obj3);
|
||||||
|
}
|
||||||
|
that.params.querys = querys;
|
||||||
|
this.$refs.table.queryData(that.params);
|
||||||
|
},
|
||||||
|
getCountQt(data,type){
|
||||||
|
let count_qt = 0,count = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
|
|
@ -2,29 +2,16 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
|
<!-- <el-input v-model="query.name__contains"
|
||||||
|
placeholder="产品名称"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input> -->
|
||||||
<el-input v-model="query.batch__contains"
|
<el-input v-model="query.batch__contains"
|
||||||
placeholder="批次号"
|
placeholder="批次号"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px;"
|
style="width: 200px;"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-date-picker
|
|
||||||
v-model="query.last_time__gte"
|
|
||||||
type="datetime"
|
|
||||||
placeholder="变动时间起"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
clearable
|
|
||||||
style="width: 200px; margin: 5px"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
<el-date-picker
|
|
||||||
v-model="query.last_time__lte"
|
|
||||||
type="datetime"
|
|
||||||
placeholder="变动时间止"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
clearable
|
|
||||||
style="width: 200px; margin:0"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
|
|
@ -34,8 +21,7 @@
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
class="tables"
|
class="tables"
|
||||||
type="primary"
|
type="primary"
|
||||||
>导出</el-button
|
>导出</el-button>
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
|
|
@ -48,134 +34,139 @@
|
||||||
stripe
|
stripe
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" fixed="left"/>
|
<el-table-column type="index" width="50" fixed="left"/>
|
||||||
|
<el-table-column label="批次号" fixed="left">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.毛坯检测_批次号 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="板号" prop="number" fixed="left">
|
<el-table-column label="板号" prop="number" fixed="left">
|
||||||
<!-- <template #default="scope">
|
|
||||||
{{ scope.row.number }}<span v-if="scope.row.data">[{{ scope.row.data.毛坯检测_批次号 }}]</span>
|
|
||||||
</template> -->
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="放大率¢2mm" align="center" class-name="colorheader1">
|
<el-table-column label="放大率¢2mm" align="center" class-name="colorheader1">
|
||||||
<el-table-column label="差值" class-name="colorheader1">
|
<el-table-column label="差值" class-name="colorheader1">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data">{{ scope.row.data.毛坯检测_检测项_放大率2mm }}</span>
|
<span>{{ scope.row.data.毛坯检测_检测项_放大率2mm }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合格数" class-name="colorheader1">
|
<el-table-column label="合格数" class-name="colorheader1">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data">{{1- scope.row.data['毛坯检测_缺陷项_放大率¢2mm不合格'] }}</span>
|
<span>{{ scope.row.data['毛坯检测_缺陷项_放大率¢2mm不合格']?1-scope.row.data['毛坯检测_缺陷项_放大率¢2mm不合格']:1 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="放大率¢16mm" align="center" class-name="colorheader2">
|
<el-table-column label="放大率¢16mm" align="center" class-name="colorheader2">
|
||||||
<el-table-column label="差值" class-name="colorheader2">
|
<el-table-column label="差值" class-name="colorheader2">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data">{{ scope.row.data.毛坯检测_检测项_放大率16mm }}</span>
|
<span>{{ scope.row.data.毛坯检测_检测项_放大率16mm }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合格数" class-name="colorheader2">
|
<el-table-column label="合格数" class-name="colorheader2">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data">{{ 1-scope.row.data['毛坯检测_缺陷项_放大率¢16mm不合格'] }}</span>
|
<span>{{ scope.row.data['毛坯检测_缺陷项_放大率¢16mm不合格']?1-scope.row.data['毛坯检测_缺陷项_放大率¢16mm不合格']:1 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="剪切¢18.3mm" align="center" class-name="colorheader3">
|
<el-table-column label="剪切¢18.3mm" align="center" class-name="colorheader3">
|
||||||
<el-table-column label="剪切" class-name="colorheader3">
|
<el-table-column label="剪切" class-name="colorheader3">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data">{{ scope.row.data.毛坯检测_检测项_剪切18mm }}</span>
|
<span>{{ scope.row.data.毛坯检测_检测项_剪切18mm }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="剪切值" class-name="colorheader3">
|
<el-table-column label="剪切值" class-name="colorheader3">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data">{{ scope.row.data.毛坯检测_检测项_剪切值18mm }}</span>
|
<span>{{ scope.row.data.毛坯检测_检测项_剪切值18mm }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合格数" class-name="colorheader3">
|
<el-table-column label="合格数" class-name="colorheader3">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data">{{ 1-scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格'] }}</span>
|
<span>{{ scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']?1-scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']:1 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="可加工" class-name="colorheader3">
|
<!-- <el-table-column label="可加工" class-name="colorheader3">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data">{{ scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格'] }}</span>
|
<span>{{ scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']?1-scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="暗点" align="center" class-name="colorheader4">
|
<el-table-column label="暗点" align="center" class-name="colorheader4">
|
||||||
<el-table-column label="内标合格" class-name="colorheader4">
|
<el-table-column label="内标合格" class-name="colorheader4">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data.毛坯检测_缺陷项_暗点=='合格'">1</span>
|
<span v-if="scope.row.data.毛坯检测_检测项_暗点=='合格'">1</span>
|
||||||
|
<span v-else>0</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="长点不合格" class-name="colorheader4">
|
<el-table-column label="长点不合格" class-name="colorheader4">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data.毛坯检测_缺陷项_暗点=='不合格'">1</span>
|
<span v-if="scope.row.data.毛坯检测_检测项_暗点=='不合格'">1</span>
|
||||||
|
<span v-else>0</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="可加工" class-name="colorheader4">
|
<el-table-column label="可加工" class-name="colorheader4">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data.毛坯检测_缺陷项_暗点==''">1</span>
|
<span v-if="scope.row.data.毛坯检测_检测项_暗点==''||scope.row.data.毛坯检测_检测项_暗点==null">1</span>
|
||||||
|
<span v-else>0</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="暗点重" align="center" class-name="colorheader5">
|
<el-table-column label="暗点重" align="center" class-name="colorheader5">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data.毛坯检测_缺陷项_暗点重不合格">{{ scope.row.data.毛坯检测_缺陷项_暗点重不合格 }}</span>
|
<span>{{ scope.row.data.毛坯检测_缺陷项_暗点重?scope.row.data.毛坯检测_缺陷项_暗点重:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="花丝" align="center" class-name="colorheader5">
|
<el-table-column label="花丝" align="center" class-name="colorheader6">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data.毛坯检测_缺陷项_花丝不合格">{{scope.row.data.毛坯检测_缺陷项_花丝不合格 }}</span>
|
<span>{{scope.row.data.毛坯检测_缺陷项_花丝?scope.row.data.毛坯检测_缺陷项_花丝:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="网格" align="center" class-name="colorheader5">
|
<el-table-column label="网格" align="center" class-name="colorheader7">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data.毛坯检测_缺陷项_网格不合格">{{scope.row.data.毛坯检测_缺陷项_网格不合格 }}</span>
|
<span>{{scope.row.data.毛坯检测_缺陷项_网格?scope.row.data.毛坯检测_缺陷项_网格:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="花朵" align="center" class-name="colorheader5">
|
<el-table-column label="花朵" align="center" class-name="colorheader1">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data.毛坯检测_缺陷项_花朵不合格">{{scope.row.data.毛坯检测_缺陷项_花朵不合格 }}</span>
|
<span>{{scope.row.data.毛坯检测_缺陷项_花朵?scope.row.data.毛坯检测_缺陷项_花朵:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="S畸变" align="center" class-name="colorheader5">
|
<el-table-column label="S畸变" align="center" class-name="colorheader2">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data.毛坯检测_缺陷项_S畸变不合格">{{scope.row.data.毛坯检测_缺陷项_S畸变不合格 }}</span>
|
<span>{{scope.row.data.毛坯检测_缺陷项_S畸变不合格?scope.row.data.毛坯检测_缺陷项_S畸变不合格:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="弓形畸变不合格" align="center" class-name="colorheader5">
|
<el-table-column label="弓形畸变不合格" align="center" class-name="colorheader3">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data.毛坯检测_缺陷项_弓形畸变不合格不合格">{{ scope.row.data.毛坯检测_缺陷项_弓形畸变不合格不合格 }}</span>
|
<span>{{ scope.row.data.毛坯检测_缺陷项_弓形畸变不合格?scope.row.data.毛坯检测_缺陷项_弓形畸变不合格:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="炸废" class-name="colorheader5">
|
<el-table-column label="炸废" align="center" class-name="colorheader4">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data.毛坯检测_缺陷项_炸废">{{ scope.row.data.毛坯检测_缺陷项_炸废 }}</span>
|
<span>{{ scope.row.data.毛坯检测_缺陷项_炸废?scope.row.data.毛坯检测_缺陷项_炸废:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="角偏" align="center" class-name="colorheader5">
|
<el-table-column label="角偏" align="center" class-name="colorheader5">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data.毛坯检测_缺陷项_角偏不合格">{{ 1-scope.row.data.毛坯检测_缺陷项_角偏不合格 }}</span>
|
<span>{{ scope.row.data.毛坯检测_缺陷项_角偏?scope.row.data.毛坯检测_缺陷项_角偏:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="出口" align="center" class-name="colorheader6">
|
<el-table-column label="出口" align="center" class-name="colorheader6">
|
||||||
<el-table-column label="国标" class-name="colorheader6">
|
<el-table-column label="国标" class-name="colorheader6">
|
||||||
<template #default="scope">
|
<!-- <template #default="scope">
|
||||||
<span v-if="scope.row.data"></span>
|
<span></span>
|
||||||
</template>
|
</template> -->
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="内标" class-name="colorheader6">
|
<el-table-column label="内标" class-name="colorheader6">
|
||||||
<template #default="scope">
|
<!-- <template #default="scope">
|
||||||
<span v-if="scope.row.data"></span>
|
<span></span>
|
||||||
</template>
|
</template> -->
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="内标放宽" class-name="colorheader6">
|
<el-table-column label="内标放宽" class-name="colorheader6">
|
||||||
<template #default="scope">
|
<!-- <template #default="scope">
|
||||||
<span v-if="scope.row.data"></span>
|
<span></span>
|
||||||
</template>
|
</template> -->
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" class-name="colorheader2">
|
<el-table-column label="备注" align="center" class-name="colorheader7">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data">{{ scope.row.data.毛坯检测_缺陷项_备注 }}</span>
|
<span>{{ scope.row.data.毛坯检测_缺陷项_备注 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
@ -189,15 +180,15 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
params: {
|
params: {
|
||||||
ordering:'-create_time',
|
ordering:'-data__毛坯检测_小日期',
|
||||||
|
ordering:'data__毛坯检测_批次号',
|
||||||
querys:[[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"毛坯检测_批次号"}]],
|
querys:[[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"毛坯检测_批次号"}]],
|
||||||
},
|
},
|
||||||
query:{
|
query:{
|
||||||
|
name__contains:'',
|
||||||
batch__contains:'',
|
batch__contains:'',
|
||||||
last_time__gte:'',
|
last_time__gte:'',
|
||||||
last_time__lte:'',
|
last_time__lte:'',
|
||||||
|
|
||||||
},
|
},
|
||||||
apiObj: this.$API.wpm.wpr.query,
|
apiObj: this.$API.wpm.wpr.query,
|
||||||
options:[],
|
options:[],
|
||||||
|
|
@ -207,40 +198,38 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
handleQuery(){
|
handleQuery(){
|
||||||
let that = this;
|
let that = this;
|
||||||
let querys = [],arr1=[],arr2=[];
|
let querys = [[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"毛坯检测_批次号"}]];
|
||||||
let obj = {},obj1 = {},obj2 = {};
|
let obj = {},obj1 = {},obj2 = {},obj3 = {};
|
||||||
obj.field = 'batch__contains';
|
obj.field = 'data__毛坯检测_批次号';
|
||||||
obj.value = that.query.batch__contains;
|
obj.value = that.query.batch__contains;
|
||||||
obj.compare = '';
|
obj.compare = '';
|
||||||
|
|
||||||
obj1.field = 'last_time__gte';
|
obj1.field = 'last_time';
|
||||||
obj1.value = that.query.last_time__gte;
|
obj1.value = that.query.last_time__gte;
|
||||||
obj1.compare = 'gte';
|
obj1.compare = 'gte';
|
||||||
|
|
||||||
obj2.field = 'last_time__lte';
|
obj2.field = 'last_time';
|
||||||
obj2.value = that.query.last_time__lte;
|
obj2.value = that.query.last_time__lte;
|
||||||
obj2.compare = 'lte';
|
obj2.compare = 'lte';
|
||||||
|
|
||||||
if((that.query.last_time__gte==''||that.query.last_time__gte==null)&&(that.query.last_time__lte==''||that.query.last_time__lte==null)&&that.query.batch__contains!==''&&that.query.batch__contains!==null){
|
obj3.field = 'data__毛坯检测_物料名';
|
||||||
querys.push(obj);
|
obj3.value = that.query.name__contains;
|
||||||
|
obj3.compare = '';
|
||||||
|
|
||||||
|
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
|
||||||
|
querys[0].push(obj);
|
||||||
}
|
}
|
||||||
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
|
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
|
||||||
arr1.push(obj1);
|
querys[0].push(obj1);
|
||||||
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
|
|
||||||
arr1.push(obj);
|
|
||||||
}
|
|
||||||
querys.push(arr1)
|
|
||||||
}
|
}
|
||||||
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
|
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
|
||||||
arr2.push(obj2);
|
querys[0].push(obj2);
|
||||||
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
|
|
||||||
arr2.push(obj);
|
|
||||||
}
|
}
|
||||||
querys.push(arr2)
|
if(that.query.name__contains!==''&&that.query.name__contains!==null){
|
||||||
|
querys[0].push(obj3);
|
||||||
}
|
}
|
||||||
let params = {};
|
that.params.querys = querys;
|
||||||
params.querys = querys;
|
this.$refs.table.queryData(that.params);
|
||||||
this.$refs.table.queryData(params);
|
|
||||||
},
|
},
|
||||||
getCountQt(data,type){
|
getCountQt(data,type){
|
||||||
let count_qt = 0,count = 0;
|
let count_qt = 0,count = 0;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,235 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="right-panel">
|
||||||
|
<!-- <el-input v-model="query.name__contains"
|
||||||
|
placeholder="产品名称"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input> -->
|
||||||
|
<el-input v-model="query.batch__contains"
|
||||||
|
placeholder="批次号"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
@click="handleExport"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
:params="params"
|
||||||
|
:query="querys"
|
||||||
|
id="exportDiv"
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" fixed="left"/>
|
||||||
|
<el-table-column label="批次号" fixed="left">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭后检测_批次号 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="板号" prop="number" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="炉号" prop="number" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="扭转角" align="center" class-name="colorheader1">
|
||||||
|
<el-table-column label="差值" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭后检测_检测项_扭转角 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合格数" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.扭后检测_缺陷项_扭转角不合格?1-scope.row.data.扭后检测_缺陷项_扭转角不合格:1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="暗点" align="center" class-name="colorheader2">
|
||||||
|
<el-table-column label="内标合格" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.data.扭后检测_检测项_暗点=='合格'">1</span>
|
||||||
|
<span v-else>0</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="长点不合格" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.data.扭后检测_检测项_暗点=='不合格'">1</span>
|
||||||
|
<span v-else>0</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="可加工" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.data.扭后检测_检测项_暗点==''||scope.row.data.扭后检测_检测项_暗点==null">1</span>
|
||||||
|
<span v-else>0</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="黑网轻" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭后检测_缺陷项_黑网轻?scope.row.data.扭后检测_缺陷项_黑网轻:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="黑网重" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭后检测_缺陷项_黑网重?scope.row.data.扭后检测_缺陷项_黑网重:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="白网轻" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭后检测_缺陷项_白网轻?scope.row.data.扭后检测_缺陷项_白网轻:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="白网重" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭后检测_缺陷项_白网重?scope.row.data.扭后检测_缺陷项_白网重:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="小网轻" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.扭后检测_缺陷项_小网轻? scope.row.扭后检测_缺陷项_小网轻:0}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="小网重" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.扭后检测_缺陷项_小网重?scope.row.扭后检测_缺陷项_小网重:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="扭后炸废" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.扭后检测_缺陷项_扭后炸废?scope.row.data.扭后检测_缺陷项_扭后炸废:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="扭后炸纹" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.扭后检测_缺陷项_扭后炸纹?scope.row.data.扭后检测_缺陷项_扭后炸纹:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="分辨率" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.扭后检测_缺陷项_分辨率?scope.row.data.扭后检测_缺陷项_分辨率:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="S畸变不合格" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.扭后检测_缺陷项_S畸变不合格?scope.row.data.扭后检测_缺陷项_S畸变不合格:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="弓形畸变不合格" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.扭后检测_缺陷项_弓形畸变不合格?scope.row.data.扭后检测_缺陷项_S畸变不合格:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="角偏" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.扭后检测_缺陷项_角偏?scope.row.data.扭后检测_缺陷项_角偏:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="花丝" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.扭后检测_缺陷项_花丝?scope.row.data.扭后检测_缺陷项_花丝:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="暗点重" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.扭后检测_缺陷项_暗点重?scope.row.data.扭后检测_缺陷项_暗点重:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="暗点合格" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.扭后检测_缺陷项_暗点合格?scope.row.data.扭后检测_缺陷项_暗点合格:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="高差" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{scope.row.data.扭后检测_缺陷项_高差?scope.row.data.扭后检测_缺陷项_高差:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.扭后检测_备注">{{scope.row.扭后检测_备注 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "statistics_guan",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
params: {
|
||||||
|
ordering:'data__扭后检测_批次号',
|
||||||
|
querys:[[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"扭后检测_批次号"}]],
|
||||||
|
},
|
||||||
|
querys:{
|
||||||
|
ordering:'-create_time'
|
||||||
|
},
|
||||||
|
query:{
|
||||||
|
name__contains:'',
|
||||||
|
batch__contains:'',
|
||||||
|
last_time__gte:'',
|
||||||
|
last_time__lte:'',
|
||||||
|
|
||||||
|
},
|
||||||
|
apiObj: this.$API.wpm.wpr.query,
|
||||||
|
options:[],
|
||||||
|
tableData:[],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleQuery(){
|
||||||
|
let that = this;
|
||||||
|
let querys = [];
|
||||||
|
let obj = {},obj1 = {},obj2 = {},obj3 = {};
|
||||||
|
obj.field = 'data__扭后检测_批次号';
|
||||||
|
obj.value = that.query.batch__contains;
|
||||||
|
obj.compare = '';
|
||||||
|
|
||||||
|
obj1.field = 'last_time';
|
||||||
|
obj1.value = that.query.last_time__gte;
|
||||||
|
obj1.compare = 'gte';
|
||||||
|
|
||||||
|
obj2.field = 'last_time';
|
||||||
|
obj2.value = that.query.last_time__lte;
|
||||||
|
obj2.compare = 'lte';
|
||||||
|
|
||||||
|
obj3.field = 'data__扭后检测_物料名';
|
||||||
|
obj3.value = that.query.name__contains;
|
||||||
|
obj3.compare = '';
|
||||||
|
|
||||||
|
querys=[[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"扭后检测_批次号"}]]
|
||||||
|
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
|
||||||
|
querys[0].push(obj);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
|
||||||
|
querys[0].push(obj1)
|
||||||
|
}
|
||||||
|
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
|
||||||
|
querys[0].push(obj2)
|
||||||
|
}
|
||||||
|
if(that.query.name__contains!==''&&that.query.name__contains!==null){
|
||||||
|
querys[0].push(obj3);
|
||||||
|
}
|
||||||
|
that.querys.querys = querys;
|
||||||
|
this.$refs.table.queryData(that.querys);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,205 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="right-panel">
|
||||||
|
<!-- <el-input v-model="query.name__contains"
|
||||||
|
placeholder="产品名称"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input> -->
|
||||||
|
<el-input v-model="query.batch__contains"
|
||||||
|
placeholder="批次号"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
@click="handleExport"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
:params="params"
|
||||||
|
:query="params"
|
||||||
|
id="exportDiv"
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" fixed="left"/>
|
||||||
|
<el-table-column label="批次号" fixed="left">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检一_批次号 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="板号" prop="number" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="台阶划伤" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检一_缺陷项_台阶划伤?scope.row.data.中检一_缺陷项_台阶划伤:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="柱面划伤" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检一_缺陷项_柱面划伤?scope.row.data.中检一_缺陷项_柱面划伤:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="台棱" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检一_缺陷项_台棱?scope.row.data.中检一_缺陷项_台棱:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="台糙" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检一_缺陷项_台糙?scope.row.data.中检一_缺陷项_台糙:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="外黑" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检一_缺陷项_外黑?scope.row.data.中检一_缺陷项_外黑:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="尺寸大/小" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['中检一_缺陷项_尺寸大/小']?scope.row.data['中检一_缺陷项_尺寸大/小']:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="拆头" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检一_缺陷项_拆头?scope.row.data.中检一_缺陷项_拆头:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="外磕" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检一_缺陷项_外磕?scope.row.data.中检一_缺陷项_外磕:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="掉头" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检一_缺陷项_掉头?scope.row.data.中检一_缺陷项_掉头:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="打毛/打台" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['中检一_缺陷项_打毛/打台']?scope.row.data['中检一_缺陷项_打毛/打台']:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="量崩" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检一_缺陷项_量崩?scope.row.data.中检一_缺陷项_量崩:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="崩" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检一_缺陷项_崩?scope.row.data.中检一_缺陷项_崩:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="喷码" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检一_缺陷项_喷码?scope.row.data.中检一_缺陷项_喷码:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="修崩/炸" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['中检一_缺陷项_修崩/炸']?scope.row.data['中检一_缺陷项_修崩/炸']:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="炸" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检一_缺陷项_炸?scope.row.data.中检一_缺陷项_炸:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="偏" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检一_缺陷项_偏?scope.row.data.中检一_缺陷项_偏:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="掉皮" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检一_缺陷项_掉皮?scope.row.data.中检一_缺陷项_掉皮:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检一_缺陷项_备注 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "statistics_guan",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
params: {
|
||||||
|
ordering:'data__中检一_批次号',
|
||||||
|
querys:[[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"中检一_批次号"}]],
|
||||||
|
},
|
||||||
|
query:{
|
||||||
|
name__contains:'',
|
||||||
|
batch__contains:'',
|
||||||
|
last_time__gte:'',
|
||||||
|
last_time__lte:'',
|
||||||
|
},
|
||||||
|
apiObj: this.$API.wpm.wpr.query,
|
||||||
|
options:[],
|
||||||
|
tableData:[],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleQuery(){
|
||||||
|
let that = this;
|
||||||
|
let querys = [[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"中检一_批次号"}]];
|
||||||
|
let obj = {},obj1 = {},obj2 = {},obj3 = {};
|
||||||
|
obj.field = 'data__中检一_批次号';
|
||||||
|
obj.value = that.query.batch__contains;
|
||||||
|
obj.compare = '';
|
||||||
|
|
||||||
|
obj1.field = 'last_time';
|
||||||
|
obj1.value = that.query.last_time__gte;
|
||||||
|
obj1.compare = 'gte';
|
||||||
|
|
||||||
|
obj2.field = 'last_time';
|
||||||
|
obj2.value = that.query.last_time__lte;
|
||||||
|
obj2.compare = 'lte';
|
||||||
|
|
||||||
|
obj3.field = 'data__中检一_物料名';
|
||||||
|
obj3.value = that.query.name__contains;
|
||||||
|
obj3.compare = '';
|
||||||
|
|
||||||
|
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
|
||||||
|
querys[0].push(obj);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
|
||||||
|
querys[0].push(obj1);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
|
||||||
|
querys[0].push(obj2);
|
||||||
|
}
|
||||||
|
if(that.query.name__contains!==''&&that.query.name__contains!==null){
|
||||||
|
querys[0].push(obj3);
|
||||||
|
}
|
||||||
|
that.params.querys = querys;
|
||||||
|
this.$refs.table.queryData(that.params);
|
||||||
|
},
|
||||||
|
getCountQt(data,type){
|
||||||
|
let count_qt = 0,count = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,205 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="right-panel">
|
||||||
|
<!-- <el-input v-model="query.name__contains"
|
||||||
|
placeholder="产品名称"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input> -->
|
||||||
|
<el-input v-model="query.batch__contains"
|
||||||
|
placeholder="批次号"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
@click="handleExport"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
:params="params"
|
||||||
|
:query="params"
|
||||||
|
id="exportDiv"
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" fixed="left"/>
|
||||||
|
<el-table-column label="批次号" fixed="left">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_批次号 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="板号" prop="number" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="炸废" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_炸废?scope.row.data.中检二_缺陷项_炸废:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="崩" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_崩?scope.row.data.中检二_缺陷项_崩:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="划伤少" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_划伤少?scope.row.data.中检二_缺陷项_划伤少:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="划伤多" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_划伤多?scope.row.data.中检二_缺陷项_划伤多:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="斜角/圆角" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['中检二_缺陷项_斜角/圆角']?scope.row.data['中检二_缺陷项_斜角/圆角']:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="角偏" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_角偏?scope.row.data.中检二_缺陷项_角偏:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="圆角划伤" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_圆角划伤?scope.row.data.中检二_缺陷项_圆角划伤:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="圆角抛小" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_圆角抛小?scope.row.data.中检二_缺陷项_圆角抛小:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="圆角高亮" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_圆角高亮?scope.row.data.中检二_缺陷项_圆角高亮:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="圆角麻点" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_圆角麻点?scope.row.data.中检二_缺陷项_圆角麻点:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="圆角没抛到/抛光尺寸不足" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['中检二_缺陷项_圆角没抛到/抛光尺寸不足']?scope.row.data['中检二_缺陷项_圆角没抛到/抛光尺寸不足']:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="凹面偏" align="center" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_凹面偏?scope.row.data.中检二_缺陷项_凹面偏:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="凹面炸废" align="center" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_凹面炸废?scope.row.data.中检二_缺陷项_凹面炸废:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="凹面崩边" align="center" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_凹面崩边?scope.row.data.中检二_缺陷项_凹面崩边:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="凹面划伤" align="center" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_凹面划伤?scope.row.data.中检二_缺陷项_凹面划伤:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="凹面麻点" align="center" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_凹面麻点?scope.row.data.中检二_缺陷项_凹面麻点:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="凹面硌点" align="center" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_凹面硌点?scope.row.data.中检二_缺陷项_凹面硌点:0 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.中检二_缺陷项_备注 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "statistics_guan",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
params: {
|
||||||
|
ordering:'data__中检二_批次号',
|
||||||
|
querys:[[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"中检二_批次号"}]],
|
||||||
|
},
|
||||||
|
query:{
|
||||||
|
name__contains:'',
|
||||||
|
batch__contains:'',
|
||||||
|
last_time__gte:'',
|
||||||
|
last_time__lte:'',
|
||||||
|
},
|
||||||
|
apiObj: this.$API.wpm.wpr.query,
|
||||||
|
options:[],
|
||||||
|
tableData:[],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleQuery(){
|
||||||
|
let that = this;
|
||||||
|
let querys = [[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"中检二_批次号"}]];
|
||||||
|
let obj = {},obj1 = {},obj2 = {},obj3 = {};
|
||||||
|
obj.field = 'data__中检二_批次号';
|
||||||
|
obj.value = that.query.batch__contains;
|
||||||
|
obj.compare = '';
|
||||||
|
|
||||||
|
obj1.field = 'last_time';
|
||||||
|
obj1.value = that.query.last_time__gte;
|
||||||
|
obj1.compare = 'gte';
|
||||||
|
|
||||||
|
obj2.field = 'last_time';
|
||||||
|
obj2.value = that.query.last_time__lte;
|
||||||
|
obj2.compare = 'lte';
|
||||||
|
|
||||||
|
obj3.field = 'data__中检二_物料名';
|
||||||
|
obj3.value = that.query.name__contains;
|
||||||
|
obj3.compare = '';
|
||||||
|
|
||||||
|
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
|
||||||
|
querys[0].push(obj);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
|
||||||
|
querys[0].push(obj1);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
|
||||||
|
querys[0].push(obj2);
|
||||||
|
}
|
||||||
|
if(that.query.name__contains!==''&&that.query.name__contains!==null){
|
||||||
|
querys[0].push(obj3);
|
||||||
|
}
|
||||||
|
that.params.querys = querys;
|
||||||
|
this.$refs.table.queryData(that.params);
|
||||||
|
},
|
||||||
|
getCountQt(data,type){
|
||||||
|
let count_qt = 0,count = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
|
|
@ -60,7 +60,7 @@ export default {
|
||||||
if(that.g!==null){
|
if(that.g!==null){
|
||||||
that.updataGraph();
|
that.updataGraph();
|
||||||
}else{
|
}else{
|
||||||
that.g = new dagreD3.graphlib.Graph().setGraph({
|
that.g = new dagreD3.graphlib.Graph({multigraph: true,}).setGraph({
|
||||||
rankdir: that.rankdir,
|
rankdir: that.rankdir,
|
||||||
nodesep: 40,
|
nodesep: 40,
|
||||||
edgesep: 25, //两条线之间的距离
|
edgesep: 25, //两条线之间的距离
|
||||||
|
|
@ -89,8 +89,9 @@ export default {
|
||||||
that.edges.forEach((transition0) => {
|
that.edges.forEach((transition0) => {
|
||||||
that.g.setEdge(transition0.source,transition0.target,{
|
that.g.setEdge(transition0.source,transition0.target,{
|
||||||
label: transition0.label,// 边标签
|
label: transition0.label,// 边标签
|
||||||
|
id: transition0.id,
|
||||||
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px", // 根据后台数据来改变连线的颜色
|
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px", // 根据后台数据来改变连线的颜色
|
||||||
});
|
}, transition0.id);
|
||||||
});
|
});
|
||||||
// 创建渲染器
|
// 创建渲染器
|
||||||
let render = new dagreD3.render();
|
let render = new dagreD3.render();
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card
|
<el-card
|
||||||
style="margin-top: 4px; position: relative"
|
style="margin-top: 4px; position: relative"
|
||||||
v-if="cateType === 'rpj'"
|
v-if="cateType == 'rpj'"
|
||||||
>
|
>
|
||||||
<el-descriptions title="入厂项目" :column="3">
|
<el-descriptions title="入厂项目" :column="3">
|
||||||
<el-descriptions-item label="相关方:">
|
<el-descriptions-item label="相关方:">
|
||||||
|
|
@ -209,6 +209,36 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-card
|
||||||
|
style="margin-top: 4px; position: relative"
|
||||||
|
v-if="cateType == 'backfire'"
|
||||||
|
header="交接信息"
|
||||||
|
>
|
||||||
|
<el-descriptions :column="6">
|
||||||
|
<el-descriptions-item label="交送部门:" v-if="handoverItem.send_dept_name">
|
||||||
|
{{handoverItem.send_dept_name}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="交送工段:" v-if="handoverItem.send_mgroup_name">
|
||||||
|
{{ handoverItem.send_mgroup_name }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="接收部门:" v-if="handoverItem.recive_dept_name">
|
||||||
|
{{handoverItem.recive_dept_name}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="接收工段:" v-if="handoverItem.recive_mgroup_name">
|
||||||
|
{{ handoverItem.recive_mgroup_name }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-descriptions :column="6" v-for="item in ticketDetail.handoverb" :key="item.id">
|
||||||
|
<el-descriptions-item label="批次号:">
|
||||||
|
{{item.batch}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="数量:">
|
||||||
|
{{ item.count }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
交接文件:
|
||||||
|
<el-link :href="ticketDetail.test_file" type="primary" target="_blank">{{ticketDetail.test_file}}</el-link>
|
||||||
|
</el-card>
|
||||||
<el-card
|
<el-card
|
||||||
style="margin-top: 4px; position: relative"
|
style="margin-top: 4px; position: relative"
|
||||||
header="处理日志"
|
header="处理日志"
|
||||||
|
|
@ -596,6 +626,7 @@ export default {
|
||||||
{ id: 40, name: "其他" },
|
{ id: 40, name: "其他" },
|
||||||
],
|
],
|
||||||
dosOption: [],
|
dosOption: [],
|
||||||
|
handoverItem:{},
|
||||||
submitLoading: false,
|
submitLoading: false,
|
||||||
userId: this.$TOOL.data.get("USER_INFO").id,
|
userId: this.$TOOL.data.get("USER_INFO").id,
|
||||||
isOwn: false,
|
isOwn: false,
|
||||||
|
|
@ -610,6 +641,7 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.submitLoading = false;
|
this.submitLoading = false;
|
||||||
|
this.getticketItem();
|
||||||
if (this.cateType === "visit") {
|
if (this.cateType === "visit") {
|
||||||
this.getVisit();
|
this.getVisit();
|
||||||
} else if (this.cateType === "rpj") {
|
} else if (this.cateType === "rpj") {
|
||||||
|
|
@ -621,7 +653,6 @@ export default {
|
||||||
} else if (this.cateType === "opl") {
|
} else if (this.cateType === "opl") {
|
||||||
this.getOpl();
|
this.getOpl();
|
||||||
}
|
}
|
||||||
this.getticketItem();
|
|
||||||
this.getBtns();
|
this.getBtns();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -741,6 +772,17 @@ export default {
|
||||||
that.ticketDetail.test_file = res1.test_file;
|
that.ticketDetail.test_file = res1.test_file;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if(res.ticket_data.t_model&&res.ticket_data.t_model=="handover"){
|
||||||
|
that.$API.wpm.handover.item.req(res.ticket_data.t_id).then((res1) => {
|
||||||
|
that.handoverItem = res1;
|
||||||
|
that.ticketDetail.routepack_name = res1.routepack_name;
|
||||||
|
that.ticketDetail.handoverb = res1.handoverb;
|
||||||
|
that.ticketDetail.material_in_name = res1.material_in_name;
|
||||||
|
that.ticketDetail.material_out_name = res1.material_out_name;
|
||||||
|
that.ticketDetail.handle_user_name = res1.handle_user_name;
|
||||||
|
that.ticketDetail.test_file = res1.oinfo_json.test_file;
|
||||||
|
})
|
||||||
|
}
|
||||||
if (this.ticketDetail.state_.key == "opl_close") {
|
if (this.ticketDetail.state_.key == "opl_close") {
|
||||||
// 如果是作业关闭,展示需要提交的表单
|
// 如果是作业关闭,展示需要提交的表单
|
||||||
this.getCloseDos();
|
this.getCloseDos();
|
||||||
|
|
|
||||||
|
|
@ -182,13 +182,13 @@
|
||||||
<el-button type="danger">撤消</el-button>
|
<el-button type="danger">撤消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
<el-button
|
<!-- <el-button
|
||||||
@click="table_edit(scope.row)"
|
@click="table_edit(scope.row)"
|
||||||
v-auth="'handover.update'"
|
v-auth="'handover.update'"
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="(scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept)&&scope.row.submit_time == null&&scope.row.mtype == 10"
|
v-if="(scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept)&&scope.row.submit_time == null&&scope.row.mtype == 10"
|
||||||
>编辑</el-button
|
>编辑</el-button
|
||||||
>
|
> -->
|
||||||
<el-popconfirm
|
<el-popconfirm
|
||||||
title="确定删除吗?"
|
title="确定删除吗?"
|
||||||
v-if="(scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept)&&scope.row.submit_time == null"
|
v-if="(scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept)&&scope.row.submit_time == null"
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
<span>{{ item.batch }}</span>
|
<span>{{ item.batch }}</span>
|
||||||
<span v-if="item.material_&&item.material_.process_name">({{ item.material_.process_name }})</span>
|
<span v-if="item.material_&&item.material_.process_name">({{ item.material_.process_name }})</span>
|
||||||
<span v-else>(原料棒)</span>
|
<span v-else>(原料棒)</span>
|
||||||
|
<span v-if="item.defect!==null" style="color: red;">{{ item.defect_name }}</span>
|
||||||
<div style="float: right">
|
<div style="float: right">
|
||||||
<span>{{ item.count_canhandover }}</span>
|
<span>{{ item.count_canhandover }}</span>
|
||||||
<span v-if="item.notok_sign_name !== null" style="color: #aaaaaa">
|
<span v-if="item.notok_sign_name !== null" style="color: #aaaaaa">
|
||||||
|
|
@ -157,7 +157,7 @@
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:disabled="type==40"
|
:disabled="type==40||mode!=='add'"
|
||||||
@change="getUserList2"
|
@change="getUserList2"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
:mgroupId="mgroupId"
|
:mgroupId="mgroupId"
|
||||||
:deptId="mgroupDept"
|
:deptId="mgroupDept"
|
||||||
:process = "mgroupProcess"
|
:process = "mgroupProcess"
|
||||||
|
:processType = "mgroupProcessType"
|
||||||
:mgroup_code="mgroup_code"
|
:mgroup_code="mgroup_code"
|
||||||
:mgroupMtype = "mgroupMtype"
|
:mgroupMtype = "mgroupMtype"
|
||||||
id="mlogs"
|
id="mlogs"
|
||||||
|
|
@ -39,11 +40,13 @@
|
||||||
</div>
|
</div>
|
||||||
<mtask
|
<mtask
|
||||||
v-if="values == '日志'&&componentsShow"
|
v-if="values == '日志'&&componentsShow"
|
||||||
:mgroupId="mgroupId"
|
|
||||||
:deptId = "mgroupDept"
|
|
||||||
:mgroupName="mgroupName"
|
:mgroupName="mgroupName"
|
||||||
|
:mgroupId="mgroupId"
|
||||||
|
:deptId="mgroupDept"
|
||||||
:process = "mgroupProcess"
|
:process = "mgroupProcess"
|
||||||
|
:processType = "mgroupProcessType"
|
||||||
:mgroup_code="mgroup_code"
|
:mgroup_code="mgroup_code"
|
||||||
|
:mgroupMtype = "mgroupMtype"
|
||||||
id="mtask"
|
id="mtask"
|
||||||
style="height: 40%;display: none;"
|
style="height: 40%;display: none;"
|
||||||
></mtask>
|
></mtask>
|
||||||
|
|
@ -54,29 +57,30 @@
|
||||||
:mgroupId="mgroupId"
|
:mgroupId="mgroupId"
|
||||||
:deptId="mgroupDept"
|
:deptId="mgroupDept"
|
||||||
:process = "mgroupProcess"
|
:process = "mgroupProcess"
|
||||||
|
:processType = "mgroupProcessType"
|
||||||
:mgroup_code="mgroup_code"
|
:mgroup_code="mgroup_code"
|
||||||
|
:mgroupMtype = "mgroupMtype"
|
||||||
></handover>
|
></handover>
|
||||||
<!-- 库存 -->
|
|
||||||
<!-- <inm v-else-if="values == '库存'&&componentsShow"
|
|
||||||
:mgroup_code="mgroup_code"
|
|
||||||
:mgroupId="mgroupId"
|
|
||||||
:mgroupName="mgroupName"
|
|
||||||
:process = "mgroupProcess"
|
|
||||||
:deptId="mgroupDept"></inm> -->
|
|
||||||
<!-- 未完成 -->
|
<!-- 未完成 -->
|
||||||
<inmIn v-else-if="values == '未完成'&&componentsShow"
|
<inmIn v-else-if="values == '未完成'&&componentsShow"
|
||||||
:mgroup_code="mgroup_code"
|
|
||||||
:mgroupId="mgroupId"
|
|
||||||
:mgroupName="mgroupName"
|
:mgroupName="mgroupName"
|
||||||
|
:mgroupId="mgroupId"
|
||||||
|
:deptId="mgroupDept"
|
||||||
:process = "mgroupProcess"
|
:process = "mgroupProcess"
|
||||||
:deptId="mgroupDept"></inmIn>
|
:processType = "mgroupProcessType"
|
||||||
|
:mgroup_code="mgroup_code"
|
||||||
|
:mgroupMtype = "mgroupMtype"
|
||||||
|
></inmIn>
|
||||||
<!-- 已完成 -->
|
<!-- 已完成 -->
|
||||||
<inmOut v-else-if="values == '已完成'&&componentsShow"
|
<inmOut v-else-if="values == '已完成'&&componentsShow"
|
||||||
:mgroup_code="mgroup_code"
|
|
||||||
:mgroupId="mgroupId"
|
|
||||||
:mgroupName="mgroupName"
|
:mgroupName="mgroupName"
|
||||||
|
:mgroupId="mgroupId"
|
||||||
|
:deptId="mgroupDept"
|
||||||
:process = "mgroupProcess"
|
:process = "mgroupProcess"
|
||||||
:deptId="mgroupDept"></inmOut>
|
:processType = "mgroupProcessType"
|
||||||
|
:mgroup_code="mgroup_code"
|
||||||
|
:mgroupMtype = "mgroupMtype"
|
||||||
|
></inmOut>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -94,14 +98,16 @@ export default {
|
||||||
return {
|
return {
|
||||||
mgroups:[],
|
mgroups:[],
|
||||||
tableHieght: 200,
|
tableHieght: 200,
|
||||||
|
selectedIndex:0,
|
||||||
options: ["日志", "交接记录","未完成", "已完成"],
|
options: ["日志", "交接记录","未完成", "已完成"],
|
||||||
values: "日志",
|
values: "日志",
|
||||||
mgroupName: "",
|
mgroupName: "",
|
||||||
mgroupId: "",
|
mgroupId: "",
|
||||||
selectedIndex:0,
|
|
||||||
mgroup_code:'',
|
mgroup_code:'',
|
||||||
mgroupDept:'',
|
mgroupDept:'',
|
||||||
mgroupMtype:'',
|
mgroupMtype:'',
|
||||||
|
mgroupProcess: '',
|
||||||
|
mgroupProcessType: '',
|
||||||
componentsShow:false,
|
componentsShow:false,
|
||||||
mtaskVisible:false
|
mtaskVisible:false
|
||||||
};
|
};
|
||||||
|
|
@ -127,6 +133,7 @@ export default {
|
||||||
that.mgroups = res;
|
that.mgroups = res;
|
||||||
that.mgroupName = res[0].name;
|
that.mgroupName = res[0].name;
|
||||||
that.mgroupId = res[0].id;
|
that.mgroupId = res[0].id;
|
||||||
|
that.mgroupProcessType = res[0].process_type;
|
||||||
that.mgroupProcess = res[0].process;
|
that.mgroupProcess = res[0].process;
|
||||||
that.mgroupDept = res[0].belong_dept;
|
that.mgroupDept = res[0].belong_dept;
|
||||||
that.mgroupMtype = res[0].mtype;
|
that.mgroupMtype = res[0].mtype;
|
||||||
|
|
|
||||||
|
|
@ -80,10 +80,10 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="批次号"
|
label="批次号"
|
||||||
prop="batch"
|
prop="batch"
|
||||||
min-width="120"
|
min-width="150"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link @click="rowClick(scope.row)" type="primary">{{scope.row.batch}}</el-link>
|
<span @click="rowClick(scope.row)" style="color:#0052d9;font-weight: 600;cursor: pointer;">{{scope.row.batch}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -202,9 +202,20 @@
|
||||||
<el-drawer v-model="wprVisibleDrawer" :size="'70%'">
|
<el-drawer v-model="wprVisibleDrawer" :size="'70%'">
|
||||||
<template #header>
|
<template #header>
|
||||||
<h4>关联产品</h4>
|
<h4>关联产品</h4>
|
||||||
|
<el-input
|
||||||
|
style="margin-right: 5px;width: 200px;"
|
||||||
|
v-model="wprsearch"
|
||||||
|
placeholder="编号"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleWprQuery"
|
||||||
|
></el-button>
|
||||||
</template>
|
</template>
|
||||||
<template #default>
|
<template #default>
|
||||||
<scTable ref="wprTable" hidePagination :data="wprList">
|
<el-table ref="wprTable" id="wprTable" :height="wprTableHeight" hidePagination highlight-current-row border :data="wprList">
|
||||||
<el-table-column label="产品编号" prop="number" min-width="100px"></el-table-column>
|
<el-table-column label="产品编号" prop="number" min-width="100px"></el-table-column>
|
||||||
<el-table-column label="记录数据" prop="oinfo">
|
<el-table-column label="记录数据" prop="oinfo">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -227,19 +238,20 @@
|
||||||
label="操作"
|
label="操作"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
align="center"
|
align="center"
|
||||||
width="120"
|
width="200"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link :underline="false" @click="printMaterial(scope.row,'wpr')" type="primary">打印标签</el-link>
|
<el-button v-if="mgroupName=='毛坯检测后打码'" @click="QRCode(scope.row,'wpr')" type="success">二维码</el-button>
|
||||||
|
<el-button @click="printMaterial(scope.row,'wpr')" type="primary">打印标签</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</el-table>
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<!-- <template #footer>
|
||||||
<div style="flex: auto">
|
<div style="flex: auto">
|
||||||
<el-button @click="wprVisibleDrawer=false">关闭</el-button>
|
<el-button @click="wprVisibleDrawer=false">关闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template> -->
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
|
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
|
||||||
<scDegra
|
<scDegra
|
||||||
|
|
@ -251,6 +263,13 @@
|
||||||
>
|
>
|
||||||
</scDegra>
|
</scDegra>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
<el-dialog title="二维码" v-model="dialog.qrcode" width="500px">
|
||||||
|
<el-container>
|
||||||
|
<el-main style="text-align: center;padding: 50px 0;">
|
||||||
|
<scQrCode :text="scQr_code"></scQrCode>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-dialog>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -313,6 +332,7 @@ export default {
|
||||||
scrap: false,
|
scrap: false,
|
||||||
permission: false,
|
permission: false,
|
||||||
inmRecord:false,
|
inmRecord:false,
|
||||||
|
qrcode:false
|
||||||
},
|
},
|
||||||
nodes:[],
|
nodes:[],
|
||||||
edges:[],
|
edges:[],
|
||||||
|
|
@ -332,6 +352,8 @@ export default {
|
||||||
page:0,
|
page:0,
|
||||||
wm: ""
|
wm: ""
|
||||||
},
|
},
|
||||||
|
wprTableHeight: 500,
|
||||||
|
wprsearch:"",
|
||||||
route_code:"",
|
route_code:"",
|
||||||
showBatch: "",
|
showBatch: "",
|
||||||
wmMaterial:'',
|
wmMaterial:'',
|
||||||
|
|
@ -347,6 +369,7 @@ export default {
|
||||||
mgroup_name:'',
|
mgroup_name:'',
|
||||||
ofrom_name:'',
|
ofrom_name:'',
|
||||||
ofrom_batch :'',
|
ofrom_batch :'',
|
||||||
|
scQr_code:'',
|
||||||
checkItem:{},
|
checkItem:{},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -460,12 +483,27 @@ export default {
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.$refs.table.queryData(this.query);
|
this.$refs.table.queryData(this.query);
|
||||||
},
|
},
|
||||||
|
handleWprQuery(){
|
||||||
|
let that = this;
|
||||||
|
that.wprList.forEach((item,index)=>{
|
||||||
|
if(item.number.indexOf(that.wprsearch) > -1){
|
||||||
|
let rows = document.querySelectorAll("#wprTable .el-table__row");
|
||||||
|
let row = rows[index];
|
||||||
|
let rowTop = row.offsetTop;
|
||||||
|
this.$refs.wprTable.scrollTo({ top: rowTop });
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
showWpr(row){
|
showWpr(row){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.ofrom_name = row.material_ofrom_name;
|
that.ofrom_name = row.material_ofrom_name;
|
||||||
that.ofrom_batch = row.batch;
|
that.ofrom_batch = row.batch;
|
||||||
that.wprParams.wm = row.id;
|
that.wprParams.wm = row.id;
|
||||||
that.wprVisibleDrawer = true;
|
that.wprVisibleDrawer = true;
|
||||||
|
that.$nextTick(() => {
|
||||||
|
let heights = document.getElementsByClassName("el-drawer__body")[0].clientHeight;
|
||||||
|
that.wprTableHeight = heights-20;
|
||||||
|
})
|
||||||
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
|
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
|
||||||
that.wprList = res;
|
that.wprList = res;
|
||||||
})
|
})
|
||||||
|
|
@ -483,6 +521,12 @@ export default {
|
||||||
this.$refs.handoverDialog.open("add",row,20);
|
this.$refs.handoverDialog.open("add",row,20);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
QRCode(row){
|
||||||
|
this.dialog.qrcode = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.scQr_code=row.number;
|
||||||
|
});
|
||||||
|
},
|
||||||
//打印物料标签
|
//打印物料标签
|
||||||
printMaterial(row,type){
|
printMaterial(row,type){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="物料名称"
|
label="物料名称"
|
||||||
prop="material_name"
|
prop="material_name"
|
||||||
min-width="150"
|
min-width="120"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.material_name }}
|
{{ scope.row.material_name }}
|
||||||
|
|
@ -81,10 +81,10 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="批次号"
|
label="批次号"
|
||||||
prop="batch"
|
prop="batch"
|
||||||
min-width="120"
|
min-width="150"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link @click="rowClick(scope.row)" type="primary">{{scope.row.batch}}</el-link>
|
<span @click="rowClick(scope.row)" style="color:#0052d9;font-weight: 600;cursor: pointer;">{{scope.row.batch}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -203,9 +203,11 @@
|
||||||
<el-drawer v-model="wprVisibleDrawer" :size="'70%'">
|
<el-drawer v-model="wprVisibleDrawer" :size="'70%'">
|
||||||
<template #header>
|
<template #header>
|
||||||
<h4>关联产品</h4>
|
<h4>关联产品</h4>
|
||||||
|
<el-button type="primary" @click="wprNumberChange">发货编号</el-button>
|
||||||
|
<el-button type="warning" @click="wprNumberClear">清空编号</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template #default>
|
<template #default>
|
||||||
<scTable ref="wprTable" hidePagination :data="wprList">
|
<scTable ref="wprTable" hidePagination hideDo :data="wprList">
|
||||||
<el-table-column label="产品编号" prop="number" min-width="100px"></el-table-column>
|
<el-table-column label="产品编号" prop="number" min-width="100px"></el-table-column>
|
||||||
<el-table-column label="记录数据" prop="oinfo">
|
<el-table-column label="记录数据" prop="oinfo">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -224,6 +226,7 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="对外编号" prop="number_out" min-width="100px"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
|
|
@ -242,6 +245,17 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
<el-dialog title="设置发货编号" v-model="showBatch">
|
||||||
|
<el-form :model="wprParams" label-width="80px">
|
||||||
|
<el-form-item label="编号前缀">
|
||||||
|
<el-input v-model="prefix"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="getWprNum">确定</el-button>
|
||||||
|
<el-button @click="showBatch=false">取消</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
|
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
|
||||||
<scDegra
|
<scDegra
|
||||||
v-if="limitedWatch"
|
v-if="limitedWatch"
|
||||||
|
|
@ -333,11 +347,13 @@ export default {
|
||||||
page:0,
|
page:0,
|
||||||
wm: ""
|
wm: ""
|
||||||
},
|
},
|
||||||
|
prefix:'',
|
||||||
|
number_out_last:'',
|
||||||
route_code:"",
|
route_code:"",
|
||||||
showBatch: "",
|
|
||||||
wmMaterial:'',
|
wmMaterial:'',
|
||||||
cate_type:'',
|
cate_type:'',
|
||||||
materialType: "wm",
|
materialType: "wm",
|
||||||
|
showBatch: false,
|
||||||
limitedWatch:false,
|
limitedWatch:false,
|
||||||
materialsVisible:false,
|
materialsVisible:false,
|
||||||
visibleDrawer: false,
|
visibleDrawer: false,
|
||||||
|
|
@ -467,7 +483,11 @@ export default {
|
||||||
that.ofrom_batch = row.batch;
|
that.ofrom_batch = row.batch;
|
||||||
that.wprParams.wm = row.id;
|
that.wprParams.wm = row.id;
|
||||||
that.wprVisibleDrawer = true;
|
that.wprVisibleDrawer = true;
|
||||||
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
|
that.getRowWpr();
|
||||||
|
},
|
||||||
|
getRowWpr(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
|
||||||
that.wprList = res;
|
that.wprList = res;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -479,6 +499,59 @@ export default {
|
||||||
this.$refs.handoverDialog.open("add",row,20);
|
this.$refs.handoverDialog.open("add",row,20);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
wprNumberChange(){
|
||||||
|
let that = this;
|
||||||
|
that.showBatch = true;
|
||||||
|
},
|
||||||
|
wprNumberClear(){
|
||||||
|
let that = this;
|
||||||
|
let items = [];
|
||||||
|
for(let i=0;i< that.wprList.length;i++){
|
||||||
|
let obj = {};
|
||||||
|
obj.id = that.wprList[i].id;
|
||||||
|
obj.number_out = null;
|
||||||
|
items.push(obj)
|
||||||
|
}
|
||||||
|
let params = {};
|
||||||
|
params.items = items;
|
||||||
|
that.$API.wpm.wpr.assginNumberOut.req(params).then((res) => {
|
||||||
|
that.getRowWpr();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getWprNum(){
|
||||||
|
let that = this;
|
||||||
|
let params0 = {};
|
||||||
|
params0.prefix = that.prefix;
|
||||||
|
that.$API.wpm.wpr.numberOutLast.req(params0).then((res) => {
|
||||||
|
let number_out_last = '';
|
||||||
|
if(res.number_out_last==null){
|
||||||
|
number_out_last = that.prefix+'000';
|
||||||
|
}else{
|
||||||
|
number_out_last = res.number_out_last;
|
||||||
|
}
|
||||||
|
that.number_out_last = number_out_last;
|
||||||
|
let num = number_out_last.slice(-3)
|
||||||
|
let str = number_out_last.slice(0,-3)
|
||||||
|
let items = [];
|
||||||
|
for(let i=0;i< that.wprList.length;i++){
|
||||||
|
let obj = {};
|
||||||
|
let numb = Number(num)+i+1;
|
||||||
|
if(numb<10){
|
||||||
|
numb = '00'+numb;
|
||||||
|
}else if(numb<100){
|
||||||
|
numb = '0'+numb;
|
||||||
|
}
|
||||||
|
obj.id = that.wprList[i].id;
|
||||||
|
obj.number_out = str+numb;
|
||||||
|
items.push(obj)
|
||||||
|
}
|
||||||
|
let params = {};
|
||||||
|
params.items = items;
|
||||||
|
that.$API.wpm.wpr.assginNumberOut.req(params).then((res) => {
|
||||||
|
that.getRowWpr();
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
//本地更新数据
|
//本地更新数据
|
||||||
handleSaveSuccess(data, mode) {
|
handleSaveSuccess(data, mode) {
|
||||||
this.dialog.save = false;
|
this.dialog.save = false;
|
||||||
|
|
|
||||||
|
|
@ -256,12 +256,9 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="table_in_edit(scope.row)"
|
@click="table_in_edit(scope.row)"
|
||||||
v-if="mlogItem.submit_time== null&&mlogItem.material_in_&&mlogItem.material_in_.tracking==10"
|
v-if="mlogItem.submit_time== null&&mlogItem.material_in_&&mlogItem.material_in_.tracking==10"
|
||||||
>
|
>编辑</el-button>
|
||||||
编辑
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
v-if="mlogItem.submit_time == null&&mlogItem.material_in_&&mlogItem.material_in_.tracking==20"
|
|
||||||
@click="table_out_check_single(scope.row,'ins')"
|
@click="table_out_check_single(scope.row,'ins')"
|
||||||
>详情</el-button>
|
>详情</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -269,9 +266,7 @@
|
||||||
type="danger"
|
type="danger"
|
||||||
style="margin-left: 10px;"
|
style="margin-left: 10px;"
|
||||||
@click="table_in_del(scope.row)"
|
@click="table_in_del(scope.row)"
|
||||||
>
|
>删除</el-button>
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
@ -402,7 +397,9 @@
|
||||||
:isfix = "mlogItem.is_fix"
|
:isfix = "mlogItem.is_fix"
|
||||||
:routeId ="routeId"
|
:routeId ="routeId"
|
||||||
:tracking="tracking"
|
:tracking="tracking"
|
||||||
:materialIn="materialIn"
|
:material_in="materialIn"
|
||||||
|
:hasRoute = "hasRoute"
|
||||||
|
:process="process"
|
||||||
@success="handleSaveSuccess"
|
@success="handleSaveSuccess"
|
||||||
@closed="saveMlogbInClose"
|
@closed="saveMlogbInClose"
|
||||||
>
|
>
|
||||||
|
|
@ -422,16 +419,17 @@
|
||||||
:wm = "wm"
|
:wm = "wm"
|
||||||
:dept="deptId"
|
:dept="deptId"
|
||||||
:mgroup="mgroup"
|
:mgroup="mgroup"
|
||||||
|
:material_in="material_in"
|
||||||
:material_out="material_out"
|
:material_out="material_out"
|
||||||
:mgroupName= "mlogItem.mgroup_name"
|
:mgroupName= "mlogItem.mgroup_name"
|
||||||
:isSubmit="isSubmit"
|
:isSubmit="isSubmit"
|
||||||
:batchNumber="batchNumber"
|
:batchNumber="batchNumber"
|
||||||
:handle_user="handle_user"
|
:handle_user="handle_user"
|
||||||
:handle_date="handle_date"
|
:handle_date="handle_date"
|
||||||
|
:processType="processType"
|
||||||
@success="handlesCheckSuccess"
|
@success="handlesCheckSuccess"
|
||||||
@closed="scheckClose"
|
@closed="scheckClose"
|
||||||
>
|
></scheck-dialog>
|
||||||
</scheck-dialog>
|
|
||||||
<edit-dialog
|
<edit-dialog
|
||||||
v-if="dialog.edit"
|
v-if="dialog.edit"
|
||||||
ref="editDialog"
|
ref="editDialog"
|
||||||
|
|
@ -474,6 +472,14 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
|
mgroup:{
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
processType:{
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
editDialog,
|
editDialog,
|
||||||
|
|
@ -498,13 +504,7 @@ export default {
|
||||||
check_single: false,
|
check_single: false,
|
||||||
},
|
},
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
// apiObjWm:null,
|
|
||||||
apiObjMuser:null,
|
apiObjMuser:null,
|
||||||
// paramsWm: {
|
|
||||||
// page: 0,
|
|
||||||
// search:'',
|
|
||||||
// mgroup:''
|
|
||||||
// },
|
|
||||||
paramsIn: {
|
paramsIn: {
|
||||||
page: 0,
|
page: 0,
|
||||||
mlog: "",
|
mlog: "",
|
||||||
|
|
@ -521,7 +521,6 @@ export default {
|
||||||
},
|
},
|
||||||
tracking:10,
|
tracking:10,
|
||||||
mlogb:"",
|
mlogb:"",
|
||||||
mgroup: "",
|
|
||||||
mlogItem: {},
|
mlogItem: {},
|
||||||
saveInForm: {
|
saveInForm: {
|
||||||
count_use: 0,
|
count_use: 0,
|
||||||
|
|
@ -556,6 +555,7 @@ export default {
|
||||||
wm:'',
|
wm:'',
|
||||||
route_code:'',
|
route_code:'',
|
||||||
materialOut:'',
|
materialOut:'',
|
||||||
|
material_in:'',
|
||||||
material_out:'',
|
material_out:'',
|
||||||
batchContains:'',
|
batchContains:'',
|
||||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||||
|
|
@ -569,6 +569,7 @@ export default {
|
||||||
qct:null,
|
qct:null,
|
||||||
defectlist:[],
|
defectlist:[],
|
||||||
batchNumber:'',
|
batchNumber:'',
|
||||||
|
hasRoute:false,
|
||||||
isSubmit:false,
|
isSubmit:false,
|
||||||
fileVisible:false,
|
fileVisible:false,
|
||||||
};
|
};
|
||||||
|
|
@ -594,6 +595,9 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.mlog.item.req(that.mlogId).then((res) => {
|
that.$API.wpm.mlog.item.req(that.mlogId).then((res) => {
|
||||||
that.mlogItem = res;
|
that.mlogItem = res;
|
||||||
|
if(res.route!==null){
|
||||||
|
that.hasRoute = true;
|
||||||
|
}
|
||||||
that.oinfo_json = [];
|
that.oinfo_json = [];
|
||||||
if(res.oinfo_json_){
|
if(res.oinfo_json_){
|
||||||
for(let key in res.oinfo_json_){
|
for(let key in res.oinfo_json_){
|
||||||
|
|
@ -604,12 +608,12 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
that.routeId = res.route;
|
that.routeId = res.route;
|
||||||
that.tracking = res.material_in_.tracking;
|
that.tracking = res.material_in_!==null?res.material_in_.tracking:null;
|
||||||
if(res.test_file!==null){
|
if(res.test_file!==null){
|
||||||
that.fileList = [{name:res.test_file,url:res.test_file}];
|
that.fileList = [{name:res.test_file,url:res.test_file}];
|
||||||
that.form.test_file = res.test_file;
|
that.form.test_file = res.test_file;
|
||||||
}
|
}
|
||||||
that.mgroup = res.mgroup;
|
// that.mgroup = res.mgroup;
|
||||||
// that.paramsWm.mgroup = res.mgroup;
|
// that.paramsWm.mgroup = res.mgroup;
|
||||||
// that.paramsWm.search = that.batchContains;
|
// that.paramsWm.search = that.batchContains;
|
||||||
that.materialIn = res.material_in;
|
that.materialIn = res.material_in;
|
||||||
|
|
@ -720,6 +724,7 @@ export default {
|
||||||
that.wm = row.wm_in;
|
that.wm = row.wm_in;
|
||||||
that.isSubmit = that.mlogItem.submit_time == null ? false : true;
|
that.isSubmit = that.mlogItem.submit_time == null ? false : true;
|
||||||
that.batchNumber = row.batch;
|
that.batchNumber = row.batch;
|
||||||
|
that.material_in = row.material_in;
|
||||||
that.material_out = row.material_out;
|
that.material_out = row.material_out;
|
||||||
that.handle_date=that.mlogItem.handle_date;
|
that.handle_date=that.mlogItem.handle_date;
|
||||||
that.handle_user = that.mlogItem.handle_user;
|
that.handle_user = that.mlogItem.handle_user;
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,28 @@
|
||||||
style="padding: 0 10px"
|
style="padding: 0 10px"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
<el-col v-if="!hasRoute&&!is_fix">
|
||||||
|
<el-form-item label="工艺步骤" prop="route">
|
||||||
|
<el-select
|
||||||
|
v-model="form.route"
|
||||||
|
placeholder="工艺步骤"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 100%"
|
||||||
|
:disabled="mode == 'edit'"
|
||||||
|
@change="routeChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in routeOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
<span>[{{ item.routepack_name }}]{{ item.name }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :md="12" :sm="12" :xs="24" v-if="!isfix">
|
<el-col :md="12" :sm="12" :xs="24" v-if="!isfix">
|
||||||
<el-form-item label="关联任务">
|
<el-form-item label="关联任务">
|
||||||
<el-select
|
<el-select
|
||||||
|
|
@ -67,65 +89,6 @@
|
||||||
<el-input-number ref="codeInput" v-model="form.count_use" :min="0" clearable class="width-100"></el-input-number>
|
<el-input-number ref="codeInput" v-model="form.count_use" :min="0" clearable class="width-100"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :md="12" :sm="12" :xs="24" v-if="route_code=='niuzhuan'">
|
|
||||||
<el-form-item label="生产设备">
|
|
||||||
<el-select
|
|
||||||
v-model="form.equipment"
|
|
||||||
placeholder="生产设备"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in optionsEq"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
<span style="float:left">{{item.name}}</span>
|
|
||||||
<span style="float:right">{{item.number}}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="12" :xs="24" v-if="route_code=='niuzhuan'">
|
|
||||||
<el-form-item label="操作人">
|
|
||||||
<ehsSelect
|
|
||||||
v-model="form.handle_user"
|
|
||||||
:showName="form.handle_user_name"
|
|
||||||
:apiObj="this.$API.system.user.list"
|
|
||||||
:params="{ depts: dept }"
|
|
||||||
class="width-100"
|
|
||||||
></ehsSelect>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="12" :xs="24" v-if="route_code=='niuzhuan'">
|
|
||||||
<el-form-item
|
|
||||||
label="开始时间"
|
|
||||||
prop="work_start_time"
|
|
||||||
>
|
|
||||||
<el-date-picker
|
|
||||||
:disabled="mode == 'edit'"
|
|
||||||
v-model="form.work_start_time"
|
|
||||||
type="datetime"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
style="width: 100%;"
|
|
||||||
popper-append-to-body
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="12" :xs="24" v-if="route_code=='niuzhuan'">
|
|
||||||
<el-form-item label="结束时间" prop="work_end_time">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="form.work_end_time"
|
|
||||||
type="datetime"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
style="width: 100%;"
|
|
||||||
:disabledDate="disabledDateFn"
|
|
||||||
popper-append-to-body
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col> -->
|
|
||||||
<el-col :md="12" :sm="12" :xs="24">
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
<el-form-item label="主要批次" v-if="!isfix">
|
<el-form-item label="主要批次" v-if="!isfix">
|
||||||
<el-select
|
<el-select
|
||||||
|
|
@ -177,20 +140,28 @@ export default {
|
||||||
},
|
},
|
||||||
tracking:{
|
tracking:{
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 10,
|
default: null,
|
||||||
},
|
},
|
||||||
routeId:{
|
routeId:{
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
materialIn: {
|
material_in: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
|
hasRoute:{
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
isfix:{
|
isfix:{
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
}
|
},
|
||||||
|
process:{
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
emits: ["success", "closed"],
|
emits: ["success", "closed"],
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -220,6 +191,7 @@ export default {
|
||||||
mlogbIns:[],
|
mlogbIns:[],
|
||||||
options: [],
|
options: [],
|
||||||
optionsEq: [],
|
optionsEq: [],
|
||||||
|
routeOptions: [],
|
||||||
mlogbInOptions:[],
|
mlogbInOptions:[],
|
||||||
materialOptions: [],
|
materialOptions: [],
|
||||||
mgroup_code:'',
|
mgroup_code:'',
|
||||||
|
|
@ -243,6 +215,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.materialIn = this.material_in;
|
||||||
this.route_code = this.$route.path.split("/")[2];
|
this.route_code = this.$route.path.split("/")[2];
|
||||||
this.form.mlog = this.mlog;
|
this.form.mlog = this.mlog;
|
||||||
this.params.mlog = this.mlog;
|
this.params.mlog = this.mlog;
|
||||||
|
|
@ -253,6 +226,9 @@ export default {
|
||||||
this.getMaterial();
|
this.getMaterial();
|
||||||
this.getParentList();
|
this.getParentList();
|
||||||
this.getEquipment();
|
this.getEquipment();
|
||||||
|
if(!this.hasRoute){
|
||||||
|
this.getRoute();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
|
|
@ -283,6 +259,17 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getRoute() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.route.list
|
||||||
|
.req({ process: that.process, page: 0, routepack__state: 30 })
|
||||||
|
.then((res) => {
|
||||||
|
that.routeOptions = res;
|
||||||
|
if(res.length==1){
|
||||||
|
that.form.route = res[0].id;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
getParentList(){
|
getParentList(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.mlogb.list.req(that.params).then((res) => {
|
that.$API.wpm.mlogb.list.req(that.params).then((res) => {
|
||||||
|
|
@ -313,19 +300,41 @@ export default {
|
||||||
getMaterial() {
|
getMaterial() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj = {};
|
let obj = {};
|
||||||
|
console.log('that.mgroup',that.mgroup);
|
||||||
obj.mtaskx =that.form.mtask;
|
obj.mtaskx =that.form.mtask;
|
||||||
obj.mgroupx =that.mgroup;
|
obj.mgroup =that.mgroup;
|
||||||
|
if(that.routeId!==null&&that.routeId!==''){
|
||||||
obj.route =that.routeId;
|
obj.route =that.routeId;
|
||||||
|
}
|
||||||
obj.page =0;
|
obj.page =0;
|
||||||
if(that.isfix){
|
if(that.is_fix){//来料未完成的返修品&&出料已完成的返修品和不合格品
|
||||||
obj.state =30;
|
obj.tag = 'canfix';
|
||||||
}else{
|
}else{
|
||||||
|
if(that.materialIn!==null&&that.materialIn!==''){
|
||||||
|
obj.material =that.materialIn;
|
||||||
|
}
|
||||||
obj.state =10;
|
obj.state =10;
|
||||||
|
obj.tag = 'todo';
|
||||||
}
|
}
|
||||||
this.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
this.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
||||||
that.materialOptions = res;
|
let arr = [];
|
||||||
|
if(res.length>0){
|
||||||
|
arr = res.filter((item)=>{
|
||||||
|
return Number(item.count_cando)>0;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
that.materialOptions = arr;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
routeChange(){
|
||||||
|
let that = this;
|
||||||
|
that.routeOptions.forEach(item=>{
|
||||||
|
if(item.id == that.form.route){
|
||||||
|
that.materialIn = item.material_in;
|
||||||
|
that.getMaterial();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
changeMaterial(){
|
changeMaterial(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.materialOptions.forEach(item=>{
|
that.materialOptions.forEach(item=>{
|
||||||
|
|
@ -338,6 +347,7 @@ export default {
|
||||||
},
|
},
|
||||||
//扫描后处理方法
|
//扫描后处理方法
|
||||||
formWminChange(code){
|
formWminChange(code){
|
||||||
|
console.log('code',code);
|
||||||
let that = this,codeId='',arr=[];
|
let that = this,codeId='',arr=[];
|
||||||
code = code.replace(/(^\s*)|(\s*$)/g, "");
|
code = code.replace(/(^\s*)|(\s*$)/g, "");
|
||||||
if(code.indexOf("#")>-1){
|
if(code.indexOf("#")>-1){
|
||||||
|
|
@ -367,20 +377,6 @@ export default {
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
that.scanKyes = "";
|
that.scanKyes = "";
|
||||||
if(that.tracking==10){//批次
|
|
||||||
arr = that.materialOptions.filter((item) => {
|
|
||||||
return item.batch == code;
|
|
||||||
})
|
|
||||||
if (arr.length > 0) {
|
|
||||||
that.form.batch = arr[0].batch;
|
|
||||||
that.form.wm_in = arr[0].id;
|
|
||||||
that.form.count_use = arr[0].count;
|
|
||||||
that.wm_in = arr[0].batch;
|
|
||||||
}else{
|
|
||||||
that.wm_in = '';
|
|
||||||
that.$message.error("批次号不存在");
|
|
||||||
}
|
|
||||||
}else{//单件
|
|
||||||
that.$API.wpm.wpr.list.req({number:code,page:0}).then((res) => {
|
that.$API.wpm.wpr.list.req({number:code,page:0}).then((res) => {
|
||||||
if(res.length>0){
|
if(res.length>0){
|
||||||
let index = res.length-1;//最后一条记录
|
let index = res.length-1;//最后一条记录
|
||||||
|
|
@ -427,7 +423,23 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
// if(that.tracking==10||that.tracking==null){//批次
|
||||||
|
// arr = that.materialOptions.filter((item) => {
|
||||||
|
// return item.batch == code;
|
||||||
|
// })
|
||||||
|
// if (arr.length > 0) {
|
||||||
|
// that.form.batch = arr[0].batch;
|
||||||
|
// that.form.wm_in = arr[0].id;
|
||||||
|
// that.form.count_use = arr[0].count;
|
||||||
|
// that.wm_in = arr[0].batch;
|
||||||
|
// }else{
|
||||||
|
// that.wm_in = '';
|
||||||
|
// that.$message.error("批次号不存在");
|
||||||
|
// }
|
||||||
|
// }else{//单件
|
||||||
|
// console.log('code',code);
|
||||||
|
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,9 @@
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main id="mlogbwMain">
|
<el-main id="mlogbwMain">
|
||||||
<el-button type="primary" v-if="!isSubmit&&process_type=='20'&&mode=='outs'" @click="check_start" style="position: absolute;top: 20px;left: 150px;">检验</el-button>
|
<el-button type="primary" v-if="!isSubmit&&processType=='20'&&mode=='outs'" @click="check_start" style="position: absolute;top: 20px;left: 150px;">检验</el-button>
|
||||||
<el-button type="primary" v-if="multipleSet" @click="check_set" style="position: absolute;top: 20px;left: 210px;">批量操作</el-button>
|
<el-button type="primary" v-if="multipleSet" @click="check_set" style="position: absolute;top: 20px;left: 210px;">批量操作</el-button>
|
||||||
<el-input v-if="multipleSet" v-model="wprInputText" @change="wprinputChange" style="width:200px;position: absolute;top: 20px;left: 308px;">批量操作</el-input>
|
<el-input v-if="multipleSet" v-model="wprInputText" @change="wprinputChange" style="width:200px;position: absolute;top: 20px;left: 308px;"></el-input>
|
||||||
<sc-form-table
|
<sc-form-table
|
||||||
hideDelete
|
hideDelete
|
||||||
id="mlogbwlist"
|
id="mlogbwlist"
|
||||||
|
|
@ -36,12 +36,16 @@
|
||||||
:addTemplate="addTemplate"
|
:addTemplate="addTemplate"
|
||||||
placeholder="暂无数据"
|
placeholder="暂无数据"
|
||||||
:hideAdd="hideAdd"
|
:hideAdd="hideAdd"
|
||||||
|
:canMultiple = "canMultiple"
|
||||||
|
@selectChange="selectChange"
|
||||||
|
@selectAllChange="selectAllChange"
|
||||||
@add="rowAdd"
|
@add="rowAdd"
|
||||||
>
|
>
|
||||||
<el-table-column prop="number" label="物料编号" fixed min-width="120px">
|
<!-- <el-table-column prop="number" fixed type="selection"></el-table-column> -->
|
||||||
|
<el-table-column prop="number" label="物料编号" fixed min-width="80px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="!scope.row.isEdit&&mode == 'outs'">{{ scope.row.number }}</span>
|
<span v-if="mode == 'outs'">{{ scope.row.number }}</span>
|
||||||
<el-input v-if="scope.row.isEdit&&mode == 'outs'" v-model="scope.row.number" placeholder="物料编号"></el-input>
|
<!-- <el-input v-if="scope.row.isEdit&&mode == 'outs'" v-model="scope.row.number" placeholder="物料编号"></el-input> -->
|
||||||
<el-select
|
<el-select
|
||||||
v-if="scope.row.isEdit&&mode == 'ins'&&route_code!=='niuzhuan'"
|
v-if="scope.row.isEdit&&mode == 'ins'&&route_code!=='niuzhuan'"
|
||||||
v-model="scope.row.wpr"
|
v-model="scope.row.wpr"
|
||||||
|
|
@ -55,8 +59,7 @@
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.number"
|
:label="item.number"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
<span v-if="!scope.row.isEdit&&mode == 'ins'">{{ scope.row.number }}</span>
|
<span v-if="!scope.row.isEdit&&mode == 'ins'">{{ scope.row.number }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -64,11 +67,11 @@
|
||||||
<el-table-column label="生产设备" min-width="80px" v-if="mode == 'ins'&&route_code=='niuzhuan'">
|
<el-table-column label="生产设备" min-width="80px" v-if="mode == 'ins'&&route_code=='niuzhuan'">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-select
|
<el-select
|
||||||
|
v-if="scope.row.isEdit"
|
||||||
v-model="scope.row.equip"
|
v-model="scope.row.equip"
|
||||||
placeholder="生产设备"
|
placeholder="生产设备"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
:disabled="!scope.row.isEdit"
|
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -81,67 +84,54 @@
|
||||||
<span style="float:right">{{item.number}}</span>
|
<span style="float:right">{{item.number}}</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<span v-else>{{ scope.row.equip_name }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="开始时间" min-width="80px" v-if="mode == 'ins'&&route_code=='niuzhuan'">
|
<el-table-column label="扭转日期" min-width="80px" v-if="mode == 'ins'&&route_code=='niuzhuan'">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:disabled="!scope.row.isEdit"
|
v-if="scope.row.isEdit"
|
||||||
v-model="scope.row.work_start_time"
|
v-model="scope.row.work_start_time"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
formatter="YYYY-MM-DD"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
popper-append-to-body
|
popper-append-to-body
|
||||||
/>
|
/>
|
||||||
|
<div v-else>
|
||||||
|
<span v-if="scope.row.work_start_time!==null">{{ scope.row.work_start_time.split(' ')[0]}}</span>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="结束时间" min-width="80px" v-if="mode == 'ins'&&route_code=='niuzhuan'">
|
<el-table-column prop="note" :label="item.testitem_name" v-for="item in testitems" :key="item.id" width="150px">
|
||||||
<template #default="scope">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="scope.row.work_end_time"
|
|
||||||
type="datetime"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
style="width: 100%;"
|
|
||||||
:disabled="!scope.row.isEdit"
|
|
||||||
popper-append-to-body
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="note" :label="item.testitem_name" v-for="item in qct_testitems" :key="item.id" width="150px">
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<span v-if="!scope.row.isEdit||!item.canEdit">{{ scope.row[item.testitem_name] }}</span>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-if="item.testitem_field_type=='input-number'"
|
v-if="item.testitem_field_type=='input-number'&&scope.row.isEdit&&item.canEdit"
|
||||||
v-model="scope.row[item.testitem_name]"
|
v-model="scope.row[item.testitem_name]"
|
||||||
:disabled="!scope.row.isEdit||!item.canEdit"
|
|
||||||
class="width-100"
|
class="width-100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
@change="defectCountSun(scope.row)"
|
@change="defectCountSun(scope.row)"
|
||||||
>
|
></el-input-number>
|
||||||
</el-input-number>
|
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-if="item.testitem_field_type=='input-int'"
|
v-if="item.testitem_field_type=='input-int'&&scope.row.isEdit&&item.canEdit"
|
||||||
v-model="scope.row[item.testitem_name]"
|
v-model="scope.row[item.testitem_name]"
|
||||||
:min="0"
|
:min="0"
|
||||||
:disabled="!scope.row.isEdit||!item.canEdit"
|
|
||||||
class="width-100"
|
class="width-100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
@change="defectCountSun(scope.row)"
|
@change="defectCountSun(scope.row)"
|
||||||
>
|
></el-input-number>
|
||||||
</el-input-number>
|
|
||||||
<el-input
|
<el-input
|
||||||
v-if="item.testitem_field_type=='input-text'"
|
v-if="item.testitem_field_type=='input-text'&&scope.row.isEdit&&item.canEdit"
|
||||||
v-model="scope.row[item.testitem_name]"
|
v-model="scope.row[item.testitem_name]"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
:disabled="!scope.row.isEdit||!item.canEdit"
|
|
||||||
@change="defectCountSun(scope.row)"
|
@change="defectCountSun(scope.row)"
|
||||||
>
|
></el-input>
|
||||||
</el-input>
|
|
||||||
<el-select
|
<el-select
|
||||||
v-if="item.testitem_field_type=='select-text'"
|
v-if="item.testitem_field_type=='select-text'&&scope.row.isEdit&&item.canEdit"
|
||||||
v-model="scope.row[item.testitem_name]"
|
v-model="scope.row[item.testitem_name]"
|
||||||
clearable
|
clearable
|
||||||
class="width-100"
|
class="width-100"
|
||||||
:disabled="!scope.row.isEdit||!item.canEdit"
|
|
||||||
@change="defectCountSun(scope.row)"
|
@change="defectCountSun(scope.row)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -149,16 +139,14 @@
|
||||||
:key="item0"
|
:key="item0"
|
||||||
:label="item0"
|
:label="item0"
|
||||||
:value="item0"
|
:value="item0"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select
|
<el-select
|
||||||
v-if="item.testitem_field_type=='selects-text'"
|
v-if="item.testitem_field_type=='selects-text'&&scope.row.isEdit&&item.canEdit"
|
||||||
v-model="scope.row[item.testitem_name]"
|
v-model="scope.row[item.testitem_name]"
|
||||||
clearable
|
clearable
|
||||||
multiple
|
multiple
|
||||||
class="width-100"
|
class="width-100"
|
||||||
:disabled="!scope.row.isEdit||!item.canEdit"
|
|
||||||
@change="defectCountSun(scope.row)"
|
@change="defectCountSun(scope.row)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -166,8 +154,62 @@
|
||||||
:key="item1"
|
:key="item1"
|
||||||
:label="item1"
|
:label="item1"
|
||||||
:value="item1"
|
:value="item1"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="note" :label="item.testitem_name" v-for="item in qct_testitems" :key="item.id" width="150px">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="!scope.row.isEdit||!item.canEdit">{{ scope.row[item.testitem_name] }}</span>
|
||||||
|
<el-input-number
|
||||||
|
v-if="item.testitem_field_type=='input-number'&&scope.row.isEdit&&item.canEdit"
|
||||||
|
v-model="scope.row[item.testitem_name]"
|
||||||
|
class="width-100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="defectCountSun(scope.row)"
|
||||||
|
></el-input-number>
|
||||||
|
<el-input-number
|
||||||
|
v-if="item.testitem_field_type=='input-int'&&scope.row.isEdit&&item.canEdit"
|
||||||
|
v-model="scope.row[item.testitem_name]"
|
||||||
|
:min="0"
|
||||||
|
class="width-100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="defectCountSun(scope.row)"
|
||||||
|
></el-input-number>
|
||||||
|
<el-input
|
||||||
|
v-if="item.testitem_field_type=='input-text'&&scope.row.isEdit&&item.canEdit"
|
||||||
|
v-model="scope.row[item.testitem_name]"
|
||||||
|
class="width-100"
|
||||||
|
@change="defectCountSun(scope.row)"
|
||||||
|
></el-input>
|
||||||
|
<el-select
|
||||||
|
v-if="item.testitem_field_type=='select-text'&&scope.row.isEdit&&item.canEdit"
|
||||||
|
v-model="scope.row[item.testitem_name]"
|
||||||
|
clearable
|
||||||
|
class="width-100"
|
||||||
|
@change="defectCountSun(scope.row)"
|
||||||
>
|
>
|
||||||
</el-option>
|
<el-option
|
||||||
|
v-for="item0 in item.testitem_choices"
|
||||||
|
:key="item0"
|
||||||
|
:label="item0"
|
||||||
|
:value="item0"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-select
|
||||||
|
v-if="item.testitem_field_type=='selects-text'&&scope.row.isEdit&&item.canEdit"
|
||||||
|
v-model="scope.row[item.testitem_name]"
|
||||||
|
clearable
|
||||||
|
multiple
|
||||||
|
class="width-100"
|
||||||
|
@change="defectCountSun(scope.row)"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item1 in item.testitem_choices"
|
||||||
|
:key="item1"
|
||||||
|
:label="item1"
|
||||||
|
:value="item1"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -193,42 +235,36 @@
|
||||||
v-if="scope.row.isEdit"
|
v-if="scope.row.isEdit"
|
||||||
type="success"
|
type="success"
|
||||||
@click="formTableSave(scope.row)"
|
@click="formTableSave(scope.row)"
|
||||||
>保存</el-button
|
>保存</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.isEdit&&scope.row.id"
|
v-if="scope.row.isEdit&&scope.row.id"
|
||||||
type="danger"
|
type="danger"
|
||||||
style="margin-left: 5px;"
|
style="margin-left: 5px;"
|
||||||
@click="formTableCancel(scope.row)"
|
@click="formTableCancel(scope.row)"
|
||||||
>取消</el-button
|
>取消</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.isEdit&&setForm.cd_req_addr!=null"
|
v-if="scope.row.isEdit&&setForm.cd_req_addr!=null"
|
||||||
type="warning"
|
type="warning"
|
||||||
style="margin-left: 5px;"
|
style="margin-left: 5px;"
|
||||||
@click="getEqData(scope.$index)"
|
@click="getEqData(scope.$index)"
|
||||||
>重取数据</el-button
|
>重取数据</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!scope.row.isEdit&&(mode=='outs'||route_code=='niuzhuan')"
|
v-if="!scope.row.isEdit&&(mode=='outs'||route_code=='niuzhuan')"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="formTableEdit(scope.row)"
|
@click="formTableEdit(scope.row)"
|
||||||
>编辑</el-button
|
>编辑</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.isEdit&&!scope.row.id"
|
v-if="scope.row.isEdit&&!scope.row.id"
|
||||||
type="danger"
|
type="danger"
|
||||||
style="margin-left: 5px;"
|
style="margin-left: 5px;"
|
||||||
@click="formTableDelet(scope.row)"
|
@click="formTableDelet(scope.row)"
|
||||||
>删除</el-button
|
>删除</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!scope.row.isEdit"
|
v-if="!scope.row.isEdit"
|
||||||
type="danger"
|
type="danger"
|
||||||
style="margin-left: 5px;"
|
style="margin-left: 5px;"
|
||||||
@click="formTableDel(scope.row.id)"
|
@click="formTableDel(scope.row.id)"
|
||||||
>删除</el-button
|
>删除</el-button>
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</sc-form-table>
|
</sc-form-table>
|
||||||
|
|
@ -298,8 +334,7 @@
|
||||||
:key="item.testitem"
|
:key="item.testitem"
|
||||||
:label="item.testitem_name"
|
:label="item.testitem_name"
|
||||||
:value="item.testitem"
|
:value="item.testitem"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -319,17 +354,14 @@
|
||||||
v-model="checkAll"
|
v-model="checkAll"
|
||||||
:indeterminate="indeterminate"
|
:indeterminate="indeterminate"
|
||||||
@change="handleCheckAll"
|
@change="handleCheckAll"
|
||||||
>
|
>全部</el-checkbox>
|
||||||
全部
|
|
||||||
</el-checkbox>
|
|
||||||
</template>
|
</template>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in qct_defects"
|
v-for="item in qct_defects"
|
||||||
:key="item.defect"
|
:key="item.defect"
|
||||||
:label="item.defect_name"
|
:label="item.defect_name"
|
||||||
:value="item.defect"
|
:value="item.defect"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -374,7 +406,7 @@
|
||||||
<el-table :data="selectWpr" border>
|
<el-table :data="selectWpr" border>
|
||||||
<el-table-column prop="number" label="物料编号"></el-table-column>
|
<el-table-column prop="number" label="物料编号"></el-table-column>
|
||||||
<el-table-column v-for="item2 in defectlists" :key="item2.id" :label="item2.defect_name">
|
<el-table-column v-for="item2 in defectlists" :key="item2.id" :label="item2.defect_name">
|
||||||
{{ item2.value }}
|
<el-switch v-model="item2.value" disabled></el-switch>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="90" align="center" fixed="right">
|
<el-table-column label="操作" width="90" align="center" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -434,6 +466,14 @@ export default {
|
||||||
material_out:{
|
material_out:{
|
||||||
type:String,
|
type:String,
|
||||||
default:"",
|
default:"",
|
||||||
|
},
|
||||||
|
material_in:{
|
||||||
|
type:String,
|
||||||
|
default:"",
|
||||||
|
},
|
||||||
|
processType:{
|
||||||
|
type:String,
|
||||||
|
default:"",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// components: {
|
// components: {
|
||||||
|
|
@ -447,7 +487,7 @@ export default {
|
||||||
ins:'输入物料详情',
|
ins:'输入物料详情',
|
||||||
outs:'输出物料详情',
|
outs:'输出物料详情',
|
||||||
},
|
},
|
||||||
mode:'ins',
|
mode:'',
|
||||||
//表单数据
|
//表单数据
|
||||||
form: {
|
form: {
|
||||||
test_user:"",
|
test_user:"",
|
||||||
|
|
@ -466,19 +506,21 @@ export default {
|
||||||
route_code:"",
|
route_code:"",
|
||||||
wprInputText:"",
|
wprInputText:"",
|
||||||
params: {mlogb:'',page:0},
|
params: {mlogb:'',page:0},
|
||||||
|
canMultiple:false,
|
||||||
checkAll: false,
|
checkAll: false,
|
||||||
hideAdd: true,
|
hideAdd: true,
|
||||||
visible: false,
|
visible: false,
|
||||||
setVisible:false,
|
setVisible:false,
|
||||||
multipleSet:false,
|
multipleSet:false,
|
||||||
checkVisible:false,
|
checkVisible:false,
|
||||||
|
hasWpr:false,
|
||||||
descriptionVisible:false,
|
descriptionVisible:false,
|
||||||
options:[],
|
options:[],
|
||||||
qct_defects:[],
|
qct_defects:[],
|
||||||
qct_testitems:[],
|
qct_testitems:[],
|
||||||
mlogbwlist:[],
|
mlogbwlist:[],
|
||||||
|
testitems:[],
|
||||||
equipmentOptions:[],
|
equipmentOptions:[],
|
||||||
process_type:"",
|
|
||||||
addTemplate:{
|
addTemplate:{
|
||||||
mlogb: "",
|
mlogb: "",
|
||||||
number: "",
|
number: "",
|
||||||
|
|
@ -500,6 +542,7 @@ export default {
|
||||||
optionsEq:[],
|
optionsEq:[],
|
||||||
defectlists:[],
|
defectlists:[],
|
||||||
testitemlists:[],
|
testitemlists:[],
|
||||||
|
selectWprList:[],
|
||||||
qct_defects_origin:[],
|
qct_defects_origin:[],
|
||||||
selectWpr:[],
|
selectWpr:[],
|
||||||
tableHeight:500,
|
tableHeight:500,
|
||||||
|
|
@ -519,39 +562,69 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.route_code = this.$route.path.split("/")[2];
|
that.route_code = that.$route.path.split("/")[2];
|
||||||
if(this.route_code=='niuzhuan'){
|
|
||||||
this.getEquipment4();
|
|
||||||
}
|
|
||||||
that.hideAdd = that.isSubmit;
|
that.hideAdd = that.isSubmit;
|
||||||
if(that.mgroupName=='排一次棒'||that.mgroupName=='排板'){
|
|
||||||
// that.getNewNumber();
|
|
||||||
}
|
|
||||||
that.params.mlogb = that.addTemplate.mlogb = that.mlogb;
|
that.params.mlogb = that.addTemplate.mlogb = that.mlogb;
|
||||||
that.currentDate = this.$TOOL.dateFormat2(new Date());
|
that.currentDate = that.$TOOL.dateFormat2(new Date());
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open(mode = "ins",qct = '') {
|
open(mode = "",qct = '') {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
if(that.mode == 'ins'){//输入
|
if(that.processType=='20'&&that.mode=='outs'){
|
||||||
that.getOptions();
|
that.canMultiple = true;
|
||||||
this.qct = ""
|
|
||||||
}else{
|
|
||||||
this.qct = qct;
|
|
||||||
}
|
}
|
||||||
that.$API.mtm.mgroup.item.req(that.mgroup).then((res) => {
|
if(that.mode == 'ins'){
|
||||||
that.process_type=res.process_type;
|
if(that.route_code=='niuzhuan'){
|
||||||
if(that.mode == 'outs'&&qct!==''&&qct!==null){//输出
|
that.gettestitem();
|
||||||
|
}else{
|
||||||
|
that.getOptions();
|
||||||
|
that.getList();
|
||||||
|
that.qct = ""
|
||||||
|
}
|
||||||
|
}else if(that.mode == 'outs'){//输出
|
||||||
|
that.qct = qct;
|
||||||
|
if(qct!==''&&qct!==null){//输出
|
||||||
that.getdefects();
|
that.getdefects();
|
||||||
}else{
|
}else{
|
||||||
|
that.$API.qm.qct.getQct.req({ material: that.material_out,type:'out',tag:'process' }).then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
that.testdefectss(res);
|
||||||
|
}).catch(()=>{
|
||||||
that.getList();
|
that.getList();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
that.visible = true;
|
||||||
|
setTimeout(() => {
|
||||||
|
that.tableHeight = document.getElementById('mlogbwMain').clientHeight-20;
|
||||||
|
},500)
|
||||||
|
},
|
||||||
|
//获取输入的testItem
|
||||||
|
gettestitem(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.qm.qct.getQct.req({ material: that.material_in,type:'in',tag:'process' }).then((res) => {
|
||||||
|
that.qct = res.id;
|
||||||
|
that.testitems = [];
|
||||||
|
let list = res.qct_testitems;
|
||||||
|
list.forEach(item=>{
|
||||||
|
if(item.testitem_type=='20'){
|
||||||
|
let obj = Object.assign({}, item);
|
||||||
|
obj.value = null;
|
||||||
|
obj.canEdit = true;
|
||||||
|
if(item.testitem_field_type=='input-number'||item.testitem_field_type=='input-int'){
|
||||||
|
obj.value = null;
|
||||||
|
}
|
||||||
|
if(item.testitem_field_type=='select-text'||item.testitem_field_type=='selects-text'){
|
||||||
|
let str = obj.testitem_choices.replace(/'/g, '"');
|
||||||
|
let arr = JSON.parse(str);
|
||||||
|
obj.testitem_choices = arr;
|
||||||
|
}
|
||||||
|
that.testitems.push(obj)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.visible = true;
|
that.getList();
|
||||||
setTimeout(() => {
|
});
|
||||||
this.tableHeight = document.getElementById('mlogbwMain').clientHeight-20;
|
|
||||||
},500)
|
|
||||||
},
|
},
|
||||||
getNewNumber(){
|
getNewNumber(){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -594,19 +667,27 @@ export default {
|
||||||
}else if(num<1000){
|
}else if(num<1000){
|
||||||
num = "0"+num;
|
num = "0"+num;
|
||||||
}
|
}
|
||||||
console.log('num',num);
|
if(that.mgroupName=='排一次棒'){
|
||||||
console.log('data.number:',data.number);
|
|
||||||
if(this.mgroupName=='排一次棒'){
|
|
||||||
that.addTemplate.number = years+months+num;
|
that.addTemplate.number = years+months+num;
|
||||||
}
|
}
|
||||||
if(that.mgroupName=='排板'){
|
if(that.mgroupName=='排板'){
|
||||||
that.addTemplate.number = years+ months + that.material_model+num;
|
that.addTemplate.number = years+ months + that.material_model+num;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
selectChange(rows){
|
||||||
|
console.log('rowsrows',rows)
|
||||||
|
let that = this;
|
||||||
|
that.selectWprList = rows;
|
||||||
|
},
|
||||||
|
selectAllChange(datas){
|
||||||
|
console.log('datas',datas)
|
||||||
|
let that = this;
|
||||||
|
that.selectWprList = datas;
|
||||||
|
},
|
||||||
getEquipment4() {
|
getEquipment4() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.em.equipment.list.req({page:0,cate__code:"4"}).then((res) => {
|
that.$API.em.equipment.list.req({page:0,cate__code:"4",query:"{id,name,number}"}).then((res) => {
|
||||||
that.optionsEq = res;
|
that.optionsEq = res.reverse();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getEquipments(){
|
getEquipments(){
|
||||||
|
|
@ -617,21 +698,26 @@ export default {
|
||||||
},
|
},
|
||||||
getdefects(){
|
getdefects(){
|
||||||
let that = this;
|
let that = this;
|
||||||
if(that.qct!==''){
|
|
||||||
that.$API.qm.qct.item.req(that.qct).then((res) => {
|
that.$API.qm.qct.item.req(that.qct).then((res) => {
|
||||||
that.qct_defects = [];
|
that.qct_defects = [];
|
||||||
|
that.testdefectss(res);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
testdefectss(res){
|
||||||
|
let that = this;
|
||||||
res.qct_defects.forEach((item) => {
|
res.qct_defects.forEach((item) => {
|
||||||
that.addTemplate[item.defect_name] = false;
|
that.addTemplate[item.defect_name] = false;
|
||||||
let obj = Object.assign({}, item);
|
let obj = Object.assign({}, item);
|
||||||
obj.canEdit = that.process_type=='20'?false:true;
|
obj.canEdit = that.processType=='20'?false:true;
|
||||||
that.qct_defects.push(obj);
|
that.qct_defects.push(obj);
|
||||||
})
|
})
|
||||||
that.qct_defects_origin = that.qct_defects;
|
that.qct_defects_origin = that.qct_defects;
|
||||||
that.qct_testitems = [];
|
that.qct_testitems = [];
|
||||||
res.qct_testitems.forEach((item2) => {
|
res.qct_testitems.forEach((item2) => {
|
||||||
|
if(item2.testitem_type!=='20'){
|
||||||
let obj2 = Object.assign({}, item2);
|
let obj2 = Object.assign({}, item2);
|
||||||
obj2.value = '';
|
obj2.value = '';
|
||||||
obj2.canEdit = that.process_type=='20'?false:true;
|
obj2.canEdit = that.processType=='20'?false:true;
|
||||||
|
|
||||||
obj2.addto_wpr = item2.addto_wpr;
|
obj2.addto_wpr = item2.addto_wpr;
|
||||||
if(item2.testitem_field_type=='input-number'||item2.testitem_field_type=='input-int'){
|
if(item2.testitem_field_type=='input-number'||item2.testitem_field_type=='input-int'){
|
||||||
|
|
@ -645,17 +731,14 @@ export default {
|
||||||
that.addTemplate[item2.testitem_name] = null;
|
that.addTemplate[item2.testitem_name] = null;
|
||||||
}
|
}
|
||||||
that.qct_testitems.push(obj2);
|
that.qct_testitems.push(obj2);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
that.qct_testitems_origin = that.qct_testitems;
|
that.qct_testitems_origin = that.qct_testitems;
|
||||||
that.getList();
|
that.getList();
|
||||||
})
|
|
||||||
}else{
|
|
||||||
that.getList();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getOptions(){
|
getOptions(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.wpr.list.req({wm:that.wm,page:0}).then((res) => {
|
that.$API.wpm.wpr.list.req({wm:that.wm,page:0,query:"{id,number}"}).then((res) => {
|
||||||
that.options = res;
|
that.options = res;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -695,11 +778,6 @@ export default {
|
||||||
})
|
})
|
||||||
that.qct_testitems.forEach((item2) => {
|
that.qct_testitems.forEach((item2) => {
|
||||||
obj[item2.testitem_name] = null;
|
obj[item2.testitem_name] = null;
|
||||||
// if(item2.testitem_field_type=='input-number'||item.testitem_field_type=='input-int'){
|
|
||||||
// obj[item2.testitem_name] = null;
|
|
||||||
// }else{
|
|
||||||
// obj[item2.testitem_name] = "";
|
|
||||||
// }
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -717,7 +795,7 @@ export default {
|
||||||
obj.wpr = row.wpr;
|
obj.wpr = row.wpr;
|
||||||
obj.note = row.note;
|
obj.note = row.note;
|
||||||
//qct不为空,有检验表
|
//qct不为空,有检验表
|
||||||
if(that.qct!==''){
|
if(that.qct!==''&&that.qct!==null){
|
||||||
that.qct_defects_origin.forEach(item => {
|
that.qct_defects_origin.forEach(item => {
|
||||||
if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){
|
if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){
|
||||||
let str = item.rule_expression.replace(/`/g, '');
|
let str = item.rule_expression.replace(/`/g, '');
|
||||||
|
|
@ -727,30 +805,55 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//检验表已经填过
|
//检验表已经填过
|
||||||
if(row.ftest!==null&&row.ftest!==undefined&&row.ftest!==''){
|
// if(row.ftest!==null&&row.ftest!==undefined&&row.ftest!==''){
|
||||||
console.log('已填过');
|
// console.log('已填过');
|
||||||
obj.ftest =row.ftest;
|
// obj.ftest =row.ftest;
|
||||||
obj.ftest.ftestdefects.forEach((item) => {
|
// obj.ftest.ftestdefects.forEach((item) => {
|
||||||
item.has = row[item.defect_name];
|
// item.has = row[item.defect_name];
|
||||||
})
|
// })
|
||||||
row.ftest.ftestitems.forEach((item1) => {
|
// row.ftest.ftestitems.forEach((item1) => {
|
||||||
item1.test_val_json = row[item1.testitem_name];
|
// item1.test_val_json = row[item1.testitem_name];
|
||||||
})
|
// })
|
||||||
}else{//检验表未填过
|
// }else{//检验表未填过
|
||||||
console.log('未填过');
|
// console.log('未填过');
|
||||||
|
// obj.ftest = {};
|
||||||
|
// obj.ftest.ftestitems = [];
|
||||||
|
// obj.ftest.ftestdefects = [];
|
||||||
|
// obj.ftest.qct = that.qct;
|
||||||
|
// obj.ftest.test_date = that.handle_date!=null?that.handle_date:that.currentDate;
|
||||||
|
// obj.ftest.test_user = that.handle_user;
|
||||||
|
// that.qct_defects_origin.forEach((item) => {
|
||||||
|
// let itemObj = {};
|
||||||
|
// itemObj.defect = item.defect;
|
||||||
|
// itemObj.test_user = that.handle_user;
|
||||||
|
// itemObj.has = row[item.defect_name]?row[item.defect_name]:false;
|
||||||
|
// obj.ftest.ftestdefects.push(itemObj);
|
||||||
|
// })
|
||||||
|
// that.qct_testitems.forEach((item1) => {
|
||||||
|
// let itemObj1 = {};
|
||||||
|
// itemObj1.testitem = item1.testitem;
|
||||||
|
// itemObj1.test_user = that.handle_user;
|
||||||
|
// itemObj1.addto_wpr = item1.addto_wpr;
|
||||||
|
// itemObj1.test_val_json = row[item1.testitem_name];
|
||||||
|
// obj.ftest.ftestitems.push(itemObj1);
|
||||||
|
// })
|
||||||
|
// }
|
||||||
obj.ftest = {};
|
obj.ftest = {};
|
||||||
obj.ftest.ftestitems = [];
|
obj.ftest.ftestitems = [];
|
||||||
obj.ftest.ftestdefects = [];
|
obj.ftest.ftestdefects = [];
|
||||||
obj.ftest.qct = that.qct;
|
obj.ftest.qct = that.qct;
|
||||||
obj.ftest.test_date = that.handle_date!=null?that.handle_date:that.currentDate;
|
obj.ftest.test_date = that.handle_date!=null?that.handle_date:that.currentDate;
|
||||||
obj.ftest.test_user = that.handle_user;
|
obj.ftest.test_user = that.handle_user;
|
||||||
that.qct_defects_origin.forEach((item) => {
|
if(that.qct_defects.length>0){
|
||||||
|
that.qct_defects.forEach((item) => {
|
||||||
let itemObj = {};
|
let itemObj = {};
|
||||||
itemObj.defect = item.defect;
|
itemObj.defect = item.defect;
|
||||||
itemObj.test_user = that.handle_user;
|
itemObj.test_user = that.handle_user;
|
||||||
itemObj.has = row[item.defect_name]?row[item.defect_name]:false;
|
itemObj.has = row[item.defect_name]?row[item.defect_name]:false;
|
||||||
obj.ftest.ftestdefects.push(itemObj);
|
obj.ftest.ftestdefects.push(itemObj);
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
if(that.qct_testitems.length>0){
|
||||||
that.qct_testitems.forEach((item1) => {
|
that.qct_testitems.forEach((item1) => {
|
||||||
let itemObj1 = {};
|
let itemObj1 = {};
|
||||||
itemObj1.testitem = item1.testitem;
|
itemObj1.testitem = item1.testitem;
|
||||||
|
|
@ -760,12 +863,20 @@ export default {
|
||||||
obj.ftest.ftestitems.push(itemObj1);
|
obj.ftest.ftestitems.push(itemObj1);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
if(that.mode == 'ins'&&that.route_code=='niuzhuan'&&that.testitems.length>0){
|
||||||
// console.log('obj',obj);
|
|
||||||
if(that.mode == 'ins'&&that.route_code=='niuzhuan'){
|
|
||||||
obj.equip = row.equip;
|
obj.equip = row.equip;
|
||||||
obj.work_start_time = row.work_start_time;
|
obj.work_start_time = row.work_start_time;
|
||||||
obj.work_end_time = row.work_end_time;
|
that.testitems.forEach((item1) => {
|
||||||
|
let itemObj1 = {};
|
||||||
|
itemObj1.testitem = item1.testitem;
|
||||||
|
itemObj1.test_user = that.handle_user;
|
||||||
|
itemObj1.addto_wpr = item1.addto_wpr;
|
||||||
|
itemObj1.test_val_json = row[item1.testitem_name];
|
||||||
|
obj.ftest.ftestitems.push(itemObj1);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
obj.ftest = null;
|
||||||
}
|
}
|
||||||
if(row.id!==''&&row.id!==undefined&&row.id!==null){
|
if(row.id!==''&&row.id!==undefined&&row.id!==null){
|
||||||
obj.id = row.id;
|
obj.id = row.id;
|
||||||
|
|
@ -794,10 +905,17 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
formTableEdit(row) {
|
formTableEdit(row) {
|
||||||
this.mlogbwlist.forEach((item, index) => {
|
let that = this;
|
||||||
|
if(that.route_code=='niuzhuan'&&that.optionsEq.length==0){
|
||||||
|
that.getEquipment4();
|
||||||
|
}
|
||||||
|
that.mlogbwlist.forEach((item, index) => {
|
||||||
if (item.id == row.id) {
|
if (item.id == row.id) {
|
||||||
// console.log('row',row);
|
that.mlogbwlist[index].isEdit = true;
|
||||||
this.mlogbwlist[index].isEdit = true;
|
let date = new Date();
|
||||||
|
if(that.mlogbwlist[index].work_start_time==''||that.mlogbwlist[index].work_start_time==null){
|
||||||
|
that.mlogbwlist[index].work_start_time = that.$TOOL.dateFormat(date, 'yyyy-MM-dd hh:mm:ss');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -840,7 +958,6 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
let index = that.mlogbwlist.indexOf(row);
|
let index = that.mlogbwlist.indexOf(row);
|
||||||
that.qct_defects_origin.forEach(item => {
|
that.qct_defects_origin.forEach(item => {
|
||||||
// console.log('item.rule_expression',item.rule_expression);
|
|
||||||
if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){
|
if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){
|
||||||
let str = item.rule_expression.replace(/`/g, '');
|
let str = item.rule_expression.replace(/`/g, '');
|
||||||
str = str.replace(/\${(.*?)}/g, 'row.\$1')
|
str = str.replace(/\${(.*?)}/g, 'row.\$1')
|
||||||
|
|
@ -886,7 +1003,7 @@ export default {
|
||||||
},
|
},
|
||||||
userChange(val){
|
userChange(val){
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$API.system.user.item.req(val).then((res) => {
|
that.$API.system.user.item.req(val).then((res) => {
|
||||||
that.setForm.test_user_name = res.name;
|
that.setForm.test_user_name = res.name;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -945,7 +1062,8 @@ export default {
|
||||||
},
|
},
|
||||||
checkSetting(){
|
checkSetting(){
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$refs.dialogForm.validate((valid) => {
|
that.isSaveing = true;
|
||||||
|
that.$refs.dialogForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
Object.assign(that.setForm,that.form);
|
Object.assign(that.setForm,that.form);
|
||||||
that.mlogbwlist.forEach(item => {
|
that.mlogbwlist.forEach(item => {
|
||||||
|
|
@ -996,17 +1114,19 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
that.$API.wpm.mlogbw.update.req("bulk",that.mlogbwlist).then((res) => {
|
that.$API.wpm.mlogbw.update.req("bulk",that.mlogbwlist).then((res) => {
|
||||||
this.form = {};
|
that.form = {};
|
||||||
that.checkVisible = false;
|
that.checkVisible = false;
|
||||||
this.multipleSet = true;
|
that.multipleSet = true;
|
||||||
that.descriptionVisible = true;
|
that.descriptionVisible = true;
|
||||||
that.qct_defects = [];
|
that.qct_defects = [];
|
||||||
that.qct_defects = that.defectlists;
|
that.qct_defects = that.defectlists;
|
||||||
that.qct_testitems = [];
|
that.qct_testitems = [];
|
||||||
that.qct_testitems = that.testitemlists;
|
that.qct_testitems = that.testitemlists;
|
||||||
that.tableHeight = document.getElementById('mlogbwMain').clientHeight-80;
|
that.tableHeight = document.getElementById('mlogbwMain').clientHeight-80;
|
||||||
|
that.isSaveing = false;
|
||||||
that.getList();
|
that.getList();
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
|
that.isSaveing = false;
|
||||||
return err;
|
return err;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -1023,13 +1143,18 @@ export default {
|
||||||
check_set(){
|
check_set(){
|
||||||
this.wprNumber = "";
|
this.wprNumber = "";
|
||||||
this.selectWpr = [];
|
this.selectWpr = [];
|
||||||
|
if(this.selectWprList.length>0){
|
||||||
|
this.selectWpr = this.selectWprList;
|
||||||
|
}
|
||||||
this.setVisible=true;
|
this.setVisible=true;
|
||||||
},
|
},
|
||||||
//扫描物料将这一行放到第一行并编辑这一行
|
//扫描物料将这一行放到第一行并编辑这一行
|
||||||
wprinputChange(){
|
wprinputChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.mlogbwlist.forEach((item,index) => {
|
that.mlogbwlist.forEach((item,index) => {
|
||||||
if(item.number == that.wprInputText){
|
let indexs = item.number.indexOf(that.wprInputText)
|
||||||
|
if(indexs>-1&&that.wprInputText !== ""){
|
||||||
|
// if(item.number == that.wprInputText){
|
||||||
let obj = Object.assign({},item);
|
let obj = Object.assign({},item);
|
||||||
obj.isEdit = true;
|
obj.isEdit = true;
|
||||||
that.mlogbwlist.splice(index,1);
|
that.mlogbwlist.splice(index,1);
|
||||||
|
|
@ -1088,7 +1213,7 @@ export default {
|
||||||
},
|
},
|
||||||
saveSetting(){
|
saveSetting(){
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$refs.dialogForm.validate((valid) => {
|
that.$refs.dialogForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
that.selectWpr.forEach(item => {
|
that.selectWpr.forEach(item => {
|
||||||
item.ftest.ftestdefects.forEach(defect => {
|
item.ftest.ftestdefects.forEach(defect => {
|
||||||
|
|
|
||||||
|
|
@ -201,6 +201,8 @@
|
||||||
:process="process"
|
:process="process"
|
||||||
:mtask="mtask"
|
:mtask="mtask"
|
||||||
:dept = "deptId"
|
:dept = "deptId"
|
||||||
|
:mgroup="mgroupId"
|
||||||
|
:processType="processType"
|
||||||
@closed="detailClose"
|
@closed="detailClose"
|
||||||
>
|
>
|
||||||
</detail-drawer>
|
</detail-drawer>
|
||||||
|
|
@ -241,6 +243,10 @@ export default {
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
mgroupMtype: {
|
mgroupMtype: {
|
||||||
|
type: Number,
|
||||||
|
default: 10,
|
||||||
|
},
|
||||||
|
processType: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
}
|
}
|
||||||
|
|
@ -267,6 +273,7 @@ export default {
|
||||||
selection: [],
|
selection: [],
|
||||||
mtask: "",
|
mtask: "",
|
||||||
mlogId: "",
|
mlogId: "",
|
||||||
|
mgroup_name: "",
|
||||||
route_code: "",
|
route_code: "",
|
||||||
equipmentId: "",
|
equipmentId: "",
|
||||||
showHidden:false,
|
showHidden:false,
|
||||||
|
|
@ -276,6 +283,7 @@ export default {
|
||||||
mgroupName: {
|
mgroupName: {
|
||||||
handler: function (newval,odlval) {
|
handler: function (newval,odlval) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.mgroup_name = newval;
|
||||||
that.params.mgroup = "";
|
that.params.mgroup = "";
|
||||||
that.apiObj = null;
|
that.apiObj = null;
|
||||||
that.getMgroupInfo();
|
that.getMgroupInfo();
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@
|
||||||
v-model="form.count_notok"
|
v-model="form.count_notok"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
|
disabled
|
||||||
@change="handleCountNotokChange"
|
@change="handleCountNotokChange"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -269,17 +270,25 @@ export default {
|
||||||
},
|
},
|
||||||
getdefects(){
|
getdefects(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.qm.qct.list.req({page: 0, qctmat__material: that.itemObj.material,tags:'inm'}).then((res) => {
|
that.$API.qm.qct.getQct.req({ material: that.itemObj.material,type:'out',tag:'process' }).then((res) => {
|
||||||
if(res.length>0){
|
console.log(res)
|
||||||
that.qct = res[0].id;
|
that.qct = res.id;
|
||||||
that.$API.qm.qct.item.req(res[0].id).then((res) => {
|
|
||||||
res.qct_defects.forEach((item) => {
|
res.qct_defects.forEach((item) => {
|
||||||
that.form[item.defect_name] = 0;
|
that.form[item.defect_name] = 0;
|
||||||
})
|
})
|
||||||
that.qct_defects=res.qct_defects;
|
that.qct_defects=res.qct_defects;
|
||||||
})
|
})
|
||||||
}
|
// that.$API.qm.qct.get.req({page: 0, qctmat__material: that.itemObj.material,tags:'inm'}).then((res) => {
|
||||||
})
|
// if(res.length>0){
|
||||||
|
// that.qct = res[0].id;
|
||||||
|
// that.$API.qm.qct.item.req(res[0].id).then((res) => {
|
||||||
|
// res.qct_defects.forEach((item) => {
|
||||||
|
// that.form[item.defect_name] = 0;
|
||||||
|
// })
|
||||||
|
// that.qct_defects=res.qct_defects;
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
//渲染工单提交按钮
|
//渲染工单提交按钮
|
||||||
getInit() {
|
getInit() {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,187 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel"></div>
|
||||||
|
<div class="right-panel">
|
||||||
|
<el-select
|
||||||
|
v-model="query.type2"
|
||||||
|
clearable
|
||||||
|
style="width: 120px; margin-left: 2px"
|
||||||
|
placeholder="状态"
|
||||||
|
@change="handleQuery"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-input
|
||||||
|
v-model="query.batch"
|
||||||
|
placeholder="编号"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
:params="params"
|
||||||
|
>
|
||||||
|
<el-table-column label="检验类型">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.type2 == 10">
|
||||||
|
{{ type2_[scope.row.type2] }}
|
||||||
|
</el-tag>
|
||||||
|
<el-tag v-else type="success">
|
||||||
|
{{ type2_[scope.row.type2] }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="物料名称" prop="material_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料批次" prop="batch">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="总数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检验数">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.type2 == 10">{{ scope.row.count_sampling }}</span>
|
||||||
|
<span v-else>{{ scope.row.count }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合格数">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.type2 == 10">{{ scope.row.count_sampling_ok }}</span>
|
||||||
|
<span v-else>{{ scope.row.count_ok }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="不合格数" prop="count_notok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合格率">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.type2 == 10">{{ (scope.row.count_sampling_ok/scope.row.count_sampling*100).toFixed(2) }}%</span>
|
||||||
|
<span v-else>{{ (scope.row.count_ok/scope.row.count*100).toFixed(2) }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检验日期" prop="test_date">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检验人" prop="test_user_name">
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "mio",
|
||||||
|
props: {
|
||||||
|
deptId: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
mgroupId: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
mgroupName: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
processId: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
mgroupcode: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
type2_: {
|
||||||
|
10: "抽检",
|
||||||
|
20: "全检",
|
||||||
|
},
|
||||||
|
typeOptions:[
|
||||||
|
{id:10,name:"抽检"},
|
||||||
|
{id:20,name:"全检"},
|
||||||
|
],
|
||||||
|
query:{},
|
||||||
|
params: {
|
||||||
|
type:'process',
|
||||||
|
material__process__name: this.mgroupName,
|
||||||
|
},
|
||||||
|
apiObj: this.$API.qm.ftestwork.list,
|
||||||
|
type: "",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//查看
|
||||||
|
table_detail(row) {
|
||||||
|
let that = this;
|
||||||
|
that.cate_type=row.type;
|
||||||
|
that.dialog.inmRecord = true;
|
||||||
|
that.$nextTick(() => {
|
||||||
|
that.$refs.inmRecordDialog.open("show").setData(row,row.type);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//撤销
|
||||||
|
revert(row) {
|
||||||
|
this.$confirm(`确定撤销该操作吗?`, "提示", {
|
||||||
|
type: "warning",
|
||||||
|
}).then(() => {
|
||||||
|
this.$API.inm.mio.revert.req(row.id).then((res) => {
|
||||||
|
this.$message.success("撤销成功");
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
return res;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
|
||||||
|
//删除
|
||||||
|
table_del(row) {
|
||||||
|
this.$confirm(`确定删除吗?`, "提示", {
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$API.inm.mio.delete
|
||||||
|
.req(row.id)
|
||||||
|
.then((res) => {
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
return res;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleQuery() {
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
|
resetQuery() {
|
||||||
|
this.query = {};
|
||||||
|
},
|
||||||
|
handleinmSuccess(){
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -43,13 +43,13 @@
|
||||||
<scTable
|
<scTable
|
||||||
stripe
|
stripe
|
||||||
ref="table"
|
ref="table"
|
||||||
:data="tableData"
|
:apiObj="apiObj"
|
||||||
|
:params="params"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
hideDo
|
|
||||||
@row-click="table_detail"
|
@row-click="table_detail"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50"></el-table-column>
|
<el-table-column type="index" width="50"></el-table-column>
|
||||||
<el-table-column label="批次号" prop="batch" min-width="80"></el-table-column>
|
<el-table-column label="批次号" prop="batch" min-width="100"></el-table-column>
|
||||||
<el-table-column label="操作员" min-width="80">
|
<el-table-column label="操作员" min-width="80">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="scope.row.handle_users_&&scope.row.handle_users_.length>0">
|
<div v-if="scope.row.handle_users_&&scope.row.handle_users_.length>0">
|
||||||
|
|
@ -58,7 +58,8 @@
|
||||||
<span v-else>{{ scope.row.handle_user_name }}</span>
|
<span v-else>{{ scope.row.handle_user_name }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="设备" prop="equipment_name" min-width="150"></el-table-column>
|
<el-table-column label="班组" prop="team_name" min-width="80"></el-table-column>
|
||||||
|
<el-table-column label="设备" prop="equipment_name" min-width="140"></el-table-column>
|
||||||
<el-table-column label="领料数" prop="count_use"></el-table-column>
|
<el-table-column label="领料数" prop="count_use"></el-table-column>
|
||||||
<el-table-column label="加工数" prop="count_real"></el-table-column>
|
<el-table-column label="加工数" prop="count_real"></el-table-column>
|
||||||
<el-table-column label="加工前不良" prop="count_pn_jgqbl"></el-table-column>
|
<el-table-column label="加工前不良" prop="count_pn_jgqbl"></el-table-column>
|
||||||
|
|
@ -96,32 +97,6 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- 工段物料库存 -->
|
|
||||||
<!-- <el-card style="width: 100%; margin: 1vh 0;" header="工段物料列表" shadow="never">
|
|
||||||
<scTable
|
|
||||||
ref="tableWm"
|
|
||||||
:apiObj="apiObjWm"
|
|
||||||
:params="paramsWm"
|
|
||||||
stripe
|
|
||||||
hideDo
|
|
||||||
:height="300"
|
|
||||||
hidePagination
|
|
||||||
>
|
|
||||||
<el-table-column label="物料名称" prop="material_name" show-overflow-tooltip>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="批次号" prop="batch">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="数量" prop="count">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="不合格标记" prop="notok_sign_name">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column width="100">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
|
||||||
</el-card> -->
|
|
||||||
<save-dialog
|
<save-dialog
|
||||||
v-if="dialog.save"
|
v-if="dialog.save"
|
||||||
ref="saveDialogs"
|
ref="saveDialogs"
|
||||||
|
|
@ -195,7 +170,6 @@ export default {
|
||||||
mgroup:''
|
mgroup:''
|
||||||
},
|
},
|
||||||
params: {
|
params: {
|
||||||
page: 0,
|
|
||||||
fmlog: "",
|
fmlog: "",
|
||||||
},
|
},
|
||||||
fmlogItem: {},
|
fmlogItem: {},
|
||||||
|
|
@ -266,7 +240,6 @@ export default {
|
||||||
that.material_out = that.material_out;
|
that.material_out = that.material_out;
|
||||||
that.paramsWm.mgroup = res.mgroup;
|
that.paramsWm.mgroup = res.mgroup;
|
||||||
that.apiObjWm = that.$API.wpm.wmaterial.list;
|
that.apiObjWm = that.$API.wpm.wmaterial.list;
|
||||||
that.getMlogs();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getMlogs(){
|
getMlogs(){
|
||||||
|
|
@ -312,7 +285,7 @@ export default {
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
that.$API.wpm.mlog.submit.req(row.id).then((res) => {
|
that.$API.wpm.mlog.submit.req(row.id).then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
that.getMlogs();
|
that.$refs.table.refresh();
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -327,7 +300,7 @@ export default {
|
||||||
if (res.err_msg) {
|
if (res.err_msg) {
|
||||||
that.$message.error(res.err_msg);
|
that.$message.error(res.err_msg);
|
||||||
} else {
|
} else {
|
||||||
that.getMlogs();
|
that.$refs.table.refresh();
|
||||||
that.$message.success("撤回成功");
|
that.$message.success("撤回成功");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -344,17 +317,17 @@ export default {
|
||||||
if (res.err_msg) {
|
if (res.err_msg) {
|
||||||
that.$message.error(res.err_msg);
|
that.$message.error(res.err_msg);
|
||||||
} else {
|
} else {
|
||||||
that.getMlogs();
|
that.$refs.table.refresh();
|
||||||
that.$message.success("删除成功");
|
that.$message.success("删除成功");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleSaveSuccess() {
|
handleSaveSuccess() {
|
||||||
this.getMlogs();
|
this.$refs.table.refresh();
|
||||||
},
|
},
|
||||||
handleCheckSuccess() {
|
handleCheckSuccess() {
|
||||||
this.getMlogs();
|
this.$refs.table.refresh();
|
||||||
},
|
},
|
||||||
fileUPSuccess(res) {
|
fileUPSuccess(res) {
|
||||||
console.log('res',res);
|
console.log('res',res);
|
||||||
|
|
|
||||||
|
|
@ -148,6 +148,20 @@
|
||||||
prop="recive_user_name"
|
prop="recive_user_name"
|
||||||
width="80"
|
width="80"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="审批状态"
|
||||||
|
v-if="route_code=='jianbo'"
|
||||||
|
width="84"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.ticket">
|
||||||
|
<el-tag :type="actStateEnum[scope.row.ticket_.act_state]?.type">
|
||||||
|
{{actStateEnum[scope.row.ticket_.act_state]?.text}}
|
||||||
|
</el-tag>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="备注"
|
label="备注"
|
||||||
prop="note"
|
prop="note"
|
||||||
|
|
@ -178,14 +192,14 @@
|
||||||
size="small"
|
size="small"
|
||||||
@click="table_receive(scope.row)"
|
@click="table_receive(scope.row)"
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time == null"
|
v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time == null&&(scope.row.ticket == null||(scope.row.ticket_&&scope.row.ticket_.state_&&scope.row.ticket_.state_.type== 2))"
|
||||||
>接收</el-button>
|
>接收</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
@click="table_reBack(scope.row)"
|
@click="table_reBack(scope.row)"
|
||||||
type="danger"
|
type="danger"
|
||||||
v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time!== null&&(scope.row.type == 10||scope.row.type == 20)&&scope.row.mtype == 10"
|
v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time!== null&&scope.row.type == 10&&scope.row.mtype == 10"
|
||||||
>退回</el-button>
|
>退回</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
|
|
@ -210,7 +224,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="
|
v-if="
|
||||||
(scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept)&&
|
(scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept)&&
|
||||||
scope.row.submit_time == null&&scope.row.mtype == 10
|
scope.row.submit_time == null&&scope.row.mtype == 10&&(scope.row.ticket == null||(scope.row.ticket_&&scope.row.ticket_.state_&&scope.row.ticket_.state_.type== 1))
|
||||||
"
|
"
|
||||||
>编辑</el-button
|
>编辑</el-button
|
||||||
>
|
>
|
||||||
|
|
@ -218,7 +232,7 @@
|
||||||
title="确定删除吗?"
|
title="确定删除吗?"
|
||||||
v-if="
|
v-if="
|
||||||
(scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept)&&
|
(scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept)&&
|
||||||
scope.row.submit_time == null
|
scope.row.submit_time == null&&(scope.row.ticket == null||(scope.row.ticket_&&scope.row.ticket_.state_&&scope.row.ticket_.state_.type!== 0))
|
||||||
"
|
"
|
||||||
@confirm="table_del(scope.row, scope.$index)"
|
@confirm="table_del(scope.row, scope.$index)"
|
||||||
>
|
>
|
||||||
|
|
@ -290,6 +304,7 @@
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./handover_form.vue";
|
import saveDialog from "./handover_form.vue";
|
||||||
import print from "./../setting/print/A4.vue";
|
import print from "./../setting/print/A4.vue";
|
||||||
|
import { actStateEnum } from "@/utils/enum.js";
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
deptId: {
|
deptId: {
|
||||||
|
|
@ -323,6 +338,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
actStateEnum,
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
|
|
||||||
dialog: {
|
dialog: {
|
||||||
|
|
@ -361,6 +377,7 @@ export default {
|
||||||
{ required: true, message: "请选择接收工段", trigger: "blur" },
|
{ required: true, message: "请选择接收工段", trigger: "blur" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
route_code: "",
|
||||||
// setNameVisible: false,
|
// setNameVisible: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -372,6 +389,7 @@ export default {
|
||||||
that.apiObj = that.$API.wpm.handover.list;
|
that.apiObj = that.$API.wpm.handover.list;
|
||||||
that.$refs.table.refresh();
|
that.$refs.table.refresh();
|
||||||
that.getMgroupOptions();
|
that.getMgroupOptions();
|
||||||
|
that.route_code = that.$route.path.split("/")[2];
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取工段列表
|
//获取工段列表
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@
|
||||||
placeholder="接收工段"
|
placeholder="接收工段"
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:disabled="type==40"
|
:disabled="type==40||mode!=='add'"
|
||||||
@change="getUserList2"
|
@change="getUserList2"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -161,7 +161,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24" v-if="type!==10">
|
<el-col :md="12" :sm="24" v-if="type==10">
|
||||||
<el-form-item label="更改批次">
|
<el-form-item label="更改批次">
|
||||||
<el-switch v-model="change_batch"></el-switch>
|
<el-switch v-model="change_batch"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -171,15 +171,39 @@
|
||||||
<el-input v-model="form.note" placeholder="处理备注"></el-input>
|
<el-input v-model="form.note" placeholder="处理备注"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24" v-if="change_batch">
|
<el-col :md="12" :sm="24" v-if="type==10&&change_batch">
|
||||||
<el-form-item label="新批次号" prop="new_batch">
|
<el-form-item label="新批次号" prop="new_batch">
|
||||||
<el-input v-model="form.new_batch" placeholder="新批次号"></el-input>
|
<el-input v-model="form.new_batch" placeholder="新批次号"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" v-if="route_code=='tuihuo'">
|
||||||
|
<el-form-item label="检验附件">
|
||||||
|
<sc-upload-file
|
||||||
|
v-model="fileList"
|
||||||
|
:multiple="false"
|
||||||
|
:limit="1"
|
||||||
|
:accept="['.xlsx', '.xls']"
|
||||||
|
@success = "fileUPSuccess"
|
||||||
|
>
|
||||||
|
<el-button type="primary" icon="el-icon-upload"> </el-button>
|
||||||
|
</sc-upload-file>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-footer v-if="mode!=='show'">
|
<el-footer v-show="mode!=='show'">
|
||||||
<el-button type="primary" v-loading="isSaveing" @click="submit">确定</el-button>
|
<template v-if="route_code=='tuihuo'&&type==10&&mtype==10">
|
||||||
|
<el-button
|
||||||
|
v-for="item in transitions"
|
||||||
|
:key="item.id"
|
||||||
|
type="primary"
|
||||||
|
:loading="isSaveing"
|
||||||
|
:disabled="isSaveing"
|
||||||
|
@click="submitTicketCreate(item.id)"
|
||||||
|
style="margin-right: 4px"
|
||||||
|
>{{ item.name }}</el-button>
|
||||||
|
</template>
|
||||||
|
<el-button v-else type="primary" v-loading="isSaveing" @click="submit">确定</el-button>
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button @click="visible = false">取消</el-button>
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
@ -236,12 +260,15 @@ export default {
|
||||||
recive_user: null,
|
recive_user: null,
|
||||||
recive_mgroup: null,
|
recive_mgroup: null,
|
||||||
handoverb:[],
|
handoverb:[],
|
||||||
|
ticket:null
|
||||||
},
|
},
|
||||||
|
initForm:{},
|
||||||
selectObjIds:[],
|
selectObjIds:[],
|
||||||
apiObjM:null,
|
apiObjM:null,
|
||||||
paramsM:{},
|
paramsM:{},
|
||||||
selectObj:{},
|
selectObj:{},
|
||||||
selectObjs:[],
|
selectObjs:[],
|
||||||
|
transitions:[],
|
||||||
rules: {
|
rules: {
|
||||||
batch: [
|
batch: [
|
||||||
{
|
{
|
||||||
|
|
@ -294,7 +321,9 @@ export default {
|
||||||
listParams:{},
|
listParams:{},
|
||||||
totalCount: 0,
|
totalCount: 0,
|
||||||
deptID:'',
|
deptID:'',
|
||||||
|
route_code:'',
|
||||||
codeText: "",
|
codeText: "",
|
||||||
|
fileList:[],
|
||||||
userList: [],
|
userList: [],
|
||||||
userList2: [],
|
userList2: [],
|
||||||
mgroupOptions: [],
|
mgroupOptions: [],
|
||||||
|
|
@ -314,8 +343,10 @@ export default {
|
||||||
that.materialObj = materialObj;
|
that.materialObj = materialObj;
|
||||||
that.form.handle_date = that.form.send_date = this.$TOOL.dateFormat2(new Date());
|
that.form.handle_date = that.form.send_date = this.$TOOL.dateFormat2(new Date());
|
||||||
that.form.send_mgroup = that.mgroupId;
|
that.form.send_mgroup = that.mgroupId;
|
||||||
|
that.route_code = that.$route.path.split("/")[2];
|
||||||
//type 10:正常交接 ;20:返工交接 ;40:报废交接
|
//type 10:正常交接 ;20:返工交接 ;40:报废交接
|
||||||
//mtype 10:正常交接 ;20:分批操作 ;30:合批操作
|
//mtype 10:正常交接 ;20:分批操作 ;30:合批操作
|
||||||
|
//state 10:合格;20:不合格;30:返工;34:返工完成;40:检验;50:报废
|
||||||
//获取交接人员
|
//获取交接人员
|
||||||
if(that.type==20&&that.mgroupName=='废品库'){//废品出库交接
|
if(that.type==20&&that.mgroupName=='废品库'){//废品出库交接
|
||||||
that.getCkUserList();
|
that.getCkUserList();
|
||||||
|
|
@ -326,20 +357,16 @@ export default {
|
||||||
//获取交接物料
|
//获取交接物料
|
||||||
if(that.type==20&&that.mgroupName!=='废品库'){
|
if(that.type==20&&that.mgroupName!=='废品库'){
|
||||||
//返工交接
|
//返工交接
|
||||||
// that.getMaterialRework();
|
|
||||||
that.paramsM = {mgroup: that.mgroupId,page: 0,state__in:'20,34',tag : 'done'};
|
that.paramsM = {mgroup: that.mgroupId,page: 0,state__in:'20,34',tag : 'done'};
|
||||||
}else if(that.type==20&&that.mgroupName=='废品库'){
|
}else if(that.type==20&&that.mgroupName=='废品库'){
|
||||||
//废品出库
|
//废品出库
|
||||||
// that.getMaterialFP();
|
|
||||||
that.paramsM = {page: 0,state : 50,state_all: 1};
|
that.paramsM = {page: 0,state : 50,state_all: 1};
|
||||||
}else if(that.type==40){
|
}else if(that.type==40){
|
||||||
//报废交接
|
//报废交接
|
||||||
// that.getMaterialNotok();
|
|
||||||
that.paramsM = {mgroupx: that.mgroupId,page: 0,state:20};
|
that.paramsM = {mgroupx: that.mgroupId,page: 0,state:20};
|
||||||
}else{
|
}else{
|
||||||
//其他
|
//其他
|
||||||
that.paramsM = {mgroup: that.mgroupId,page: 0,state:10,tag : 'done'};
|
that.paramsM = {mgroup: that.mgroupId,page: 0,state:10,tag : 'done'};
|
||||||
// that.getMaterial();
|
|
||||||
}
|
}
|
||||||
that.apiObjM = this.$API.wpm.wmaterial.list;
|
that.apiObjM = this.$API.wpm.wmaterial.list;
|
||||||
if(that.type==40||that.type==20){
|
if(that.type==40||that.type==20){
|
||||||
|
|
@ -347,8 +374,26 @@ export default {
|
||||||
}else{
|
}else{
|
||||||
that.getMgroupOptions();
|
that.getMgroupOptions();
|
||||||
}
|
}
|
||||||
|
if(that.route_code=='tuihuo'){
|
||||||
|
that.getInit();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//渲染工单提交按钮
|
||||||
|
getInit() {
|
||||||
|
let that = this;
|
||||||
|
if(this.form.ticket!==null){
|
||||||
|
this.$API.wf.ticket.ticketTransitions.req(this.form.ticket).then((res) => {
|
||||||
|
that.transitions = res;
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
that.$API.wf.workflow.initkey.req(" backfire").then((res) => {
|
||||||
|
that.initForm = res;
|
||||||
|
that.transitions = res.transitions;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
//获取工段列表
|
//获取工段列表
|
||||||
getMgroupOptions() {
|
getMgroupOptions() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -499,6 +544,66 @@ export default {
|
||||||
that.totalCount = totalCount;
|
that.totalCount = totalCount;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
fileUPSuccess(res) {
|
||||||
|
this.test_file = res.path;
|
||||||
|
},
|
||||||
|
//提交退火交接单信息,创建工单
|
||||||
|
submitTicketCreate(id) {
|
||||||
|
let that = this;
|
||||||
|
that.isSaveing = true;
|
||||||
|
that.form.oinfo_json = {};
|
||||||
|
that.form.oinfo_json.test_file = that.test_file;
|
||||||
|
if(that.mode == "add") {
|
||||||
|
that.$API.wpm.handover.create.req(that.form).then((res) => {
|
||||||
|
let ticket = {};
|
||||||
|
ticket.title = '退火交接审批单';
|
||||||
|
ticket.workflow = that.initForm.workflow;
|
||||||
|
ticket.ticket_data = {t_id: res.id};
|
||||||
|
ticket.transition = id;
|
||||||
|
that.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.visible = false;
|
||||||
|
that.$emit("success");
|
||||||
|
that.$message.success("提交成功");
|
||||||
|
}).catch((e) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
});
|
||||||
|
}).catch((e) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
});
|
||||||
|
} else if (that.mode == "edit") {
|
||||||
|
that.$API.wpm.handover.update.req(that.form.id, that.form).then((res) => {
|
||||||
|
if (that.form.ticket == null) {
|
||||||
|
let ticket = {};
|
||||||
|
ticket.title = '退火交接审批单';
|
||||||
|
ticket.workflow = that.initForm.workflow;
|
||||||
|
ticket.ticket_data = {t_id: res.id};
|
||||||
|
ticket.transition = id;
|
||||||
|
that.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.visible = false;
|
||||||
|
that.$emit("success");
|
||||||
|
that.$message.success("提交成功");
|
||||||
|
}).catch((e) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let data = {transition: id, ticket_data: {}}
|
||||||
|
that.$API.wf.ticket.ticketHandle.req(that.form.ticket, data).then(res=>{
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.visible = false;
|
||||||
|
that.$emit("success");
|
||||||
|
that.$message.success("提交成功");
|
||||||
|
}).catch((e) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
//提交
|
//提交
|
||||||
submit() {
|
submit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,171 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="right-panel">
|
||||||
|
<el-input
|
||||||
|
style="margin-right: 5px"
|
||||||
|
v-model="query.search"
|
||||||
|
placeholder="名称"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
:params="params"
|
||||||
|
:query="query"
|
||||||
|
>
|
||||||
|
<!-- <el-table-column type="selection"></el-table-column> -->
|
||||||
|
<el-table-column label="状态" prop="state" width="100" >
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag :type="wmState[scope.row.state]?.type">
|
||||||
|
{{wmState[scope.row.state]?.text}}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="物料名称"
|
||||||
|
prop="material_name"
|
||||||
|
min-width="150"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.material_name }}
|
||||||
|
<span v-if="scope.row.material_origin != null"
|
||||||
|
>({{ scope.row.material_origin_name }})</span
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="批次号"
|
||||||
|
prop="batch"
|
||||||
|
min-width="120"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="部门/工段"
|
||||||
|
prop="belong_dept_name"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
{{scope.row.belong_dept_name}}/{{scope.row.mgroup_name}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="数量"
|
||||||
|
prop="count"
|
||||||
|
min-width="80"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="生产中"
|
||||||
|
prop="count_working"
|
||||||
|
min-width="80"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="不合格标记"
|
||||||
|
prop="defect_name"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
prop="create_time"
|
||||||
|
width="150"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
fixed="right"
|
||||||
|
align="center"
|
||||||
|
width="100"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { wmState } from "@/utils/enum.js";
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
deptId: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
mgroupId: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
mgroupName: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
processId: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
mgroupcode: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
name: "wmaterial",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
wmState,
|
||||||
|
apiObj: null,
|
||||||
|
params: {
|
||||||
|
mgroup: "",
|
||||||
|
},
|
||||||
|
query: {
|
||||||
|
search: "",
|
||||||
|
},
|
||||||
|
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||||
|
printer_name:localStorage.getItem("printer_name"),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let that = this;
|
||||||
|
that.params.mgroup = that.mgroupId;
|
||||||
|
that.params.material__type=40;
|
||||||
|
that.$TOOL.data.set('gx_deptID',that.deptId)
|
||||||
|
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//搜索
|
||||||
|
handleQuery() {
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
|
//打印物料标签
|
||||||
|
printMaterial(row){
|
||||||
|
let that = this;
|
||||||
|
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
|
||||||
|
let params = {};
|
||||||
|
params.tid = row.id;
|
||||||
|
params.extra_data={count:row.count};
|
||||||
|
params.label_template_name = '工段物料打印模板';
|
||||||
|
that.apiObjPrint.req(params).then((res) => {
|
||||||
|
let obj = {};
|
||||||
|
obj.printer_commands = res.commands;
|
||||||
|
obj.printer_name = that.printer_name;
|
||||||
|
that.$API.wpm.prints.req(obj).then((response) => {
|
||||||
|
that.$message.success("打印成功");
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
that.$message.warning("请先设置打印机");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped></style>
|
||||||
|
|
@ -54,13 +54,27 @@
|
||||||
:processId="processId"
|
:processId="processId"
|
||||||
:mgroupcode="mgroup_code"
|
:mgroupcode="mgroup_code"
|
||||||
></inmOut>
|
></inmOut>
|
||||||
<record v-else
|
<record v-else-if="values == '出入库记录'"
|
||||||
:mgroupId="mgroupId"
|
:mgroupId="mgroupId"
|
||||||
:deptId = "mgroupDept"
|
:deptId = "mgroupDept"
|
||||||
:mgroupName="mgroupName"
|
:mgroupName="mgroupName"
|
||||||
:processId="processId"
|
:processId="processId"
|
||||||
:mgroupcode="mgroup_code"
|
:mgroupcode="mgroup_code"
|
||||||
></record>
|
></record>
|
||||||
|
<check v-else-if="values == '检验记录'"
|
||||||
|
:mgroupId="mgroupId"
|
||||||
|
:deptId = "mgroupDept"
|
||||||
|
:mgroupName="mgroupName"
|
||||||
|
:processId="processId"
|
||||||
|
:mgroupcode="mgroup_code"
|
||||||
|
></check>
|
||||||
|
<helpso v-else-if="values == '辅料'"
|
||||||
|
:mgroupId="mgroupId"
|
||||||
|
:deptId = "mgroupDept"
|
||||||
|
:mgroupName="mgroupName"
|
||||||
|
:processId="processId"
|
||||||
|
:mgroupcode="mgroup_code"
|
||||||
|
></helpso>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -71,14 +85,16 @@ import mlogs from "./mlogs.vue";
|
||||||
import mtask from "./mtask.vue";
|
import mtask from "./mtask.vue";
|
||||||
import handover from "./handover.vue";
|
import handover from "./handover.vue";
|
||||||
import record from "./inmrecord.vue";
|
import record from "./inmrecord.vue";
|
||||||
|
import check from "./checkrecord.vue";
|
||||||
|
import helpso from "./helpso.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "bx",
|
name: "bx",
|
||||||
components: { inm, inmOut,mlogs, mtask, handover,record },
|
components: { inm, inmOut,mlogs, mtask, handover,record,helpso,check },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
mgroups:[],
|
mgroups:[],
|
||||||
tableHieght: 200,
|
tableHieght: 200,
|
||||||
options: ["日志", "交接记录", "来料未完成","出料已完成","出入库记录"],
|
options: ["日志", "交接记录", "来料未完成","出料已完成","出入库记录",'辅料'],
|
||||||
values: "日志",
|
values: "日志",
|
||||||
mgroupName: "",
|
mgroupName: "",
|
||||||
mgroupId: "",
|
mgroupId: "",
|
||||||
|
|
@ -124,6 +140,9 @@ export default {
|
||||||
that.mgroupMtype = res[0].mtype;
|
that.mgroupMtype = res[0].mtype;
|
||||||
that.processtype = res[0].process_type;
|
that.processtype = res[0].process_type;
|
||||||
that.mgroupDept = res[0].belong_dept;
|
that.mgroupDept = res[0].belong_dept;
|
||||||
|
if(that.mgroupName=='黑化'){
|
||||||
|
that.options.push("检验记录")
|
||||||
|
}
|
||||||
that.componentsShow = true;
|
that.componentsShow = true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -63,13 +63,20 @@
|
||||||
:processId="processId"
|
:processId="processId"
|
||||||
:mgroupcode="mgroup_code"
|
:mgroupcode="mgroup_code"
|
||||||
></inmOut>
|
></inmOut>
|
||||||
<record v-else
|
<record v-else-if="values == '出入库记录'"
|
||||||
:mgroupId="mgroupId"
|
:mgroupId="mgroupId"
|
||||||
:deptId = "mgroupDept"
|
:deptId = "mgroupDept"
|
||||||
:mgroupName="mgroupName"
|
:mgroupName="mgroupName"
|
||||||
:processId="processId"
|
:processId="processId"
|
||||||
:mgroupcode="mgroup_code"
|
:mgroupcode="mgroup_code"
|
||||||
></record>
|
></record>
|
||||||
|
<helpso v-else-if="values == '辅料'"
|
||||||
|
:mgroupId="mgroupId"
|
||||||
|
:deptId = "mgroupDept"
|
||||||
|
:mgroupName="mgroupName"
|
||||||
|
:processId="processId"
|
||||||
|
:mgroupcode="mgroup_code"
|
||||||
|
></helpso>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -81,15 +88,16 @@ import mtask from "./mtask.vue";
|
||||||
import handover from "./handover.vue";
|
import handover from "./handover.vue";
|
||||||
import record from "./inmrecord.vue";
|
import record from "./inmrecord.vue";
|
||||||
import mlogsList from "./mlogs.vue";
|
import mlogsList from "./mlogs.vue";
|
||||||
|
import helpso from "./helpso.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "bx",
|
name: "bx",
|
||||||
components: { inm, inmOut,mlogs, mtask, handover,record,mlogsList },
|
components: { inm, inmOut,mlogs, mtask, handover,record,mlogsList,helpso },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
mgroups:[],
|
mgroups:[],
|
||||||
tableHieght: 200,
|
tableHieght: 200,
|
||||||
options: ["日志", "日志记录","交接记录", "来料未完成","出料已完成","出入库记录"],
|
options: ["日志", "日志记录","交接记录", "来料未完成","出料已完成","出入库记录",'辅料'],
|
||||||
values: "日志",
|
values: "日志",
|
||||||
mgroupName: "",
|
mgroupName: "",
|
||||||
mgroupId: "",
|
mgroupId: "",
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.state"
|
v-model="queryState"
|
||||||
placeholder="物料状态"
|
placeholder="物料状态"
|
||||||
clearable
|
clearable
|
||||||
@change="searchStateChange"
|
@change="searchStateChange"
|
||||||
|
|
@ -114,14 +114,14 @@
|
||||||
@click="table_Check(scope.row)"
|
@click="table_Check(scope.row)"
|
||||||
v-auth="'ftestwork.create'"
|
v-auth="'ftestwork.create'"
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="scope.row.defect_name == null"
|
v-if="scope.row.mgroup_name == '黑化'&&scope.row.state == 10"
|
||||||
>检验
|
>检验
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
link size="small"
|
link size="small"
|
||||||
type="warning"
|
type="warning"
|
||||||
@click="tableCheckList(scope.row)"
|
@click="tableCheckList(scope.row)"
|
||||||
v-if="scope.row.defect_name == null"
|
v-if="scope.row.mgroup_name == '黑化'&&scope.row.state == 10"
|
||||||
>检验记录
|
>检验记录
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
||||||
|
|
@ -259,7 +259,8 @@ export default {
|
||||||
tableData: [],
|
tableData: [],
|
||||||
selection: [],
|
selection: [],
|
||||||
stateOptions:[
|
stateOptions:[
|
||||||
{ value: 10, name: "合格"},
|
{ value: 100, name: "完全合格"},
|
||||||
|
{ value: 101, name: "合格B类"},
|
||||||
{ value: 20, name: "不合格"},
|
{ value: 20, name: "不合格"},
|
||||||
{ value: 30, name: "返工"},
|
{ value: 30, name: "返工"},
|
||||||
],
|
],
|
||||||
|
|
@ -267,6 +268,7 @@ export default {
|
||||||
search: "",
|
search: "",
|
||||||
material: "",
|
material: "",
|
||||||
},
|
},
|
||||||
|
queryState:null,
|
||||||
cate_type:'',
|
cate_type:'',
|
||||||
materialType: "wm",
|
materialType: "wm",
|
||||||
changebatch:false,
|
changebatch:false,
|
||||||
|
|
@ -301,6 +303,27 @@ export default {
|
||||||
this.$refs.table_wm.queryData(this.queryWm);
|
this.$refs.table_wm.queryData(this.queryWm);
|
||||||
this.materialsVisible = false;
|
this.materialsVisible = false;
|
||||||
},
|
},
|
||||||
|
searchStateChange(){
|
||||||
|
let that = this;
|
||||||
|
switch(that.queryState){
|
||||||
|
case 100:
|
||||||
|
that.query.state = 10;
|
||||||
|
that.query.notok_sign__isnull = true;
|
||||||
|
break;
|
||||||
|
case 101:
|
||||||
|
that.query.state = 10;
|
||||||
|
that.query.notok_sign__isnull = false;
|
||||||
|
break;
|
||||||
|
case 20:
|
||||||
|
that.query.state = 20;
|
||||||
|
that.query.notok_sign__isnull = null;
|
||||||
|
break;
|
||||||
|
case 30:
|
||||||
|
that.query.state = 30;
|
||||||
|
that.query.notok_sign__isnull = null;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
tomio(type) {
|
tomio(type) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.cate_type=type;
|
that.cate_type=type;
|
||||||
|
|
|
||||||
|
|
@ -135,8 +135,9 @@
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="table_add"
|
@click="table_add"
|
||||||
></el-button>
|
></el-button>
|
||||||
<scScanner @scanResult="codeTextChange"></scScanner>
|
<scScanner v-if="cate=='do_in'|| cate=='do_out'" @scanResult="codeTextChange"></scScanner>
|
||||||
<el-input
|
<el-input
|
||||||
|
v-if="cate=='do_in'|| cate=='do_out'"
|
||||||
ref="codeInput"
|
ref="codeInput"
|
||||||
v-model="codeText"
|
v-model="codeText"
|
||||||
clearable
|
clearable
|
||||||
|
|
@ -260,7 +261,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="不合格数量" prop="count_notok">
|
<el-table-column label="备注" prop="note">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
|
|
@ -268,7 +269,7 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="90">
|
<el-table-column width="90" v-if="cate=='do_in'|| cate=='do_out'">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -337,7 +338,12 @@ export default {
|
||||||
mio_user: "",
|
mio_user: "",
|
||||||
},
|
},
|
||||||
stateDict: {10: "创建中",20: "已提交",},
|
stateDict: {10: "创建中",20: "已提交",},
|
||||||
typeDict:{'do_in':'生产入库','do_out':'生产领料'},
|
typeDict:{
|
||||||
|
'do_in':'生产入库',
|
||||||
|
'do_out':'生产领料',
|
||||||
|
'borrow_out': "领用出库",
|
||||||
|
'return_in': "退还入库"
|
||||||
|
},
|
||||||
apiworkerObj: null,
|
apiworkerObj: null,
|
||||||
materials: [],
|
materials: [],
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
|
|
@ -379,6 +385,12 @@ export default {
|
||||||
open(mode) {
|
open(mode) {
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
this.active = 0;
|
||||||
|
this.mioId =null;//
|
||||||
|
this.form.number= "";
|
||||||
|
this.form.do_user= "";
|
||||||
|
this.form.mio_user= "";
|
||||||
|
console.log('this.active',this.active)
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
setData(data,type) {
|
setData(data,type) {
|
||||||
|
|
@ -413,6 +425,7 @@ export default {
|
||||||
//车间人员
|
//车间人员
|
||||||
getDeptUsers() {
|
getDeptUsers() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.userList = [];
|
||||||
let userInfo = that.$TOOL.data.get("USER_INFO");
|
let userInfo = that.$TOOL.data.get("USER_INFO");
|
||||||
that.$API.system.user.list.req({ depts: that.deptId, page: 0 }).then((res) => {
|
that.$API.system.user.list.req({ depts: that.deptId, page: 0 }).then((res) => {
|
||||||
that.userOptions = res;
|
that.userOptions = res;
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
label-width="120px"
|
label-width="120px"
|
||||||
>
|
>
|
||||||
|
<template v-if="cate == 'do_in'||cate == 'do_out'">
|
||||||
<el-form-item label="物料" v-if="cate == 'do_out'">
|
<el-form-item label="物料" v-if="cate == 'do_out'">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.material"
|
v-model="form.material"
|
||||||
|
|
@ -183,11 +184,101 @@
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template v-if="cate=='borrow_out'">
|
||||||
|
<el-form-item label="物料" prop="material">
|
||||||
|
<xtSelect
|
||||||
|
:apiObj="apiObj"
|
||||||
|
v-model="form.material"
|
||||||
|
v-model:obj="selectObj"
|
||||||
|
:labelField="'full_name'"
|
||||||
|
style="width:100%"
|
||||||
|
:params="query"
|
||||||
|
@change="selectMaterialChange2"
|
||||||
|
>
|
||||||
|
<el-table-column label="物料" prop="full_name"></el-table-column>
|
||||||
|
</xtSelect>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="仓库已有批次">
|
||||||
|
<el-select
|
||||||
|
v-model="selectBatch"
|
||||||
|
value-key="id"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
@change="selectBatchChange2"
|
||||||
|
@clear="selectBatchClear"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in batchOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.batch"
|
||||||
|
:value="item"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ item.batch }}</span>
|
||||||
|
<span
|
||||||
|
style="
|
||||||
|
float: right;
|
||||||
|
color: var(--el-text-color-secondary);
|
||||||
|
font-size: 13px;
|
||||||
|
"
|
||||||
|
>{{ item.count }} -- {{ item.warehouse_name }}</span
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数量">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count"
|
||||||
|
:min="1"
|
||||||
|
:max="batchcount"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template v-if="cate=='return_in'">
|
||||||
|
<el-form-item label="批次号" >
|
||||||
|
<el-select
|
||||||
|
v-model="form.batch"
|
||||||
|
filterable
|
||||||
|
allow-create
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
@clear="selectBatchClear"
|
||||||
|
@change="selectChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in wbatchOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.batch"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{item.material_name}} {{ item.batch }}</span>
|
||||||
|
<span
|
||||||
|
style="
|
||||||
|
float: right;
|
||||||
|
color: var(--el-text-color-secondary);
|
||||||
|
font-size: 13px;
|
||||||
|
"
|
||||||
|
>{{ item.count }}</span
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数量">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count"
|
||||||
|
:min="0"
|
||||||
|
:max="batchcount"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<el-input v-model="form.note"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button type="primary" :loading="isSaveing" @click="submit">
|
<el-button v-if="cate == 'do_in'||cate == 'do_out'" type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||||
保存
|
<el-button v-else type="primary" :loading="isSaveing" @click="submit2">保存</el-button>
|
||||||
</el-button>
|
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button @click="visible = false">取消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
@ -213,6 +304,8 @@ export default {
|
||||||
titleMap: {
|
titleMap: {
|
||||||
do_out: "生产领料",
|
do_out: "生产领料",
|
||||||
do_in: "生产入库",
|
do_in: "生产入库",
|
||||||
|
borrow_out: "领用出库",
|
||||||
|
return_in: "退还入库",
|
||||||
},
|
},
|
||||||
form: {},
|
form: {},
|
||||||
rules: {
|
rules: {
|
||||||
|
|
@ -232,6 +325,9 @@ export default {
|
||||||
selectMaterial: null,
|
selectMaterial: null,
|
||||||
selectBatch: null,
|
selectBatch: null,
|
||||||
wbatchOptions: [],//工段物料批次
|
wbatchOptions: [],//工段物料批次
|
||||||
|
selectObj: {},
|
||||||
|
query: {},
|
||||||
|
apiObj:this.$API.mtm.material.list,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -241,7 +337,7 @@ export default {
|
||||||
this.inputBatchDisable = true;
|
this.inputBatchDisable = true;
|
||||||
this.getMaterialOptions();
|
this.getMaterialOptions();
|
||||||
this.getBatchOptions();
|
this.getBatchOptions();
|
||||||
}else{//入库----工段
|
}else if(this.cate == 'do_in'||this.cate == 'return_in'){//入库----工段
|
||||||
this.getMgroupWmaterial();
|
this.getMgroupWmaterial();
|
||||||
}
|
}
|
||||||
this.getWarehouseOptions();
|
this.getWarehouseOptions();
|
||||||
|
|
@ -249,8 +345,17 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
//获取仓库
|
//获取仓库
|
||||||
getWarehouseOptions() {
|
getWarehouseOptions() {
|
||||||
|
let that = this;
|
||||||
this.$API.inm.warehouse.list.req({ page: 0 }).then((res) => {
|
this.$API.inm.warehouse.list.req({ page: 0 }).then((res) => {
|
||||||
this.warehouseOptions = res;
|
this.warehouseOptions = res;
|
||||||
|
if(that.cate=='return_in'||that.cate=='borrow_out'){
|
||||||
|
res.forEach(item => {
|
||||||
|
if (item.name =="辅料库") {
|
||||||
|
that.form.warehouse = item.id;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取物料列表
|
//获取物料列表
|
||||||
|
|
@ -275,10 +380,14 @@ export default {
|
||||||
getMgroupWmaterial() {
|
getMgroupWmaterial() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj = {};
|
let obj = {};
|
||||||
|
if(that.cate== 'do_in'){
|
||||||
obj.state = 10;
|
obj.state = 10;
|
||||||
|
obj.material__process= that.process;
|
||||||
|
}else if(that.cate== 'return_in'){
|
||||||
|
obj.material__type = 40;
|
||||||
|
}
|
||||||
obj.page= 0;
|
obj.page= 0;
|
||||||
obj.mgroupx= that.mgroupId;
|
obj.mgroupx= that.mgroupId;
|
||||||
obj.material__process= that.process;
|
|
||||||
if (that.mgroupId != null &&that.mgroupId != undefined &&that.mgroupId != "") {
|
if (that.mgroupId != null &&that.mgroupId != undefined &&that.mgroupId != "") {
|
||||||
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
||||||
that.wbatchOptions = res;
|
that.wbatchOptions = res;
|
||||||
|
|
@ -358,6 +467,14 @@ export default {
|
||||||
selectMaterialChange() {
|
selectMaterialChange() {
|
||||||
this.getBatchOptions();
|
this.getBatchOptions();
|
||||||
},
|
},
|
||||||
|
selectMaterialChange2(){
|
||||||
|
var that = this;
|
||||||
|
console.log('that.selectObj',that.selectObj.id);
|
||||||
|
that.form.material = that.selectObj.id;
|
||||||
|
if(that.selectObj.id!==undefined){
|
||||||
|
this.getBatchOptions();
|
||||||
|
}
|
||||||
|
},
|
||||||
getItem(options, id) {
|
getItem(options, id) {
|
||||||
for (var i = 0; i < options.length; i++) {
|
for (var i = 0; i < options.length; i++) {
|
||||||
if (options[i].id == id) {
|
if (options[i].id == id) {
|
||||||
|
|
@ -367,10 +484,8 @@ export default {
|
||||||
},
|
},
|
||||||
selectBatchChange() {
|
selectBatchChange() {
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log('selectBatch',that.selectBatch);
|
|
||||||
that.selectList = [];
|
that.selectList = [];
|
||||||
that.batchOptions.forEach((item) => {
|
that.batchOptions.forEach((item) => {
|
||||||
console.log('indexOfselectBatch',that.selectBatch.indexOf(item.id));
|
|
||||||
if(that.mode == "add"){//领料
|
if(that.mode == "add"){//领料
|
||||||
if(that.selectBatch.indexOf(item.id)>-1){
|
if(that.selectBatch.indexOf(item.id)>-1){
|
||||||
let obj = {};
|
let obj = {};
|
||||||
|
|
@ -391,6 +506,33 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//选择借用的物料批次后调用的方法
|
||||||
|
selectBatchChange2(item) {
|
||||||
|
let that = this;
|
||||||
|
if(item){
|
||||||
|
that.$API.wpm.wpr.list.req({ page: 0, mb: item.id }).then((res) => {
|
||||||
|
that.wprList = res;
|
||||||
|
})
|
||||||
|
that.form.batch = item.batch;
|
||||||
|
that.form.mb = item.id;
|
||||||
|
that.batchcount = Number(item.count);
|
||||||
|
that.form.count = Number(item.count);
|
||||||
|
that.form.warehouse = item.warehouse;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//归还时选择车间辅料后的处理
|
||||||
|
selectChange(){
|
||||||
|
let that = this;
|
||||||
|
that.wbatchOptions.forEach((item) => {
|
||||||
|
if(that.form.batch == item.batch){
|
||||||
|
that.form.wm = item.id;
|
||||||
|
that.form.batch = item.batch;
|
||||||
|
that.form.count = Number(item.count);
|
||||||
|
that.batchcount = Number(item.count);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
//选择车间库存物料后的处理
|
//选择车间库存物料后的处理
|
||||||
selectwmChange(id){
|
selectwmChange(id){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -416,6 +558,7 @@ export default {
|
||||||
},
|
},
|
||||||
selectBatchClear() {
|
selectBatchClear() {
|
||||||
this.form.batch = "";
|
this.form.batch = "";
|
||||||
|
this.form.count =0;
|
||||||
this.form.warehouse = "";
|
this.form.warehouse = "";
|
||||||
},
|
},
|
||||||
//显示
|
//显示
|
||||||
|
|
@ -464,6 +607,32 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
submit2() {
|
||||||
|
let that = this;
|
||||||
|
that.$refs.dialogForm.validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
that.isSaveing = true;
|
||||||
|
that.form.mio = that.mioId;
|
||||||
|
try {
|
||||||
|
let res;
|
||||||
|
if (that.mode == "add") {
|
||||||
|
res = await that.$API.inm.mioitem.create.req(that.form);
|
||||||
|
} else if (that.mode == "edit") {
|
||||||
|
res = await that.$API.inm.mioitem.update.req(that.form.id,that.form);
|
||||||
|
}
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.$emit("success");
|
||||||
|
that.visible = false;
|
||||||
|
that.$message.success("操作成功");
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
//可以处理校验错误
|
||||||
|
that.isSaveing = false;
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
//表单注入数据
|
//表单注入数据
|
||||||
setData(data) {
|
setData(data) {
|
||||||
Object.assign(this.form, data);
|
Object.assign(this.form, data);
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,18 @@
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button type="primary" @click="tomio('do_out')" v-auth="'mio.do'"
|
<el-button type="primary" @click="tomio('do_out')" v-auth="'mio.do'"
|
||||||
v-if="mgroupName!=='size'&&mgroupName!=='facade'"
|
v-if="mgroupName!=='size'&&mgroupName!=='facade'"
|
||||||
>领料</el-button
|
>领料</el-button>
|
||||||
>
|
<el-button type="primary" @click="tomio('do_in')" v-auth="'mio.do'">入库</el-button>
|
||||||
<el-button type="primary" @click="tomio('do_in')" v-auth="'mio.do'"
|
|
||||||
>入库</el-button
|
|
||||||
>
|
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="add('do_out')"
|
@click="tomio('borrow_out')"
|
||||||
v-auth="'mio.do'"
|
v-auth="'mio.do'"
|
||||||
>生产领料</el-button
|
>领用出库</el-button> -->
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="add('do_in')"
|
@click="tomio('return_in')"
|
||||||
v-auth="'mio.do'"
|
v-auth="'mio.do'"
|
||||||
>生产入库</el-button
|
>退还入库</el-button>
|
||||||
> -->
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.type"
|
v-model="query.type"
|
||||||
clearable
|
clearable
|
||||||
|
|
@ -208,10 +203,14 @@ export default {
|
||||||
typeDict: {
|
typeDict: {
|
||||||
do_out: "生产领料",
|
do_out: "生产领料",
|
||||||
do_in: "生产入库",
|
do_in: "生产入库",
|
||||||
|
borrow_out: "领用出库",
|
||||||
|
return_in: "退还入库",
|
||||||
},
|
},
|
||||||
cateOptions: [
|
cateOptions: [
|
||||||
{ id: "do_out", name: "生产领料" },
|
{ id: "do_out", name: "生产领料" },
|
||||||
{ id: "do_in", name: "生产入库" },
|
{ id: "do_in", name: "生产入库" },
|
||||||
|
{ id: "borrow_out", name: "领用出库" },
|
||||||
|
{ id: "return_in", name: "退还入库" },
|
||||||
],
|
],
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
|
|
@ -219,7 +218,7 @@ export default {
|
||||||
},
|
},
|
||||||
query: {},
|
query: {},
|
||||||
params: {
|
params: {
|
||||||
type__in: "do_out,do_in",
|
type__in: "do_out,do_in,borrow_out,return_in",
|
||||||
mgroup:""
|
mgroup:""
|
||||||
},
|
},
|
||||||
form: {},
|
form: {},
|
||||||
|
|
|
||||||
|
|
@ -48,17 +48,14 @@
|
||||||
<el-descriptions-item label="结束时间">{{
|
<el-descriptions-item label="结束时间">{{
|
||||||
mlogItem.work_end_time
|
mlogItem.work_end_time
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="工单状态" v-if="mlogItem.mgroup_name=='退火'">
|
<el-descriptions-item label="检验表单" v-if="mlogItem.mgroup_name=='黑化'">
|
||||||
<el-tag v-if="mlogItem.ticket_">{{act_states[mlogItem.ticket_.act_state]}}</el-tag>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="检验表单" v-if="mlogItem.mgroup_name=='退火'||mlogItem.mgroup_name=='黑化'">
|
|
||||||
<el-link :href="mlogItem.test_file" target="_blank" type="primary" :underline="false">{{mlogItem.test_file}}</el-link>
|
<el-link :href="mlogItem.test_file" target="_blank" type="primary" :underline="false">{{mlogItem.test_file}}</el-link>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<div style="padding: 5px 10px;display: flex;justify-content: end;">
|
<div style="padding: 5px 10px;display: flex;justify-content: end;">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="mlogItem.submit_time == null&&(mlogItem.ticket==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1))"
|
v-if="mlogItem.submit_time == null"
|
||||||
@click="mlogUpdate"
|
@click="mlogUpdate"
|
||||||
style="margin-right: 10px;"
|
style="margin-right: 10px;"
|
||||||
v-auth="'mlog.update'"
|
v-auth="'mlog.update'"
|
||||||
|
|
@ -67,18 +64,11 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="mlogItem.mgroup_name!='退火'&&mlogItem.submit_time == null"
|
v-if="mlogItem.submit_time == null"
|
||||||
:loading="isSaveing"
|
:loading="isSaveing"
|
||||||
@click="mlogSubmit"
|
@click="mlogSubmit"
|
||||||
>提交</el-button
|
>提交</el-button
|
||||||
>
|
>
|
||||||
<!-- 退火-->
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
v-if="mlogItem.mgroup_name=='退火'&&(mlogItem.ticket==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1))"
|
|
||||||
:loading="isSaveing"
|
|
||||||
@click="createTicket"
|
|
||||||
>放行审批</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- 输入物料 -->
|
<!-- 输入物料 -->
|
||||||
|
|
@ -142,13 +132,13 @@
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="table_in_edit(scope.row)"
|
@click="table_in_edit(scope.row)"
|
||||||
:disabled="mlogItem.submit_time !== null||mlogItem.ticket!==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1)"
|
:disabled="mlogItem.submit_time !== null||(mlogItem.ticket!==null&&mlogItem.ticket_&&mlogItem.ticket_.state_.type!==1)"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
:disabled="mlogItem.submit_time !== null||mlogItem.ticket!==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1)"
|
:disabled="mlogItem.submit_time !== null||(mlogItem.ticket!==null&&mlogItem.ticket_&&mlogItem.ticket_.state_.type!==1)"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="table_in_del(scope.row)"
|
@click="table_in_del(scope.row)"
|
||||||
>
|
>
|
||||||
|
|
@ -302,7 +292,7 @@
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
:disabled="mlogItem.submit_time !== null||mlogItem.ticket!==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1)"
|
:disabled="mlogItem.submit_time !== null||(mlogItem.ticket!==null&&mlogItem.ticket_&&mlogItem.ticket_.state_.type!==1)"
|
||||||
@click="table_out_check(scope.row)"
|
@click="table_out_check(scope.row)"
|
||||||
>
|
>
|
||||||
检验
|
检验
|
||||||
|
|
@ -311,30 +301,6 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- 工段物料库存 -->
|
|
||||||
<!-- <el-card style="width: 100%" header="工段物料列表" shadow="never">
|
|
||||||
<scTable
|
|
||||||
ref="tableWm"
|
|
||||||
:apiObj="apiObjWm"
|
|
||||||
:params="paramsWm"
|
|
||||||
stripe
|
|
||||||
hidePagination
|
|
||||||
>
|
|
||||||
<el-table-column label="物料名称" prop="material_name" show-overflow-tooltip>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="批次号" prop="batch">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="数量" prop="count">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="不合格标记" prop="notok_sign_name">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column width="100">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
|
||||||
</el-card> -->
|
|
||||||
<save-dialog
|
<save-dialog
|
||||||
v-if="dialog.save"
|
v-if="dialog.save"
|
||||||
ref="saveDialog"
|
ref="saveDialog"
|
||||||
|
|
@ -374,90 +340,6 @@
|
||||||
@closed="dialog.edit = false"
|
@closed="dialog.edit = false"
|
||||||
>
|
>
|
||||||
</edit-dialog>
|
</edit-dialog>
|
||||||
<!-- 退火放行通知单 -->
|
|
||||||
<el-dialog v-model="ticketDialog" title="退火放行通知单">
|
|
||||||
<el-form
|
|
||||||
:model="saveInForm"
|
|
||||||
:rules="rules"
|
|
||||||
label-width="100px"
|
|
||||||
ref="saveInForm"
|
|
||||||
>
|
|
||||||
<el-row>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="退火炉号">
|
|
||||||
<el-input v-model="oinfo_json.退火炉号"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="退火时间">
|
|
||||||
<el-input-number
|
|
||||||
v-model="oinfo_json.退火时间"
|
|
||||||
:min="1"
|
|
||||||
controls-position="right"
|
|
||||||
/>min
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="退火温度">
|
|
||||||
<el-input-number
|
|
||||||
v-model="oinfo_json.退火温度"
|
|
||||||
:min="1"
|
|
||||||
style="width: 100%"
|
|
||||||
controls-position="right"
|
|
||||||
/>
|
|
||||||
<span style="position: absolute;right: -17px;">°C</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="抽检结果">
|
|
||||||
<el-input v-model="oinfo_json.抽检结果"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="抽检数">
|
|
||||||
<el-input-number
|
|
||||||
v-model="oinfo_json.抽检数"
|
|
||||||
:precision="0"
|
|
||||||
:min="1"
|
|
||||||
style="width: 100%"
|
|
||||||
controls-position="right"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="强度落球">
|
|
||||||
<el-input v-model="oinfo_json.强度落球"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-form-item label="放行标准">:退火后直径23.5±0.2;黑圈内径:5.9±0.1;外径7.6-7.77</el-form-item>
|
|
||||||
</el-row>
|
|
||||||
<el-form-item label="检验附件">
|
|
||||||
<sc-upload-file
|
|
||||||
v-model="fileList"
|
|
||||||
:multiple="false"
|
|
||||||
:limit="1"
|
|
||||||
:accept="['.xlsx', '.xls']"
|
|
||||||
@success = "fileUPSuccess"
|
|
||||||
>
|
|
||||||
<el-button type="primary" icon="el-icon-upload"> </el-button>
|
|
||||||
</sc-upload-file>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<el-button
|
|
||||||
v-for="item in initForm.transitions"
|
|
||||||
:key="item.id"
|
|
||||||
type="primary"
|
|
||||||
:loading="isSaveing"
|
|
||||||
:disabled="isSaveing"
|
|
||||||
@click="submitTicketCreate(item.id)"
|
|
||||||
style="margin-right: 4px"
|
|
||||||
>{{ item.name }}</el-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
<el-dialog v-model="printVisible" width="1200px">
|
<el-dialog v-model="printVisible" width="1200px">
|
||||||
<print :baseData="mlogItem" :tableData="tableData" :tableData2="tableData2" type="102" @closePrint="printVisible=false"/>
|
<print :baseData="mlogItem" :tableData="tableData" :tableData2="tableData2" type="102" @closePrint="printVisible=false"/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
@ -535,14 +417,6 @@ export default {
|
||||||
count_use: 0,
|
count_use: 0,
|
||||||
count_pn_jgqbl: 0,
|
count_pn_jgqbl: 0,
|
||||||
},
|
},
|
||||||
oinfo_json:{
|
|
||||||
退火炉号:'',
|
|
||||||
退火时间:'',
|
|
||||||
退火温度:'',
|
|
||||||
抽检结果:'',
|
|
||||||
抽检数:'',
|
|
||||||
强度落球:'',
|
|
||||||
},
|
|
||||||
act_states: {
|
act_states: {
|
||||||
0: "草稿中",
|
0: "草稿中",
|
||||||
1: "进行中",
|
1: "进行中",
|
||||||
|
|
@ -568,7 +442,7 @@ export default {
|
||||||
mlogbdefect:[],
|
mlogbdefect:[],
|
||||||
mlogboutdefect:[],
|
mlogboutdefect:[],
|
||||||
saveInDialog: false,
|
saveInDialog: false,
|
||||||
ticketDialog:false,
|
// ticketDialog:false,
|
||||||
printVisible:false,
|
printVisible:false,
|
||||||
setFiltersVisible: false,
|
setFiltersVisible: false,
|
||||||
rules: {
|
rules: {
|
||||||
|
|
@ -593,7 +467,7 @@ export default {
|
||||||
this.paramsIn.mlog = this.mlogId;
|
this.paramsIn.mlog = this.mlogId;
|
||||||
this.paramsOut.mlog = this.mlogId;
|
this.paramsOut.mlog = this.mlogId;
|
||||||
this.apiObj = this.$API.wpm.mlogb.list;
|
this.apiObj = this.$API.wpm.mlogb.list;
|
||||||
this.getInit();
|
// this.getInit();
|
||||||
that.$API.wpm.mlogb.list.req(that.paramsIn).then((res) => {
|
that.$API.wpm.mlogb.list.req(that.paramsIn).then((res) => {
|
||||||
that.tableData = res;
|
that.tableData = res;
|
||||||
})
|
})
|
||||||
|
|
@ -632,7 +506,6 @@ export default {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
getdefects(){
|
getdefects(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.qm.qct.list.req({qctmat__material:that.mlogItem.material_in,page:0,tags:'process'}).then((res) => {
|
that.$API.qm.qct.list.req({qctmat__material:that.mlogItem.material_in,page:0,tags:'process'}).then((res) => {
|
||||||
|
|
@ -651,7 +524,6 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
countChange() {
|
countChange() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -661,7 +533,6 @@ export default {
|
||||||
that.saveInForm.count_pn_jgqbl += that.defectinform[item.defect_name];
|
that.saveInForm.count_pn_jgqbl += that.defectinform[item.defect_name];
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// that.countCellChanges();
|
|
||||||
},
|
},
|
||||||
//表单注入数据
|
//表单注入数据
|
||||||
setData(data) {
|
setData(data) {
|
||||||
|
|
@ -675,9 +546,6 @@ export default {
|
||||||
this.$refs.editDialog.open("edit").setData(this.mlogItem);
|
this.$refs.editDialog.open("edit").setData(this.mlogItem);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// mlogUpdate(data) {
|
|
||||||
// this.$refs.editDialog.open().setData(data);
|
|
||||||
// },
|
|
||||||
table_add() {
|
table_add() {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
@ -698,7 +566,6 @@ export default {
|
||||||
that.saveInDialog = true;
|
that.saveInDialog = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//提交自检
|
//提交自检
|
||||||
saveInSubmit() {
|
saveInSubmit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -752,7 +619,6 @@ export default {
|
||||||
that.$refs.checkDialog.open(obj);
|
that.$refs.checkDialog.open(obj);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
mlogSubmit() {
|
mlogSubmit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -762,50 +628,35 @@ export default {
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//渲染工单提交按钮
|
// //渲染工单提交按钮
|
||||||
getInit() {
|
// getInit() {
|
||||||
let that = this;
|
// let that = this;
|
||||||
that.$API.wf.workflow.initkey.req(" backfire").then((res) => {
|
// that.$API.wf.workflow.initkey.req(" backfire").then((res) => {
|
||||||
that.initForm = res;
|
// that.initForm = res;
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
//填写退火放行单信息
|
// //提交退火放行单信息,创建工单
|
||||||
createTicket(){
|
// submitTicketCreate(id) {
|
||||||
if(this.mlogItem.work_end_time==null){
|
// let that = this;
|
||||||
this.$message.error("请先编辑日志并选择结束时间");
|
// let obj = {};
|
||||||
}else{
|
// obj.test_file = that.test_file;
|
||||||
let sum = 0;
|
// that.$API.wpm.mlog.change.req(that.mlogItem.id, obj).then((res) => {
|
||||||
this.mlogItem.reminder_interval_list.forEach(item => {
|
// let ticket = {};
|
||||||
sum+=item;
|
// that.isSaveing = true;
|
||||||
});
|
// ticket.title = '退火放行审批单';
|
||||||
this.oinfo_json.退火时间 = sum;
|
// ticket.workflow = that.initForm.workflow;
|
||||||
this.oinfo_json.退火炉号 =this.mlogItem.equipment_name!==null?this.mlogItem.equipment_name.split("|")[0]:'';
|
// ticket.ticket_data = {t_id: that.mlogItem.id};
|
||||||
this.ticketDialog = true;
|
// ticket.transition = id;
|
||||||
}
|
// that.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||||
},
|
// that.isSaveing = false;
|
||||||
//提交退火放行单信息,创建工单
|
// that.ticketDialog = false;
|
||||||
submitTicketCreate(id) {
|
// that.visible = false;
|
||||||
let that = this;
|
// that.$message.success("提交成功");
|
||||||
let obj = {};
|
// }).catch((e) => {
|
||||||
obj.oinfo_json = that.oinfo_json;
|
// that.isSaveing = false;
|
||||||
obj.test_file = that.test_file;
|
// });
|
||||||
that.$API.wpm.mlog.change.req(that.mlogItem.id, obj).then((res) => {
|
// });
|
||||||
let ticket = {};
|
// },
|
||||||
that.isSaveing = true;
|
|
||||||
ticket.title = '退火放行审批单';
|
|
||||||
ticket.workflow = that.initForm.workflow;
|
|
||||||
ticket.ticket_data = {t_id: that.mlogItem.id};
|
|
||||||
ticket.transition = id;
|
|
||||||
that.$API.wf.ticket.create.req(ticket).then((res) => {
|
|
||||||
that.isSaveing = false;
|
|
||||||
that.ticketDialog = false;
|
|
||||||
that.visible = false;
|
|
||||||
that.$message.success("提交成功");
|
|
||||||
}).catch((e) => {
|
|
||||||
that.isSaveing = false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
codeTextChange(codeText){
|
codeTextChange(codeText){
|
||||||
this.codeText = codeText;
|
this.codeText = codeText;
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
|
|
|
||||||
|
|
@ -113,9 +113,7 @@
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="审批单号">
|
<el-table-column label="审批单号">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-icon v-if="scope.row.ticket !== null" color="green">
|
<span v-if="scope.row.ticket_!==null">{{ scope.row.ticket_.sn }}</span>
|
||||||
{{ scope.row.ticket_.sn }}
|
|
||||||
</el-icon>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -145,19 +143,19 @@
|
||||||
size="small"
|
size="small"
|
||||||
v-auth="'mlog.delete'"
|
v-auth="'mlog.delete'"
|
||||||
type="danger"
|
type="danger"
|
||||||
v-if="scope.row.submit_time == null"
|
v-if="scope.row.submit_time == null&&(scope.row.ticket== null||(scope.row.ticket_&&scope.row.ticket_.state_.type==1))"
|
||||||
@click.stop="table_del(scope.row, scope.$index)"
|
@click.stop="table_del(scope.row, scope.$index)"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
v-else
|
v-if="scope.row.ticket== null&&scope.row.submit_time !== null"
|
||||||
size="small"
|
size="small"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click.stop="mlogRevert(scope.row)"
|
@click.stop="mlogRevert(scope.row)"
|
||||||
>撤回</el-button>
|
>撤回</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
v-if="scope.row.ticket_!== null&&userId==scope.row.ticket_.create_by&&scope.row.ticket_.state_!==null&&scope.row.ticket_.state_.enable_retreat"
|
v-if="scope.row.ticket_!== null&&scope.row.ticket_.state_!==null&&scope.row.ticket_.state_.enable_retreat"
|
||||||
size="small"
|
size="small"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click.stop="mlogWf(scope.row)"
|
@click.stop="mlogWf(scope.row)"
|
||||||
|
|
@ -336,6 +334,12 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
mlogWf(row){
|
mlogWf(row){
|
||||||
|
let that = this;
|
||||||
|
if(that.userId!==row.ticket_.create_by){
|
||||||
|
this.$confirm(`需要日志提交人撤回该日志`, "提示", {
|
||||||
|
type: "warning",
|
||||||
|
}).then(() => {})
|
||||||
|
}else{
|
||||||
this.$confirm(`确定撤回该日志审批吗?`, "提示", {
|
this.$confirm(`确定撤回该日志审批吗?`, "提示", {
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
|
@ -343,6 +347,8 @@ export default {
|
||||||
that.$refs.table.refresh();
|
that.$refs.table.refresh();
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
customMethod(row,index){
|
customMethod(row,index){
|
||||||
let color = '',context = '';
|
let color = '',context = '';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue