Commit 33b9b37b authored by 何远江's avatar 何远江

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

parents d308b2ff 4c8fc934
This diff is collapsed.
......@@ -130,7 +130,7 @@
@pagination="getList"
/>
<!-- 添加或修改【请填写功能名称】对话框 -->
<!-- 添加或修改订单信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
......@@ -274,7 +274,7 @@
// 表单重置
reset() {
this.form = {
brandOrderQuantityId: null, brandId: null, time: null, region: null, orderQuantity: null, enableFlag: null, remark: null, createBy: null, createTime: null, updateBy: null, updateTime: null };
brandOrderQuantityId: null, brandId: null, brandName: null , time: null, region: null, orderQuantity: null, enableFlag: null, remark: null, createBy: null, createTime: null, updateBy: null, updateTime: null };
this.resetForm("form");
},
/** 搜索按钮操作 */
......@@ -297,7 +297,7 @@
handleAdd() {
this.reset();
this.open = true;
this.title = "添加【请填写功能名称】";
this.title = "添加订单量信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
......
......@@ -296,7 +296,7 @@ export default {
// 表单重置
reset() {
this.form = {
brandVisitId: null, brandId: null, contactName: null, visitPerson: null, visitTime: null, visitSummary: null, enableFlag: null, remark: null, createBy: null, createTime: null, updateBy: null, updateTime: null };
brandVisitId: null, brandId: null, brandName:null, contactName: null, visitPerson: null, visitTime: null, visitSummary: null, enableFlag: null, remark: null, createBy: null, createTime: null, updateBy: null, updateTime: null };
this.resetForm("form");
},
/** 搜索按钮操作 */
......@@ -319,7 +319,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加【请填写功能名称】";
this.title = "添加品牌访问信息";
this.optType = "add";
},
/** 修改按钮操作 */
......@@ -329,7 +329,7 @@ export default {
getVisit(brandVisitId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改【请填写功能名称】";
this.title = "修改品牌访问信息";
this.optType = "edit";
});
},
......@@ -357,7 +357,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const brandVisitIds = row.brandVisitId || this.ids;
this.$modal.confirm('是否确认删除【请填写功能名称】编号为"' + brandVisitIds + '"的数据项?').then(function() {
this.$modal.confirm('是否确认删除品牌访问编号为"' + brandVisitIds + '"的数据项?').then(function() {
return delVisit(brandVisitIds);
}).then(() => {
this.getList();
......
......@@ -249,6 +249,11 @@ export default {
this.form.colorCode = element.colorCode;
this.form.face = 'back';
var retFlag = false;
const idx = this.faceColorList.findIndex(itm => itm.colorId == element.colorId)
if (idx > -1) {
this.$modal.msgError("新增颜色失败,颜色已存在");
return
}
addFaceColor(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.getList();
......
......@@ -249,6 +249,11 @@ export default {
this.form.colorCode = element.colorCode;
this.form.face = 'front';
var retFlag = false;
const idx = this.faceColorList.findIndex(itm => itm.colorId == element.colorId)
if (idx > -1) {
this.$modal.msgError("新增颜色失败,颜色已存在");
return
}
addFaceColor(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.getList();
......
......@@ -351,6 +351,7 @@
<el-col :span="12">
<el-form-item label="单位" prop="unitOfMeasure">
<el-select
v-model="form.unitOfMeasure"
disabled
v-if="optType == 'view'"
......@@ -367,6 +368,7 @@
<el-select
v-model="form.unitOfMeasure"
placeholder="请选择单位"
filterable
v-else
>
<el-option
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="工作单元编码" prop="workunitCode">
<el-form-item label="工作单元编码" label-width="100px" prop="workunitCode">
<el-input
v-model="queryParams.workunitCode"
placeholder="请输入工作单元编码"
......@@ -9,7 +9,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工作单元名称" prop="workunitName">
<el-form-item label="工作单元名称" label-width="100px" prop="workunitName">
<el-input
v-model="queryParams.workunitName"
placeholder="请输入工作单元名称"
......@@ -82,8 +82,16 @@
<el-table v-loading="loading" :data="workunitList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="工作单元ID" align="center" prop="workunitId" />-->
<el-table-column label="工作站ID" align="center" prop="workstationId" />
<el-table-column label="工作单元编码" align="center" prop="workunitCode" />
<el-table-column label="工作单元编码" align="center" prop="workunitCode" >
<template slot-scope="scope">
<el-button
type="text"
@click="handleView(scope.row)"
v-hasPermi="['mes:md:workunit:query']"
>{{scope.row.workunitCode}}</el-button>
</template>
</el-table-column>
<el-table-column label="工作站" align="center" prop="workstationName" />
<el-table-column label="工作单元名称" align="center" prop="workunitName" />
<el-table-column label="是否启用" align="center" prop="enableFlag" >
<template slot-scope="scope">
......@@ -120,21 +128,21 @@
/>
<!-- 添加或修改工作单元对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="工作站" prop="workstation">
<el-input v-model="form.workstation" placeholder="请输入工作站" >
<el-form-item label="工作站" label-width="100px" prop="workstationName">
<el-input v-model="form.workstationName" placeholder="请输入工作站" >
<el-button slot="append" icon="el-icon-search" @click="handleWorkstationSelect"></el-button>
</el-input>
</el-form-item>
<WorkstationSelect ref="workstationSelect" @onSelected="onWorkstationSelected"> </WorkstationSelect>
<el-form-item label="工作单元编码" prop="workunitCode">
<el-form-item label="工作单元编码" label-width="100px" prop="workunitCode">
<el-input v-model="form.workunitCode" placeholder="请输入工作单元编码" />
</el-form-item>
<el-form-item label="工作单元名称" prop="workunitName">
<el-form-item label="工作单元名称" label-width="100px" prop="workunitName">
<el-input v-model="form.workunitName" placeholder="请输入工作单元名称" />
</el-form-item>
<el-form-item label="是否启用" prop="enableFlag">
<el-form-item label="是否启用" label-width="100px" prop="enableFlag">
<el-select v-model="form.enableFlag" placeholder="请选择是或否">
<el-option
v-for="dict in dict.type.sys_yes_no"
......@@ -144,12 +152,13 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-form-item label="备注" label-width="100px" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
<el-button type="primary" @click="submitForm" v-else>确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
......@@ -166,6 +175,7 @@ export default {
dicts:['sys_yes_no'],
data() {
return {
optType: undefined,
// 遮罩层
loading: true,
// 选中数组
......@@ -189,6 +199,7 @@ export default {
pageNum: 1,
pageSize: 10,
workstationId: null,
workstationName: null,
workunitCode: null,
workunitName: null,
enableFlag: null,
......@@ -196,6 +207,7 @@ export default {
// 表单参数
form: {
workstationId: '',
workstationName: '',
workunitCode: '',
workstation: '',
workunitName: '',
......@@ -228,6 +240,7 @@ export default {
reset() {
this.form = {
workstationId: '',
workstationName: '',
workunitCode: '',
workstation: '',
workunitName: '',
......@@ -267,6 +280,17 @@ export default {
this.title = "修改工作单元";
});
},
// 查询明细按钮操作
handleView(row){
this.reset();
const workunitId = row.workunitId || this.ids
getWorkunit(workunitId).then(response => {
this.form = response.data;
this.open = true;
this.title = "查看工作单元";
this.optType = "view";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
......@@ -311,7 +335,7 @@ export default {
console.log(row, 'rowwwwwww')
if(row != undefined && row != null){
this.form.workstationId = row.workstationId;
this.form.workstation = row.workstationName;
this.form.workstationName = row.workstationName;
}
},
}
......
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