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