This commit is contained in:
caoqianming 2025-08-05 15:28:00 +08:00
commit ceea2e2674
68 changed files with 5298 additions and 1304 deletions

View File

@ -175,24 +175,31 @@ export default {
// .el-table thead.is-group th.el-table__cell.colorheader4{
// 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{
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{
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{
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{
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{
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{
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{
background-color: rgba(51, 15, 253, 0.317)!important;
}

View File

@ -592,11 +592,23 @@ export default {
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: {
name: "动态产品",
req: async function (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);
}
},
},
};

View File

@ -60,7 +60,7 @@ export default {
if(that.g!==null){
that.updateGraph();
}else{
that.g = new dagreD3.graphlib.Graph().setGraph({
that.g = new dagreD3.graphlib.Graph({multigraph: true}).setGraph({
rankdir: that.rankdir,
nodesep: 40,
edgesep: 25, //线
@ -89,8 +89,9 @@ export default {
that.edges.forEach((transition0) => {
that.g.setEdge(transition0.source,transition0.target,{
label: transition0.label,//
id: transition0.id,
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px", // 线
});
},transition0.id);
});
//
let render = new dagreD3.render();

View File

@ -9,7 +9,8 @@
<template>
<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">
<template #header>
<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 },
hideDelete: { type: Boolean, default: false },
hideIndex: { type: Boolean, default: false },
canMultiple: { type: Boolean, default: false },
pushType: { type: String, default: 'push' }
},
data(){
return {
data: []
data: [],
defaultValue:[],
}
},
mounted(){
@ -118,7 +121,32 @@
//index
deleteRow(index){
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>

View File

@ -56,6 +56,7 @@
v-if="multiple"
type="selection"
width="40"
:selectable="selectable"
:reserve-selection="true"
></el-table-column>
<slot v-if="!isFixOptions"></slot>
@ -89,7 +90,7 @@ const props = defineProps({
});
const emit = defineEmits(["update:modelValue", "update:obj", "update:label", "change"]);
const selectable = (row) => row.count_canhandover?row.count_canhandover>0:true;
// popover
const showPopover = ref(false);
const inputRef = ref();

View File

@ -213,4 +213,13 @@ export const certStateEnum = new EnumFactory({
10: { text: '正常', type: 'success' },
20: { text: '临期', type: 'warning' },
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' },
})

View File

@ -18,6 +18,11 @@
<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="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">
<template #default="scope">
<el-button type="primary" plain size="small" @click="handleShow(scope.row)"

View File

@ -39,6 +39,11 @@
<el-input v-model="form.echart_options" clearable type="textarea" :rows="8"></el-input>
</el-form-item>
</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-form>
</el-main>
@ -64,7 +69,7 @@ export default {
edit: "编辑",
show: "查看",
},
form: {},
form: {enabled:true},
rules: {
name: [{ required: true, message: "请输入" }],
},

View File

@ -318,11 +318,16 @@ export default {
yAxisIndex: 0,
barCategoryGap: 50,
barWidth: 10,
label: {
show: true,
position: "right",
color: "#fff",
},
itemStyle: {
normal: {
barBorderRadius: 5,
color: function (params) {
return myColor[params.dataIndex];
return myColor[params.dataIndex%5];
}
},
label: {
@ -391,10 +396,15 @@ export default {
{name:'一次复丝',value:0},
{name:'捆二次棒',value:0},
{name:'二次复丝',value:0},
]
],
showValue: true
} ,
config_left2:{
data:[]
data:[],
digitalFlopStyle: {
fontSize: 16,
fill: '#fff'
}
},
config_middle_top:{
rowNum:10,
@ -425,6 +435,7 @@ export default {
today: "",
end_time:'',
start_time:'',
deptName:"拉丝排板班组",
mgroups:['洗棒','捆棒','拉单丝','捆一次棒','一次复丝','捆二次棒','二次复丝'],
};
},
@ -438,7 +449,7 @@ export default {
that.mgroupsforEach();
that.getMgroups();
//
// that.getEveryoneCount(that.deptName1);
that.getEveryoneCount();
// that.getEveryoneCount(that.deptName2);
// that.getEveryoneCount(that.deptName3);
that.materialAll();
@ -494,7 +505,7 @@ export default {
mgroupsforEach(){
let that = this;
that.mgroups.forEach((item)=>{
that.getEquipment(item);
// that.getEquipment(item);
that.getMtask1(item);
})
},
@ -533,9 +544,9 @@ export default {
})
},
//
getEquipment(name) {
getEquipment() {
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 }"
};
that.config_middle_bottom.data = [];
@ -556,13 +567,12 @@ export default {
})
},
//
getEveryoneCount(deptName){
getEveryoneCount(){
let that = this;
that.config_right_top.data = [];
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
let params = {
// 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},
query: {start_date:date,end_date:date,dept_name:that.deptName},
};
this.$API.bi.dataset.exec.req("performance", params).then((res) => {
if(res.data2.ds0.length>0){

View File

@ -318,11 +318,16 @@ export default {
yAxisIndex: 0,
barCategoryGap: 50,
barWidth: 10,
label: {
show: true,
position: "right",
color: "#fff",
},
itemStyle: {
normal: {
barBorderRadius: 5,
color: function (params) {
return myColor[params.dataIndex];
return myColor[params.dataIndex%5];
}
},
label: {
@ -388,10 +393,15 @@ export default {
{name:'排二次棒',value:0},
{name:'切丝',value:0},
{name:'排板',value:0},
]
],
showValue: true
} ,
config_left2:{
data:[]
data:[],
digitalFlopStyle: {
fontSize: 16,
fill: '#fff'
}
},
config_middle_top:{
rowNum:10,

View File

@ -5,77 +5,16 @@
<div class="timer">{{ currentDay }} {{ currentTime }}</div>
</el-header>
<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-col :span="6">
<div class="leftBlock">
<el-row style="margin-bottom: 1vh;">
<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;">
<div style="height: 55vh;position: relative;">
<dv-border-box-1>
<div class="chartBlockTitle">车间各工段生产产品数</div>
<dv-capsule-chart :config="config_left1" class="leftChartBlock1"/>
<div class="chartBlockTitle">本月各工段生产产品数</div>
<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>
</div>
<div style="height: 34vh;">
@ -88,9 +27,35 @@
</el-col>
<el-col :span="12">
<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;">
<dv-border-box-1>
<div class="chartBlockTitle">车间工段任务展示</div>
<div class="chartBlockTitle">车间物料展示</div>
<dv-scroll-board :config="config_middle_top" class="middleTableBlock1"/>
</dv-border-box-1>
</div>
@ -117,6 +82,18 @@
<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-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;">
<dv-border-box-1>
@ -317,11 +294,16 @@ export default {
yAxisIndex: 0,
barCategoryGap: 50,
barWidth: 10,
label: {
show: true,
position: "right",
color: "#fff",
},
itemStyle: {
normal: {
barBorderRadius: 5,
color: function (params) {
return myColor[params.dataIndex];
return myColor[params.dataIndex%5];
}
},
label: {
@ -382,17 +364,22 @@ export default {
data:[]
},
config_left1:{
data:[]
data:[],
showValue: true
} ,
config_left2:{
data:[]
data:[],
digitalFlopStyle: {
fontSize: 16,
fill: '#fff'
}
},
config_middle_top:{
rowNum:10,
headerBGC: 'rgba(47,102,107,.34)',
oddRowBGC: 'rgba(0,0,0,0)',
evenRowBGC: 'rgba(0,0,0,0)',
header: ['任务编号', '产出产品', '任务量', '合格数'],
header: ['批次号','物料名称', '当前工序', '当前状态', '当前数量'],
data: []
},
config_middle_bottom:{
@ -414,12 +401,13 @@ export default {
currentTime: "",
currentDay: "",
today: "",
end_time:'',
start_time:'',
end_date:'',
start_date:'',
deptName1: "毛坯加工班组",
deptName2: "辅助班组",
deptName3: "精雕机班组",
deptName4: "成品精加工班组",
setIntervalChart : null,
};
},
mounted() {
@ -428,7 +416,18 @@ export default {
this.dayInterval = setInterval(() => {
this.showTime();
}, 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.getmgroupMaterial(that.deptName1);
that.getmgroupMaterial(that.deptName2);
that.getmgroupMaterial(that.deptName3);
that.getmgroupMaterial(that.deptName4);
that.getMgroups(that.deptName1);
that.getMgroups(that.deptName2);
that.getMgroups(that.deptName3);
@ -443,11 +442,23 @@ export default {
that.getEveryoneCount(that.deptName2);
that.getEveryoneCount(that.deptName3);
that.getEveryoneCount(that.deptName4);
//
that.getMtask1(that.deptName1);
that.getMtask1(that.deptName2);
that.getMtask1(that.deptName3);
that.getMtask1(that.deptName4);
if(that.setIntervalChart !== null){
clearInterval(that.setIntervalChart);
that.setIntervalChart = null;
}
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: {
getMondayOfCurrentWeek() {
@ -492,51 +503,45 @@ export default {
if(res.length > 0){
res.forEach((item)=>{
that.mgroupsId += item.id + ',';
that.getmgroupMaterial(item.name);
//
// that.config_left1.data.push({name:item.name,value:0});
//
that.getInms(item);
// that.getmgroupMaterial(item.name);
})
}
});
},
//
getMtask1(deptName) {
//
getInms(item){
let that = this;
let params = {
state: 20,mgroup__belong_dept__name: deptName,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) => {
let params = { tag: 'done',page:0,mgroup: item.id };
that.$API.wpm.wmaterial.list.req(params).then((res) => {
if(res.length>0){
res.forEach((item) => {
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[0] = item.batch;
arr[1] = item.material_.name;
arr[2] = item.material_.process_name;
arr[3] = item.state==10?'合格品':'不合格品';
arr[4] = item.count;
that.config_middle_top.data.push(arr);
})
}
});
})
},
//
getmgroupMaterial(deptName) {
let that = this;
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
let params = {
// query: {start_date:date,end_date:date,mgroup_name:item.name},
query: {start_date:date,end_date:date,dept_name:deptName},
query: {start_date:that.start_date,end_date:that.end_date,dept_name:deptName}
};
this.$API.bi.dataset.exec.req("mlog_okrate", params).then((res) => {
if(res.data2.ds0.length>0){
let data = res.data2.ds0;
data.forEach((item) => {
that.config_left1.data.forEach((obj,index2) => {
if (item.name == obj.工段){
that.config_left1.data[index2].value = item.合格数;
}
})
data.forEach((item)=>{
let obj = {};
obj.name = item.工段;
obj.value = item.合格数;
that.config_left1.data.push(obj);
})
}
});
@ -629,6 +634,9 @@ export default {
});
},
},
beforeUnmount() {
clearInterval(this.setIntervalChart);
}
};
</script>
<style scoped>
@ -725,4 +733,19 @@ export default {
font-weight: 600;
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>

View File

@ -74,7 +74,7 @@
</el-row>
<div style="height: 34vh;position: relative;">
<dv-border-box-1>
<div class="chartBlockTitle">车间各工段生产产品数</div>
<div class="chartBlockTitle">本月各工段生产产品数</div>
<dv-capsule-chart :config="config_left1" class="leftChartBlock1"/>
</dv-border-box-1>
</div>
@ -317,11 +317,16 @@ export default {
yAxisIndex: 0,
barCategoryGap: 50,
barWidth: 10,
label: {
show: true,
position: "right",
color: "#fff",
},
itemStyle: {
normal: {
barBorderRadius: 5,
color: function (params) {
return myColor[params.dataIndex];
return myColor[params.dataIndex%5];
}
},
label: {
@ -382,17 +387,22 @@ export default {
data:[]
},
config_left1:{
data:[]
data:[],
showValue: true
} ,
config_left2:{
data:[]
data:[],
digitalFlopStyle: {
fontSize: 16,
fill: '#fff'
}
},
config_middle_top:{
rowNum:10,
headerBGC: 'rgba(47,102,107,.34)',
oddRowBGC: 'rgba(0,0,0,0)',
evenRowBGC: 'rgba(0,0,0,0)',
header:['批次号','物料名称', '当前工序', '状态', '数量'],
header:['批次号','物料名称', '当前工序', '当前状态', '当前数量'],
data: []
},
config_middle_bottom:{
@ -425,20 +435,15 @@ export default {
this.dayInterval = setInterval(() => {
this.showTime();
}, 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.getEquipment();
//
that.getEveryoneCount();
//
that.getInms();
}
})
that.getMgroups();
//
that.getEquipment();
//
that.getEveryoneCount();
//
that.materialAll();
//
that.getmgroupMaterial();
},
methods: {
getMondayOfCurrentWeek() {
@ -482,13 +487,12 @@ export default {
that.$API.mtm.mgroup.list.req({belong_dept__name:that.deptName,page:0}).then((res) => {
if(res.length > 0){
res.forEach((item)=>{
that.mgroupsId += item.id + ',';
let obj = {};
that.mgroupsId += item.id + ',';
let obj = {};
obj.name = item.name;
obj.value = 0;
that.config_left1.data.push(obj);
that.getmgroupMaterial();
that.getInms(item);
that.getInms(item);
})
}
});
@ -514,10 +518,16 @@ export default {
//
getmgroupMaterial() {
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 = {
// query: {start_date:date,end_date:date,mgroup_name:item.name},
query: {start_date:date,end_date:date,dept_name:that.deptName},
query: {start_date:start_date,end_date:end_date,dept_name:that.deptName},
};
this.$API.bi.dataset.exec.req("mlog_okrate", params).then((res) => {
if(res.data2.ds0.length>0){
@ -536,8 +546,8 @@ export default {
getEquipment() {
let that = this;
let params = {
page: 0, belong_dept:that.deptId,
// query: " { id, name, number, model, state ,mgroup_name }"
page: 0, belong_dept__name:that.deptName,
query: " { id, name, number, model, state ,mgroup_name,running_state }"
};
that.config_middle_bottom.data = [];
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 params = {
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) => {
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>

View File

@ -74,7 +74,7 @@
</el-row>
<div style="height: 34vh;position: relative;">
<dv-border-box-1>
<div class="chartBlockTitle">车间各工段生产产品数</div>
<div class="chartBlockTitle">本月各工段生产产品数</div>
<dv-capsule-chart :config="config_left1" class="leftChartBlock1"/>
</dv-border-box-1>
</div>
@ -317,11 +317,16 @@ export default {
yAxisIndex: 0,
barCategoryGap: 50,
barWidth: 10,
label: {
show: true,
position: "right",
color: "#fff",
},
itemStyle: {
normal: {
barBorderRadius: 5,
color: function (params) {
return myColor[params.dataIndex];
return myColor[params.dataIndex%5];
}
},
label: {
@ -382,17 +387,22 @@ export default {
data:[]
},
config_left1:{
data:[]
data:[],
showValue: true
} ,
config_left2:{
data:[]
data:[],
digitalFlopStyle: {
fontSize: 16,
fill: '#fff'
}
},
config_middle_top:{
rowNum:10,
headerBGC: 'rgba(47,102,107,.34)',
oddRowBGC: 'rgba(0,0,0,0)',
evenRowBGC: 'rgba(0,0,0,0)',
header:['批次号','物料名称', '当前工序', '状态', '数量'],
header:['批次号','物料名称', '当前工序', '当前状态', '当前数量'],
data: []
},
config_middle_bottom:{
@ -425,18 +435,11 @@ export default {
this.dayInterval = setInterval(() => {
this.showTime();
}, 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.getEquipment();
//
that.getEveryoneCount();
//
that.getInms();
}
})
that.getMgroups();
//
that.getEquipment();
//
that.getEveryoneCount();
//
that.materialAll();
},
@ -515,10 +518,16 @@ export default {
//
getmgroupMaterial() {
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 = {
// query: {start_date:date,end_date:date,mgroup_name:item.name},
query: {start_date:date,end_date:date,dept_name:that.deptName},
query: {start_date:start_date,end_date:end_date,dept_name:that.deptName},
};
this.$API.bi.dataset.exec.req("mlog_okrate", params).then((res) => {
if(res.data2.ds0.length>0){
@ -537,8 +546,8 @@ export default {
getEquipment() {
let that = this;
let params = {
page: 0, belong_dept:that.deptId,
// query: " { id, name, number, model, state ,mgroup_name }"
page: 0, belong_dept__name:that.deptName,
query: " { id, name, number, model, state ,mgroup_name,running_state }"
};
that.config_middle_bottom.data = [];
that.$API.em.equipment.list.req(params).then((res) => {
@ -563,8 +572,8 @@ export default {
that.config_right_top.data = [];
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
let params = {
// 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: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) => {
if(res.data2.ds0.length>0){

View File

@ -3,7 +3,8 @@
<header class="pageHeader">
<div class="header_center_text">{{ bigScreenName }}</div>
<div class="header_left">
<span>{{ currentYear }}{{ currentMonth }}{{ currentDay }}{{currentWeek}}</span>
<!-- <span>{{ currentYear }}{{ currentMonth }}{{ currentDay }}{{currentWeek}}</span> -->
<span>{{ currentDate }}{{currentWeek}}</span>
</div>
<div class="header_right">
<span>{{ currentTime }}</span>
@ -40,7 +41,7 @@
<div style="display: flex;justify-content: space-around;">
<div class="block1NumberWrap">
<div class="block1Numberinner">
<span class="block1Text">日产量</span>
<span class="block1Text">日产量</span>
<span class="block1Number">{{ count_day }}</span>
</div>
</div>
@ -48,7 +49,7 @@
<div style="display: flex;justify-content: space-around;">
<div class="block1NumberWrap">
<div class="block1Numberinner">
<span class="block1Text">周产量</span>
<span class="block1Text">周产量</span>
<span class="block1Number">{{ count_week }}</span>
</div>
</div>
@ -56,7 +57,7 @@
<div style="display: flex;justify-content: space-around;">
<div class="block1NumberWrap">
<div class="block1Numberinner">
<span class="block1Text">月产量</span>
<span class="block1Text">月产量</span>
<span class="block1Number">{{ count_month }}</span>
</div>
</div>
@ -535,10 +536,7 @@ export default {
let end_date = that.$TOOL.dateFormat(nowDate, 'yyyy-MM-dd');
that.start_date = start_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;
console.log('this.bigScreenName',this.bigScreenName)
this.showTime();
loadBabylon().then(()=>{
this.initView()
@ -617,6 +615,10 @@ export default {
that.getTaskNumber();
that.getArticles();
that.getpurinrate();
let nowDate = new Date();
that.currentYear = nowDate.getFullYear();
that.currentMonth = nowDate.getMonth() + 1;
that.currentDay = nowDate.getDate();
}, 300000);
},
//
@ -639,6 +641,7 @@ export default {
},
//
showTime() {
console.log(this.currentDate, this.currentWeek)
this.currentTime = this.$TOOL.dateFormat(new Date(), "hh:mm:ss");
this.currentWeek = this.$TOOL.dateFormat(new Date(), "week");
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 day = that.currentDay>9?that.currentDay:'0'+that.currentDay;
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) => {
if(res0.data2.ds0&&res0.data2.ds0.length>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 nowDate = new Date();
@ -717,26 +723,32 @@ export default {
let first = that.$TOOL.dateFormat2(new Date(nowDate.getTime() - (weekFirst * ondDayTime)));//
let last = that.$TOOL.dateFormat2(new Date(nowDate.getTime() + (weekLast * ondDayTime)));//
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:',月,周',
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) => {
if(res1.data2.ds0&&res1.data2.ds0.length>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 end_month = that.currentYear+'-'+month+'-'+new Date(that.currentYear, month, 0).getDate();
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:',月',
select_cols_date:', EXTRACT ( MONTH FROM mlog.handle_date) AS 月'
}};
that.$API.bi.dataset.exec.req('lineDay_m2', objMonth).then((res2) => {
if(res2.data2.ds0&&res2.data2.ds0.length>0){
that.count_month = res2.data2.ds0[0].生产数;
}else{
that.count_month = 0;
}
console.log('that.count_month',that.count_month)
});
},
//

View File

@ -143,25 +143,23 @@
:apiObj="apiObjPrint"
></print-dialog>
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
<degrad3
<scDegra
v-if="limitedWatch"
ref="degraDialogs"
:nodes="nodes"
:edges="edges"
:rankdir="'LR'"
>
</degrad3>
</scDegra>
</el-drawer>
</el-container>
</template>
<script>
import degrad3 from "./../template/degraD3.vue";
import printDialog from "./../template/printmaterial.vue";
export default {
name: "halfgood",
components: {
printDialog,
degrad3
},
data() {
return {

View File

@ -6,14 +6,27 @@
type="primary"
@click="add('do_out')"
v-auth="'mio.do'"
>生产领料</el-button
>
>生产领料</el-button>
<el-button
type="primary"
@click="add('pur_in')"
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
v-model="query.type"
clearable
@ -177,15 +190,24 @@ export default {
typeDict: {
pur_in: "采购入库",
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: {
save: false,
record: false,
},
query: {},
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",
},
form: {},

View File

@ -11,11 +11,11 @@
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="编号">
<el-input v-model="form.number" placeholder="编号" />
<el-input v-model="form.number" disabled placeholder="编号" />
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="出入库日期">
<el-form-item label="出入库日期" prop="inout_date">
<el-date-picker
v-model="form.inout_date"
type="date"
@ -42,7 +42,7 @@
</el-select>
</el-form-item>
</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-select
v-model="form.supplier"
@ -57,7 +57,7 @@
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-col> -->
<el-col :md="12" :sm="24" v-if="urlCode == 'helpso_out'">
<el-form-item label="执行部门">
<el-select
@ -134,7 +134,7 @@
icon="el-icon-plus"
@click="table_add"
v-if="params.mio!==null"
style="position: absolute;right: 20px;top: 10px"
style="position: absolute;left: 120px;top: 10px"
>新增</el-button>
<div style="height: 8px"></div>
<scTable
@ -160,12 +160,18 @@
</el-table-column>
<el-table-column label="仓库" prop="warehouse_name">
</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="数量">
<template #default="scope">
<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>
</template>
</el-table-column>
<el-table-column label="出/入库单位">
<template #default="scope">{{scope.row.note}}</template>
</el-table-column>
<el-table-column
label="创建时间"
prop="create_time"
@ -248,6 +254,11 @@ export default {
urlCode: "helpso_in",
cate: "helpso",
type: "",
rules: {
inout_date: [
{ required: true, message: "请选择出入库日期", trigger: "blur" },
],
}
};
},
mounted() {
@ -258,7 +269,7 @@ export default {
that.getSupplierOptions();
that.urlCode = window.location.hash.split('/')[2];
if (that.urlCode == "helpso_out") {
that.form.type = "do_out";
that.form.type = "borrow_out";
}else{
that.form.type = "pur_in";
}
@ -314,6 +325,7 @@ export default {
that.mioSaveing = false;
that.mioId = res.id;
that.params.mio = res.id;
that.form = res;
that.apiObj = that.$API.inm.mioitem.list;
that.$API.inm.mio.item.req(res.id).then((res1) => {
that.mioObj = res1;
@ -329,7 +341,8 @@ export default {
let that = this;
this.dialog.save = true;
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);
});
},
//

View File

@ -61,7 +61,7 @@
</el-table-column>
<el-table-column label="仓库位号" prop="bin_number_main">
</el-table-column>
<el-table-column label="总库存" prop="count">
<el-table-column label="类型" prop="cate">
</el-table-column>
<el-table-column label="安全库存" prop="count_safe">
</el-table-column>

View File

@ -41,7 +41,7 @@
</el-form-item>
<el-form-item
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
v-model="form.supplier"
@ -95,8 +95,27 @@
</el-select>
</el-form-item>
<el-form-item
label="执行部门"
v-if="form.type == 'do_in' || form.type == 'do_out'"
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"
@ -112,27 +131,10 @@
></el-option>
</el-select>
</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
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-option
@ -185,9 +187,12 @@ export default {
do_out: "生产领料",
sale_out: "销售发货",
pur_in: "采购入库",
pur_out: "退货",
do_in: "生产入库",
other_in: "其他入库",
other_out: "其他出库",
borrow_out: "领用出库",
return_in: "退还入库",
},
form: {},
rules: {
@ -226,7 +231,7 @@ export default {
} else if (type == "sale_out") {
this.getOrderOptions();
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.getmgroupOptions();
this.getgetDeptUsers();
@ -236,6 +241,14 @@ export default {
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;

View File

@ -100,7 +100,7 @@
</el-table-column>
<el-table-column
label="组合件信息"
v-if="cate == 'good'"
v-if="cate == 'good'&&project_code=='gzerp'"
width="300"
>
<template #default="scope">
@ -230,6 +230,7 @@
:belongDeptId="belongDeptId"
:belongDeptName="mioObj.belong_dept_name"
:mioObj="mioObj"
:tableDatas="tableDatas"
:cate="cate"
@success="handleSaveSuccess"
@closed="dialog.save = false"
@ -256,6 +257,7 @@
<template #default>
<scTable ref="wprTable" hidePagination :data="wprList">
<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
label="操作"
fixed="right"
@ -327,6 +329,7 @@ export default {
wprList:[],
selection: [],
tableData:[],
tableDatas:[],
stateDict: {
10: "创建中",
20: "已提交",
@ -386,7 +389,17 @@ export default {
//
table_add() {
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.$nextTick(() => {
this.$refs.saveDialog.open("add", that.mioType);

View File

@ -1390,21 +1390,9 @@ export default {
if (valid) {
let ftestdefects = [],ftestitems = [];
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 = {};
obj0.testitem = item.testitem;
obj0.test_user = that.formbw.test_user;
@ -1412,8 +1400,10 @@ export default {
obj0.testitem_name = item.testitem_name;
obj0.test_val_json = row[item.testitem_name]?row[item.testitem_name]:null;
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 = {};
obj1.defect = item1.defect;
obj1.test_user = that.formbw.test_user;
@ -1421,8 +1411,8 @@ export default {
obj1.test_date = that.formbw.test_date;
obj1.has = row[item1.defect_name]?row[item1.defect_name]:false;
ftestdefects.push(obj1);
})
}
}
})
obj.note = row.note;
obj.number = row.number;
obj.mioitem = row.mioitem;

View File

@ -73,7 +73,7 @@
/>
</el-form-item>
</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-select
v-model="selectBatch"
@ -125,7 +125,18 @@
v-model="form.count"
:min="1"
: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%"
@change="countChange"
/>
@ -136,16 +147,40 @@
<el-input-number
v-model="form.count"
:min="1"
:disabled="form.type == 'do_out'"
style="width: 100%"
/>
</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.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 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-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%"/> -->
<el-input v-model="mioitems[i-1]" placeholder="请输入编号" :disabled="cate == 'mainso'" />
<template v-if="form.type == 'sale_out'&&project_code=='bxerp'">
<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-col>
</el-row>
@ -200,6 +235,17 @@
<el-button @click="visible = false">取消</el-button>
</template>
</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>
<script>
const defaultForm = {
@ -216,6 +262,7 @@ export default {
belongDeptId: { type: String, default: null },
mgroup: { type: String, default: null },
mioObj: { type: Object },
tableDatas: { type: Array ,default:function(){return []}},
},
data() {
return {
@ -230,7 +277,7 @@ export default {
other_in: "其他入库",
other_out: "其他出库",
},
form: {count: 1,},
form: {count: 1,note: ''},
rules: {
batch:[
{
@ -255,6 +302,7 @@ export default {
],
},
selectObj:{},
showDigit:false,
visible: false,
isSaveing: false,
materialOptions: [],
@ -270,7 +318,12 @@ export default {
wbatchOptions: [],
mioitems:[''],
mioitemw:[],
wprList:[],
prefix:'',
project_code:'',
digitNum:null,
mtype:null,
batchcount:null,
mTracking:10,
apiObj:this.$API.mtm.material.list,
};
@ -287,6 +340,7 @@ export default {
this.getMaterialOptions();
this.getWarehouseOptions();
},
getWarehouseOptions() {
let that = this;
this.$API.inm.warehouse.list.req({ page: 0 }).then((res) => {
@ -303,11 +357,18 @@ export default {
//
getWBatchs() {
let that = this;
let params = {material: this.form.material,page: 0};
if (this.mgroup != null) {
this.$API.wpm.wmaterial.list.req({mgroup: this.mgroup,material: this.form.material,state:10,page: 0}).then((res) => {
this.wbatchOptions = 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;
});
},
getMaterialOptions() {
var type = this.form.type;
@ -363,9 +424,22 @@ export default {
orderitem_material__order: this.mioObj.order,
};
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};
}
if(type == "return_in"){
this.inputBatchDisable = false;
}
this.query = query;
this.apiObj=this.$API.mtm.material.list;
// this.$API.mtm.material.list.req(query).then((res) => {
@ -419,10 +493,12 @@ export default {
},
selectMaterialChange() {
var that = this;
console.log('that.selectObj',that.selectObj);
var type = this.form.type;
that.form.material = that.selectObj.id;
that.form.unit = that.selectObj.unit;
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;
if (type == "do_in") {
if (that.selectObj.is_assemb) {
@ -445,12 +521,19 @@ export default {
}
},
selectBatchChange(item) {
this.form.batch = item.batch;
this.form.mb = item.id;
this.form.count = Number(item.count);
this.form.warehouse = item.warehouse;
// this.warehouseDisable = true;
this.inputBatchDisable = true;
let that = this;
if(item){
that.$API.wpm.wpr.list.req({ page: 0, mb: item.id }).then((res) => {
that.wprList = res;
})
// 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() {
this.form.mb = "";
@ -462,8 +545,9 @@ export default {
this.inputBatchDisable = false;
},
//
open(mode = "add", type = "") {
open(mode = "add", type = "",mtype) {
this.mode = mode;
this.mtype = mtype?mtype:null;
this.form.type = this.type = type;
if (mode == "add") {
this.init();
@ -496,13 +580,81 @@ export default {
let that = this;
that.mioitemw = [];
let numbers = that.mioitems[0];
for(let i=0;i<that.form.count;i++){
that.mioitems[i] = Number(numbers)+i;
let obj = {};
obj.number = that.form.batch+'-'+(i+1);
that.mioitemw.push(obj);
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++){
that.mioitems[i] = Number(numbers)+i;
let obj = {};
obj.number = that.form.batch+'-'+(i+1);
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){
this.mioitems[i] = this.mioitems[i].replace(/\D/g, '');
},
@ -533,6 +685,25 @@ export default {
that.$message.error("请输入正确数量的编号")
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 {
let res;

View File

@ -32,74 +32,114 @@
</div>
</el-header>
<el-main style="padding: 0;">
<scTable
<el-table
ref="table"
:apiObj="apiObj"
:data="tableData"
row-key="id"
stripe
:params="params"
:query="query"
border
style="height: 100%;"
:summary-method="getSummaries"
show-summary
>
<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 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">
<span v-if="scope.row.material_">{{ scope.row.material_.number }}</span>
</template>
</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">
<span v-if="scope.row.material_">{{ scope.row.material_.name }}</span>
</template>
</el-table-column>
<el-table-column label="货位号">
<el-table-column label="货位号"
:filters="nameFilters3"
:filter-method="filterName3"
filter-placement="bottom-end">
<template #default="scope">
<span v-if="scope.row.material_">{{ scope.row.material_.bin_number_main }}</span>
</template>
</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">
<span v-if="scope.row.material_">{{ scope.row.material_.specification }}</span>
</template>
</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">
<span v-if="scope.row.material_">{{ scope.row.material_.model }}</span>
</template>
</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">
<span v-if="scope.row.material_">{{ scope.row.material_.unit }}</span>
</template>
</el-table-column>
<el-table-column label="入库数量" prop="count">
<el-table-column label="入库数量" prop="count" sortable>
</el-table-column>
<el-table-column label="单价" prop="unit_price">
<el-table-column label="单价" prop="unit_price" sortable>
</el-table-column>
<el-table-column label="总金额" prop="price">
<el-table-column label="总金额" prop="price" sortable>
</el-table-column>
<el-table-column label="入库人">
<el-table-column label="入库人"
:filters="nameFilters7"
:filter-method="filterName7"
filter-placement="bottom-end">
<template #default="scope">
<span v-if="scope.row.mio_">{{ scope.row.mio_.submit_user_name }}</span>
</template>
</el-table-column>
<el-table-column label="入库凭证号">
<el-table-column label="入库凭证号"
:filters="nameFilters8"
:filter-method="filterName8"
filter-placement="bottom-end">
<template #default="scope">
<span v-if="scope.row.mio_">{{ scope.row.mio_.number }}</span>
</template>
</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">
<span v-if="scope.row.mio_">{{ typeDict[scope.row.mio_.type] }}</span>
</template>
</el-table-column>
<el-table-column label="供应商" prop="supplier_name">
</el-table-column>
</scTable>
</el-table>
</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>
</template>
<script>
@ -108,9 +148,24 @@ export default {
data() {
return {
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: [],
tableData:[],
nameFilters1: [],
nameFilters2: [],
nameFilters3: [],
nameFilters4: [],
nameFilters5: [],
nameFilters6: [],
nameFilters7: [],
nameFilters8: [],
nameFilters9: [],
query: {
search: "",
mio__inout_date__gte: "",
@ -129,16 +184,103 @@ export default {
other_out: "其他出库",
},
project_code:'',
dataTotal:0,
};
},
mounted() {
this.checkTemplate = this.checkTemplate+"?t=" + new Date().getTime();
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
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: {
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() {
this.$refs.table.refresh();
this.dialog.check = false;
@ -213,6 +355,33 @@ export default {
});
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>

View File

@ -49,6 +49,23 @@
/>
</el-form-item>
</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-form-item label="规格">
<el-input
@ -91,7 +108,7 @@
</el-form-item>
</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-select
v-model="form.tracking"
@ -115,9 +132,7 @@
<!-- 光芯 -->
<el-col :md="12" :sm="24" v-if="form.type == 40">
<el-form-item label="仓库位号">
<el-input
v-model="form.bin_number_main"
/>
<el-input v-model="form.bin_number_main"/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="form.type !== 20">
@ -139,23 +154,26 @@
<el-switch v-model="form.into_wm" />
</el-form-item>
</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-form-item label="图纸编号">
<el-input v-model="form.photo_number" placeholder="图纸编号"/>
</el-form-item>
</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-form>
</el-main>
<el-footer>
<el-button type="primary" :loading="isSaveing" @click="submit"
>保存</el-button
>
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
<el-button @click="visible = false">取消</el-button>
</el-footer>
</el-container>
@ -189,6 +207,13 @@ export default {
trigger: "blur",
},
],
cate: [
{
required: true,
message: "请选择辅料类别",
trigger: "blur",
},
],
number: [
{
required: true,
@ -220,6 +245,7 @@ export default {
{ id: 30, name: "主要原料" },
// { id: 40, name: "" },
],
cateOptions: ['主要辅材','办公辅料','设备维护辅料','包装辅材','标识辅材','防护辅材','其他辅材'],
handle_user: [],
selectionFilters: [],
materialOptions: [],

View File

@ -190,27 +190,15 @@
ref="showDialog"
@closed="dialog.show = false"
></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>
<script>
import saveDialog from "./routepack_form.vue";
import showDialog from "./route_show.vue";
import degrad3 from "./../template/degraD3.vue";
export default {
name: "route",
components: {
saveDialog,
showDialog,
degrad3
},
data() {
return {

View File

@ -95,7 +95,7 @@
<el-container>
<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>
<degrad3
<scDegra
style="margin-top: 50px;"
v-if="limitedWatch"
ref="degraDialogs"
@ -103,7 +103,7 @@
:edges="edges"
:rankdir="'DL'"
>
</degrad3>
</scDegra>
</el-side>
<el-main style="width: 50%;overflow: scroll;">
<el-container>
@ -200,10 +200,9 @@
</template>
<script>
import saveDialog from "./route_form.vue";
import degrad3 from "./../template/degraD3.vue";
export default {
name: "routepack_form",
components: { saveDialog,degrad3 },
components: { saveDialog },
data() {
return {
active: 0,

View File

@ -64,6 +64,19 @@
show-overflow-tooltip
>
</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
label="工艺路线"
prop="material_"
@ -84,7 +97,7 @@
{{ scope.row.material_.name }}
</template>
</el-table-column>
<el-table-column label="任务状态" prop="state">
<el-table-column label="任务状态" prop="state" width="85">
<template #default="scope">
<el-tag
v-if="scope.row.state == 40"
@ -264,6 +277,11 @@ export default {
34: "终止",
40: "已提交",
},
priority_: {
10: "低",
20: "中",
30: "高",
},
start_date: "",
newDate: "",
};

View File

@ -64,19 +64,19 @@
}}
</span>
</el-form-item>
<!-- <el-form-item label="任务等级">
<el-form-item label="任务等级">
<el-select
v-model="form.level"
v-model="form.priority"
value-key="id"
style="width: 100%"
filterable
:disabled="mode == 'edit'"
>
<el-option label="高" value="高"></el-option>
<el-option label="中" value="中"></el-option>
<el-option label="低" value="低"></el-option>
<el-option label="低" :value="10"></el-option>
<el-option label="中" :value="20"></el-option>
<el-option label="高" :value="30"></el-option>
</el-select>
</el-form-item> -->
</el-form-item>
<el-form-item label="产品" prop="material">
<el-select
v-model="form.material"
@ -153,7 +153,7 @@ export default {
routeOptions: [],
currentRoute: "",
form: {
// level: "",
priority: 20,
},
rules: {
count: [
@ -305,6 +305,7 @@ export default {
//
setData(data) {
Object.assign(this.form, data);
this.getFinalMaterial(this.form.routepack);
},
//
setFilters(filters) {

View File

@ -17,20 +17,13 @@
</el-table-column>
<el-table-column label="批次号" prop="batch">
</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 label="抽样数量" prop="count_sampling">
</el-table-column>
<el-table-column label="称重记录/Kg" prop="weight_kgs">
</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="检验结论">
<!-- <el-table-column label="检验结论">
<template #default="scope">
<el-tag v-if="scope.row.is_testok" type="success">
合格
@ -39,7 +32,7 @@
不合格
</el-tag>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="检验员" prop="test_user_name">
</el-table-column>
<el-table-column label="检验日期" prop="test_date">
@ -90,7 +83,7 @@ export default {
query: {
test_date: '',
},
params: { type: 20, mio__type: 'pur_in' },
params: { type: 20, mio__type: 'pur_in', test_date__isnull: false },
selection: [],
state_: {
10: '',

View File

@ -46,27 +46,17 @@
@change="materialrowChange"
>
<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>
</template>
</el-table-column>
<el-table-column prop="time" label="追溯层级">
<el-table-column label="用于输入">
<template #default="scope">
<span v-if="!scope.row.isEdit">{{ tracing_[scope.row.tracing] }}</span>
<el-select
v-else
v-model="scope.row.tracing"
filterable
placeholder="请选择追溯层级"
>
<el-option
v-for="item in tracingOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<el-switch :disabled="!scope.row.isEdit" v-model="scope.row.use_for_in" active-color="#13ce66" inactive-color="#666666"></el-switch>
</template>
</el-table-column>
<el-table-column label="用于输出">
<template #default="scope">
<el-switch :disabled="!scope.row.isEdit" v-model="scope.row.use_for_out" active-color="#13ce66" inactive-color="#666666"></el-switch>
</template>
</el-table-column>
<el-table-column prop="open" label="操作" width="125" align="center">
@ -133,6 +123,12 @@
</xtSelect>
</template>
</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="加入物料信息">
<template #default="scope">
<el-switch
@ -301,18 +297,11 @@ export default {
"process":"过程检验",
"performance":"性能检验"
},
tracing_:{
"test":"检测项",
"defect":"缺陷项",
},
tracingOptions:[
{value:'test',label:'检测项'},
{value:'defect',label:'缺陷项'},
],
mataddTemplate:{
tracing: "",
qct: this.qctId,
material: "",
use_for_in:false,
use_for_out:false,
isEdit: true,
},
defectaddTemplate:{
@ -525,25 +514,23 @@ export default {
materialrowChange(){
let that = this;
that.qctmatlist.forEach((item) => {
if (item.material&&(item.material == that.materialrow.id)) {
if (item.id&&(item.material == that.materialrow.id)) {
that.$message.warning("该物料已存在");
}
});
},
defectrowChange(){
let that = this;
console.log('that.qctdefectlist',that.qctdefectlist);
that.qctdefectlist.forEach((item) => {
if (item.defect&&(item.defect == that.defectrow.id)) {
if (item.id&&(item.defect == that.defectrow.id)) {
that.$message.warning("该缺陷项已存在");
}
});
},
testitemrowChange(){
let that = this;
console.log('that.qcttestitemlist',that.qcttestitemlist);
that.qcttestitemlist.forEach((item) => {
if (item.testitem&&item.testitem == that.testitemrow.id) {
if (item.id&&item.testitem == that.testitemrow.id) {
that.$message.warning("该检测项已存在");
}
});

259
src/views/sam/sale.vue Normal file
View File

@ -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>

348
src/views/sam/sale_form.vue Normal file
View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -2,29 +2,16 @@
<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;"
placeholder="批次号"
clearable
style="width: 200px;"
></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
type="primary"
icon="el-icon-search"
@ -34,8 +21,7 @@
@click="handleExport"
class="tables"
type="primary"
>导出</el-button
>
>导出</el-button>
</div>
</el-header>
<el-main class="nopadding">
@ -48,134 +34,139 @@
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">
<!-- <template #default="scope">
{{ scope.row.number }}<span v-if="scope.row.data">[{{ scope.row.data.毛坯检测_批次号 }}]</span>
</template> -->
</el-table-column>
<el-table-column label="放大率¢2mm" align="center" class-name="colorheader1">
<el-table-column label="差值" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.毛坯检测_检测项_放大率2mm }}</span>
<span>{{ scope.row.data.毛坯检测_检测项_放大率2mm }}</span>
</template>
</el-table-column>
<el-table-column label="合格数" class-name="colorheader1">
<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>
</el-table-column>
</el-table-column>
<el-table-column label="放大率¢16mm" align="center" class-name="colorheader2">
<el-table-column label="差值" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.毛坯检测_检测项_放大率16mm }}</span>
<span>{{ scope.row.data.毛坯检测_检测项_放大率16mm }}</span>
</template>
</el-table-column>
<el-table-column label="合格数" class-name="colorheader2">
<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>
</el-table-column>
</el-table-column>
<el-table-column label="剪切¢18.3mm" align="center" class-name="colorheader3">
<el-table-column label="剪切" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.毛坯检测_检测项_剪切18mm }}</span>
<span>{{ scope.row.data.毛坯检测_检测项_剪切18mm }}</span>
</template>
</el-table-column>
<el-table-column label="剪切值" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.毛坯检测_检测项_剪切值18mm }}</span>
<span>{{ scope.row.data.毛坯检测_检测项_剪切值18mm }}</span>
</template>
</el-table-column>
<el-table-column label="合格数" class-name="colorheader3">
<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>
</el-table-column>
<el-table-column label="可加工" class-name="colorheader3">
<!-- <el-table-column label="可加工" class-name="colorheader3">
<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>
</el-table-column>
</el-table-column> -->
</el-table-column>
<el-table-column label="暗点" align="center" class-name="colorheader4">
<el-table-column label="内标合格" class-name="colorheader4">
<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>
</el-table-column>
<el-table-column label="长点不合格" class-name="colorheader4">
<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>
</el-table-column>
<el-table-column label="可加工" class-name="colorheader4">
<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>
</el-table-column>
</el-table-column>
<el-table-column label="暗点重" align="center" class-name="colorheader5">
<template #default="scope">
<span v-if="scope.row.data.毛坯检测_缺陷项_暗点重不合格">{{ scope.row.data.毛坯检测_缺陷项_暗点重不合格 }}</span>
<span>{{ scope.row.data.毛坯检测_缺陷项_暗点重?scope.row.data.毛坯检测_缺陷项_暗点重:0 }}</span>
</template>
</el-table-column>
<el-table-column label="花丝" align="center" class-name="colorheader5">
<el-table-column label="花丝" align="center" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data.毛坯检测_缺陷项_花丝不合格">{{scope.row.data.毛坯检测_缺陷项_花丝不合格 }}</span>
<span>{{scope.row.data.毛坯检测_缺陷项_花丝?scope.row.data.毛坯检测_缺陷项_花丝:0 }}</span>
</template>
</el-table-column>
<el-table-column label="网格" align="center" class-name="colorheader5">
<el-table-column label="网格" align="center" class-name="colorheader7">
<template #default="scope">
<span v-if="scope.row.data.毛坯检测_缺陷项_网格不合格">{{scope.row.data.毛坯检测_缺陷项_网格不合格 }}</span>
<span>{{scope.row.data.毛坯检测_缺陷项_网格?scope.row.data.毛坯检测_缺陷项_网格:0 }}</span>
</template>
</el-table-column>
<el-table-column label="花朵" align="center" class-name="colorheader5">
<el-table-column label="花朵" align="center" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data.毛坯检测_缺陷项_花朵不合格">{{scope.row.data.毛坯检测_缺陷项_花朵不合格 }}</span>
<span>{{scope.row.data.毛坯检测_缺陷项_花朵?scope.row.data.毛坯检测_缺陷项_花朵:0 }}</span>
</template>
</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">
<span v-if="scope.row.data.毛坯检测_缺陷项_S畸变不合格">{{scope.row.data.毛坯检测_缺陷项_S畸变不合格 }}</span>
<span>{{scope.row.data.毛坯检测_缺陷项_S畸变不合格?scope.row.data.毛坯检测_缺陷项_S畸变不合格:0 }}</span>
</template>
</el-table-column>
<el-table-column label="弓形畸变不合格" align="center" class-name="colorheader5">
<el-table-column label="弓形畸变不合格" align="center" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data.毛坯检测_缺陷项_弓形畸变不合格不合格">{{ scope.row.data.毛坯检测_缺陷项_弓形畸变不合格不合格 }}</span>
<span>{{ scope.row.data.毛坯检测_缺陷项_弓形畸变不合格?scope.row.data.毛坯检测_缺陷项_弓形畸变不合格:0 }}</span>
</template>
</el-table-column>
<el-table-column label="炸废" class-name="colorheader5">
<el-table-column label="炸废" align="center" class-name="colorheader4">
<template #default="scope">
<span v-if="scope.row.data.毛坯检测_缺陷项_炸废">{{ scope.row.data.毛坯检测_缺陷项_炸废 }}</span>
<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.data.毛坯检测_缺陷项_角偏不合格">{{ 1-scope.row.data.毛坯检测_缺陷项_角偏不合格 }}</span>
<span>{{ scope.row.data.毛坯检测_缺陷项_角偏?scope.row.data.毛坯检测_缺陷项_角偏:0 }}</span>
</template>
</el-table-column>
<el-table-column label="出口" align="center" class-name="colorheader6">
<el-table-column label="国标" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data"></span>
</template>
<!-- <template #default="scope">
<span></span>
</template> -->
</el-table-column>
<el-table-column label="内标" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data"></span>
</template>
<!-- <template #default="scope">
<span></span>
</template> -->
</el-table-column>
<el-table-column label="内标放宽" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data"></span>
</template>
<!-- <template #default="scope">
<span></span>
</template> -->
</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">
<span v-if="scope.row.data">{{ scope.row.data.毛坯检测_缺陷项_备注 }}</span>
<span>{{ scope.row.data.毛坯检测_缺陷项_备注 }}</span>
</template>
</el-table-column>
</scTable>
@ -189,15 +180,15 @@ export default {
data() {
return {
params: {
ordering:'-create_time',
ordering:'-data__毛坯检测_小日期',
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:[],
@ -207,40 +198,38 @@ export default {
methods: {
handleQuery(){
let that = this;
let querys = [],arr1=[],arr2=[];
let obj = {},obj1 = {},obj2 = {};
obj.field = 'batch__contains';
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__gte';
obj1.field = 'last_time';
obj1.value = that.query.last_time__gte;
obj1.compare = 'gte';
obj2.field = 'last_time__lte';
obj2.field = 'last_time';
obj2.value = that.query.last_time__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){
querys.push(obj);
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){
arr1.push(obj1);
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
arr1.push(obj);
}
querys.push(arr1)
querys[0].push(obj1);
}
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
arr2.push(obj2);
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
arr2.push(obj);
}
querys.push(arr2)
querys[0].push(obj2);
}
let params = {};
params.querys = querys;
this.$refs.table.queryData(params);
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;

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -60,7 +60,7 @@ export default {
if(that.g!==null){
that.updataGraph();
}else{
that.g = new dagreD3.graphlib.Graph().setGraph({
that.g = new dagreD3.graphlib.Graph({multigraph: true,}).setGraph({
rankdir: that.rankdir,
nodesep: 40,
edgesep: 25, //线
@ -89,8 +89,9 @@ export default {
that.edges.forEach((transition0) => {
that.g.setEdge(transition0.source,transition0.target,{
label: transition0.label,//
id: transition0.id,
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px", // 线
});
}, transition0.id);
});
//
let render = new dagreD3.render();

View File

@ -103,7 +103,7 @@
</el-card>
<el-card
style="margin-top: 4px; position: relative"
v-if="cateType === 'rpj'"
v-if="cateType == 'rpj'"
>
<el-descriptions title="入厂项目" :column="3">
<el-descriptions-item label="相关方:">
@ -209,6 +209,36 @@
</el-table-column>
</el-table>
</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
style="margin-top: 4px; position: relative"
header="处理日志"
@ -596,6 +626,7 @@ export default {
{ id: 40, name: "其他" },
],
dosOption: [],
handoverItem:{},
submitLoading: false,
userId: this.$TOOL.data.get("USER_INFO").id,
isOwn: false,
@ -610,6 +641,7 @@ export default {
},
mounted() {
this.submitLoading = false;
this.getticketItem();
if (this.cateType === "visit") {
this.getVisit();
} else if (this.cateType === "rpj") {
@ -621,7 +653,6 @@ export default {
} else if (this.cateType === "opl") {
this.getOpl();
}
this.getticketItem();
this.getBtns();
},
methods: {
@ -741,6 +772,17 @@ export default {
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") {
// ,
this.getCloseDos();

View File

@ -182,13 +182,13 @@
<el-button type="danger">撤消</el-button>
</template>
</el-popconfirm>
<el-button
<!-- <el-button
@click="table_edit(scope.row)"
v-auth="'handover.update'"
type="primary"
v-if="(scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept)&&scope.row.submit_time == null&&scope.row.mtype == 10"
>编辑</el-button
>
> -->
<el-popconfirm
title="确定删除吗?"
v-if="(scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept)&&scope.row.submit_time == null"

View File

@ -53,7 +53,7 @@
<span>{{ item.batch }}</span>
<span v-if="item.material_&&item.material_.process_name">({{ item.material_.process_name }})</span>
<span v-else>(原料棒)</span>
<span v-if="item.defect!==null" style="color: red;">{{ item.defect_name }}</span>
<div style="float: right">
<span>{{ item.count_canhandover }}</span>
<span v-if="item.notok_sign_name !== null" style="color: #aaaaaa">
@ -157,7 +157,7 @@
clearable
filterable
style="width: 100%"
:disabled="type==40"
:disabled="type==40||mode!=='add'"
@change="getUserList2"
>
<el-option

View File

@ -16,6 +16,7 @@
:mgroupId="mgroupId"
:deptId="mgroupDept"
:process = "mgroupProcess"
:processType = "mgroupProcessType"
:mgroup_code="mgroup_code"
:mgroupMtype = "mgroupMtype"
id="mlogs"
@ -39,11 +40,13 @@
</div>
<mtask
v-if="values == '日志'&&componentsShow"
:mgroupId="mgroupId"
:deptId = "mgroupDept"
:mgroupName="mgroupName"
:mgroupId="mgroupId"
:deptId="mgroupDept"
:process = "mgroupProcess"
:processType = "mgroupProcessType"
:mgroup_code="mgroup_code"
:mgroupMtype = "mgroupMtype"
id="mtask"
style="height: 40%;display: none;"
></mtask>
@ -54,29 +57,30 @@
:mgroupId="mgroupId"
:deptId="mgroupDept"
:process = "mgroupProcess"
:processType = "mgroupProcessType"
:mgroup_code="mgroup_code"
:mgroupMtype = "mgroupMtype"
></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"
:mgroup_code="mgroup_code"
:mgroupId="mgroupId"
:mgroupName="mgroupName"
:process = "mgroupProcess"
:deptId="mgroupDept"></inmIn>
:mgroupName="mgroupName"
:mgroupId="mgroupId"
:deptId="mgroupDept"
:process = "mgroupProcess"
:processType = "mgroupProcessType"
:mgroup_code="mgroup_code"
:mgroupMtype = "mgroupMtype"
></inmIn>
<!-- 已完成 -->
<inmOut v-else-if="values == '已完成'&&componentsShow"
:mgroup_code="mgroup_code"
:mgroupId="mgroupId"
:mgroupName="mgroupName"
:process = "mgroupProcess"
:deptId="mgroupDept"></inmOut>
:mgroupName="mgroupName"
:mgroupId="mgroupId"
:deptId="mgroupDept"
:process = "mgroupProcess"
:processType = "mgroupProcessType"
:mgroup_code="mgroup_code"
:mgroupMtype = "mgroupMtype"
></inmOut>
</el-main>
</el-container>
</template>
@ -94,14 +98,16 @@ export default {
return {
mgroups:[],
tableHieght: 200,
selectedIndex:0,
options: ["日志", "交接记录","未完成", "已完成"],
values: "日志",
mgroupName: "",
mgroupId: "",
selectedIndex:0,
mgroup_code:'',
mgroupDept:'',
mgroupMtype:'',
mgroupProcess: '',
mgroupProcessType: '',
componentsShow:false,
mtaskVisible:false
};
@ -127,6 +133,7 @@ export default {
that.mgroups = res;
that.mgroupName = res[0].name;
that.mgroupId = res[0].id;
that.mgroupProcessType = res[0].process_type;
that.mgroupProcess = res[0].process;
that.mgroupDept = res[0].belong_dept;
that.mgroupMtype = res[0].mtype;

View File

@ -80,10 +80,10 @@
<el-table-column
label="批次号"
prop="batch"
min-width="120"
min-width="150"
>
<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>
</el-table-column>
<el-table-column
@ -202,9 +202,20 @@
<el-drawer v-model="wprVisibleDrawer" :size="'70%'">
<template #header>
<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 #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="oinfo">
<template #default="scope">
@ -227,19 +238,20 @@
label="操作"
fixed="right"
align="center"
width="120"
width="200"
>
<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>
</el-table-column>
</scTable>
</template>
<template #footer>
<div style="flex: auto">
<el-button @click="wprVisibleDrawer=false">关闭</el-button>
</div>
</el-table>
</template>
<!-- <template #footer>
<div style="flex: auto">
<el-button @click="wprVisibleDrawer=false">关闭</el-button>
</div>
</template> -->
</el-drawer>
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
<scDegra
@ -251,6 +263,13 @@
>
</scDegra>
</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>
</template>
<script>
@ -313,6 +332,7 @@ export default {
scrap: false,
permission: false,
inmRecord:false,
qrcode:false
},
nodes:[],
edges:[],
@ -332,6 +352,8 @@ export default {
page:0,
wm: ""
},
wprTableHeight: 500,
wprsearch:"",
route_code:"",
showBatch: "",
wmMaterial:'',
@ -347,6 +369,7 @@ export default {
mgroup_name:'',
ofrom_name:'',
ofrom_batch :'',
scQr_code:'',
checkItem:{},
};
},
@ -460,12 +483,27 @@ export default {
handleQuery() {
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){
let that = this;
that.ofrom_name = row.material_ofrom_name;
that.ofrom_batch = row.batch;
that.wprParams.wm = row.id;
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) => {
that.wprList = res;
})
@ -483,6 +521,12 @@ export default {
this.$refs.handoverDialog.open("add",row,20);
});
},
QRCode(row){
this.dialog.qrcode = true;
this.$nextTick(() => {
this.scQr_code=row.number;
});
},
//
printMaterial(row,type){
let that = this;

View File

@ -55,7 +55,7 @@
<el-table-column
label="物料名称"
prop="material_name"
min-width="150"
min-width="120"
>
<template #default="scope">
{{ scope.row.material_name }}
@ -81,10 +81,10 @@
<el-table-column
label="批次号"
prop="batch"
min-width="120"
min-width="150"
>
<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>
</el-table-column>
<el-table-column
@ -203,9 +203,11 @@
<el-drawer v-model="wprVisibleDrawer" :size="'70%'">
<template #header>
<h4>关联产品</h4>
<el-button type="primary" @click="wprNumberChange">发货编号</el-button>
<el-button type="warning" @click="wprNumberClear">清空编号</el-button>
</template>
<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="oinfo">
<template #default="scope">
@ -224,6 +226,7 @@
</span>
</template>
</el-table-column>
<el-table-column label="对外编号" prop="number_out" min-width="100px"></el-table-column>
<el-table-column
label="操作"
fixed="right"
@ -242,6 +245,17 @@
</div>
</template>
</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">
<scDegra
v-if="limitedWatch"
@ -333,11 +347,13 @@ export default {
page:0,
wm: ""
},
prefix:'',
number_out_last:'',
route_code:"",
showBatch: "",
wmMaterial:'',
cate_type:'',
materialType: "wm",
showBatch: false,
limitedWatch:false,
materialsVisible:false,
visibleDrawer: false,
@ -467,7 +483,11 @@ export default {
that.ofrom_batch = row.batch;
that.wprParams.wm = row.id;
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;
})
},
@ -479,6 +499,59 @@ export default {
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) {
this.dialog.save = false;

View File

@ -256,12 +256,9 @@
type="primary"
@click="table_in_edit(scope.row)"
v-if="mlogItem.submit_time== null&&mlogItem.material_in_&&mlogItem.material_in_.tracking==10"
>
编辑
</el-button>
>编辑</el-button>
<el-button
type="warning"
v-if="mlogItem.submit_time == null&&mlogItem.material_in_&&mlogItem.material_in_.tracking==20"
@click="table_out_check_single(scope.row,'ins')"
>详情</el-button>
<el-button
@ -269,9 +266,7 @@
type="danger"
style="margin-left: 10px;"
@click="table_in_del(scope.row)"
>
删除
</el-button>
>删除</el-button>
</template>
</el-table-column>
</scTable>
@ -402,7 +397,9 @@
:isfix = "mlogItem.is_fix"
:routeId ="routeId"
:tracking="tracking"
:materialIn="materialIn"
:material_in="materialIn"
:hasRoute = "hasRoute"
:process="process"
@success="handleSaveSuccess"
@closed="saveMlogbInClose"
>
@ -422,16 +419,17 @@
:wm = "wm"
:dept="deptId"
:mgroup="mgroup"
:material_in="material_in"
:material_out="material_out"
:mgroupName= "mlogItem.mgroup_name"
:isSubmit="isSubmit"
:batchNumber="batchNumber"
:handle_user="handle_user"
:handle_date="handle_date"
:processType="processType"
@success="handlesCheckSuccess"
@closed="scheckClose"
>
</scheck-dialog>
></scheck-dialog>
<edit-dialog
v-if="dialog.edit"
ref="editDialog"
@ -474,6 +472,14 @@ export default {
type: String,
default: "",
},
mgroup:{
type: String,
default: "",
},
processType:{
type: String,
default: "",
}
},
components: {
editDialog,
@ -498,13 +504,7 @@ export default {
check_single: false,
},
apiObj: null,
// apiObjWm:null,
apiObjMuser:null,
// paramsWm: {
// page: 0,
// search:'',
// mgroup:''
// },
paramsIn: {
page: 0,
mlog: "",
@ -521,7 +521,6 @@ export default {
},
tracking:10,
mlogb:"",
mgroup: "",
mlogItem: {},
saveInForm: {
count_use: 0,
@ -556,6 +555,7 @@ export default {
wm:'',
route_code:'',
materialOut:'',
material_in:'',
material_out:'',
batchContains:'',
apiObjPrint:this.$API.cm.labelmat.fromWm,
@ -569,6 +569,7 @@ export default {
qct:null,
defectlist:[],
batchNumber:'',
hasRoute:false,
isSubmit:false,
fileVisible:false,
};
@ -594,6 +595,9 @@ export default {
let that = this;
that.$API.wpm.mlog.item.req(that.mlogId).then((res) => {
that.mlogItem = res;
if(res.route!==null){
that.hasRoute = true;
}
that.oinfo_json = [];
if(res.oinfo_json_){
for(let key in res.oinfo_json_){
@ -604,12 +608,12 @@ export default {
}
}
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){
that.fileList = [{name:res.test_file,url: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.search = that.batchContains;
that.materialIn = res.material_in;
@ -720,6 +724,7 @@ export default {
that.wm = row.wm_in;
that.isSubmit = that.mlogItem.submit_time == null ? false : true;
that.batchNumber = row.batch;
that.material_in = row.material_in;
that.material_out = row.material_out;
that.handle_date=that.mlogItem.handle_date;
that.handle_user = that.mlogItem.handle_user;

View File

@ -18,6 +18,28 @@
style="padding: 0 10px"
>
<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-form-item label="关联任务">
<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-form-item>
</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-form-item label="主要批次" v-if="!isfix">
<el-select
@ -177,20 +140,28 @@ export default {
},
tracking:{
type: Number,
default: 10,
default: null,
},
routeId:{
type: String,
default: "",
},
materialIn: {
material_in: {
type: String,
default: "",
},
hasRoute:{
type: Boolean,
default: false,
},
isfix:{
type: Boolean,
default: false,
}
},
process:{
type: String,
default: "",
},
},
emits: ["success", "closed"],
data() {
@ -220,6 +191,7 @@ export default {
mlogbIns:[],
options: [],
optionsEq: [],
routeOptions: [],
mlogbInOptions:[],
materialOptions: [],
mgroup_code:'',
@ -243,6 +215,7 @@ export default {
};
},
mounted() {
this.materialIn = this.material_in;
this.route_code = this.$route.path.split("/")[2];
this.form.mlog = this.mlog;
this.params.mlog = this.mlog;
@ -253,6 +226,9 @@ export default {
this.getMaterial();
this.getParentList();
this.getEquipment();
if(!this.hasRoute){
this.getRoute();
}
},
methods: {
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(){
let that = this;
that.$API.wpm.mlogb.list.req(that.params).then((res) => {
@ -313,19 +300,41 @@ export default {
getMaterial() {
let that = this;
let obj = {};
console.log('that.mgroup',that.mgroup);
obj.mtaskx =that.form.mtask;
obj.mgroupx =that.mgroup;
obj.route =that.routeId;
obj.mgroup =that.mgroup;
if(that.routeId!==null&&that.routeId!==''){
obj.route =that.routeId;
}
obj.page =0;
if(that.isfix){
obj.state =30;
if(that.is_fix){//&&
obj.tag = 'canfix';
}else{
if(that.materialIn!==null&&that.materialIn!==''){
obj.material =that.materialIn;
}
obj.state =10;
obj.tag = 'todo';
}
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(){
let that = this;
that.materialOptions.forEach(item=>{
@ -338,6 +347,7 @@ export default {
},
//
formWminChange(code){
console.log('code',code);
let that = this,codeId='',arr=[];
code = code.replace(/(^\s*)|(\s*$)/g, "");
if(code.indexOf("#")>-1){
@ -367,67 +377,69 @@ export default {
});
}else{
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) => {
if(res.length>0){
let index = res.length-1;//
let bwitem = {};
bwitem.mlogb="";
bwitem.number=res[index].number;
bwitem.wpr=res[index].id;
let arr = that.materialOptions.filter((item) => {
return item.id == res[index].wm;
that.$API.wpm.wpr.list.req({number:code,page:0}).then((res) => {
if(res.length>0){
let index = res.length-1;//
let bwitem = {};
bwitem.mlogb="";
bwitem.number=res[index].number;
bwitem.wpr=res[index].id;
let arr = that.materialOptions.filter((item) => {
return item.id == res[index].wm;
})
if(arr.length>0){ //
let batch = arr[0].batch;
that.wm_in = arr[0].batch;
that.mlogbInCount = arr[0].count;//
//
let arr0= that.mlogbIns.filter((item)=>{
return item.batch == batch;
})
if(arr.length>0){ //
let batch = arr[0].batch;
that.wm_in = arr[0].batch;
that.mlogbInCount = arr[0].count;//
//
let arr0= that.mlogbIns.filter((item)=>{
return item.batch == batch;
})
let arr1 = that.bwItemForms.filter((item)=>{
return item.number == bwitem.number;
})
if (arr0.length > 0) {
that.hasMlogbIn = true;
that.form.count_use = 1;
that.mlogbId = arr0[0].id;
bwitem.mlogb = arr0[0].id;
}else{
if(arr1.length>0){
that.wm_in = '';
that.$message.error("已存在");
}else{
that.form.batch = arr[0].batch;
that.form.wm_in = arr[0].id;
that.form.count_use += 1;
that.wm_in = '';
that.batchs = arr[0].id;
}
}
that.bwItemForms.push(bwitem);
// that.bwItemForm = bwitem;
let arr1 = that.bwItemForms.filter((item)=>{
return item.number == bwitem.number;
})
if (arr0.length > 0) {
that.hasMlogbIn = true;
that.form.count_use = 1;
that.mlogbId = arr0[0].id;
bwitem.mlogb = arr0[0].id;
}else{
that.wm_in = '';
that.$message.error("批次号不存在");
if(arr1.length>0){
that.wm_in = '';
that.$message.error("已存在");
}else{
that.form.batch = arr[0].batch;
that.form.wm_in = arr[0].id;
that.form.count_use += 1;
that.wm_in = '';
that.batchs = arr[0].id;
}
}
that.bwItemForms.push(bwitem);
// that.bwItemForm = bwitem;
}else{
that.wm_in = '';
that.$message.error("批次号不存在");
}
})
}
}
})
// 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);
// }
}
},
//

View File

@ -25,9 +25,9 @@
</div>
</el-header>
<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-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
hideDelete
id="mlogbwlist"
@ -36,12 +36,16 @@
:addTemplate="addTemplate"
placeholder="暂无数据"
:hideAdd="hideAdd"
:canMultiple = "canMultiple"
@selectChange="selectChange"
@selectAllChange="selectAllChange"
@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">
<span v-if="!scope.row.isEdit&&mode == 'outs'">{{ scope.row.number }}</span>
<el-input v-if="scope.row.isEdit&&mode == 'outs'" v-model="scope.row.number" placeholder="物料编号"></el-input>
<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-select
v-if="scope.row.isEdit&&mode == 'ins'&&route_code!=='niuzhuan'"
v-model="scope.row.wpr"
@ -55,8 +59,7 @@
:key="item.id"
:label="item.number"
:value="item.id"
>
</el-option>
></el-option>
</el-select>
<span v-if="!scope.row.isEdit&&mode == 'ins'">{{ scope.row.number }}</span>
</template>
@ -64,11 +67,11 @@
<el-table-column label="生产设备" min-width="80px" v-if="mode == 'ins'&&route_code=='niuzhuan'">
<template #default="scope">
<el-select
v-if="scope.row.isEdit"
v-model="scope.row.equip"
placeholder="生产设备"
clearable
filterable
:disabled="!scope.row.isEdit"
style="width: 100%"
>
<el-option
@ -77,71 +80,58 @@
:label="item.name"
:value="item.id"
>
<span style="float:left">{{item.name}}</span>
<span style="float:right">{{item.number}}</span>
<span style="float:left">{{item.name}}</span>
<span style="float:right">{{item.number}}</span>
</el-option>
</el-select>
<span v-else>{{ scope.row.equip_name }}</span>
</template>
</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">
<el-date-picker
:disabled="!scope.row.isEdit"
v-if="scope.row.isEdit"
v-model="scope.row.work_start_time"
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
formatter="YYYY-MM-DD"
style="width: 100%;"
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>
</el-table-column>
<el-table-column label="结束时间" min-width="80px" v-if="mode == 'ins'&&route_code=='niuzhuan'">
<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">
<el-table-column prop="note" :label="item.testitem_name" v-for="item in 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'"
v-if="item.testitem_field_type=='input-number'&&scope.row.isEdit&&item.canEdit"
v-model="scope.row[item.testitem_name]"
:disabled="!scope.row.isEdit||!item.canEdit"
class="width-100"
controls-position="right"
@change="defectCountSun(scope.row)"
>
</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]"
:min="0"
:disabled="!scope.row.isEdit||!item.canEdit"
class="width-100"
controls-position="right"
@change="defectCountSun(scope.row)"
>
</el-input-number>
></el-input-number>
<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]"
class="width-100"
:disabled="!scope.row.isEdit||!item.canEdit"
@change="defectCountSun(scope.row)"
>
</el-input>
></el-input>
<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]"
clearable
class="width-100"
:disabled="!scope.row.isEdit||!item.canEdit"
@change="defectCountSun(scope.row)"
>
<el-option
@ -149,16 +139,14 @@
:key="item0"
:label="item0"
:value="item0"
>
</el-option>
></el-option>
</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]"
clearable
multiple
class="width-100"
:disabled="!scope.row.isEdit||!item.canEdit"
@change="defectCountSun(scope.row)"
>
<el-option
@ -166,8 +154,62 @@
:key="item1"
:label="item1"
:value="item1"
>
</el-option>
></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
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>
</template>
</el-table-column>
@ -193,42 +235,36 @@
v-if="scope.row.isEdit"
type="success"
@click="formTableSave(scope.row)"
>保存</el-button
>
>保存</el-button>
<el-button
v-if="scope.row.isEdit&&scope.row.id"
type="danger"
style="margin-left: 5px;"
@click="formTableCancel(scope.row)"
>取消</el-button
>
>取消</el-button>
<el-button
v-if="scope.row.isEdit&&setForm.cd_req_addr!=null"
type="warning"
style="margin-left: 5px;"
@click="getEqData(scope.$index)"
>重取数据</el-button
>
>重取数据</el-button>
<el-button
v-if="!scope.row.isEdit&&(mode=='outs'||route_code=='niuzhuan')"
type="primary"
@click="formTableEdit(scope.row)"
>编辑</el-button
>
>编辑</el-button>
<el-button
v-if="scope.row.isEdit&&!scope.row.id"
type="danger"
style="margin-left: 5px;"
@click="formTableDelet(scope.row)"
>删除</el-button
>
>删除</el-button>
<el-button
v-if="!scope.row.isEdit"
type="danger"
style="margin-left: 5px;"
@click="formTableDel(scope.row.id)"
>删除</el-button
>
>删除</el-button>
</template>
</el-table-column>
</sc-form-table>
@ -276,8 +312,8 @@
:label="item.name"
:value="item.id"
>
<span style="float:left">{{item.name}}</span>
<span style="float:right">{{item.number}}</span>
<span style="float:left">{{item.name}}</span>
<span style="float:right">{{item.number}}</span>
</el-option>
</el-select>
</el-form-item>
@ -298,8 +334,7 @@
:key="item.testitem"
:label="item.testitem_name"
:value="item.testitem"
>
</el-option>
></el-option>
</el-select>
</el-form-item>
</el-col>
@ -319,17 +354,14 @@
v-model="checkAll"
:indeterminate="indeterminate"
@change="handleCheckAll"
>
全部
</el-checkbox>
>全部</el-checkbox>
</template>
<el-option
v-for="item in qct_defects"
:key="item.defect"
:label="item.defect_name"
:value="item.defect"
>
</el-option>
></el-option>
</el-select>
</el-form-item>
</el-col>
@ -374,13 +406,13 @@
<el-table :data="selectWpr" border>
<el-table-column prop="number" label="物料编号"></el-table-column>
<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 label="操作" width="90" align="center" fixed="right">
<template #default="scope">
<el-button type="danger" size="small" @click="selectWprDel(scope.row)">删除</el-button>
</template>
</el-table-column>
<template #default="scope">
<el-button type="danger" size="small" @click="selectWprDel(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<el-footer>
@ -434,6 +466,14 @@ export default {
material_out:{
type:String,
default:"",
},
material_in:{
type:String,
default:"",
},
processType:{
type:String,
default:"",
}
},
// components: {
@ -447,7 +487,7 @@ export default {
ins:'输入物料详情',
outs:'输出物料详情',
},
mode:'ins',
mode:'',
//
form: {
test_user:"",
@ -466,19 +506,21 @@ export default {
route_code:"",
wprInputText:"",
params: {mlogb:'',page:0},
canMultiple:false,
checkAll: false,
hideAdd: true,
visible: false,
setVisible:false,
multipleSet:false,
checkVisible:false,
hasWpr:false,
descriptionVisible:false,
options:[],
qct_defects:[],
qct_testitems:[],
mlogbwlist:[],
testitems:[],
equipmentOptions:[],
process_type:"",
addTemplate:{
mlogb: "",
number: "",
@ -500,6 +542,7 @@ export default {
optionsEq:[],
defectlists:[],
testitemlists:[],
selectWprList:[],
qct_defects_origin:[],
selectWpr:[],
tableHeight:500,
@ -519,40 +562,70 @@ export default {
},
mounted() {
let that = this;
this.route_code = this.$route.path.split("/")[2];
if(this.route_code=='niuzhuan'){
this.getEquipment4();
}
that.route_code = that.$route.path.split("/")[2];
that.hideAdd = that.isSubmit;
if(that.mgroupName=='排一次棒'||that.mgroupName=='排板'){
// that.getNewNumber();
}
that.params.mlogb = that.addTemplate.mlogb = that.mlogb;
that.currentDate = this.$TOOL.dateFormat2(new Date());
that.currentDate = that.$TOOL.dateFormat2(new Date());
},
methods: {
open(mode = "ins",qct = '') {
open(mode = "",qct = '') {
let that = this;
this.mode = mode;
if(that.mode == 'ins'){//
that.getOptions();
this.qct = ""
}else{
this.qct = qct;
if(that.processType=='20'&&that.mode=='outs'){
that.canMultiple = true;
}
that.$API.mtm.mgroup.item.req(that.mgroup).then((res) => {
that.process_type=res.process_type;
if(that.mode == 'outs'&&qct!==''&&qct!==null){//
if(that.mode == 'ins'){
if(that.route_code=='niuzhuan'){
that.gettestitem();
}else{
that.getOptions();
that.getList();
that.qct = ""
}
}else if(that.mode == 'outs'){//
that.qct = qct;
if(qct!==''&&qct!==null){//
that.getdefects();
}else{
that.getList();
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();
})
}
})
this.visible = true;
}
that.visible = true;
setTimeout(() => {
this.tableHeight = document.getElementById('mlogbwMain').clientHeight-20;
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)
}
})
that.getList();
});
},
getNewNumber(){
let that = this;
let date = new Date();
@ -594,19 +667,27 @@ export default {
}else if(num<1000){
num = "0"+num;
}
console.log('num',num);
console.log('data.number:',data.number);
if(this.mgroupName=='排一次棒'){
if(that.mgroupName=='排一次棒'){
that.addTemplate.number = years+months+num;
}
if(that.mgroupName=='排板'){
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() {
let that = this;
that.$API.em.equipment.list.req({page:0,cate__code:"4"}).then((res) => {
that.optionsEq = res;
that.$API.em.equipment.list.req({page:0,cate__code:"4",query:"{id,name,number}"}).then((res) => {
that.optionsEq = res.reverse();
})
},
getEquipments(){
@ -617,45 +698,47 @@ export default {
},
getdefects(){
let that = this;
if(that.qct!==''){
that.$API.qm.qct.item.req(that.qct).then((res) => {
that.qct_defects = [];
res.qct_defects.forEach((item) => {
that.addTemplate[item.defect_name] = false;
let obj = Object.assign({}, item);
obj.canEdit = that.process_type=='20'?false:true;
that.qct_defects.push(obj);
})
that.qct_defects_origin = that.qct_defects;
that.qct_testitems = [];
res.qct_testitems.forEach((item2) => {
let obj2 = Object.assign({}, item2);
obj2.value = '';
obj2.canEdit = that.process_type=='20'?false:true;
obj2.addto_wpr = item2.addto_wpr;
if(item2.testitem_field_type=='input-number'||item2.testitem_field_type=='input-int'){
obj2.value = null;
that.addTemplate[item2.testitem_name] = null;
}
if(item2.testitem_field_type=='select-text'||item2.testitem_field_type=='selects-text'){
let str = obj2.testitem_choices.replace(/'/g, '"');
let arr = JSON.parse(str);
obj2.testitem_choices = arr;
that.addTemplate[item2.testitem_name] = null;
}
that.qct_testitems.push(obj2);
})
that.qct_testitems_origin = that.qct_testitems;
that.getList();
})
}else{
that.getList();
}
that.$API.qm.qct.item.req(that.qct).then((res) => {
that.qct_defects = [];
that.testdefectss(res);
})
},
testdefectss(res){
let that = this;
res.qct_defects.forEach((item) => {
that.addTemplate[item.defect_name] = false;
let obj = Object.assign({}, item);
obj.canEdit = that.processType=='20'?false:true;
that.qct_defects.push(obj);
})
that.qct_defects_origin = that.qct_defects;
that.qct_testitems = [];
res.qct_testitems.forEach((item2) => {
if(item2.testitem_type!=='20'){
let obj2 = Object.assign({}, item2);
obj2.value = '';
obj2.canEdit = that.processType=='20'?false:true;
obj2.addto_wpr = item2.addto_wpr;
if(item2.testitem_field_type=='input-number'||item2.testitem_field_type=='input-int'){
obj2.value = null;
that.addTemplate[item2.testitem_name] = null;
}
if(item2.testitem_field_type=='select-text'||item2.testitem_field_type=='selects-text'){
let str = obj2.testitem_choices.replace(/'/g, '"');
let arr = JSON.parse(str);
obj2.testitem_choices = arr;
that.addTemplate[item2.testitem_name] = null;
}
that.qct_testitems.push(obj2);
}
})
that.qct_testitems_origin = that.qct_testitems;
that.getList();
},
getOptions(){
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;
})
},
@ -695,11 +778,6 @@ export default {
})
that.qct_testitems.forEach((item2) => {
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.note = row.note;
//qct
if(that.qct!==''){
if(that.qct!==''&&that.qct!==null){
that.qct_defects_origin.forEach(item => {
if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){
let str = item.rule_expression.replace(/`/g, '');
@ -727,30 +805,55 @@ export default {
}
});
//
if(row.ftest!==null&&row.ftest!==undefined&&row.ftest!==''){
console.log('已填过');
obj.ftest =row.ftest;
obj.ftest.ftestdefects.forEach((item) => {
item.has = row[item.defect_name];
})
row.ftest.ftestitems.forEach((item1) => {
item1.test_val_json = row[item1.testitem_name];
})
}else{//
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) => {
// if(row.ftest!==null&&row.ftest!==undefined&&row.ftest!==''){
// console.log('');
// obj.ftest =row.ftest;
// obj.ftest.ftestdefects.forEach((item) => {
// item.has = row[item.defect_name];
// })
// row.ftest.ftestitems.forEach((item1) => {
// item1.test_val_json = row[item1.testitem_name];
// })
// }else{//
// 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.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;
if(that.qct_defects.length>0){
that.qct_defects.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);
})
}
if(that.qct_testitems.length>0){
that.qct_testitems.forEach((item1) => {
let itemObj1 = {};
itemObj1.testitem = item1.testitem;
@ -759,13 +862,21 @@ export default {
itemObj1.test_val_json = row[item1.testitem_name];
obj.ftest.ftestitems.push(itemObj1);
})
}
}
// console.log('obj',obj);
if(that.mode == 'ins'&&that.route_code=='niuzhuan'){
obj.equip = row.equip;
obj.work_start_time = row.work_start_time;
obj.work_end_time = row.work_end_time;
}
if(that.mode == 'ins'&&that.route_code=='niuzhuan'&&that.testitems.length>0){
obj.equip = row.equip;
obj.work_start_time = row.work_start_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){
obj.id = row.id;
@ -794,10 +905,17 @@ export default {
});
},
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) {
// console.log('row',row);
this.mlogbwlist[index].isEdit = true;
that.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 index = that.mlogbwlist.indexOf(row);
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){
let str = item.rule_expression.replace(/`/g, '');
str = str.replace(/\${(.*?)}/g, 'row.\$1')
@ -886,7 +1003,7 @@ export default {
},
userChange(val){
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;
})
},
@ -945,7 +1062,8 @@ export default {
},
checkSetting(){
let that = this;
this.$refs.dialogForm.validate((valid) => {
that.isSaveing = true;
that.$refs.dialogForm.validate((valid) => {
if (valid) {
Object.assign(that.setForm,that.form);
that.mlogbwlist.forEach(item => {
@ -996,17 +1114,19 @@ export default {
}
});
that.$API.wpm.mlogbw.update.req("bulk",that.mlogbwlist).then((res) => {
this.form = {};
that.form = {};
that.checkVisible = false;
this.multipleSet = true;
that.multipleSet = true;
that.descriptionVisible = true;
that.qct_defects = [];
that.qct_defects = that.defectlists;
that.qct_testitems = [];
that.qct_testitems = that.testitemlists;
that.tableHeight = document.getElementById('mlogbwMain').clientHeight-80;
that.isSaveing = false;
that.getList();
}).catch((err) => {
that.isSaveing = false;
return err;
});
}
@ -1023,13 +1143,18 @@ export default {
check_set(){
this.wprNumber = "";
this.selectWpr = [];
if(this.selectWprList.length>0){
this.selectWpr = this.selectWprList;
}
this.setVisible=true;
},
//
wprinputChange(){
let that = this;
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);
obj.isEdit = true;
that.mlogbwlist.splice(index,1);
@ -1088,7 +1213,7 @@ export default {
},
saveSetting(){
let that = this;
this.$refs.dialogForm.validate((valid) => {
that.$refs.dialogForm.validate((valid) => {
if (valid) {
that.selectWpr.forEach(item => {
item.ftest.ftestdefects.forEach(defect => {

View File

@ -201,6 +201,8 @@
:process="process"
:mtask="mtask"
:dept = "deptId"
:mgroup="mgroupId"
:processType="processType"
@closed="detailClose"
>
</detail-drawer>
@ -241,6 +243,10 @@ export default {
default: "",
},
mgroupMtype: {
type: Number,
default: 10,
},
processType: {
type: String,
default: "",
}
@ -267,6 +273,7 @@ export default {
selection: [],
mtask: "",
mlogId: "",
mgroup_name: "",
route_code: "",
equipmentId: "",
showHidden:false,
@ -276,6 +283,7 @@ export default {
mgroupName: {
handler: function (newval,odlval) {
let that = this;
that.mgroup_name = newval;
that.params.mgroup = "";
that.apiObj = null;
that.getMgroupInfo();

View File

@ -91,6 +91,7 @@
v-model="form.count_notok"
style="width: 100%"
:precision="0"
disabled
@change="handleCountNotokChange"
></el-input-number>
</el-form-item>
@ -269,17 +270,25 @@ export default {
},
getdefects(){
let that = this;
that.$API.qm.qct.list.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;
})
}
that.$API.qm.qct.getQct.req({ material: that.itemObj.material,type:'out',tag:'process' }).then((res) => {
console.log(res)
that.qct = res.id;
res.qct_defects.forEach((item) => {
that.form[item.defect_name] = 0;
})
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() {

View File

@ -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>

View File

@ -43,13 +43,13 @@
<scTable
stripe
ref="table"
:data="tableData"
:apiObj="apiObj"
:params="params"
row-key="id"
hideDo
@row-click="table_detail"
>
<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">
<template #default="scope">
<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>
</template>
</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_real"></el-table-column>
<el-table-column label="加工前不良" prop="count_pn_jgqbl"></el-table-column>
@ -96,32 +97,6 @@
</el-table-column>
</scTable>
</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
v-if="dialog.save"
ref="saveDialogs"
@ -195,7 +170,6 @@ export default {
mgroup:''
},
params: {
page: 0,
fmlog: "",
},
fmlogItem: {},
@ -266,7 +240,6 @@ export default {
that.material_out = that.material_out;
that.paramsWm.mgroup = res.mgroup;
that.apiObjWm = that.$API.wpm.wmaterial.list;
that.getMlogs();
});
},
getMlogs(){
@ -312,7 +285,7 @@ export default {
that.isSaveing = true;
that.$API.wpm.mlog.submit.req(row.id).then((res) => {
that.isSaveing = false;
that.getMlogs();
that.$refs.table.refresh();
that.$message.success("操作成功");
});
},
@ -327,7 +300,7 @@ export default {
if (res.err_msg) {
that.$message.error(res.err_msg);
} else {
that.getMlogs();
that.$refs.table.refresh();
that.$message.success("撤回成功");
}
});
@ -344,17 +317,17 @@ export default {
if (res.err_msg) {
that.$message.error(res.err_msg);
} else {
that.getMlogs();
that.$refs.table.refresh();
that.$message.success("删除成功");
}
});
});
},
handleSaveSuccess() {
this.getMlogs();
this.$refs.table.refresh();
},
handleCheckSuccess() {
this.getMlogs();
this.$refs.table.refresh();
},
fileUPSuccess(res) {
console.log('res',res);

View File

@ -148,6 +148,20 @@
prop="recive_user_name"
width="80"
></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
label="备注"
prop="note"
@ -178,14 +192,14 @@
size="small"
@click="table_receive(scope.row)"
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
link
size="small"
@click="table_reBack(scope.row)"
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
link
@ -210,7 +224,7 @@
type="primary"
v-if="
(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
>
@ -218,7 +232,7 @@
title="确定删除吗?"
v-if="
(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)"
>
@ -290,6 +304,7 @@
<script>
import saveDialog from "./handover_form.vue";
import print from "./../setting/print/A4.vue";
import { actStateEnum } from "@/utils/enum.js";
export default {
props: {
deptId: {
@ -323,6 +338,7 @@ export default {
},
data() {
return {
actStateEnum,
apiObj: null,
dialog: {
@ -361,6 +377,7 @@ export default {
{ required: true, message: "请选择接收工段", trigger: "blur" },
],
},
route_code: "",
// setNameVisible: false,
};
},
@ -372,6 +389,7 @@ export default {
that.apiObj = that.$API.wpm.handover.list;
that.$refs.table.refresh();
that.getMgroupOptions();
that.route_code = that.$route.path.split("/")[2];
},
methods: {
//

View File

@ -131,7 +131,7 @@
placeholder="接收工段"
clearable
style="width: 100%"
:disabled="type==40"
:disabled="type==40||mode!=='add'"
@change="getUserList2"
>
<el-option
@ -161,7 +161,7 @@
</el-select>
</el-form-item>
</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-switch v-model="change_batch"></el-switch>
</el-form-item>
@ -171,15 +171,39 @@
<el-input v-model="form.note" placeholder="处理备注"></el-input>
</el-form-item>
</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-input v-model="form.new_batch" placeholder="新批次号"></el-input>
</el-form-item>
</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-form>
<el-footer v-if="mode!=='show'">
<el-button type="primary" v-loading="isSaveing" @click="submit">确定</el-button>
<el-footer v-show="mode!=='show'">
<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-footer>
</el-dialog>
@ -236,12 +260,15 @@ export default {
recive_user: null,
recive_mgroup: null,
handoverb:[],
ticket:null
},
initForm:{},
selectObjIds:[],
apiObjM:null,
paramsM:{},
selectObj:{},
selectObjs:[],
transitions:[],
rules: {
batch: [
{
@ -294,7 +321,9 @@ export default {
listParams:{},
totalCount: 0,
deptID:'',
route_code:'',
codeText: "",
fileList:[],
userList: [],
userList2: [],
mgroupOptions: [],
@ -314,8 +343,10 @@ export default {
that.materialObj = materialObj;
that.form.handle_date = that.form.send_date = this.$TOOL.dateFormat2(new Date());
that.form.send_mgroup = that.mgroupId;
that.route_code = that.$route.path.split("/")[2];
//type 10: 20: 40:
//mtype 10: 20: 30:
//state 10:;20:;30:;34:;40:;50:
//
if(that.type==20&&that.mgroupName=='废品库'){//
that.getCkUserList();
@ -326,20 +357,16 @@ export default {
//
if(that.type==20&&that.mgroupName!=='废品库'){
//
// that.getMaterialRework();
that.paramsM = {mgroup: that.mgroupId,page: 0,state__in:'20,34',tag : 'done'};
}else if(that.type==20&&that.mgroupName=='废品库'){
//
// that.getMaterialFP();
that.paramsM = {page: 0,state : 50,state_all: 1};
}else if(that.type==40){
//
// that.getMaterialNotok();
that.paramsM = {mgroupx: that.mgroupId,page: 0,state:20};
}else{
//
that.paramsM = {mgroup: that.mgroupId,page: 0,state:10,tag : 'done'};
// that.getMaterial();
}
that.apiObjM = this.$API.wpm.wmaterial.list;
if(that.type==40||that.type==20){
@ -347,8 +374,26 @@ export default {
}else{
that.getMgroupOptions();
}
if(that.route_code=='tuihuo'){
that.getInit();
}
},
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() {
let that = this;
@ -499,6 +544,66 @@ export default {
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() {
let that = this;

171
src/views/wpm_gx/helpso.vue Normal file
View File

@ -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>

View File

@ -54,13 +54,27 @@
:processId="processId"
:mgroupcode="mgroup_code"
></inmOut>
<record v-else
<record v-else-if="values == '出入库记录'"
:mgroupId="mgroupId"
:deptId = "mgroupDept"
:mgroupName="mgroupName"
:processId="processId"
:mgroupcode="mgroup_code"
></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-container>
</template>
@ -71,14 +85,16 @@ import mlogs from "./mlogs.vue";
import mtask from "./mtask.vue";
import handover from "./handover.vue";
import record from "./inmrecord.vue";
import check from "./checkrecord.vue";
import helpso from "./helpso.vue";
export default {
name: "bx",
components: { inm, inmOut,mlogs, mtask, handover,record },
components: { inm, inmOut,mlogs, mtask, handover,record,helpso,check },
data() {
return {
mgroups:[],
tableHieght: 200,
options: ["日志", "交接记录", "来料未完成","出料已完成","出入库记录"],
options: ["日志", "交接记录", "来料未完成","出料已完成","出入库记录",'辅料'],
values: "日志",
mgroupName: "",
mgroupId: "",
@ -124,6 +140,9 @@ export default {
that.mgroupMtype = res[0].mtype;
that.processtype = res[0].process_type;
that.mgroupDept = res[0].belong_dept;
if(that.mgroupName=='黑化'){
that.options.push("检验记录")
}
that.componentsShow = true;
});
},

View File

@ -63,13 +63,20 @@
:processId="processId"
:mgroupcode="mgroup_code"
></inmOut>
<record v-else
<record v-else-if="values == '出入库记录'"
:mgroupId="mgroupId"
:deptId = "mgroupDept"
:mgroupName="mgroupName"
:processId="processId"
:mgroupcode="mgroup_code"
></record>
<helpso v-else-if="values == '辅料'"
:mgroupId="mgroupId"
:deptId = "mgroupDept"
:mgroupName="mgroupName"
:processId="processId"
:mgroupcode="mgroup_code"
></helpso>
</el-main>
</el-container>
</template>
@ -81,15 +88,16 @@ import mtask from "./mtask.vue";
import handover from "./handover.vue";
import record from "./inmrecord.vue";
import mlogsList from "./mlogs.vue";
import helpso from "./helpso.vue";
export default {
name: "bx",
components: { inm, inmOut,mlogs, mtask, handover,record,mlogsList },
components: { inm, inmOut,mlogs, mtask, handover,record,mlogsList,helpso },
data() {
return {
mgroups:[],
tableHieght: 200,
options: ["日志", "日志记录","交接记录", "来料未完成","出料已完成","出入库记录"],
options: ["日志", "日志记录","交接记录", "来料未完成","出料已完成","出入库记录",'辅料'],
values: "日志",
mgroupName: "",
mgroupId: "",

View File

@ -11,7 +11,7 @@
</div>
<div class="right-panel">
<el-select
v-model="query.state"
v-model="queryState"
placeholder="物料状态"
clearable
@change="searchStateChange"
@ -114,14 +114,14 @@
@click="table_Check(scope.row)"
v-auth="'ftestwork.create'"
type="primary"
v-if="scope.row.defect_name == null"
v-if="scope.row.mgroup_name == '黑化'&&scope.row.state == 10"
>检验
</el-button>
<el-button
link size="small"
type="warning"
@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 @click="printMaterial(scope.row)" type="text">物料标签</el-button>
@ -259,7 +259,8 @@ export default {
tableData: [],
selection: [],
stateOptions:[
{ value: 10, name: "合格"},
{ value: 100, name: "完全合格"},
{ value: 101, name: "合格B类"},
{ value: 20, name: "不合格"},
{ value: 30, name: "返工"},
],
@ -267,6 +268,7 @@ export default {
search: "",
material: "",
},
queryState:null,
cate_type:'',
materialType: "wm",
changebatch:false,
@ -301,6 +303,27 @@ export default {
this.$refs.table_wm.queryData(this.queryWm);
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) {
let that = this;
that.cate_type=type;

View File

@ -135,8 +135,9 @@
icon="el-icon-plus"
@click="table_add"
></el-button>
<scScanner @scanResult="codeTextChange"></scScanner>
<scScanner v-if="cate=='do_in'|| cate=='do_out'" @scanResult="codeTextChange"></scScanner>
<el-input
v-if="cate=='do_in'|| cate=='do_out'"
ref="codeInput"
v-model="codeText"
clearable
@ -260,7 +261,7 @@
</div>
</template>
</el-table-column>
<el-table-column label="不合格数量" prop="count_notok">
<el-table-column label="备注" prop="note">
</el-table-column>
<el-table-column
label="创建时间"
@ -268,7 +269,7 @@
show-overflow-tooltip
>
</el-table-column>
<el-table-column width="90">
<el-table-column width="90" v-if="cate=='do_in'|| cate=='do_out'">
<template #default="scope">
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
</template>
@ -337,7 +338,12 @@ export default {
mio_user: "",
},
stateDict: {10: "创建中",20: "已提交",},
typeDict:{'do_in':'生产入库','do_out':'生产领料'},
typeDict:{
'do_in':'生产入库',
'do_out':'生产领料',
'borrow_out': "领用出库",
'return_in': "退还入库"
},
apiworkerObj: null,
materials: [],
apiObj: null,
@ -379,6 +385,12 @@ export default {
open(mode) {
this.mode = mode;
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;
},
setData(data,type) {
@ -413,6 +425,7 @@ export default {
//
getDeptUsers() {
let that = this;
that.userList = [];
let userInfo = that.$TOOL.data.get("USER_INFO");
that.$API.system.user.list.req({ depts: that.deptId, page: 0 }).then((res) => {
that.userOptions = res;

View File

@ -12,182 +12,273 @@
:rules="rules"
label-width="120px"
>
<el-form-item label="物料" v-if="cate == 'do_out'">
<el-select
v-model="form.material"
value-key="id"
clearable
filterable
style="width: 100%"
@change="selectMaterialChange"
>
<el-option
v-for="item in materialOptions"
:key="item.id"
:label="item.full_name"
:value="item.id"
<template v-if="cate == 'do_in'||cate == 'do_out'">
<el-form-item label="物料" v-if="cate == 'do_out'">
<el-select
v-model="form.material"
value-key="id"
clearable
filterable
style="width: 100%"
@change="selectMaterialChange"
>
<span style="float: left">{{ item.full_name }}</span>
<span
style="
float: right;
color: '#E6A23C';
font-size: 13px;
"
v-if="item.is_hidden"
></span
<el-option
v-for="item in materialOptions"
:key="item.id"
:label="item.full_name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="批次选择" v-else>
<el-select
v-model="selectBatch"
filterable
value-key="id"
style="width: 100%;"
multiple
@change="selectwmChange"
>
<el-option
v-for="item in wbatchOptions"
:key="item.id"
:label="item.batch"
:value="item.id"
>
<span style="display:inline-block;float: left;">{{item.material_.name}}|{{ item.batch }}</span>
<span v-if="item.defect_name!==null" style="display:inline-block;float: left;color: orangered;">{{ item.defect_name }}</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="批次扫描" v-if="cate == 'do_in'">
<scScanner @scanResult="codeTextChange"></scScanner>
<el-input
ref="codeInput"
v-model="codeText"
clearable
placeholder="物料扫码"
style="width:150px;margin-left: 4px;"
@keyup.enter="codeTextChange(codeText)"
></el-input>
</el-form-item>
<el-form-item label="批次" v-if="cate == 'do_out'">
<el-select
v-model="selectBatch"
value-key="id"
clearable
filterable
multiple
@change="selectBatchChange"
@clear="selectBatchClear"
style="width: 60%;"
>
<el-option
v-for="item in batchOptions"
:key="item.id"
:label="item.batch"
:value="item.id"
>
<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>
<scScanner @scanResult="codeTextChange"></scScanner>
<el-input
ref="codeInput"
v-model="codeText"
clearable
placeholder="物料扫码"
style="width:150px;margin-left: 4px;"
@keyup.enter="codeTextChange(codeText)"
></el-input>
</el-form-item>
<template v-if="cate == 'do_out'&&mode == 'add'">
<el-row v-for="item in selectList" :key="item.mb">
<el-col :span="12">
<el-form-item label="批次号">
<el-input v-model="item.batch" disabled />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="仓库" label-width="60px">
<el-select
v-model="item.warehouse"
disabled
style="width: 100%"
<span style="float: left">{{ item.full_name }}</span>
<span
style="
float: right;
color: '#E6A23C';
font-size: 13px;
"
v-if="item.is_hidden"
></span
>
<el-option
v-for="item in warehouseOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="数量" label-width="60px">
<el-input v-model="item.count" disabled />
</el-form-item>
</el-col>
</el-row>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="批次选择" v-else>
<el-select
v-model="selectBatch"
filterable
value-key="id"
style="width: 100%;"
multiple
@change="selectwmChange"
>
<el-option
v-for="item in wbatchOptions"
:key="item.id"
:label="item.batch"
:value="item.id"
>
<span style="display:inline-block;float: left;">{{item.material_.name}}|{{ item.batch }}</span>
<span v-if="item.defect_name!==null" style="display:inline-block;float: left;color: orangered;">{{ item.defect_name }}</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="批次扫描" v-if="cate == 'do_in'">
<scScanner @scanResult="codeTextChange"></scScanner>
<el-input
ref="codeInput"
v-model="codeText"
clearable
placeholder="物料扫码"
style="width:150px;margin-left: 4px;"
@keyup.enter="codeTextChange(codeText)"
></el-input>
</el-form-item>
<el-form-item label="批次" v-if="cate == 'do_out'">
<el-select
v-model="selectBatch"
value-key="id"
clearable
filterable
multiple
@change="selectBatchChange"
@clear="selectBatchClear"
style="width: 60%;"
>
<el-option
v-for="item in batchOptions"
:key="item.id"
:label="item.batch"
:value="item.id"
>
<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>
<scScanner @scanResult="codeTextChange"></scScanner>
<el-input
ref="codeInput"
v-model="codeText"
clearable
placeholder="物料扫码"
style="width:150px;margin-left: 4px;"
@keyup.enter="codeTextChange(codeText)"
></el-input>
</el-form-item>
<template v-if="cate == 'do_out'&&mode == 'add'">
<el-row v-for="item in selectList" :key="item.mb">
<el-col :span="12">
<el-form-item label="批次号">
<el-input v-model="item.batch" disabled />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="仓库" label-width="60px">
<el-select
v-model="item.warehouse"
disabled
style="width: 100%"
>
<el-option
v-for="item in warehouseOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="数量" label-width="60px">
<el-input v-model="item.count" disabled />
</el-form-item>
</el-col>
</el-row>
</template>
<template v-if="cate == 'do_in'&&mode == 'add'">
<el-row v-for="item in selectList" :key="item.mb">
<el-col :span="12">
<el-form-item label="批次号">
<el-input v-model="item.batch" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="数量" label-width="60px">
<el-input v-model="item.count" disabled />
</el-form-item>
</el-col>
</el-row>
</template>
<el-form-item label="仓库" prop="warehouse" v-if="(cate == 'do_in'&&mode == 'add')||mode == 'edit'" >
<el-select
v-model="form.warehouse"
clearable
style="width: 100%"
>
<el-option
v-for="item in warehouseOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="数量" v-if="mode == 'edit'">
<el-input-number
v-model="form.count"
:min="0"
:precision="0"
style="width: 100%"
/>
</el-form-item>
</template>
<template v-if="cate == 'do_in'&&mode == 'add'">
<el-row v-for="item in selectList" :key="item.mb">
<el-col :span="12">
<el-form-item label="批次号">
<el-input v-model="item.batch" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="数量" label-width="60px">
<el-input v-model="item.count" disabled />
</el-form-item>
</el-col>
</el-row>
<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-item label="仓库" prop="warehouse" v-if="(cate == 'do_in'&&mode == 'add')||mode == 'edit'" >
<el-select
v-model="form.warehouse"
clearable
style="width: 100%"
>
<el-option
v-for="item in warehouseOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="数量" v-if="mode == 'edit'">
<el-input-number
v-model="form.count"
:min="0"
:precision="0"
style="width: 100%"
/>
</el-form-item>
</el-form>
<template #footer>
<el-button type="primary" :loading="isSaveing" @click="submit">
保存
</el-button>
<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 @click="visible = false">取消</el-button>
</template>
</el-dialog>
@ -213,6 +304,8 @@ export default {
titleMap: {
do_out: "生产领料",
do_in: "生产入库",
borrow_out: "领用出库",
return_in: "退还入库",
},
form: {},
rules: {
@ -232,6 +325,9 @@ export default {
selectMaterial: null,
selectBatch: null,
wbatchOptions: [],//
selectObj: {},
query: {},
apiObj:this.$API.mtm.material.list,
};
},
mounted() {
@ -241,7 +337,7 @@ export default {
this.inputBatchDisable = true;
this.getMaterialOptions();
this.getBatchOptions();
}else{//----
}else if(this.cate == 'do_in'||this.cate == 'return_in'){//----
this.getMgroupWmaterial();
}
this.getWarehouseOptions();
@ -249,8 +345,17 @@ export default {
methods: {
//
getWarehouseOptions() {
let that = this;
this.$API.inm.warehouse.list.req({ page: 0 }).then((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() {
let that = this;
let obj = {};
obj.state = 10;
if(that.cate== 'do_in'){
obj.state = 10;
obj.material__process= that.process;
}else if(that.cate== 'return_in'){
obj.material__type = 40;
}
obj.page= 0;
obj.mgroupx= that.mgroupId;
obj.material__process= that.process;
if (that.mgroupId != null &&that.mgroupId != undefined &&that.mgroupId != "") {
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
that.wbatchOptions = res;
@ -358,6 +467,14 @@ export default {
selectMaterialChange() {
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) {
for (var i = 0; i < options.length; i++) {
if (options[i].id == id) {
@ -367,10 +484,8 @@ export default {
},
selectBatchChange() {
let that = this;
console.log('selectBatch',that.selectBatch);
that.selectList = [];
that.batchOptions.forEach((item) => {
console.log('indexOfselectBatch',that.selectBatch.indexOf(item.id));
if(that.mode == "add"){//
if(that.selectBatch.indexOf(item.id)>-1){
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){
let that = this;
@ -416,6 +558,7 @@ export default {
},
selectBatchClear() {
this.form.batch = "";
this.form.count =0;
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) {
Object.assign(this.form, data);

View File

@ -4,23 +4,18 @@
<div class="left-panel">
<el-button type="primary" @click="tomio('do_out')" v-auth="'mio.do'"
v-if="mgroupName!=='size'&&mgroupName!=='facade'"
>领料</el-button
>
<el-button type="primary" @click="tomio('do_in')" v-auth="'mio.do'"
>入库</el-button
>
>领料</el-button>
<el-button type="primary" @click="tomio('do_in')" v-auth="'mio.do'">入库</el-button>
<!-- <el-button
type="primary"
@click="add('do_out')"
@click="tomio('borrow_out')"
v-auth="'mio.do'"
>生产领料</el-button
>
>领用出库</el-button> -->
<el-button
type="primary"
@click="add('do_in')"
@click="tomio('return_in')"
v-auth="'mio.do'"
>生产入库</el-button
> -->
>退还入库</el-button>
<el-select
v-model="query.type"
clearable
@ -208,10 +203,14 @@ export default {
typeDict: {
do_out: "生产领料",
do_in: "生产入库",
borrow_out: "领用出库",
return_in: "退还入库",
},
cateOptions: [
{ id: "do_out", name: "生产领料" },
{ id: "do_in", name: "生产入库" },
{ id: "borrow_out", name: "领用出库" },
{ id: "return_in", name: "退还入库" },
],
dialog: {
save: false,
@ -219,7 +218,7 @@ export default {
},
query: {},
params: {
type__in: "do_out,do_in",
type__in: "do_out,do_in,borrow_out,return_in",
mgroup:""
},
form: {},

View File

@ -48,17 +48,14 @@
<el-descriptions-item label="结束时间">{{
mlogItem.work_end_time
}}</el-descriptions-item>
<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-descriptions-item label="检验表单" v-if="mlogItem.mgroup_name=='黑化'">
<el-link :href="mlogItem.test_file" target="_blank" type="primary" :underline="false">{{mlogItem.test_file}}</el-link>
</el-descriptions-item>
</el-descriptions>
<div style="padding: 5px 10px;display: flex;justify-content: end;">
<el-button
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"
style="margin-right: 10px;"
v-auth="'mlog.update'"
@ -67,18 +64,11 @@
</el-button>
<el-button
type="primary"
v-if="mlogItem.mgroup_name!='退火'&&mlogItem.submit_time == null"
v-if="mlogItem.submit_time == null"
:loading="isSaveing"
@click="mlogSubmit"
>提交</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>
</el-card>
<!-- 输入物料 -->
@ -142,13 +132,13 @@
link
type="primary"
@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
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"
@click="table_in_del(scope.row)"
>
@ -302,7 +292,7 @@
<el-button
link
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)"
>
检验
@ -311,30 +301,6 @@
</el-table-column>
</scTable>
</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
v-if="dialog.save"
ref="saveDialog"
@ -374,90 +340,6 @@
@closed="dialog.edit = false"
>
</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">
<print :baseData="mlogItem" :tableData="tableData" :tableData2="tableData2" type="102" @closePrint="printVisible=false"/>
</el-dialog>
@ -535,14 +417,6 @@ export default {
count_use: 0,
count_pn_jgqbl: 0,
},
oinfo_json:{
退火炉号:'',
退火时间:'',
退火温度:'',
抽检结果:'',
抽检数:'',
强度落球:'',
},
act_states: {
0: "草稿中",
1: "进行中",
@ -568,7 +442,7 @@ export default {
mlogbdefect:[],
mlogboutdefect:[],
saveInDialog: false,
ticketDialog:false,
// ticketDialog:false,
printVisible:false,
setFiltersVisible: false,
rules: {
@ -593,7 +467,7 @@ export default {
this.paramsIn.mlog = this.mlogId;
this.paramsOut.mlog = this.mlogId;
this.apiObj = this.$API.wpm.mlogb.list;
this.getInit();
// this.getInit();
that.$API.wpm.mlogb.list.req(that.paramsIn).then((res) => {
that.tableData = res;
})
@ -632,7 +506,6 @@ export default {
})
});
},
getdefects(){
let that = this;
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() {
let that = this;
@ -661,7 +533,6 @@ export default {
that.saveInForm.count_pn_jgqbl += that.defectinform[item.defect_name];
}
})
// that.countCellChanges();
},
//
setData(data) {
@ -675,9 +546,6 @@ export default {
this.$refs.editDialog.open("edit").setData(this.mlogItem);
});
},
// mlogUpdate(data) {
// this.$refs.editDialog.open().setData(data);
// },
table_add() {
this.dialog.save = true;
this.$nextTick(() => {
@ -698,7 +566,6 @@ export default {
that.saveInDialog = true;
}
},
//
saveInSubmit() {
let that = this;
@ -752,7 +619,6 @@ export default {
that.$refs.checkDialog.open(obj);
});
},
//
mlogSubmit() {
let that = this;
@ -762,50 +628,35 @@ export default {
that.$message.success("操作成功");
});
},
//
getInit() {
let that = this;
that.$API.wf.workflow.initkey.req(" backfire").then((res) => {
that.initForm = res;
});
},
//退
createTicket(){
if(this.mlogItem.work_end_time==null){
this.$message.error("请先编辑日志并选择结束时间");
}else{
let sum = 0;
this.mlogItem.reminder_interval_list.forEach(item => {
sum+=item;
});
this.oinfo_json.退火时间 = sum;
this.oinfo_json.退火炉号 =this.mlogItem.equipment_name!==null?this.mlogItem.equipment_name.split("|")[0]:'';
this.ticketDialog = true;
}
},
//退,
submitTicketCreate(id) {
let that = this;
let obj = {};
obj.oinfo_json = that.oinfo_json;
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;
});
});
},
// //
// getInit() {
// let that = this;
// that.$API.wf.workflow.initkey.req(" backfire").then((res) => {
// that.initForm = res;
// });
// },
// //退,
// submitTicketCreate(id) {
// let that = this;
// let obj = {};
// 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){
this.codeText = codeText;
this.dialog.save = true;

View File

@ -113,9 +113,7 @@
></el-table-column>
<el-table-column label="审批单号">
<template #default="scope">
<el-icon v-if="scope.row.ticket !== null" color="green">
{{ scope.row.ticket_.sn }}
</el-icon>
<span v-if="scope.row.ticket_!==null">{{ scope.row.ticket_.sn }}</span>
</template>
</el-table-column>
<el-table-column
@ -145,19 +143,19 @@
size="small"
v-auth="'mlog.delete'"
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)"
>删除</el-button>
<el-button
link
v-else
v-if="scope.row.ticket== null&&scope.row.submit_time !== null"
size="small"
type="danger"
@click.stop="mlogRevert(scope.row)"
>撤回</el-button>
<el-button
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"
type="danger"
@click.stop="mlogWf(scope.row)"
@ -336,13 +334,21 @@ export default {
});
},
mlogWf(row){
this.$confirm(`确定撤回该日志审批吗?`, "提示", {
type: "warning",
}).then(() => {
this.$API.wf.ticket.ticketRetreat.req(row.ticket).then(res=>{
that.$refs.table.refresh();
let that = this;
if(that.userId!==row.ticket_.create_by){
this.$confirm(`需要日志提交人撤回该日志`, "提示", {
type: "warning",
}).then(() => {})
}else{
this.$confirm(`确定撤回该日志审批吗?`, "提示", {
type: "warning",
}).then(() => {
this.$API.wf.ticket.ticketRetreat.req(row.ticket).then(res=>{
that.$refs.table.refresh();
})
})
})
}
},
customMethod(row,index){
let color = '',context = '';