Commit 541f4c37 authored by 赵汉亭's avatar 赵汉亭

生产版本命名修改,生产版本工序字段添加

parent b384308d
import request from '@/utils/request'
import request from "@/utils/request";
// 查询生产方案列表
// 查询生产版本列表
export function listProductionSolution(query) {
return request({
url: 'pro/productionSolution/list',
method: 'get',
params: query
})
url: "pro/productionSolution/list",
method: "get",
params: query,
});
}
// 查询生产方案详细
// 查询生产版本详细
export function getProductionSolution(productionSolutionId) {
return request({
url: 'pro/productionSolution/' + productionSolutionId,
method: 'get'
})
url: "pro/productionSolution/" + productionSolutionId,
method: "get",
});
}
// 新增生产方案
// 新增生产版本
export function addProductionSolution(data) {
return request({
url: 'pro/productionSolution',
method: 'post',
data: data
})
url: "pro/productionSolution",
method: "post",
data: data,
});
}
// 修改生产方案
// 修改生产版本
export function updateProductionSolution(data) {
return request({
url: 'pro/productionSolution',
method: 'put',
data: data
})
url: "pro/productionSolution",
method: "put",
data: data,
});
}
// 删除生产方案
// 删除生产版本
export function delProductionSolution(productionSolutionId) {
return request({
url: 'pro/productionSolution/' + productionSolutionId,
method: 'delete'
})
url: "pro/productionSolution/" + productionSolutionId,
method: "delete",
});
}
// 提交生产版本
export function submitProductionSolution(data) {
return request({
url: "pro/productionSolution/submit",
method: "put",
data: data,
});
}
import request from '@/utils/request'
import request from "@/utils/request";
// 查询生产方案BOM列表
// 查询生产版本BOM列表
export function listProductionSolutionBom(query) {
return request({
url: '/mes/pro/productionSolutionBom/list',
method: 'get',
params: query
})
url: "/mes/pro/productionSolutionBom/list",
method: "get",
params: query,
});
}
// 查询生产方案BOM详细
// 查询生产版本BOM详细
export function getProductionSolutionBom(bomItemId) {
return request({
url: '/mes/pro/productionSolutionBom/' + bomItemId,
method: 'get'
})
url: "/mes/pro/productionSolutionBom/" + bomItemId,
method: "get",
});
}
// 新增生产方案BOM
// 新增生产版本BOM
export function addProductionSolutionBom(data) {
return request({
url: '/mes/pro/productionSolutionBom',
method: 'post',
data: data
})
url: "/mes/pro/productionSolutionBom",
method: "post",
data: data,
});
}
// 修改生产方案BOM
// 修改生产版本BOM
export function updateProductionSolutionBom(data) {
return request({
url: '/mes/pro/productionSolutionBom',
method: 'put',
data: data
})
url: "/mes/pro/productionSolutionBom",
method: "put",
data: data,
});
}
// 删除生产方案BOM
// 删除生产版本BOM
export function delProductionSolutionBom(bomItemId) {
return request({
url: '/mes/pro/productionSolutionBom/' + bomItemId,
method: 'delete'
})
url: "/mes/pro/productionSolutionBom/" + bomItemId,
method: "delete",
});
}
import request from '@/utils/request'
import request from "@/utils/request";
// 查询生产方案工序列表
// 查询生产版本工序列表
export function listProductionSolutionProcess(query) {
return request({
url: '/mes/pro/productionSolutionProcess/list',
method: 'get',
params: query
})
url: "/mes/pro/productionSolutionProcess/list",
method: "get",
params: query,
});
}
// 查询生产方案工序详细
// 查询生产版本工序详细
export function getProductionSolutionProcess(productionSolutionProcessId) {
return request({
url: '/mes/pro/productionSolutionProcess/' + productionSolutionProcessId,
method: 'get'
})
url: "/mes/pro/productionSolutionProcess/" + productionSolutionProcessId,
method: "get",
});
}
// 新增生产方案工序
// 新增生产版本工序
export function addProductionSolutionProcess(data) {
return request({
url: '/mes/pro/productionSolutionProcess',
method: 'post',
data: data
})
url: "/mes/pro/productionSolutionProcess",
method: "post",
data: data,
});
}
// 修改生产方案工序
// 修改生产版本工序
export function updateProductionSolutionProcess(data) {
return request({
url: '/mes/pro/productionSolutionProcess',
method: 'put',
data: data
})
url: "/mes/pro/productionSolutionProcess",
method: "put",
data: data,
});
}
// 删除生产方案工序
// 删除生产版本工序
export function delProductionSolutionProcess(productionSolutionProcessId) {
return request({
url: '/mes/pro/productionSolutionProcess/' + productionSolutionProcessId,
method: 'delete'
})
url: "/mes/pro/productionSolutionProcess/" + productionSolutionProcessId,
method: "delete",
});
}
import request from '@/utils/request'
import request from "@/utils/request";
// 查询生产方案工序物料列表
// 查询生产版本工序物料列表
export function listProductionSolutionProcessItem(query) {
return request({
url: '/mes/pro/productionSolutionProcessItem/list',
method: 'get',
params: query
})
url: "/mes/pro/productionSolutionProcessItem/list",
method: "get",
params: query,
});
}
// 查询生产方案工序物料详细
export function getProductionSolutionProcessItem(productionSolutionProcessItemId) {
// 查询生产版本工序物料详细
export function getProductionSolutionProcessItem(
productionSolutionProcessItemId
) {
return request({
url: '/mes/pro/productionSolutionProcessItem/' + productionSolutionProcessItemId,
method: 'get'
})
url:
"/mes/pro/productionSolutionProcessItem/" +
productionSolutionProcessItemId,
method: "get",
});
}
// 新增生产方案工序物料
// 新增生产版本工序物料
export function addProductionSolutionProcessItem(data) {
return request({
url: '/mes/pro/productionSolutionProcessItem',
method: 'post',
data: data
})
url: "/mes/pro/productionSolutionProcessItem",
method: "post",
data: data,
});
}
// 修改生产方案工序物料
// 修改生产版本工序物料
export function updateProductionSolutionProcessItem(data) {
return request({
url: '/mes/pro/productionSolutionProcessItem',
method: 'put',
data: data
})
url: "/mes/pro/productionSolutionProcessItem",
method: "put",
data: data,
});
}
// 删除生产方案工序物料
export function delProductionSolutionProcessItem(productionSolutionProcessItemId) {
// 删除生产版本工序物料
export function delProductionSolutionProcessItem(
productionSolutionProcessItemId
) {
return request({
url: '/mes/pro/productionSolutionProcessItem/' + productionSolutionProcessItemId,
method: 'delete'
})
url:
"/mes/pro/productionSolutionProcessItem/" +
productionSolutionProcessItemId,
method: "delete",
});
}
<!--客户loss信息-->
<template>
<div class="app-container">
<el-table
v-loading="loading"
:data="productionPlanList"
>
<el-table v-loading="loading" :data="productionPlanList">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="生产方案编码" align="center" prop="productionSolutionCode" />
<el-table-column label="生产方案名称" align="center" prop="productionSolutionName" />
<el-table-column
label="生产版本编码"
align="center"
prop="productionSolutionCode"
/>
<el-table-column
label="生产版本名称"
align="center"
prop="productionSolutionName"
/>
<el-table-column label="工艺路线编码" align="center" prop="routeCode" />
<el-table-column label="工艺路线名称" align="center" prop="routeName" />
<el-table-column label="用途编码" align="center" prop="usageCode" />
......@@ -24,13 +29,10 @@
</template>
<script>
import {
listProductionSolution,
} from "@/api/mes/pro/productionSolution";
import { listProductionSolution } from "@/api/mes/pro/productionSolution";
export default {
name: "ProductionPlan",
components: {
},
components: {},
data() {
return {
// 遮罩层
......@@ -45,7 +47,7 @@ export default {
showSearch: true,
// 总条数
total: 0,
// 产品生产方案表格数据
// 产品生产版本表格数据
productionPlanList: [],
// 弹出层标题
title: "",
......
......@@ -127,7 +127,8 @@
icon="el-icon-upload2"
size="mini"
@click="handleImport"
>导入</el-button>
>导入</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
......@@ -136,7 +137,8 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button>
>导出</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
......@@ -362,7 +364,6 @@
<el-col :span="12">
<el-form-item label="单位" prop="unitOfMeasure">
<el-select
v-model="form.unitOfMeasure"
disabled
v-if="optType == 'view'"
......@@ -522,10 +523,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="SAP物料编码">
<el-input
v-model="form.sapItemCode"
readonly
></el-input>
<el-input v-model="form.sapItemCode" readonly></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -541,18 +539,39 @@
</el-col>
</el-row>
</el-form>
<el-tabs type="border-card" v-model="activeName" @tab-click="onTabClick" v-if="form.itemId != null && form.itemOrProduct == 'PRODUCT'">
<el-tabs
type="border-card"
v-model="activeName"
@tab-click="onTabClick"
v-if="form.itemId != null && form.itemOrProduct == 'PRODUCT'"
>
<el-tab-pane label="基本信息" name="BaseInfo">
<BaseInfo ref="BaseInfo" :optType="optType" :itemId="form.itemId"></BaseInfo>
<BaseInfo
ref="BaseInfo"
:optType="optType"
:itemId="form.itemId"
></BaseInfo>
</el-tab-pane>
<el-tab-pane label="产品特性" name="SpecProperty">
<SpecProperty ref="SpecProperty" :optType="optType" :itemId="form.itemId"></SpecProperty>
<SpecProperty
ref="SpecProperty"
:optType="optType"
:itemId="form.itemId"
></SpecProperty>
</el-tab-pane>
<el-tab-pane label="销售单位转换" name="SaleUnit">
<SaleUnit ref="SaleUnit" :optType="optType" :itemId="form.itemId"></SaleUnit>
<SaleUnit
ref="SaleUnit"
:optType="optType"
:itemId="form.itemId"
></SaleUnit>
</el-tab-pane>
<el-tab-pane label="工厂信息" name="Factory">
<Factory ref="Factory" :optType="optType" :itemId="form.itemId"></Factory>
<Factory
ref="Factory"
:optType="optType"
:itemId="form.itemId"
></Factory>
</el-tab-pane>
<!-- <el-tab-pane label="客户信息">
<Customer :optType="optType" :itemId="form.itemId"></Customer>
......@@ -560,8 +579,12 @@
<el-tab-pane label="产品外观" name="Look">
<Look ref="Look" :optType="optType" :itemId="form.itemId"></Look>
</el-tab-pane>
<el-tab-pane label="生产方案" name="ProductionPlan">
<ProductionPlan ref="ProductionPlan" :optType="optType" :itemId="form.itemId"></ProductionPlan>
<el-tab-pane label="生产版本" name="ProductionPlan">
<ProductionPlan
ref="ProductionPlan"
:optType="optType"
:itemId="form.itemId"
></ProductionPlan>
</el-tab-pane>
<el-tab-pane label="排版参数" name="PublishedConf">
<PublishedConf
......@@ -571,34 +594,46 @@
></PublishedConf>
</el-tab-pane>
<el-tab-pane label="正面颜色" name="FaceColor">
<FaceColor ref="FaceColor" :optType="optType" :itemId="form.itemId"></FaceColor>
<FaceColor
ref="FaceColor"
:optType="optType"
:itemId="form.itemId"
></FaceColor>
</el-tab-pane>
<el-tab-pane label="反面颜色" name="BackFaceColor">
<BackFaceColor ref="BackFaceColor" :optType="optType" :itemId="form.itemId"></BackFaceColor>
<BackFaceColor
ref="BackFaceColor"
:optType="optType"
:itemId="form.itemId"
></BackFaceColor>
</el-tab-pane>
<el-tab-pane label="客户loss" name="CustomerLoss">
<CustomerLoss ref="CustomerLoss" :optType="optType" :itemId="form.itemId"></CustomerLoss>
<CustomerLoss
ref="CustomerLoss"
:optType="optType"
:itemId="form.itemId"
></CustomerLoss>
</el-tab-pane>
<el-tab-pane label="SAP基本信息" name="SapBaseInfoProperty">
<SapPropertyData ref="SapBaseInfoProperty"/>
<SapPropertyData ref="SapBaseInfoProperty" />
</el-tab-pane>
<el-tab-pane label="SAP销售特性" name="SapSaleProperty">
<SapPropertyData ref="SapSaleProperty"/>
<SapPropertyData ref="SapSaleProperty" />
</el-tab-pane>
<el-tab-pane label="SAP采购特性" name="SapPurchaseProperty">
<SapPropertyData ref="SapPurchaseProperty"/>
<SapPropertyData ref="SapPurchaseProperty" />
</el-tab-pane>
<el-tab-pane label="SAP物控特性" name="SapPMCProperty">
<SapPropertyData ref="SapPMCProperty"/>
<SapPropertyData ref="SapPMCProperty" />
</el-tab-pane>
<el-tab-pane label="SAP仓储特性" name="SapStorageProperty">
<SapPropertyData ref="SapStorageProperty"/>
<SapPropertyData ref="SapStorageProperty" />
</el-tab-pane>
<el-tab-pane label="SAP品控特性" name="SapQAProperty">
<SapPropertyData ref="SapQAProperty"/>
<SapPropertyData ref="SapQAProperty" />
</el-tab-pane>
<el-tab-pane label="SAP财务特性" name="SapFinanceProperty">
<SapPropertyData ref="SapFinanceProperty"/>
<SapPropertyData ref="SapFinanceProperty" />
</el-tab-pane>
<el-tab-pane label="SOP" name="SOP">
<SOPTab ref="SOP" :itemId="form.itemId" :optType="optType"></SOPTab>
......@@ -705,11 +740,11 @@ export default {
BackFaceColor,
CustomerLoss,
ItemBom,
SOPTab
SOPTab,
},
data() {
return {
activeName: 'BaseInfo',
activeName: "BaseInfo",
// 遮罩层
loading: true,
// 选中数组
......@@ -904,11 +939,11 @@ export default {
handleAdd() {
this.reset();
this.getTreeselect();
this.handleAutoGenChange(true)
this.handleAutoGenChange(true);
if (this.queryParams.itemTypeId != 0) {
this.form.itemTypeId = this.queryParams.itemTypeId;
}
this.activeName = 'BaseInfo'
this.activeName = "BaseInfo";
this.optType = "add";
this.open = true;
this.title = "新增物料/产品";
......@@ -917,7 +952,7 @@ export default {
handleUpdate(row) {
this.reset();
this.getTreeselect();
this.activeName = 'BaseInfo'
this.activeName = "BaseInfo";
const itemId = row.itemId || this.ids;
getMdItem(itemId).then((response) => {
this.form = response.data;
......@@ -939,7 +974,9 @@ export default {
lookData.itemId = this.form.itemId;
//产品参数配置保存 publishedConf
const publishedConfData = await this.$refs["PublishedConf"].getPublishedConfData();
const publishedConfData = await this.$refs[
"PublishedConf"
].getPublishedConfData();
publishedConfData.itemId = this.form.itemId;
//销售单位转换保存
......@@ -984,7 +1021,7 @@ export default {
.catch(() => {});
},
/** 临时产品转正式按钮操作 */
handBecomeFormalProduct(row){
handBecomeFormalProduct(row) {
const itemIds = row.itemId || this.ids;
this.$modal
.confirm("确认转正式产品?")
......@@ -1053,22 +1090,52 @@ export default {
}
},
onTabClick() {
if (this.activeName === 'SapBaseInfoProperty') {
this.$refs.SapBaseInfoProperty.init(2,"sapBaseInfo", this.form.itemId, this.form)
} else if (this.activeName === 'SapSaleProperty') {
this.$refs.SapSaleProperty.init(2,"sapSale", this.form.itemId, this.form)
} else if (this.activeName === 'SapPurchaseProperty') {
this.$refs.SapPurchaseProperty.init(2,'sapPurchase', this.form.itemId, this.form)
} else if (this.activeName === 'SapPMCProperty'){
this.$refs.SapPMCProperty.init(2,'sapPMC', this.form.itemId, this.form)
} else if (this.activeName === 'SapStorageProperty') {
this.$refs.SapStorageProperty.init(2,'sapStorage', this.form.itemId, this.form)
} else if (this.activeName === 'SapQAProperty') {
this.$refs.SapQAProperty.init(2,'sapQA', this.form.itemId, this.form)
} else if (this.activeName === 'SapFinanceProperty') {
this.$refs.SapFinanceProperty.init(2,'sapFinance', this.form.itemId, this.form)
if (this.activeName === "SapBaseInfoProperty") {
this.$refs.SapBaseInfoProperty.init(
2,
"sapBaseInfo",
this.form.itemId,
this.form
);
} else if (this.activeName === "SapSaleProperty") {
this.$refs.SapSaleProperty.init(
2,
"sapSale",
this.form.itemId,
this.form
);
} else if (this.activeName === "SapPurchaseProperty") {
this.$refs.SapPurchaseProperty.init(
2,
"sapPurchase",
this.form.itemId,
this.form
);
} else if (this.activeName === "SapPMCProperty") {
this.$refs.SapPMCProperty.init(
2,
"sapPMC",
this.form.itemId,
this.form
);
} else if (this.activeName === "SapStorageProperty") {
this.$refs.SapStorageProperty.init(
2,
"sapStorage",
this.form.itemId,
this.form
);
} else if (this.activeName === "SapQAProperty") {
this.$refs.SapQAProperty.init(2, "sapQA", this.form.itemId, this.form);
} else if (this.activeName === "SapFinanceProperty") {
this.$refs.SapFinanceProperty.init(
2,
"sapFinance",
this.form.itemId,
this.form
);
} //else this.$refs[this.activeName].init && this.$refs[this.activeName].init(this.form)
}
},
},
};
</script>
......@@ -25,8 +25,13 @@
<el-table-column label="单位" prop="unitOfMeasure" align="center" />
<el-table-column label="数量" prop="quantity" align="center" />
<el-table-column label="备注" prop="remark" align="center" />
<el-table-column label="操作" align="center" width="150">
<!-- <template slot-scope="{ row, $index }">
<el-table-column
label="操作"
align="center"
width="150"
v-if="!(optType === 'detail')"
>
<template slot-scope="{ row, $index }">
<el-button
type="text"
icon="el-icon-edit"
......@@ -41,7 +46,23 @@
@click="deleteRow($index)"
>删除</el-button
>
</template> -->
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
width="150"
v-if="optType === 'detail'"
>
<template slot-scope="{ row, $index }">
<el-button
type="text"
icon="el-icon-search"
size="small"
@click="searchRow(row, $index)"
>查看详情</el-button
>
</template>
</el-table-column>
</el-table>
......@@ -74,12 +95,19 @@
>
</template>
</el-table-column>
<el-table-column label="物料名称" prop="itemName" />
<el-table-column label="项目号" prop="idx" />
<el-table-column label="物料名称" prop="sapItemName" />
<el-table-column label="组件数量" prop="quantity" />
<el-table-column label="单位" prop="unitOfMeasure" />
<el-table-column label="用料比例" prop="quantity" />
<el-table-column label="副单位" prop="deputyUnitOfMeasure" />
<el-table-column label="主副单位转换比例" prop="unitConvert" />
<el-table-column label="备注" prop="remark" />
<el-table-column label="反冲" prop="recoil" />
</el-table>
<div slot="footer">
<el-button @click="configmSelect">确认</el-button>
<el-button @click="configmSelect" v-if="!(optType === 'detail')"
>确认</el-button
>
<el-button @click="showFlag = false">取消</el-button>
</div>
</el-dialog>
......@@ -92,20 +120,33 @@
>
<el-form :model="form" inline size="small" label-width="80px">
<el-form-item label="物料名称">
<el-input disabled v-model="form.itemName"></el-input>
<el-input disabled v-model="form.sapItemName"></el-input>
</el-form-item>
<el-form-item label="数量">
<el-input type="number" v-model="form.quantity"></el-input>
</el-form-item>
<el-form-item label="单位">
<el-input disabled v-model="form.unitOfMeasure"></el-input>
</el-form-item>
<el-form-item label="数量">
<el-input type="number" v-model="form.quantity"></el-input>
<el-form-item label="副单位">
<el-input v-model="form.deputyUnitOfMeasure"></el-input>
</el-form-item>
<el-form-item label="主副单位转换比例">
<el-input type="number" v-model="form.unitConvert"></el-input>
</el-form-item>
<el-form-item label="反冲">
<el-input v-model="form.idx"></el-input>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="form.remark" type="textarea" :rows="3"></el-input>
</el-form-item>
</el-form>
<div slot="footer">
<el-button type="primary" size="small" @click="submitEditConnect"
<el-button
type="primary"
size="small"
@click="submitEditConnect"
v-if="!(optType === 'detail')"
>确认</el-button
>
<el-button size="small" @click="editConnectVisible = false"
......@@ -131,10 +172,18 @@ export default {
data() {
return {
form: {
itemName: "",
productionSolutionProcessItemId: "",
productionSolutionProcessId: "",
sapItemCode: "",
sapItemName: "",
usageCode: "",
unitOfMeasure: "",
deputyUnitOfMeasure: "",
unitConvert: "",
quantity: "",
remark: "",
idx: "",
recoil: "",
},
currentRowIdx: undefined,
tableData: [],
......@@ -208,10 +257,18 @@ export default {
/**重置表单 */
resetForm() {
this.form = {
itemName: "",
productionSolutionProcessItemId: "",
productionSolutionProcessId: "",
sapItemCode: "",
sapItemName: "",
usageCode: "",
unitOfMeasure: "",
deputyUnitOfMeasure: "",
unitConvert: "",
quantity: "",
remark: "",
idx: "",
recoil: "",
};
},
/** 提交编辑关联信息 */
......@@ -221,6 +278,14 @@ export default {
});
this.editConnectVisible = false;
},
/**查看 */
searchRow(row, idx) {
this.resetForm();
Object.assign(this.form, row);
this.currentRowIdx = idx;
this.optType = "detail";
this.editConnectVisible = true;
},
},
};
</script>
......
......@@ -8,7 +8,7 @@
append-to-body
title="设置检验项"
>
<!-- <el-row :gutter="10" class="mb8">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
......@@ -16,10 +16,11 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-if="!(optType === 'detail')"
>新增</el-button
>
</el-col>
</el-row> -->
</el-row>
<el-table :data="tableData">
<el-table-column label="检测项编码" align="center" prop="indexCode" />
<el-table-column label="检测项名称" align="center" prop="indexName" />
......@@ -30,7 +31,12 @@
</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">
<el-table-column
label="操作"
align="center"
width="150"
v-if="!(optType === 'detail')"
>
<template slot-scope="{ row, $index }">
<el-button
type="text"
......@@ -48,6 +54,22 @@
>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
width="150"
v-if="optType === 'detail'"
>
<template slot-scope="{ row, $index }">
<el-button
type="text"
icon="el-icon-edit"
size="small"
@click="SearchRow(row, $index)"
>查看详情</el-button
>
</template>
</el-table-column>
</el-table>
<div slot="footer">
......@@ -61,7 +83,7 @@
<el-dialog
:visible.sync="editConnectVisible"
width="800px"
title="编辑检验项关联信息"
title="检验项关联信息"
>
<el-form ref="form" :model="form" label-width="120px">
<el-row>
......@@ -89,6 +111,7 @@
</el-form>
<div slot="footer">
<el-button type="primary" size="small" @click="addOrEditubmit"
v-if="!(optType === 'detail')"
>确认</el-button
>
<el-button size="small" @click="editConnectVisible = false"
......@@ -112,6 +135,7 @@
dicts: ['mes_index_type'],
data() {
return {
optType: "add",
form: {
indexCode: "",
indexName: "",
......@@ -159,7 +183,7 @@
/**新增按钮 */
handleAdd() {
this.resetForm();
this.optType='add';
this.optType = "add";
this.editConnectVisible = true;
},
/**编辑 */
......@@ -167,7 +191,15 @@
this.resetForm();
Object.assign(this.form, row);
this.currentRowIdx = idx;
this.optType='edit';
this.optType = "edit";
this.editConnectVisible = true;
},
/**查看详情 */
SearchRow(row, idx) {
this.resetForm();
Object.assign(this.form, row);
this.currentRowIdx = idx;
this.optType = "detail";
this.editConnectVisible = true;
},
/**新增 */
......
......@@ -16,21 +16,70 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-if="!(optType === 'detail')"
>新增</el-button
>
</el-col>
</el-row>
<el-table :data="tableData">
<el-table-column label="编号" align="center" prop="itemCode" >
<el-table-column label="编号" align="center" prop="itemCode">
</el-table-column>
<el-table-column label="名称" align="center" prop="itemName" :show-overflow-tooltip="true">
<el-table-column
label="名称"
align="center"
prop="itemName"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column label="型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
<el-table-column
label="型号"
align="center"
prop="specification"
:show-overflow-tooltip="true"
/>
<el-table-column label="类型" align="center" prop="itemTypeName" />
<el-table-column label="要求数量" align="center" prop="quantity" />
<el-table-column label="备注" prop="remark" align="center" />
<el-table-column
label="操作"
align="center"
width="150"
v-if="!(optType === 'detail')"
>
<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-column
label="操作"
align="center"
width="150"
v-if="optType === 'detail'"
>
<template slot-scope="{ row, $index }">
<el-button
type="text"
icon="el-icon-edit"
size="small"
@click="searchRow(row, $index)"
>查看详情</el-button
>
</template>
</el-table-column>
</el-table>
<div slot="footer">
<el-button type="primary" size="small" @click="cancleConnect"
>关闭</el-button
......@@ -42,14 +91,17 @@
<el-dialog
:visible.sync="editConnectVisible"
width="800px"
title="编辑工装量具关联信息"
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.itemCode" placeholder="请选择数据"
disabled>
<el-form-item label="工装量具编码" prop="toolCode">
<el-input
v-model="form.itemCode"
placeholder="请选择数据"
disabled
>
<el-button
slot="append"
icon="el-icon-search"
......@@ -61,11 +113,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="工装量具名称" prop="itemName">
<el-input
type="text"
v-model="form.itemName"
disabled
></el-input>
<el-input type="text" v-model="form.itemName" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -81,13 +129,21 @@
<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-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
type="primary"
size="small"
@click="addOrEditubmit"
v-if="!(optType === 'detail')"
>确认</el-button
>
<el-button size="small" @click="editConnectVisible = false"
......@@ -99,8 +155,8 @@
</template>
<script>
import ItemSelect from "@/components/itemSelect/single.vue";
export default {
import ItemSelect from "@/components/itemSelect/single.vue";
export default {
props: {
process: {
type: Object,
......@@ -108,24 +164,25 @@
},
},
components: { ItemSelect },
dicts: ['mes_index_type'],
dicts: ["mes_index_type"],
data() {
return {
optType: "add",
form: {
itemCode: "",
itemName: "",
specification:"",
itemTypeName:"",
specification: "",
itemTypeName: "",
remark: "",
quantity: "",
toolId:"",
toolId: "",
},
currentRowIdx: undefined,
tableData: [],
selectedItemId: undefined,
selectedRows: null,
showFlag: false,
optType:null,
optType: null,
showProcessProd: false,
editConnectVisible: false,
};
......@@ -159,7 +216,7 @@
/**新增按钮 */
handleAdd() {
this.resetForm();
this.optType='add';
this.optType = "add";
this.editConnectVisible = true;
},
/**编辑 */
......@@ -167,7 +224,15 @@
this.resetForm();
Object.assign(this.form, row);
this.currentRowIdx = idx;
this.optType='edit';
this.optType = "edit";
this.editConnectVisible = true;
},
/**查看 */
searchRow(row, idx) {
this.resetForm();
Object.assign(this.form, row);
this.currentRowIdx = idx;
this.optType = "detail";
this.editConnectVisible = true;
},
/**新增 */
......@@ -178,7 +243,6 @@
this.tableData.unshift({
...this.form,
processId: this.process.processId,
});
this.editConnectVisible = false;
},
......@@ -189,10 +253,10 @@
});
this.editConnectVisible = false;
},
addOrEditubmit(){
if(this.optType=='add'){
addOrEditubmit() {
if (this.optType == "add") {
this.configmSelect();
}else{
} else {
this.submitEditConnect();
}
},
......@@ -213,14 +277,14 @@
this.form = {
itemCode: "",
itemName: "",
specification:"",
itemTypeName:"",
specification: "",
itemTypeName: "",
remark: "",
quantity: "",
toolId:"",
toolId: "",
};
},
onItemSelect(row){
onItemSelect(row) {
if (row != undefined && row != null) {
this.form.itemCode = row.itemCode;
this.form.itemName = row.itemName;
......@@ -228,13 +292,13 @@
this.form.itemTypeName = row.itemTypeName;
this.form.toolId = row.itemId;
}
}
},
};
},
};
</script>
<style>
.process-prod {
.process-prod {
padding: 0 20px;
}
}
</style>
<template>
<div>
<el-row :gutter="10" class="mb8" v-if="mode != 'info'">
<el-col :span="1.5">
<!-- <el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
> -->
<el-form
class="page-form"
:model="form2"
ref="form"
size="small"
:inline="true"
label-width="8em"
>
<el-row>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="基本数量" prop="quantity">
<el-input-number
:min="1"
v-model="form2.quantity"
placeholder="请输入基本数量"
/>
</el-form-item>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
@click="handleDelete"
>删除</el-button
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="基本计量单位" prop="unitOfMeasure">
<el-input
v-model="form2.unitOfMeasure"
placeholder="请输入物料清单的基本计量单位"
/>
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item
label="物料清单授权组"
prop="billOfMaterialsAuthorizationGroup"
>
<el-input
v-model="form2.billOfMaterialsAuthorizationGroup"
placeholder="请输入物料清单授权组"
/>
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="抬头文本描述" prop="remark">
<el-input v-model="form2.remark" placeholder="抬头文本描述" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-divider></el-divider>
<el-table :data="tableData" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="idx" />
<el-table-column label="组件名称" align="center" prop="itemName" />
<el-table-column label="项目类别" align="center" prop="itemClass">
<template slot-scope="scope">
<dict-tag
:options="dict.type.sap_item_type"
:value="scope.row.itemClass"
/>
</template>
</el-table-column>
<el-table-column label="组件数量" align="center" prop="quantity" />
<el-table-column label="计量单位" align="center" prop="unitOfMeasure" />
<el-table-column
label="物料名称"
label="成本核算"
align="center"
prop="itemName"
prop="costAccountingMarking"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.bom_cost_accounting_marking"
:value="scope.row.costAccountingMarking"
/>
</template>
</el-table-column>
<el-table-column
label="组件数量"
label="报废百分比"
align="center"
prop="quantity"
prop="scrapPercentage"
/>
<el-table-column label="特殊获取" align="center" prop="specialAccess">
<template slot-scope="scope">
<dict-tag
:options="dict.type.bom_special_access"
:value="scope.row.specialAccess"
/>
</template>
</el-table-column>
<el-table-column label="物料供应" align="center" prop="itemSupplyMarking">
<template slot-scope="scope">
<dict-tag
:options="dict.type.item_supply_marking"
:value="scope.row.itemSupplyMarking"
/>
</template>
</el-table-column>
<el-table-column label="替代组" align="center" prop="alternativeGroup" />
<el-table-column
label="计量单位"
label="替代优先级"
align="center"
prop="unitOfMeasure"
prop="alternativePriorities"
/>
<el-table-column label="策略" align="center" prop="alternativeStrategy">
<template slot-scope="scope">
<dict-tag
:options="dict.type.bom_alternative_strategy"
:value="scope.row.alternativeStrategy"
/>
</template>
</el-table-column>
<el-table-column
label="替代组"
label="使用概率"
align="center"
prop="alternativeGroup"
prop="alternativeProbability"
/>
<el-table-column label="BOM行备注" align="center" prop="bomItemRemark" />
<el-table-column label="物料备注" align="center" prop="itemRemark" />
<el-table-column label="固定数量" align="center" prop="isFixed">
<template slot-scope="scope">
<dict-tag
:options="dict.type.sys_yes_no"
:value="scope.row.isFixed"
/>
</template>
</el-table-column>
<el-table-column
v-if="mode != 'edit'"
v-if="mode == 'edit'"
label="操作"
align="center"
fixed="right"
>
<!-- <template slot-scope="{ row, $index }">
<template slot-scope="{ row, $index }">
<el-button
type="text"
icon="el-icon-edit"
......@@ -62,20 +135,29 @@
@click="updateRow(row, $index)"
>修改</el-button
>
</template>
</el-table-column>
<el-table-column
v-if="mode == 'info'"
label="操作"
align="center"
width="120"
>
<template slot-scope="{ row, $index }">
<el-button
type="text"
icon="el-icon-delete"
icon="el-icon-search"
size="small"
@click="deleteRow($index)"
>删除</el-button
@click="searchRow(row, $index)"
>查看详情</el-button
>
</template>-->
</template>
</el-table-column>
</el-table>
<el-dialog :visible.sync="showFlag" width="700px" title="添加BOM">
<el-form
ref="form"
ref="page-form"
:model="form"
:rules="rules"
inline
......@@ -83,7 +165,7 @@
size="small"
>
<el-row>
<el-col :span="24">
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="物料" prop="itemId">
<el-input
v-model="form.itemName"
......@@ -99,9 +181,24 @@
<ItemSelect ref="ItemSelectRef" @onSelected="onItemSelect" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="项目类别" prop="itemClass">
<el-select
v-model="form.itemClass"
clearable
placeholder="请选择项目类别"
>
<el-option
v-for="dict in dict.type.sap_item_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="组件数量" prop="quantity">
<el-input
type="number"
......@@ -110,7 +207,7 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="计量单位" prop="unitOfMeasure">
<el-input
v-model="form.unitOfMeasure"
......@@ -118,7 +215,7 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="报废百分比" prop="scrapPercentage">
<el-input
v-model="form.scrapPercentage"
......@@ -126,7 +223,55 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="特殊获取" prop="specialAccess">
<el-select
v-model="form.specialAccess"
placeholder="请选择特殊获取"
>
<el-option
v-for="dict in dict.type.bom_special_access"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="物料供应" prop="itemSupplyMarking">
<el-select
v-model="form.itemSupplyMarking"
placeholder="请选择物料供应标识"
>
<el-option
v-for="dict in dict.type.item_supply_marking"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="成本核算" prop="costAccountingMarking">
<el-select
v-model="form.costAccountingMarking"
placeholder="请选择是否与成本核算相关"
>
<el-option
v-for="dict in dict.type.bom_cost_accounting_marking"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="替代组" prop="alternativeGroup">
<el-input
v-model="form.alternativeGroup"
......@@ -134,7 +279,7 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="替代优先级" prop="alternativePriorities">
<el-input
v-model="form.alternativePriorities"
......@@ -142,15 +287,23 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="策略" prop="alternativeStrategy">
<el-input
<el-select
v-model="form.alternativeStrategy"
placeholder="请输入策略"
></el-input>
placeholder="请选择策略"
>
<el-option
v-for="dict in dict.type.bom_alternative_strategy"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="使用概率" prop="alternativeProbability">
<el-input
v-model="form.alternativeProbability"
......@@ -158,7 +311,23 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="是否固定数量" prop="isFixed">
<el-select
v-model="form.isFixed"
placeholder="请选择是否固定数量"
>
<el-option
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="BOM行备注" prop="bomItemRemark">
<el-input
v-model="form.bomItemRemark"
......@@ -166,7 +335,7 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="物料备注" prop="itemRemark">
<el-input
v-model="form.itemRemark"
......@@ -177,7 +346,12 @@
</el-row>
</el-form>
<div slot="footer">
<el-button type="primary" @click="submitForm">确定</el-button>
<el-button
type="primary"
@click="submitForm"
v-if="!(optType === 'detail')"
>确定</el-button
>
<el-button type="default" @click="showFlag = false">取消</el-button>
</div>
</el-dialog>
......@@ -190,6 +364,14 @@ import ItemSelect from "@/components/itemSelect/single.vue";
export default {
components: { ItemBomSelect, ItemSelect },
inject: ["mode"],
dicts: [
"bom_cost_accounting_marking",
"item_supply_marking",
"sys_yes_no",
"sap_item_type",
"bom_alternative_strategy",
"bom_special_access",
],
data() {
return {
/**弹窗状态 */
......@@ -202,18 +384,33 @@ export default {
selection: [],
optType: "add",
/**表单初始化数据 */
form: {
form2: {
quantity: "",
unitOfMeasure: "",
remark: "",
billOfMaterialsAuthorizationGroup: "",
},
form: {
bomItemId: "",
bomHeadId: "",
idx: "",
sapItemCode: "",
itemName: "",
itemId: "",
itemClass: "",
itemType: "",
unitOfMeasure: "",
quantity: "",
costAccountingMarking: "",
scrapPercentage: "",
specialAccess: "",
itemSupplyMarking: "",
alternativeGroup: "",
alternativePriorities: "",
alternativeStrategy: "",
alternativeProbability: "",
bomItemRemark: "",
itemRemark: "",
isFixed: "",
},
currentRowIdx: undefined,
};
......@@ -263,7 +460,7 @@ export default {
if (this.optType == "add") {
this.tableData.unshift({ ...this.form });
} else {
this.tableData.splice(this.currentRowIdx, 1, this.form);
this.tableData.splice(this.currentRowIdx, 1, { ...this.form });
}
this.showFlag = false;
}
......@@ -272,17 +469,10 @@ export default {
/**重置表单 */
resetForm() {
this.form = {
itemName: "",
itemId: "",
quantity: "",
unitOfMeasure: "",
scrapPercentage: "",
alternativeGroup: "",
alternativePriorities: "",
alternativeStrategy: "",
alternativeProbability: "",
bomItemRemark: "",
itemRemark: "",
remark: "",
billOfMaterialsAuthorizationGroup: "",
};
},
/**重置组件状态 */
......@@ -292,7 +482,17 @@ export default {
},
/**获取组件数据 */
getComData() {
return this.tableData;
return {
...this.form2,
bomItemList: this.tableData,
};
},
/**查看行 */
searchRow(row, idx) {
this.form = Object.assign(this.form, row);
this.currentRowIdx = idx;
this.optType = "detail";
this.showFlag = true;
},
},
};
......
<template>
<div>
<el-table :data="tableData">
<el-table-column label="序号" prop="idx" align="center" />
<el-table-column label="工序名称" prop="processName" align="center" />
<el-table-column label="工序编码" prop="processCode" align="center" />
<el-table-column label="工作站" prop="workstationName" align="center" />
<el-table-column label="标准工时" prop="stdWorkingTime" align="center" />
<el-table-column label="换行时间" prop="lineBreakTime" align="center" />
<el-table-column
label="与下一道工序关系"
prop="linkType"
label="工时单位"
prop="stdWorkingTimeUom"
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
label="加工方式"
prop="controlCode"
align="center"
width="215"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.process_control_code"
:value="scope.row.controlCode"
/>
</template>
</el-table-column>
<el-table-column label="基本数量" prop="quantity" align="center" />
<el-table-column label="计量单位" prop="unitOfMeasure" align="center" />
<el-table-column label="雇员数量" prop="employeesNum" align="center" />
<el-table-column label="关键工序" prop="keyFlag" align="center">
<template slot-scope="scope">
<dict-tag
:options="dict.type.sys_yes_no"
:value="scope.row.keyFlag"
/>
</template>
</el-table-column>
<el-table-column label="是否质检" prop="isCheck" align="center">
<template slot-scope="scope">
<dict-tag
:options="dict.type.sys_yes_no"
:value="scope.row.isCheck"
/>
</template>
</el-table-column>
<el-table-column label="工序备注" prop="processRemark" align="center" />
<el-table-column
v-if="mode != 'info'"
label="操作"
align="center"
width="300"
fixed="right"
>
<template slot-scope="{ row, $index }">
<el-button type="text" size="small" @click="openSetProd(row, $index)">
设置物料
</el-button>
<el-button
type="text"
size="small"
@click="openSetProd(row, $index)"
@click="openSetQrindex(row, $index)"
>
设置检验项
</el-button>
<el-button type="text" size="small" @click="openSetTool(row, $index)">
设置工装量具
</el-button>
<el-button type="text" size="small" @click="updateRow(row, $index)"
>修改</el-button
>
</template>
</el-table-column>
<el-table-column
v-if="mode == 'info'"
label="操作"
align="center"
width="310"
fixed="right"
>
<template slot-scope="{ row, $index }">
<el-button type="text" size="small" @click="SearchProd(row, $index)">
查看物料
</el-button>
<el-button
type="text"
size="small"
@click="openSetQrindex(row, $index)"
@click="searchQrindex(row, $index)"
>
查看检验项
</el-button>
<el-button
type="text"
size="small"
@click="openSetTool(row, $index)"
>
<el-button type="text" size="small" @click="searchTool(row, $index)">
查看工装量具
</el-button>
<el-button type="text" size="small" @click="searchRow(row, $index)"
>查看工序信息</el-button
>
</template>
</el-table-column>
</el-table>
......@@ -49,28 +104,22 @@
ref="ProcessProdRef"
@updateItem="updateItem"
/>
<ProcessQcindex
:process="currentRow"
ref="ProcessQcindexRef"
/>
<ProcessTool
:process="currentRow"
ref="ProcessToolRef"
/>
<ProcessQcindex :process="currentRow" ref="ProcessQcindexRef" />
<ProcessTool :process="currentRow" ref="ProcessToolRef" />
<el-dialog
v-dialogDrag
:visible.sync="showFlag"
width="800px"
title="工序修改"
title="工序设置"
>
<el-form
ref="form"
class="page-form"
:model="form"
:rules="rules"
inline
label-width="100px"
size="small"
:inline="true"
label-width="8em"
>
<el-row>
<el-col :span="12">
......@@ -102,6 +151,212 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="换型时间" prop="lineBreakTime">
<el-input
type="number"
v-model="form.lineBreakTime"
placeholder="请输入换型时间"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工时单位" prop="stdWorkingTimeUom">
<el-select
v-model="form.stdWorkingTimeUom"
clearable
placeholder="请选择工时单位"
>
<el-option
v-for="dict in dict.type.mes_time_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</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-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="employeesNum">
<el-input
type="number"
v-model="form.employeesNum"
placeholder="请输入雇员数量"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="加工方式" prop="controlCode">
<el-select
v-model="form.controlCode"
placeholder="请选择加工方式"
clearable
style="width: 150px"
>
<el-option
v-for="dict in dict.type.process_control_code"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<template v-if="form.controlCode == 'PP02'">
<el-col :span="12">
<el-form-item
label="采购信息记录号"
prop="procurementInformationId"
>
<el-input
v-model="form.procurementInformationId"
placeholder="请输入采购信息记录号"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="供应商科目编号" prop="vendorSubjectId">
<el-input
v-model="form.vendorSubjectId"
placeholder="请输入供应商科目编号"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="净价" prop="netPrice">
<el-input
v-model="form.netPrice"
placeholder="请输入净价"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="采购组织" prop="procurementOrganization">
<el-input
v-model="form.procurementOrganization"
placeholder="请输入采购组织"
></el-input>
</el-form-item>
</el-col>
</template>
<el-col :span="12">
<el-form-item label="关键工序" prop="keyFlag">
<el-select
v-model="form.keyFlag"
placeholder="请选择是否为关键工序"
clearable
style="width: 150px"
>
<el-option
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否质检" prop="isCheck">
<el-select
v-model="form.isCheck"
placeholder="请选择是否质检"
clearable
style="width: 150px"
>
<el-option
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="吹膜宽度" prop="blownFilmWidth">
<el-input
type="number"
v-model="form.blownFilmWidth"
placeholder="请输入吹膜宽度"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="吹膜厚度" prop="blownFilmThickness">
<el-input
type="number"
v-model="form.blownFilmThickness"
placeholder="请输入吹膜厚度"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="印数宽度" prop="printingWidth">
<el-input
type="number"
v-model="form.printingWidth"
placeholder="请输入印数宽度"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="形状" prop="shape">
<el-select
v-model="form.shape"
clearable
placeholder="请选择形状"
>
<el-option
v-for="dict in dict.type.product_shape"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="Inlay" prop="inlay">
<el-input v-model="form.inlay" placeholder="Inlay"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="印张长度" prop="printLength">
<el-input
type="number"
v-model="form.printLength"
placeholder="请输入印张长度"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="印张宽度" prop="printWidth">
<el-input
type="number"
v-model="form.printWidth"
placeholder="请输入印张宽度"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer">
......@@ -115,12 +370,24 @@
<script>
import ItemBomSelect from "@/components/itemBomSelect/single.vue";
import ProcessProd from "./ProcessProd.vue";
import ProcessQcindex from "./ProcessQcindex.vue";
import ProcessTool from "./ProcessTool.vue";
import ProcessQcindex from "./ProcessQcindex.vue";
import ProcessTool from "./ProcessTool.vue";
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue";
export default {
components: { ItemBomSelect, ProcessProd, ProcessQcindex,ProcessTool,WorkstationSelect },
components: {
ItemBomSelect,
ProcessProd,
ProcessQcindex,
ProcessTool,
WorkstationSelect,
},
inject: ["mode"],
dicts: [
"process_control_code",
"sys_yes_no",
"mes_time_type",
"product_shape",
],
props: {
bomList: {
type: Array,
......@@ -137,9 +404,36 @@ export default {
rules: {},
/**表单初始化数据 */
form: {
stdWorkingTime: "",
productionSolutionId: "",
recordId: "",
processId: "",
workstationId: "",
workstationName: "",
keyFlag: "",
isCheck: "",
idx: "",
workstationCode: "",
processingMethod: "",
processName: "",
processRemark: "",
quantity: "",
unitOfMeasure: "",
employeesNum: "",
stdWorkingTime: "",
lineBreakTime: "",
stdWorkingTimeUom: "",
controlCode: "",
procurementInformationId: "",
vendorSubjectId: "",
netPrice: "",
procurementOrganization: "",
remark: "",
blownFilmWidth: "",
blownFilmThickness: "",
printingWidth: "",
shape: "",
inlay: "",
printLength: "",
printWidth: "",
},
currentRow: {},
currentRowIndex: undefined,
......@@ -149,6 +443,8 @@ export default {
setList(rows) {
this.tableData = rows.map((item) => {
item.processItemList = [];
item.qcindexList = [];
item.toolList = [];
return item;
});
},
......@@ -171,6 +467,34 @@ export default {
this.currentRowIndex = idx;
this.$refs["ProcessToolRef"].showProcessProd = true;
},
/**查看物料 */
SearchProd(row, idx) {
this.currentRow = row;
this.currentRowIndex = idx;
this.$refs["ProcessProdRef"].optType = "detail";
this.$refs["ProcessProdRef"].showProcessProd = true;
},
/**查看行 */
searchRow(row, idx) {
this.form = Object.assign(this.form, row);
this.currentRowIdx = idx;
this.optType = "detail";
this.showFlag = true;
},
/**查看质检 */
searchQrindex(row, idx) {
this.currentRow = row;
this.currentRowIndex = idx;
this.$refs["ProcessQcindexRef"].optType = "detail";
this.$refs["ProcessQcindexRef"].showProcessProd = true;
},
/**查看工装 */
searchTool(row, idx) {
this.currentRow = row;
this.currentRowIndex = idx;
this.$refs["ProcessToolRef"].optType = "detail";
this.$refs["ProcessToolRef"].showProcessProd = true;
},
/**更新行 */
updateRow(row, idx) {
Object.assign(this.form, row);
......@@ -195,9 +519,36 @@ export default {
/**重置表单 */
resetForm() {
this.form = {
stdWorkingTime: "",
productionSolutionId: "",
recordId: "",
processId: "",
workstationId: "",
workstationName: "",
keyFlag: "",
isCheck: "",
idx: "",
workstationCode: "",
processingMethod: "",
processName: "",
processRemark: "",
quantity: "",
unitOfMeasure: "",
employeesNum: "",
stdWorkingTime: "",
lineBreakTime: "",
stdWorkingTimeUom: "",
controlCode: "",
procurementInformationId: "",
vendorSubjectId: "",
netPrice: "",
procurementOrganization: "",
remark: "",
blownFilmWidth: "",
blownFilmThickness: "",
printingWidth: "",
shape: "",
inlay: "",
printLength: "",
printWidth: "",
};
},
/**重置组件状态 */
......
......@@ -8,50 +8,44 @@
v-show="showSearch"
label-width="100px"
>
<el-form-item label="生产方案名称" prop="productionSolutionName">
<el-form-item label="生产版本名称" prop="productionSolutionName">
<el-input
v-model="queryParams.itemName"
placeholder="请输入方案名称"
placeholder="请输入版本名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="生产用途" prop="usageName">
<el-input
<el-select
v-model="queryParams.usageName"
placeholder="请输入生产用途"
clearable
@keyup.enter.native="handleQuery"
/>
placeholder="请输入生产用途"
>
<el-option
v-for="item in usageNames"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<!--
<el-form-item label="生产用途" prop="usageName">
<el-form-item label="单据状态" prop="status">
<el-select
v-model="queryParams.prototypeRequestStatus"
clearable
placeholder="请输入生产用途"
@keyup.enter.native="usageName"
/>
</el-form-item> -->
<!-- <el-form-item label="样品名称" prop="abbreviation">
<el-input
v-model="queryParams.itemName"
placeholder="请输入样品名称"
clearable
@keyup.enter.native="handleQuery"
/> -->
<!-- <el-date-picker
v-model="queryParams.status"
clearable
v-model="queryParams.abbreviation"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择申请日期"
placeholder="请选择单据状态"
>
</el-date-picker>-->
<!-- </el-form-item> -->
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type="primary"
......@@ -66,124 +60,60 @@
</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:pro:prototypeRequest: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:pro:prototypeRequest: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:pro:prototypeRequest:remove']"
>删除</el-button
>
</el-col> -->
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['mes:pro:prototypeRequest:export']"
>导出</el-button
<el-table
v-loading="loading"
:data="productionSolutionList"
row-key="productionSolutionId"
default-expand-all
>
</el-col> -->
<!-- <right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> -->
<el-table v-loading="loading" :data="productionSolutionList" row-key="productionSolutionId" default-expand-all >
<el-table-column label="生产方案编码" prop="productionSolutionCode">
<el-table-column label="生产版本编码" prop="productionSolutionCode">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="handleView(scope.row)"
v-hasPermi="['mes:pro:productionSolutionCode:query']"
v-hasPermi="['pro:productionSolutionCode:query']"
>{{ scope.row.productionSolutionCode }}</el-button
>
</template>
</el-table-column>
<el-table-column label="产品方案名称" align="center" prop="productionSolutionName" :show-overflow-tooltip="true"
<el-table-column
label="产品版本名称"
align="center"
prop="productionSolutionName"
:show-overflow-tooltip="true"
/>
<el-table-column label="生产用途" align="center" prop="usageName" />
<el-table-column label="状态" align="center" width="100" prop="status">
<template slot-scope="scope">
<dict-tag
:options="dict.type.production_solution_status"
:value="scope.row.status"
/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<!-- <el-table-column label="备注" align="center" prop="usageName" width="180"/> -->
<!-- <el-table-column
<el-table-column
label="操作"
width="200px"
align="center"
fixed="right"
class-name="small-padding fixed-width"
/> -->
<!-- <template slot-scope="scope">
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
v-if="scope.row.prototypeRequestStatus == '0'"
v-if="scope.row.status == 'PREPARE'"
@click="handleUpdate(scope.row)"
v-hasPermi="['mes:pro:prototypeRequest:edit']"
>修改</el-button
> -->
<!-- <el-button
size="mini"
type="text"
icon="el-icon-circle-check"
v-if="scope.row.prototypeRequestStatus == '0'"
@click="handleFinish(scope.row)"
v-hasPermi="['mes:pro:prototypeRequest:update']"
>通过</el-button
> -->
<!-- <el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:pro:prototypeRequest:remove']"
>删除</el-button
> -->
<!-- <el-button
size="mini"
type="text"
icon="el-icon-edit"
v-if="scope.row.prototypeRequestStatus == '1'"
@click="generatea(scope.row)"
v-hasPermi="['mes:pro:prototypeRequest:edit']"
>生成制作单</el-button
> -->
<!-- </template> -->
<!-- </el-table-column>-->
v-hasPermi="['pro:productionSolution:edit']"
>确认</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
......@@ -193,23 +123,22 @@
@pagination="getList"
/>
</div>
</template>
<script>
import {
// listPrototypeRequest,
// getPrototypeRequest,
// delPrototypeRequest,
// addPrototypeRequest,
// updatePrototypeRequest,
// dofinish,
listProductionSolution,
getProductionSolution,
addProductionSolution,
updateProductionSolution,
delProductionSolution,
} from "@/api/mes/pro/productionSolution";
// listPrototypeRequest,
// getPrototypeRequest,
// delPrototypeRequest,
// addPrototypeRequest,
// updatePrototypeRequest,
// dofinish,
listProductionSolution,
getProductionSolution,
addProductionSolution,
updateProductionSolution,
delProductionSolution,
} from "@/api/mes/pro/productionSolution";
import ItemSelect from "@/components/itemSelect/single.vue";
import ClientSelect from "@/components/clientSelect/single.vue";
import VendorSelect from "@/components/vendorSelect/single.vue";
......@@ -222,6 +151,7 @@ export default {
"mes_pr_status",
"mes_prototypeRequest_sourcetype",
"mes_prototypeRequest_type",
"production_solution_status",
],
components: {
Treeselect,
......@@ -261,6 +191,7 @@ export default {
productionSolutionId: null, // 可以查简称与英文名
productionSolutionCode: null,
productionSolutionName: null,
statsu: "PREPARE",
itemId: null,
routeId: null,
usageId: null,
......@@ -271,13 +202,14 @@ export default {
updateTime: null,
},
options: [
// { value: null, label: "全部订单" },
{ value: 0, label: "审批中" },
{ value: 1, label: "待制作" },
{ value: 2, label: "打样中" },
{ value: 3, label: "待质检" },
{ value: 4, label: "待确认" },
{ value: 5, label: "已完成" },
{ value: "PREPARE", label: "待确认" },
{ value: "FINISH", label: "已完成" },
],
usageNames: [
{ value: "打样", label: "打样" },
{ value: "量产", label: "量产" },
{ value: "销售", label: "销售" },
{ value: "特定", label: "特定" },
],
// 表单参数
......@@ -359,7 +291,8 @@ export default {
this.reset();
const productionSolutionId = row.productionSolutionId || this.ids;
this.$router.push(
"/mes/pro/productionSolution/info?productionSolutionId=" + productionSolutionId
"/mes/pro/productionSolution/info?productionSolutionId=" +
productionSolutionId
);
// getprototypeRequest(prototypeRequestId).then((response) => {
// this.form = response.data;
......@@ -371,9 +304,10 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const prototypeRequestId = row.prototypeRequestId || this.ids;
const productionSolutionId = row.productionSolutionId || this.ids;
this.$router.push(
"/mes/proofing/edit?prototypeRequestId=" + prototypeRequestId
"/mes/pro/productionSolution/edit?productionSolutionId=" +
productionSolutionId
);
// getPrototypeRequest(prototypeRequestId).then((response) => {
// // this.form = response.data;
......@@ -438,6 +372,5 @@ export default {
return;
},
},
};
</script>
......@@ -10,12 +10,13 @@
<!-- 修改 按钮显示 -->
<template slot="buttons" v-if="mode == 'edit'">
<!-- <el-button size="mini" type="primary" @click="saveForm">提交</el-button> -->
<el-button size="mini" type="primary" @click="saveForm">提交</el-button>
</template>
</PageTitle>
<PageWrapper>
<el-form
class="page-form"
:model="form"
ref="form"
size="small"
......@@ -23,8 +24,8 @@
label-width="8em"
>
<el-row>
<el-col :md="12" :xs="12">
<el-form-item label="生产方法编码" prop="productionSolutionCode">
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="生产版本编码" prop="productionSolutionCode">
<el-input
v-model="form.productionSolutionCode"
disabled
......@@ -32,8 +33,8 @@
></el-input>
</el-form-item>
</el-col>
<el-col :md="12" :xs="12">
<el-form-item label="生产方法名称" prop="productionSolutionName">
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="生产版本名称" prop="productionSolutionName">
<el-input
v-model="form.productionSolutionName"
disabled
......@@ -41,18 +42,29 @@
></el-input>
</el-form-item>
</el-col>
<el-col :md="12" :xs="12">
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="生产版本类型" prop="productionSolutionType">
<el-select
v-model="form.productionSolutionType"
clearable
placeholder="请选择项目类别"
>
<el-option
v-for="dict in dict.type.production_solution_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="产品名称" prop="itemName">
<el-input
v-model="form.itemName"
disabled
placeholder
></el-input>
<el-input v-model="form.itemName" disabled placeholder></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="12" :xs="12">
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="工艺路线" prop="routeName">
<el-input
v-model="form.routeName"
......@@ -61,26 +73,78 @@
></el-input>
</el-form-item>
</el-col>
<el-col :md="12" :xs="12">
<el-form-item label="生产用途" prop="usageName">
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="生产用途" prop="usageId">
<el-select v-model="form.usageId" placeholder="请选择用途">
<el-option
v-for="dict in dict.type.production_solution_usage"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="有效起始日期" prop="startDate">
<el-date-picker
clearable
v-model="form.startDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择有效起始日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="有效期截止日期" prop="expiryDate">
<el-date-picker
clearable
v-model="form.expiryDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择有效期截止日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="最小批量" prop="minLot">
<el-input-number
:min="1"
v-model="form.minLot"
placeholder="请输入最小批量"
/>
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="最大批量" prop="maxLot">
<el-input-number
:min="1"
v-model="form.maxLot"
placeholder="请输入最大批量"
/>
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="单位" prop="unitOfMeasure">
<el-input
v-model="form.usageName"
v-model="form.unitOfMeasure"
disabled
placeholder
></el-input>
</el-form-item>
</el-col>
<el-col :md="24" :xs="12">
</el-row>
<el-row>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="备注" prop="remark">
<el-input
type="textarea"
:rows="3"
v-model="form.remark"
disabled
placeholder
></el-input>
</el-form-item>
......@@ -112,12 +176,13 @@ import {
// addPrototypeRequest,
// getPrototypeRequest,
// updatePrototypeRequest,
getProductionSolution
getProductionSolution,
submitProductionSolution,
} from "@/api/mes/pro/productionSolution";
export default {
components: { ProogingBom, ProogingProcess, ItemSelect, RoutesProcessSelect },
dicts: [],
dicts: ["production_solution_type", "production_solution_usage"],
provide() {
return {
mode: this.mode,
......@@ -132,11 +197,25 @@ export default {
productionSolutionId: "",
productionSolutionCode: "",
productionSolutionName: "",
productionSolutionType: "",
itemId: "",
itemName: "",
routeId: "",
routeName: "",
usageId: "",
usageName: "",
startDate: "",
expiryDate: "",
maxLot: "",
minLot: "",
unitOfMeasure: "",
materialsGroupBill: "",
alternativeBill: "",
groupCounter: "",
groupKey: "",
status: "",
sapItemCode: "",
factoryCode: "",
remark: "",
createBy: "",
createTime: "",
......@@ -155,9 +234,9 @@ export default {
},
pageTitle() {
const titles = {
edit: "打样单修改",
info: "生产方案详情",
apply: "打样单申请",
edit: "生产版本确认",
info: "生产版本详情",
apply: "生产版本申请",
};
return titles[this.mode];
},
......@@ -177,9 +256,10 @@ export default {
getProductionSolution(id)
.then(({ data }) => {
Object.assign(this.form, data);
this.bomList = data.bomList;
this.bomList = data.bomHead.bomItemList;
// 设置组件数据
this.$refs["ProogingBomRef"].tableData = data.bomList;
this.$refs["ProogingBomRef"].form2 = data.bomHead;
this.$refs["ProogingBomRef"].tableData = data.bomHead.bomItemList;
this.$refs["ProogingProcessRef"].tableData = data.processList;
})
.finally(() => {
......@@ -223,11 +303,11 @@ export default {
},
/**提交 */
saveForm() {
const bomList = this.$refs.ProogingBomRef.getComData();
const bomHead = this.$refs.ProogingBomRef.getComData();
const processList = this.$refs.ProogingProcessRef.getComData();
const params = {
...this.form,
bomList,
bomHead,
processList,
};
this.loading = true;
......@@ -244,7 +324,7 @@ export default {
this.loading = false;
});
} else {
updatePrototypeRequest(params)
submitProductionSolution(params)
.then(() => {
this.loading = false;
this.$modal.msgSuccess("提交成功!");
......@@ -260,9 +340,25 @@ export default {
productionSolutionId: "",
productionSolutionCode: "",
productionSolutionName: "",
productionSolutionType: "",
itemId: "",
itemName: "",
routeId: "",
routeName: "",
usageId: "",
usageName: "",
startDate: "",
expiryDate: "",
maxLot: "",
minLot: "",
unitOfMeasure: "",
materialsGroupBill: "",
alternativeBill: "",
groupCounter: "",
groupKey: "",
status: "",
sapItemCode: "",
factoryCode: "",
remark: "",
createBy: "",
createTime: "",
......
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