Merge remote-tracking branch 'origin/master'

master
Yangwl 3 months ago
commit addaaf0452

@ -96,4 +96,10 @@ export function getBomList(query) {
}); });
} }
// 删除生产报工物料消耗
export function deleteConsume(workorderCode) {
return request({
url: '/mes/reportWorkConsume/deleteConsume/' + workorderCode,
method: 'delete'
});
}

@ -85,3 +85,18 @@ export function delFile(id) {
method: 'delete' method: 'delete'
}); });
} }
// 查询检验节点维护详细
export function listBelongToStandars() {
return request({
url: '/quality/checkType/listBelongToStandars',
method: 'get'
});
}
// 查询检验节点维护详细
export function listBelongToLines() {
return request({
url: '/quality/checkType/listBelongToLines',
method: 'get'
});
}

@ -91,3 +91,12 @@ export function deleteByMaterialCode(data) {
data: data data: data
}); });
} }
// 修改用户物料关联
export function updateBelongTo(data) {
return request({
url: '/quality/material/updateBelongTo',
method: 'put',
data: data
});
}

@ -22,13 +22,14 @@
<!-- <option :key="index" :value="x.seriesName" v-for="(x, index) in ceshib">{{ x.seriesName }}</option> --> <!-- <option :key="index" :value="x.seriesName" v-for="(x, index) in ceshib">{{ x.seriesName }}</option> -->
</select> </select>
</div> </div>
<!--
<div class="selectborder selectborder1"> <div class="selectborder selectborder1">
<select v-model="selectxtclasses" class="select1" @change="selectline2(selectxtclasses)"> <select v-model="selectxtclasses" class="select1" @change="selectline2(selectxtclasses)">
<option :key="index" :value="x.ymdType" v-for="(x, index) in dictDatatype"> <option :key="index" :value="x.ymdType" v-for="(x, index) in dictDatatype">
{{ x.ymdTypeName }} {{ x.ymdTypeName }}
</option> </option>
</select> </select>
</div> </div>-->
</div> </div>
<div class="timebox"> <div class="timebox">
<div class="time"> <div class="time">
@ -41,6 +42,26 @@
<div class="item-table item-table1"> <div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;"> <div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">订单异常信息</div> <div class="titlename">订单异常信息</div>
<el-date-picker
style="
position: absolute;
margin-left: 10px;
background-color: rgb(20, 41, 69);
color: rgb(255, 255, 255);
left: 370px;
width: 250px;
top: 68px;
font-size: 5px;
"
v-model="ymdArray1"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
value-format="yyyy-MM-dd"
end-placeholder="结束日期"
@change="getdatalist"
>
</el-date-picker>
</div> </div>
<div class="table-tbody"> <div class="table-tbody">
<div class="item"> <div class="item">
@ -96,6 +117,27 @@
<div class="item-table item-table1"> <div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;"> <div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">异常原因分布</div> <div class="titlename">异常原因分布</div>
<!--
<el-date-picker
style="
position: absolute;
margin-left: 10px;
background-color: rgb(20, 41, 69);
color: rgb(255, 255, 255);
right: 688px;
width: 227px;
top: 165px;
font-size: 5px;
"
v-model="ymdArray2"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
value-format="yyyy-MM-dd"
end-placeholder="结束日期"
@change="noOkTimeChange"
>
</el-date-picker>-->
</div> </div>
<div id="echart2" style="margin: auto; width: 610px; height:296.4px;"></div> <div id="echart2" style="margin: auto; width: 610px; height:296.4px;"></div>
</div> </div>
@ -115,42 +157,70 @@
<div class="item-table item-table1"> <div class="item-table item-table1">
<div class="titlebox2" style="margin-bottom: 14px;"> <div class="titlebox2" style="margin-bottom: 14px;">
<div class="titlename">订单异常明细</div> <div class="titlename">订单异常明细</div>
<!--<el-date-picker
style="
position: absolute;
margin-left: 10px;
background-color: rgb(20, 41, 69);
color: rgb(255, 255, 255);
right: 680px;
width: 227px;
top: 600px;
font-size: 5px;
"
v-model="ymdArray4"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
value-format="yyyy-MM-dd"
end-placeholder="结束日期"
@change="noOkRadioTimeChange"
>
</el-date-picker>-->
</div> </div>
<table class="table-thead" border="0" cellpadding="0" cellspacing="0"> <table class="table-thead" border="0" cellpadding="0" cellspacing="0">
<thead> <thead>
<tr style="height: 44px;"> <tr style="height: 44px;">
<td style="width: 8%;">序号</td> <td style="width: 8%;">序号</td>
<!-- <td style="width: 8%;">异常单号</td> --> <!-- <td style="width: 8%;">异常单号</td> -->
<td style="width: 8%;">物料名称</td> <td style="width: 12%;">物料名称</td>
<td style="width: 8%;">订单号</td> <td style="width: 11%;">订单号</td>
<td style="width: 8%;">来料时间</td> <td style="width: 8%;">来料时间</td>
<td style="width: 8%;">质检确认时间</td> <td style="width: 8%;">质检确认时间</td>
<td style="width: 8%;">质检数量</td> <td style="width: 8%;">质检数量</td>
<td style="width: 6%;">质检单位</td>
<td style="width: 8%;">检验人</td> <td style="width: 8%;">检验人</td>
<td style="width: 8%;">质检不合格</td> <td style="width: 7%;">质检不合格</td>
<td style="width: 8%;">不良描述</td>
<td style="width: 7%;">不良类型</td>
<td style="width: 8%;">不良数量</td>
</tr> </tr>
</thead> </thead>
</table> </table>
<div class="table-tbody"> <div class="table-tbody">
<!-- <vue-seamless-scroll :data="getlistcx" :class-option="classOption" class="wrapscroll"> --> <vue-seamless-scroll :data="getlistcx" :class-option="classOption" class="wrapscroll">
<table border="0" cellpadding="0" cellspacing="0"> <table border="0" cellpadding="0" cellspacing="0">
<tbody> <tbody>
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index" <tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
v-for="(n, index) in orderdetail"> v-for="(n, index) in orderdetail">
<td style="width: 8%;">{{ index + 1 }}</td> <td style="width: 8%;">{{ index + 1 }}</td>
<!-- <td style="width: 8%;">{{ n.orderNo }}</td> --> <!-- <td style="width: 8%;">{{ n.orderNo }}</td> -->
<td style="width: 8%;">{{ n.materialName }}</td> <td style="width: 12%;">{{ n.materialName }}</td>
<td style="width: 8%;">{{ n.orderNo }}</td> <td style="width: 11%;">{{ n.orderNo }}</td>
<td style="width: 8%;">{{ n.checkTime }}</td>
<td style="width: 8%;">{{ n.incomeTime }}</td> <td style="width: 8%;">{{ n.incomeTime }}</td>
<td style="width: 8%;">{{ n.checkTime }}</td>
<td style="width: 8%;">{{ n.quality }}</td> <td style="width: 8%;">{{ n.quality }}</td>
<td style="width: 6%;">{{ n.unit }}</td>
<td style="width: 8%;">{{ n.checkManName }}</td> <td style="width: 8%;">{{ n.checkManName }}</td>
<td style="width: 8%;">{{ n.checkResult }}</td> <td style="width: 7%;">{{ n.checkResult }}</td>
<td style="width: 8%;">{{ n.className }}</td>
<td style="width: 7%;">{{ n.defectSubclass }}</td>
<td style="width: 8%;">{{ n.noOkQuality }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<!-- </vue-seamless-scroll> --> </vue-seamless-scroll>
</div> </div>
</div> </div>
@ -244,9 +314,21 @@ export default {
], ],
RefreshTime:null, RefreshTime:null,
dictDatatype:[], dictDatatype:[],
classOption: {
direction: 1,
hoverstop: true,
step: 0.1,
openNatch: true,
limitMoveNum: 7,
},
ymdArray1:[],
ymdStart1: null,
ymdEnd1: null
}; };
}, },
created() { }, created() {
this.getDate();
},
destroyed() { destroyed() {
clearInterval(this.time1); clearInterval(this.time1);
this.time1 = null; this.time1 = null;
@ -260,6 +342,24 @@ export default {
this.gettime(); this.gettime();
}, },
methods: { methods: {
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate(0);
let end = this.Fungetdate(1);
this.ymdArray1.push(start, end);
this.ymdStart1 = moment(this.ymdArray1[0]).format("YYYY-MM-DD");
this.ymdEnd1 = moment(this.ymdArray1[1]).format("YYYY-MM-DD");
},
Fungetdate(num) {
var dd = new Date();
dd.setDate(dd.getDate());
var y = dd.getFullYear();
var m = dd.getMonth() + 1 + num; //
var d = dd.getDate();
return y + "-" + m + "-" + d;
},
back() { back() {
this.$router.push({ path: "/index" }); this.$router.push({ path: "/index" });
}, },
@ -293,6 +393,7 @@ export default {
} }
}); });
}, },
/**
getDictData() { getDictData() {
const _this = this; const _this = this;
getDictData( getDictData(
@ -308,13 +409,17 @@ export default {
_this.getDeviceRefreshTime() _this.getDeviceRefreshTime()
} }
}); });
}, },**/
getdatalist() { getdatalist() {
const _this = this; const _this = this;
this.ymdStart1 = moment(this.ymdArray1[0]).format("YYYY-MM-DD");
this.ymdEnd1 = moment(this.ymdArray1[1]).format("YYYY-MM-DD");
getOverallInfo({ getOverallInfo({
ymdType: _this.selectxtclasses, ymdType: _this.selectxtclasses,
typeCode: 'material', typeCode: 'material',
factoryCode: 'ds_' + _this.selectxt, factoryCode: 'ds_' + _this.selectxt,
productDateStart: this.ymdStart1,
productDateEnd: this.ymdEnd1
}).then((response) => { }).then((response) => {
if (response) { if (response) {
_this.ordermessage = response; _this.ordermessage = response;
@ -324,6 +429,8 @@ export default {
ymdType: _this.selectxtclasses, ymdType: _this.selectxtclasses,
typeCode: 'material', typeCode: 'material',
factoryCode: 'ds_' + _this.selectxt, factoryCode: 'ds_' + _this.selectxt,
productDateStart: this.ymdStart1,
productDateEnd: this.ymdEnd1
}).then((response) => { }).then((response) => {
if (response) { if (response) {
_this.optionDatalist2 = [] _this.optionDatalist2 = []
@ -340,6 +447,8 @@ export default {
ymdType: _this.selectxtclasses, ymdType: _this.selectxtclasses,
typeCode: 'material', typeCode: 'material',
factoryCode: 'ds_' + _this.selectxt, factoryCode: 'ds_' + _this.selectxt,
productDateStart: this.ymdStart1,
productDateEnd: this.ymdEnd1
}).then((response) => { }).then((response) => {
if (response) { if (response) {
_this.optionDatalist3 = [] _this.optionDatalist3 = []
@ -369,11 +478,14 @@ export default {
ymdType: _this.selectxtclasses, ymdType: _this.selectxtclasses,
typeCode: 'material', typeCode: 'material',
factoryCode: 'ds_' + _this.selectxt, factoryCode: 'ds_' + _this.selectxt,
productDateStart: this.ymdStart1,
productDateEnd: this.ymdEnd1
}).then((response) => { }).then((response) => {
if (response) { if (response) {
this.orderdetail = response this.orderdetail = response
this.orderdetail.forEach((item) => { this.orderdetail.forEach((item) => {
item.incomeTime = moment(item.incomeTime).format('YYYY-MM-DD HH:mm:ss') item.incomeTime = moment(item.incomeTime).format('YYYY-MM-DD')
item.checkTime = moment(item.checkTime).format('YYYY-MM-DD HH:mm:ss')
}); });
} }
}); });
@ -1342,22 +1454,22 @@ export default {
} }
.titlebox { .titlebox {
width: 431px; width: 431px;
height: 38px; height: 38px;
background: url("../../../assets/images/bg-title.png") no-repeat; background: url("../../../assets/images/bg-title.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
// text-align: center; // text-align: center;
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
color: #ffffff; color: #ffffff;
line-height: 38px; line-height: 38px;
letter-spacing: 2px; letter-spacing: 2px;
text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5); text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
padding-left: 60px; padding-left: 60px;
// .titlename{ // .titlename{
// position: relative; // position: relative;
// left: 24px; // left: 24px;
// } // }
} }
.titlebox2 { .titlebox2 {
@ -1392,7 +1504,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
width: 350px; width: 300px;
margin-left: 50px; margin-left: 50px;
} }

@ -50,8 +50,9 @@
</tr> </tr>
</thead> </thead>
</table> </table>
<div class="table-tbody"> <div class="table-tbody">
<!-- <vue-seamless-scroll :data="Inspectiondetails" :class-option="classOption" class="wrapscroll"> --> <vue-seamless-scroll :data="Inspectiondetails" :class-option="classOption" class="wrapscroll" :step="0.1">
<table border="0" cellpadding="0" cellspacing="0"> <table border="0" cellpadding="0" cellspacing="0">
<tbody> <tbody>
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index" <tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
@ -69,8 +70,9 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<!-- </vue-seamless-scroll> --> </vue-seamless-scroll>
</div> </div>
</div> </div>
<div class="item-table item-table1"> <div class="item-table item-table1">
<div class="titlebox2" style="margin-bottom: 14px;"> <div class="titlebox2" style="margin-bottom: 14px;">
@ -87,12 +89,13 @@
<td style="width: 10%;">物料名称</td> <td style="width: 10%;">物料名称</td>
<td style="width: 4%;">检验人</td> <td style="width: 4%;">检验人</td>
<td style="width: 8%;">检验时间</td> <td style="width: 8%;">检验时间</td>
<td style="width: 8%;">检验地点</td>
<td style="width: 4%;">检验状态</td> <td style="width: 4%;">检验状态</td>
</tr> </tr>
</thead> </thead>
</table> </table>
<div class="table-tbody"> <div class="table-tbody">
<!-- <vue-seamless-scroll :data="Inspectiondetails" :class-option="classOption" class="wrapscroll"> --> <vue-seamless-scroll :data="Inspectiondetails1" :class-option="classOption" class="wrapscroll" :step="0.1">
<table border="0" cellpadding="0" cellspacing="0"> <table border="0" cellpadding="0" cellspacing="0">
<tbody> <tbody>
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index" <tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
@ -105,12 +108,13 @@
<td style="width: 10%;">{{ n.materialName }}</td> <td style="width: 10%;">{{ n.materialName }}</td>
<td style="width: 4%;">{{ n.checkManName }}</td> <td style="width: 4%;">{{ n.checkManName }}</td>
<td style="width: 8%;">{{ n.checkTime }}</td> <td style="width: 8%;">{{ n.checkTime }}</td>
<td style="width: 8%;">{{ n.checkLoc }}</td>
<td style="width: 4%;" :class="[n.checkStatus == 1 ? 'color1' : 'color2']">{{ <td style="width: 4%;" :class="[n.checkStatus == 1 ? 'color1' : 'color2']">{{
n.checkStatus }}</td> n.checkStatus }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<!-- </vue-seamless-scroll> --> </vue-seamless-scroll>
</div> </div>
</div> </div>
</div> </div>
@ -176,6 +180,13 @@ export default {
equipmentinfo: [], equipmentinfo: [],
RefreshTime: null, RefreshTime: null,
dictDatatype: [], dictDatatype: [],
classOption: {
direction: 1,
hoverstop: true,
step: 0.1,
openNatch: true,
limitMoveNum: 7,
},
}; };
}, },
created() { }, created() { },
@ -251,7 +262,11 @@ export default {
if (response) { if (response) {
this.Inspectiondetails = response this.Inspectiondetails = response
this.Inspectiondetails.forEach((item) => { this.Inspectiondetails.forEach((item) => {
item.incomeTime = moment(item.incomeTime).format('YYYY-MM-DD HH:mm:ss') item.incomeTime = moment(item.incomeTime).format('YYYY-MM-DD HH:mm:ss');
if(item.checkTime!=null){
item.checkTime = moment(item.checkTime).format('YYYY-MM-DD HH:mm:ss')
}
}); });
} }
}); });

@ -518,7 +518,7 @@
</el-tabs> </el-tabs>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="warning" @click="clearConsume" >一键清理</el-button>
<el-button type="primary" @click="cancel" v-if="optType == 'view'"></el-button> <el-button type="primary" @click="cancel" v-if="optType == 'view'"></el-button>
<el-button :disabled="loading" type="primary" @click="submitConsume" v-else> </el-button> <el-button :disabled="loading" type="primary" @click="submitConsume" v-else> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
@ -704,7 +704,7 @@ import {
submitConsumePS, submitConsumePS,
submitReportInfo, submitReportInfo,
getBomList, getBomList,
getAllLevelConsumeList, getAllLevelConsumeList,deleteConsume
} from "@/api/mes/reportWorkConsume"; } from "@/api/mes/reportWorkConsume";
import ReportWorkConsume from "./reportWorkConsume.vue"; import ReportWorkConsume from "./reportWorkConsume.vue";
import ItemSelectUser from "./selectUser.vue"; import ItemSelectUser from "./selectUser.vue";
@ -1434,9 +1434,7 @@ export default {
}); });
this.mergedArray = newPConsumeRows; this.mergedArray = newPConsumeRows;
this.pConsumeRows = newPConsumeRows; this.pConsumeRows = newPConsumeRows;
console.log("过滤后:", this.pConsumeRows);
} }
console.log(this.pConsumeRows, selection, "wwwwww");
}, },
// all(zxl) // all(zxl)
allConsumeSelection(selection, row) { allConsumeSelection(selection, row) {
@ -1490,6 +1488,16 @@ export default {
this.loading = false; // loading this.loading = false; // loading
}); });
}, },
/**清理重复报工损耗**/
clearConsume(){
const workorderCode = this.selectRow[0].workorderCode;
this.$modal.confirm('是否确认清理工单号"' + workorderCode + '"的数据项?').then(function() {
return deleteConsume(workorderCode);
}).then(() => {
this.$modal.msgSuccess("清理成功");
this.cancel();
}).catch(() => {});
},
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download( this.download(

@ -154,34 +154,40 @@
<!-- 用户绑定 --> <!-- 用户绑定 -->
<el-dialog :title="titleUserBind" :visible.sync="openUserBind" width="800px"> <el-dialog :title="titleUserBind" :visible.sync="openUserBind" width="800px">
<el-table v-loading="userloading" :data="userList" ref="userBindTable" > <el-table v-loading="userloading" :data="userList" ref="userBindTable" >
<el-table-column label="序号" align="center" type="index" width="50" /> <el-table-column label="序号" align="center" type="index" width="50" />
<el-table-column label="员工编号" align="center" prop="userCode" /> <el-table-column label="员工编号" align="center" prop="userCode" />
<el-table-column label="姓名" align="center" prop="userName" /> <el-table-column label="姓名" align="center" prop="userName" />
<el-table-column label="来料类别" align="center" prop="attr1" > <el-table-column label="来料类别" align="center" prop="attr1" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:options="dict.type.order_type_ll" :options="dict.type.order_type_ll"
:value="scope.row.attr1" :value="scope.row.attr1"
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" align="center" label="操作" width="100"> <el-table-column label="所属线体/标准" align="center" prop="attr2List" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-select v-model="scope.row.attr2List" placeholder="请选择" clearable @change="selectBelongTo(scope.row)" multiple>
size="small" <el-option
type="danger" v-for="item in belongToOptions"
plain :key="item.typeCode"
@click="deleteUser(scope.row)" :label="item.typeName"
> :value="item.typeCode"
移除</el-button> ></el-option>
</template> </el-select>
</el-table-column> </template>
</el-table> </el-table-column>
<div class="button-container"> <el-table-column fixed="right" align="center" label="操作" width="100">
<el-button size="mini" type="primary" @click="addUser()" >新增员工</el-button> <template slot-scope="scope">
</div> <el-button size="small" type="danger" plain @click="deleteUser(scope.row)"></el-button>
<div slot="footer" class="dialog-footer"> </template>
</el-table-column>
</el-table>
<div class="button-container">
<el-button size="mini" type="primary" @click="addUser()" >新增员工</el-button>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleClose" > </el-button> <el-button type="primary" @click="handleClose" > </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -193,8 +199,10 @@
</template> </template>
<script> <script>
import { listCheckType, getCheckType, delCheckType, addCheckType, updateCheckType } from "@/api/quality/checkType"; import { listCheckType, getCheckType, delCheckType, addCheckType, updateCheckType,
import{ getSelectedUsers, addUserBind, deleteByMaterialCode} from "@/api/quality/userbind"; listBelongToStandars,listBelongToLines
} from "@/api/quality/checkType";
import{ getSelectedUsers, addUserBind, deleteByMaterialCode,updateBelongTo} from "@/api/quality/userbind";
import ItemSelectUser from "./selectUser.vue"; import ItemSelectUser from "./selectUser.vue";
import ItemConfFile from "./confFile.vue"; import ItemConfFile from "./confFile.vue";
export default { export default {
@ -214,19 +222,22 @@ export default {
multiple: true, multiple: true,
// //
showSearch: true, showSearch: true,
openUserBind: false, openUserBind: false,
materialCode: "", materialCode: "",
materialName: "", materialName: "",
attr1: "", attr1: "",
// //
total: 0, total: 0,
// //
checkTypeList: [], checkTypeList: [],
userList: [], userList: [],
userRows: [], userRows: [],
belongToOptions:[],
belongToStandars:[],
belongToLines:[],
// //
title: "", title: "",
titleUserBind: "", titleUserBind: "",
// //
open: false, open: false,
// //
@ -240,7 +251,7 @@ export default {
attr1: null, attr1: null,
factoryCode: null, factoryCode: null,
}, },
getUserParams: { getUserParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
userCode: null, userCode: null,
@ -261,6 +272,8 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.getBelongToLinesList();
this.getBelongToStandars()
}, },
methods: { methods: {
/** 查询检验节点维护列表 */ /** 查询检验节点维护列表 */
@ -272,6 +285,19 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
/** 查询所属线体选择列表 */
getBelongToLinesList() {
listBelongToLines().then(response => {
this.belongToLines = response;
});
},
/** 查询所属标准选择列表 */
getBelongToStandars() {
listBelongToStandars().then(response => {
this.belongToStandars = response;
});
},
// //
cancel() { cancel() {
this.open = false; this.open = false;
@ -363,103 +389,121 @@ export default {
...this.queryParams ...this.queryParams
}, `checkType_${new Date().getTime()}.xlsx`) }, `checkType_${new Date().getTime()}.xlsx`)
}, },
/** 人员绑定按钮操作页面 */ /** 人员绑定按钮操作页面 */
handleBind(row){ handleBind(row){
//this.reset(); //this.reset();
this.userloading = true; this.userloading = true;
//使 //使
this.materialCode = row.orderCode; this.materialCode = row.orderCode;
this.materialName = row.checkName; this.materialName = row.checkName;
this.attr1 = row.attr1; this.attr1 = row.attr1;
this.getUserParams.materialCode = row.orderCode; this.getUserParams.materialCode = row.orderCode;
if(row.orderCode == 'checkTypeSC'|| row.orderCode == 'checkTypeSCXJ' ||
row.orderCode=='checkTypeCPPC' || row.orderCode=='checkTypeCP'){
this.belongToOptions = this.belongToLines;
}else if(row.orderCode == 'checkTypeLL'){
this.belongToOptions = this.belongToStandars;
}
console.log("======"+this.belongToOptions)
// //
getSelectedUsers(this.getUserParams).then(response => { getSelectedUsers(this.getUserParams).then(response => {
this.userList = response.rows; this.userList = response.rows;
this.openUserBind = true; this.openUserBind = true;
this.titleUserBind = "人员绑定详情"; this.titleUserBind = "人员绑定详情";
this.userloading = false; this.userloading = false;
}); });
}, },
getSelectUserList() { getSelectUserList() {
this.userloading = true; this.userloading = true;
//this.getUserParams.materialCode = orderCode; //this.getUserParams.materialCode = orderCode;
getSelectedUsers(this.getUserParams).then(response => { getSelectedUsers(this.getUserParams).then(response => {
this.userList = response.rows; this.userList = response.rows;
this.userloading = false; this.userloading = false;
}); });
}, },
userSelection(selection) { userSelection(selection) {
const allRows = this.userRows.concat(selection) const allRows = this.userRows.concat(selection)
this.userRows = allRows.reduce((acc, cur) => { this.userRows = allRows.reduce((acc, cur) => {
const hasDuplicate = acc.some(item => item.materialCode === cur.materialCode); const hasDuplicate = acc.some(item => item.materialCode === cur.materialCode);
if (!hasDuplicate) { if (!hasDuplicate) {
acc.push(cur); acc.push(cur);
} }
return acc; return acc;
}, []); }, []);
}, },
// //
handleClose() { handleClose() {
this.openUserBind = false; this.openUserBind = false;
}, },
// //
addUser() { addUser() {
this.$refs.itemSelectUser.showFlag = true; this.$refs.itemSelectUser.showFlag = true;
this.$refs.itemSelectUser.getList(); this.$refs.itemSelectUser.getList();
}, },
// //
onSelectUser(obj) { onSelectUser(obj) {
let data = { let data = {
materialCode: this.materialCode, materialCode: this.materialCode,
materialName: this.materialName, materialName: this.materialName,
attr1List: [], attr1List: [],
userCodes: [], userCodes: [],
userNames: [], userNames: [],
} }
obj.forEach((item, index) => { obj.forEach((item, index) => {
data.userCodes.push(item.userCode); data.userCodes.push(item.userCode);
data.userNames.push(item.userName); data.userNames.push(item.userName);
data.attr1List.push(item.attr1); data.attr1List.push(item.attr1);
}); });
addUserBind(data).then(response => { addUserBind(data).then(response => {
if(response.code === 200) {
this.$modal.msgSuccess("人员绑定成功");
}else{
this.$modal.msgError(response.msg);
}
this.getSelectUserList();
});
},
deleteUser(row) {
const userCode = row.userCode;
const userName = row.userName;
const data = {
materialCode: this.materialCode,
userCode: userCode,
userName: userName,
}
this.$modal.confirm('是否确认删除用户名为"' + userName + '"的数据项?').then(function() {
return deleteByMaterialCode(data);
}).then(response => {
if(response.code === 200) { if(response.code === 200) {
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("人员绑定成功");
}else{ }else{
this.$modal.msgError(response.msg); this.$modal.msgError(response.msg);
}
this.getSelectUserList();
});
},
deleteUser(row) {
const userCode = row.userCode;
const userName = row.userName;
const data = {
materialCode: this.materialCode,
userCode: userCode,
userName: userName,
} }
this.getSelectUserList(); this.$modal.confirm('是否确认删除用户名为"' + userName + '"的数据项?').then(function() {
}).catch(() => {}); return deleteByMaterialCode(data);
}, }).then(response => {
if(response.code === 200) {
this.$modal.msgSuccess("删除成功");
}else{
this.$modal.msgError(response.msg);
}
this.getSelectUserList();
}).catch(() => {});
},
// //
handleFile(row) { handleFile(row) {
this.checkType = row.orderCode; this.checkType = row.orderCode;
this.$refs.itemConfFile.initFunc(this.checkType); this.$refs.itemConfFile.initFunc(this.checkType);
this.$refs.itemConfFile.showFlag = true; this.$refs.itemConfFile.showFlag = true;
this.$refs.itemConfFile.getList(); this.$refs.itemConfFile.getList();
}, },
//
selectBelongTo(row){
const data = {
id: row.id,
attr2List: row.attr2List
}
updateBelongTo(data).then(response => {
this.$modal.msgSuccess("分配成功");
});
}
} }
}; };
</script> </script>

@ -35,10 +35,11 @@
<el-table-column label="序号" type="index" align="center" :index="indexMethod" fixed/> <el-table-column label="序号" type="index" align="center" :index="indexMethod" fixed/>
<el-table-column label="白坯名称" align="center" prop="materialName" min-width="100" fixed/> <el-table-column label="白坯名称" align="center" prop="materialName" min-width="100" fixed/>
<el-table-column label="日期" align="center" prop="dataType" min-width="100" fixed/> <el-table-column label="日期" align="center" prop="dataType" min-width="100" fixed/>
<template v-for="(column, index) in showTitles"> <template v-for="(column, index) in showTitles">
<el-table-column align="center" min-width="120" :prop="column.id" :key="column.id" :label="column.titleName"/> <el-table-column align="center" min-width="120" :prop="column.id" :key="column.id" :label="column.titleName"/>
</template> </template>
</el-table> <el-table-column label="累计" align="center" prop="rowSum" min-width="100"/>
</el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="图表" name="second"> <el-tab-pane label="图表" name="second">
<div id="echartss" style="width:1200px;height:450px;"></div> <div id="echartss" style="width:1200px;height:450px;"></div>

@ -38,6 +38,7 @@
<template v-for="(column, index) in showTitles"> <template v-for="(column, index) in showTitles">
<el-table-column align="center" min-width="120" :prop="column.id" :key="column.id" :label="column.titleName"/> <el-table-column align="center" min-width="120" :prop="column.id" :key="column.id" :label="column.titleName"/>
</template> </template>
<el-table-column label="累计" align="center" prop="rowSum" min-width="100"/>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="图表" name="second"> <el-tab-pane label="图表" name="second">

@ -276,15 +276,6 @@
<el-form :model="form"> <el-form :model="form">
<!-- 表头-工单信息 --> <!-- 表头-工单信息 -->
<!-- 导航栏 --> <!-- 导航栏 -->
<el-row class="my-print-nav">
<el-col :span="24">
<div style="display: flex; justify-content: flex-end;">
<div class="my-print-barcode" :width="shengchan ? '631px' : '621px'">
<svg id="barcode"></svg>
</div>
</div>
</el-col>
</el-row>
<!-- 主数据 --> <!-- 主数据 -->
@ -292,12 +283,21 @@
<el-row> <el-row>
<div class="my-print-head"> <div class="my-print-head">
<el-col :span="24" style="text-align: center;"> <el-col :span="24" style="text-align: center;">
<h3 style="margin: 0;">普通领料/退料单</h3> <h3 style="margin: 0; display: flex; align-items: center; justify-content: center; text-align: center; margin-left: 250px;">
普通领料/退料单
<svg id="barcode" style="margin-left: 10px;"></svg>
</h3>
<div style="margin-top: 10px;"> <div style="margin-top: 10px;">
<span>领料</span> <span>领料</span>
<span style="margin-left: 20px;">退料 <span style="color: green;"></span></span> <span style="margin-left: 20px;">退料 <span style="color: green;"></span></span>
</div> </div>
<!-- &lt;!&ndash; 将条形码放在这里 &ndash;&gt;-->
<!-- <div style="margin-top: 10px; display: flex; justify-content: center;">-->
<!-- -->
<!-- </div>-->
</el-col> </el-col>
</div> </div>
</el-row> </el-row>
<!-- 导航栏 --> <!-- 导航栏 -->

Loading…
Cancel
Save