界面调整

yangwl
zhaoxiaolin 4 months ago
parent 0096c95f9c
commit c0a01c573b

@ -92,4 +92,12 @@ export function getProjectOptionList(checkType) {
url: '/quality/staticTable/getProjectOptionList/' + checkType,
method: 'get'
});
}
export function getDLTableCPKInfo(query) {
return request({
url: '/quality/staticTable/getDLTableCPKInfo',
method: 'get',
params: query
});
}

@ -105,7 +105,9 @@ service.interceptors.response.use(res => {
} else if (code === 601) {
Message({ message: msg, type: 'warning' })
return Promise.reject('error')
} else if (code !== 200) {
} else if (code === 642) {
return res.data
}else if (code !== 200) {
Notification.error({ title: msg })
return Promise.reject('error')
} else {

@ -77,9 +77,10 @@
plain
icon="el-icon-download"
size="mini"
:disabled="isButtonDisabled"
@click="handleSyncSAP"
v-hasPermi="['mes:pro:order:add']"
>SAP同步
>{{ countdownTime > 0 ? countdownTime + ' 秒后重试SAP同步' : 'SAP同步' }}
</el-button>
</el-col>
<el-col :span="1.5">
@ -115,14 +116,14 @@
>导出
</el-button>
</el-col>
<!--
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-guide" size="mini"
@click="handleAutoSplit"
:disabled="single"
v-hasPermi="['mes:pro:order:edit']">辅助排产
</el-button>
</el-col>-->
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -369,7 +370,7 @@
</el-dialog>
<!-- 拆分模块 -->
<el-dialog :title="title" :visible.sync="splitOpen" width="1000px" append-to-body>
<el-dialog :title="title" :visible.sync="splitOpen" width="1000px">
<!-- 拆分头pro -->
<el-table
border
@ -503,7 +504,7 @@
</div>
</el-dialog>
<!-- 辅助排产规划 -->
<el-dialog :title="titleAutoSplit" :visible.sync="openAutoSplit" width="1000px">
<el-dialog :title="titleAutoSplit" :visible.sync="openAutoSplit" width="1000px" @close="handleClose">
<el-steps :active="activeSplit" simple>
<el-step title="工单基本信息" icon="el-icon-edit"></el-step>
<el-step title="生产线体选择" icon="el-icon-s-tools"></el-step>
@ -519,6 +520,18 @@
</el-date-picker>
</el-form-item>
</el-col>
<!-- 选择班次 -->
<el-col :span="12">
<el-form-item size="small" label="选择班次" class="my-select my-first">
<el-select v-model="autoSplitform1.shiftId" placeholder="请选择班次">
<el-option v-for="item in workShift" :key="item.shiftId" :label="item.shiftDesc"
:value="item.shiftId"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
@ -576,7 +589,7 @@
<el-table-column width="70" align="center" prop="quantitySplit" label="数量"></el-table-column>
<el-table-column width="60" label="单位" align="center" prop="unit"/>
<el-table-column width="90" label="工艺编码" align="center" prop="routeCode"/>
<el-table-column width="70" label="班次" align="center" prop="shiftDesc"/>
<el-table-column width="70" label="班次" align="center" prop="shiftDesc" :formatter="shiftFormat"/>
<el-table-column width="160" align="center" prop="batchCodeList" label="批次号"></el-table-column>
<el-table-column width="100" align="center" prop="batchNumList" label="批次数量"></el-table-column>
</el-table>
@ -730,10 +743,14 @@ export default {
activeSplit: 0,
autoSplitform1:{
productDate:null,
sortNo:null
sortNo:null,
shiftId:null
},
autoSplitform2: {lineCodes:[]},
lineCodes:[]
lineCodes:[],
countdownTime: 0,//
isButtonDisabled: false, //
countdownInterval: null, //
}
},
created() {
@ -1457,6 +1474,23 @@ export default {
},
// -SAP
handleSyncSAP() {
if (this.countdownTime > 0) return; //
this.isButtonDisabled = true; //
this.countdownTime = 30; // 10
// 使setInterval
this.countdownInterval = setInterval(() => {
if (this.countdownTime > 0) {
this.countdownTime--;
} else {
clearInterval(this.countdownInterval); //
this.isButtonDisabled = false; //
this.countdownTime = 0; //
}
}, 1000); //
this.loading = true;
let planDateStart =null;
let planDateEnd =null;
@ -1496,13 +1530,20 @@ export default {
},
//
handleAutoSplit(row) {
this.openAutoSplit = true;
this.autoSplitList = this.orderCodes;
if(this.autoSplitList[0] == 'o2'){
this.$modal.msgError("已经拆分结束!");
if(this.autoSplitList[0].status != 'o0'){
this.$modal.msgError("请选择完全未拆分的订单!");
return
}
//
getProShifts().then(response => {
this.workShift = response.data;
this.autoSplitform1.shiftId = 5;
})
this.openAutoSplit = true;
this.autoSplitform1.productDate = this.autoSplitList[0].planProDate;
// ()
getProRoutes(this.autoSplitList[0].prodCode).then(response => {
@ -1518,7 +1559,12 @@ export default {
// 线
getCanProductLine(this.autoSplitList[0]).then(response => {
this.lineCodes = response.lineList;
this.autoSplitform2.lineCodes = response.recommendLineList;//['XL01','XL02'];
if(response.recommendLineList == null){
this.$modal.msgError("设备产能达不到订单水平,请调整设备产能或重新审视订单计划数量!");
this.cancel();
}else{
this.autoSplitform2.lineCodes = response.recommendLineList;//['XL01','XL02'];
}
})
@ -1564,20 +1610,27 @@ export default {
if (this.activeSplit++ > 2) this.activeSplit = 0;
//线
if(this.activeSplit == 2){
autoSplitOrder(Object.assign({},this.autoSplitList[0],this.autoSplitform1,this.autoSplitform2)).then(response => {
this.workerLoading = true // true
//
getWorkOrderListCG(this.autoSplitList[0].id).then(response => {
var data = response.data
this.splitData = data
this.refreshWorkerTable = false // refreshProTablefalse
this.$nextTick(() => {
// 使$nextTickDOM
this.refreshWorkerTable = true // refreshProTabletrue
this.workerLoading = false // false
const p = Object.assign({},this.autoSplitList[0],this.autoSplitform1,this.autoSplitform2);
debugger
autoSplitOrder(p).then(response => {
if(response.code == 642){
this.$modal.msgError(response.msg);
this.cancel();
}else{
this.workerLoading = true // true
//
getWorkOrderListCG(this.autoSplitList[0].id).then(res => {
var data = res.data
this.splitData = data
this.refreshWorkerTable = false // refreshProTablefalse
this.$nextTick(() => {
// 使$nextTickDOM
this.refreshWorkerTable = true // refreshProTabletrue
this.workerLoading = false // false
})
})
})
}
});
}
},
@ -1596,7 +1649,20 @@ export default {
this.openAutoSplit = false;
this.activeSplit = 0;
});
}
},
handleClose() {
this.cancel();
},
shiftFormat(row,column){
let array = this.workShift;
let value = '其他';
array.forEach((item) => {
if (item.shiftId == row.shiftId) {
value = item.shiftDesc
}
})
return value;
},
}
}

@ -1525,6 +1525,9 @@ export default {
if (this.queryParams.productDateArray != null) {
this.queryParams.productDateStart = moment(this.queryParams.productDateArray[0]).format('YYYY-MM-DD');
this.queryParams.productDateEnd = moment(this.queryParams.productDateArray[1]).format('YYYY-MM-DD');
}else{
this.queryParams.productDateStart = null;
this.queryParams.productDateEnd = null;
}
//
listWorkorderLevel0(this.queryParams).then(response => {

@ -206,15 +206,15 @@
@click="handleCheckProject(scope.row)"
v-hasPermi="['quality:qcIncome:edit']"
>检验</el-button>
<!--
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['quality:qcIncome:remove']"
>删除</el-button>
-->
icon="el-icon-magic-stick"
@click="handleCheckProjectM(scope.row)"
v-hasPermi="['quality:qcIncome:editM']"
>审核编辑</el-button>
</template>
</el-table-column>
</el-table>
@ -722,6 +722,11 @@ export default {
this.$refs.itemSelectProject.showFlag = true;
this.$refs.itemSelectProject.init(row,'material');
},
//()
handleCheckProjectM(row){
this.$refs.itemSelectProject.showFlag = true;
this.$refs.itemSelectProject.init(row,'material');
},
//
handleView(row){
this.$refs.itemSelectProject.showFlag = true;

@ -9,63 +9,8 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="批次号" prop="incomeBatchNo">
<el-input
v-model="queryParams.incomeBatchNo"
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="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="incomeTimeArray">
<el-date-picker
v-model="queryParams.incomeTimeArray"
format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</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-form-item label="任务创建时间" prop="checkTimeArray" label-width="120px">
<el-date-picker
v-model="queryParams.checkTimeArray"
format="yyyy-MM-dd HH:mm:ss"
@ -124,6 +69,17 @@
v-hasPermi="['quality:qcInventory:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-magic-stick"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['quality:qcInventory:edit']"
>审核编辑</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -131,20 +87,18 @@
<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="checkType" align="center" prop="checkType" v-if="false"/>
<el-table-column label="检验任务编号" align="center" prop="checkNo" width="120"/>
<el-table-column label="库存批次号" align="center" prop="incomeBatchNo" width="120"/>
<el-table-column label="物料号" align="center" prop="materialCode" width="170"/>
<el-table-column label="物料名称" align="center" prop="materialName" width="150"/>
<el-table-column label="不合格数量" align="center" prop="noOkQuality" width="120"/>
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="供应商编码" align="center" prop="supplierCode" width="120"/>
<el-table-column label="供应商名称" align="center" prop="supplierName" width="240"/>
<el-table-column label="入库时间" align="center" prop="incomeTime" width="180">
<el-table-column label="检验任务编号" align="center" prop="checkNo" width="100"/>
<el-table-column label="库存批次号" align="center" prop="incomeBatchNo" width="100"/>
<el-table-column label="物料号" align="center" prop="materialCode" width="80"/>
<el-table-column label="物料名称" align="center" prop="materialName" width="100"/>
<el-table-column label="仓库编码" align="center" prop="supplierCode" width="90"/>
<el-table-column label="仓库名称" align="center" prop="supplierName" width="90"/>
<el-table-column label="检测地点" align="center" prop="checkLoc" width="100"/>
<el-table-column label="创建时间" align="center" prop="checkTime" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="检测地点" align="center" prop="checkLoc" width="120"/>
<el-table-column label="检测状态" align="center" prop="checkStatus" >
<template slot-scope="scope">
<dict-tag
@ -155,33 +109,12 @@
</el-table-column>
<el-table-column label="检测人工号" align="center" prop="checkManCode" width="100"/>
<el-table-column label="检测人姓名" align="center" prop="checkManName" width="100"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<el-table-column label="检验时间" align="center" prop="checkTime" width="100">
<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" />
<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="handleCheckProject(scope.row)"
v-hasPermi="['quality:qcIncome:edit']"
>检验</el-button>
<!--
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['quality:qcIncome:remove']"
>删除</el-button>
-->
</template>
</el-table-column>
</el-table>
<pagination
@ -214,45 +147,29 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="批次号" prop="incomeBatchNo">
<el-input v-model="form.incomeBatchNo" placeholder="请输入批次号">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请选择物料名称">
<el-button slot="append" @click="handleSelectMaterial" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="物料号" prop="materialCode">
<el-input v-model="form.materialCode" placeholder="请输入物料号" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="入库时间" prop="incomeTime">
<el-date-picker clearable
v-model="form.incomeTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择入库时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="抽样数量" prop="sampleQuality">
<el-input type="number" v-model="form.sampleQuality" placeholder="请输入抽样数量"/>
<el-form-item label="批次号" prop="incomeBatchNo">
<el-input v-model="form.incomeBatchNo" placeholder="请输入批次号">
</el-input>
</el-form-item>
</el-col>
<el-col :span="6" v-for="(item,index) in form.defects" :key="index">
<el-form-item :label="item.defectSubclass" prop="">
<el-input type="number" v-model="item.noOkQuality" placeholder="请输入不合格数量" />
<el-col :span="8">
<el-form-item label="入库时间" prop="incomeTime">
<el-input v-model="form.incomeTime" placeholder="" disabled/>
</el-form-item>
</el-col>
</el-row>
@ -283,11 +200,7 @@
<el-input v-model="form.checkManCode" placeholder="请输入检测人工号" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检测地点" prop="checkLoc">
<el-input v-model="form.checkLoc" placeholder="请输入检测地点" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
@ -370,7 +283,7 @@ export default {
incomeTime: null,
checkLoc: null,
checkStatus: null,
checkManCode: null,
checkManCode: null,
checkManName: null,
checkTime: null,
checkResult: null,
@ -410,9 +323,9 @@ export default {
incomeTime: [
{ required: true, message: "来料时间不能为空", trigger: "blur" }
],
checkManName: [
{ required: true, message: "检测人不能为空", trigger: "blur" }
],
//checkManName: [
// { required: true, message: "", trigger: "blur" }
//],
checkLoc: [
{ required: true, message: "检测地点不能为空", trigger: "blur" }
],

@ -226,14 +226,14 @@
@click="handleCheckProject(scope.row)"
v-hasPermi="['quality:qcProduce:edit']"
>检验</el-button>
<!--
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['quality:qcProduce:remove']"
>删除</el-button>-->
icon="el-icon-magic-stick"
@click="handleCheckProjectM(scope.row)"
v-hasPermi="['quality:qcProduce:editM']"
>审核编辑</el-button>
</template>
</el-table-column>
</el-table>
@ -802,6 +802,11 @@ export default {
this.$refs.itemSelectProject.showFlag = true;
this.$refs.itemSelectProject.init(row,'produce');
},
//()
handleCheckProjectM(row){
this.$refs.itemSelectProject.showFlag = true;
this.$refs.itemSelectProject.init(row,'material');
},
//
handleView(row){
this.$refs.itemSelectProject.showFlag = true;

@ -151,17 +151,16 @@
>折线图表分析</el-button
>
</el-col>
<!--
<el-col :span="1.5">
<el-button
type="primary"
type="danger"
plain
icon="el-icon-s-data"
icon="el-icon-place"
size="mini"
@click="handleAnalysis3"
>综合图表分析</el-button
@click="handleCPK"
>CPK分析</el-button
>
</el-col>-->
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
@ -239,7 +238,7 @@
<script>
import {
getDLTableAvgInfo,
getDLTableAvgInfo,getDLTableCPKInfo,
getDLDetailList,
getCheckTypeList,
getSupplierList,
@ -884,8 +883,8 @@ export default {
myChart1.setOption(option1);
},
//
handleAnalysis3() {
this.title = "综合图表分析";
handleCPK() {
this.title = "CPK分析";
if (
this.queryParams.projectNoArray.length > 0 &&
this.queryParams.projectNoArray.length < 2
@ -909,7 +908,7 @@ export default {
).format("YYYY-MM-DD");
}
getDLTableAvgInfo(this.queryParams).then((response) => {
getDLTableCPKInfo(this.queryParams).then((response) => {
this.detailechartslist = [];
this.seriesdata = [];
this.legenddata = [];
@ -1001,7 +1000,7 @@ export default {
var myChart1 = echarts.init(document.querySelector("#echart1"));
var option3 = {
title: {
text: '综合图表分析'
text: 'CPK分析'
},
tooltip: {
trigger: 'axis'
@ -1029,41 +1028,6 @@ export default {
type: 'value'
},
series: this.seriesdata
/**[
{
name: 'Email',
type: 'line',
stack: 'Total',
data: [120, 132, 101, 134, 90, 230, 210],
markLine: {
symbolSize: 0,//
data: [
{
lineStyle: {
color: '#ffc000',
width: 3
},
yAxis: 200,//
label: { show: true, position: 'end', formatter: '上限' }
},
{
lineStyle: {
color: '#4f81bd',
width: 3
},
yAxis: 100,
label: { show: true, position: 'end', formatter: '下限' }
}
]
}
},
{
name: 'Union Ads',
type: 'line',
stack: 'Total',
data: [220, 182, 191, 234, 290, 330, 310]
}
]**/
};
myChart1.setOption(option3);
},

@ -218,6 +218,14 @@
@click="handleCheckProject(scope.row)"
v-hasPermi="['quality:qcWarehousing:edit']"
>检验</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-magic-stick"
@click="handleCheckProjectM(scope.row)"
v-hasPermi="['quality:qcWarehousing:editM']"
>审核编辑</el-button>
</template>
</el-table-column>
</el-table>
@ -756,6 +764,12 @@ export default {
this.$refs.itemSelectProject.showFlag = true;
this.$refs.itemSelectProject.init(row,'product');
},
//()
handleCheckProjectM(row){
this.$refs.itemSelectProject.showFlag = true;
this.$refs.itemSelectProject.init(row,'material');
},
//
handleView(row){
this.$refs.itemSelectProject.showFlag = true;

Loading…
Cancel
Save