Merge remote-tracking branch 'origin/master'

yangwl
Yangwl 3 months ago
commit 7297fc8f30

@ -46,12 +46,14 @@
"highlight.js": "9.18.5",
"js-beautify": "1.13.0",
"js-cookie": "3.0.1",
"jsbarcode": "^3.11.6",
"jsencrypt": "3.0.0-rc.1",
"less": "^3.9.0",
"less-loader": "^5.0.0",
"moment": "^2.29.4",
"nprogress": "0.2.0",
"print-js": "^1.6.0",
"qrcode": "^1.5.4",
"quill": "1.3.7",
"screenfull": "5.0.2",
"sortablejs": "1.10.2",
@ -62,6 +64,7 @@
"vue-cropper": "0.5.5",
"vue-meta": "2.4.0",
"vue-router": "3.4.9",
"vue-seamless-scroll": "^1.1.23",
"vuedraggable": "2.24.3",
"vuex": "3.6.0",
"xlsx": "^0.17.0"

@ -80,9 +80,9 @@ export function queryEquFaultTypeTree(query) {
}
// 维修工单检验
export function subInspect(data) {
export function checkRepairWorkOrder(data) {
return request({
url: '/device/repairOrder/subInspect',
url: '/device/repairOrder/checkRepairWorkOrder',
method: 'post',
data: data
});

@ -101,3 +101,43 @@ export function getDLTableCPKInfo(query) {
params: query
});
}
export function getTableHzTitle(query) {
return request({
url: '/quality/staticTable/getTableHzTitle',
method: 'get',
params: query
});
}
//巡检缺陷不良率表头
export function getTableHzTitleTh(query) {
return request({
url: '/quality/staticTable/getTableHzTitle',
method: 'post',
data: query
});
}
//巡检缺陷不良率表体
export function getTableHzData(query) {
return request({
url: '/quality/staticTable/getTableHzData',
method: 'post',
data: query
});
}
//巡检不良占比分析报表
export function getTableHzNoOkData(query) {
return request({
url: '/quality/staticTable/getTableHzNoOkData',
method: 'post',
data: query
});
}
// 获取头部统计维度年月日
export function getDictData(data) {
return request({
url: '/quality/qcInterface/getDictData',
method: 'get',
params: data
});
}

@ -9,6 +9,15 @@ export function listData(query) {
})
}
// 查询字典数据列表无分页,可筛选
export function getDictData(query) {
return request({
url: '/system/dict/data/getDictData',
method: 'get',
params: query
})
}
// 查询字典数据详细
export function getData(dictCode) {
return request({

@ -46,6 +46,8 @@ import dataV from '@jiaminghi/data-view'
// 打印插件
import Print from 'print-js'
import VScaleScreen from 'v-scale-screen'
// 滚动
import VueSeamlessScroll from 'vue-seamless-scroll'
// 全局方法挂载
@ -71,6 +73,7 @@ Vue.component('ImageUpload', ImageUpload)
Vue.component('ImagePreview', ImagePreview)
Vue.use(VScaleScreen)
Vue.use(VueSeamlessScroll)
Vue.use(directive)
Vue.use(plugins)
Vue.use(VueMeta)

@ -6,7 +6,7 @@
size="small"
:inline="true"
v-show="showSearch"
label-width="88px"
label-width="100px"
>
<el-form-item label="报修单号" prop="orderCode">
<el-input
@ -17,6 +17,48 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核状态" prop="orderStatus">
<el-select
v-model="queryParams.orderStatus"
style="width: 200px"
clearable
>
<el-option
v-for="dict in dict.type.device_audit_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="报修来源" prop="orderSource">
<el-select
v-model="queryParams.orderSource"
style="width: 200px"
clearable
>
<el-option
v-for="dict in dict.type.device_order_source"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="报修去向" prop="repairDestination">
<el-select
v-model="queryParams.repairDestination"
style="width: 200px"
clearable
>
<el-option
v-for="dict in dict.type.device_repair_destination"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="设备编码" prop="equipmentCode">
<el-input
v-model="queryParams.equipmentCode"
@ -29,6 +71,7 @@
<el-form-item label="故障时间" prop="orderBreakdownTime">
<el-date-picker
v-model="queryParams.orderBreakdownTimeArray"
style="width: 510px"
type="daterange"
align="right"
unlink-panels
@ -40,24 +83,20 @@
>
</el-date-picker>
</el-form-item>
<el-form-item label="报修来源" prop="orderSource">
<el-select
v-model="queryParams.orderSource"
style="width: 150px"
<el-form-item label="报修人工号" prop="orderRepairmanCode">
<el-input
v-model="queryParams.orderRepairmanCode"
placeholder="请输入报修人工号"
style="width: 200px"
clearable
>
<el-option
v-for="dict in dict.type.device_order_source"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="报修人编号" prop="orderRepairmanCode">
<el-form-item label="报修人名称" prop="orderRepairmanName">
<el-input
v-model="queryParams.orderRepairmanCode"
placeholder="请输入报修人编号"
v-model="queryParams.orderRepairmanName"
placeholder="请输入报修人名称"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
@ -184,7 +223,8 @@
label="报修单号"
align="center"
prop="orderCode"
width="200"
width="220"
:show-overflow-tooltip="true"
fixed
>
<template slot-scope="scope">
@ -196,10 +236,18 @@
>
</template>
</el-table-column>
<el-table-column
label="处理状态"
label="审核状态"
align="center"
prop="orderStatus" />
prop="orderStatus">
<template slot-scope="scope">
<dict-tag
:options="dict.type.device_audit_status"
:value="scope.row.orderStatus"
/>
</template>
</el-table-column>
<el-table-column
label="报修来源"
align="center"
@ -214,7 +262,8 @@
label="设备编码"
align="center"
prop="equipmentCode"
width="100"
:show-overflow-tooltip="true"
width="120"
/>
<el-table-column
label="故障描述"
@ -330,7 +379,7 @@
append-to-body
v-if="openCheck"
>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-tabs type="border-card">
<el-tab-pane label="基本信息">
<el-descriptions
@ -443,16 +492,15 @@
<el-col :span="24">
<el-form-item label="报修去向" prop="repairDestination">
<el-radio-group v-model="form.repairDestination">
<el-radio label="计划性维修">计划性维修</el-radio>
<el-radio label="计划性维修" @click.native="timeBackFillingReset">计划性维修</el-radio>
<el-radio label="立即维修" @click.native="timeBackFilling">立即维修</el-radio>
<el-radio label="不维修">不维修</el-radio>
<el-radio label="委外维修">委外维修</el-radio>
<el-radio label="立即维修" @click.native="timeBackFilling"
>立即维修</el-radio
>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" v-if="form.repairDestination == '计划性维修'">
<el-form-item prop="workTeam" label="维修组">
@ -486,12 +534,13 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" v-if="form.repairDestination == '计划性维修'">
<el-form-item label="是否停机维修" prop="workDownMachine">
<el-radio-group v-model="form.workDownMachine">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
<el-radio label="0" @click.native="monitorRadio"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
@ -569,17 +618,11 @@
<el-form-item label="是否停机维修" prop="workDownMachine">
<el-radio-group v-model="form.workDownMachine">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
<el-radio label="0" @click.native="monitorRadio"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col
:span="8"
v-if="
form.repairDestination == '立即维修' &&
form.workDownMachine == '1'
"
>
<el-col :span="8" v-if=" form.repairDestination == '立即维修' && form.workDownMachine == '1'">
<el-form-item prop="workPlanDownTime" label="计划停机时间">
<el-date-picker
clearable
@ -591,13 +634,7 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span="8"
v-if="
form.repairDestination == '立即维修' &&
form.workDownMachine == '0'
"
>
<el-col :span="8" v-if="form.repairDestination == '立即维修' && form.workDownMachine == '0'">
<el-form-item prop="workPlanDownTime" label="计划停机时间">
<el-date-picker
clearable
@ -609,6 +646,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" v-if="form.repairDestination == '委外维修'">
<el-form-item prop="workOutsourcingUnit" label="委外单位">
@ -634,8 +672,6 @@
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24" v-if="form.repairDestination == '委外维修'">
<el-form-item prop="outSourceReason" label="委外原因">
<el-input
@ -647,6 +683,20 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" v-if="form.repairDestination == '不维修'">
<el-form-item prop="auditOpinion" label="审核意见">
<el-input
v-model="form.auditOpinion"
placeholder="请填写审核意见"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
style="width: 420px"
/>
</el-form-item>
</el-col>
</el-row>
</el-tab-pane>
</el-tabs>
</el-form>
@ -847,6 +897,9 @@
<el-descriptions-item label="报修去向">{{
form.repairDestination
}}</el-descriptions-item>
<el-descriptions-item label="审核意见">{{
form.auditOpinion
}}</el-descriptions-item>
</el-descriptions>
<el-descriptions
@ -1174,7 +1227,7 @@ import { listFaultDescription } from "@/api/device/faultDescription";
export default {
name: "FaultReport",
components: { ItemSelect, ItemSelectPerson },
dicts: ["device_order_source", "device_reach_standard"],
dicts: ["device_order_source", "device_reach_standard", "device_audit_status", "device_repair_destination", "device_audit_status"],
data() {
return {
CS: {
@ -1337,6 +1390,16 @@ export default {
orderRepairmanCode: [
{ required: true, message: "报修人工号不能为空", trigger: "blur" },
],
//
workPlanTime: [
{ required: true, message: "计划维修时间", trigger: "blur" },
],
// workPlanDownTime: [
// { required: true, message: "", trigger: "blur" },
// ],
workDownMachine: [
{ required: true, message: "是否停机维修", trigger: "blur" },
],
},
};
},
@ -1349,6 +1412,14 @@ export default {
indexMethod(index) {
return index + 1;
},
//radio
monitorRadio(){
if(this.form.workDownMachine == '0'){
this.form.workPlanDownTime = null;
}
},
timeBackFilling() {
var getTime = new Date().getTime(); //
var time = new Date(getTime); //
@ -1373,8 +1444,18 @@ export default {
second
);
}
this.form.workPlanTime = nowDate(time);
this.form.workPlanTime = nowDate(time); //
this.form.workPlanDownTime = nowDate(time);
this.form.workDownMachine = '1';
},
//
timeBackFillingReset() {
this.form.workPlanTime = null; //
this.form.workPlanDownTime = null;
this.form.workDownMachine = null;
},
/** 查询维修措施列表 */
getOrderDesc() {
this.loading = true;
@ -1655,8 +1736,8 @@ export default {
}
if (
response.data.orderStatus == "审核通过" ||
response.data.orderStatus == "驳回"
response.data.orderStatus == "1" ||
response.data.orderStatus == "0"
) {
Message.warning("该报修记录已审核!");
this.form = response.data;

@ -54,6 +54,20 @@
/>
</el-select>
</el-form-item>
<el-form-item label="周期" prop="itemLoopType">
<el-select
v-model="queryParams.itemLoopType"
placeholder="请选择周期类型"
clearable
>
<el-option
v-for="dict in dict.type.device_loop_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="false" label="维护类型名称" prop="itemTypeName">
<el-input
class="my-select-input"

@ -191,12 +191,13 @@
{{ scope.row.workType == 1 ? "保养委外" : "维修委外" }}
</template>
</el-table-column>
<el-table-column label="设备编码" align="center" prop="equipmentCode" width="100"/>
<el-table-column label="设备名称" align="center" prop="equipmentName" width="100"/>
<el-table-column label="设备编码" align="center" prop="equipmentCode" width="150"/>
<el-table-column label="设备名称" align="center" prop="equipmentName" width="150"/>
<el-table-column
label="设备类型"
align="center"
prop="equipmentTypeName"
width="150"
/>
<el-table-column
label="委外维修人员"

@ -17,6 +17,20 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核状态" prop="resultInspect">
<el-select
v-model="queryParams.resultInspect"
style="width: 200px"
clearable
>
<el-option
v-for="dict in dict.type.device_audit_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="报修单号" prop="orderCode">
<el-input
v-model="queryParams.orderCode"
@ -35,7 +49,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否停机维修" prop="workDownMachine">
<!-- <el-form-item label="是否停机维修" prop="workDownMachine">
<el-select
v-model="queryParams.workDownMachine"
placeholder="请选择是否停机"
@ -51,7 +65,7 @@
:value="item.workDownMachine"
></el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="维修人员姓名" prop="workPersonName">
<el-input
v-model="queryParams.workPersonName"
@ -231,8 +245,8 @@
icon="el-icon-edit"
size="mini"
@click="clickInspect"
v-hasPermi="['device:repairOrder:inspect']"
>结果检验
v-hasPermi="['device:repairOrder:check']"
>维修结果审核
</el-button>
</el-col>
<el-col :span="1.5">
@ -272,7 +286,7 @@
label="维修单号"
align="center"
prop="workCode"
width="220"
width="250"
fixed
/>
<el-table-column
@ -289,20 +303,28 @@
</template>
</el-table-column>
<el-table-column
label="检验结果"
label="审核状态"
align="center"
prop="resultInspect"
width="100"
>
width="100">
<template slot-scope="scope">
{{ scope.row.resultInspect == '1' ? "通过" :scope.row.resultInspect == '0' ? "不通过" :"待检验" }}
<dict-tag
:options="dict.type.device_audit_status"
:value="scope.row.resultInspect"
/>
</template>
</el-table-column>
<el-table-column
label="审核意见"
align="center"
prop="auditOpinion"
width="150"
/>
<el-table-column
label="报修单号"
align="center"
prop="orderCode"
width="200"
width="230"
/>
<el-table-column
label="设备名称"
@ -352,8 +374,8 @@
<span>{{ parseTime(scope.row.workPlanDownTime) }}</span>
</template>
</el-table-column>
<el-table-column label="维修人员工号" align="center" prop="workPerson" width="100"/>
<el-table-column label="维修人员姓名" align="center" prop="workPersonName" width="100"/>
<el-table-column label="维修人员工号" align="center" prop="workPerson" width="120"/>
<el-table-column label="维修人员姓名" align="center" prop="workPersonName" width="150"/>
<el-table-column
label="维修组编码"
align="center"
@ -1248,7 +1270,20 @@
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="故障图片" prop="afterRepairFile" label-width="120px">
<el-form-item prop="remark" label="备注" label-width="120px">
<el-input
v-model="form.remark"
placeholder="请填写备注"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
style="width: 725px"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="维修后图片" prop="afterRepairFile" label-width="120px">
<FileUpload v-model="form.afterRepairFile" />
</el-form-item>
</el-col>
@ -1273,14 +1308,22 @@
</div>
</el-dialog>
<!-- 结果检验 -->
<el-dialog title="维修结果检验" :visible.sync="inspectDialog" width="30%">
<el-radio v-model="inspect" label="2"></el-radio>
<el-radio v-model="inspect" label="0"></el-radio>
<el-radio v-model="inspect" label="1"></el-radio>
<!-- 维修结果审核 -->
<el-dialog title="维修结果审核" :visible.sync="inspectDialog" width="30%">
<!-- <el-radio v-model="inspect" label="2"></el-radio> -->
<el-radio v-model="inspect" label="1"></el-radio>
<el-radio v-model="inspect" label="0"></el-radio>
<row></row>
<el-input
v-model="auditOpinion"
placeholder="请填写审核意见"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
style="width: 350px"
/>
<span slot="footer" class="dialog-footer">
<el-button @click="inspectDialog = false"> </el-button>
<el-button type="primary" @click="subInspect"> </el-button>
<el-button type="primary" @click="checkRepairWorkOrder"> </el-button>
</span>
</el-dialog>
@ -1693,7 +1736,7 @@ import {
applyOutsource,
writeRepairOrder,
queryEquFaultTypeTree,
subInspect,
checkRepairWorkOrder,
} from "@/api/device/repairOrder";
import { listFaultReason } from "@/api/device/faultReason";
import { listFaultMeasures } from "@/api/device/faultMeasures";
@ -1704,11 +1747,10 @@ import ItemSelectPerson from "./selectSinglePerson.vue";
import { Message } from "element-ui";
import ItemSelectSpareParts from "./selectSpareParts.vue";
import moment from "moment";
export default {
name: " RepairOrder",
components: { ItemSelect, ItemSelectPerson, ItemSelectSpareParts },
dicts: ["device_repair_status"],
dicts: ["device_repair_status","device_audit_status"],
data() {
return {
//
@ -1795,8 +1837,14 @@ export default {
inspectDialog: false,
//
inspect: null,
//
auditOpinion: null,
//
orderCodes: [],
//
workStatus: [],
//
resultInspect: [],
//
queryParams: {
pageNum: 1,
@ -1827,6 +1875,7 @@ export default {
//
workPlanTimeArray: [],
workPlanDownTimeArray: [],
resultInspect: null,
},
auxiliaryQueryParams: {
pageNum: 1,
@ -2140,6 +2189,7 @@ export default {
updateBy: null,
delFlag: null,
factoryCode: null,
auditOpinion: null,
};
this.resetForm("form");
},
@ -2166,6 +2216,8 @@ export default {
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.workId);
this.orderCodes = selection.map((item) => item.workCode);
this.workStatus = selection.map((item) => item.workStatus);
this.resultInspect = selection.map((item) => item.resultInspect);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@ -2395,7 +2447,9 @@ export default {
writeRepairOrder(this.form).then((response) => {
this.openWrite = false;
this.$modal.msgSuccess("填写维修记录成功!");
if(response.code == 200){
this.$modal.msgSuccess(response.msg);
}
this.queryParams.workStatus = null;
this.getList();
});
@ -2404,6 +2458,7 @@ export default {
}
});
},
//
clickInspect() {
if (this.ids.length == 0 || this.ids == null) {
@ -2413,26 +2468,63 @@ export default {
});
return;
}
//
let workStatusMsg = true;
this.workStatus.forEach((item) => {
if(item == '0'){
workStatusMsg = false;
}
});
let resultInspectMsg = true;
this.resultInspect.forEach((item) => {
if(item == '1'){
resultInspectMsg = false;
}
});
if (workStatusMsg && resultInspectMsg) {
this.inspectDialog = true;
this.inspect = "1";
this.inspect = "1";//
this.auditOpinion = null;//
}else if(workStatusMsg == false){
this.$message({
message: "您选择的维修工单存在未完成的工单!",
type: "warning",
});
return;
}else if(resultInspectMsg == false){
this.$message({
message: "您选择的维修工单存在已经审核过的工单,不能再次审核!",
type: "warning",
});
return;
}
},
//
subInspect() {
checkRepairWorkOrder() {
const data = {
ids: this.ids,
inspect: this.inspect,
orderCodes: this.orderCodes,
auditOpinion: this.auditOpinion,
};
subInspect(data).then((response) => {
checkRepairWorkOrder(data).then((response) => {
this.getList();
this.inspectDialog = false;
if(response.code = 500 ){
this.$message({
message: response.msg,
type: "warning",
});
}else{
this.$message({
message: "提交成功!",
type: "success",
});
}
});
},
//

@ -394,10 +394,21 @@
icon="el-icon-edit"
size="mini"
@click="clickInspect"
v-hasPermi="['device:upkeepOrder:edit']"
v-hasPermi="['device:upkeepOrder:check']"
>结果检验
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-edit"
size="mini"
@click="handleUpdate"
v-hasPermi="['device:upkeepOrder:edit']"
>填写记录
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
@ -453,6 +464,14 @@
}}</el-button>
</template>
</el-table-column>
<el-table-column width="80" label="保养类型" align="center" prop="upkeep">
<template slot-scope="scope">
<dict-tag
:options="dict.type.device_upkeep_type"
:value="scope.row.upkeep"
/>
</template>
</el-table-column>
<el-table-column label="工单状态" align="center" prop="orderStatus">
<template slot-scope="scope">
<dict-tag
@ -581,14 +600,6 @@
}}</span>
</template>
</el-table-column>
<el-table-column width="80" label="保养类型" align="center" prop="upkeep">
<template slot-scope="scope">
<dict-tag
:options="dict.type.device_upkeep_type"
:value="scope.row.upkeep"
/>
</template>
</el-table-column>
<el-table-column label="工单费用" align="center" prop="orderCost" />
<el-table-column label="保养人工号" align="center" prop="planPerson" width="100"/>
<el-table-column label="保养人姓名" align="center" prop="planPersonName" width="100"/>

@ -305,7 +305,12 @@
<el-table-column width="60" align="center" label="序号" type="index" fixed></el-table-column>
<el-table-column v-if="false" label="主键" align="center" prop="planId"/>
<el-table-column width="150" label="计划编码" align="center" prop="planCode" fixed/>
<el-table-column width="150" label="计划名称" align="center" prop="planName"/>
<el-table-column width="150" label="计划名称" align="center" prop="planName" />
<el-table-column label="保养类型" align="center" prop="upkeep">
<template slot-scope="scope">
<dict-tag :options="dict.type.device_upkeep_type" :value="scope.row.upkeep"/>
</template>
</el-table-column>
<el-table-column width="150" label="生成规则" align="center" prop="calculationRule">
<template slot-scope="scope">
{{ scope.row.calculationRule == "0" ? "按照固定周期" : scope.row.one == "1" ? "按照上次保养时间" : "单次" }}
@ -340,15 +345,10 @@
</el-table-column>
<el-table-column v-if="false" label="是否可生产-限制" align="center" prop="planRestrict"/>
<el-table-column v-if="false" label="维护类型" align="center" prop="planType"/>
<el-table-column label="保养类型" align="center" prop="upkeep">
<template slot-scope="scope">
<dict-tag :options="dict.type.device_upkeep_type" :value="scope.row.upkeep"/>
</template>
</el-table-column>
<el-table-column label="委外人员" align="center" prop="workPerson"/>
<el-table-column label="委外单位" align="center" prop="workOutsourcingUnit"/>
<el-table-column label="联系方式" align="center" prop="workConnection"/>
<el-table-column label="原因" align="center" prop="workReason"/>
<el-table-column label="委外人员" align="center" prop="workPerson" width="100"/>
<el-table-column label="委外单位" align="center" prop="workOutsourcingUnit" width="150"/>
<el-table-column label="联系方式" align="center" prop="workConnection" width="150"/>
<el-table-column label="原因" align="center" prop="workReason" width="150"/>
<el-table-column v-if="false" label="委外工单编码" align="center" prop="workCode"/>
<el-table-column v-if="false" label="工厂" align="center" prop="factoryCode"/>
<el-table-column v-if="false" label="备用字段1" align="center" prop="attr1"/>

@ -50,7 +50,7 @@
</span>
</div>
<div class="name2">
今日
今日产量(PC)
</div>
</div>
<div class="box">
@ -60,7 +60,7 @@
</span>
</div>
<div class="name2">
今日抽检数量
今日抽检数量(PC)
</div>
</div>
<div class="box">
@ -70,7 +70,7 @@
</span>
</div>
<div class="name2">
今日不良数
今日不良数(PC)
</div>
</div>
</div>
@ -82,7 +82,7 @@
</span>
</div>
<div class="name2">
本月
本月产量(PC)
</div>
</div>
<div class="box">
@ -92,7 +92,7 @@
</span>
</div>
<div class="name2">
本月不良数
本月不良数(PC)
</div>
</div>
</div>
@ -117,6 +117,7 @@
<div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">质量异常信息</div>
</div>
<vue-seamless-scroll :data="Qualitylist" class="wrapscroll" :class-option="classOption" style="height:400px">
<div class="table-tbody">
<div class="item" :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px"
:key="index" v-for="(n, index) in Qualitylist">
@ -132,6 +133,7 @@
</div>
</div>
</div>
</vue-seamless-scroll>
</div>
<div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;">
@ -191,6 +193,12 @@ export default {
},
data() {
return {
classOption:{
direction: 1,
hoverstop:true, step: 0.5,
openNatch: true,
limitMoveNum:7
},
gettimedata: "",
selectxt: null,
selectxtclasses: null,
@ -269,7 +277,7 @@ export default {
const _this = this;
getDeviceRefreshTime().then((response) => {
if (response.data) {
console.log(response.data)
// console.log(response.data)
this.RefreshTime = response.data
this.time1 = setInterval(() => {
_this.getdatalist(_this.selectxt)
@ -286,7 +294,7 @@ export default {
}
).then((response) => {
if (response) {
console.log(response)
// console.log(response)
this.dictDatatype = response
_this.selectxtclasses = _this.dictDatatype[0].ymdType;
this.getDeviceRefreshTime()
@ -298,8 +306,8 @@ export default {
getdatalist() {
const _this = this;
getProduceStaticInfo({
ymdType: moment().format(_this.selectxtclasses),
typeCode: 'material',
ymdType: _this.selectxtclasses,//moment().format(_this.selectxtclasses),
typeCode: 'produce',
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
if (response) {
@ -310,6 +318,7 @@ export default {
});
getProduceNoOkList({
typeCode: 'produce',
ymdType: _this.selectxtclasses,
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
if (response) {
@ -318,7 +327,7 @@ export default {
});
getCheckProjectsPie({
typeCode: 'produce',
ymdType: moment().format(_this.selectxtclasses),
ymdType: _this.selectxtclasses,//moment().format(_this.selectxtclasses),
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
if (response) {
@ -438,7 +447,7 @@ export default {
],
};
myChart3.setOption(option3);
console.log(_this.selectxt)
// console.log(_this.selectxt)
getProMonthNoOk({
typeCode: 'produce',
factoryCode: 'ds_' + _this.selectxt,
@ -448,7 +457,7 @@ export default {
let dataoption = [];
let totalArr = [];
_this.optionDatalist3 = [];
console.log(response)
// console.log(response)
for (let index = 0; index < response.month.length; index++) {
let a = {};
response.month[index] = moment(response.month[index]).format('MM')
@ -467,7 +476,7 @@ export default {
dataoption.forEach((item) => {
totalArr.push(max);
});
console.log(dataoption, numberlist)
// console.log(dataoption, numberlist)
// response = [{ name: "1", code: "100", value: '100', }]
// if (response.length > 0) {
option3 = {
@ -628,7 +637,7 @@ export default {
let yAxismaxall = 0
dataoption.forEach((n) => {
if (n.data) {
console.log(Math.max(...n.data), n.data)
// console.log(Math.max(...n.data), n.data)
yAxismax.push(Math.max(...n.data))
}
var item = {
@ -660,7 +669,7 @@ export default {
],
series: seriesmyChart5
};
console.log(seriesmyChart5,'111111111111111')
// console.log(seriesmyChart5,'111111111111111')
myChart5.setOption(option5);
}
});
@ -1825,7 +1834,9 @@ export default {
.app-container {
padding: 0px 24px;
}
.wrapscroll{
overflow: hidden;
}
.home {
width: 100%;
height: 100vh;

@ -38,14 +38,15 @@
<table class="table-thead" border="0" cellpadding="0" cellspacing="0">
<thead>
<tr style="height: 44px;">
<td style="width: 8%;">序号</td>
<td style="width: 8%;">检验编号</td>
<td style="width: 8%;">检验阶段</td>
<td style="width: 8%;">检验时间</td>
<td style="width: 2%;">序号</td>
<td style="width: 6%;">检验编号</td>
<td style="width: 4%;">检验阶段</td>
<td style="width: 8%;">任务时间</td>
<td style="width: 8%;">物料来源</td>
<td style="width: 8%;">物料名称</td>
<td style="width: 8%;">检验人</td>
<td style="width: 8%;">检验状态</td>
<td style="width: 10%;">物料名称</td>
<td style="width: 4%;">检验人</td>
<td style="width: 8%;">检验时间</td>
<td style="width: 4%;">检验状态</td>
</tr>
</thead>
</table>
@ -55,14 +56,15 @@
<tbody>
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
v-for="(n, index) in Inspectiondetails">
<td style="width: 8%;">{{ index + 1 }}</td>
<td style="width: 8%;">{{ n.checkNo }}</td>
<td style="width: 8%;">{{ n.checkName }}</td>
<td style="width: 2%;">{{ index + 1 }}</td>
<td style="width: 6%;">{{ n.checkNo }}</td>
<td style="width: 4%;">{{ n.checkName }}</td>
<td style="width: 8%;">{{ n.incomeTime }}</td>
<td style="width: 8%;">{{ n.supplierName }}</td>
<td style="width: 8%;">{{ n.materialName }}</td>
<td style="width: 8%;">{{ n.checkManName }}</td>
<td style="width: 8%;" :class="[n.checkStatus == 1 ? 'color1' : 'color2']">{{
<td style="width: 10%;">{{ n.materialName }}</td>
<td style="width: 4%;">{{ n.checkManName }}</td>
<td style="width: 8%;">{{ n.checkTime }}</td>
<td style="width: 4%;" :class="[n.checkStatus == 1 ? 'color1' : 'color2']">{{
n.checkStatus }}</td>
</tr>
</tbody>
@ -77,14 +79,15 @@
<table class="table-thead" border="0" cellpadding="0" cellspacing="0">
<thead>
<tr style="height: 44px;">
<td style="width: 8%;">序号</td>
<td style="width: 8%;">检验编号</td>
<td style="width: 8%;">检验阶段</td>
<td style="width: 8%;">检验时间</td>
<td style="width: 2%;">序号</td>
<td style="width: 6%;">检验编号</td>
<td style="width: 4%;">检验阶段</td>
<td style="width: 8%;">任务时间</td>
<td style="width: 8%;">物料来源</td>
<td style="width: 8%;">物料名称</td>
<td style="width: 8%;">检验人</td>
<td style="width: 8%;">检验状态</td>
<td style="width: 10%;">物料名称</td>
<td style="width: 4%;">检验人</td>
<td style="width: 8%;">检验时间</td>
<td style="width: 4%;">检验状态</td>
</tr>
</thead>
</table>
@ -94,14 +97,15 @@
<tbody>
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
v-for="(n, index) in Inspectiondetails1">
<td style="width: 8%;">{{ index + 1 }}</td>
<td style="width: 8%;">{{ n.checkNo }}</td>
<td style="width: 8%;">{{ n.checkName }}</td>
<td style="width: 2%;">{{ index + 1 }}</td>
<td style="width: 6%;">{{ n.checkNo }}</td>
<td style="width: 4%;">{{ n.checkName }}</td>
<td style="width: 8%;">{{ n.incomeTime }}</td>
<td style="width: 8%;">{{ n.supplierName }}</td>
<td style="width: 8%;">{{ n.materialName }}</td>
<td style="width: 8%;">{{ n.checkManName }}</td>
<td style="width: 8%;" :class="[n.checkStatus == 1 ? 'color1' : 'color2']">{{
<td style="width: 10%;">{{ n.materialName }}</td>
<td style="width: 4%;">{{ n.checkManName }}</td>
<td style="width: 8%;">{{ n.checkTime }}</td>
<td style="width: 4%;" :class="[n.checkStatus == 1 ? 'color1' : 'color2']">{{
n.checkStatus }}</td>
</tr>
</tbody>
@ -218,7 +222,7 @@ export default {
if (response) {
console.log(response)
this.dictDatatype = response
_this.selectxtclasses = _this.dictDatatype[0].ymdType;
_this.selectxtclasses = this.dictDatatype[2].ymdType;
_this.getSupplierTaskList(_this.selectxt)
_this.getDeviceRefreshTime()
}
@ -240,7 +244,7 @@ export default {
const _this = this;
this.Inspectiondetails = []
getSupplierTaskList({
ymdType: moment().format(_this.selectxtclasses),
ymdType: _this.selectxtclasses,//moment().format(_this.selectxtclasses),
typeCode: 'material',
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
@ -252,7 +256,7 @@ export default {
}
});
getSupplierTaskList({
ymdType: moment().format(_this.selectxtclasses),
ymdType: _this.selectxtclasses,//moment().format(_this.selectxtclasses),
typeCode: 'produce',
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {

@ -34,7 +34,14 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="物料号" prop="productCode">
<el-input
v-model="queryParams.productCode"
placeholder="请输入物料号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>

@ -226,41 +226,57 @@
<el-dialog
title="备料信息"
:visible.sync="printDialogVisible"
width="1000px"
:width="shengchan?'821px':'721px'"
>
<div id="printFrom" class="my-print-box">
<el-form :model="form">
<!-- 表头-工单信息 -->
<el-row class="my-print-head">
<el-col :offset="10" :span="5">生产订单备料单({{printData.printTitle}})</el-col>
<div class="my-print-barcode" :width="shengchan?'821px':'721px'">
<svg id="barcode"></svg>
</div>
<el-row>
<div class="my-print-head">
<el-col>生产订单备料单({{printData.printTitle}})</el-col>
</div>
</el-row>
<!-- 导航栏 -->
<el-row class="my-print-nav">
<el-col :span="4">工厂:{{printData.factory}}</el-col>
<el-col :span="4">工作中心:{{printData.workCenter}}</el-col>
<el-col :span="4" v-if="printData.prodLineCode!=null">线:{{printData.prodLineCode}}</el-col>
<el-col :span="4">生产日期:{{printData.productDate}}</el-col>
<el-col :span="4">打印日期:{{printData.printDate}}</el-col>
<el-col :span="4">页次: 1/ 1</el-col>
<el-col :span="8">工厂:{{printData.factory}}</el-col>
<el-col :span="8">工作中心:{{printData.workCenter}}</el-col>
<el-col :span="8" v-if="printData.prodLineCode!=null">线:{{printData.prodLineCode}}</el-col>
</el-row>
<el-row class="my-print-nav">
<el-col :span="8">生产日期:{{printData.productDate}}</el-col>
<el-col :span="8">打印日期:{{printData.printDate}}</el-col>
<el-col :span="8">页次: 1/ 1</el-col>
</el-row>
<!-- 主数据 -->
<div v-for="(item,index) in printData.workTable" :key="index">
<el-table
v-if="refreshNewWorkerTable" v-loading="newWorkerLoading"class="my-print-table":data="printData.workTable"
v-if="refreshNewWorkerTable" v-loading="newWorkerLoading" class="my-print-table" :data="item"
border style="width: 100%">
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="序号" width="40">
<template slot-scope="scope">
<!-- scope.$index 是当前行的索引 0 开始 1 后乘以 2 -->
{{ (scope.$index + 1) + fenyeNumber* index}}
</template>
</el-table-column>
<el-table-column prop="materialCode" label="料号" width="120" :formatter="productCodeFormate"></el-table-column>
<el-table-column prop="materialName" label="物料描述" width="320"></el-table-column>
<el-table-column prop="materialName" label="物料描述" width="250"></el-table-column>
<el-table-column prop="unit" width="50" label="单位"></el-table-column>
<el-table-column v-if="showWorkorderCode" prop="workorderCode" width="100" label="生产订单" :formatter="orderCodeFormate"></el-table-column>
<el-table-column prop="quantity" label="请领数量"></el-table-column>
<!-- <el-table-column prop="fundQuanlity" label="欠领数量"></el-table-column>-->
<el-table-column prop="routeCode" width="80" label="实发数量"></el-table-column>
<el-table-column prop="routeCode" width="90" label="实发数量2"></el-table-column>
<!-- <el-table-column prop="recoil" label="反冲物料"></el-table-column>-->
<el-table-column prop="quantity" label="请领数量" width="100"></el-table-column>
<el-table-column prop="routeCode" width="60" label="实发数量"></el-table-column>
<el-table-column prop="routeCode" width="60" label="实发数量2"></el-table-column>
</el-table>
<br/>
<div class="fy" v-if="index!=printData.workTable.length-1"></div>
</div>
<!-- 底部 -->
<el-row class="my-print-foot">
<el-col :offset="1" :span="3">发料人:</el-col>
@ -286,6 +302,8 @@
import { listPrepare, getPrepare, delPrepare, addPrepare, updatePrepare } from "@/api/mes/prepare";
import {printPrepareByCode,printPrepareXByCode} from "@/api/mes/prepareDetail";
import moment from "moment/moment";
import JsBarcode from 'jsbarcode';
// import { listPrepareDetail, getPrepareDetail, delPrepareDetail, addPrepareDetail, updatePrepareDetail } from "@/api/mes/prepareDetail";
// import Detail from "./prepareDetail.vue";
export default {
@ -293,6 +311,8 @@ export default {
// components: {Detail},
data() {
return {
fenyeNumber:13,
shengchan:true,
newWorkerLoading: false,
refreshNewWorkerTable:true,
showWorkorderCode:true,
@ -310,6 +330,7 @@ export default {
factory: null,
productDate: null,
workTable: [],
barcode:null,//
},
printDialogVisible: false,
//
@ -387,6 +408,9 @@ export default {
created() {
this.getList();
},
mounted() {
this.generateBarcode();
},
methods: {
//
productCodeFormate(row, column, cellValue){
@ -403,17 +427,22 @@ export default {
printJS({
printable: params.printable, // 'printFrom', // id
type: params.type || 'html',
maxWidth: 1500, //
font_size: "",//
dpi: 300, //
//font_size: "",//
header: params.header, // '',
targetStyles: ['*'],
style: '@page {margin:0 10mm};', // -
style: `
body {margin: 5mm;padding: 0;}
.fy{page-break-after: always;}
`,
ignoreElements: params.ignore || [], // ['no-print']
properties: params.properties || null
})
},
// ()
showPrint() {
this.shengchan = true;
//
this.printData.workCenter = "暂无数据";
this.printData.printDate = null;
@ -431,10 +460,22 @@ export default {
this.printData.factory = response.data.mesPrepareDetailList[0].factoryCode
this.printData.productDate = response.data.mesPrepareDetailList[0].productDate
this.printData.printDate = moment(new Date()).format('YYYY-MM-DD')
this.printData.workTable = response.data.mesPrepareDetailList
this.printData.workTable = response.data.mesPrepareDetailList;
let chunkedArray = [];
// this.printData.workTable
for (let i = 0; i < this.printData.workTable.length; i += this.fenyeNumber) {
// 使slicei1010
let chunk = this.printData.workTable.slice(i, i + this.fenyeNumber);
// chunkedArray
chunkedArray.push(chunk);
}
this.printData.workTable = chunkedArray;
this.printData.prodLineCode = response.data.mesPrepare.prodLineCode
this.refreshNewWorkerTable = true // refreshProTabletrue
this.newWorkerLoading = false // false
this.generateBarcode(this.selectPrepare[0].workorderCode); //
})
},
// ()
@ -444,7 +485,7 @@ export default {
this.$modal.msgError("请选择工单生产日期");
return;
}
this.shengchan = false;
//
this.printData.workCenter = "暂无数据";
this.printData.printDate = null;
@ -463,10 +504,33 @@ export default {
this.printData.productDate = moment(this.queryParams.productDate).format('YYYY-MM-DD')
this.printData.printDate = moment(new Date()).format('YYYY-MM-DD')
this.printData.workTable = response.data.mesPrepareDetailList
let chunkedArray = [];
// this.printData.workTable
for (let i = 0; i < this.printData.workTable.length; i += this.fenyeNumber) {
// 使slicei1010
let chunk = this.printData.workTable.slice(i, i + this.fenyeNumber);
// chunkedArray
chunkedArray.push(chunk);
}
this.printData.workTable = chunkedArray;
this.refreshNewWorkerTable = true // refreshProTabletrue
this.newWorkerLoading = false // false
this.generateBarcode(this.printData.printDate); //
})
},
//
generateBarcode(barcode){
JsBarcode("#barcode", barcode, {
format: "CODE128",
height:75,
width:2,
displayValue: true,
});
},
//
indexMethod(index){
return index+1 ;
@ -591,24 +655,37 @@ export default {
</script>
<style>
.my-print-head {
margin-top: 20px;
font-weight: bold;
text-align: center;
}
.my-print-barcode {
margin-top: 0px;
margin-right: 40px;
text-align: right;
}
.my-print-nav {
margin-top: 15px;
margin-bottom: 15px;
}
.my-print-table {
}
.my-print-foot {
margin-top: 20px;
}
@media print {
#printFrom{
font-family: "SimSun", "宋体" !important;
color: #000 !important;
font-size: 14pt !important; /* 调整字体大小 */
body {
font-family: 'Arial', sans-serif; /* 设置字体为'Arial'或其他清晰的无衬线字体 */
font-size: 14px; /* 设置字体大小 */
-webkit-print-color-adjust: exact;
}
table, th, td {
border: 1px solid black;
border-collapse: collapse;
font-size: 14px; /* 确保表格内字体大小一致 */
}
}
.fy{
page-break-after: always;
}
</style>

@ -349,12 +349,9 @@
@select-all="allReportSelection" :summary-method="getSummaries" show-summary>
<el-table-column width="60" align="center" type="selection" />
<el-table-column label="id" align="center" prop="id" v-if="false" />
<el-table-column label="工单编码" width="130" align="left" prop="workorderCode"
:show-overflow-tooltip="true" />
<el-table-column label="订单编码" width="105" align="left" prop="workorderCodeSap"
:show-overflow-tooltip="true" :formatter="orderCodeFormate" />
<el-table-column label="报工单号" width="115" align="left" prop="reportCode"
:show-overflow-tooltip="true" />
<el-table-column label="批次" width="250" align="left" prop="batch">
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.batch"
@ -380,7 +377,7 @@
></el-input>
</template>
</el-table-column>
<el-table-column label="用人数" align="center" prop="useMan">
<el-table-column label="用人数" align="center" prop="useMan" width="100">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.useMan"
@change="handleEdit(scope.$index, scope.row)"
@ -388,7 +385,10 @@
></el-input>
</template>
</el-table-column>
<el-table-column label="报工单编号" align="center" prop="reportCode" width="120" />
<el-table-column label="工单编码" width="80" align="left" prop="workorderCode"
:show-overflow-tooltip="true"/>
<el-table-column label="报工单号" width="80" align="left" prop="reportCode"
:show-overflow-tooltip="true" />
<el-table-column label="创建时间" align="center" prop="createTime" width="150" />
<!---->
<el-table-column fixed="right" label="操作" width="160">
@ -421,6 +421,7 @@
</el-dialog>
<!-- 报工损耗 -->
<el-dialog :title="titleConsume" :visible.sync="openConsume" width="1200px">
<div class="div1"><el-link type="success">实际报工母订单数量{{actProduct}}</el-link></div>
<el-tabs v-model="activeNameC">
<el-tab-pane v-for="(item, index) in libConsumeTabs" :key="index" :label="item.title"
:name="item.libId">
@ -430,16 +431,15 @@
<el-table-column width="50" align="center" type="selection" />
<el-table-column label="recordId" align="center" prop="recordId" v-if="false" />
<el-table-column label="parentOrder" align="center" prop="parentOrder" v-if="false" />
<el-table-column label="工单编码" width="140" align="left" prop="workorderCode"
:show-overflow-tooltip="true" />
<el-table-column label="订单编码" width="130" align="left" prop="workorderCodeSap"
<el-table-column label="订单编码" width="100" align="left" prop="workorderCodeSap"
:show-overflow-tooltip="true" :formatter="orderCodeFormate" />
<el-table-column label="物料编码" width="130" align="left" prop="materialCode"
<el-table-column label="物料编码" width="110" align="left" prop="materialCode"
:show-overflow-tooltip="true" :formatter="productCodeFormate" />
<el-table-column label="物料名称" width="280" align="left" prop="materialName"
:show-overflow-tooltip="true" />
<el-table-column label="BOM组件用量" width="150" align="left" prop="planQuantity" />
<el-table-column label="单位数量" align="center" prop="erfmg" />
<el-table-column label="BOM组件用量" width="110" align="left" prop="planQuantity" />
<el-table-column label="单位数量" align="center" prop="erfmg" :show-overflow-tooltip="true"/>
<el-table-column label="条目单位" align="center" prop="erfme" />
<el-table-column label="实际用量" width="150" align="left" prop="quantity"
:show-overflow-tooltip="true">
@ -461,8 +461,10 @@
</el-select>
</template>
</el-table-column>
<el-table-column label="报工单编号" align="center" prop="reportCode" width="120" />
<el-table-column label="创建时间" align="center" prop="createTime" width="150" />
<el-table-column label="报工单编号" align="center" prop="reportCode" width="90" :show-overflow-tooltip="true"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="130" :show-overflow-tooltip="true"/>
<el-table-column label="工单编码" width="80" align="left" prop="workorderCode"
:show-overflow-tooltip="true" />
<el-table-column fixed="right" label="操作" width="90">
<template slot-scope="scope">
<el-button @click.native.prevent="deleteBomRow(scope.$index, item.libList)" size="small"
@ -499,6 +501,7 @@
</el-tab-pane>
-->
</el-tabs>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="cancel" v-if="optType == 'view'"></el-button>
@ -697,6 +700,7 @@ export default {
},
data() {
return {
actProduct:0,
optType: undefined,
//
loading: true,
@ -1029,6 +1033,7 @@ export default {
updateBy: null,
endReport: "0"
};
this.actProduct = 0;
this.queryParams.workorderCode = "";
this.queryParams.machineCode = "";
this.resetForm("form");
@ -1362,6 +1367,7 @@ export default {
//
getAllLevelConsumeList(this.queryParams).then((response) => {
this.libConsumeTabs = response;
this.actProduct = this.libConsumeTabs[0].libList[0].quantityFeedback;
this.openConsume = true;
this.titleConsume = "工单报工物料损耗详情";
this.queryParams.workorderCode = "";
@ -1788,4 +1794,9 @@ export default {
.my-print-foot {
font-size: 19px;
}
.div1{
margin-top: -35px;
margin-right: 70px;
text-align: right;
}
</style>

@ -119,7 +119,7 @@ export default {
header: params.header, // '',
targetStyles: ['*'],
style: `
@page { size: A5 landscape; } body { margin: 10mm; padding: 0; }
body { margin: 10mm; padding: 0; }
.print-page { page-break-after: always; }
`,
ignoreElements: params.ignore || [],

@ -59,8 +59,16 @@
</el-col>
-->
<el-col :span="14">
<el-form-item label="不合格描述" prop="remark">
<el-input type='textarea' v-model="form.remark" placeholder="请输入不合格描述" />
<el-form-item label="不合格描述" prop="remarkCode">
<!-- <el-input type='textarea' v-model="form.remark" placeholder="请输入不合格描述" /> -->
<el-select v-model="form.remarkCode" placeholder="请选择不合格描述" clearable>
<el-option
v-for="dict in remarkList"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
@ -221,10 +229,11 @@
</template>
<script>
import { getCkeckProjectList,changeCheckDetailStatus,commitActualValue,
import { getCkeckProjectList,changeCheckDetailStatus,getIncome,commitActualValue,
commitCheckResult,getDefectList,getWeightValue,getnoOkVals,getAutoJudge
} from "@/api/quality/income";
import { getDefectValue, commitDefectValue, updateDefectValue} from "@/api/quality/checkTaskDefect";
import { getDictData,} from "@/api/system/dict/data";
export default {
name: "itemSelectUser",
dicts: ["qc_rule_prop","material_type_oa","material_from_oa","sample_level","sample_aql"],
@ -246,6 +255,7 @@ export default {
// BOM
itemList: null,
qcCheckTaskDetails: [],
remarkList: [],
//
bomCode: undefined,
defaultProps: {
@ -306,6 +316,7 @@ export default {
},
created() {
this.getDefect();
this.handleGetDictData();
},
methods: {
getDefect(){
@ -329,6 +340,7 @@ export default {
this.viewStatus = this.data.checkStatus;
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10;
this.getCheckInfo();
this.getList();
this.getDefect();
},
@ -342,6 +354,7 @@ export default {
this.viewStatus = "1";
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10;
this.getCheckInfo();
this.getList();
this.getDefect();
},
@ -357,6 +370,17 @@ export default {
);
},
handleGetDictData() {
const query = {
dictType: 'unqualified_remark',
}
getDictData(query).then(response => {
if (response.code === 200) {
this.remarkList = response.data;
}
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
@ -368,7 +392,7 @@ export default {
startOA: null,
materialType: null,
materialFrom: null,
remark: null,
remarkCode: null,
createBy: null,
createTime: null,
updateBy: null,
@ -400,6 +424,13 @@ export default {
});
},
getCheckInfo() {
getIncome(this.data.recordId).then(response => {
this.form = response.data;
});
},
//
submitBomForm() {
//----
@ -427,6 +458,7 @@ export default {
this.$modal.msgSuccess("检测完成");
this.$emit('saveCheck');
this.showFlag = false;
this.reset();
});
},

@ -1,10 +1,10 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<el-col :span="6" :xs="24">
<el-col :span="8" :xs="24">
<ProjectTypeTree ref="ProjectTypeTree" @onNodeClick="onNodeClick" ></ProjectTypeTree>
</el-col>
<el-col :span="18" :xs="24">
<el-col :span="16" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="检验规则名称" prop="ruleName">
<el-input

@ -27,7 +27,7 @@
class="tree-style"
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span style="width:220px; display:block; word-break:keep-all; white-space:nowrap; overflow:hidden; text-overflow:ellipsis"
<span style="width:300px; display:block; word-break:keep-all; white-space:nowrap; overflow:hidden; text-overflow:ellipsis"
:title="node.label + '(' + data.id + ')'"
>{{node.label}}</span>
<span>

@ -0,0 +1,664 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" style="margin-bottom:-15px" >
<!-- <el-form-item label="检验类型">
<el-select v-model="queryParams.checkType" filterable placeholder="请选择检验类型">
<el-option
v-for="item in jianyanType"
:key="item.factoryCode"
:label="item.factoryName"
:value="item.factoryCode">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item label="统计维度">
<el-select v-model="queryParams.ymdms" filterable placeholder="请选择检验节点" @change="change(queryParams.ymdms)">
<el-option
v-for="item in jianyanNode"
:key="item.ymdType"
:label="item.ymdTypeName"
:value="item.ymdType">
</el-option>
</el-select>
</el-form-item>
<el-form-item v-show="queryParams.ymdms=='yyyy'" label="检验时间">
<el-date-picker
v-model="queryParams.incomeTimeStr"
style="width: 230px"
type="year"
value-format="yyyy"
placeholder="选择检验时间">
</el-date-picker>
</el-form-item>
<el-form-item v-show="queryParams.ymdms=='mm'" label="检验时间">
<el-date-picker v-model="queryParams.incomeTimeStr" size="small" style="width: 230px" value-format="yyyy-MM"
type="month" placeholder="选择检验时间" />
</el-form-item>
<el-form-item v-show="queryParams.ymdms=='dd'" label="检验时间">
<el-date-picker v-model="queryParams.incomeTimeStr" size="small" style="width: 230px" type="date" value-format="yyyy-MM-dd" placeholder="选择检验时间"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<div class="top-table">
<div class="top-left-table">
<div class="title">巡检数据统计</div>
<table class="tableStyle" cellpadding="0" cellspacing="0" style="width:100%;table-layout : fixed">
<thead>
<tr>
<th rowspan="2">时间</th>
<th rowspan="2" style="border-right:1px solid #dfe6ec;">抽样数</th>
<th :colspan="tableThead.length?tableThead.length:''">缺陷不良</th>
<th rowspan="2" style="border-left:1px solid #dfe6ec;">不良率</th>
</tr>
<tr>
<th v-for="(item,index) in tableThead" :key="index">{{item}}</th>
</tr>
</thead>
</table>
<div style="width:100%;height:300px;overflow-y: auto">
<table class="tableStyle" cellpadding="0" cellspacing="0" style="table-layout : fixed">
<tbody>
<tr v-for="(item,index) in tableTbody" :key="index">
<td>{{item.timeCol}}</td>
<td>{{item.sampleQuality}}</td>
<td v-for="(items,indexs) in item.ddTab" :key="indexs">{{items}}</td>
<td>{{item.noOkRate}}%</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="top-right-table">
<div class="title">巡检</div>
<table class="tableStyle" cellpadding="0" cellspacing="0" style="width:100%;table-layout : fixed">
<thead>
<tr>
<th>缺陷类别</th>
<th>不良数</th>
<th>占比</th>
</tr>
</thead>
</table>
<div style="width:100%;height:300px;overflow-y: auto">
<table class="tableStyle" cellpadding="0" cellspacing="0" style="table-layout : fixed">
<tbody>
<tr v-for="(items,indexs) in tableBlfx" :key="indexs">
<td>{{items.dataType}}</td>
<td>{{items.noOkQuality}}</td>
<td>{{items.noOkNumRate}}%</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="bottom-echart">
<div class="left-echart">
<div class="title">巡检不良率</div>
<div id="echartss" style="width:680px;height:200px;"></div>
</div>
<div class="right-echart">
<div class="title">不良排列图</div>
<div id="echartTs" style="width:650px;height:200px;"></div>
</div>
</div>
<!-- <el-table v-loading="loading" :data="incomeList" @selection-change="handleSelectionChange">
<el-table-column label="供应商编号" align="center" prop="supplierCode" width="120" fixed/>
<el-table-column label="供应商名称" align="left" prop="supplierName" width="390" fixed/>
<el-table-column label="总批数" align="center" prop="batchs" width="90"/>
<el-table-column label="合格批次" align="center" prop="okBatchs" width="100"/>
<el-table-column label="不合格批次" align="center" prop="noOkBatchs" width="100"/>
<el-table-column label="批次不良率" align="center" prop="noOkBatchRate" width="100"/>
<el-table-column label="总数量" align="center" prop="nums" width="90"/>
<el-table-column label="合格数量" align="center" prop="okNums" width="100"/>
<el-table-column label="不合格数量" align="center" prop="noOkNums" width="100"/>
<el-table-column label="数量不良率" align="center" prop="noOkNumRate" width="100"/>
</el-table> -->
</div>
</template>
<script>
import { getIncomeTableList,getTableHzTitleTh,getTableHzData,getTableHzNoOkData,getDictData} from "@/api/quality/qcTable";
import moment from 'moment';
import * as echarts from "echarts";
export default {
name: "qcTableCheckDevelop",
components: {},
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// rfid
incomeList: [],
//
title: "",
//
open: false,
// -listtag
selectMaterielListtag:[],
dateRange:[],
//
queryParams: {
checkType:'checkTypeSCXJ',
ymdms: 'dd',
incomeTimeStr: moment().format('YYYY-MM-DD'),
},
//
form: {},
//
rules: {
workorderId: [
{ required: true, message: "工单ID不能为空", trigger: "blur" }
],
rfid: [
{ required: true, message: "rfid号不能为空", trigger: "blur" }
],
},
jianyanType:[
{
factoryCode:'checkTypeSCXJ',
factoryName:''
}
],
jianyanNode:[
// {
// dictNo:'yyyy',
// dictValue:''
// },
// {
// dictNo:'mm',
// dictValue:''
// },
// {
// dictNo:'dd',
// dictValue:''
// },
],
tableThead:[],
tableTbody:[],
tableBlfx:[],
echartsData:[],
dateNode:'dd',
};
},
mounted(){
this.getDictData()
this.getThead()
this.getTbody()
this.getBlfx()
},
created() {
},
methods: {
async getThead(){
let res=await getTableHzTitleTh({checkType:'checkTypeSCXJ'})
console.log('resTh',res)
this.tableThead=res.columns1
},
async getTbody(){
let res=await getTableHzData(this.queryParams)
console.log('resData',res)
let xData=[]
let yData=[]
res.map((item,index)=>{
let ddTab=[]
xData.push(item.timeCol),
yData.push(item.noOkRate)
Object.keys(item).map((itemT,indexT)=>{
if((itemT!='timeCol')&&(itemT!='sampleQuality')&&(itemT!='noOkRate')){
ddTab.push(item[itemT])
}
})
item.ddTab=ddTab
})
console.log('resData处理后',res)
this.tableTbody=res
this.getEcharts(xData,yData)
},
async getBlfx(){
let xdata=[]
let ydata=[]
let res=await getTableHzNoOkData(this.queryParams)
console.log('res不良分析',res)
res.map((item,index)=>{
xdata.push(item.dataType)
ydata.push(item.noOkQuality)
})
this.tableBlfx=res
console.log('table',this.tableBlfx)
this.getEchartsT(xdata,ydata)
},
change(e){
console.log('e',e)
this.dateNode=e,
this.queryParams.incomeTimeStr=null
},
getDictData() {
const _this = this;
getDictData(
{
dictType: 'static_dims',
}
).then((response) => {
if (response) {
console.log('response',response)
_this.jianyanNode = response
_this.queryParams.ymdms=_this.jianyanNode[2].ymdType
}
});
},
getEcharts(xData,yData){
var _this=this
var chartDom = document.getElementById('echartss');
var myChart = echarts.init(chartDom);
var option;
option = {
// title:{
// text:'\n\n\n%',
// left:'1%',
// top:'30%'
// },
grid: {
y: '10%',
x:'1%',
y2: '6%',
x2: '1%',
width:'95%',
containLabel: true
},
// legend: {
// top:0,
// right:120,
// icon: "roundRect",
// data:["%"],
// textStyle:{
// color:'#000',
// fontSize:12
// }
// },
xAxis: {
type: 'category',
name:_this.dateNode=='dd'?'时':_this.dateNode=='mm'?'日':'月',
splitLine: {
show: true //线
},
axisTick:{
show:false,
inside:true,
},
axisLabel:{
rotate: _this.queryParams.ymdms=='dd'?0:50,
fontSize:11
},
data: xData
},
yAxis: {
type: 'value',
show:true,
// boundaryGap:true,
axisLine:{
// show:true,
},
axisLabel:{
formatter:'{value}%'
}
// splitLine: {
// show: true
// },
// axisTick:{
// show:true,
// inside:true,
// alignWithLabel:true,
// },
},
series: [
{
name:'成品包装不良率%',
data: yData,
type: 'line',
symbol: "circle",
symbolSize: 5,
label:{
show:true,
fontSize:11
},
lineStyle: {
color: "rgba(12, 115, 242, 1)"
},
areaStyle:{
normal: {
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: "#fff" // 0%
}, {
offset: 1,
color: "rgba(12, 115, 242, 1)" // 100%
}], false)
},
}
}
]
};
option && myChart.setOption(option);
},
getEchartsT(xdata,ydata){
var chartDom = document.getElementById('echartTs');
var myChart2 = echarts.init(chartDom);
var option2;
option2 = {
// title:{
// text:'\n\n\n%',
// left:'1%',
// top:'30%'
// },
grid: {
y: '10%',
x:'1%',
y2: '6%',
x2: '2%',
width:'95%',
containLabel: true
},
// legend: {
// top:0,
// right:120,
// icon: "roundRect",
// data:["%"],
// textStyle:{
// color:'#000',
// fontSize:12
// }
// },
xAxis: {
type: 'category',
// splitLine: {
// show: true //线
// },
axisTick:{
show:false,
inside:true,
},
data: xdata
},
yAxis: {
type: 'value',
show:true,
// boundaryGap:true,
axisLine:{
// show:true,
},
// splitLine: {
// show: true
// },
// axisTick:{
// show:true,
// inside:true,
// alignWithLabel:true,
// },
},
series: [
{
name:'成品包装不良率%',
data: ydata,
type: 'bar',
// symbol: "circle",
// symbolSize: 5,
label:{
show:true,
position: "top",
},
lineStyle: {
color: "rgba(12, 115, 242, 1)"
},
barWidth: 30,
itemStyle:{
normal: {
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: "#fff" // 0%
}, {
offset: 1,
color: "rgba(12, 115, 242, 1)" // 100%
}], false)
},
}
}
]
};
option2 && myChart2.setOption(option2);
},
//
reset() {
this.form = {
recordId: null,
workorderId: null,
rfid: null,
factoryCode: null,
machineCode: null,
nowProcessId: null,
nextProcessId: null,
orderNum: null,
inTime: null,
outTime: null,
status: null,
remark: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
shiftId: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
console.log('queryForm',this.queryParams)
this.getThead()
this.getTbody()
this.getBlfx()
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.ymdms=null
this.queryParams.incomeTimeStr=null
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.recordId)
this.single = selection.length!==1
this.multiple = !selection.length
},
}
};
</script>
<style lang="scss" scoped>
.top-table{
display: flex;
justify-content: space-between;
width: 1450px;
height: 380px;
.top-left-table{
width: 48%;
height: 100%;
.title{
font-size: 14px;
color:#606266;
padding: 5px 0px;
font-weight: 600;
}
.tableStyle{
width: 100%;
// border-top: 1px solid #000;
// border-left: 1px solid #000;
thead{
tr{
text-align: center;
line-height: 25px;
background: #f8f8f9;
th{
padding: 0;
color:#606266;
border-bottom: 1px solid #dfe6ec;
// border-right: 1px solid #000;
// border-bottom: 1px solid #000;
}
}
}
tbody tr{
text-align: center;
line-height: 25px;
td{
padding: 0;
border-bottom: 1px solid #dfe6ec;
color:#86898b;
}
}
}
}
.top-right-table{
width: 48%;
height: 100%;
.title{
font-size: 14px;
color:#606266;
padding: 5px 0px;
font-weight: 600;
}
.tableStyle{
width: 100%;
// border-top: 1px solid #000;
// border-left: 1px solid #000;
thead{
tr{
text-align: center;
line-height: 50px;
background: #f8f8f9;
th{
padding: 0;
color:#606266;
border-bottom: 1px solid #dfe6ec;
// border-right: 1px solid #000;
// border-bottom: 1px solid #000;
}
}
}
tbody tr{
text-align: center;
line-height: 25px;
td{
padding: 0;
border-bottom: 1px solid #dfe6ec;
color:#86898b;
}
}
}
}
}
.bottom-echart{
display: flex;
justify-content: space-between;
width: 1450px;
height: 240px;
padding-top: 15px;
.left-echart{
width: 48%;
height: 100%;
.title{
font-size: 14px;
color:#606266;
padding: 5px 0px;
font-weight: 600;
}
}
.right-echart{
width: 48%;
height: 100%;
.title{
font-size: 14px;
color:#606266;
padding: 5px 0px;
font-weight: 600;
}
}
}
.tagbox {
display: flex;
/* overflow: scroll; */
position: relative;
width: 80%;
padding-left: 26px;
margin-bottom: 15px;
.tagboxlabel{
width: 100px;
text-align: right;
vertical-align: middle;
font-size: 14px;
color: black;
line-height: 40px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin-right: 12px;
}
.tag {
width: 720px;
border: 1px #DCDFE6 solid;
height: 60px;
padding: 5px 15px;
overflow-y: scroll;
.tagitem{
margin-left: 5px;
}
}
.button1{
width: 37px;
height: 37px;
position: absolute;
right: -39px;
top: 2px;
}
}
</style>

@ -0,0 +1,291 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="检验类型" prop="typeCode">
<el-select v-model="queryParams.typeCode" clearable placeholder="请选择类型" @change="getCheckTypeList">
<el-option
v-for="dict in dict.type.check_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="检验节点" prop="checkType">
<el-select v-model="queryParams.checkType" clearable placeholder="请选择检验节点">
<el-option
v-for="dict in checkTypeList"
:key="dict.checkType"
:label="dict.checkName"
:value="dict.checkType"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="来料月份" prop="incomeTimeYM">
<el-date-picker
v-model="queryParams.incomeTimeYM"
format="yyyy-MM"
type="month"
placeholder="选择月">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['quality:project:export']"
>导出</el-button>
</el-col>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
<el-table-column label="日期" align="center" prop="ymdms" width="150" />
<template v-for="(column, index) in showTitles1">
<el-table-column align="center" min-width="120" :prop="column.id" :key="column.id" :label="column.titleName"/>
</template>
<el-table-column label="抽样总数" align="center" prop="quantity" min-width="100" />
<template v-for="(column, index) in showTitles2">
<el-table-column align="center" min-width="120" :prop="column.id" :key="column.id" :label="column.titleName"/>
</template>
<el-table-column label="不良总数" align="center" prop="quantity" min-width="100" />
<el-table-column label="不良率" align="center" prop="quantity" min-width="100" />
<el-table-column label="抽检批数" align="center" prop="quantity" min-width="100" />
<el-table-column label="不合格批数" align="center" prop="quantity" min-width="100" />
<el-table-column label="不合格批次率" align="center" prop="quantity" min-width="100" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { getTableHzTitle,
getCheckTypeList,
} from "@/api/quality/qcTable";
import moment from 'moment';
export default {
name: "qcTableCheckHz",
dicts: ["check_type"],
components: {},
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
tableList: [],
showTitles1: [],
showTitles2: [],
//
title: "",
//
open: false,
checkTypeList: [],
//
queryParams: {
incomeTimeYM:null,
incomeTimeArray: [],
checkTimeArray: [],
pageNum: 1,
pageSize: 10,
workorderId: null,
rfid: null,
factoryCode: null,
machineCode: null,
nowProcessId: null,
nextProcessId: null,
orderNum: null,
inTime: null,
outTime: null,
status: null,
shiftId: null,
productCode: null,
supplierName: '',
supplierCode: ''
},
//
form: {},
//
rules: {
}
};
},
mounted(){
this.getDate();
this.getList();
},
created() {
},
methods: {
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0)
this.queryParams.incomeTimeYM=start
},
Fungetdate (num) {
var dd = new Date();
dd.setDate(dd.getDate() + num);
var y = dd.getFullYear();
var m = dd.getMonth() + 1;//
var d = dd.getDate();
return y + "-" + m;
},
/** 查询列表 */
getList() {
this.loading = true;
if(this.queryParams.incomeTimeYM!=null){
this.queryParams.yearMonth = moment(this.queryParams.incomeTimeYM).format('YYYY-MM');
}
//Table
getTableHzTitle(this.queryParams).then(response => {
this.showTitles1 = [];
for(let i=0;i<response.columns1.length;i++){
var pobj={};
pobj.id="colone"+i;
pobj.titleName = response[i];
this.showTitles1.push(pobj)
}
this.showTitles2 = [];
for(let i=0;i<response.columns2.length;i++){
var pobj={};
pobj.id="coltwo"+i;
pobj.titleName = response[i];
this.showTitles2.push(pobj)
}
});
//Table
getTableData(this.queryParams).then(response => {
this.hourProList = response;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
recordId: null,
workorderId: null,
rfid: null,
factoryCode: null,
machineCode: null,
nowProcessId: null,
nextProcessId: null,
orderNum: null,
inTime: null,
outTime: null,
status: null,
remark: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
shiftId: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
getCheckTypeList(val) {
//
getCheckTypeList(val).then((response) => {
this.checkTypeList = response;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/rfidProcess/export', {
...this.queryParams
}, `rfidProcess_${new Date().getTime()}.xlsx`)
},
}
};
</script>
<style lang="scss" scoped>
.tagbox {
display: flex;
/* overflow: scroll; */
position: relative;
width: 80%;
padding-left: 26px;
margin-bottom: 15px;
.tagboxlabel{
width: 100px;
text-align: right;
vertical-align: middle;
font-size: 14px;
color: black;
line-height: 40px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin-right: 12px;
}
.tag {
width: 720px;
border: 1px #DCDFE6 solid;
height: 60px;
padding: 5px 15px;
overflow-y: scroll;
.tagitem{
margin-left: 5px;
}
}
.button1{
width: 37px;
height: 37px;
position: absolute;
right: -39px;
top: 2px;
}
}
</style>

@ -0,0 +1,358 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" style="margin-bottom: -34px;">
<el-form-item label="来料月份" prop="incomeTimeYM">
<el-date-picker
v-model="queryParams.incomeTimeYM"
format="yyyy-MM"
type="month"
placeholder="选择月">
</el-date-picker>
</el-form-item>
<el-form-item label="供应商" prop="supplierCodeArray">
<div class="tagbox">
<div class="tag" style="" placeholder="请选择供应商">
<el-tag
:key="index"
class="tagitem"
v-for="(tag, index) in selectMaterielListtag"
closable
:disable-transitions="false"
@close="handleClose(tag)"
>
{{ tag.supplierName }}
</el-tag>
</div>
<el-button
slot="append"
class="button1"
@click="handleSelectSupplier"
icon="el-icon-search"
></el-button>
<el-row style="display: none;">
<el-input type="input" clearable v-model="queryParams.supplierCode" placeholder="点击选择物料"/>
<el-input type="input"clearable v-model="queryParams.supplierName" placeholder="点击选择物料"/>
</el-row>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['mes:rfidProcess:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="incomeList" @selection-change="handleSelectionChange">
<el-table-column label="供应商编号" align="center" prop="supplierCode" width="120" fixed/>
<el-table-column label="供应商名称" align="left" prop="supplierName" width="390" fixed/>
<el-table-column label="总批数" align="center" prop="batchs" width="90"/>
<el-table-column label="合格批次" align="center" prop="okBatchs" width="100"/>
<el-table-column label="不合格批次" align="center" prop="noOkBatchs" width="100"/>
<el-table-column label="批次不良率" align="center" prop="noOkBatchRate" width="100"/>
<el-table-column label="总数量" align="center" prop="nums" width="90"/>
<el-table-column label="合格数量" align="center" prop="okNums" width="100"/>
<el-table-column label="不合格数量" align="center" prop="noOkNums" width="100"/>
<el-table-column label="数量不良率" align="center" prop="noOkNumRate" width="100"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { getIncomeTableList} from "@/api/quality/qcTable";
import moment from 'moment';
export default {
name: "qcTableCheckOrder",
components: {},
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// rfid
incomeList: [],
//
title: "",
//
open: false,
// -listtag
selectMaterielListtag:[],
//
queryParams: {
incomeTimeYM:null,
incomeTimeArray: [],
checkTimeArray: [],
pageNum: 1,
pageSize: 10,
workorderId: null,
rfid: null,
factoryCode: null,
machineCode: null,
nowProcessId: null,
nextProcessId: null,
orderNum: null,
inTime: null,
outTime: null,
status: null,
shiftId: null,
productCode: null,
supplierName: '',
supplierCode: ''
},
//
form: {},
//
rules: {
workorderId: [
{ required: true, message: "工单ID不能为空", trigger: "blur" }
],
rfid: [
{ required: true, message: "rfid号不能为空", trigger: "blur" }
],
}
};
},
mounted(){
this.getDate();
this.getList();
},
created() {
},
methods: {
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0)
this.queryParams.incomeTimeYM=start
},
Fungetdate (num) {
var dd = new Date();
dd.setDate(dd.getDate() + num);
var y = dd.getFullYear();
var m = dd.getMonth() + 1;//
var d = dd.getDate();
return y + "-" + m;
},
/** 查询列表 */
getList() {
this.loading = true;
if(this.queryParams.incomeTimeYM!=null){
this.queryParams.yearMonth = moment(this.queryParams.incomeTimeYM).format('YYYY-MM');
}
getIncomeTableList(this.queryParams).then(response => {
this.incomeList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
recordId: null,
workorderId: null,
rfid: null,
factoryCode: null,
machineCode: null,
nowProcessId: null,
nextProcessId: null,
orderNum: null,
inTime: null,
outTime: null,
status: null,
remark: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
shiftId: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.recordId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加生产rfid流程";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const recordId = row.recordId || this.ids
getRfidProcess(recordId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改生产rfid流程";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.recordId != null) {
updateRfidProcess(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addRfidProcess(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const recordIds = row.recordId || this.ids;
this.$modal.confirm('是否确认删除生产rfid流程编号为"' + recordIds + '"的数据项?').then(function() {
return delRfidProcess(recordIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/rfidProcess/export', {
...this.queryParams
}, `rfidProcess_${new Date().getTime()}.xlsx`)
},
/**供应商选择弹出框**/
handleSelectSupplier() {
this.$refs.itemSelectSupplier.showFlag = true;
},
//
onSelectSupplier(objs) {
var code = '';
var desc = '';
for (let i = 0; i < objs.length; i++) {
if(this.queryParams.supplierCode.indexOf(objs[i].supplierCode)<0){
code = code + objs[i].supplierCode + ',';
this.selectMaterielListtag.push(objs[i])
}else{
this.$message({
message: objs[i].supplierName+'已经选择',
type: 'warning'
})
}
if(this.queryParams.supplierName.indexOf(objs[i].supplierName)<0){
desc = desc + objs[i].supplierName + ',';
}
}
this.queryParams.supplierCode += code;
this.queryParams.supplierName += desc;
},
//
handleClose(tag) {
this.selectMaterielListtag.splice(this.selectMaterielListtag.indexOf(tag.supplierName), 1);
var code = "";
var desc = "";
for (let i = 0; i < this.selectMaterielListtag.length; i++) {
code = code + this.selectMaterielListtag[i].supplierCode + ",";
desc = desc + this.selectMaterielListtag[i].supplierName + ",";
}
this.queryParams.supplierCode += code;
this.queryParams.supplierName += desc;
}
}
};
</script>
<style lang="scss" scoped>
.tagbox {
display: flex;
/* overflow: scroll; */
position: relative;
width: 80%;
padding-left: 26px;
margin-bottom: 15px;
.tagboxlabel{
width: 100px;
text-align: right;
vertical-align: middle;
font-size: 14px;
color: black;
line-height: 40px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin-right: 12px;
}
.tag {
width: 720px;
border: 1px #DCDFE6 solid;
height: 60px;
padding: 5px 15px;
overflow-y: scroll;
.tagitem{
margin-left: 5px;
}
}
.button1{
width: 37px;
height: 37px;
position: absolute;
right: -39px;
top: 2px;
}
}
</style>

@ -120,12 +120,12 @@
</el-table-column>
<el-table-column label="计划数量" align="center" prop="planNumber" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="已入库数量" align="center" prop="realityNumber" v-if="false" />
<el-table-column label="已入库数量" align="center" prop="realityNumber" />
<el-table-column label="订单状态" align="center" prop="orderStatus">
<template slot-scope="scope">
<span v-if="scope.row.orderStatus === '0'"></span>
<span v-else-if="scope.row.orderStatus === '1'">进行</span>
<span v-else-if="scope.row.orderStatus === '2'">完成</span>
<span v-if="scope.row.orderStatus === '0'"></span>
<span v-else-if="scope.row.orderStatus === '1'">收货</span>
<span v-else-if="scope.row.orderStatus === '2'">收货完成</span>
</template>
</el-table-column>
<el-table-column label="供应商编码" align="center" prop="supplierCode" />

@ -59,7 +59,6 @@
<el-table-column label="单位" align="center" prop="unit" v-if="false" />
<el-table-column label="计划数量" align="center" prop="planNumber" />
<el-table-column label="出库数量" align="center" prop="outNumber" />
<!-- <el-table-column label="托盘号" align="center" prop="userDefined2" /> -->
<el-table-column label="需求时间" align="center" prop="userDefined5" />
<el-table-column label="仓库编号" align="center" prop="locCode" />
<el-table-column label="库位名称" align="center" prop="locDesc" v-if="false" />
@ -83,24 +82,16 @@
</template>
</el-table-column>
<el-table-column label="过账凭证" align="center" prop="userDefined9" />
<!-- <el-table-column label="sap过账信息" align="center" prop="userDefined11" />-->
<el-table-column label="sap订单过账信息" align="center" prop="userDefined11" />
<!-- <el-table-column label="sap反冲过账信息" align="center" prop="sapXMag" />-->
<el-table-column label="操作人" align="center" prop="createBy" />
<el-table-column label="操作时间" align="center" prop="createDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<!--
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['wms:outorder:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['wms:outorder:remove']">删除</el-button>
</template>
</el-table-column> -->
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"

@ -317,15 +317,7 @@
<el-form-item label="69码" prop="skuBarcode">
<el-input v-model="form.skuBarcode" placeholder="请输入69码" />
</el-form-item>
<el-form-item label="长" prop="length">
<el-input v-model="form.length" placeholder="请输入长" />
</el-form-item>
<el-form-item label="宽" prop="width">
<el-input v-model="form.width" placeholder="请输入宽" />
</el-form-item>
<el-form-item label="高" prop="height">
<el-input v-model="form.height" placeholder="请输入高" />
</el-form-item>
<el-form-item label="毛重" prop="grossWeight">
<el-input v-model="form.grossWeight" placeholder="请输入毛重" />
</el-form-item>
@ -386,7 +378,7 @@
</el-form-item>
<el-form-item label="标准模板" prop="mvgr5">
<el-input v-model="form.mvgr5" placeholder="请输入建议标准模板" />
<el-input v-model="form.mvgr5" placeholder="请输入建议标准模板" style="width: 320px" />
</el-form-item>
<el-form-item label="是否启用" prop="activeFlag">
@ -405,6 +397,23 @@
></el-option>
</el-select>
</el-form-item>
<el-row>
<el-col :span="8">
<el-form-item label="长" prop="length" label-width="50px">
<el-input type="number" v-model="form.length" placeholder="请输入长" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="宽" prop="width" label-width="50px">
<el-input type="number" v-model="form.width" placeholder="请输入宽" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="高" prop="height" label-width="50px">
<el-input type="number" v-model="form.height" placeholder="请输入高" />
</el-form-item>
</el-col>
</el-row>
<!-- <el-form-item label="${comment}" prop="syncFlag">
<el-input v-model="form.syncFlag" placeholder="请输入${comment}" />
</el-form-item>

@ -111,7 +111,7 @@
<el-table-column label="产线名称" align="center" prop="lineName" width="200px" />
<el-table-column label="数量" align="center" prop="quantity" />
<el-table-column label="托盘号" align="center" prop="sn" width="200px"/>
<el-table-column label="标识卡" align="center" prop="userDefined1" width="200px"/>
<el-table-column label="记录日期" align="center" prop="productDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.productDate, '{y}-{m}-{d}') }}</span>

Loading…
Cancel
Save