Browse Source

0412 新看板

master
ruanqi 3 years ago
parent
commit
2518b6dd4b
  1. 2
      src/api/board.js
  2. 5
      src/api/production.js
  3. 2
      src/router/index.js
  4. 209
      src/views/modules/board/SORoutingBoardForShuiZhu.vue
  5. 215
      src/views/modules/board/SeqNoForLiuHua.vue
  6. 1
      src/views/modules/production/closeSchedule.vue
  7. 42
      src/views/modules/production/generateReport.vue
  8. 4
      src/views/modules/production/operator.vue
  9. 5
      src/views/modules/production/scheduleForSOTask.vue
  10. 5
      src/views/modules/production/scheduleForShopOrder.vue
  11. 1
      src/views/modules/production/soscheduleRouting.vue
  12. 175
      src/views/modules/sys/user.vue

2
src/api/board.js

@ -19,3 +19,5 @@ export const SORoutingBoardForBaoZhuang= data => createAPI(`board/SORoutingBoard
export const PODetailForW= data => createAPI(`board/PODetailForW`,'post',data)
export const transFerBoardForHunlian= data => createAPI(`board/transFerBoardForHunlian`,'post',data)
export const getSiteData= data => createAPI(`board/getSiteData`,'post',data)
export const SORoutingBoardForShuiZhu= data => createAPI(`board/SORoutingBoardForShuiZhu`,'post',data)
export const SeqNoForLiuHua= data => createAPI(`board/SeqNoForLiuHua`,'post',data)

5
src/api/production.js

@ -59,3 +59,8 @@ export const cancelTask=data => createAPI(`dailyPlan/cancelTask`, 'post', data);
export const reportTask=data => createAPI(`dailyPlan/reportTask`, 'post', data);
export const cancelReportTask=data => createAPI(`dailyPlan/cancelReportTask`, 'post', data);
export const getAllWorkCenterDataForUser=data => createAPI(`dailyPlan/getAllWorkCenterDataForUser`, 'post', data);
export const getWorkCenterUserData=data => createAPI(`dailyPlan/getWorkCenterUserData`, 'post', data);
export const addUserSkill=data => createAPI(`dailyPlan/addUserSkill`, 'post', data);
export const deleteUserSkill=data => createAPI(`dailyPlan/deleteUserSkill`, 'post', data);

2
src/router/index.js

@ -38,6 +38,8 @@ const globalRoutes = [
{ path: '/transFerBoardForHunlian', component: _import('modules/board/transFerBoardForHunlian'), name: 'transFerBoardForHunlian', meta: { title: '混炼待入库看板' } },
{ path: '/SORoutingBoardForBaoZhuang', component: _import('modules/board/SORoutingBoardForBaoZhuang'), name: 'SORoutingBoardForBaoZhuang', meta: { title: '包装工序看板' } },
{ path: '/test', component: _import('modules/board/test'), name: 'test', meta: { title: 'test' } },
{ path: '/SeqNoForLiuHua', component: _import('modules/board/SeqNoForLiuHua'), name: 'SeqNoForLiuHua', meta: { title: '生产派工单看板' } },
{ path: '/SORoutingBoardForShuiZhu', component: _import('modules/board/SORoutingBoardForShuiZhu'), name: 'SORoutingBoardForShuiZhu', meta: { title: '水煮烘烤工序看板' } },
]

209
src/views/modules/board/SORoutingBoardForShuiZhu.vue

@ -0,0 +1,209 @@
<template>
<div class="mod-config">
<div style="text-align: center">
<h1>水煮烘烤工序看板</h1>
</div>
<div class="board2">
<!-- @mouseenter.native="mouseEnter"-->
<!-- @mouseleave.native="mouseLeave"-->
<el-table
cell-style="cc"
:height="height"
:data="tableData"
ref="wt_table"
border
:row-class-name="tableRowClassName"
style="width: 100%;">
<el-table-column
prop="site"
header-align="center"
align="left"
min-width="25"
style="font-size: 20px"
label="工厂">
</el-table-column>
<el-table-column
prop="orderNo"
header-align="center"
align="left"
min-width="50"
style="font-size: 20px"
label="生产订单号">
</el-table-column>
<el-table-column
prop="itemNo"
header-align="center"
align="left"
min-width="30"
style="font-size: 20px"
label="工序编号">
</el-table-column>
<el-table-column
prop="operationDesc"
header-align="center"
align="left"
min-width="80"
label="工序名称">
</el-table-column>
<el-table-column
prop="partNo"
header-align="center"
align="left"
min-width="50"
label="产品编号">
</el-table-column>
<el-table-column
prop="partDesc"
header-align="center"
align="left"
min-width="100"
label="产品名称">
</el-table-column>
<el-table-column
prop="qtyRequired"
header-align="center"
align="right"
min-width="30"
label="需求数量">
</el-table-column>
<el-table-column
prop="qtyReported"
header-align="center"
align="right"
min-width="30"
label="报工数量">
</el-table-column>
<el-table-column
prop="qtyApprove"
header-align="center"
align="right"
min-width="30"
label="合格数量">
</el-table-column>
<el-table-column
prop="lastApproveQty"
header-align="center"
align="right"
min-width="40"
label="上工序完成数量">
</el-table-column>
<el-table-column
prop="planFinishTime"
header-align="center"
align="left"
min-width="50"
label="要求完成日期">
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
let rollstop = ''
let rolltimer = ''//
let refresher = '' //
import {
SORoutingBoardForShuiZhu,
} from '@/api/board.js'
export default {
name: 'SORoutingBoardForShuiZhu',
data () {
return {
pageIndex: 1,
totalPage: 1,
height: 200,
tableData: [],
//
// refreshTime: 5,
// rollTime: 5,
// rollPx: 1,
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 80
})
// this.autoRoll()
},
methods: {
tableRowClassName ({row, rowIndex}) {
},
search () {
let inData= {number:this.pageIndex};
SORoutingBoardForShuiZhu(inData).then(({data}) => {
this.tableData = data.rows;
this.totalPage= data.maxPage;
if(this.pageIndex+1>data.maxPage){
this.pageIndex=1
}else {
this.pageIndex=this.pageIndex+1
}
})
},
//
// mouseEnter (time) {
// //
// this.autoRoll(true)
// },
//
// mouseLeave () {
// //
// this.autoRoll()
// },
//
// autoRoll (stop) {
// if (stop) {
// clearInterval(rolltimer)
// return
// }
// // DOM
// const table = this.$refs.wt_table
// // div
// const divData = table.bodyWrapper
// //
// rolltimer = setInterval(() => {
// //
// divData.scrollTop = this.decimalUtil.add(Number(divData.scrollTop), Number(this.rollPx))
// // (+=)
// if (divData.clientHeight + divData.scrollTop +1>= divData.scrollHeight) {
// // table
// divData.scrollTop = 0
// }
// }, this.rollTime * 10)
// },
refreshTable () {
refresher = setInterval(() => {
this.search()
}, 30000)
}
},
created () {
this.search()
this.refreshTable()
}
}
</script>
<style >
.board2 .el-table .cell {
line-height: 13px;
font-size: 12px;
height: 13px;
padding: 0px;
}
.board2 .el-table .success-row {
background: #1bb61b;
}
.board2 .el-table .false-row {
/*background: #cbcb14;*/
background: #db1212;
}
.board2 .el-table .yellow-row{
background: #ffff00;
}
</style>

215
src/views/modules/board/SeqNoForLiuHua.vue

@ -0,0 +1,215 @@
<template>
<div class="mod-config">
<div style="text-align: center">
<h1>生产派工单看板</h1>
</div>
<div class="board2">
<!-- @mouseenter.native="mouseEnter"-->
<!-- @mouseleave.native="mouseLeave"-->
<el-table
cell-style="cc"
:height="height"
:data="tableData"
ref="wt_table"
border
:row-class-name="tableRowClassName"
style="width: 100%;">
<el-table-column
prop="site"
header-align="center"
align="left"
min-width="25"
style="font-size: 20px"
label="工厂">
</el-table-column>
<el-table-column
prop="seqNo"
header-align="center"
align="left"
min-width="25"
style="font-size: 20px"
label="派工单号">
</el-table-column>
<el-table-column
prop="orderNo"
header-align="center"
align="left"
min-width="50"
style="font-size: 20px"
label="生产订单号">
</el-table-column>
<el-table-column
prop="partNo"
header-align="center"
align="left"
min-width="50"
label="产品编号">
</el-table-column>
<el-table-column
prop="partDesc"
header-align="center"
align="left"
min-width="100"
label="产品名称">
</el-table-column>
<el-table-column
prop="qtyRequired"
header-align="center"
align="right"
min-width="30"
label="需求数量">
</el-table-column>
<el-table-column
prop="qtyReported"
header-align="center"
align="right"
min-width="30"
label="报工数量">
</el-table-column>
<el-table-column
prop="qtyApprove"
header-align="center"
align="right"
min-width="30"
label="合格数量">
</el-table-column>
<el-table-column
prop="planStartTime"
header-align="center"
align="left"
min-width="50"
label="生产日期">
</el-table-column>
<el-table-column
prop="operatorDesc"
header-align="center"
align="left"
min-width="25"
label="操作员">
</el-table-column>
<el-table-column
prop="shiftNo"
header-align="center"
align="left"
min-width="25"
label="班次">
</el-table-column>
<el-table-column
prop="resourceId"
header-align="center"
align="left"
min-width="25"
label="机台">
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
let rollstop = ''
let rolltimer = ''//
let refresher = '' //
import {
SeqNoForLiuHua } from '@/api/board.js'
export default {
name: 'SeqNoForLiuHua',
data () {
return {
pageIndex: 1,
totalPage: 1,
height: 200,
tableData: [],
//
// refreshTime: 5,
// rollTime: 5,
// rollPx: 1,
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 80
})
// this.autoRoll()
},
methods: {
tableRowClassName ({row, rowIndex}) {
},
search () {
let inData= {number:this.pageIndex};
SeqNoForLiuHua(inData).then(({data}) => {
this.tableData = data.rows;
this.totalPage= data.maxPage;
if(this.pageIndex+1>data.maxPage){
this.pageIndex=1
}else {
this.pageIndex=this.pageIndex+1
}
})
},
//
// mouseEnter (time) {
// //
// this.autoRoll(true)
// },
//
// mouseLeave () {
// //
// this.autoRoll()
// },
//
// autoRoll (stop) {
// if (stop) {
// clearInterval(rolltimer)
// return
// }
// // DOM
// const table = this.$refs.wt_table
// // div
// const divData = table.bodyWrapper
// //
// rolltimer = setInterval(() => {
// //
// divData.scrollTop = this.decimalUtil.add(Number(divData.scrollTop), Number(this.rollPx))
// // (+=)
// if (divData.clientHeight + divData.scrollTop +1>= divData.scrollHeight) {
// // table
// divData.scrollTop = 0
// }
// }, this.rollTime * 10)
// },
refreshTable () {
refresher = setInterval(() => {
this.search()
}, 30000)
}
},
created () {
this.search()
this.refreshTable()
}
}
</script>
<style >
.board2 .el-table .cell {
line-height: 13px;
font-size: 12px;
height: 13px;
padding: 0px;
}
.board2 .el-table .success-row {
background: #1bb61b;
}
.board2 .el-table .false-row {
/*background: #cbcb14;*/
background: #db1212;
}
.board2 .el-table .yellow-row{
background: #ffff00;
}
</style>

1
src/views/modules/production/closeSchedule.vue

@ -436,6 +436,7 @@
sResourceID:'',
sShiftNo:'',
closedFlag:'',
userId:this.$store.state.user.name
},
photoUrl:'',
sopData:{

42
src/views/modules/production/generateReport.vue

@ -360,16 +360,22 @@
<el-form-item label="单位重量">
<el-input style="width: 130px;" disabled v-model="qty3"></el-input>
</el-form-item>
<el-form-item label="派工单数量">
<el-input style="width: 130px;" disabled v-model="saveHeaderData.qtyRequire"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top">
<el-form-item label="合格数量">
<el-input type="number" style="width: 178px;" class="input_reight" v-model="saveHeaderData.qtyApprove" @blur="qtyApproveBlur()"></el-input>
</el-form-item>
<el-form-item label="不合格数量">
<el-form-item label="不合格数量" >
<el-input type="number" class="input_left" style="width: 178px;" v-model="saveHeaderData.qtyUnApprove" @blur="qtyReportedBlur()"></el-input>
</el-form-item>
<el-form-item label="返工数量">
<el-input type="number" style="width: 178px;" v-model="saveHeaderData.qtyRework" @blur="qtyReworkBlur()"></el-input>
<!-- <el-form-item label="返工数量" >-->
<!-- <el-input type="number" style="width: 178px;" v-model="saveHeaderData.qtyRework" @blur="qtyReworkBlur()"></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="硫化模数" >
<el-input type="number" class="input_left" style="width: 178px;" v-model="moQty" @blur="moQtyBlur()"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top">
@ -379,9 +385,12 @@
<el-form-item label="不合格重量(KG)">
<el-input type="number" class="input_left" style="width: 178px;" :disabled="factorFlag" v-model="KGReported" @blur="KGReportedBlur()"></el-input>
</el-form-item>
<el-form-item label="返工重量(KG)">
<el-input type="number" style="width: 178px;" v-model="KGRework" :disabled="factorFlag" @blur="KGReworkBlur()"></el-input>
<el-form-item label="模具孔数">
<el-input type="number" class="input_left" style="width: 178px;" disabled v-model="cavity" ></el-input>
</el-form-item>
<!-- <el-form-item label="返工重量(KG)" >-->
<!-- <el-input type="number" style="width: 178px;" v-model="KGRework" :disabled="factorFlag" @blur="KGReworkBlur()"></el-input>-->
<!-- </el-form-item>-->
</el-form>
<fieldset class="customer-fieldset" style="width: 597px;margin-left: -10px;">
<legend class="customer-legend">不良品分析</legend>
@ -500,6 +509,8 @@
},
data () {
return {
moQty:'',
cavity:'',
setUp: {
reviewFlag: false,
saveButton: false,
@ -511,6 +522,7 @@
KGApprove:'',
KGRework:'',
saveHeaderData: {
qtyRequire:'',
qtyUnApprove:'',
site: '',
seqNo: '',
@ -578,6 +590,7 @@
tableData: [],
date1: '',
searchData: {
userId:this.$store.state.user.name,
orderNo: '',
sWorkCenterNo: '',
partNo: '',
@ -908,12 +921,13 @@
return false;
}
let inData={
userId:this.$store.state.user.name,
seqNo:this.scanSeqNo
}
searchSeqNo(inData).then(({data}) => {
if (data.code == 0) {
if(data.row==null){
this.scanSeqNo=''
this.$alert("派工单不存在!",'错误', {
confirmButtonText: '确定'
})
@ -921,6 +935,7 @@
}
let currentData = data.row;
if(currentData.closedFlag=='Y'){
this.scanSeqNo=''
this.$alert("该派工单已关闭!",'错误', {
confirmButtonText: '确定'
})
@ -945,6 +960,7 @@
this.saveHeaderData.scheduleType=currentData.scheduleType;
this.saveHeaderData.operatorId=currentData.operatorId;
this.saveHeaderData.operatorName=currentData.operatorName;
this.saveHeaderData.qtyRequire=currentData.qtyRequired;
this.saveHeaderData.userId=this.$store.state.user.name;
this.qty1='';
this.qty2 ='';
@ -952,6 +968,7 @@
this.saveHeaderData.planFinishTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00')
searchReportedQty(this.saveHeaderData).then(({data}) => {
if(data.code===0) {
this.cavity= data.row.cavity
this.qty1 = data.row.qtyReported;
this.qty2 = data.row.lastApproveQty;
this.saveHeaderData.manufacturingTime = data.row.timeReported;
@ -977,6 +994,7 @@
this.setUp.reviewFlag = true;
this.setUp.disabled = true;
} else {
this.scanSeqNo=''
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
@ -994,6 +1012,7 @@
qtyApproveBlur(){
if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.saveHeaderData.qtyApprove!=''){
this.KGApprove=(this.saveHeaderData.qtyApprove*this.qty3).toFixed(1)
this.moQty=''
}
if(this.saveHeaderData.qtyApprove==''){
this.KGApprove=''
@ -1018,6 +1037,7 @@
KGApproveBlur(){
if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.KGApprove!=''){
this.saveHeaderData.qtyApprove=(this.KGApprove/this.qty3).toFixed(1)
this.moQty=''
}
if(this.KGApprove==''){
this.saveHeaderData.qtyApprove=''
@ -1034,7 +1054,8 @@
startSeqNo(){
let inData={
username:this.$store.state.user.name,
seqNo:this.scanSeqNo
seqNo:this.scanSeqNo,
}
startSeqNo(inData).then(({data}) => {
if (data && data.code === 0) {
@ -1048,6 +1069,7 @@
}
})
} else {
this.scanSeqNo='';
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
@ -1071,6 +1093,7 @@
}
})
} else {
this.scanSeqNo='';
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
@ -1094,12 +1117,17 @@
}
})
} else {
this.scanSeqNo='';
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
moQtyBlur(){
this.saveHeaderData.qtyApprove=Number(this.cavity*this.moQty).toFixed(1);
this.KGApprove='';
}
},
created () {
}

4
src/views/modules/production/operator.vue

@ -97,8 +97,8 @@
<el-dialog title="技能矩阵" :close-on-click-modal="false" v-drag :visible.sync="skillFlag" width="800px">
<div style="font-size: 12px">
操作员编码<el-input v-model="operatorData.operatorID" style="width: 120px"></el-input>
操作员姓名<el-input v-model="operatorData.operatorName" style="width: 120px"></el-input>
操作员编码<el-input v-model="operatorData.operatorID" readonly style="width: 120px"></el-input>
操作员姓名<el-input v-model="operatorData.operatorName" readonly style="width: 120px"></el-input>
</div>
<el-container style="margin-top: -12px;">
<el-main style="width: 300px">

5
src/views/modules/production/scheduleForSOTask.vue

@ -279,7 +279,7 @@
<el-form-item label="派工机台:">
<el-select v-model="schedulingModalData.resourceId" style="width: 120px"
placeholder="请选择">
<el-option v-for="item in availableResourceList " :key="index" :label="item.ResouceDesc"
<el-option v-for="item in availableResourceList " :key="index" :label="item.ResourceID+'-'+item.ResouceDesc"
:value="item.ResourceID">
</el-option>
@ -365,7 +365,7 @@
<template slot-scope="scope">
<el-select v-model="scope.row.resourceId" placeholder="请选择" style="height: 12px;padding: 0px " filterable
allow-create>
<el-option v-for="item in availableResourceList " :key="index" :label="item.ResouceDesc"
<el-option v-for="item in availableResourceList " :key="index" :label="item.ResourceID+'-'+item.ResouceDesc"
:value="item.ResourceID">
</el-option>
@ -475,6 +475,7 @@
planStatus: 'a.OrderQty>isnull(SL.scheduledQty,0)',
itemNo:'',
finishFlag:'',
userId:this.$store.state.user.name,
},
weightFactorFlag:false,
schedulingModalData: {

5
src/views/modules/production/scheduleForShopOrder.vue

@ -332,7 +332,7 @@
<el-option
v-for="(item,index) in availableResourceList"
:key="index"
:label="item.ResouceDesc"
:label="item.ResourceID+'-'+item.ResouceDesc"
:value="item.ResourceID"
>
</el-option>
@ -418,7 +418,7 @@
<template slot-scope="scope">
<el-select v-model="scope.row.resourceId" placeholder="请选择" style="height: 12px;padding: 0px " filterable
allow-create>
<el-option v-for="item in availableResourceList " :key="index" :label="item.ResouceDesc"
<el-option v-for="item in availableResourceList " :key="index" :label="item.ResourceID+'-'+item.ResouceDesc"
:value="item.ResourceID">
</el-option>
</el-select>
@ -536,6 +536,7 @@
site: this.$store.state.user.site,
planStatus: 'ROUND(a.LotSize,3) >ROUND(ISNULL(SL.scheduledQty,0),3)',
itemNo:'',
userId:this.$store.state.user.name,
},
weightFactorFlag:false,
schedulingModalData: {

1
src/views/modules/production/soscheduleRouting.vue

@ -349,6 +349,7 @@
tableData: [],
date1: '',
searchData: {
userId:this.$store.state.user.name,
orderNo: '',
sWorkCenterNo: '',
partNo: '',

175
src/views/modules/sys/user.vue

@ -70,6 +70,7 @@
<!-- <a v-if="isAuth('sys:user:update')&&scope.row.status==0 " type="text" size="small" @click="updateHandle(scope.row.userId,1)">启用</a>-->
<a v-if="isAuth('sys:user:delete')" type="text" size="small" @click="deleteHandle(scope.row.userId)">删除</a>
</span>
<a v-if="isAuth('sys:user:delete')" type="text" size="small" @click="skillMatrix(scope.row)">加工中心</a>
</template>
</el-table-column>
</el-table>
@ -84,11 +85,102 @@
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
<el-dialog title="加工中心" :close-on-click-modal="false" v-drag :visible.sync="skillFlag" width="800px">
<div style="font-size: 12px">
账号<el-input v-model="userData.userId" readonly style="width: 120px"></el-input>
</div>
<el-container style="margin-top: -12px;">
<el-main style="width: 300px">
<span style="font-size: 12px" >可选加工中心</span>
<el-table
height="300px"
:data="skillList1"
border
@row-click="clickSkill1"
highlight-current-row
v-loading="dataListLoading"
style="width: 100%">
<el-table-column
prop="site"
header-align="center"
align="left"
min-width="20"
label="工厂">
</el-table-column>
<el-table-column
prop="workCenterNo"
header-align="center"
align="left"
min-width="40"
label="加工中心编码">
</el-table-column>
<el-table-column
prop="workCenterDesc"
header-align="center"
align="left"
min-width="60"
label="加工中心名称">
</el-table-column>
</el-table>
</el-main>
<el-main style="width: 100px">
<div style="margin-top: 100px">
<el-button type="primary" @click="addSkill()">添加>></el-button>
</div>
<div style="margin-top: 20px">
<el-button type="primary" @click="deleteSkill()">删除<<</el-button>
</div>
</el-main>
<el-main style="width: 300px">
<span style="font-size: 12px" >已选加工中心</span>
<el-table
height="300px"
:data="skillList2"
border
@row-click="clickSkill2"
highlight-current-row
v-loading="dataListLoading"
style="width: 100%">
<el-table-column
prop="site"
header-align="center"
align="left"
min-width="20"
label="工厂">
</el-table-column>
<el-table-column
prop="workCenterNo"
header-align="center"
align="left"
min-width="40"
label="加工中心编码">
</el-table-column>
<el-table-column
prop="workCenterDesc"
header-align="center"
align="left"
min-width="60"
label="加工中心名称">
</el-table-column>
</el-table>
</el-main>
</el-container>
<!-- <el-footer style="height:40px;margin-top: 20px;text-align:center">-->
<!-- <el-button type="primary" @click="routingModelFlag = false">关闭</el-button>-->
<!-- </el-footer>-->
</el-dialog>
</div>
</template>
<script>
import AddOrUpdate from './user-add-or-update'
import {
getAllWorkCenterDataForUser,
getWorkCenterUserData,
addUserSkill,
deleteUserSkill
} from "@/api/production.js"
export default {
data () {
return {
@ -101,7 +193,15 @@
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
addOrUpdateVisible: false
addOrUpdateVisible: false,
userData:{
userId:'',
},
skillFlag:false,
skillList1:[],
skillList2:[],
skillRow1:null,
skillRow2:null,
}
},
components: {
@ -216,7 +316,78 @@
}
})
}).catch(() => {})
}
},
clickSkill1(row){
this.skillRow1 = JSON.parse(JSON.stringify(row));
},
clickSkill2(row){
this.skillRow2 = JSON.parse(JSON.stringify(row));
},
skillMatrix(row){
let inData={
user:row.username,
}
this.userData.userId=row.username;
getAllWorkCenterDataForUser(inData).then(({data}) => {
this.skillList1 = data.rows;
})
getWorkCenterUserData(inData).then(({data}) => {
this.skillList2 = data.rows;
})
this.skillFlag=true;
},
addSkill(){
if(this.skillRow1==null){
this.$alert("请选择可选加工中心技能!", '错误', {
confirmButtonText: '确定'
})
return false;
}
let inSkillData={
site:this.skillRow1.site,
userId:this.userData.userId,
workCenterNo:this.skillRow1.workCenterNo,
user:this.$store.state.user.name,
}
addUserSkill(inSkillData).then(({data}) => {
let inData={
user:this.userData.userId,
}
getAllWorkCenterDataForUser(inData).then(({data}) => {
this.skillList1 = data.rows;
})
getWorkCenterUserData(inData).then(({data}) => {
this.skillList2 = data.rows;
})
this.skillRow1=null;
})
},
deleteSkill(){
if(this.skillRow2==null){
this.$alert("请选择已选加工中心技能!", '错误', {
confirmButtonText: '确定'
})
return false;
}
let inSkillData={
site:this.skillRow2.site,
userId:this.userData.userId,
workCenterNo:this.skillRow2.workCenterNo,
}
deleteUserSkill(inSkillData).then(({data}) => {
let inData={
user:this.userData.userId,
}
getAllWorkCenterDataForUser(inData).then(({data}) => {
this.skillList1 = data.rows;
})
getWorkCenterUserData(inData).then(({data}) => {
this.skillList2 = data.rows;
})
this.skillRow2=null;
})
},
}
}
</script>
Loading…
Cancel
Save