guoshuang 3 months ago
commit 75ffa99618

@ -101,3 +101,11 @@ export function getDLTableCPKInfo(query) {
params: query
});
}
export function getTableHzTitle(query) {
return request({
url: '/quality/staticTable/getTableHzTitle',
method: 'get',
params: query
});
}

@ -9,6 +9,15 @@ export function listData(query) {
})
}
// 查询字典数据列表无分页,可筛选
export function getDictData(query) {
return request({
url: '/system/dict/data/getDictData',
method: 'get',
params: query
})
}
// 查询字典数据详细
export function getData(dictCode) {
return request({

@ -191,12 +191,13 @@
{{ scope.row.workType == 1 ? "保养委外" : "维修委外" }}
</template>
</el-table-column>
<el-table-column label="设备编码" align="center" prop="equipmentCode" width="100"/>
<el-table-column label="设备名称" align="center" prop="equipmentName" width="100"/>
<el-table-column label="设备编码" align="center" prop="equipmentCode" width="150"/>
<el-table-column label="设备名称" align="center" prop="equipmentName" width="150"/>
<el-table-column
label="设备类型"
align="center"
prop="equipmentTypeName"
width="150"
/>
<el-table-column
label="委外维修人员"

@ -245,7 +245,7 @@
icon="el-icon-edit"
size="mini"
@click="clickInspect"
v-hasPermi="['device:repairOrder:inspect']"
v-hasPermi="['device:repairOrder:check']"
>维修结果审核
</el-button>
</el-col>
@ -324,7 +324,7 @@
label="报修单号"
align="center"
prop="orderCode"
width="200"
width="230"
/>
<el-table-column
label="设备名称"

@ -394,10 +394,21 @@
icon="el-icon-edit"
size="mini"
@click="clickInspect"
v-hasPermi="['device:upkeepOrder:edit']"
v-hasPermi="['device:upkeepOrder:check']"
>结果检验
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-edit"
size="mini"
@click="handleUpdate"
v-hasPermi="['device:upkeepOrder:edit']"
>填写记录
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
@ -453,6 +464,14 @@
}}</el-button>
</template>
</el-table-column>
<el-table-column width="80" label="保养类型" align="center" prop="upkeep">
<template slot-scope="scope">
<dict-tag
:options="dict.type.device_upkeep_type"
:value="scope.row.upkeep"
/>
</template>
</el-table-column>
<el-table-column label="工单状态" align="center" prop="orderStatus">
<template slot-scope="scope">
<dict-tag
@ -581,14 +600,6 @@
}}</span>
</template>
</el-table-column>
<el-table-column width="80" label="保养类型" align="center" prop="upkeep">
<template slot-scope="scope">
<dict-tag
:options="dict.type.device_upkeep_type"
:value="scope.row.upkeep"
/>
</template>
</el-table-column>
<el-table-column label="工单费用" align="center" prop="orderCost" />
<el-table-column label="保养人工号" align="center" prop="planPerson" width="100"/>
<el-table-column label="保养人姓名" align="center" prop="planPersonName" width="100"/>

@ -305,7 +305,12 @@
<el-table-column width="60" align="center" label="序号" type="index" fixed></el-table-column>
<el-table-column v-if="false" label="主键" align="center" prop="planId"/>
<el-table-column width="150" label="计划编码" align="center" prop="planCode" fixed/>
<el-table-column width="150" label="计划名称" align="center" prop="planName"/>
<el-table-column width="150" label="计划名称" align="center" prop="planName" />
<el-table-column label="保养类型" align="center" prop="upkeep">
<template slot-scope="scope">
<dict-tag :options="dict.type.device_upkeep_type" :value="scope.row.upkeep"/>
</template>
</el-table-column>
<el-table-column width="150" label="生成规则" align="center" prop="calculationRule">
<template slot-scope="scope">
{{ scope.row.calculationRule == "0" ? "按照固定周期" : scope.row.one == "1" ? "按照上次保养时间" : "单次" }}
@ -340,15 +345,10 @@
</el-table-column>
<el-table-column v-if="false" label="是否可生产-限制" align="center" prop="planRestrict"/>
<el-table-column v-if="false" label="维护类型" align="center" prop="planType"/>
<el-table-column label="保养类型" align="center" prop="upkeep">
<template slot-scope="scope">
<dict-tag :options="dict.type.device_upkeep_type" :value="scope.row.upkeep"/>
</template>
</el-table-column>
<el-table-column label="委外人员" align="center" prop="workPerson"/>
<el-table-column label="委外单位" align="center" prop="workOutsourcingUnit"/>
<el-table-column label="联系方式" align="center" prop="workConnection"/>
<el-table-column label="原因" align="center" prop="workReason"/>
<el-table-column label="委外人员" align="center" prop="workPerson" width="100"/>
<el-table-column label="委外单位" align="center" prop="workOutsourcingUnit" width="150"/>
<el-table-column label="联系方式" align="center" prop="workConnection" width="150"/>
<el-table-column label="原因" align="center" prop="workReason" width="150"/>
<el-table-column v-if="false" label="委外工单编码" align="center" prop="workCode"/>
<el-table-column v-if="false" label="工厂" align="center" prop="factoryCode"/>
<el-table-column v-if="false" label="备用字段1" align="center" prop="attr1"/>

@ -50,7 +50,7 @@
</span>
</div>
<div class="name2">
今日
今日产量(PC)
</div>
</div>
<div class="box">
@ -60,7 +60,7 @@
</span>
</div>
<div class="name2">
今日抽检数量
今日抽检数量(PC)
</div>
</div>
<div class="box">
@ -70,7 +70,7 @@
</span>
</div>
<div class="name2">
今日不良数
今日不良数(PC)
</div>
</div>
</div>
@ -82,7 +82,7 @@
</span>
</div>
<div class="name2">
本月
本月产量(PC)
</div>
</div>
<div class="box">
@ -92,7 +92,7 @@
</span>
</div>
<div class="name2">
本月不良数
本月不良数(PC)
</div>
</div>
</div>
@ -298,7 +298,7 @@ export default {
getdatalist() {
const _this = this;
getProduceStaticInfo({
ymdType: moment().format(_this.selectxtclasses),
ymdType: _this.selectxtclasses,//moment().format(_this.selectxtclasses),
typeCode: 'produce',
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
@ -310,6 +310,7 @@ export default {
});
getProduceNoOkList({
typeCode: 'produce',
ymdType: _this.selectxtclasses,
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
if (response) {
@ -318,7 +319,7 @@ export default {
});
getCheckProjectsPie({
typeCode: 'produce',
ymdType: moment().format(_this.selectxtclasses),
ymdType: _this.selectxtclasses,//moment().format(_this.selectxtclasses),
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
if (response) {

@ -60,7 +60,15 @@
-->
<el-col :span="14">
<el-form-item label="不合格描述" prop="remark">
<el-input type='textarea' v-model="form.remark" placeholder="请输入不合格描述" />
<!-- <el-input type='textarea' v-model="form.remark" placeholder="请输入不合格描述" /> -->
<el-select v-model="form.remark" placeholder="请选择不合格描述" clearable>
<el-option
v-for="dict in remarkList"
:key="dict.dictLabel"
:label="dict.dictLabel"
:value="dict.dictLabel"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
@ -225,6 +233,7 @@ import { getCkeckProjectList,changeCheckDetailStatus,commitActualValue,
commitCheckResult,getDefectList,getWeightValue,getnoOkVals,getAutoJudge
} from "@/api/quality/income";
import { getDefectValue, commitDefectValue, updateDefectValue} from "@/api/quality/checkTaskDefect";
import { getDictData,} from "@/api/system/dict/data";
export default {
name: "itemSelectUser",
dicts: ["qc_rule_prop","material_type_oa","material_from_oa","sample_level","sample_aql"],
@ -246,6 +255,7 @@ export default {
// BOM
itemList: null,
qcCheckTaskDetails: [],
remarkList: [],
//
bomCode: undefined,
defaultProps: {
@ -306,6 +316,7 @@ export default {
},
created() {
this.getDefect();
this.handleGetDictData();
},
methods: {
getDefect(){
@ -357,6 +368,17 @@ export default {
);
},
handleGetDictData() {
const query = {
dictType: 'unqualified_remark',
}
getDictData(query).then(response => {
if (response.code === 200) {
this.remarkList = response.data;
}
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;

@ -0,0 +1,358 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" style="margin-bottom: -34px;">
<el-form-item label="来料月份" prop="incomeTimeYM">
<el-date-picker
v-model="queryParams.incomeTimeYM"
format="yyyy-MM"
type="month"
placeholder="选择月">
</el-date-picker>
</el-form-item>
<el-form-item label="供应商" prop="supplierCodeArray">
<div class="tagbox">
<div class="tag" style="" placeholder="请选择供应商">
<el-tag
:key="index"
class="tagitem"
v-for="(tag, index) in selectMaterielListtag"
closable
:disable-transitions="false"
@close="handleClose(tag)"
>
{{ tag.supplierName }}
</el-tag>
</div>
<el-button
slot="append"
class="button1"
@click="handleSelectSupplier"
icon="el-icon-search"
></el-button>
<el-row style="display: none;">
<el-input type="input" clearable v-model="queryParams.supplierCode" placeholder="点击选择物料"/>
<el-input type="input"clearable v-model="queryParams.supplierName" placeholder="点击选择物料"/>
</el-row>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['mes:rfidProcess:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="incomeList" @selection-change="handleSelectionChange">
<el-table-column label="供应商编号" align="center" prop="supplierCode" width="120" fixed/>
<el-table-column label="供应商名称" align="left" prop="supplierName" width="390" fixed/>
<el-table-column label="总批数" align="center" prop="batchs" width="90"/>
<el-table-column label="合格批次" align="center" prop="okBatchs" width="100"/>
<el-table-column label="不合格批次" align="center" prop="noOkBatchs" width="100"/>
<el-table-column label="批次不良率" align="center" prop="noOkBatchRate" width="100"/>
<el-table-column label="总数量" align="center" prop="nums" width="90"/>
<el-table-column label="合格数量" align="center" prop="okNums" width="100"/>
<el-table-column label="不合格数量" align="center" prop="noOkNums" width="100"/>
<el-table-column label="数量不良率" align="center" prop="noOkNumRate" width="100"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { getIncomeTableList} from "@/api/quality/qcTable";
import moment from 'moment';
export default {
name: "qcTableCheckDevelop",
components: {},
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// rfid
incomeList: [],
//
title: "",
//
open: false,
// -listtag
selectMaterielListtag:[],
//
queryParams: {
incomeTimeYM:null,
incomeTimeArray: [],
checkTimeArray: [],
pageNum: 1,
pageSize: 10,
workorderId: null,
rfid: null,
factoryCode: null,
machineCode: null,
nowProcessId: null,
nextProcessId: null,
orderNum: null,
inTime: null,
outTime: null,
status: null,
shiftId: null,
productCode: null,
supplierName: '',
supplierCode: ''
},
//
form: {},
//
rules: {
workorderId: [
{ required: true, message: "工单ID不能为空", trigger: "blur" }
],
rfid: [
{ required: true, message: "rfid号不能为空", trigger: "blur" }
],
}
};
},
mounted(){
this.getDate();
this.getList();
},
created() {
},
methods: {
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0)
this.queryParams.incomeTimeYM=start
},
Fungetdate (num) {
var dd = new Date();
dd.setDate(dd.getDate() + num);
var y = dd.getFullYear();
var m = dd.getMonth() + 1;//
var d = dd.getDate();
return y + "-" + m;
},
/** 查询列表 */
getList() {
this.loading = true;
if(this.queryParams.incomeTimeYM!=null){
this.queryParams.yearMonth = moment(this.queryParams.incomeTimeYM).format('YYYY-MM');
}
getIncomeTableList(this.queryParams).then(response => {
this.incomeList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
recordId: null,
workorderId: null,
rfid: null,
factoryCode: null,
machineCode: null,
nowProcessId: null,
nextProcessId: null,
orderNum: null,
inTime: null,
outTime: null,
status: null,
remark: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
shiftId: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.recordId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加生产rfid流程";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const recordId = row.recordId || this.ids
getRfidProcess(recordId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改生产rfid流程";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.recordId != null) {
updateRfidProcess(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addRfidProcess(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const recordIds = row.recordId || this.ids;
this.$modal.confirm('是否确认删除生产rfid流程编号为"' + recordIds + '"的数据项?').then(function() {
return delRfidProcess(recordIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/rfidProcess/export', {
...this.queryParams
}, `rfidProcess_${new Date().getTime()}.xlsx`)
},
/**供应商选择弹出框**/
handleSelectSupplier() {
this.$refs.itemSelectSupplier.showFlag = true;
},
//
onSelectSupplier(objs) {
var code = '';
var desc = '';
for (let i = 0; i < objs.length; i++) {
if(this.queryParams.supplierCode.indexOf(objs[i].supplierCode)<0){
code = code + objs[i].supplierCode + ',';
this.selectMaterielListtag.push(objs[i])
}else{
this.$message({
message: objs[i].supplierName+'已经选择',
type: 'warning'
})
}
if(this.queryParams.supplierName.indexOf(objs[i].supplierName)<0){
desc = desc + objs[i].supplierName + ',';
}
}
this.queryParams.supplierCode += code;
this.queryParams.supplierName += desc;
},
//
handleClose(tag) {
this.selectMaterielListtag.splice(this.selectMaterielListtag.indexOf(tag.supplierName), 1);
var code = "";
var desc = "";
for (let i = 0; i < this.selectMaterielListtag.length; i++) {
code = code + this.selectMaterielListtag[i].supplierCode + ",";
desc = desc + this.selectMaterielListtag[i].supplierName + ",";
}
this.queryParams.supplierCode += code;
this.queryParams.supplierName += desc;
}
}
};
</script>
<style lang="scss" scoped>
.tagbox {
display: flex;
/* overflow: scroll; */
position: relative;
width: 80%;
padding-left: 26px;
margin-bottom: 15px;
.tagboxlabel{
width: 100px;
text-align: right;
vertical-align: middle;
font-size: 14px;
color: black;
line-height: 40px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin-right: 12px;
}
.tag {
width: 720px;
border: 1px #DCDFE6 solid;
height: 60px;
padding: 5px 15px;
overflow-y: scroll;
.tagitem{
margin-left: 5px;
}
}
.button1{
width: 37px;
height: 37px;
position: absolute;
right: -39px;
top: 2px;
}
}
</style>

@ -0,0 +1,291 @@
<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="typeCode">
<el-select v-model="queryParams.typeCode" clearable placeholder="请选择类型" @change="getCheckTypeList">
<el-option
v-for="dict in dict.type.check_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="检验节点" prop="checkType">
<el-select v-model="queryParams.checkType" clearable placeholder="请选择检验节点">
<el-option
v-for="dict in checkTypeList"
:key="dict.checkType"
:label="dict.checkName"
:value="dict.checkType"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="来料月份" prop="incomeTimeYM">
<el-date-picker
v-model="queryParams.incomeTimeYM"
format="yyyy-MM"
type="month"
placeholder="选择月">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['quality:project:export']"
>导出</el-button>
</el-col>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
<el-table-column label="日期" align="center" prop="ymdms" width="150" />
<template v-for="(column, index) in showTitles1">
<el-table-column align="center" min-width="120" :prop="column.id" :key="column.id" :label="column.titleName"/>
</template>
<el-table-column label="抽样总数" align="center" prop="quantity" min-width="100" />
<template v-for="(column, index) in showTitles2">
<el-table-column align="center" min-width="120" :prop="column.id" :key="column.id" :label="column.titleName"/>
</template>
<el-table-column label="不良总数" align="center" prop="quantity" min-width="100" />
<el-table-column label="不良率" align="center" prop="quantity" min-width="100" />
<el-table-column label="抽检批数" align="center" prop="quantity" min-width="100" />
<el-table-column label="不合格批数" align="center" prop="quantity" min-width="100" />
<el-table-column label="不合格批次率" align="center" prop="quantity" min-width="100" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { getTableHzTitle,
getCheckTypeList,
} from "@/api/quality/qcTable";
import moment from 'moment';
export default {
name: "qcTableCheckHz",
dicts: ["check_type"],
components: {},
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
tableList: [],
showTitles1: [],
showTitles2: [],
//
title: "",
//
open: false,
checkTypeList: [],
//
queryParams: {
incomeTimeYM:null,
incomeTimeArray: [],
checkTimeArray: [],
pageNum: 1,
pageSize: 10,
workorderId: null,
rfid: null,
factoryCode: null,
machineCode: null,
nowProcessId: null,
nextProcessId: null,
orderNum: null,
inTime: null,
outTime: null,
status: null,
shiftId: null,
productCode: null,
supplierName: '',
supplierCode: ''
},
//
form: {},
//
rules: {
}
};
},
mounted(){
this.getDate();
this.getList();
},
created() {
},
methods: {
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0)
this.queryParams.incomeTimeYM=start
},
Fungetdate (num) {
var dd = new Date();
dd.setDate(dd.getDate() + num);
var y = dd.getFullYear();
var m = dd.getMonth() + 1;//
var d = dd.getDate();
return y + "-" + m;
},
/** 查询列表 */
getList() {
this.loading = true;
if(this.queryParams.incomeTimeYM!=null){
this.queryParams.yearMonth = moment(this.queryParams.incomeTimeYM).format('YYYY-MM');
}
//Table
getTableHzTitle(this.queryParams).then(response => {
this.showTitles1 = [];
for(let i=0;i<response.columns1.length;i++){
var pobj={};
pobj.id="colone"+i;
pobj.titleName = response[i];
this.showTitles1.push(pobj)
}
this.showTitles2 = [];
for(let i=0;i<response.columns2.length;i++){
var pobj={};
pobj.id="coltwo"+i;
pobj.titleName = response[i];
this.showTitles2.push(pobj)
}
});
//Table
getTableData(this.queryParams).then(response => {
this.hourProList = response;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
recordId: null,
workorderId: null,
rfid: null,
factoryCode: null,
machineCode: null,
nowProcessId: null,
nextProcessId: null,
orderNum: null,
inTime: null,
outTime: null,
status: null,
remark: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
shiftId: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
getCheckTypeList(val) {
//
getCheckTypeList(val).then((response) => {
this.checkTypeList = response;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/rfidProcess/export', {
...this.queryParams
}, `rfidProcess_${new Date().getTime()}.xlsx`)
},
}
};
</script>
<style lang="scss" scoped>
.tagbox {
display: flex;
/* overflow: scroll; */
position: relative;
width: 80%;
padding-left: 26px;
margin-bottom: 15px;
.tagboxlabel{
width: 100px;
text-align: right;
vertical-align: middle;
font-size: 14px;
color: black;
line-height: 40px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin-right: 12px;
}
.tag {
width: 720px;
border: 1px #DCDFE6 solid;
height: 60px;
padding: 5px 15px;
overflow-y: scroll;
.tagitem{
margin-left: 5px;
}
}
.button1{
width: 37px;
height: 37px;
position: absolute;
right: -39px;
top: 2px;
}
}
</style>

@ -0,0 +1,358 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" style="margin-bottom: -34px;">
<el-form-item label="来料月份" prop="incomeTimeYM">
<el-date-picker
v-model="queryParams.incomeTimeYM"
format="yyyy-MM"
type="month"
placeholder="选择月">
</el-date-picker>
</el-form-item>
<el-form-item label="供应商" prop="supplierCodeArray">
<div class="tagbox">
<div class="tag" style="" placeholder="请选择供应商">
<el-tag
:key="index"
class="tagitem"
v-for="(tag, index) in selectMaterielListtag"
closable
:disable-transitions="false"
@close="handleClose(tag)"
>
{{ tag.supplierName }}
</el-tag>
</div>
<el-button
slot="append"
class="button1"
@click="handleSelectSupplier"
icon="el-icon-search"
></el-button>
<el-row style="display: none;">
<el-input type="input" clearable v-model="queryParams.supplierCode" placeholder="点击选择物料"/>
<el-input type="input"clearable v-model="queryParams.supplierName" placeholder="点击选择物料"/>
</el-row>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['mes:rfidProcess:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="incomeList" @selection-change="handleSelectionChange">
<el-table-column label="供应商编号" align="center" prop="supplierCode" width="120" fixed/>
<el-table-column label="供应商名称" align="left" prop="supplierName" width="390" fixed/>
<el-table-column label="总批数" align="center" prop="batchs" width="90"/>
<el-table-column label="合格批次" align="center" prop="okBatchs" width="100"/>
<el-table-column label="不合格批次" align="center" prop="noOkBatchs" width="100"/>
<el-table-column label="批次不良率" align="center" prop="noOkBatchRate" width="100"/>
<el-table-column label="总数量" align="center" prop="nums" width="90"/>
<el-table-column label="合格数量" align="center" prop="okNums" width="100"/>
<el-table-column label="不合格数量" align="center" prop="noOkNums" width="100"/>
<el-table-column label="数量不良率" align="center" prop="noOkNumRate" width="100"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { getIncomeTableList} from "@/api/quality/qcTable";
import moment from 'moment';
export default {
name: "qcTableCheckOrder",
components: {},
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// rfid
incomeList: [],
//
title: "",
//
open: false,
// -listtag
selectMaterielListtag:[],
//
queryParams: {
incomeTimeYM:null,
incomeTimeArray: [],
checkTimeArray: [],
pageNum: 1,
pageSize: 10,
workorderId: null,
rfid: null,
factoryCode: null,
machineCode: null,
nowProcessId: null,
nextProcessId: null,
orderNum: null,
inTime: null,
outTime: null,
status: null,
shiftId: null,
productCode: null,
supplierName: '',
supplierCode: ''
},
//
form: {},
//
rules: {
workorderId: [
{ required: true, message: "工单ID不能为空", trigger: "blur" }
],
rfid: [
{ required: true, message: "rfid号不能为空", trigger: "blur" }
],
}
};
},
mounted(){
this.getDate();
this.getList();
},
created() {
},
methods: {
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0)
this.queryParams.incomeTimeYM=start
},
Fungetdate (num) {
var dd = new Date();
dd.setDate(dd.getDate() + num);
var y = dd.getFullYear();
var m = dd.getMonth() + 1;//
var d = dd.getDate();
return y + "-" + m;
},
/** 查询列表 */
getList() {
this.loading = true;
if(this.queryParams.incomeTimeYM!=null){
this.queryParams.yearMonth = moment(this.queryParams.incomeTimeYM).format('YYYY-MM');
}
getIncomeTableList(this.queryParams).then(response => {
this.incomeList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
recordId: null,
workorderId: null,
rfid: null,
factoryCode: null,
machineCode: null,
nowProcessId: null,
nextProcessId: null,
orderNum: null,
inTime: null,
outTime: null,
status: null,
remark: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
shiftId: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.recordId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加生产rfid流程";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const recordId = row.recordId || this.ids
getRfidProcess(recordId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改生产rfid流程";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.recordId != null) {
updateRfidProcess(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addRfidProcess(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const recordIds = row.recordId || this.ids;
this.$modal.confirm('是否确认删除生产rfid流程编号为"' + recordIds + '"的数据项?').then(function() {
return delRfidProcess(recordIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/rfidProcess/export', {
...this.queryParams
}, `rfidProcess_${new Date().getTime()}.xlsx`)
},
/**供应商选择弹出框**/
handleSelectSupplier() {
this.$refs.itemSelectSupplier.showFlag = true;
},
//
onSelectSupplier(objs) {
var code = '';
var desc = '';
for (let i = 0; i < objs.length; i++) {
if(this.queryParams.supplierCode.indexOf(objs[i].supplierCode)<0){
code = code + objs[i].supplierCode + ',';
this.selectMaterielListtag.push(objs[i])
}else{
this.$message({
message: objs[i].supplierName+'已经选择',
type: 'warning'
})
}
if(this.queryParams.supplierName.indexOf(objs[i].supplierName)<0){
desc = desc + objs[i].supplierName + ',';
}
}
this.queryParams.supplierCode += code;
this.queryParams.supplierName += desc;
},
//
handleClose(tag) {
this.selectMaterielListtag.splice(this.selectMaterielListtag.indexOf(tag.supplierName), 1);
var code = "";
var desc = "";
for (let i = 0; i < this.selectMaterielListtag.length; i++) {
code = code + this.selectMaterielListtag[i].supplierCode + ",";
desc = desc + this.selectMaterielListtag[i].supplierName + ",";
}
this.queryParams.supplierCode += code;
this.queryParams.supplierName += desc;
}
}
};
</script>
<style lang="scss" scoped>
.tagbox {
display: flex;
/* overflow: scroll; */
position: relative;
width: 80%;
padding-left: 26px;
margin-bottom: 15px;
.tagboxlabel{
width: 100px;
text-align: right;
vertical-align: middle;
font-size: 14px;
color: black;
line-height: 40px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin-right: 12px;
}
.tag {
width: 720px;
border: 1px #DCDFE6 solid;
height: 60px;
padding: 5px 15px;
overflow-y: scroll;
.tagitem{
margin-left: 5px;
}
}
.button1{
width: 37px;
height: 37px;
position: absolute;
right: -39px;
top: 2px;
}
}
</style>

@ -120,12 +120,12 @@
</el-table-column>
<el-table-column label="计划数量" align="center" prop="planNumber" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="已入库数量" align="center" prop="realityNumber" v-if="false" />
<el-table-column label="已入库数量" align="center" prop="realityNumber" />
<el-table-column label="订单状态" align="center" prop="orderStatus">
<template slot-scope="scope">
<span v-if="scope.row.orderStatus === '0'"></span>
<span v-else-if="scope.row.orderStatus === '1'">进行</span>
<span v-else-if="scope.row.orderStatus === '2'">完成</span>
<span v-if="scope.row.orderStatus === '0'"></span>
<span v-else-if="scope.row.orderStatus === '1'">收货</span>
<span v-else-if="scope.row.orderStatus === '2'">收货完成</span>
</template>
</el-table-column>
<el-table-column label="供应商编码" align="center" prop="supplierCode" />

@ -59,7 +59,6 @@
<el-table-column label="单位" align="center" prop="unit" v-if="false" />
<el-table-column label="计划数量" align="center" prop="planNumber" />
<el-table-column label="出库数量" align="center" prop="outNumber" />
<!-- <el-table-column label="托盘号" align="center" prop="userDefined2" /> -->
<el-table-column label="需求时间" align="center" prop="userDefined5" />
<el-table-column label="仓库编号" align="center" prop="locCode" />
<el-table-column label="库位名称" align="center" prop="locDesc" v-if="false" />
@ -83,24 +82,16 @@
</template>
</el-table-column>
<el-table-column label="过账凭证" align="center" prop="userDefined9" />
<!-- <el-table-column label="sap过账信息" align="center" prop="userDefined11" />-->
<el-table-column label="sap订单过账信息" align="center" prop="userDefined11" />
<!-- <el-table-column label="sap反冲过账信息" align="center" prop="sapXMag" />-->
<el-table-column label="操作人" align="center" prop="createBy" />
<el-table-column label="操作时间" align="center" prop="createDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</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:outorder:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['wms:outorder:remove']">删除</el-button>
</template>
</el-table-column> -->
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"

@ -111,7 +111,7 @@
<el-table-column label="产线名称" align="center" prop="lineName" width="200px" />
<el-table-column label="数量" align="center" prop="quantity" />
<el-table-column label="托盘号" align="center" prop="sn" width="200px"/>
<el-table-column label="标识卡" align="center" prop="userDefined1" width="200px"/>
<el-table-column label="记录日期" align="center" prop="productDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.productDate, '{y}-{m}-{d}') }}</span>

Loading…
Cancel
Save