产品定义修改
This commit is contained in:
@@ -59,6 +59,17 @@ namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
List<MdUnit> units = mdProduct.GetProductDefineList();
|
||||
return SUCCESS(units);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取全部 产线
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getProcessroute")]
|
||||
public IActionResult GetProcessroutelist()
|
||||
{
|
||||
List<MdWorkline> worklines = mdProduct.GetWorklineList();
|
||||
return SUCCESS(worklines);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// add 产品
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -16,6 +16,7 @@ namespace ZR.Service.mes.md.IService
|
||||
public MdProductDefine GetProductDefinebyPK(int measure);
|
||||
List<MdUnit> GetProductDefineList(string name);
|
||||
List<MdUnit> GetProductDefineList();
|
||||
List<MdWorkline> GetWorklineList();
|
||||
public int InsertProductDefine(MdProductDefine jo);
|
||||
public int UpdateProductDefine(MdProductDefine paramss);
|
||||
}
|
||||
|
||||
@@ -65,8 +65,12 @@ namespace ZR.Service.mes.md
|
||||
public MdProductDefine GetProductDefinebyPK(int measure)
|
||||
{
|
||||
MdProductDefine product=GetId(measure);
|
||||
MdUnit unit = Context.Queryable<MdUnit>().Where(it=>it.MeasureId == product.ProductUnit).First();
|
||||
product.ProductUnitName= unit.MeasureName;
|
||||
MdUnit unit = Context.Queryable<MdUnit>().Where(it=>it.MeasureId == product.ProductUnit).First();
|
||||
if (unit != null)
|
||||
{
|
||||
product.ProductUnitName = unit.MeasureName;
|
||||
}
|
||||
|
||||
return product;
|
||||
}
|
||||
|
||||
@@ -80,7 +84,11 @@ namespace ZR.Service.mes.md
|
||||
return Context.Queryable<MdUnit>().ToList();
|
||||
}
|
||||
|
||||
|
||||
public List<MdWorkline> GetWorklineList()
|
||||
{
|
||||
return Context.Queryable<MdWorkline>().ToList();
|
||||
}
|
||||
|
||||
public int InsertProductDefine(MdProductDefine jo)
|
||||
{
|
||||
return Insert(jo);
|
||||
|
||||
@@ -17,6 +17,14 @@ export function getUnitmeasure(query) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function getProcessroute(query) {
|
||||
return request({
|
||||
url: '/mes/md/product/getProcessroute/' + query,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function updateUnitmeasure(data) {
|
||||
return request({
|
||||
url: '/mes/md/unit/updateUnit',
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<div class="title">装配车间生产状态统计</div>
|
||||
</div>
|
||||
<vxe-table border resizable align="center" ref="xTable" :data="OperationList">
|
||||
<vxe-column field="lineId" title="线体code" width="120" />
|
||||
<vxe-column field="lineName" title="线体名称" width="120" />
|
||||
<vxe-column field="lineId" title="产线编码" width="120" />
|
||||
<vxe-column field="lineName" title="产线名称" width="120" />
|
||||
<vxe-column field="productProgressRate" title="生产进度" width="500" :title-help="{ message: '小于20%:红色;小于60%:黄色;大于60%绿色' }">
|
||||
<template #default="{ row }">
|
||||
<div class="progress">
|
||||
|
||||
@@ -48,10 +48,10 @@
|
||||
:row-config="{ isHover: true }"
|
||||
>
|
||||
<vxe-column type="checkbox" width="60"></vxe-column>
|
||||
<vxe-column field="deviceCode" title="设备编码" sortable></vxe-column>
|
||||
<vxe-column field="deviceCode" title="设备编码" width="80"></vxe-column>
|
||||
<vxe-column field="deviceName" title="设备名称" sortable></vxe-column>
|
||||
<vxe-colgroup title="所属工序">
|
||||
<vxe-column field="workstation.stationCode" title="工序id" width="20"></vxe-column>
|
||||
<vxe-column field="workstation.stationCode" title="工序id" width="80"></vxe-column>
|
||||
<vxe-column field="workstation.stationName" title="工序名称"></vxe-column>
|
||||
</vxe-colgroup>
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<el-table-column label="产品编码" align="center" prop="productCode" />
|
||||
<el-table-column label="产品名称" align="center" prop="productName" />
|
||||
<el-table-column label="单位" align="center" prop="productUnitName" />
|
||||
<el-table-column label="工艺路线" align="center" prop="processrouteName" />
|
||||
<el-table-column label="线体" align="center" prop="processrouteName" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
@@ -142,6 +142,7 @@ import {
|
||||
listproductEfinition,
|
||||
addProductDefine,
|
||||
getUnitmeasure,
|
||||
getProcessroute,
|
||||
updateProductDefine,
|
||||
getProductBypk,
|
||||
delproduct,
|
||||
@@ -181,8 +182,7 @@ export default {
|
||||
measureId: '', //unit表
|
||||
productUnit: '', //product表
|
||||
productUnitName: '', //product表
|
||||
processrouteCodeName: '',
|
||||
ProcessrouteId: '',
|
||||
workline:null
|
||||
},
|
||||
rules: {
|
||||
productCode: [{ required: true, message: '产品编码不能为空', trigger: 'blur' }],
|
||||
@@ -327,6 +327,7 @@ export default {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
//新增
|
||||
let data = new Object()
|
||||
data.productCode = this.dmlform.productCode
|
||||
data.productName = this.dmlform.productName
|
||||
@@ -411,21 +412,34 @@ export default {
|
||||
if (queryString == undefined) {
|
||||
queryString = ''
|
||||
}
|
||||
getUnitmeasure(queryString).then((res) => {
|
||||
getProcessroute(queryString).then((res) => {
|
||||
const data = []
|
||||
for (let i of res.data) {
|
||||
data.push({
|
||||
measureId: i.measureId,
|
||||
value: i.measureName,
|
||||
id:i.id,
|
||||
lineCode: i.lineCode,
|
||||
lineName:i.lineName,
|
||||
value: i.lineCode+"|"+i.lineName,
|
||||
})
|
||||
}
|
||||
//键值对
|
||||
cb(data)
|
||||
})
|
||||
},
|
||||
// 工艺路线选择事件
|
||||
handleProcessrouteNameSelect(data) {
|
||||
const str = {
|
||||
id:data.id,
|
||||
lineCode:data.lineCode,
|
||||
lineName:data.lineName
|
||||
}
|
||||
|
||||
|
||||
this.dmlform.workline=JSON.stringify(str);
|
||||
|
||||
|
||||
|
||||
|
||||
handleProcessrouteNameSelect(row) {
|
||||
this.dmlform.Processroute = row.measureId
|
||||
},
|
||||
|
||||
//导入excel
|
||||
|
||||
@@ -48,10 +48,10 @@
|
||||
:row-config="{ isHover: true }"
|
||||
>
|
||||
<vxe-column type="checkbox" width="60"></vxe-column>
|
||||
<vxe-column field="lineCode" title="产线编码" sortable></vxe-column>
|
||||
<vxe-column field="lineCode" title="产线编码" width="80"></vxe-column>
|
||||
<vxe-column field="lineName" title="产线名称" sortable></vxe-column>
|
||||
<vxe-colgroup title="所属车间">
|
||||
<vxe-column field="workshop.workshopId" title="车间id" width="20"></vxe-column>
|
||||
<vxe-column field="workshop.workshopId" title="车间id" width="80"></vxe-column>
|
||||
<vxe-column field="workshop.workshopName" title="车间名称"></vxe-column>
|
||||
</vxe-colgroup>
|
||||
|
||||
|
||||
@@ -42,16 +42,20 @@
|
||||
ref="xTable1"
|
||||
align="center"
|
||||
:print-config="{}"
|
||||
:data="table.workshopList"
|
||||
:data="table.workstation"
|
||||
:loading="table.loading"
|
||||
@checkbox-change="selectChangeEvent"
|
||||
:row-config="{ isHover: true }"
|
||||
>
|
||||
<vxe-column type="checkbox" width="60"></vxe-column>
|
||||
<vxe-column field="stationCode" title="工序编码" sortable></vxe-column>
|
||||
<vxe-column field="stationCode" title="工序编码" width="80"></vxe-column>
|
||||
<vxe-column field="stationName" title="工序名称" sortable></vxe-column>
|
||||
<vxe-colgroup title="所属产线">
|
||||
<vxe-column field="workline.lineCode" title="产线id"></vxe-column>
|
||||
<vxe-column field="workline.lineCode" title="产线id" width="80"></vxe-column>
|
||||
<vxe-column field="workline.lineName" title="产线名称"></vxe-column>
|
||||
</vxe-colgroup>
|
||||
<vxe-colgroup title="所属车间">
|
||||
<vxe-column field="workline.lineCode" title="产线id" width="80"></vxe-column>
|
||||
<vxe-column field="workline.lineName" title="产线名称"></vxe-column>
|
||||
</vxe-colgroup>
|
||||
<vxe-column title="操作" show-overflow>
|
||||
@@ -76,12 +80,12 @@
|
||||
<el-dialog :title="DMLdialog.title" :visible.sync="DMLdialog.visiable" width="600px" append-to-body>
|
||||
<el-form ref="DMLdialog" :model="DMLdialog.form" label-width="150px" label-position="left" :rules="DMLdialog.rules">
|
||||
<el-form-item label="工序编码 " prop="stationCode">
|
||||
<el-input v-model="DMLdialog.form.stationCode" placeholder="输入工序编码"></el-input>
|
||||
<el-input v-model="DMLdialog.form.stationCode" placeholder="输入工序编码" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序名称 " prop="stationName">
|
||||
<el-input v-model="DMLdialog.form.stationName" placeholder="输入工序名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="产线 " >
|
||||
<el-form-item label="产线 ">
|
||||
<el-select v-model="DMLdialog.form.fkWorklineId" placeholder="请选择产线">
|
||||
<el-option
|
||||
v-for="item in DMLdialog.workLineOption"
|
||||
@@ -116,7 +120,7 @@ export default {
|
||||
//表格
|
||||
table: {
|
||||
loading: true,
|
||||
workshopList: [],
|
||||
workstation: [],
|
||||
},
|
||||
//分页
|
||||
pagination: {
|
||||
@@ -160,7 +164,7 @@ export default {
|
||||
if (res.code == 200) {
|
||||
this.table.loading = false
|
||||
this.pagination.total = res.data.item1
|
||||
this.table.workshopList = res.data.item2
|
||||
this.table.workstation = res.data.item2
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user