Commit 8cfe3502 authored by 李驰骋's avatar 李驰骋

量产申请、制作基础流程通过

parent a04bcf3d
......@@ -146,9 +146,9 @@ export default {
};
},
computed: {
title () {
return '设置' + this.process.itemName + '物料'
}
title() {
return "设置" + this.process.itemName + "物料";
},
},
watch: {
process: {
......@@ -216,7 +216,9 @@ export default {
},
/** 提交编辑关联信息 */
submitEditConnect() {
this.tableData.splice(this.currentRowIdx, 1, this.form);
this.tableData.splice(this.currentRowIdx, 1, {
...this.form,
});
this.editConnectVisible = false;
},
},
......
......@@ -298,10 +298,10 @@ export default {
let thisObj = this;
this.$refs["form"].validate((valid) => {
if (valid) {
if (thisObj.optType == "add") {
if (thisObj.optType == 'add') {
thisObj.tableData.unshift({ ...thisObj.form });
} else {
thisObj.tableData.splice(thisObj.currentRowIdx, 1, thisObj.form);
thisObj.tableData.splice(thisObj.currentRowIdx, 1, thisObj.form)
}
thisObj.showFlag = false;
}
......
......@@ -8,9 +8,15 @@
prop="linkType"
align="center"
/>
<el-table-column label="工作站" prop="workstationId" align="center" />
<el-table-column label="工作站" prop="workstationName" align="center" />
<el-table-column label="标准工时" prop="stdWorkingTime" align="center" />
<el-table-column label="甘特图显示颜色" prop="colorCode" align="center" />
<el-table-column v-if="mode != 'info'" label="操作" align="center" width="150">
<el-table-column
v-if="mode != 'info'"
label="操作"
align="center"
width="150"
>
<template slot-scope="{ row, $index }">
<el-button
type="text"
......@@ -42,7 +48,7 @@
v-dialogDrag
:visible.sync="showFlag"
width="800px"
title="添加工序"
title="工序修改"
>
<el-form
ref="form"
......@@ -54,75 +60,31 @@
>
<el-row>
<el-col :span="12">
<el-form-item label="组件数量" prop="quantity">
<el-input
type="number"
v-model="form.quantity"
placeholder="请输入组件数量"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计量单位" prop="unitOfMeasure">
<el-input
v-model="form.unitOfMeasure"
placeholder="请输入计量单位"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报废百分比" prop="scrapPercentage">
<el-input
v-model="form.scrapPercentage"
placeholder="请输入报废百分比"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="替代组" prop="alternativeGroup">
<el-input
v-model="form.alternativeGroup"
placeholder="请输入替代组"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="替代优先级" prop="alternativePriorities">
<el-input
v-model="form.alternativePriorities"
placeholder="请输入替代优先级"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="策略" prop="alternativeStrategy">
<el-input
v-model="form.alternativeStrategy"
placeholder="请输入策略"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="使用概率" prop="alternativeProbability">
<el-form-item label="工作站" prop="workstationId">
<el-input
v-model="form.alternativeProbability"
placeholder="请输入使用概率"
></el-input>
v-model="form.workstationName"
disabled
placeholder="请选择工作站信息"
>
<el-button
slot="append"
icon="el-icon-search"
@click="handleWorkstationSelect"
></el-button>
</el-input>
<WorkstationSelect
ref="WorkstationSelect"
:processId="form.processId"
@onSelected="onWorkstationSelected"
></WorkstationSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="BOM行备注" prop="bomItemRemark">
<el-form-item label="标准工时" prop="stdWorkingTime">
<el-input
v-model="form.bomItemRemark"
placeholder="请输入BOM行备注"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料备注" prop="itemRemark">
<el-input
v-model="form.itemRemark"
placeholder="请输入物料备注"
type="number"
v-model="form.stdWorkingTime"
placeholder="请输入标准工时"
></el-input>
</el-form-item>
</el-col>
......@@ -139,9 +101,10 @@
<script>
import ItemBomSelect from "@/components/itemBomSelect/single.vue";
import ProcessProd from "./ProcessProd.vue";
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue";
export default {
components: { ItemBomSelect, ProcessProd },
inject: ['mode'],
components: { ItemBomSelect, ProcessProd, WorkstationSelect },
inject: ["mode"],
props: {
bomList: {
type: Array,
......@@ -158,15 +121,9 @@ export default {
rules: {},
/**表单初始化数据 */
form: {
quantity: "",
unitOfMeasure: "",
scrapPercentage: "",
alternativeGroup: "",
alternativePriorities: "",
alternativeStrategy: "",
alternativeProbability: "",
bomItemRemark: "",
itemRemark: "",
stdWorkingTime: "",
workstationId: "",
workstationName: "",
},
currentRow: {},
currentRowIndex: undefined,
......@@ -174,9 +131,9 @@ export default {
},
methods: {
setList(rows) {
this.tableData = rows.map(item => {
item.processItemList = []
return item
this.tableData = rows.map((item) => {
item.processItemList = [];
return item;
});
},
/** 更新工序的物料信息 */
......@@ -199,6 +156,10 @@ export default {
this.$refs["form"].validate((valid) => {
if (valid) {
this.showFlag = false;
this.tableData.splice(this.currentRowIndex, 1, {
...this.currentRow,
...this.form,
});
}
});
},
......@@ -208,22 +169,27 @@ export default {
/**重置表单 */
resetForm() {
this.form = {
quantity: "",
unitOfMeasure: "",
scrapPercentage: "",
alternativeGroup: "",
alternativePriorities: "",
alternativeStrategy: "",
alternativeProbability: "",
bomItemRemark: "",
itemRemark: "",
stdWorkingTime: "",
workstationId: "",
workstationName: "",
};
},
/**重置组件状态 */
resetState() {
this.resetForm()
this.tableData = []
}
this.resetForm();
this.tableData = [];
},
// 查询工作站信息
handleWorkstationSelect() {
this.$refs.WorkstationSelect.showFlag = true;
},
onWorkstationSelected(row) {
if (row != undefined && row != null) {
this.form.workstationId = row.workstationId;
this.form.workstationName = row.workstationName;
this.form.stdWorkingTime = row.stdWorkingTime;
}
},
},
};
</script>
......
......@@ -32,17 +32,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:pro:productionMake:add']"
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
......@@ -169,15 +158,6 @@
v-hasPermi="['mes:pro:productionMake:remove']"
>删除</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-circle-check"
v-if="scope.row.productionMakeStatus == 1"
@click="handleStartMake(scope.row)"
v-hasPermi="['mes:pro:productionMake:update']"
>开始制作</el-button
>
</template>
</el-table-column>
</el-table>
......@@ -247,12 +227,12 @@ export default {
productionMakeStatus: null,
},
options: [
{ value: "审批中", label: "审批中" },
{ value: "待制作", label: "待制作" },
{ value: "制造中", label: "制造中" },
{ value: "待质检", label: "待质检" },
{ value: "待确认", label: "待确认" },
{ value: "已完成", label: "已完成" },
{ value: "0", label: "待检查" },
{ value: "1", label: "待制作" },
{ value: "2", label: "制造中" },
{ value: "3", label: "待质检" },
{ value: "4", label: "待确认" },
{ value: "5", label: "已完成" },
],
// 表单参数
......
......@@ -287,6 +287,7 @@ export default {
const processList = this.$refs.ProogingProcessRef.getComData();
const params = {
...this.form,
'productionRequestId':this.$route.query.productionRequestId,
bomList,
processList,
};
......
......@@ -487,15 +487,15 @@
return '否';
}
},
},
// 生成制作单
generate(row) {
// 跳转到制作单界面
const prototypeRequestId = row.productionRequestId || this.ids;
this.$router.push(
"/mes/pro/productionMake/apply?productionRequestId=" + prototypeRequestId
);
return;
// 生成制作单
generate(row) {
// 跳转到制作单界面
const prototypeRequestId = row.productionRequestId || this.ids;
this.$router.push(
"/mes/pro/productionMake/apply?productionRequestId=" + prototypeRequestId
);
return;
},
},
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment