Merge remote-tracking branch 'origin/master'

master
mengjiao 1 year ago
commit d8adad0dba

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 获取工厂下拉列表
export function finishProductBoard(data) {
return request({
url: '/mes/mesborad/finishProductBoard',
method: 'post',
data: data
});
}

@ -0,0 +1,51 @@
import request from '@/utils/request'
// 查询unitprice列表
export function listChildprocess(query) {
return request({
url: '/mes/childprocess/list',
method: 'get',
params: query
});
}
// 查询全部列表
export function listChildprocessall(query) {
return request({
url: '/mes/childprocess/listall',
method: 'get',
params: query
});
}
// 查询unitprice详细
export function getChildprocess(childprocessId) {
return request({
url: '/mes/childprocess/' + childprocessId,
method: 'get'
});
}
// 新增unitprice
export function addChildprocess(data) {
return request({
url: '/mes/childprocess',
method: 'post',
data: data
});
}
// 修改unitprice
export function updateChildprocesse(data) {
return request({
url: '/mes/childprocess',
method: 'put',
data: data
});
}
// 删除unitprice
export function delChildprocesse(childprocessId) {
return request({
url: '/mes/childprocess/' + childprocessId,
method: 'delete'
});
}

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询unitPrice列表
export function listUnitPrice(query) {
return request({
url: '/mes/unitPrice/list',
method: 'get',
params: query
});
}
// 查询unitPrice详细
export function getUnitPrice(picId) {
return request({
url: '/mes/unitPrice/' + picId,
method: 'get'
});
}
// 新增unitPrice
export function addUnitPrice(data) {
return request({
url: '/mes/unitPrice',
method: 'post',
data: data
});
}
// 修改unitPrice
export function updateUnitPrice(data) {
return request({
url: '/mes/unitPrice',
method: 'put',
data: data
});
}
// 删除unitPrice
export function delUnitPrice(picId) {
return request({
url: '/mes/unitPrice/' + picId,
method: 'delete'
});
}

@ -72,4 +72,12 @@ export function getProjectInfoList(query) {
method: 'get',
params: query
});
}
}
//方案下拉
export function getProjectOptions(query) {
return request({
url: '/quality/checkTypeProject/getProjectOptions',
method: 'get',
params: query
});
}

@ -0,0 +1,93 @@
import request from '@/utils/request'
// 查询来料报告列表
export function listIncome(query) {
return request({
url: '/quality/qcFirstReport/list',
method: 'get',
params: query
});
}
// 查询来料报告详细
export function getIncome(recordId) {
return request({
url: '/quality/qcFirstReport/' + recordId,
method: 'get'
});
}
// 新增来料报告
export function addIncome(data) {
return request({
url: '/quality/qcFirstReport',
method: 'post',
data: data
});
}
// 修改来料报告
export function updateIncome(data) {
return request({
url: '/quality/qcFirstReport',
method: 'put',
data: data
});
}
// 删除来料报告
export function delIncome(recordId) {
return request({
url: '/quality/qcFirstReport/' + recordId,
method: 'delete'
});
}
// 查询BOM物料管理列表
export function getQcListBom(query) {
return request({
url: '/quality/qcFirstReport/getQcListBom',
method: 'get',
params: query
});
}
// 查询供应商管理列表
export function getQcListSupplier(query) {
return request({
url: '/quality/qcFirstReport/getQcListSupplier',
method: 'get',
params: query
});
}
// 查询人员列表
export function getQcListUser(query) {
return request({
url: '/quality/qcFirstReport/getQcListUser',
method: 'get',
params: query
});
}
//状态修改
export function changeIncomeStatus(recordId, status) {
const data = {
recordId,
status
}
return request({
url: '/quality/qcFirstReport/changeIncomeStatus',
method: 'put',
data: data
})
}
// 查询检测项列表
export function getCkeckProjectList(query) {
return request({
url: '/quality/qcFirstReport/getCkeckProjectList',
method: 'get',
params: query
});
}

@ -24,4 +24,28 @@ export function getWorkcenterList() {
url: '/quality/staticTable/getWorkcenterList',
method: 'get'
});
}
}
export function getXJCheckTableList(query) {
return request({
url: '/quality/staticTable/getXJCheckTableList',
method: 'get',
params: query
});
}
export function getXJCheckTableDetail(query) {
return request({
url: '/quality/staticTable/getXJCheckTableDetail',
method: 'get',
params: query
});
}
export function getXJChartData(query) {
return request({
url: '/quality/staticTable/getXJChartData',
method: 'get',
params: query
});
}

@ -114,3 +114,21 @@ export function getAuxiliaryEquipmentList(query) {
params: query
});
}
// 查询维修记录
export function getWXRecordsList(query) {
return request({
url: '/wms/equipment/getWXRecordsList',
method: 'get',
params: query
});
}
// 查询保养记录
export function getBYRecordsList(query) {
return request({
url: '/wms/equipment/getBYRecordsList',
method: 'get',
params: query
});
}

@ -8,7 +8,14 @@ export function listProduct(query) {
params: query
});
}
// 查询物料信息列表
export function listProductall(query) {
return request({
url: '/wms/product/listall',
method: 'get',
params: query
});
}
// 查询物料信息详细
export function getProduct(productId) {
return request({

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

@ -127,7 +127,12 @@ export const constantRoutes = [
component: () => import("@/views/kanban/quality/circle"),
hidden: true,
},
{
path: "/kanban/finishproduct",
component: () => import("@/views/kanban/finishproduct/index"),
hidden: true,
},
]
// 动态路由,基于用户权限动态去加载

@ -518,13 +518,21 @@
</el-select>
</el-form-item>
<el-form-item label="故障描述" prop="workFaultDesc">
<el-input
<el-select
v-model="form.workFaultDesc"
placeholder="请输入故障描述"
@change="$forceUpdate()"
clearable
filterable
style="width: 280px"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
/>
@keyup.enter.native="handleQuery"
>
<el-option
v-for="item in workFaultDescOption"
:key="item.faultCode"
:label="item.faultSubclass"
:value="item.faultSubclass"
></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -1061,7 +1069,11 @@
</el-col>
<el-col :span="8">
<el-form-item label="维修用时" prop="workCostTime">
<el-input v-model="form.workCostTime" style="width: 250px" disabled>
<el-input
v-model="form.workCostTime"
style="width: 250px"
disabled
>
</el-input>
</el-form-item>
</el-col>
@ -1092,11 +1104,11 @@
<el-select
v-model="form.workReason"
placeholder="请选择故障原因"
@change="$forceUpdate()"
clearable
filterable
style="width: 250px"
@keyup.enter.native="handleQuery"
@change="$forceUpdate()"
clearable
filterable
style="width: 250px"
@keyup.enter.native="handleQuery"
>
<el-option
v-for="item in workReasonOption"
@ -1112,11 +1124,11 @@
<el-select
v-model="form.repairMeasures"
placeholder="请选择处理措施"
@change="$forceUpdate()"
clearable
filterable
style="width: 250px"
@keyup.enter.native="handleQuery"
@change="$forceUpdate()"
clearable
filterable
style="width: 250px"
@keyup.enter.native="handleQuery"
>
<el-option
v-for="item in repairMeasuresOption"
@ -1450,12 +1462,12 @@
<el-form-item label="故障原因" prop="workReason">
<el-select
v-model="form.workReason"
@change="$forceUpdate()"
disabled
clearable
filterable
style="width: 250px"
@keyup.enter.native="handleQuery"
@change="$forceUpdate()"
disabled
clearable
filterable
style="width: 250px"
@keyup.enter.native="handleQuery"
>
<el-option
v-for="item in workReasonOption"
@ -1470,12 +1482,12 @@
<el-form-item label="处理措施" prop="repairMeasures">
<el-select
v-model="form.repairMeasures"
@change="$forceUpdate()"
clearable
filterable
disabled
style="width: 250px"
@keyup.enter.native="handleQuery"
@change="$forceUpdate()"
clearable
filterable
disabled
style="width: 250px"
@keyup.enter.native="handleQuery"
>
<el-option
v-for="item in repairMeasuresOption"
@ -1520,6 +1532,7 @@ import {
} from "@/api/device/repairOrder";
import { listFaultReason } from "@/api/device/faultReason";
import { listFaultMeasures } from "@/api/device/faultMeasures";
import { listFaultDescription } from "@/api/device/faultDescription";
import { getMaintenanceTeamList } from "@/api/device/equTeam";
import ItemSelect from "./selectSingleEquipment.vue";
import ItemSelectPerson from "./selectSinglePerson.vue";
@ -1566,8 +1579,10 @@ export default {
"text-align": "center",
width: "250px",
},
//
workFaultDescOption : [],
//
repairMeasuresOption : [],
repairMeasuresOption: [],
//
workReasonOption: [],
//
@ -1723,13 +1738,14 @@ export default {
this.getEquFaultTypeTree();
this.getWorkReason();
this.getRepairMeasures();
this.getOrderDesc();
},
methods: {
//
indexMethod(index) {
return index + 1;
},
// -
// -
listeningTime() {
if (this.form.workEndTime != null && this.form.workStartTime != null) {
var time1 = moment(this.form.workStartTime);
@ -1739,25 +1755,19 @@ export default {
console.log("打印维修时间", _data);
//
this.form.workCostTime =
_data.years +
"年" +
_data.months +
"月" +
_data.days +
"日" +
_data.hours +
"小时" +
_data.minutes +
"分" +
_data.seconds +
"秒";
(
_data.days * 24 +
_data.hours +
_data.minutes / 60 +
_data.seconds / 3600
).toFixed(1) + "小时";
}
},
// -
// listeningDownTime() {
// if (this.form.actualDownEndTime != null && this.form.actualDownStartTime != null) {
// var time1 = moment(this.form.actualDownStartTime);
// var time2 = moment(this.form.actualDownEndTime);
// -
// listeningTime() {
// if (this.form.workEndTime != null && this.form.workStartTime != null) {
// var time1 = moment(this.form.workStartTime);
// var time2 = moment(this.form.workEndTime);
// let duration = moment.duration(time2.diff(time1));
// let { _data } = duration;
// console.log("", _data);
@ -1786,6 +1796,13 @@ export default {
this.loading = false;
});
},
/** 查询故障描述列表 */
getOrderDesc() {
this.loading = true;
listFaultDescription(this.auxiliaryQueryParams).then((response) => {
this.workFaultDescOption = response.rows;
});
},
/** 查询维修原因列表 */
getWorkReason() {
this.loading = true;
@ -1841,8 +1858,7 @@ export default {
},
// -
cancelQueryWriteForm() {
this.openWrite = false;
this.reset();
this.queryWrite = false;
},
//
reset() {

@ -99,6 +99,18 @@
prop="applyPeople"
width="80"
/>
<el-table-column
label="单价"
align="center"
prop="unitPrice"
width="100"
/>
<el-table-column
label="总价"
align="center"
prop="totalPrice"
width="100"
/>
<el-table-column
label="批准人"
align="center"
@ -326,6 +338,8 @@ export default {
spareApplyList.workCode = this.queryParams.workCode;
spareApplyList.storageId = item.storageId;
spareApplyList.amount = item.amount;
spareApplyList.unitPrice = item.unitPrice;
spareApplyList.totalPrice = (item.spareQuantity)*(item.unitPrice);
spareApplyLists.push(spareApplyList);
});
this.form.spareApplyLists = spareApplyLists;

@ -104,6 +104,7 @@
<span>{{ scope.row.amount - scope.row.storageAmount }}</span>
</template>
</el-table-column>
<el-table-column label="单价" align="center" prop="unitPrice" />
<el-table-column label="领用数量" align="center" prop="spareQuantity">
<template slot-scope="scope">
<el-input

@ -205,6 +205,18 @@
width="150"
/>
<el-table-column label="领用数量" align="center" prop="spareQuantity" />
<el-table-column
label="单价"
align="center"
prop="unitPrice"
width="100"
/>
<el-table-column
label="总价"
align="center"
prop="totalPrice"
width="100"
/>
<!-- <el-table-column label="使用组线" align="center" prop="spareGroupLine" /> -->
<el-table-column
label="领用时间"

@ -1,10 +1,12 @@
<template>
<el-carousel :interval="3000" :height="dataHeight" indicator-position="outside" @change="handleScroll">
<div class="fullscreen-carousel">
<el-carousel :interval="3000" indicator-position="outside" @change="handleScroll">
<el-carousel-item v-for="(item,k) in 2" :key="item" >
<h3 v-if="k===0"><cards :dataProp="cards" /></h3>
<h3 v-if="k===1"><cards2 :dataProp="cardss"/></h3>
</el-carousel-item>
</el-carousel>
</div>
</template>
<script>
@ -140,12 +142,13 @@ export default {
}
</script>
<style scoped>
<style>
.fullscreen-carousel {
height: 100vh; /* 设置高度为视口高度 */
width: 100%; /* 设置宽度为100% */
}
.el-carousel__container{
height: 100vh; /* 设置高度为视口高度 */
width: 100%; /* 设置宽度为100% */
}
</style>

@ -1,36 +1,167 @@
<!--<template>-->
<!-- <div id="data-view">-->
<!-- <div id="dv-full-screen-container" >-->
<!--&lt;!&ndash; <p class="time">&ndash;&gt;-->
<!--&lt;!&ndash; {{ gettimedata }}&ndash;&gt;-->
<!--&lt;!&ndash; </p>&ndash;&gt;-->
<!-- <top-header />-->
<!-- <div class="main-content">-->
<!-- <digital-flop />-->
<!-- <div class="block-left-right-content">-->
<!--&lt;!&ndash; <ranking-board />&ndash;&gt;-->
<!-- <div class="block-top-bottom-content">-->
<!--&lt;!&ndash; <div class="block-top-content">&ndash;&gt;-->
<!--&lt;!&ndash; <rose-chart />&ndash;&gt;-->
<!--&lt;!&ndash; <water-level-chart />&ndash;&gt;-->
<!--&lt;!&ndash; <scroll-board />&ndash;&gt;-->
<!-- <carousel />-->
<!--&lt;!&ndash; </div>&ndash;&gt;-->
<!--&lt;!&ndash; <cards2 />&ndash;&gt;-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!--</template>-->
<!--<script>-->
<!--import topHeader from './topHeader'-->
<!--import digitalFlop from './digitalFlop'-->
<!--import rankingBoard from './rankingBoard'-->
<!--import roseChart from './roseChart'-->
<!--import waterLevelChart from './waterLevelChart'-->
<!--import scrollBoard from './scrollBoard'-->
<!--import carousel from './carousel'-->
<!--import cards2 from './cards2'-->
<!--import moment from "moment";-->
<!--export default {-->
<!-- name: 'DataView',-->
<!-- components: {-->
<!-- topHeader,-->
<!-- digitalFlop,-->
<!-- rankingBoard,-->
<!-- roseChart,-->
<!-- waterLevelChart,-->
<!-- scrollBoard,-->
<!-- cards2,-->
<!-- carousel-->
<!-- },-->
<!-- data () {-->
<!-- return {-->
<!-- gettimedata: "",-->
<!-- }-->
<!-- },-->
<!-- mounted() {-->
<!-- this.gettime();-->
<!-- },-->
<!-- methods: {-->
<!-- gettime() {-->
<!-- this.gettimedata = moment().format("YYYY-MM-DD HH:mm:ss ");-->
<!-- setInterval(() => {-->
<!-- this.gettimedata = moment().format("YYYY-MM-DD HH:mm:ss ");-->
<!-- }, 1000);-->
<!-- },-->
<!-- }-->
<!--}-->
<!--</script>-->
<!--<style lang="less">-->
<!--#data-view {-->
<!-- width: 100%;-->
<!-- height: 100%;-->
<!-- background-color: #030409;-->
<!-- color: #fff;-->
<!-- #dv-full-screen-container {-->
<!-- background-image: url('../../../assets/images/bg-exception.png');-->
<!-- background-size: 100% 100%;-->
<!-- box-shadow: 0 0 3px blue;-->
<!-- display: flex;-->
<!-- flex-direction: column;-->
<!-- overflow: auto;-->
<!-- }-->
<!-- .main-content {-->
<!-- flex: 1;-->
<!-- display: flex;-->
<!-- flex-direction: column;-->
<!-- }-->
<!-- .block-left-right-content {-->
<!-- flex: 1;-->
<!-- display: flex;-->
<!-- margin-top: 10px;-->
<!-- }-->
<!-- .block-top-bottom-content {-->
<!-- flex: 1;-->
<!-- display: flex;-->
<!-- flex-direction: column;-->
<!-- box-sizing: border-box;-->
<!-- padding-left: 0px;-->
<!-- }-->
<!-- .block-top-content {-->
<!-- height: 55%;-->
<!-- display: flex;-->
<!-- flex-grow: 0;-->
<!-- box-sizing: border-box;-->
<!-- padding-bottom: 20px;-->
<!-- }-->
<!-- .time {-->
<!-- font-size: 30px;-->
<!-- font-weight: 400;-->
<!-- color: #ffffff;-->
<!-- line-height: 71px;-->
<!-- position: fixed;-->
<!-- top: 0;-->
<!-- z-index: 9999;;-->
<!-- padding: 10px;-->
<!-- width: 100%;-->
<!-- }-->
<!--}-->
<!--</style>-->
<template>
<div id="data-view">
<div id="dv-full-screen-container" style="width:100vw;height:100vh">
<!-- <p class="time">-->
<!-- {{ gettimedata }}-->
<!-- </p>-->
<dv-full-screen-container>
<top-header />
<div class="main-content">
<digital-flop />
<div class="block-left-right-content">
<carousel />
<!-- <div class="block-left-right-content">-->
<!-- <ranking-board />-->
<div class="block-top-bottom-content">
<!-- <div class="block-top-bottom-content">-->
<!-- <div class="block-top-content">-->
<!-- <rose-chart />-->
<!-- <water-level-chart />-->
<!-- <scroll-board />-->
<carousel />
<!-- </div>-->
<!-- <cards2 />-->
</div>
</div>
<!-- <cards />-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
</dv-full-screen-container>
</div>
</template>
<script>
@ -40,9 +171,8 @@ import rankingBoard from './rankingBoard'
import roseChart from './roseChart'
import waterLevelChart from './waterLevelChart'
import scrollBoard from './scrollBoard'
import cards from './cards'
import carousel from './carousel'
import cards2 from './cards2'
import moment from "moment";
export default {
name: 'DataView',
@ -53,25 +183,13 @@ export default {
roseChart,
waterLevelChart,
scrollBoard,
cards2,
cards,
carousel
},
data () {
return {
gettimedata: "",
}
},
mounted() {
this.gettime();
return {}
},
methods: {
gettime() {
this.gettimedata = moment().format("YYYY-MM-DD HH:mm:ss ");
setInterval(() => {
this.gettimedata = moment().format("YYYY-MM-DD HH:mm:ss ");
}, 1000);
},
}
methods: {}
}
</script>
@ -88,7 +206,6 @@ export default {
box-shadow: 0 0 3px blue;
display: flex;
flex-direction: column;
overflow: auto;
}
.main-content {
@ -100,7 +217,7 @@ export default {
.block-left-right-content {
flex: 1;
display: flex;
margin-top: 10px;
margin-top: 20px;
}
.block-top-bottom-content {
@ -108,7 +225,7 @@ export default {
display: flex;
flex-direction: column;
box-sizing: border-box;
padding-left: 0px;
padding-left: 20px;
}
.block-top-content {
@ -118,18 +235,5 @@ export default {
box-sizing: border-box;
padding-bottom: 20px;
}
.time {
font-size: 30px;
font-weight: 400;
color: #ffffff;
line-height: 71px;
position: fixed;
top: 0;
z-index: 9999;;
padding: 10px;
width: 100%;
}
}
</style>

@ -0,0 +1,104 @@
<template>
<div class="bottom-right-table-1">
<dv-border-box-6>
<div class="table-name">
<dv-scroll-board :config="getScrollBoardConfig()" />
</div>
</dv-border-box-6>
</div>
</template>
<script>
export default {
name: 'BottomRightTable1',
props: {
tableData: {
type: Array,
default: () => []
}
},
data () {
return {
config:{
header: ['工单号', '产线名称', '产品名称', '生产数量', '单位'],
data: [
],
index: true,
columnWidth: [100, 150, 100, 501, 200, 52],
align: ['center'],
oddRowBGC: 'rgba(9, 37, 50, 0.4)',
evenRowBGC: 'rgba(10, 32, 50, 0.3)'
}
}
},
watch: {
// tableData config data
tableData(newVal) {
console.log("newVal-",newVal)
this.config.data = this.formatTableData(newVal);
}
},
methods: {
getScrollBoardConfig() {
return {
header: ['工单号', '产线名称', '产品名称', '生产数量', '单位'],
data: this.config.data,
index: true,
columnWidth: [100, 150, 100, 501, 200, 52],
align: ['center'],
oddRowBGC: 'rgba(9, 37, 50, 0.4)',
evenRowBGC: 'rgba(10, 32, 50, 0.3)'
}
},
// tableData
formatTableData(data = this.tableData) {
return data.map(item => [
item.workorder_code,
item.equipment_name,
item.product_name,
item.total_quantity,
item.unit
]);
}
}
};
</script>
<style lang="less">
.bottom-right-table-1 {
width: calc(~"100% + 10px");
height: 100%;
margin: 0 -5px;
.border-box-content {
padding: 20px;
box-sizing: border-box;
}
.table-name {
height: 330px;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 15px;
img {
width: 79px;
height: 30px;
margin-right: 5px;
}
}
.grid-container {
display: grid;
grid-template-rows: repeat(2, auto); /* 每行的高度为内容的高度 */
gap: 10px; /* 调整行之间的垂直间距 */
}
.dv-scroll-board {
height: calc(~"100% - 0px");
}
}
</style>

@ -0,0 +1,112 @@
<template>
<div class="top-left-cmp">
<div class="dc-left">
<dv-border-box-5>
<div class="main-value"><span>{{ data.sumplanquantity }}</span></div>
<!-- <div class="compare-value"><span>同比</span>81</div>-->
<!-- <div class="compare-value"><span>环比</span>15</div>-->
</dv-border-box-5>
<div class="dc-text">
当日产量
<dv-decoration-3 style="width:200px;height:20px;" />
</div>
</div>
<div class="dc-right">
<div class="dc-text">
当日计划
<dv-decoration-3 style="width:200px;height:20px;" />
</div>
<dv-border-box-5 :reverse="true">
<div class="main-value"><span>{{ data.sumFinshQuantity }}</span></div>
<!-- <div class="compare-value"><span>同比</span>66</div>-->
<!-- <div class="compare-value"><span>环比</span>9</div>-->
</dv-border-box-5>
</div>
</div>
</template>
<script>
export default {
name: 'TopLeftCmp',
props: {
data: []
},
data() {
return {
// Accessing the prop directly in the data function
receivedValue: this.data,
};
},
watch: {
data(newVal) {
// Watching the data prop for changes
this.receivedValue = newVal;
},
},
}
</script>
<style lang="less">
.top-left-cmp {
display: flex;
.dc-left, .dc-right {
width: 50%;
}
.dv-border-box-5 {
height: 60%;
}
.dc-text {
display: flex;
flex-direction: column;
height: 40%;
font-size: 20px;
padding: 20px;
box-sizing: border-box;
}
.dc-left .dc-text {
align-items: flex-end;
justify-content: center;
}
.dc-right .dc-text {
justify-content: flex-start;
padding-top: 20px;
}
.dc-left .dv-border-box-5 {
padding: 30px;
box-sizing: border-box;
}
.dc-right .dv-border-box-5 {
padding: 40px;
padding-left: 75px;
box-sizing: border-box;
}
.main-value {
font-weight: bold;
font-size: 30px;
span {
font-size: 40px;
color: #00c0ff;
margin-right: 15px;
}
}
.compare-value {
height: 35px;
line-height: 35px;
font-size: 18px;
span {
margin-right: 30px;
}
}
}
</style>

@ -0,0 +1,101 @@
<template>
<div class="top-middle-cmp">
<div ref="chart" style="width: 100%; height: 100%;"></div>
</div>
</template>
<script>
import * as echarts from 'echarts';
export default {
name: 'TopMiddleCmp',
props: ['data'],
data() {
return {
chartData: {
categories: [],
values: [],
},
};
},
mounted() {
this.drawChart();
},
methods: {
drawChart() {
const chart = echarts.init(this.$refs.chart);
const option = {
title: {
text: '7天产量',
textStyle: {
color: 'white', // Set title font color to white
},
},
grid: {
left: '10%', // Adjust the left margin
right: '5%', // Adjust the right margin
top: '20%', // Adjust the top margin
bottom: '0%', // Adjust the bottom margin
containLabel: true,
},
xAxis: {
type: 'category',
data: this.chartData.categories,
axisLabel: {
color: 'white', // Set X-axis label font color to white
},
},
yAxis: {
type: 'value',
axisLabel: {
color: 'white', // Set Y-axis label font color to white
},
},
series: [
{
data: this.chartData.values,
type: 'line',
smooth: true,
label: {
show: true, //
position: 'top', // 'top''insideTop''insideBottom'
},
}
]
};
chart.setOption(option);
},
},
watch: {
data(newVal) {
// Watching the data prop for changes
// Watching the data prop for changes
console.log("newVal", newVal);
this.chartData.categories = newVal.map(item => item.day);
this.chartData.values = newVal.map(item => item.sum_quantity);
this.drawChart();
// Incrementing the key to force re-render
},
},
};
</script>
<style scoped>
.top-middle-cmp {
position: relative;
padding: 0 50px;
box-sizing: border-box;
.chart-name {
position: absolute;
right: 70px;
text-align: right;
font-size: 20px;
top: 10px;
}
}
</style>

@ -0,0 +1,100 @@
<template>
<div class="top-right-cmp">
<div class="chart-name">
产线停机次数
<dv-decoration-3 style="width:200px;height:20px;" />
</div>
<dv-charts :option="option" />
</div>
</template>
<script>
export default {
name: 'TopRightCmp',
data () {
return {
option: {
legend: {
data: [
{
name: '停机次数',
color: '#00baff'
}
],
textStyle: {
fill: '#fff'
}
},
xAxis: {
data: [
],
axisLine: {
style: {
stroke: '#fff'
}
},
axisLabel: {
style: {
fill: '#fff'
}
},
axisTick: {
show: false
}
},
yAxis: {
data: 'value',
splitLine: {
show: false
},
axisLine: {
style: {
stroke: '#fff'
}
},
axisLabel: {
style: {
fill: '#fff'
}
},
axisTick: {
show: false
},
min: 0,
max: 8
},
series: [
{
name: '停机次数',
data: [
],
type: 'bar',
barStyle: {
fill: 'rgba(0, 186, 255, 0.4)'
}
}
]
}
}
}
}
</script>
<style lang="less">
.top-right-cmp {
position: relative;
padding: 0 50px;
box-sizing: border-box;
.chart-name {
position: absolute;
right: 70px;
text-align: right;
font-size: 20px;
top: 10px;
}
}
</style>

@ -0,0 +1,203 @@
<template>
<div id="data-view">
<dv-full-screen-container>
<div class="main-header">
<div class="mh-left">
<img src="../../../assets/images/logo.png" alt="" />
</div>
<div class="mh-middle">成品包装线生产看板</div>
<div class="mh-right">{{currentDateTime}}
</div>
</div>
<dv-border-box-1 class="main-container">
<div class="mc-top">
<Top-Left-Cmp :data="valueForTopLeftCmp"/>
<Top-Middle-Cmp :data="valueForTopMiddleCmp" />
<Top-right-Cmp />
</div>
<div class="mc-bottom">
<BottomRightTable1 :tableData="BottomRightTableValue"/>
</div>
<!-- <div class="mc-bottom">-->
<!-- <BottomRightTable1 v-for="index in 4" :key="index+4" :tableIndex="index" :tableData="BottomRightTable2Value"/>-->
<!-- </div>-->
</dv-border-box-1>
</dv-full-screen-container>
</div>
</template>
<script>
import { finishProductBoard } from "@/api/kanban/finishproduct";
import TopLeftCmp from './TopLeftCmp'
import TopMiddleCmp from './TopMiddleCmp'
import TopRightCmp from './TopRightCmp'
import BottomRightTable1 from './BottomRightTable1'
export default {
name: 'DataView',
components: {
TopLeftCmp,
TopMiddleCmp,
TopRightCmp,
BottomRightTable1,
},
data () {
return {
currentDateTime: null,
//
valueForTopLeftCmp: {
sumplanquantity: 0,
sumFinshQuantity: 0,
},
valueForTopMiddleCmp:[],
BottomRightTableValue:[],
};
},
methods: {
getCurrentTime() {
const currentDate = new Date();
const year = currentDate.getFullYear();
const month = (currentDate.getMonth() + 1).toString().padStart(2, '0');
const day = currentDate.getDate().toString().padStart(2, '0');
const hours = currentDate.getHours().toString().padStart(2, '0');
const minutes = currentDate.getMinutes().toString().padStart(2, '0');
const seconds = currentDate.getSeconds().toString().padStart(2, '0');
this.currentDateTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
},
async finishProductBoard() {
try {
const response = await finishProductBoard({ factory: 1000 });
console.log(response.data);
this.valueForTopLeftCmp.sumplanquantity = response.data.sumplanquantity ?? 0;;
this.valueForTopLeftCmp.sumFinshQuantity = response.data.sumFinshQuantity ?? 0;;
this.valueForTopMiddleCmp=response.data.daySenvenProductionList;
this.BottomRightTableValue = response.data.ProductionInProgress;
} catch (error) {
console.error('Error fetching data:', error);
}
}
},
mounted() {
this.getCurrentTime();
// 使
setInterval(() => {
this.getCurrentTime();
}, 1000);
this.finishProductBoard(); //
setInterval(() => {
this.finishProductBoard();
}, 20000);
}
}
</script>
<style lang="less">
#data-view {
width: 100%;
height: 100%;
background-color: #030409;
color: #fff;
#dv-full-screen-container {
background-image: url("../../../assets/images/bg-finishproduct.png");
background-size: 100% 100%;
box-shadow: 0 0 3px blue;
display: flex;
flex-direction: column;
}
.main-header {
height: 80px;
display: flex;
justify-content: space-between;
align-items: flex-end;
.mh-left {
margin-top: 10px;
}
.mh-middle {
font-size: 30px;
}
.mh-left, .mh-right {
width: 200px;
}
}
.main-container {
height: calc(~"100% - 80px");
margin-left:0px;
.mc-top, .mc-bottom ,mc-bottom-1 {
box-sizing: border-box;
padding: 30px;
display: flex;
}
.mc-top {
height: 40%;
}
.mc-bottom-1, .mc-bottom-2 {
height: 100%;
}
.top-left-cmp, .bottom-left-container {
width: 32%;
}
.top-middle-cmp, .top-right-cmp {
width: 34%;
}
.bottom-left-container {
position: relative;
.border-box-content {
display: flex;
}
.mcb-decoration-1, .mcb-decoration-2 {
position: absolute;
left: 50%;
margin-left: -2px;
}
.mcb-decoration-1 {
top: 5%;
transform: rotate(180deg);
}
.mcb-decoration-2 {
top: 50%;
}
.bottom-left-chart-1, .bottom-left-chart-2 {
width: 50%;
height: 100%;
}
}
.bottom-right-container {
width: 68%;
padding-left: 30px;
box-sizing: border-box;
display: flex;
}
}
}
</style>

@ -92,7 +92,7 @@
@click="handleDelete"
v-hasPermi="['mes:reportWork:remove']"
>删除</el-button>
</el-col>-->
</el-col>
<el-col :span="1.5">
<el-button
type="success"
@ -103,7 +103,7 @@
@click="handleReportHz"
v-hasPermi="['mes:reportWork:report']"
>报工详情</el-button>
</el-col>
</el-col>-->
<el-col :span="1.5">
<el-button
type="danger"

@ -0,0 +1,621 @@
<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="productCode">
<el-input
v-model="queryParams.productCode"
placeholder="请输入物料码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料描述" prop="productName">
<el-input
v-model="queryParams.productName"
placeholder="请输入物料描述"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产线编码" prop="lineCode">
<el-input
v-model="queryParams.lineCode"
placeholder="请输入产线编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产线名称" prop="lineName">
<el-input
v-model="queryParams.lineName"
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>
<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="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:unitPrice:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:unitPrice:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:unitPrice:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-upload2"
size="mini"
@click="handleImport"
v-hasPermi="['mes:unitprice:import']"
>导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:unitPrice:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="unitPriceList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="物料码" align="center" prop="productCode" />
<el-table-column label="物料描述" align="center" prop="productName" />
<el-table-column label="产线编码" align="center" prop="lineCode" />
<el-table-column label="产线名称" align="center" prop="lineName" />
<el-table-column label="子工序编码" align="center" prop="childprocessCode" />
<el-table-column label="子工序名称" align="center" prop="childprocessName" />
<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="['system:unitPrice:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:unitPrice:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改unitPrice对话框 -->
<el-dialog :title="title" :visible.sync="open" width="680px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="产品编码" prop="productCode">
<el-input
placeholder="请输入内容"
v-model="form.productCode"
>
<template slot="suffix">
<i class="el-input__icon el-icon-search" @click="handleSearch"></i>
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产品名称" prop="productName">
<el-input v-model="form.productName" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="产线" prop="lineName">
<el-select v-model="form.lineName" filterable placeholder="请选择产线"
@change="handleSelectChange">
<option
v-for="item in options"
:key="item.value"
:value="item.value"
>
{{ item.label }}
</option>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
:data-label="item.label"> <!-- 将label的值作为data-label属性传递 -->
</el-option>
</el-select>
</el-form-item>npn
</el-col>
<el-col :span="12">
<el-form-item label="产线编码" prop="lineCode">
<el-input v-model="form.lineCode" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-divider content-position="center" >操作步骤</el-divider>
<el-button type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="addRow">添加</el-button>
<el-table
:data="tableData"
style="width: 100%; height: 300px; overflow-y: auto;"
border
stripe
>
<!-- Your table columns go here -->
<!-- For example, if you have columns named 'name' and 'age': -->
<el-table-column label="序号" prop="childProcessCode" width="100"></el-table-column>
<el-table-column label="工序名称" prop="childProcessName">
<template slot-scope="scope">
<el-input
v-model="scope.row.childProcessName" @change="handleEdit(scope.row, scope.$index)" ></el-input>
</template>
</el-table-column>
<el-table-column label="工序单价(元 / PC" prop="unitPrice">
<template slot-scope="scope">
<el-input
:type="inputType"
@input="handleInput(scope.row, scope.$index)"
v-model="scope.row.unitPrice" @change="handleEditUnitPrice(scope.row, scope.$index)" ></el-input>
</template>
</el-table-column>
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<el-button size="mini" @click="handlDelete(scope.$index)"></el-button>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<div class="el-upload__tip" slot="tip">
<el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
</div>
<span>仅允许导入xlsxlsx格式文件</span>
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate"></el-link>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
// import { ElEditable } from 'element-plus';
import { getToken } from "@/utils/auth";
import { listUnitPrice, getUnitPrice, delUnitPrice, addUnitPrice, updateUnitPrice } from "@/api/mes/unitPrice";
import { listProduct} from "@/api/wms/product";
import { listChildprocessall} from "@/api/mes/childprocess";
export default {
name: "UnitPrice",
// components: {
// 'el-editable': ElEditable,
// //
// },
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// unitPrice
unitPriceList: [],
//
title: "",
//
open: false,
options: [{
value: 'XL01',
label: '包装线01'
}, {
value: 'XL02',
label: '包装线02'
}, {
value: 'XL03',
label: '包装线03'
}, {
value: 'XL04',
label: '包装线04'
}, {
value: 'XL05',
label: '包装线05'
},{
value: 'XL06',
label: '包装线06'
},{
value: 'XL07',
label: '包装线07'
},{
value: 'XL08',
label: '包装线08'
}],
value: '',
upload: {
//
open: false,
//
title: "",
//
isUploading: false,
//
updateSupport: 0,
//
headers: {poolName: localStorage.getItem("USER_POOL_NAME_CURRENT"), Authorization: "Bearer " + getToken()},
//
url: process.env.VUE_APP_BASE_API + "/mes/unitprice/importData"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
factoryId: null,
productCode: null,
productName: null,
lineCode: null,
lineName: null,
childprocessId: null,
childprocessCode: null,
childprocessName: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
},
productQueryParams:{
productCode: null,
productName: null,
},
//
form: {},
//
rules: {
productCode: [
{ required: true, message: "产品编码不能为空", trigger: "blur" },
],
lineName: [
{ required: true, message: "产线不能为空", trigger: "blur" },
],
},
productCodeList: [],
state: '',
timeout: null,
productCode:'',
tableData: [],
processOptions: [
{ value: 'Process 1', label: '工序1' },
{ value: 'Process 2', label: '工序2' },
],
nextID: 1,
inputType: 'text'
};
},
created() {
this.getList();
// this.fetchProcessOptions();
},
methods: {
addRow() {
// Calculate the next sequential ID
const nextIDString = String(this.nextID).padStart(2, '0');
this.tableData.push({ childProcessCode: nextIDString, childProcessName: '', _editablechildProcessName: true, _editableUnitPrice: true, });
this.nextID++;
},
handlDelete(index) {
// Delete a row from the table data
this.tableData.splice(index, 1);
// Find the maximum childProcessCode in the remaining rows
const maxID = this.tableData.reduce((max, row) => {
const id = parseInt(row.childProcessCode, 10);
return isNaN(id) ? max : Math.max(max, id);
}, 0);
// Set nextID to the next sequential ID
this.nextID = maxID + 1;
},
handleEdit(row, index) {
// Handle the edit event, if needed
// For example, you can make an API call to save the edited data.
console.log('Edited row:', row);
row._editablechildProcessName = false; // Set _editable to false after editing
},
handleInput(row, index) {
//
// 使
const numericRegex = /^\d+(\.\d*)?$/;
if (!numericRegex.test(row.unitPrice)) {
//
this.$set(this.tableData, index, { ...row, unitPrice: row.unitPrice.replace(/[^\d.]/g, '') });
}
},
handleEditUnitPrice(row, index) {
console.log(row,index);
row._editableUnitPrice = false;
},
/** 查询unitPrice列表 */
getList() {
this.loading = true;
listUnitPrice(this.queryParams).then(response => {
this.unitPriceList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
picId: null,
factoryId: null,
productCode: null,
productName: null,
lineCode: null,
lineName: null,
childprocessId: null,
childprocessCode: null,
childprocessName: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
this.tableData = [];
this.nextID=1;
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.picId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加计件薪酬信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const picId = row.picId || this.ids
getUnitPrice(picId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改unitPrice";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
console.log(this.form,this.tableData)
// if (this.form.picId != null) {
// updateUnitPrice(this.form).then(response => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.getList();
// });
// } else {
// addUnitPrice(this.form).then(response => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.getList();
// });
// }
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const picIds = row.picId || this.ids;
this.$modal.confirm('是否确认删除unitPrice编号为"' + picIds + '"的数据项?').then(function () {
return delUnitPrice(picIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/unitPrice/export', {
...this.queryParams
}, `unitPrice_${new Date().getTime()}.xlsx`)
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = "子工序导入";
this.upload.open = true;
},
/** 下载模板操作 */
importTemplate() {
this.download('mes/unitPrice/importTemplate', {}, `unitprice_template_${new Date().getTime()}.xlsx`)
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
//
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", {dangerouslyUseHTMLString: true});
this.getList();
},
//
submitFileForm() {
this.$refs.upload.submit();
},
handleSearch() {
console.log('Search triggered with input:', this.form.productCode);
listProduct(this.form).then(response => {
this.form.productName=response.rows[0].productDescZh;
});
},
handleSelectChange(value,option) {
// Add your logic here to handle the selection change
console.log(value,option)
// this.form.lineCode = value;
// this.form.lineName = selectedData;
// You can perform any actions based on the selected value here.
// For example, call a function or update some other data.
},
async loadOptions(query) {
try {
// Simulate an API call to fetch remote options based on the user's input
listChildprocessall(this.queryParams).then(response => {
const data = response.json();
this.processOptions = data.map(item => ({ value: item.id, label: item.name }));
// const data = response.json();
// this.processOptions = data;
// this.form.productName=response.rows[0].productDescZh;
});
} catch (error) {
console.error('Error fetching process options:', error);
}
},
// async fetchProcessOptions() {
// try {
// // Assuming listChildprocessall is an asynchronous function
// listChildprocessall(this.queryParams).then(response => {
// console.log(response)
// const data = response;
// this.processOptions = data.map(item => ({ value: item.childprocessName, label: item.childprocessCode }));
// // const data = response.json();
// // this.processOptions = data;
// // this.form.productName=response.rows[0].productDescZh;
// });
//
// } catch (error) {
// console.error('Error fetching process options:', error);
// }
// },
}
};
</script>

@ -114,7 +114,7 @@
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="检验规则编码" align="center" prop="projectNo" />
<el-table-column label="检验规则编码" width="100" align="center" prop="projectNo" />
<el-table-column label="检验规则名称" align="left" prop="ruleName" :show-overflow-tooltip="true" width="250"/>
<el-table-column label="标准值" align="left" prop="standardValue" :show-overflow-tooltip="true" width="250"/>
<el-table-column label="上差值" align="left" prop="upperDiff" />

@ -18,6 +18,18 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检测方案名称">
<el-select v-model="queryParams.projectType" filterable placeholder="请选择检测方案">
<el-option
v-for="item in projectTypeOptions"
:key="item.projectTypeCode"
:label="item.projectTypeName"
:value="item.projectTypeCode">
</el-option>
</el-select>
</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>
@ -56,7 +68,7 @@
<el-table-column label="抽样方案" align="left" prop="samplePlan" width="100"/>
<el-table-column label="合格判定" align="left" prop="judge"/ width="100">
<el-table-column label="缺陷等级" align="left" prop="defectLevel" width="90"/>
<el-table-column label="检验方式" align="left" prop="checkMode" width="90"/>
<el-table-column label="检验方式" align="left" prop="checkMode" width="90" :show-overflow-tooltip="true"/>
<el-table-column label="检验工具" align="left" prop="checkTool" width="90"/>
</el-table>
<pagination
@ -76,7 +88,7 @@
</template>
<script>
import { getProjectInfoList } from "@/api/quality/checkTypeProject";
import { getProjectInfoList,getProjectOptions } from "@/api/quality/checkTypeProject";
export default {
name: "itemSelectUser",
dicts: ["qc_rule_prop"],
@ -107,25 +119,32 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
groupId:null,
materialCode:null,
typeCode:null
}
groupId:null,
materialCode:null,
typeCode:null
},
projectTypeOptions:[]
};
},
created() {
//this.getList();
this.getProjectList();
},
methods: {
//
getProjectList() {
getProjectOptions(this.queryParams).then(response => {
this.projectTypeOptions = response;
});
},
init(groupId,materialCode,typeId){
this.queryParams.groupId = groupId;
this.queryParams.materialCode = materialCode;
this.queryParams.typeCode = typeId;
this.queryParams.groupId = groupId;
this.queryParams.materialCode = materialCode;
this.queryParams.typeCode = typeId;
this.getList();
},
this.getList();
},
/** 查询表格列表*/
getList() {
this.loading = true;

@ -0,0 +1,516 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="任务编号" prop="checkNo">
<el-input
v-model="queryParams.checkNo"
placeholder="请输入检验任务编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料名称" prop="materialName">
<el-input
v-model="queryParams.materialName"
placeholder="请输入物料名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检验结果" prop="checkResult">
<el-select
v-model="queryParams.checkResult"
placeholder="检验结果"
clearable
>
<el-option
v-for="dict in dict.type.check_result"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="检测地点" prop="checkLoc">
<el-input
v-model="queryParams.checkLoc"
placeholder="请输入检测地点"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检验时间" prop="checkTimeArray">
<el-date-picker
v-model="queryParams.checkTimeArray"
format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-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="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['quality:qcIncome:add']"
>新增</el-button>
</el-col> -->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['quality:incomeReport: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 type="selection" width="55" align="center" />
<el-table-column label="recordId" align="center" prop="recordId" v-if="false"/>
<el-table-column label="检验任务编号" align="center" prop="checkNo" width="120"/>
<el-table-column label="订单号" align="center" prop="orderNo" width="150"/>
<el-table-column label="物料名称" align="center" prop="materialName" width="150"/>
<el-table-column label="收货数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="供应商名称" align="center" prop="supplierName" width="240"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="检验结果" align="center" prop="checkResult">
<template slot-scope="scope">
<dict-tag :options="dict.type.check_result" :value="scope.row.checkResult"/>
</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="handleLook(scope.row)"
v-hasPermi="['quality:incomeReport:edit']"
>查看</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 打印首检对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
<el-row>
<el-col :span="20">
<el-button
class="print-btn"
size="mini"
type="primary"
icon="el-icon-edit"
@click="handlePrint(form)"
>打印</el-button>
</el-col>
</el-row>
<!-- 打印整个printFrom区域 -->
<div id="printFrom">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :offset="8" :span="8">
<h1 style="align-content: center;">中山榄菊日化实业有限公司</h1>
</el-col>
</el-row>
<el-row>
<el-col :offset="8" :span="8">
<h3 style="align-content: center;">黑蚊香首检确认表</h3>
</el-col>
</el-row>
<el-row>
<el-col :offset="16" :span="8">
<el-form-item label="检验标准" prop="incomeBatchNo">
<el-input v-model="form.incomeBatchNo" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="产品名称" prop="materialName">
<el-input v-model="form.materialName" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="产品编码" prop="materialCode">
<el-input v-model="form.materialCode" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="首检日期" prop="checkTime">
<el-input v-model="form.checkTime" disabled>
{{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
</el-input>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="首检原因" >
<el-input disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<!-- 检验项目明细 -->
<el-table v-loading="loading" :data="checkProjectList" >
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" type="index" width="100"/>
<el-table-column label="检验项目" align="center" prop="ruleName" />
<el-table-column label="内容" align="center" prop="checkStandard" width="200"/>
<el-table-column label="实际检验结果" align="center" prop="propertyCode" width="200">
<template slot-scope="scope">
<dict-tag
:options="dict.type.qc_rule_prop"
:value="scope.row.propertyCode"
/>
</template>
</el-table-column>
<el-table-column label="判定" align="center" prop="status" >
<template slot-scope="scope">
<dict-tag :options="dict.type.check_result" :value="scope.row.status"/>
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
<el-row style="margin-top: 10px;">
<el-col :span="20">
<el-form-item label="备注:" label-width="160px">
<el-input type="textarea" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="综合结论:" label-width="160px">
<el-input type="textarea" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="车间组长/机管员签名" label-width="160px">
<el-input disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="质量管理部品管员签名" prop="checkManName" label-width="160px">
<el-input disabled/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="cancel"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listIncome, getIncome, delIncome, addIncome, updateIncome,getCkeckProjectList} from "@/api/quality/firstReport";
import { getCheckTypes } from "@/api/quality/qcProduce";
import moment from 'moment';
export default {
name: "First",
dicts: ["unit","check_status","check_result","qc_rule_prop"],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
formRef: 'form',
validateRules: [],
printData: {
printable: 'printFrom',
ignore: ['no-print'],
workCenter: "暂无数据",
SAPNo: null,
manufacture: null,
auditor: null,
printDate: null,
factory: null,
productDate: null,
workTable: [],
},
printDialogVisible: false,
//
incomeList: [],
//
checkProjectList: [],
//
title: "",
//
open: false,
//
queryParams: {
checkTimeArray: [],
pageNum: 1,
pageSize: 10,
checkNo: null,
incomeBatchNo: null,
orderNo: null,
materialCode: null,
materialName: null,
quality: null,
unit: null,
supplierCode: null,
supplierName: null,
incomeTime: null,
checkLoc: null,
checkStatus: null,
checkManCode: null,
checkManName: null,
checkTime: null,
checkResult: null,
status: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
factoryCode: null,
},
//
form: {},
checkTypes:[],
//
rules: {
/* incomeBatchNo: [
{ required: true, message: "来料批次号不能为空", trigger: "blur" }
], */
}
};
},
created() {
this.getDate();
this.getList();
this.getCheckTypes();
},
methods: {
/****/
getCheckTypes() {
getCheckTypes('material').then(response => {
this.checkTypes = response;
});
},
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0)
let end = this.Fungetdate (1)
//this.queryParams.incomeTimeArray.push(start,end)
this.queryParams.checkTimeArray.push(start,end)
},
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 + "-" + d+" 00:00:00";
},
/** 查询首检列表 */
getList() {
this.loading = true;
if(this.queryParams.checkTimeArray.length>0){
this.queryParams.checkTimeStart = moment(this.queryParams.checkTimeArray[0]).format('YYYY-MM-DD HH:mm:ss');
this.queryParams.checkTimeEnd = moment(this.queryParams.checkTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');
}
listIncome(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,
checkNo: null,
incomeBatchNo: null,
orderNo: null,
materialCode: null,
materialName: null,
quality: null,
unit: null,
supplierCode: null,
supplierName: null,
incomeTime: null,
checkLoc: null,
checkStatus: null,
checkManCode: null,
checkManName: null,
checkTime: null,
checkResult: null,
status: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
factoryCode: null,
delFlag: 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 = "添加首检";
},
/** 查看按钮操作 */
handleLook(row) {
this.reset();
const recordId = row.recordId || this.ids
this.queryParams.recordId = recordId;
getIncome(recordId).then(response => {
this.form = response.data;
this.form.printable = 'printFrom'; //
this.form.ignore = ['no-print'];//
this.open = true;
this.title = "查看首检报告";
});
this.getCheckedProjectList();
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.recordId != null) {
updateIncome(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addIncome(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const recordIds = row.recordId || this.ids;
this.$modal.confirm('是否确认删除首检编号为"' + recordIds + '"的数据项?').then(function() {
return delIncome(recordIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('quality/qcIncome/export', {
...this.queryParams
}, `income_${new Date().getTime()}.xlsx`)
},
/**获取检验项目列表 */
getCheckedProjectList(){
this.loading = true;
getCkeckProjectList(this.queryParams).then((response) => {
this.checkProjectList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// -
handlePrint(params) {
console.log(this.form);
printJS({
printable: params.printable, // 'printFrom', // id
type: params.type || 'html',
maxWidth: 1500, //
font_size: "",//
header: "首检结果报告",//params.header, // '',
targetStyles: ['*'],
style: '@page {margin:0 10mm};', // -
ignoreElements: params.ignore || [], // ['no-print']
properties: params.properties || null
})
},
}
};
</script>
<style scoped>
.print-btn{
margin-bottom: 15px;
margin-left: 10px;
}
</style>

@ -87,12 +87,13 @@
<el-table-column label="物料名称" align="center" prop="materialName" width="150"/>
<el-table-column label="收货数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="产线名称" align="center" prop="supplierName" width="240"/>
<el-table-column label="产线名称" align="center" prop="supplierName" width="120"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="检验节点" align="center" prop="checkName" width="120"/>
<el-table-column label="检验结果" align="center" prop="checkResult">
<template slot-scope="scope">
<dict-tag :options="dict.type.check_result" :value="scope.row.checkResult"/>
@ -248,7 +249,125 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 打印首检对话框 -->
<el-dialog :title="title" :visible.sync="firstReportOpen" width="1200px" append-to-body>
<el-row>
<el-col :span="20">
<el-button
class="print-btn"
size="mini"
type="primary"
icon="el-icon-edit"
@click="handlePrint(form)"
>打印</el-button>
</el-col>
</el-row>
<!-- 打印整个firstReportPrint区域 -->
<div id="firstReportPrint">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :offset="8" :span="8">
<h1 style="align-content: center;">中山榄菊日化实业有限公司</h1>
</el-col>
</el-row>
<el-row>
<el-col :offset="8" :span="8">
<h3 style="align-content: center;">黑蚊香首检确认表</h3>
</el-col>
</el-row>
<el-row>
<el-col :offset="16" :span="8">
<el-form-item label="检验标准" prop="incomeBatchNo">
<el-input v-model="form.incomeBatchNo" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="产品名称" prop="materialName">
<el-input v-model="form.materialName" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="产品编码" prop="materialCode">
<el-input v-model="form.materialCode" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="首检日期" prop="checkTime">
<el-input v-model="form.checkTime" disabled>
{{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
</el-input>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="首检原因" >
<el-input disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<!-- 检验项目明细 -->
<el-table v-loading="loading" :data="checkProjectList" >
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" type="index" width="100"/>
<el-table-column label="检验项目" align="center" prop="ruleName" />
<el-table-column label="内容" align="center" prop="checkStandard" width="200"/>
<el-table-column label="实际检验结果" align="center" prop="propertyCode" width="200">
<template slot-scope="scope">
<dict-tag
:options="dict.type.qc_rule_prop"
:value="scope.row.propertyCode"
/>
</template>
</el-table-column>
<el-table-column label="判定" align="center" prop="status" >
<template slot-scope="scope">
<dict-tag :options="dict.type.check_result" :value="scope.row.status"/>
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
<el-row style="margin-top: 10px;">
<el-col :span="20">
<el-form-item label="备注:" label-width="160px">
<el-input type="textarea" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="综合结论:" label-width="160px">
<el-input type="textarea" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="车间组长/机管员签名" label-width="160px">
<el-input disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="质量管理部品管员签名" prop="checkManName" label-width="160px">
<el-input disabled/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleDone"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -298,6 +417,7 @@ export default {
title: "",
//
open: false,
firstReportOpen: false,
//
queryParams: {
checkTimeArray: [],
@ -450,10 +570,20 @@ export default {
this.queryParams.recordId = recordId;
getProduce(recordId).then(response => {
this.form = response.data;
this.form.printable = 'printFrom'; //
this.form.ignore = ['no-print'];//
this.open = true;
this.title = "查看来料报告";
if(this.form.checkType =='checkTypeSC') {
//
this.form.printable = 'firstReportPrint'; //
this.form.ignore = ['no-print'];//
this.firstReportOpen = true;
this.title = "首检检验报告";
}else {
//
this.form.printable = 'printForm'; //
this.form.ignore = ['no-print'];//
this.open = true;
this.title = "巡检检验报告";
}
});
this.getCheckedProjectList();
},
@ -517,6 +647,10 @@ export default {
properties: params.properties || null
})
},
handleDone() {
this.firstReportOpen = false;
this.reset();
},
}
};
</script>

@ -193,6 +193,7 @@
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="检验节点" align="center" prop="checkName" />
<el-table-column label="检验结果" align="center" prop="checkResult" />
<el-table-column label="是否启用" align="center" width="100">
<template slot-scope="scope">

@ -80,6 +80,8 @@
</router-link>
</template>
</el-table-column>
<el-table-column label="检验标准编码" align="center" prop="standardNo" />
<el-table-column label="版本" align="center" prop="version" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -117,6 +119,12 @@
<el-form-item label="检测项方案名称" prop="projectTypeName">
<el-input v-model="form.projectTypeName" placeholder="请输入检测项方案名称" />
</el-form-item>
<el-form-item label="检测标准编号" prop="standardNo">
<el-input v-model="form.standardNo" placeholder="请输入检测标准编号" />
</el-form-item>
<el-form-item label="版本" prop="version">
<el-input v-model="form.version" placeholder="请输入版本" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>

@ -1,41 +1,25 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px" class="edit-el-form">
<el-form-item label="订单编码" prop="workorderCodeSap">
<el-form-item label="订单编码" prop="orderNo">
<el-input
v-model="queryParams.workorderCodeSap"
v-model="queryParams.orderNo"
placeholder="请输入订单编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品编号" prop="productCode">
<el-form-item label="产品编号" prop="materialCode">
<el-input
v-model="queryParams.productCode"
v-model="queryParams.materialCode"
placeholder="请输入产品编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品名称" prop="productName">
<el-input
v-model="queryParams.productName"
placeholder="请输入产品名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="规格型号" prop="productSpc">
<el-input
v-model="queryParams.productSpc"
placeholder="请输入规格型号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item label="工单生产日期" prop="productDate">
<el-form-item label="工单生产日期" prop="incomeTime">
<el-date-picker clearable
v-model="queryParams.productDate"
v-model="queryParams.incomeTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择工单生产日期"
@ -43,18 +27,6 @@
>
</el-date-picker>
</el-form-item>
<!--
<el-form-item label="单据状态" prop="status">
<el-select
v-model="queryParams.status"
placeholder="请选择单据状态"
@change="$forceUpdate()"
clearable
style="width:205px"
@keyup.enter.native="handleQuery">
<el-option v-for="item in options" :key="item.status" :label="item.label" :value="item.status"></el-option>
</el-select>
</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>
@ -62,38 +34,6 @@
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['mes:prepare:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['mes:prepare:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['mes:prepare:remove']"
>删除</el-button>
</el-col> -->
<el-col :span="1.5">
<el-button
type="warning"
@ -104,45 +44,26 @@
v-hasPermi="['mes:prepare:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
:disabled="single"
icon="el-icon-download"
size="mini"
@click="showPrint"
v-hasPermi="['mes:prepare:export']"
>打印预览</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="prepareList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="date" label="生产日期" width="100" align="center"/>
<el-table-column prop="date" label="产品名称" width="150" align="center"/>
<el-table-column prop="date" label="产品编码" width="150" align="center"/>
<el-table-column prop="date" label="订单编码" width="150" align="center"/>
<el-table-column prop="date" label="订单批次" width="150" align="center"/>
<el-table-column label="上午" align="center" >
<el-table-column prop="name" label="8:00-9:00" width="120" align="center"/>
<el-table-column prop="name" label="9:00-10:00" width="120" align="center"/>
<el-table-column prop="name" label="10:00-11:00" width="120" align="center"/>
<el-table-column prop="name" label="11:00-12:00" width="120" align="center"/>
</el-table-column>
<el-table-column label="下午" align="center" >
<el-table-column prop="name" label="13:30-14:30" width="120" align="center"/>
<el-table-column prop="name" label="14:30-15:30" width="120" align="center"/>
<el-table-column prop="name" label="15:30-16:30" width="120" align="center"/>
<el-table-column prop="name" label="16:30-17:30" width="120" align="center"/>
</el-table-column>
<el-table-column label="加班" align="center" >
<el-table-column prop="name" label="12:30-13:30" width="120" align="center"/>
<el-table-column prop="name" label="18:00-19:00" width="120" align="center"/>
<el-table-column prop="name" label="19:00-20:00" width="120" align="center"/>
<el-table-column prop="name" label="20:00-21:00" width="120" align="center"/>
</el-table-column>
<el-table-column label="订单编码" align="center" prop="orderNo" width="180">
<template slot-scope="scope">
<el-button
type="text"
@click="handleDetail(scope.row)"
>{{scope.row.orderNo}}</el-button>
</template>
</el-table-column>
<el-table-column prop="incomeBatchNo" label="批次" width="300" align="center"/>
<el-table-column prop="incomeTime" label="生产日期" width="100" align="center"/>
<el-table-column prop="materialName" label="产品名称"align="center"/>
<el-table-column prop="materialCode" label="产品编码" width="150" align="center"
:formatter="productCodeFormate"/>
<el-table-column prop="quality" label="数量" width="80" align="center"/>
<el-table-column prop="unit" label="单位" width="80" align="center"/>
</el-table>
<pagination
@ -153,311 +74,162 @@
@pagination="getList"
/>
<!-- 添加或修改备料单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-form-item label="工单编码" prop="workorderCode">
<el-input v-model="form.workorderCode" placeholder="请输入工单编码" />
</el-form-item>
<el-form-item label="工单名称" prop="workorderName">
<el-input v-model="form.workorderName" placeholder="请输入工单名称" />
</el-form-item>
<el-form-item label="父工单" prop="parentOrder">
<el-input v-model="form.parentOrder" placeholder="请输入父工单" />
</el-form-item>
<el-form-item label="订单编码" prop="orderCode">
<el-input v-model="form.orderCode" placeholder="请输入订单编码" />
</el-form-item>
<el-form-item label="产品编号" prop="productCode">
<el-input v-model="form.productCode" placeholder="请输入产品编号" />
</el-form-item>
<el-form-item label="产品名称" prop="productName">
<el-input v-model="form.productName" placeholder="请输入产品名称" />
</el-form-item>
<el-form-item label="规格型号" prop="productSpc">
<el-input v-model="form.productSpc" placeholder="请输入规格型号" />
</el-form-item>
<el-form-item label="配料计划明细id" prop="wetDetailPlanId">
<el-input v-model="form.wetDetailPlanId" placeholder="请输入配料计划明细id" />
</el-form-item>
<el-form-item label="工单生产日期" prop="productDate" >
<el-date-picker clearable
v-model="form.productDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择工单生产日期"
style="width:350px">
</el-date-picker>
</el-form-item>
<el-form-item label="班次" prop="shiftId">
<el-input v-model="form.shiftId" placeholder="请输入班次" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<el-form-item label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-form-item>
</el-form>
<!-- 报工详情 -->
<el-dialog :title="titleReport" :visible.sync="openReport" width="1400px">
<el-table v-loading="loading" :data="pOrderTableList" ref="myPOrderTable"
>
<el-table-column label="id" align="center" prop="recordId" v-if="false"/>
<el-table-column label="序号" type="index" align="center" :index="indexMethod"/>
<el-table-column label="项目名称" width="160" align="left" prop="ruleName" :show-overflow-tooltip="true" />
<el-table-column label="上午" align="center" >
<el-table-column prop="column080090" label="8:00-9:00" width="80" align="center"/>
<el-table-column prop="column090100" label="9:00-10:00" width="90" align="center"/>
<el-table-column prop="column100110" label="10:00-11:00" width="100" align="center"/>
<el-table-column prop="column110120" label="11:00-12:00" width="100" align="center"/>
</el-table-column>
<el-table-column label="下午" align="center" >
<el-table-column prop="column123133" label="13:30-14:30" width="100" align="center"/>
<el-table-column prop="column133143" label="14:30-15:30" width="100" align="center"/>
<el-table-column prop="column143153" label="15:30-16:30" width="100" align="center"/>
<el-table-column prop="column153163" label="16:30-17:30" width="100" align="center"/>
</el-table-column>
<el-table-column label="加班" align="center" >
<el-table-column prop="column163173" label="12:30-13:30" width="100" align="center"/>
<el-table-column prop="column180190" label="18:00-19:00" width="100" align="center"/>
<el-table-column prop="column190200" label="19:00-20:00" width="100" align="center"/>
<el-table-column prop="column200210" label="20:00-21:00" width="100" align="center"/>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<el-button @click="cancel"></el-button>
</div>
</el-dialog>
<!-- 打印预览弹出层 -->
<el-dialog
title="备料信息"
:visible.sync="printDialogVisible"
width="1000px"
>
<div id="printFrom" class="my-print-box">
<el-form :ref="formRef" :model="form" :rules="validateRules">
<!-- 表头-工单信息 -->
<el-row class="my-print-head">
<el-col :offset="10" :span="5">生产订单备料单(订单物料)</el-col>
</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">生产日期:{{printData.productDate}}</el-col>
<el-col :span="4">打印日期:{{printData.printDate}}</el-col>
<el-col :span="4">页次: 1/ 1</el-col>
</el-row>
<!-- 主数据 -->
<el-table
v-if="refreshNewWorkerTable"
v-loading="newWorkerLoading"
class="my-print-table"
:data="printData.workTable"
border
style="width: 100%">
<el-table-column
type="index"
label="序号"
width="50">
</el-table-column>
<el-table-column
prop="materialCode"
label="料号"
width="170">
</el-table-column>
<el-table-column
prop="materialName"
label="物料描述"
width="240">
</el-table-column>
<el-table-column
prop="unit"
width="50"
label="单位">
</el-table-column>
<el-table-column
prop="workorderCode"
width="120"
label="生产订单">
</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="recoil"
label="反冲物料">
</el-table-column>
</el-table>
<br/>
<!-- 底部 -->
<el-row class="my-print-foot">
<el-col :offset="1" :span="3">发料人:</el-col>
<el-col :offset="2" :span="3">收料人:</el-col>
<el-col :offset="2" :span="3">白色:车间联</el-col>
<el-col :offset="1" :span="3">蓝色:仓库联</el-col>
<el-col :offset="1" :span="3">红色:财务联</el-col>
</el-row>
<el-row class="my-print-foot">
<el-col :offset="1" :span="3">SAP-No:{{printData.SAPNo}}</el-col>
<el-col :offset="1" :span="3">Z-PM-F-030-A.2</el-col>
</el-row>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handlePrint(printData)"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { listPrepare, getPrepare, delPrepare, addPrepare, updatePrepare } from "@/api/mes/prepare";
import {printPrepareByCode} from "@/api/mes/prepareDetail";
import { getXJCheckTableList,getXJCheckTableDetail } from "@/api/quality/qcTable";
import moment from "moment/moment";
export default {
name: "Prepare",
// components: {Detail},
data() {
return {
newWorkerLoading: false,
refreshNewWorkerTable:true,
//
selectPrepare:[],
//
formRef: 'form',
validateRules: [],
printData: {
printable: 'printFrom',
ignore: ['no-print'],
workCenter: "暂无数据",
SAPNo: null,
manufacture: null,
auditor: null,
printDate: null,
factory: null,
productDate: null,
workTable: [],
},
printDialogVisible: false,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
prepareList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
workorderCode: null,
workorderName: null,
parentOrder: null,
orderId: null,
orderCode: null,
productId: null,
productCode: null,
prodType: null,
productName: null,
productSpc: null,
wetDetailPlanId: null,
productDate: null,
shiftId: null,
ancestors: null,
status: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
factoryCode: null
newWorkerLoading: false,
refreshNewWorkerTable:true,
//
selectPrepare:[],
//
formRef: 'form',
validateRules: [],
printData: {
printable: 'printFrom',
ignore: ['no-print'],
workCenter: "暂无数据",
SAPNo: null,
manufacture: null,
auditor: null,
printDate: null,
factory: null,
incomeTime: null,
workTable: [],
},
printDialogVisible: false,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
prepareList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
checkNo: null,
workorderName: null,
parentOrder: null,
orderId: null,
orderCode: null,
productId: null,
productCode: null,
prodType: null,
productName: null,
productSpc: null,
wetDetailPlanId: null,
incomeTime: null,
incomeBatchNo:null,
status: null,
factoryCode: null
},
options: [{
status: "L0",
label: '待确认'
}, {
status: "L1",
label: '已确认'
}],
//
form: {},
//
rules: {
workorderCode: [
{ required: true, message: "工单编码不能为空", trigger: "blur" }
],
parentOrder: [
{ required: true, message: "父工单不能为空", trigger: "blur" }
],
orderId: [
{ required: true, message: "订单id不能为空", trigger: "blur" }
],
productCode: [
{ required: true, message: "产品编号不能为空", trigger: "blur" }
],
productName: [
{ required: true, message: "产品名称不能为空", trigger: "blur" }
],
}
status: "L0",
label: '待确认'
}, {
status: "L1",
label: '已确认'
}],
//
form: {},
//
rules: {
checkNo: [
{ required: true, message: "工单编码不能为空", trigger: "blur" }
],
parentOrder: [
{ required: true, message: "父工单不能为空", trigger: "blur" }
],
orderId: [
{ required: true, message: "订单id不能为空", trigger: "blur" }
],
productCode: [
{ required: true, message: "产品编号不能为空", trigger: "blur" }
],
productName: [
{ required: true, message: "产品名称不能为空", trigger: "blur" }
],
},
openReport : false,
titleReport : "工单报工详情"
};
},
created() {
this.getDate();
this.getList();
},
methods: {
//
handlePrint(params) {
printJS({
printable: params.printable, // 'printFrom', // id
type: params.type || 'html',
maxWidth: 1500, //
font_size: "",//
header: params.header, // '',
targetStyles: ['*'],
style: '@page {margin:0 10mm};', // -
ignoreElements: params.ignore || [], // ['no-print']
properties: params.properties || null
})
},
//
showPrint() {
//
this.printData.workCenter = "暂无数据";
this.printData.printDate = null;
this.printData.workTable = [];
this.printData.factory = null;
this.printData.productDate = null;
//
this.printDialogVisible = true;
this.newWorkerLoading = true // true
this.refreshNewWorkerTable = false // refreshProTablefalse
printPrepareByCode(this.selectPrepare[0].workorderCode).then(response => {
console.log(response.data)
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.refreshNewWorkerTable = true // refreshProTabletrue
this.newWorkerLoading = false // false
})
},
//
// handlePrepareDetail(){
// this.$refs.detail.showFlag = true;
// },
//
indexMethod(index){
return index+1 ;
},
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0)
this.queryParams.incomeTime =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 +"-"+d;
},
indexMethod(index){
return index+1 ;
},
/** 查询备料单列表 */
getList() {
this.loading = true;
listPrepare(this.queryParams).then(response => {
getXJCheckTableList(this.queryParams).then(response => {
this.prepareList = response.rows;
this.total = response.total;
this.loading = false;
@ -466,13 +238,14 @@ export default {
//
cancel() {
this.open = false;
this.openReport = false;
this.reset();
},
//
reset() {
this.form = {
prepareId: null,
workorderCode: null,
checkNo: null,
workorderName: null,
parentOrder: null,
orderId: null,
@ -483,15 +256,8 @@ export default {
productName: null,
productSpc: null,
wetDetailPlanId: null,
productDate: null,
shiftId: null,
ancestors: null,
status: null,
remark: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
incomeTime: null,
incomeBatchNo:null,
createBy: null,
createTime: null,
updateBy: null,
@ -508,6 +274,7 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.getDate();
this.handleQuery();
},
//
@ -553,15 +320,22 @@ export default {
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const prepareIds = row.prepareId || this.ids;
this.$modal.confirm('是否确认删除备料单编号为"' + prepareIds + '"的数据项?').then(function() {
return delPrepare(prepareIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
//
productCodeFormate(row, column, cellValue){
return cellValue.slice(7,18); //
},
/** 报工详情按钮操作 */
handleDetail(row) {
this.reset();
let sr = row;
this.queryParams.orderNo = sr.orderNo;
getXJCheckTableDetail(this.queryParams).then(response => {
this.pOrderTableList = response;
this.openReport = true;
this.titleReport = "过程巡检详情";
});
},
/** 导出按钮操作 */
handleExport() {

@ -0,0 +1,198 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px" style="margin-bottom: 0px;">
<el-form-item label="订单编码" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入订单编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品编号" prop="materialCode">
<el-input
v-model="queryParams.materialCode"
placeholder="请输入产品编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工单生产日期" prop="ymdms">
<el-date-picker clearable
v-model="queryParams.ymdms"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择工单生产日期"
style="width:205px"
>
</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="20">
<el-col :sm="24" :lg="24">
<span style="font-size: 20px;margin: 40%;color: cadetblue;">{{title}}</span>
</el-col>
</el-row>
<el-row :gutter="20">
<div style="border: 1px solid #cfdee4;">
<div id="orderline" style="width:100%;height:500px"></div>
</div>
</el-row>
</div>
</template>
<script>
import * as echarts from 'echarts'
require('echarts/theme/macarons')
import { getXJChartData} from "@/api/quality/qcTable";
import moment from "moment/moment";
export default {
name: "XJChart",
components: {},
data() {
return {
title:"巡检小时不良率折线图",
//
queryParams: {
ymdms: null,
workorderCode: null,
workorderName: null,
parentOrder: null,
orderId: null,
orderCode: null,
productId: null,
productCode: null,
prodType: null,
productName: null,
productSpc: null,
productDate: null,
createTimeStart:null,
createTimeEnd:null
}
}
},
mounted(){
this.getDate();
this.getList();
},
methods: {
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0)
this.queryParams.ymdms =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 +"-"+d;
},
/** 搜索按钮操作 */
handleQuery() {
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.getDate();
this.handleQuery();
},
getList() {
let myChart = this.$echarts.init(document.getElementById('orderline'))
getXJChartData(this.queryParams).then(data => {
if(data == ''){
return
}
let seriesResult = data.series;
seriesResult.forEach(se => {
se.type = 'line';//bar//line
});
myChart.setOption({
tooltip: {
trigger: 'axis'
},
legend: {
data: data.legendData
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: data.xAxisData
},
yAxis: {
type: 'value',
axisLabel: {
formatter: '{value} %'
}
},
series: seriesResult
},
true
)
})
}
}
};
</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,486 @@
<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="factoryId">
<el-input
v-model="queryParams.factoryId"
placeholder="名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="编码" prop="childprocessCode">
<el-input
v-model="queryParams.childprocessCode"
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>
<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="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['mes:unitprice:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['mes:unitprice:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['mes:unitprice:remove']"
>删除</el-button>
</el-col>
<el-button
type="info"
plain
icon="el-icon-upload2"
size="mini"
@click="handleImport"
v-hasPermi="['mes:unitprice:import']"
>导入</el-button>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['mes:unitprice:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="unitpriceList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="工厂" align="center" prop="factoryId" />-->
<el-table-column label="子工序编码" align="center" prop="childprocessCode" />
<el-table-column label="子工序名称" align="center" prop="childprocessName" />
<!-- <el-table-column label="预留字段1" align="center" prop="attr1" />-->
<!-- <el-table-column label="预留字段2" align="center" prop="attr2" />-->
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="创建时间" align="center" prop="createTime" />
<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="['mes:unitprice:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:unitprice:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改unitprice对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="工厂" prop="factoryId">
<el-input v-model="form.factoryId" placeholder="请输入工厂" />
</el-form-item>
<el-form-item label="子工序编码" prop="childprocessCode">
<el-input v-model="form.childprocessCode" placeholder="请输入子工序编码" />
</el-form-item>
<el-form-item label="子工序名称" prop="childprocessName">
<el-input v-model="form.childprocessName" placeholder="请输入子工序名称" />
</el-form-item>
<el-form-item label="预留字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入预留字段1" />
</el-form-item>
<el-form-item label="预留字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入预留字段2" />
</el-form-item>
<el-form-item label="预留字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入预留字段3" />
</el-form-item>
<el-form-item label="预留字段4" prop="attr4">
<el-input v-model="form.attr4" placeholder="请输入预留字段4" />
</el-form-item>
<el-divider content-position="center">${subTable.functionName}信息</el-divider>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddMesUnitPrice"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteMesUnitPrice"></el-button>
</el-col>
</el-row>
<el-table :data="mesUnitPriceList" :row-class-name="rowMesUnitPriceIndex" @selection-change="handleMesUnitPriceSelectionChange" ref="mesUnitPrice">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/>
<el-table-column label="工厂" prop="factoryId" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.factoryId" placeholder="请输入工厂" />
</template>
</el-table-column>
<el-table-column label="物料码" prop="productCode" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.productCode" placeholder="请输入物料码" />
</template>
</el-table-column>
<el-table-column label="物料描述" prop="productName" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.productName" placeholder="请输入物料描述" />
</template>
</el-table-column>
<el-table-column label="产线编码" prop="lineCode" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.lineCode" placeholder="请输入产线编码" />
</template>
</el-table-column>
<el-table-column label="产线名称" prop="lineName" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.lineName" placeholder="请输入产线名称" />
</template>
</el-table-column>
<el-table-column label="子工序编码" prop="childprocessCode" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.childprocessCode" placeholder="请输入子工序编码" />
</template>
</el-table-column>
<el-table-column label="子工序名称" prop="childprocessName" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.childprocessName" placeholder="请输入子工序名称" />
</template>
</el-table-column>
<el-table-column label="预留字段1" prop="attr1" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.attr1" placeholder="请输入预留字段1" />
</template>
</el-table-column>
<el-table-column label="预留字段2" prop="attr2" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.attr2" placeholder="请输入预留字段2" />
</template>
</el-table-column>
<el-table-column label="预留字段3" prop="attr3" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.attr3" placeholder="请输入预留字段3" />
</template>
</el-table-column>
<el-table-column label="预留字段4" prop="attr4" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.attr4" placeholder="请输入预留字段4" />
</template>
</el-table-column>
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 子工序导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<div class="el-upload__tip" slot="tip">
<el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
</div>
<span>仅允许导入xlsxlsx格式文件</span>
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate"></el-link>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getToken } from "@/utils/auth";
import { listChildprocess, getChildprocess, delChildprocess, addChildprocess, updateChildprocess } from "@/api/mes/childprocess";
export default {
name: "ChildProcess",
data() {
return {
//
loading: true,
//
ids: [],
//
checkedMesUnitPrice: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// unitprice
unitpriceList: [],
// ${subTable.functionName}
mesUnitPriceList: [],
//
title: "",
//
open: false,
upload: {
//
open: false,
//
title: "",
//
isUploading: false,
//
updateSupport: 0,
//
headers: {poolName: localStorage.getItem("USER_POOL_NAME_CURRENT"), Authorization: "Bearer " + getToken()},
//
url: process.env.VUE_APP_BASE_API + "/mes/unitprice/importData"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
factoryId: null,
childprocessCode: null,
childprocessName: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询unitprice列表 */
getList() {
this.loading = true;
listChildprocess(this.queryParams).then(response => {
this.unitpriceList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
childprocessId: null,
factoryId: null,
childprocessCode: null,
childprocessName: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null
};
this.mesUnitPriceList = [];
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.childprocessId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加unitprice";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const childprocessId = row.childprocessId || this.ids
getChildprocess(childprocessId).then(response => {
this.form = response.data;
this.mesUnitPriceList = response.data.mesUnitPriceList;
this.open = true;
this.title = "修改unitprice";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.mesUnitPriceList = this.mesUnitPriceList;
if (this.form.childprocessId != null) {
updateChildprocess(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addChildprocess(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const childprocessIds = row.childprocessId || this.ids;
this.$modal.confirm('是否确认删除unitprice编号为"' + childprocessIds + '"的数据项?').then(function() {
return delChildprocess(childprocessIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** ${subTable.functionName}序号 */
rowMesUnitPriceIndex({ row, rowIndex }) {
row.index = rowIndex + 1;
},
/** ${subTable.functionName}添加按钮操作 */
handleAddMesUnitPrice() {
let obj = {};
obj.factoryId = "";
obj.productCode = "";
obj.productName = "";
obj.lineCode = "";
obj.lineName = "";
obj.childprocessCode = "";
obj.childprocessName = "";
obj.attr1 = "";
obj.attr2 = "";
obj.attr3 = "";
obj.attr4 = "";
this.mesUnitPriceList.push(obj);
},
/** ${subTable.functionName}删除按钮操作 */
handleDeleteMesUnitPrice() {
if (this.checkedMesUnitPrice.length == 0) {
this.$modal.msgError("请先选择要删除的${subTable.functionName}数据");
} else {
const mesUnitPriceList = this.mesUnitPriceList;
const checkedMesUnitPrice = this.checkedMesUnitPrice;
this.mesUnitPriceList = mesUnitPriceList.filter(function(item) {
return checkedMesUnitPrice.indexOf(item.index) == -1
});
}
},
/** 复选框选中数据 */
handleMesUnitPriceSelectionChange(selection) {
this.checkedMesUnitPrice = selection.map(item => item.index)
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = "子工序导入";
this.upload.open = true;
},
/** 下载模板操作 */
importTemplate() {
this.download('mes/unitprice/importTemplate', {
}, `childprocess_template_${new Date().getTime()}.xlsx`)
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
//
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
this.getList();
},
//
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/unitprice/export', {
...this.queryParams
}, `unitprice_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -774,6 +774,7 @@
<el-button v-if="this.repairRecordSteps < 3 && this.form.equipmentCategory == '0' " @click="stepNext"
>下一步</el-button
>
<el-button v-if="this.repairRecordSteps < 3 && this.form.equipmentCategory == null " disabled>下一步</el-button>
<el-button
v-if=" this.repairRecordSteps == 4 && this.form.equipmentCategory == '1' "
type="primary"
@ -907,6 +908,18 @@
:equipmentCode="form.equipmentCode"
></ItemEquipment>
</el-tab-pane>
<el-tab-pane label="维修记录" >
<ItemWXRecords
:optType="optType"
:equipmentCode="form.equipmentCode"
></ItemWXRecords>
</el-tab-pane>
<el-tab-pane label="保养记录" >
<ItemBYRecords
:optType="optType"
:equipmentCode="form.equipmentCode"
></ItemBYRecords>
</el-tab-pane>
<el-tab-pane label="设备相关图片">
<el-descriptions
:column="1"
@ -1037,6 +1050,8 @@ import { Message } from "element-ui";
import { getToken } from "@/utils/auth";
import ItemSelectPerson from "./itemPerson.vue";
import ItemEquipment from "./itemEquipment.vue";
import ItemWXRecords from "./itemWXRecords.vue";
import ItemBYRecords from "./itemBYRecords.vue";
export default {
name: "Equipment",
@ -1046,7 +1061,7 @@ export default {
"equipment_status",
"equipment_category",
],
components: { ItemSelectPerson, ItemEquipment },
components: { ItemSelectPerson, ItemEquipment , ItemWXRecords , ItemBYRecords},
data() {
return {
CS: {
@ -1288,7 +1303,7 @@ export default {
// 穿
this.leftList.push({
key: response.rows[i].materialCode,
label: response.rows[i].materialDesc,
label: response.rows[i].materialCode + response.rows[i].materialDesc,
});
}
for (let i in response.selected) {
@ -1426,7 +1441,7 @@ export default {
// 穿
this.auxiliaryEquipmentLeftList.push({
key: response.rows[i].equipmentCode,
label: response.rows[i].equipmentName,
label: response.rows[i].equipmentCode + response.rows[i].equipmentName + response.rows[i].remark,
});
}
});
@ -1438,25 +1453,23 @@ export default {
handleUpdate(row) {
this.reset();
const equipmentId = row.equipmentId || this.ids;
getWorkCenterList().then((response) => {
this.options1 = response.rows;
});
this.queryAuxiliaryEquipmentParams.equipmentCategory = '0';
listEquipment(this.queryAuxiliaryEquipmentParams).then((response) => {
this.auxiliaryEquipmentLeftList = [];
this.auxiliaryEquipmentRightList = [];
for (let i in response.rows) {
// 穿
this.auxiliaryEquipmentLeftList.push({
key: response.rows[i].equipmentCode,
label: response.rows[i].equipmentName,
label: response.rows[i].equipmentCode + response.rows[i].equipmentName + response.rows[i].remark,
});
}
for (let i in response.selected) {
this.auxiliaryEquipmentRightList.push(response.selected[i].key);
this.form.auxiliaryEquipmentRightData = this.auxiliaryEquipmentRightList;
}
});
getEquipment(equipmentId).then((response) => {
this.form = response.data;
this.rightList = [];

@ -0,0 +1,168 @@
<template>
<div class="app-container">
<el-table
:data="itemList"
>
<!-- 序号 -->
<el-table-column
type="index"
width="90"
align="center"
:index="indexMethod"
label="序号"
fixed
/>
<el-table-column
label="单号"
align="center"
width="200"
prop="orderCode"
fixed
/>
<el-table-column
label="循环周期"
align="center"
prop="planLoop"
width="80"
/>
<el-table-column
label="实际开始时间"
align="center"
prop="orderStart"
width="200"
/>
<el-table-column
label="实际结束时间"
align="center"
prop="orderEnd"
width="200"
/>
<el-table-column
label="工单状态"
align="center"
prop="orderStatus"
width="100"
>
<template slot-scope="scope">
{{
scope.row.orderStatus == 0
? "待处理"
: scope.row.orderStatus == 1
? "已完成"
: scope.row.orderStatus == 2
? "已逾期"
: scope.row.orderStatus == 3
? "进行中"
: ""
}}
</template>
</el-table-column>
<el-table-column
label="工单费用"
align="center"
prop="orderCost"
width="100"
/>
<el-table-column
label="责任人"
align="center"
prop="planPerson"
width="100"
/>
<el-table-column
label="工单用时"
align="center"
prop="orderCostTime"
width="100"
/>
<el-table-column
label="签字"
align="center"
prop="orderSignPerson"
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 { getBYRecordsList } from "@/api/wms/equipment";
import { Message } from "element-ui";
export default {
name: "MdItemSingle",
dicts: ["equipment_status"],
data() {
return {
itemList :[],
showFlag: false,
//
selectedItemId: undefined,
selectedRows: undefined,
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
queryParams: {
pageNum: 1,
pageSize: 10,
equipmentCode: this.equipmentCode,
},
};
},
props: {
equipmentCode: undefined,
optType: undefined,
},
created() {
this.getList();
},
methods: {
//
cancel() {
this.showFlag = false;
this.reset();
},
//
reset() {
this.form = {
itemId: null,
itemCode: this.processId,
itemType: null,
};
this.resetForm("form");
},
//
indexMethod(index) {
return index + 1;
},
/** 查询设备编码列表*/
getList() {
getBYRecordsList(this.queryParams).then((response) => {
this.itemList = response.rows;
this.total = response.total;
});
},
},
};
</script>

@ -58,6 +58,7 @@ export default {
dicts: ["equipment_status"],
data() {
return {
itemList :[],
showFlag: false,
//
selectedItemId: undefined,

@ -0,0 +1,161 @@
<template>
<div class="app-container">
<el-table
:data="itemList"
>
<!-- 序号 -->
<el-table-column
type="index"
width="90"
align="center"
:index="indexMethod"
label="序号"
fixed
/>
<el-table-column
label="维修单号"
align="center"
prop="workCode"
fixed
width="200"
/>
<el-table-column
label="维修人员"
align="center"
prop="workPerson"
width="100"
/>
<el-table-column
label="维修班组"
align="center"
prop="workTeam"
width="100"
/>
<el-table-column
label="故障描述"
align="center"
prop="workFaultDesc"
width="150"
/>
<el-table-column
label="原因分析"
align="center"
prop="workReason"
width="150"
/>
<el-table-column
label="维修措施"
align="center"
prop="repairMeasures"
width="150"
/>
<el-table-column
label="维修开始时间"
align="center"
prop="workStartTime"
width="150"
/>
<el-table-column
label="维修结束时间"
align="center"
prop="workEndTime"
width="150"
/>
<el-table-column
label="维修状态"
align="center"
prop="workStatus"
width="100"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.device_repair_status"
:value="scope.row.workStatus"
/>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { getWXRecordsList } from "@/api/wms/equipment";
import { Message } from "element-ui";
export default {
name: "MdItemSingle",
dicts: ["device_repair_status"],
data() {
return {
itemList :[],
showFlag: false,
//
selectedItemId: undefined,
selectedRows: undefined,
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
queryParams: {
pageNum: 1,
pageSize: 10,
equipmentCode: this.equipmentCode,
},
};
},
props: {
equipmentCode: undefined,
optType: undefined,
},
created() {
this.getList();
},
methods: {
//
cancel() {
this.showFlag = false;
this.reset();
},
//
reset() {
this.form = {
itemId: null,
itemCode: this.processId,
itemType: null,
};
this.resetForm("form");
},
//
indexMethod(index) {
return index + 1;
},
/** 查询设备编码列表*/
getList() {
getWXRecordsList(this.queryParams).then((response) => {
this.itemList = response.rows;
this.total = response.total;
});
},
},
};
</script>

@ -58,7 +58,7 @@
<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="userDefined2" /> -->
<el-table-column label="仓库编号" align="center" prop="locCode" />
<el-table-column label="库位名称" align="center" prop="locDesc" v-if="false" />
<el-table-column label="产线名称" align="center" prop="productionLineDesc" v-if="false" />
@ -357,36 +357,36 @@ export default {
Optionlistck: [],
Packagingline: [
{
stationNo: 'LJ1',
stationname: '榄菊1',
stationNo: 'XL01',
stationname: '包装线01',
},
{
stationNo: 'LJ2',
stationname: '榄菊2',
stationNo: 'XL02',
stationname: '包装线02',
},
{
stationNo: 'LJ3',
stationname: '榄菊3',
stationNo: 'XL03',
stationname: '包装线03',
},
{
stationNo: 'LJ4',
stationname: '榄菊4',
stationNo: 'XL04',
stationname: '包装线04',
},
{
stationNo: 'LJ5',
stationname: '榄菊5',
stationNo: 'XL05',
stationname: '包装线05',
},
{
stationNo: 'LJ6',
stationname: '榄菊6',
stationNo: 'XL06',
stationname: '包装线06',
},
{
stationNo: 'LJ7',
stationname: '榄菊7',
stationNo: 'XL07',
stationname: '包装线07',
},
{
stationNo: 'LJ8',
stationname: '榄菊8',
stationNo: 'XL08',
stationname: '包装线08',
},
],

Loading…
Cancel
Save