Commit a51b5bbf authored by hiyonx's avatar hiyonx

Merge branch 'dev' of http://git.local.topsunit.com/mes/mes-ui into dev

parents 30c6aa39 6703dbba
<template>
<div class="process-prod">
<!-- 设置检验项弹窗 -->
<el-dialog
:visible.sync="showProcessProd"
width="800px"
:before-close="beforeClose"
append-to-body
title="设置检验项"
>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>
</el-col>
</el-row>
<el-table :data="tableData">
<el-table-column label="检测项编码" align="center" prop="indexCode" />
<el-table-column label="检测项名称" align="center" prop="indexName" />
<el-table-column label="检测项类型" align="center" prop="indexType">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_index_type" :value="scope.row.indexType"/>
</template>
</el-table-column>
<el-table-column label="检测工具" align="center" prop="qcTool" />
<el-table-column label="备注" prop="remark" align="center" />
<el-table-column label="操作" align="center" width="150">
<template slot-scope="{ row, $index }">
<el-button
type="text"
icon="el-icon-edit"
size="small"
@click="updateRow(row, $index)"
>修改</el-button
>
<el-button
type="text"
icon="el-icon-delete"
size="small"
@click="deleteRow($index)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<div slot="footer">
<el-button type="primary" size="small" @click="cancleConnect"
>关闭</el-button
>
</div>
</el-dialog>
<!-- 编辑检验项关联信息 -->
<el-dialog
:visible.sync="editConnectVisible"
width="800px"
title="编辑检验项关联信息"
>
<el-form ref="form" :model="form" label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item label="检测项编码" prop="indexCode" >
<el-input v-model="form.indexCode" placeholder="请选择测项编码"
readonly>
<el-button
slot="append"
icon="el-icon-search"
@click="$refs['QcindexSelectRef'].showFlag = true"
></el-button>
</el-input>
<QcindexSelect ref="QcindexSelectRef" @onSelected="onQcindexSelect" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" :rows="3"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer">
<el-button type="primary" size="small" @click="addOrEditubmit"
>确认</el-button
>
<el-button size="small" @click="editConnectVisible = false"
>取消</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import QcindexSelect from "@/components/qcindexSelect/single.vue";
export default {
props: {
process: {
type: Object,
default: () => ({}),
},
},
components: { QcindexSelect },
dicts: ['mes_index_type'],
data() {
return {
form: {
indexCode: "",
indexName: "",
indexType: "",
qcTool:"",
qcindexId:"",
remark: "",
},
currentRowIdx: undefined,
tableData: [],
selectedItemId: undefined,
selectedRows: null,
showFlag: false,
optType:null,
showProcessProd: false,
editConnectVisible: false,
};
},
computed: {
title() {
return "设置" + this.process.itemName + "检验项";
},
},
watch: {
process: {
handler(val) {
this.tableData = val.qcindexList;
},
deep: true,
},
},
methods: {
handleRowChange(row) {
if (row) {
this.selectedRows = row;
}
},
handleRowDbClick(row) {
if (row) {
this.selectedRows = row;
this.tableData.unshift(this.selectedRows);
this.showFlag = false;
}
},
/**新增按钮 */
handleAdd() {
this.resetForm();
this.optType='add';
this.editConnectVisible = true;
},
/**编辑 */
updateRow(row, idx) {
this.resetForm();
Object.assign(this.form, row);
this.currentRowIdx = idx;
this.optType='edit';
this.editConnectVisible = true;
},
/**新增 */
configmSelect() {
if (this.form.indexCode == null || this.form.indexCode == 0) {
return;
}
console.log("进来了"+this.form);
this.tableData.unshift({
...this.form,
processId: this.process.processId,
});
this.editConnectVisible = false;
},
/** 提交编辑关联信息 */
submitEditConnect() {
this.tableData.splice(this.currentRowIdx, 1, {
...this.form,
});
this.editConnectVisible = false;
},
addOrEditubmit(){
if(this.optType=='add'){
this.configmSelect();
}else{
this.submitEditConnect();
}
},
deleteRow(index) {
this.tableData.splice(index, 1);
},
cancleConnect() {
this.$emit("updateQcindex", this.tableData);
this.showProcessProd = false;
},
beforeClose(done) {
// 更新父组件的processItemList
this.$emit("updateQcindex", this.tableData);
done();
},
/**重置表单 */
resetForm() {
this.form = {
indexCode: "",
indexName: "",
indexType: "",
qcTool:"",
qcindexId:"",
remark: "",
};
},
onQcindexSelect(row){
if (row != undefined && row != null) {
this.form.indexCode = row.indexCode;
this.form.indexName = row.indexName;
this.form.indexType = row.indexType;
this.form.qcTool = row.qcTool;
this.form.qcindexId = row.indexId;
}
}
},
};
</script>
<style>
.process-prod {
padding: 0 20px;
}
</style>
<template>
<div class="process-prod">
<!-- 设置工装量具弹窗 -->
<el-dialog
:visible.sync="showProcessProd"
width="800px"
:before-close="beforeClose"
append-to-body
title="设置工装量具"
>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>
</el-col>
</el-row>
<el-table :data="tableData">
<el-table-column label="编号" align="center" prop="toolCode" >
</el-table-column>
<el-table-column label="名称" align="center" prop="toolName" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="品牌" align="center" prop="brand" :show-overflow-tooltip="true"/>
<el-table-column label="型号" align="center" prop="spec" :show-overflow-tooltip="true"/>
<el-table-column label="类型" align="center" prop="toolTypeName" />
<el-table-column label="要求数量" align="center" prop="quantity" />
<el-table-column label="备注" prop="remark" align="center" />
<el-table-column label="操作" align="center" width="150">
<template slot-scope="{ row, $index }">
<el-button
type="text"
icon="el-icon-edit"
size="small"
@click="updateRow(row, $index)"
>修改</el-button
>
<el-button
type="text"
icon="el-icon-delete"
size="small"
@click="deleteRow($index)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<div slot="footer">
<el-button type="primary" size="small" @click="cancleConnect"
>关闭</el-button
>
</div>
</el-dialog>
<!-- 编辑工装量具关联信息 -->
<el-dialog
:visible.sync="editConnectVisible"
width="800px"
title="编辑工装量具关联信息"
>
<el-form ref="form" :model="form" label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item label="工装量具编码" prop="toolCode" >
<el-input v-model="form.toolCode" placeholder="请选择测项编码"
readonly>
<el-button
slot="append"
icon="el-icon-search"
@click="$refs['TmToolSelectRef'].showFlag = true"
></el-button>
</el-input>
<TmToolSelect ref="TmToolSelectRef" @onSelected="onTmToolSelect" />
</el-form-item>
</el-col>
<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-row>
<el-row>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" :rows="3"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer">
<el-button type="primary" size="small" @click="addOrEditubmit"
>确认</el-button
>
<el-button size="small" @click="editConnectVisible = false"
>取消</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import TmToolSelect from "@/components/TmTool/index.vue";
export default {
props: {
process: {
type: Object,
default: () => ({}),
},
},
components: { TmToolSelect },
dicts: ['mes_index_type'],
data() {
return {
form: {
toolCode: "",
toolName: "",
brand: "",
spec:"",
toolTypeName:"",
remark: "",
quantity: "",
toolId:"",
},
currentRowIdx: undefined,
tableData: [],
selectedItemId: undefined,
selectedRows: null,
showFlag: false,
optType:null,
showProcessProd: false,
editConnectVisible: false,
};
},
computed: {
title() {
return "设置" + this.process.itemName + "工装量具";
},
},
watch: {
process: {
handler(val) {
this.tableData = val.toolList;
},
deep: true,
},
},
methods: {
handleRowChange(row) {
if (row) {
this.selectedRows = row;
}
},
handleRowDbClick(row) {
if (row) {
this.selectedRows = row;
this.tableData.unshift(this.selectedRows);
this.showFlag = false;
}
},
/**新增按钮 */
handleAdd() {
this.resetForm();
this.optType='add';
this.editConnectVisible = true;
},
/**编辑 */
updateRow(row, idx) {
this.resetForm();
Object.assign(this.form, row);
this.currentRowIdx = idx;
this.optType='edit';
this.editConnectVisible = true;
},
/**新增 */
configmSelect() {
if (this.form.toolCode == null || this.form.toolCode == 0) {
return;
}
console.log(this.process.processId);
this.tableData.unshift({
...this.form,
processId: this.process.processId,
});
this.editConnectVisible = false;
},
/** 提交编辑关联信息 */
submitEditConnect() {
this.tableData.splice(this.currentRowIdx, 1, {
...this.form,
});
this.editConnectVisible = false;
},
addOrEditubmit(){
if(this.optType=='add'){
this.configmSelect();
}else{
this.submitEditConnect();
}
},
deleteRow(index) {
this.tableData.splice(index, 1);
},
cancleConnect() {
this.$emit("updateTool", this.tableData);
this.showProcessProd = false;
},
beforeClose(done) {
// 更新父组件的processItemList
this.$emit("updateTool", this.tableData);
done();
},
/**重置表单 */
resetForm() {
this.form = {
toolCode: "",
toolName: "",
brand: "",
spec:"",
toolTypeName:"",
toolId:"",
quantity: "",
remark: "",
};
},
onTmToolSelect(row){
if (row != undefined && row != null) {
this.form.toolCode = row.toolCode;
this.form.toolName = row.toolName;
this.form.brand = row.brand;
this.form.spec = row.spec;
this.form.toolTypeName = row.toolTypeName;
this.form.toolId = row.toolId;
}
}
},
};
</script>
<style>
.process-prod {
padding: 0 20px;
}
</style>
...@@ -25,6 +25,20 @@ ...@@ -25,6 +25,20 @@
@click="openSetProd(row, $index)" @click="openSetProd(row, $index)"
> >
设置物料 设置物料
</el-button>
<el-button
type="text"
size="small"
@click="openSetQrindex(row, $index)"
>
设置检验项
</el-button>
<el-button
type="text"
size="small"
@click="openSetTool(row, $index)"
>
设置工装量具
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
...@@ -44,6 +58,15 @@ ...@@ -44,6 +58,15 @@
@updateItem="updateItem" @updateItem="updateItem"
/> />
<ProcessQcindex
:process="currentRow"
ref="ProcessQcindexRef"
/>
<ProcessTool
:process="currentRow"
ref="ProcessToolRef"
/>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
:visible.sync="showFlag" :visible.sync="showFlag"
...@@ -101,9 +124,11 @@ ...@@ -101,9 +124,11 @@
<script> <script>
import ItemBomSelect from "@/components/itemBomSelect/single.vue"; import ItemBomSelect from "@/components/itemBomSelect/single.vue";
import ProcessProd from "./ProcessProd.vue"; import ProcessProd from "./ProcessProd.vue";
import ProcessQcindex from "./ProcessQcindex.vue";
import ProcessTool from "./ProcessTool.vue";
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue"; import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue";
export default { export default {
components: { ItemBomSelect, ProcessProd, WorkstationSelect }, components: { ItemBomSelect, ProcessProd, WorkstationSelect, ProcessQcindex, ProcessTool },
inject: ["mode"], inject: ["mode"],
props: { props: {
bomList: { bomList: {
...@@ -133,6 +158,8 @@ export default { ...@@ -133,6 +158,8 @@ export default {
setList(rows) { setList(rows) {
this.tableData = rows.map((item) => { this.tableData = rows.map((item) => {
item.processItemList = []; item.processItemList = [];
item.toolList = [];
item.qcindexList = [];
return item; return item;
}); });
}, },
...@@ -140,11 +167,27 @@ export default { ...@@ -140,11 +167,27 @@ export default {
updateItem(items) { updateItem(items) {
this.tableData[this.currentRowIndex].processItemList = items; this.tableData[this.currentRowIndex].processItemList = items;
}, },
updateTool(items) {
this.tableData[this.currentRowIndex].toolList = items;
},
updateQcindex(items) {
this.tableData[this.currentRowIndex].qcindexList = items;
},
openSetProd(row, idx) { openSetProd(row, idx) {
this.currentRow = row; this.currentRow = row;
this.currentRowIndex = idx; this.currentRowIndex = idx;
this.$refs["ProcessProdRef"].showProcessProd = true; this.$refs["ProcessProdRef"].showProcessProd = true;
}, },
openSetQrindex(row, idx) {
this.currentRow = row;
this.currentRowIndex = idx;
this.$refs["ProcessQcindexRef"].showProcessProd = true;
},
openSetTool(row, idx) {
this.currentRow = row;
this.currentRowIndex = idx;
this.$refs["ProcessToolRef"].showProcessProd = true;
},
/**更新行 */ /**更新行 */
updateRow(row, idx) { updateRow(row, idx) {
Object.assign(this.form, row); Object.assign(this.form, row);
......
...@@ -52,9 +52,9 @@ ...@@ -52,9 +52,9 @@
<el-table v-loading="loading" :data="accountList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="accountList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="开户银行" align="center" prop="bank"/>
<el-table-column label="银行账户" align="center" prop="bankAccount"/> <el-table-column label="银行账户" align="center" prop="bankAccount"/>
<el-table-column label="户名" align="center" prop="accountName"/> <el-table-column label="户名" align="center" prop="accountName"/>
<el-table-column label="开户银行" align="center" prop="bank"/>
<el-table-column label="是否启用" align="center" prop="enableFlag" > <el-table-column label="是否启用" align="center" prop="enableFlag" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.enableFlag"/> <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.enableFlag"/>
...@@ -133,7 +133,7 @@ export default { ...@@ -133,7 +133,7 @@ export default {
name: 'Account', name: 'Account',
dicts: ['sys_yes_no'], dicts: ['sys_yes_no'],
props: { props: {
clientId: Number clientId: {type: Number | undefined, default: undefined},
}, },
data() { data() {
return { return {
...@@ -246,6 +246,7 @@ export default { ...@@ -246,6 +246,7 @@ export default {
}) })
} else { } else {
addAccount(this.form).then(response => { addAccount(this.form).then(response => {
this.form.clientId = this.clientId
this.$modal.msgSuccess('新增成功') this.$modal.msgSuccess('新增成功')
this.open = false this.open = false
this.getList() this.getList()
...@@ -272,7 +273,7 @@ export default { ...@@ -272,7 +273,7 @@ export default {
}, `account_${new Date().getTime()}.xlsx`) }, `account_${new Date().getTime()}.xlsx`)
}, },
init(form) { init(form) {
console.log(form) if (!form.clientId) return
this.queryParams.clientId = form.clientId this.queryParams.clientId = form.clientId
this.getList() this.getList()
} }
......
...@@ -96,30 +96,29 @@ ...@@ -96,30 +96,29 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="产品名称" label="产品名称"
width="120" width="400"
align="center" align="center"
prop="itemName" prop="itemName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column label="工艺路线名称" align="center" prop="routeName"> <el-table-column label="工艺路线名称" width="200" align="center" prop="routeName">
</el-table-column> </el-table-column>
<el-table-column label="确认人" align="center" prop="identifyingPeople"> <el-table-column label="确认人" align="center" prop="identifyingPeople">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="确认日期" label="确认日期"
width="140"
align="center" align="center"
prop="identifyingDate" prop="identifyingDate"
/> />
<el-table-column <el-table-column
label="印刷正面颜色" label="印刷正面颜色"
width="120"
align="center" align="center"
prop="printingFrontcolorName" prop="printingFrontcolorName"
/> />
<el-table-column <el-table-column
label="印刷背面颜色" label="印刷背面颜色"
width="120"
align="center" align="center"
prop="printingBackcolorName" prop="printingBackcolorName"
/> />
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
row-key="productionRequestId" row-key="productionRequestId"
default-expand-all default-expand-all
> >
<el-table-column label="量产申请单编码" width="180" prop="productionRequestCode"> <el-table-column label="量产申请单编码" prop="productionRequestCode">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
...@@ -133,14 +133,14 @@ ...@@ -133,14 +133,14 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="工艺路线" label="工艺路线"
width="120" width="200"
align="center" align="center"
prop="routeName" prop="routeName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column <el-table-column
label="产品名称" label="产品名称"
width="120" width="200"
align="center" align="center"
prop="itemName" prop="itemName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
row-key="prototypeMakeId" row-key="prototypeMakeId"
default-expand-all default-expand-all
> >
<el-table-column label="制作单编码" width="180" prop="prototypeMakeCode"> <el-table-column label="制作单编码" prop="prototypeMakeCode">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="产品名称" label="产品名称"
width="120"
align="center" align="center"
prop="itemName" prop="itemName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
label="计划完成日期" label="计划完成日期"
align="center" align="center"
prop="plannedFinishDate" prop="plannedFinishDate"
width="180"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
label="版面需求时间" label="版面需求时间"
align="center" align="center"
prop="plannedLayoutDate" prop="plannedLayoutDate"
width="180"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
......
<template> <template>
<div ref="gantt"></div> <div ref="gantt" style="width: 100%;"></div>
</template> </template>
<script> <script>
...@@ -52,6 +52,8 @@ export default { ...@@ -52,6 +52,8 @@ export default {
gantt.clearAll(); gantt.clearAll();
this.addTodayLine(); this.addTodayLine();
gantt.parse(this.$props.tasks); gantt.parse(this.$props.tasks);
console.log('this.$props.tasks', this.$props.tasks)
gantt.render(); gantt.render();
}, },
addTodayLine() { addTodayLine() {
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="检测项编码" prop="indexCode"> <el-form-item label="检测项编码" prop="indexCode">
<el-input <el-input
v-model="form.qcTool" v-model="form.indexName"
placeholder="请选择测项编码" placeholder="请选择测项编码"
readonly readonly
> >
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
class="page-form" class="page-form"
:model="form" :model="form"
ref="form" ref="form"
:rules="rules"
size="small" size="small"
:inline="true" :inline="true"
label-width="8em" label-width="8em"
......
...@@ -223,6 +223,7 @@ ...@@ -223,6 +223,7 @@
if (row != undefined && row != null) { if (row != undefined && row != null) {
this.form.indexCode = row.indexCode; this.form.indexCode = row.indexCode;
this.form.indexName = row.indexName; this.form.indexName = row.indexName;
this.form.indexType = row.indexType;
this.form.qcTool = row.qcTool; this.form.qcTool = row.qcTool;
this.form.qcindexId = row.indexId; this.form.qcindexId = row.indexId;
} }
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
row-key="prototypeRequestId" row-key="prototypeRequestId"
default-expand-all default-expand-all
> >
<el-table-column label="样品编码" width="180" prop="prototypeRequestCode"> <el-table-column label="样品编码" prop="prototypeRequestCode">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
label="计划完成日期" label="计划完成日期"
align="center" align="center"
prop="plannedFinishDate" prop="plannedFinishDate"
width="180"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
label="版面需求时间" label="版面需求时间"
align="center" align="center"
prop="plannedLayoutDate" prop="plannedLayoutDate"
width="180"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
......
...@@ -145,14 +145,14 @@ ...@@ -145,14 +145,14 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12"> <!-- <el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="NG原因" prop="ngReason"> <el-form-item label="NG原因" prop="ngReason">
<el-input <el-input
v-model="form.ngReason" v-model="form.ngReason"
placeholder="请输入NG原因" placeholder="请输入NG原因"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :lg="6" :md="8" :sm="12" :xs="12"> <el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item prop="plannedFinishDate"> <el-form-item prop="plannedFinishDate">
<template slot="label"> <template slot="label">
......
...@@ -321,7 +321,7 @@ export default { ...@@ -321,7 +321,7 @@ export default {
areaCode: null, areaCode: null,
areaName: null, areaName: null,
issueDate: null, issueDate: null,
status: null, status: 'PREPARE',
}, },
// 表单参数 // 表单参数
form: {}, form: {},
......
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