LAPTOP-R6EHHS26\86155 6 months ago
commit 0be124b6ab

@ -0,0 +1,54 @@
import request from '@/utils/request'
// 查询通知公告-班组列表
export function listNoticeGroup(query) {
return request({
url: '/system/noticeGroup/list',
method: 'get',
params: query
});
}
// 查询通知公告-班组详细
export function getNoticeGroup(id) {
return request({
url: '/system/noticeGroup/' + id,
method: 'get'
});
}
// 新增通知公告-班组
export function addNoticeGroup(data) {
return request({
url: '/system/noticeGroup',
method: 'post',
data: data
});
}
// 修改通知公告-班组
export function updateNoticeGroup(data) {
return request({
url: '/system/noticeGroup',
method: 'put',
data: data
});
}
// 删除通知公告-班组
export function delNoticeGroup(data) {
return request({
url: '/system/noticeGroup/delNoticeGroup',
method: 'post',
data: data
});
}
export function teamBind(data) {
return request({
url: '/system/noticeGroup/teamBind',
method: 'post',
data: data
});
}

@ -55,3 +55,21 @@ export function delProduct(productId) {
method: 'delete'
});
}
// 修改物料附属信息
export function updateProductAttached(data) {
return request({
url: '/wms/attached',
method: 'put',
data: data
});
}
// 新增物料附属信息
export function addProductAttached(data) {
return request({
url: '/wms/attached',
method: 'post',
data: data
});
}

@ -0,0 +1,198 @@
<template>
<diV>
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="handleAdd"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
size="mini"
:disabled="multiple"
@click="handleDisBindTeam"
>删除</el-button>
</el-col>
</el-row>
<el-table :data="noticeGroupList" v-loading="loading" @selection-change="handleSelChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column label="班组编码" align="center" prop="groupCode" />
<el-table-column label="班组名称" align="center" prop="groupName" />
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="创建时间" align="center" prop="createTime" />
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="teamClose"> </el-button>
</div>
</el-dialog>
<el-dialog :title="teamTitle" :visible.sync="teamOpen" width="800px" append-to-body>
<el-table :data="teamList" v-loading="teamLoading" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" align="center" width="50"/>
<el-table-column label="班组编码" align="center" prop="teamCode" />
<el-table-column label="班组名称" align="center" prop="teamDesc" />
<el-table-column prop="teamType" label="班组类别" align="center" >
<template slot-scope="scope">
{{ scope.row.teamType == "team_type1" ? "生产班组" : "检验班组" }}
</template>
</el-table-column>
<el-table-column label="所属产线" align="center" prop="productionLineCode" />
<el-table-column label="班组负责人" align="center" prop="teamLeaderName" />
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="创建时间" align="center" prop="createDate" />
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleBindTeam"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</diV>
</template>
<script>
import { listTeam,} from "@/api/wms/team";
import { getNoticeGroup,delNoticeGroup,teamBind,} from "@/api/system/noticeGroup";
export default {
name:"teamBind",
props: {
noticeId: Number,
},
data() {
return {
//
loading: true,
teamLoading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
groupCodes:[],
groupNames:[],
teamOpen: false,
//
total: 0,
//
noticeGroupList: [],
teamList: [],
//
title: "班组绑定",
teamTitle: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
noticeId: null,
createBy: null
},
};
},
created() {
this.getTeamList();
},
methods: {
//
getList() {
this.loading = true;
getNoticeGroup(this.noticeId).then(response => {
this.noticeGroupList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
getTeamList(){
listTeam().then(response => {
this.teamList = response.rows;
});
},
cancel() {
this.teamOpen = false;
},
teamClose() {
this.$emit('cancel');
//this.reset();
},
//
handleSelChange(selection) {
this.groupCodes = selection.map(item => item.groupCode)
this.single = selection.length!=1
this.multiple = !selection.length
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.teamCode)
this.groupNames = selection.map(item => item.teamDesc)
this.single = selection.length!=1
this.multiple = !selection.length
},
//
handleAdd() {
this.teamLoading = true;
listTeam().then(response => {
this.teamList = response.rows;
this.teamOpen = true;
this.teamTitle = "添加班组";
this.teamLoading = false;
});
},
//
handleBindTeam() {
const groupCodes = this.ids
const groupNames = this.groupNames
const noticeId = this.noticeId
const data = {
noticeId,
groupCodes,
groupNames
}
if (this.noticeId != undefined) {
teamBind(data).then(response => {
if(response.code == 200) {
this.$modal.msgSuccess("绑定成功");
}
this.teamOpen = false;
this.getList();
});
}
},
//
handleDisBindTeam() {
const groupCodes = this.groupCodes;
const noticeId = this.noticeId;
const data = {
noticeId,
groupCodes
}
this.$modal.confirm('是否确认删除班组编码为"' + groupCodes + '"的数据项?').then(function() {
return delNoticeGroup(data);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
},
};
</script>
<style scoped>
.mb8 {
margin-bottom: 8px;
}
</style>

@ -66,6 +66,17 @@
v-hasPermi="['system:notice:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-link"
size="mini"
:disabled="single"
@click="handleBind"
v-hasPermi="['system:notice:edit']"
>班组绑定</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -166,15 +177,21 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<TeamBind ref="teamBind"
:noticeId="ids[0]"
@cancel="handleClose"
></TeamBind>
</div>
</template>
<script>
import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api/system/notice";
import TeamBind from './TeamBind.vue';
export default {
name: "Notice",
dicts: ['sys_notice_status', 'sys_notice_type'],
components: {TeamBind},
data() {
return {
//
@ -195,6 +212,7 @@ export default {
title: "",
//
open: false,
teamOpen: false,
//
queryParams: {
pageNum: 1,
@ -306,6 +324,14 @@ export default {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
handleBind(){
this.$refs.teamBind.open = true;
this.$refs.teamBind.getList();
},
handleClose() {
this.$refs.teamBind.open = false;
this.getList();
}
}
};

@ -62,6 +62,18 @@
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdateAttached"
v-hasPermi="['wms:attached:edit']"
>新增/修改附属属性</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
@ -420,10 +432,37 @@
</div>
</el-dialog>
<!-- 查看物料附属信息 -->
<!-- 更新附属属性 -->
<el-dialog
:title="title"
:visible.sync="openAttached"
width="500px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="标准效率" prop="iei">
<el-input-number
v-model="form.iei"
style="width: 320px"
/>
</el-form-item>
<el-form-item label="标准用人" prop="manStandar">
<el-input-number
v-model="form.manStandar"
style="width: 320px"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitAttachedForm"> </el-button>
<el-button @click="cancelOpenAttached"> </el-button>
</div>
</el-dialog>
<!-- 查看物料附属信息 -->
<el-dialog
:title="title"
:visible.sync="openAttachedView"
width="1000px"
append-to-body
>
@ -506,7 +545,7 @@
</el-descriptions>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelAttached"> </el-button>
<el-button @click="cancelAttachedView"> </el-button>
</div>
</el-dialog>
</div>
@ -519,6 +558,8 @@ import {
delProduct,
addProduct,
updateProduct,
updateProductAttached,
addProductAttached,
} from "@/api/wms/product";
import { syncProductSAP } from "@/api/technology/proroute";
@ -537,7 +578,7 @@ export default {
loading: true,
//
ids: [],
productCodes:[],
productCodes: [],
//
single: true,
//
@ -552,6 +593,7 @@ export default {
title: "",
//
open: false,
openAttachedView: false,
openAttached: false,
//
queryParams: {
@ -637,14 +679,22 @@ export default {
this.open = false;
this.reset();
},
//
cancelAttached() {
//
cancelAttachedView() {
this.openAttachedView = false;
this.reset();
},
//
cancelOpenAttached() {
this.openAttached = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
iei: null,
manStandar: null,
productId: null,
productCode: null,
productDescZh: null,
@ -704,7 +754,7 @@ export default {
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.productId);
this.productCodes = selection.map(item => item.productCode)
this.productCodes = selection.map((item) => item.productCode);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@ -724,16 +774,18 @@ export default {
this.title = "修改产品信息";
});
},
//
handleView(row) {
this.reset();
const productId = row.productId || this.ids;
getProduct(productId).then((response) => {
this.form = response.data;
this.openAttached = true;
this.openAttachedView = true;
this.title = "查看产品信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
@ -754,6 +806,49 @@ export default {
}
});
},
/** 修改按钮操作 */
handleUpdateAttached(row) {
this.reset();
const productId = row.productId || this.ids;
getProduct(productId).then((response) => {
this.form.id = response.data.id;
this.form.iei = response.data.iei;
this.form.manStandar = response.data.manStandar;
this.form.productCode = response.data.productCode.slice(7,18);
console.log(this.form.productCode);
this.openAttached = true;
if(this.form.id == null){
this.title = "新增产品附属信息";
}else{
this.title = "修改产品附属信息";
}
});
},
/** 提交按钮 */
submitAttachedForm() {
this.$refs["form"].validate((valid) => {
console.log(this.form);
if (valid) {
if (this.form.id != null) {
console.log(this.form);
updateProductAttached(this.form).then((response) => {
this.$modal.msgSuccess("修改产品附属信息成功");
this.openAttached = false;
this.getList();
});
}else {
addProductAttached(this.form).then((response) => {
this.$modal.msgSuccess("新增产品附属信息成功");
this.openAttached = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const productIds = row.productId || this.ids;
@ -781,10 +876,10 @@ export default {
);
},
/**选择产品进行工艺同步**/
handleSyncProductSAP(){
handleSyncProductSAP() {
const productCodes = this.productCodes;
return syncProductSAP(productCodes);
}
},
},
};
</script>

@ -177,29 +177,29 @@
<el-table-column label="库位编码" align="center" prop="wlCode" />
<el-table-column label="托盘号" align="center" prop="sn" />
<el-table-column label="箱数" align="center" prop="number" />
<el-table-column label="预留字段1" align="center" prop="userDefined1" />
<el-table-column label="预留字段2" align="center" prop="userDefined2" />
<el-table-column label="预留字段3" align="center" prop="userDefined3" />
<el-table-column label="预留字段4" align="center" prop="userDefined4" />
<el-table-column label="预留字段5" align="center" prop="userDefined5" />
<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)"
v-hasPermi="['wms:productputrecords:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['wms:productputrecords:remove']"
>删除</el-button>
</template>
</el-table-column>
<el-table-column label="预留字段1" align="center" prop="userDefined1" v-if="false" />
<el-table-column label="预留字段2" align="center" prop="userDefined2" v-if="false" />
<el-table-column label="预留字段3" align="center" prop="userDefined3" v-if="false" />
<el-table-column label="预留字段4" align="center" prop="userDefined4" v-if="false" />
<el-table-column label="预留字段5" align="center" prop="userDefined5" v-if="false" />
<!-- <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)"-->
<!-- v-hasPermi="['wms:productputrecords:edit']"-->
<!-- >修改</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['wms:productputrecords:remove']"-->
<!-- >删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination

@ -292,26 +292,26 @@
<!-- <el-table-column label="预留字段8" align="center" prop="attr8"/>-->
<!-- <el-table-column label="预留字段9" align="center" prop="attr9"/>-->
<!-- <el-table-column label="预留字段10" align="center" prop="attr10"/>-->
<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)"
v-hasPermi="['wms:ruturn:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['wms:ruturn:remove']"
>删除
</el-button>
</template>
</el-table-column>
<!-- <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)"-->
<!-- v-hasPermi="['wms:ruturn:edit']"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['wms:ruturn:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination

@ -123,26 +123,26 @@
<el-table-column label="预留字段9" align="center" prop="attr9"v-if="false" />
<el-table-column label="预留字段10" align="center" prop="attr10"v-if="false" />
<el-table-column label="备注" align="center" prop="remark"/>
<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)"
v-hasPermi="['wms:sellout:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['wms:sellout:remove']"
>删除
</el-button>
</template>
</el-table-column>
<!-- <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)"-->
<!-- v-hasPermi="['wms:sellout:edit']"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['wms:sellout:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination

Loading…
Cancel
Save