|
|
|
@ -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>
|
|
|
|
|