修改生产界面

master
夜笙歌 9 months ago
parent 160b0f05c4
commit 6ec2a2f2c6

@ -215,7 +215,8 @@
</el-form-item>
<el-form-item label="领料仓库">
<el-select v-model="form.warehouseId" placeholder="请选择领料仓库" @change="form.wmsRawOutstockDetailList =[]">
<el-option v-for="item in warehouseList" :label="item.warehouseName" :value="item.warehouseId"></el-option>
<el-option v-for="item in warehouseList" :key="item.warehouseId" :label="item.warehouseName"
:value="item.warehouseId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="领料原因">

@ -14,21 +14,21 @@
<el-input v-model="form.planCode"></el-input>
</el-form-item>
<el-form-item label="物料编号">
<el-input v-model="form.region"></el-input>
<el-input v-model="form.materialId"></el-input>
</el-form-item>
<el-form-item label="物料名称">
<el-input v-model="form.materialName"></el-input>
</el-form-item>
<el-form-item label="扫码时间">
<el-input v-model="form.materialId"></el-input>
<el-input v-model="form.materialId1"></el-input>
</el-form-item>
<el-form-item label="产品型号">
<el-input v-model="form.materialId"></el-input>
<el-input v-model="form.materialId1"></el-input>
</el-form-item>
</el-form>
<div style="text-align: center">
<el-button type="success">图纸下发</el-button>
<el-button type="primary">继续</el-button>
<el-button type="primary">完成</el-button>
</div>
</div>
@ -121,7 +121,7 @@
<el-button
size="small"
type="text"
v-if="scope.row.completeAmoun === 0"
v-if="scope.row.completeAmount === 0"
@click="startProduction(scope.row)"
>
开始
@ -130,7 +130,7 @@
size="small"
type="text"
@click="nextProduction(scope.row)"
v-if="scope.row.completeAmount < scope.row.planAmount"
v-if="scope.row.completeAmount !== 0 && scope.row.completeAmount < scope.row.planAmount"
>
继续
</el-button>
@ -157,12 +157,29 @@
<div class="bottom">
<el-row>
<el-button type="primary">首页</el-button>
<el-button type="success">板材领料</el-button>
<el-button type="success" @click="getMaterialsModel = true">板材领料</el-button>
<el-button type="info">SOP预览</el-button>
<el-button type="danger">退出</el-button>
</el-row>
</div>
<el-dialog title="板材领料" :visible.sync="getMaterialsModel">
<el-form :model="form">
<el-form-item label="活动名称" label-width="120px">
<el-input v-model="form.name" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="活动区域" label-width="120px">
<el-select v-model="form.region" placeholder="请选择活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="getMaterialsModel = false"> </el-button>
<el-button type="primary" @click="getMaterialsModel = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -179,6 +196,7 @@ export default {
},
data() {
return {
getMaterialsModel:false,
form: {},
tableData: [
{
@ -212,6 +230,8 @@ export default {
this.getInfo(e.data[0])
getNewestProductPlanDetail(e.data[0].planId).then(val=>{
this.form = val.data
this.form.materialId = e.data[0].materialId
this.form.materialName = e.data[0].materialName
})
})
this.$refs.chart2.setData({
@ -382,6 +402,8 @@ export default {
this.getInfo(e)
getNewestProductPlanDetail(e.planId).then(val=>{
this.form = val.data
this.form.materialId = e.materialId
this.form.materialName = e.materialName
})
},
getInfo(e) {
@ -407,7 +429,7 @@ export default {
center: ["50%", "50%"],
data: [
{
value: e.planAmount,
value: e.planAmount === 0 ? 0.0001 : e.planAmount ,
label: {
normal: {
rich: {
@ -426,7 +448,7 @@ export default {
formatter: function (params) {
return (
"{a|" +
params.data.value +
(params.data.value === 0.0001 ? 0 : params.data.value) +
"}" +
"\n{b|计划}"
);
@ -486,7 +508,7 @@ export default {
center: ["50%", "50%"],
data: [
{
value: e.completeAmount,
value: e.completeAmount === 0 ? 0.0001 : e.completeAmount ,
label: {
normal: {
rich: {
@ -505,7 +527,7 @@ export default {
formatter: function (params) {
return (
"{a|" +
params.data.value +
(params.data.value === 0.0001 ? 0 : params.data.value) +
"}" +
"\n{b|实际}"
);
@ -565,7 +587,7 @@ export default {
center: ["50%", "50%"],
data: [
{
value: e.planAmount - e.completeAmount,
value: (e.planAmount - e.completeAmount) === 0 ? 0.0001 : (e.planAmount - e.completeAmount) ,
label: {
normal: {
rich: {
@ -584,7 +606,7 @@ export default {
formatter: function (params) {
return (
"{a|" +
params.data.value +
(params.data.value === 0.0001 ? 0 : params.data.value) +
"}" +
"\n{b|差异}"
);
@ -663,7 +685,7 @@ export default {
formatter: function (params) {
return (
"{a|" +
params.data.value +
(params.data.value === 0.0001 ? 0 : params.data.value) +
"%}" +
"\n{b|完成率}"
);
@ -709,6 +731,8 @@ export default {
this.getInfo(e)
const data = await startNextProductPlanDetail({planId:e.planId})
this.form = data.data
this.form.materialId = e.materialId
this.form.materialName = e.materialName
},
}

@ -1,4 +1,5 @@
<template>
<div>
<el-card>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-divider content-position="left"><span style="font-weight: bold; font-size: larger;">工单信息</span></el-divider>
@ -22,7 +23,7 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddMesProductPlan">
<el-button icon="el-icon-plus" size="mini" type="primary" @click="handleAddMesProductPlan">
</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
@ -30,56 +31,57 @@
<!-- </el-button>-->
<!-- </el-col>-->
</el-row>
<el-table :data="mesProductPlanList" :row-class-name="rowMesProductPlanIndex"
@selection-change="handleMesProductPlanSelectionChange" ref="mesProductPlan">
<el-table-column type="selection" width="50" align="center"/>
<el-table-column label="序号" align="center" prop="index" width="50" v-if="false"/>
<el-table-column label="派工单号" align="center" prop="dispatchCode" width="190">
<el-table ref="mesProductPlan" :data="mesProductPlanList"
:row-class-name="rowMesProductPlanIndex" @selection-change="handleMesProductPlanSelectionChange">
<el-table-column align="center" type="selection" width="50"/>
<el-table-column v-if="false" align="center" label="序号" prop="index" width="50"/>
<el-table-column align="center" label="派工单号" prop="dispatchCode" width="190">
<template slot-scope="scope">
<el-input v-model="scope.row.dispatchCode" :disabled="true"/>
</template>
</el-table-column>
<el-table-column label="工序" align="center" prop="processName" width="140">
<el-table-column align="center" label="工序" prop="processName" width="140">
<template slot-scope="scope">
<el-input v-model="scope.row.processName" :disabled="true"/>
</template>
</el-table-column>
<el-table-column label="步骤" align="center" prop="processOrder" >
<el-table-column align="center" label="步骤" prop="processOrder">
<template slot-scope="scope">
<el-input v-model="scope.row.processOrder" :disabled="true"/>
</template>
</el-table-column>
<el-table-column label="工位" align="center" prop="stationName" width="140" >
<el-table-column align="center" label="工位" prop="stationName" width="140">
<template slot-scope="scope">
<el-input v-model="scope.row.stationName" :disabled="true"/>
</template>
</el-table-column>
<el-table-column label="派工数量" align="center" prop="planAmount" width="100">
<el-table-column align="center" label="派工数量" prop="planAmount" width="100">
<template slot-scope="scope">
<el-input v-model="scope.row.planAmount" :disabled="scope.row.oldRowFlag"/>
</template>
</el-table-column>
<el-table-column label="派工标准工时" align="center" prop="productionTime" width="100">
<el-table-column align="center" label="派工标准工时" prop="productionTime" width="100">
<template slot-scope="scope">
<el-input v-model="scope.row.productionTime" :disabled="scope.row.oldRowFlag"/>
</template>
</el-table-column>
<el-table-column label="计划开始时间" align="center" prop="planBeginTime" width="230">
<el-table-column align="center" label="计划开始时间" prop="planBeginTime" width="230">
<template slot-scope="scope">
<el-date-picker clearable v-model="scope.row.planBeginTime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择计划开始时间" :disabled="scope.row.oldRowFlag"/>
<el-date-picker v-model="scope.row.planBeginTime" :disabled="scope.row.oldRowFlag" clearable
placeholder="请选择计划开始时间"
type="datetime" value-format="yyyy-MM-dd HH:mm:ss"/>
</template>
</el-table-column>
<el-table-column label="计划完成时间" align="center" prop="planEndTime" width="230">
<el-table-column align="center" label="计划完成时间" prop="planEndTime" width="230">
<template slot-scope="scope">
<el-date-picker clearable v-model="scope.row.planEndTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择计划完成时间" :disabled="scope.row.oldRowFlag"/>
<el-date-picker v-model="scope.row.planEndTime" :disabled="scope.row.oldRowFlag" clearable
placeholder="请选择计划完成时间"
type="datetime" value-format="yyyy-MM-dd HH:mm:ss"/>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="planStatus" width="150">
<el-table-column align="center" label="状态" prop="planStatus" width="150">
<template slot-scope="scope">
<el-select v-model="scope.row.planStatus" placeholder="请选择状态" :disabled="true">
<el-select v-model="scope.row.planStatus" :disabled="true" placeholder="请选择状态">
<el-option
v-for="dict in dict.type.product_status"
:key="dict.value"
@ -89,12 +91,12 @@
</el-select>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="50">
<el-table-column align="center" class-name="small-padding fixed-width" label="操作" width="50">
<template slot-scope="scope">
<el-button
type="primary"
icon="el-icon-search"
size="mini"
type="primary"
@click="handleDrawing(scope.row)"
>图纸
</el-button>
@ -109,6 +111,58 @@
</el-form-item>
</el-form>
</el-card>
<el-dialog
:visible.sync="blueprintModel"
title="上传图纸"
width="30%"
@before-close="blueprintModel = false">
<el-upload
ref="upload"
:auto-upload="false"
action="#"
multiple
list-type="picture-card">
<i slot="default" class="el-icon-plus"></i>
<div slot="file" slot-scope="{file}">
<img
v-if="isAssetTypeAnImage(file.name)"
:alt="file.name"
:src="file.url" class="el-upload-list__item-thumbnail"
>
<span v-else>{{ file.name }}</span>
<span class="el-upload-list__item-actions">
<span
v-if="isAssetTypeAnImage(file.name)"
class="el-upload-list__item-preview"
@click="handlePictureCardPreview(file)"
>
<i class="el-icon-zoom-in"></i>
</span>
<span
class="el-upload-list__item-delete"
@click="handleDownload(file)"
>
<i class="el-icon-download"></i>
</span>
<span
class="el-upload-list__item-delete"
@click="$refs.upload.handleRemove(file)"
>
<i class="el-icon-delete"></i>
</span>
</span>
</div>
</el-upload>
<span slot="footer" class="dialog-footer">
<el-button @click="blueprintModel = false"> </el-button>
<el-button type="primary" @click="blueprintModel = false"> </el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="pictureDetailModel">
<img :src="dialogImageUrl" alt="" width="100%">
</el-dialog>
</div>
</template>
<script>
@ -121,6 +175,9 @@ export default {
dicts: ['active_flag', 'product_status'],
data() {
return {
blueprintModel: false,
pictureDetailModel: false,
dialogImageUrl: '',
// name
activeName: "columnInfo",
//
@ -183,10 +240,16 @@ export default {
}
},
methods: {
isAssetTypeAnImage(ext) {
let suffix = ext.lastIndexOf(".");
let name = ext.substr(suffix + 1);
return [
'png', 'jpg', 'jpeg'].includes(name.toLowerCase())
},
/** 提交按钮 */
submitForm() {
let dataList = this.mesProductPlanList.filter(plan => !plan.oldRowFlag);
if (dataList.length === 0){
if (dataList.length === 0) {
this.close();
return;
}
@ -223,24 +286,29 @@ export default {
this.$modal.msgSuccess(res.msg);
this.close();
});
},
}
,
/** 生产计划明细序号 */
rowMesProductPlanIndex({row, rowIndex}) {
row.index = rowIndex + 1;
},
}
,
/** 复选框选中数据 */
handleMesProductPlanSelectionChange(selection) {
this.checkedMesProductPlan = selection.map(item => item.index)
},
}
,
/** 关闭按钮 */
close() {
const obj = {path: "/mes/plan/productOrder", query: {t: Date.now(), pageNum: this.$route.query.pageNum}};
this.$tab.closeOpenPage(obj);
},
}
,
/** 查看图纸 */
handleDrawing(row) {
console.log(row);
},
this.blueprintModel = true
}
,
/** 生产计划添加按钮操作 */
handleAddMesProductPlan() {
let dispatchCode = "";
@ -285,11 +353,13 @@ export default {
})
})
})
},
}
,
isPositiveInteger(value) {
// 使
return /^[1-9]\d*$/.test(value);
},
}
,
/** 生产计划明细删除按钮操作 */
handleDeleteMesProductPlan() {
if (this.checkedMesProductPlan.length == 0) {
@ -302,6 +372,14 @@ export default {
});
}
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.pictureDetailModel = true;
}
,
handleDownload(file) {
console.log(file);
}
},
mounted() {
@ -317,5 +395,6 @@ export default {
// }
// });
}
};
}
;
</script>

Loading…
Cancel
Save