功能升级

master
zhaoxiaolin 8 months ago
parent ed7570a366
commit 7d4b85eb9a

@ -313,7 +313,7 @@ export default {
data() {
return {
fenyeNumber:5,
fenyeNumberTwo:7,
fenyeNumberTwo:5,
shengchan:true,
newWorkerLoading: false,
refreshNewWorkerTable:true,

@ -262,7 +262,7 @@ import {listCpkUpdown,getCpkUpdown, delCpkUpdown,addCpkUpdown,updateCpkUpdown }
import ItemSelectMaterial from "@/views/quality/cpkUpDowConfig/selectMaterial";
import {getCheckTypeList,getProjectOptionList} from "@/api/quality/qcTable";
export default {
name: "Updown",
name: "CpkUpDowConfig",
dicts: ["check_type","qms_category"],
components: {ItemSelectMaterial},
data() {

@ -68,7 +68,6 @@
</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 type="selection" width="55" align="center" />
<el-table-column label="recordId" align="center" prop="recordId" v-if="false"/>
@ -143,91 +142,29 @@
<span style="font-size: 14px;padding: 6px;line-height: 50px;">编码{{form.fileNo}}</span>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="来料类别" prop="factoryCode">
<el-input v-model="form.factoryCode" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="生产批号" prop="incomeBatchNo">
<el-input v-model="form.incomeBatchNo" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="报告编号" prop="checkNo">
<el-input v-model="form.checkNo" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="物料编码" prop="materialCode">
<el-input v-model="form.materialCode" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="供应单位" prop="supplierName">
<el-input v-model="form.supplierName" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="供应编码" prop="supplierCode">
<el-input v-model="form.supplierCode" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="来料数量" prop="quality">
<el-input type="number" v-model="form.quality" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位" prop="unit" >
<el-input v-model="form.unit" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="物料来源" prop="checkType" >
<el-input v-model="form.checkType" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="检验依据" prop="standardNo">
<el-input v-model="form.standardNo" disabled />
</el-form-item>
</el-col>
<el-descriptions title="" border :column="3" :contentStyle="content_style" :label-style="label_style">
<el-descriptions-item label="来料类别" class="my-description-item1">{{form.factoryCode}}</el-descriptions-item>
<el-descriptions-item label="生产批号" class="my-description-item2">{{form.incomeBatchNo}}</el-descriptions-item>
<el-descriptions-item label="报告编号" class="my-description-item3">{{form.checkNo}}</el-descriptions-item>
<el-col :span="8">
<el-form-item label="报检日期" prop="createTime">
<el-input v-model="form.createTime" disabled>
{{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检验日期" prop="checkTime">
<el-input v-model="form.checkTime" disabled>
{{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-descriptions-item label="物料名称" class="my-description-item1">{{form.materialName}}</el-descriptions-item>
<el-descriptions-item label="物料编码" class="my-description-item2">{{form.materialCode}}</el-descriptions-item>
<el-descriptions-item label="供应单位" class="my-description-item3">{{form.supplierName}}</el-descriptions-item>
<el-descriptions-item label="供应编码" class="my-description-item1">{{form.supplierCode}}</el-descriptions-item>
<el-descriptions-item label="来料数量" class="my-description-item2">{{form.quality}}</el-descriptions-item>
<el-descriptions-item label="单位" class="my-description-item3">{{form.unit}}</el-descriptions-item>
<el-descriptions-item label="物料来源" class="my-description-item1">{{form.checkType}}</el-descriptions-item>
<el-descriptions-item label="检验依据" class="my-description-item2">{{form.standardNo}}</el-descriptions-item>
<el-descriptions-item label="报检日期" class="my-description-item3">{{ parseTime(form.createTime, '{y}-{m}-{d}') }}</el-descriptions-item>
<!--<el-descriptions-item label="报检日期" class="my-description-item3">{{ parseTime(form.checkTime, '{y}-{m}-{d}') }}</el-descriptions-item>-->
</el-descriptions>
<el-row>
<el-col :span="24">
<!-- 检验项目明细 -->
<el-table v-loading="loading" :data="checkProjectList" >
<el-table-column type="selection" width="50" align="center" />
<el-table v-loading="loading" :data="checkProjectList" border :span-method="objectSpanMethod">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="检验项目" align="center" prop="projectRuleName" />
<el-table-column label="标准要求" align="center" prop="checkStandard" width="400"/>
@ -304,7 +241,7 @@ import { getCheckTypes } from "@/api/quality/qcProduce";
import { getDefectTypeListByDefectType } from "@/api/quality/defectType.js";
import moment from 'moment';
export default {
name: "Income",
name: "IncomeReport",
dicts: ["unit","check_status","check_result"],
data() {
return {
@ -376,7 +313,27 @@ export default {
},
//
form: {checkedValues:[]},
spanArr: [],
position: 0,
checkTypes:[],
labelStyle: {
'min-width': '100px',
'word-break': 'keep-all'
},
content_style: {
'text-align': 'center',
'min-width': '200px',
'word-break': 'break-all'
},
label_style: {
'color': '#000',
'text-align': 'center',
'font-weight': '600',
'height': '40px',
'background-color': '#d6dbe1',
'min-width': '100px',
'word-break': 'keep-all'
},
//
rules: {
/* incomeBatchNo: [
@ -470,6 +427,8 @@ export default {
delFlag: null,
checkedValues:[],
};
this.spanArr = [];
this.position = 0;
this.resetForm("form");
},
/** 搜索按钮操作 */
@ -558,6 +517,8 @@ export default {
this.checkProjectList = response.rows;
this.total = response.total;
this.loading = false;
this.rowspan()
});
},
// -
@ -584,7 +545,54 @@ export default {
getCodeValue(defectCode) {
const foundDefect = this.defectList.find(defect => defect.defectCode === defectCode);
return foundDefect.defectSubclass;
}
},
/**
* 1. 若是objectSpanMethod不返回任何东西表格不会变化
* 2. 最外层的判断一般是先从第几列开始合并
* 3. 这次从第0行合并2个下次就要从第3行开始合并0行加俩就到3行了
* 4. 这种方式是有多少条数据合并多少条数据比如本案例中有7条数据从第0条合并到第7条
* 5. return { rowspan: 0, colspan: 0 } //
* */
rowspan() {
this.checkProjectList.forEach((item, index) => {
if (index === 0) {
this.spanArr.push(1);
this.position = 0;
} else {
if (
this.checkProjectList[index].projectRuleName ===
this.checkProjectList[index - 1].projectRuleName
) {
this.spanArr[this.position] += 1;
this.spanArr.push(0);
} else {
this.spanArr.push(1);
this.position = index;
}
}
});
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
/**
if (columnIndex === 0) {
const _row = this.spanArr[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col,
};
}
**/
if (columnIndex === 1) {
const _row = this.spanArr[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col,
};
}
}
}
};
</script>
@ -601,4 +609,17 @@ export default {
margin-left: 15px;
height: 38px;
}
.my-description-item1 {
width: 280px; /* 或者你想要的任何宽度 */
}
.my-description-item2 {
width: 120px; /* 或者你想要的任何宽度 */
}
.my-description-item3 {
width: 80px; /* 或者你想要的任何宽度 */
}
.border-row {
border: 1px solid #d3dce6; /* 边框颜色可以根据需要自定义 */
text-align:center;
}
</style>

@ -151,95 +151,29 @@
<span style="font-size: 14px;padding: 6px;line-height: 50px;">编码{{form.fileNo}}</span>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="库存类别" prop="factoryCode">
<el-input v-model="form.factoryCode" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="生产批号" prop="incomeBatchNo">
<el-input v-model="form.incomeBatchNo" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="报告编号" prop="checkNo">
<el-input v-model="form.checkNo" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="物料编码" prop="materialCode">
<el-input v-model="form.materialCode" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="供应单位" prop="supplierName">
<el-input v-model="form.supplierName" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="供应编码" prop="supplierCode">
<el-input v-model="form.supplierCode" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="库存数量" prop="quality">
<el-input type="number" v-model="form.quality" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位" prop="unit" >
<el-input v-model="form.unit" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="物料来源" prop="checkType" >
<el-input v-model="form.checkType" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<!--
<el-form-item label="抽检数量" prop="sampleQuality">
<el-input v-model="form.sampleQuality" disabled />
</el-form-item>-->
<el-form-item label="检验依据" prop="standardNo">
<el-input v-model="form.standardNo" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="报检日期" prop="createTime">
<el-input v-model="form.createTime" disabled>
{{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检验日期" prop="checkTime">
<el-input v-model="form.checkTime" disabled>
{{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-descriptions title="" border :column="3" :contentStyle="content_style" :label-style="label_style">
<el-descriptions-item label="库存工厂" class="my-description-item1">{{form.factoryCode}}</el-descriptions-item>
<el-descriptions-item label="生产批号" class="my-description-item2">{{form.incomeBatchNo}}</el-descriptions-item>
<el-descriptions-item label="报告编号" class="my-description-item3">{{form.checkNo}}</el-descriptions-item>
<el-descriptions-item label="物料名称" class="my-description-item1">{{form.materialName}}</el-descriptions-item>
<el-descriptions-item label="物料编码" class="my-description-item2">{{form.materialCode}}</el-descriptions-item>
<el-descriptions-item label="供应单位" class="my-description-item3">{{form.supplierName}}</el-descriptions-item>
<el-descriptions-item label="供应编码" class="my-description-item1">{{form.supplierCode}}</el-descriptions-item>
<el-descriptions-item label="库存数量" class="my-description-item2">{{form.quality}}</el-descriptions-item>
<el-descriptions-item label="单位" class="my-description-item3">{{form.unit}}</el-descriptions-item>
<el-descriptions-item label="检验依据" class="my-description-item1">{{form.standardNo}}</el-descriptions-item>
<el-descriptions-item label="报检日期" class="my-description-item2">{{ parseTime(form.createTime, '{y}-{m}-{d}') }}</el-descriptions-item>
<el-descriptions-item label="检验日期" class="my-description-item3">{{ parseTime(form.checkTime, '{y}-{m}-{d}') }}</el-descriptions-item>
</el-descriptions>
<el-row>
<el-col :span="24">
<!-- 检验项目明细 -->
<el-table v-loading="loading" :data="checkProjectList" >
<el-table-column type="selection" width="50" align="center" />
<el-table v-loading="loading" :data="checkProjectList" border :span-method="objectSpanMethod">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="检验项目" align="center" prop="ruleName" />
<el-table-column label="标准要求" align="center" prop="checkStandard" width="350"/>
@ -389,6 +323,22 @@ export default {
//
form: {},
checkTypes:[],
content_style: {
'text-align': 'center',
'min-width': '200px',
'word-break': 'break-all'
},
label_style: {
'color': '#000',
'text-align': 'center',
'font-weight': '600',
'height': '40px',
'background-color': '#d6dbe1',
'min-width': '100px',
'word-break': 'keep-all'
},
spanArr: [],
position: 0,
//
rules: {
/* incomeBatchNo: [
@ -479,6 +429,8 @@ export default {
delFlag: null,
};
this.spanArr = [];
this.position = 0;
this.resetForm("form");
},
/** 搜索按钮操作 */
@ -549,9 +501,9 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('quality/qcInventory/export', {
this.download('quality/qcInventoryReport/export', {
...this.queryParams
}, `inventory_${new Date().getTime()}.xlsx`)
}, `inventoryReport_${new Date().getTime()}.xlsx`)
},
/**获取检验项目列表 */
getCheckedProjectList(){
@ -560,6 +512,8 @@ export default {
this.checkProjectList = response.rows;
this.total = response.total;
this.loading = false;
this.rowspan()
});
},
// -
@ -586,7 +540,53 @@ export default {
getCodeValue(defectCode) {
const foundDefect = this.defectList.find(defect => defect.defectCode === defectCode);
return foundDefect.defectSubclass;
}
},
/**
* 1. 若是objectSpanMethod不返回任何东西表格不会变化
* 2. 最外层的判断一般是先从第几列开始合并
* 3. 这次从第0行合并2个下次就要从第3行开始合并0行加俩就到3行了
* 4. 这种方式是有多少条数据合并多少条数据比如本案例中有7条数据从第0条合并到第7条
* 5. return { rowspan: 0, colspan: 0 } //
* */
rowspan() {
this.checkProjectList.forEach((item, index) => {
if (index === 0) {
this.spanArr.push(1);
this.position = 0;
} else {
if (
this.checkProjectList[index].projectRuleName ===
this.checkProjectList[index - 1].projectRuleName
) {
this.spanArr[this.position] += 1;
this.spanArr.push(0);
} else {
this.spanArr.push(1);
this.position = index;
}
}
});
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
/**
if (columnIndex === 0) {
const _row = this.spanArr[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col,
};
}
**/
if (columnIndex === 1) {
const _row = this.spanArr[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col,
};
}
}
}
};
</script>
@ -603,4 +603,18 @@ export default {
margin-left: 15px;
height: 38px;
}
.my-description-item1 {
width: 280px; /* 或者你想要的任何宽度 */
}
.my-description-item2 {
width: 120px; /* 或者你想要的任何宽度 */
}
.my-description-item3 {
width: 80px; /* 或者你想要的任何宽度 */
}
.border-row {
border: 1px solid #d3dce6; /* 边框颜色可以根据需要自定义 */
text-align:center;
}
</style>

@ -632,7 +632,7 @@
<el-row>
<el-col :span="24">
<!-- 检验项目明细 -->
<el-table v-loading="loading" :data="checkProjectList" :span-method="objectSpanMethod" ><!---->
<el-table v-loading="loading" :data="checkProjectList" border :span-method="objectSpanMethod" ><!---->
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="检验项目" align="left" prop="projectRuleName" width="150"/>
<el-table-column label="内容" align="left" prop="ruleName" width="300"/>
@ -734,7 +734,7 @@ import ItemCheckProjects from "./ItemCheckProjects.vue";
import ItemCheckProjectsXJ from "./ItemCheckProjectsXJ.vue";
import moment from 'moment';
export default {
name: "Income",
name: "ProduceReport",
components: {ItemCheckProjects,ItemCheckProjectsXJ},
dicts: ["unit","check_status","check_result","qc_rule_prop","device_yes_no"],
data() {
@ -1061,9 +1061,9 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('quality/qcIncome/export', {
this.download('quality/qcProduceReport/export', {
...this.queryParams
}, `produce_${new Date().getTime()}.xlsx`)
}, `produceReport_${new Date().getTime()}.xlsx`)
},
/**获取检验项目列表 */
getCheckedProjectList(){

@ -258,7 +258,7 @@ import { getCheckTypes } from "@/api/quality/qcProduce";
import { getDefectTypeListByDefectType } from "@/api/quality/defectType.js";
import moment from 'moment';
export default {
name: "Income",
name: "ProductReport",
dicts: ["unit","check_status","check_result"],
data() {
return {
@ -523,9 +523,9 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('quality/qcIncome/export', {
this.download('quality/qcProductReport/export', {
...this.queryParams
}, `income_${new Date().getTime()}.xlsx`)
}, `ProductReport_${new Date().getTime()}.xlsx`)
},
/**获取检验项目列表 */
getCheckedProjectList(){

@ -14,7 +14,7 @@
v-model="queryParams.materialName"
placeholder="物料名称"
clearable
style="width: 240px"
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
@ -23,7 +23,16 @@
v-model="queryParams.materialCode"
placeholder="物料编码"
clearable
style="width: 240px"
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="订单号">
<el-input
v-model="queryParams.orderNo"
placeholder="订单号"
clearable
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>

@ -122,12 +122,15 @@
<el-button icon="el-icon-download" size="mini" @click="handleExport" type="warning">导出</el-button>
</el-form-item>
</el-form>
<el-tabs v-model="activeName" @tab-click="handleClick" style="height:400px;overflow-y: auro;">
<el-tabs v-model="activeName" style="height:400px;overflow-y: auro;">
<el-tab-pane label="报表数据" name="first" >
<el-table v-loading="loading" :data="tableList" height="400">
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" width="50" align="center" :index="indexMethod" label="序号"/>
<el-table-column label="CPK品类" align="center" prop="cpkTypeName" width="100" />
<el-table-column label="线体" align="center" prop="lineName" width="100" />
<el-table-column label="检验节点" align="center" prop="checkTypeName" width="100"/>
<el-table-column label="检测项" align="center" prop="ruleName" width="200" :show-overflow-tooltip="true"/>
<template v-for="(column, index) in showTitles">
<el-table-column align="center" width="100" :prop="column.id" :key="column.id" :label="column.titleName"/>
</template>

@ -353,9 +353,9 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/rfidProcess/export', {
this.download('quality/staticTable/getIncomeTableExport', {
...this.queryParams
}, `rfidProcess_${new Date().getTime()}.xlsx`)
}, `supplier_${new Date().getTime()}.xlsx`)
},
/**供应商选择弹出框**/
handleSelectSupplier() {

@ -62,7 +62,7 @@
<el-table v-loading="loading" :data="prepareList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="单编码" align="center" prop="orderNo" width="180">
<el-table-column label="单编码" align="center" prop="orderNo" width="180">
<template slot-scope="scope">
<el-button
type="text"
@ -70,6 +70,8 @@
>{{scope.row.orderNo}}</el-button>
</template>
</el-table-column>
<el-table-column prop="workorderCodeSap" label="订单编码" width="100" align="center"/>
<el-table-column prop="equipmentName" label="线体名称" width="100" align="center"/>
<el-table-column prop="incomeBatchNo" label="批次" width="300" align="center"/>
<el-table-column prop="incomeTimeStr" label="生产日期" width="100" align="center"/>
<el-table-column prop="materialName" label="产品名称"align="center"/>
@ -308,7 +310,7 @@ export default {
this.ids = selection.map(item => item.prepareId)
this.single = selection.length!==1
this.multiple = !selection.length
this.selectPrepare = selection
this.selectPrepare = selection
},
/** 新增按钮操作 */
handleAdd() {
@ -366,9 +368,9 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/prepare/export', {
this.download('quality/staticTable/getXJCheckExport', {
...this.queryParams
}, `prepare_${new Date().getTime()}.xlsx`)
}, `xjReport_${new Date().getTime()}.xlsx`)
}
}
};

Loading…
Cancel
Save