Merge remote-tracking branch 'origin/0.8.X' into 0.8.X
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<el-card class="mb8">
|
||||
<div slot="header" class="entry-header">
|
||||
<span class="entry-title">{{ activeReport.reportTitle }}</span>
|
||||
<el-tag size="mini" style="margin-left:6px">{{ activeReport.lineType==='acid'?'酸轧':'镀锌' }}</el-tag>
|
||||
<el-tag size="mini" style="margin-left:6px">{{ lineName(activeReport) }}</el-tag>
|
||||
<span class="entry-meta">{{ parseTime(activeReport.reportDate,'{y}-{m}-{d}') }} 投入{{ activeReport.inputWeight }}t 产出{{ activeReport.outputWeight }}t</span>
|
||||
<el-button type="primary" size="mini" style="float:right;margin-left:8px" @click="saveGrid" :loading="saving">保存</el-button>
|
||||
<el-button size="mini" style="float:right" @click="openColCfg">列配置</el-button>
|
||||
@@ -28,13 +28,15 @@
|
||||
<template v-for="col in allCols">
|
||||
<el-table-column v-if="col.$type==='detail' && !col.isShift" :key="'d'+col.itemId" :label="col.itemName+(col.unit?'('+col.unit+')':'')" width="105" align="center">
|
||||
<template slot-scope="s">
|
||||
<el-input v-model="s.row['q'+col.itemId]" size="mini" @input="recalcAll" />
|
||||
<el-input v-model="s.row['q'+col.itemId]" size="mini" @input="recalcAll">
|
||||
<i slot="suffix" v-if="col.queryCondition" :class="autoLoading[col.itemId]?'el-icon-loading':'el-icon-refresh'" style="cursor:pointer;font-size:13px;line-height:24px;color:#409eff" @click.stop="fetchAutoData(col, s.row)" />
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-else-if="col.$type==='detail' && col.isShift" :key="'ds'+col.itemId" :label="col.itemName+(col.unit?'('+col.unit+')':'')" width="120" align="center">
|
||||
<template slot-scope="s">
|
||||
<div class="shift-cell"><span class="shift-tag">甲</span><el-input v-model="s.row['q'+col.itemId+'_1']" size="mini" class="shift-input" @input="recalcAll" /></div>
|
||||
<div class="shift-cell"><span class="shift-tag">乙</span><el-input v-model="s.row['q'+col.itemId+'_2']" size="mini" class="shift-input" @input="recalcAll" /></div>
|
||||
<div class="shift-cell"><span class="shift-tag">甲</span><el-input v-model="s.row['q'+col.itemId+'_1']" size="mini" class="shift-input" @input="recalcAll"><i slot="suffix" v-if="col.queryCondition" :class="autoLoading[col.itemId]?'el-icon-loading':'el-icon-refresh'" style="cursor:pointer;font-size:12px;line-height:24px;color:#409eff" @click.stop="fetchAutoData(col, s.row, '1')" /></el-input></div>
|
||||
<div class="shift-cell"><span class="shift-tag">乙</span><el-input v-model="s.row['q'+col.itemId+'_2']" size="mini" class="shift-input" @input="recalcAll"><i slot="suffix" v-if="col.queryCondition" :class="autoLoading[col.itemId]?'el-icon-loading':'el-icon-refresh'" style="cursor:pointer;font-size:12px;line-height:24px;color:#409eff" @click.stop="fetchAutoData(col, s.row, '2')" /></el-input></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-else-if="col.$type==='metric' && !col.isShift" :key="'m'+col.mIdx" :label="col.metricName+(col.unit?'('+col.unit+')':'')" width="85" align="center">
|
||||
@@ -184,7 +186,7 @@
|
||||
<el-table :data="copyReports" border stripe size="mini" highlight-current-row @current-change="copySrc=$event">
|
||||
<el-table-column label="报表标题" prop="reportTitle" />
|
||||
<el-table-column label="日期" width="110"><template slot-scope="s">{{ parseTime(s.row.reportDate,'{y}-{m}-{d}') }}</template></el-table-column>
|
||||
<el-table-column label="产线" prop="lineType" width="70" />
|
||||
<el-table-column label="产线" width="70"><template slot-scope="s">{{ lineName(s.row) }}</template></el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer">
|
||||
<el-button type="primary" :disabled="!copySrc" @click="doCopyCfg">确认复制</el-button>
|
||||
@@ -211,7 +213,7 @@
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="报表标题" prop="reportTitle" />
|
||||
<el-table-column label="日期" width="120"><template slot-scope="s">{{ parseTime(s.row.reportDate,'{y}-{m}-{d}') }}</template></el-table-column>
|
||||
<el-table-column label="产线" prop="lineType" width="70" />
|
||||
<el-table-column label="产线" width="70"><template slot-scope="s">{{ lineName(s.row) }}</template></el-table-column>
|
||||
<el-table-column label="投入(t)" prop="inputWeight" width="80" />
|
||||
<el-table-column label="产出(t)" prop="outputWeight" width="80" />
|
||||
</el-table>
|
||||
@@ -221,7 +223,7 @@
|
||||
<el-form ref="rpf" :model="rpForm" :rules="{reportTitle:[{required:true,message:'请输入',trigger:'blur'}]}" label-width="100px">
|
||||
<el-form-item label="报表标题" prop="reportTitle"><el-input v-model="rpForm.reportTitle" /></el-form-item>
|
||||
<el-form-item label="报表日期" prop="reportDate"><el-date-picker v-model="rpForm.reportDate" type="date" value-format="yyyy-MM-dd" style="width:100%" /></el-form-item>
|
||||
<el-form-item label="产线类型" prop="lineType"><el-select v-model="rpForm.lineType" style="width:100%"><el-option label="酸轧" value="acid" /><el-option label="镀锌" value="galvanized" /></el-select></el-form-item>
|
||||
<el-form-item label="产线" prop="lineType"><el-select v-model="rpForm.lineType" style="width:100%" placeholder="请选择产线"><el-option v-for="ln in lineOptions" :key="ln.lineId" :label="ln.lineName" :value="ln.lineId" /></el-select></el-form-item>
|
||||
<el-form-item label="投入量(吨)" prop="inputWeight"><el-input-number v-model="rpForm.inputWeight" :precision="2" :min="0" style="width:100%" /></el-form-item>
|
||||
<el-form-item label="产出量(吨)" prop="outputWeight"><el-input-number v-model="rpForm.outputWeight" :precision="2" :min="0" style="width:100%" /></el-form-item>
|
||||
<el-form-item label="备注" prop="remark"><el-input v-model="rpForm.remark" type="textarea" /></el-form-item>
|
||||
@@ -249,6 +251,89 @@ import { listProdReport, getProdReport, addProdReport, updateProdReport, delProd
|
||||
import { listProdDetail, batchSaveProdDetail } from "@/api/cost/prodDetail"
|
||||
import { listProdMetric, addProdMetric, updateProdMetric, delProdMetric, getProdMetric } from "@/api/cost/prodMetric"
|
||||
import { listItem } from "@/api/cost/item"
|
||||
import { listLightPendingAction } from "@/api/wms/pendingAction"
|
||||
import { getCoilStatisticsList } from "@/api/wms/coil"
|
||||
import { listAuxiliaryConsume } from "@/api/eqp/auxiliaryConsume"
|
||||
import { listProductionLine } from "@/api/wms/productionLine"
|
||||
import { listRollGrindAll } from "@/api/mes/roll/rollGrind"
|
||||
|
||||
function parseDateRange(detailDate) {
|
||||
const d = (detailDate || '').slice(0, 10)
|
||||
return {
|
||||
startTime: d + ' 00:00:00',
|
||||
endTime: d + ' 23:59:59'
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动查询处理器注册表。
|
||||
* key: item.category, value: async (queryCondition, row, col, report, shift) => fetchedValue
|
||||
*/
|
||||
const queryHandlers = {}
|
||||
export function registerQueryHandler(category, handler) {
|
||||
queryHandlers[category] = handler
|
||||
}
|
||||
|
||||
const teamMap = { '1': '甲', '2': '乙' }
|
||||
|
||||
registerQueryHandler('原料', async (queryCondition, row, col, report, shift) => {
|
||||
if (!row.detailDate) return null
|
||||
const { startTime, endTime } = parseDateRange(row.detailDate)
|
||||
const res = await listLightPendingAction({ actionStatus: 2, actionTypes: queryCondition, startTime, endTime, pageSize: 99999 })
|
||||
const items = Array.isArray(res.data) ? res.data : (res.rows || [])
|
||||
const ids = [...new Set(items.map(i => i.coilId).filter(Boolean))]
|
||||
if (!ids.length) return null
|
||||
const params = { coilIds: ids.join(',') }
|
||||
if (shift && teamMap[shift]) params.team = teamMap[shift]
|
||||
const stat = await getCoilStatisticsList(params)
|
||||
const net = stat.data && stat.data.total_net_weight
|
||||
return net != null ? net : null
|
||||
})
|
||||
|
||||
registerQueryHandler('产出', async (queryCondition, row, col, report, shift) => {
|
||||
if (!row.detailDate) return null
|
||||
const { startTime, endTime } = parseDateRange(row.detailDate)
|
||||
const res = await listLightPendingAction({ actionStatus: 2, actionTypes: queryCondition, startTime, endTime, pageSize: 99999 })
|
||||
const items = Array.isArray(res.data) ? res.data : (res.rows || [])
|
||||
const ids = []
|
||||
for (const i of items) {
|
||||
if (i.processedCoilIds) {
|
||||
i.processedCoilIds.split(',').forEach(id => { id = id.trim(); if (id) ids.push(id) })
|
||||
}
|
||||
}
|
||||
if (!ids.length) return null
|
||||
const params = { coilIds: [...new Set(ids)].join(',') }
|
||||
if (shift && teamMap[shift]) params.team = teamMap[shift]
|
||||
const stat = await getCoilStatisticsList(params)
|
||||
const net = stat.data && stat.data.total_net_weight
|
||||
return net != null ? net : null
|
||||
})
|
||||
|
||||
registerQueryHandler('辅料', async (queryCondition, row, col, report, shift) => {
|
||||
if (!row.detailDate) return null
|
||||
const d = (row.detailDate || '').slice(0, 10)
|
||||
const res = await listAuxiliaryConsume({ recordDate: d, typeId: queryCondition, pageSize: 9999 })
|
||||
const items = res.rows || []
|
||||
const total = items.reduce((s, item) => s + (parseFloat(item.consume) || 0), 0)
|
||||
if (col.isShift) {
|
||||
const half = total / 2
|
||||
return [half, half]
|
||||
}
|
||||
return total || null
|
||||
})
|
||||
|
||||
registerQueryHandler('轧辊', async (queryCondition, row, col, report, shift) => {
|
||||
if (!row.detailDate || !report.lineType) return null
|
||||
const d = (row.detailDate || '').slice(0, 10)
|
||||
const params = { lineId: report.lineType, beginTime: d + ' 00:00:00', endTime: d + ' 23:59:59', rollType: queryCondition }
|
||||
if (shift && teamMap[shift]) params.team = teamMap[shift] + '班'
|
||||
const res = await listRollGrindAll(params)
|
||||
const items = res.data || []
|
||||
if (!items.length) return null
|
||||
let total = 0
|
||||
items.forEach(item => { total += parseFloat(item.grindAmount) || 0 })
|
||||
return total || null
|
||||
})
|
||||
|
||||
export default {
|
||||
name: "CostComprehensive",
|
||||
@@ -265,7 +350,9 @@ export default {
|
||||
metricPickOpen: false, metricPickList: [], selMp: [],
|
||||
mgrOpen: false, mgrList: [], defOpen: false, defTitle: '', defForm: {},
|
||||
copyCfgOpen: false, copyReports: [], copySrc: null,
|
||||
configOpen: false
|
||||
configOpen: false,
|
||||
autoLoading: {},
|
||||
lineOptions: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -286,7 +373,7 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: { configOpen(v) { if (!v) this.rpOpen = false } },
|
||||
created() { this.getTabList(); this.loadItems() },
|
||||
created() { this.getTabList(); this.loadItems(); this.loadLines() },
|
||||
methods: {
|
||||
/* report */
|
||||
getList() { this.loading = true; listProdReport(this.q).then(r=>{this.list=r.rows;this.total=r.total}).finally(()=>this.loading=false) },
|
||||
@@ -294,12 +381,22 @@ export default {
|
||||
search() { this.q.pageNum = 1; this.getList() },
|
||||
resetQ() { this.resetForm("qf"); this.search() },
|
||||
addRp() { this.rpForm = {}; this.rpTitle = "新增"; this.rpOpen = true },
|
||||
editRp(row) { const id = (row&&row.reportId)||this.selIds[0]; if(!id)return; getProdReport(id).then(r=>{this.rpForm=r.data;this.rpTitle="修改";this.rpOpen=true}) },
|
||||
editRp(row) {
|
||||
const id = (row&&row.reportId)||this.selIds[0]; if(!id)return
|
||||
getProdReport(id).then(r=>{
|
||||
const d = r.data || {}
|
||||
if (d.lineType) {
|
||||
const match = this.lineOptions.find(l => l.lineName.includes(d.lineType === 'acid' ? '酸轧' : '镀锌'))
|
||||
if (match) d.lineId = match.lineId
|
||||
}
|
||||
this.rpForm = d; this.rpTitle = "修改"; this.rpOpen = true
|
||||
})
|
||||
},
|
||||
submitRp() {
|
||||
this.$refs.rpf.validate(v=>{if(!v)return;this.rpBtnLoading=true;const fn=this.rpForm.reportId?updateProdReport:addProdReport;fn(this.rpForm).then(()=>{
|
||||
this.$modal.msgSuccess("成功"); this.rpOpen = false
|
||||
if (this.activeReport && this.activeReport.reportId === this.rpForm.reportId) {
|
||||
Object.assign(this.activeReport, { reportTitle: this.rpForm.reportTitle, reportDate: this.rpForm.reportDate, lineType: this.rpForm.lineType, inputWeight: this.rpForm.inputWeight, outputWeight: this.rpForm.outputWeight })
|
||||
Object.assign(this.activeReport, { reportTitle: this.rpForm.reportTitle, reportDate: this.rpForm.reportDate, lineId: this.rpForm.lineId, inputWeight: this.rpForm.inputWeight, outputWeight: this.rpForm.outputWeight })
|
||||
}
|
||||
this.getTabList(); this.getList()
|
||||
}).finally(()=>this.rpBtnLoading=false)})
|
||||
@@ -356,7 +453,7 @@ export default {
|
||||
batchAddDetailCols() {
|
||||
this.selAdd.forEach(item => {
|
||||
if (!this.allCols.find(c => c.$type === 'detail' && String(c.itemId) === String(item.itemId)))
|
||||
this.allCols.push({ $type: 'detail', itemId: item.itemId, itemCode: item.itemCode, itemName: item.itemName, unit: item.unit, isShift: false, color: null })
|
||||
this.allCols.push({ $type: 'detail', itemId: item.itemId, itemCode: item.itemCode, itemName: item.itemName, unit: item.unit, isShift: false, color: null, queryCondition: item.queryCondition, category: item.category })
|
||||
})
|
||||
this.showAddDetail = false; this.selAdd = []
|
||||
},
|
||||
@@ -456,7 +553,7 @@ export default {
|
||||
if (c.t === 'd') {
|
||||
const id = String(c.id)
|
||||
const item = this.allItems.find(i => String(i.itemId) === id)
|
||||
if (item) cols.push({ $type: 'detail', itemId: item.itemId, itemCode: item.itemCode, itemName: item.itemName, unit: item.unit, isShift: !!c.s, color: c.c || null })
|
||||
if (item) cols.push({ $type: 'detail', itemId: item.itemId, itemCode: item.itemCode, itemName: item.itemName, unit: item.unit, isShift: !!c.s, color: c.c || null, queryCondition: item.queryCondition, category: item.category })
|
||||
} else if (c.t === 'm') {
|
||||
const id = String(c.id)
|
||||
let def = (this._allMetricDefs || []).find(m => String(m.metricId) === id)
|
||||
@@ -554,7 +651,7 @@ export default {
|
||||
cols.forEach(sc => {
|
||||
if (sc.t === 'd') {
|
||||
const sid = String(sc.id)
|
||||
if (!usedIds.has(sid)) { const item = this.allItems.find(i=>String(i.itemId)===sid); if (item) { this.allCols.push({ $type:'detail', itemId:item.itemId, itemCode:item.itemCode, itemName:item.itemName, unit:item.unit, isShift:!!sc.s, color:sc.c||null }); usedIds.add(sid) } }
|
||||
if (!usedIds.has(sid)) { const item = this.allItems.find(i=>String(i.itemId)===sid); if (item) { this.allCols.push({ $type:'detail', itemId:item.itemId, itemCode:item.itemCode, itemName:item.itemName, unit:item.unit, isShift:!!sc.s, color:sc.c||null, queryCondition:item.queryCondition, category:item.category }); usedIds.add(sid) } }
|
||||
}
|
||||
else if (sc.t === 'm') {
|
||||
const sid = String(sc.id)
|
||||
@@ -566,7 +663,41 @@ export default {
|
||||
this.$modal.msgSuccess('配置已复用')
|
||||
},
|
||||
|
||||
/* auto fetch */
|
||||
async fetchAutoData(col, row, shift) {
|
||||
if (!col.queryCondition || this.autoLoading[col.itemId]) return
|
||||
const handler = queryHandlers[col.category] || queryHandlers['default']
|
||||
if (!handler) { this.$modal.msgWarning(`类别 "${col.category}" 未注册查询处理器`); return }
|
||||
this.$set(this.autoLoading, col.itemId, true)
|
||||
try {
|
||||
const val = await handler(col.queryCondition, row, col, this.activeReport, shift)
|
||||
if (val != null) {
|
||||
const round3 = n => Math.round(n * 1000) / 1000
|
||||
if (Array.isArray(val)) {
|
||||
this.$set(row, 'q' + col.itemId + '_1', round3(val[0]))
|
||||
this.$set(row, 'q' + col.itemId + '_2', round3(val[1]))
|
||||
} else {
|
||||
const key = 'q' + col.itemId + (shift ? '_' + shift : '')
|
||||
this.$set(row, key, round3(val))
|
||||
}
|
||||
this.recalcAll()
|
||||
}
|
||||
} catch (e) {
|
||||
this.$modal.msgError('自动获取数据失败')
|
||||
} finally {
|
||||
this.$set(this.autoLoading, col.itemId, false)
|
||||
}
|
||||
},
|
||||
|
||||
/* helpers */
|
||||
async loadLines() { const r = await listProductionLine({ pageSize: 999 }); this.lineOptions = r.rows || [] },
|
||||
lineName(row) {
|
||||
if (row.lineType) {
|
||||
const found = this.lineOptions.find(l => l.lineId == row.lineType);
|
||||
if (found) return found.lineName
|
||||
else return row.lineType || '-'
|
||||
}
|
||||
},
|
||||
async loadItems() { if (!this.allItems.length) { const r = await listItem({ pageNum:1, pageSize:999 }); this.allItems = r.rows || [] } },
|
||||
async loadAllMetrics(rid) {
|
||||
const q = { pageNum:1, pageSize:99999 }; if (rid) q.reportId = rid
|
||||
|
||||
@@ -367,12 +367,13 @@ export default {
|
||||
<td colspan="4" style="border:1px solid #000;padding:3px 6px;font-weight:bold;text-align:left;">产品名称:${productData.productName || ''}</td>
|
||||
<td colspan="${colCount - 4 > 0 ? colCount - 4 : 1}" style="border:1px solid #000;padding:3px 6px;font-weight:bold;text-align:left;">生产厂家:嘉祥科伦普重工有限公司</td>
|
||||
</tr>
|
||||
<tr style="background-color:#f5f5f5;">${headerCells}</tr>
|
||||
<tr>${headerCells}</tr>
|
||||
${bodyRows}
|
||||
<tr>${totalCells}</tr>
|
||||
<tr>
|
||||
<td colspan="${colCount}" style="border:1px solid #000;padding:4px 6px;font-weight:bold;text-align:left;">合计人民币(大写):${totalAmountInWords}</td>
|
||||
</tr>
|
||||
${productData.remark ? `<tr><td colspan="${colCount}" style="border:1px solid #000;padding:4px 6px;text-align:left;">备注:${productData.remark}</td></tr>` : ''}
|
||||
</table>`;
|
||||
return html;
|
||||
},
|
||||
@@ -429,7 +430,7 @@ export default {
|
||||
.section-title { font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 8px; }
|
||||
table { width: 100%; border-collapse: collapse; }
|
||||
th, td { border: 1px solid #000; padding: 3px 4px; text-align: center; font-size: 11px; }
|
||||
th { background-color: #f5f5f5; font-weight: bold; }
|
||||
th { font-weight: bold; }
|
||||
.sign-section { margin-top: 24px; font-size: 12px; line-height: 2.2; }
|
||||
.sign-section .col { width: 48%; }
|
||||
.sign-row { display: flex; justify-content: space-between; }
|
||||
@@ -437,13 +438,13 @@ export default {
|
||||
</head>
|
||||
<body>
|
||||
<div class="a4-page" style="position:relative;">
|
||||
<img src="${contractLogo}" style="position:absolute;left:20px;top:20px;height:80px;" crossorigin="anonymous" />
|
||||
<img src="${contractLogo}" style="position:absolute;left:40px;top:40px;height:80px;" crossorigin="anonymous" />
|
||||
<div style="text-align:center;padding-top:10px;">
|
||||
<div style="font-size:20px;font-weight:bold;letter-spacing:2px;">嘉祥科伦普重工有限公司</div>
|
||||
</div>
|
||||
<div style="display:flex;justify-content:center;align-items:baseline;margin:12px 0 8px 0;">
|
||||
<div style="position:relative;margin:12px 0 8px 0;text-align:center;">
|
||||
<div style="font-size:22px;font-weight:bold;letter-spacing:6px;">产 品 销 售 合 同</div>
|
||||
<div style="font-size:11px;margin-left:40px;">合同编号:${row.contractCode || ''}</div>
|
||||
<div style="position:absolute;right:0;top:50%;transform:translateY(-50%);font-size:11px;">合同编号:${row.contractCode || ''}</div>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<div style="width:55%;">
|
||||
@@ -543,9 +544,9 @@ export default {
|
||||
<div style="text-align:center;padding-top:10px;">
|
||||
<div style="font-size:20px;font-weight:bold;letter-spacing:2px;">嘉祥科伦普重工有限公司</div>
|
||||
</div>
|
||||
<div style="display:flex;justify-content:center;align-items:baseline;margin:12px 0 8px 0;">
|
||||
<div style="position:relative;margin:12px 0 8px 0;text-align:center;">
|
||||
<div style="font-size:22px;font-weight:bold;letter-spacing:6px;">产 品 销 售 合 同</div>
|
||||
<div style="font-size:11px;margin-left:40px;">合同编号:${row.contractCode || ''}</div>
|
||||
<div style="position:absolute;right:0;top:50%;transform:translateY(-50%);font-size:11px;">合同编号:${row.contractCode || ''}</div>
|
||||
</div>
|
||||
<div style="display:flex;justify-content:space-between;margin-bottom:8px;font-size:13px;line-height:2;">
|
||||
<div style="width:55%;">
|
||||
|
||||
@@ -63,23 +63,21 @@
|
||||
</div>
|
||||
<div class="table-cell">
|
||||
<el-input v-model.number="item.taxDivisor" placeholder="税率除数" type="number" :readonly="readonly"
|
||||
size="small" @change="onTaxDivisorChange(item)" />
|
||||
size="small" />
|
||||
</div>
|
||||
<div class="table-cell">
|
||||
<el-input v-model.number="item.noTaxPrice" placeholder="无税单价" type="number" :readonly="readonly"
|
||||
size="small" @change="onNoTaxPriceChange(item)" />
|
||||
size="small" />
|
||||
</div>
|
||||
<div class="table-cell">
|
||||
<el-input v-model.number="item.taxTotal" placeholder="含税总额" type="number" :readonly="readonly" size="small"
|
||||
@change="onTaxTotalChange(item)" />
|
||||
<el-input v-model.number="item.taxTotal" placeholder="含税总额" type="number" :readonly="readonly" size="small" />
|
||||
</div>
|
||||
<div class="table-cell">
|
||||
<el-input v-model.number="item.noTaxTotal" placeholder="无税总额" type="number" :readonly="readonly"
|
||||
size="small" @change="onNoTaxTotalChange(item)" />
|
||||
size="small" />
|
||||
</div>
|
||||
<div class="table-cell">
|
||||
<el-input v-model.number="item.taxAmount" placeholder="税额" type="number" :readonly="readonly" size="small"
|
||||
@change="onTaxAmountChange(item)" />
|
||||
<el-input v-model.number="item.taxAmount" placeholder="税额" type="number" :readonly="readonly" size="small" />
|
||||
</div>
|
||||
<div class="table-cell">
|
||||
<el-input v-model="item.remark" placeholder="请输入备注" :readonly="readonly" size="small" />
|
||||
@@ -260,26 +258,7 @@ export default {
|
||||
onTaxPriceChange(item) {
|
||||
Object.assign(item, calculateProductFields(item, 'taxPrice'));
|
||||
},
|
||||
// 税率除数变更
|
||||
onTaxDivisorChange(item) {
|
||||
Object.assign(item, calculateProductFields(item, 'taxDivisor'));
|
||||
},
|
||||
// 无税单价变更
|
||||
onNoTaxPriceChange(item) {
|
||||
Object.assign(item, calculateProductFields(item, 'noTaxPrice'));
|
||||
},
|
||||
// 含税总额变更
|
||||
onTaxTotalChange(item) {
|
||||
Object.assign(item, calculateProductFields(item, 'taxTotal'));
|
||||
},
|
||||
// 无税总额变更
|
||||
onNoTaxTotalChange(item) {
|
||||
Object.assign(item, calculateProductFields(item, 'noTaxTotal'));
|
||||
},
|
||||
// 税额变更
|
||||
onTaxAmountChange(item) {
|
||||
Object.assign(item, calculateProductFields(item, 'taxAmount'));
|
||||
},
|
||||
|
||||
// 计算金额
|
||||
calculateTotals() {
|
||||
this.products.forEach(item => {
|
||||
|
||||
@@ -207,7 +207,8 @@
|
||||
:visible="true"
|
||||
:preview="true"
|
||||
:certificate="previewData"
|
||||
:items="previewItems"
|
||||
:items="previewItems"
|
||||
:template-type="selectedTemplateType"
|
||||
/>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -222,8 +223,27 @@
|
||||
v-show="false"
|
||||
ref="hiddenPrintComponent"
|
||||
:certificate="printCertificateData"
|
||||
:items="printItemsData"
|
||||
:items="printItemsData"
|
||||
:template-type="selectedTemplateType"
|
||||
/>
|
||||
|
||||
<!-- 模板选择对话框 -->
|
||||
<el-dialog title="选择质保书模板" :visible.sync="templateDialogVisible" width="500px" append-to-body>
|
||||
<div class="template-selection">
|
||||
<el-radio-group v-model="selectedTemplateType" class="template-radio-group">
|
||||
<el-radio v-for="option in templateOptions" :key="option.value" :label="option.value" class="template-radio">
|
||||
<div class="template-option">
|
||||
<i class="el-icon-document"></i>
|
||||
<span>{{ option.label }}</span>
|
||||
</div>
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="confirmTemplate">确 定</el-button>
|
||||
<el-button @click="templateDialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -231,6 +251,7 @@
|
||||
import { listCertificate, getCertificate, delCertificate, addCertificate, updateCertificate } from "@/api/mes/qc/certificate";
|
||||
import { listCertificateItem } from "@/api/mes/qc/certificateItem";
|
||||
import CertificatePrintPreview from "./components/CertificatePrintPreview.vue";
|
||||
import { templateOptions } from "./components/templates";
|
||||
import { print as printPdf, downloadPdf } from "./lib/printUtils";
|
||||
|
||||
export default {
|
||||
@@ -240,6 +261,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
templateOptions,
|
||||
buttonLoading: false,
|
||||
loading: true,
|
||||
ids: [],
|
||||
@@ -258,6 +280,10 @@ export default {
|
||||
printComponentVisible: false,
|
||||
printCertificateData: {},
|
||||
printItemsData: [],
|
||||
templateDialogVisible: false,
|
||||
selectedTemplateType: 'chromium',
|
||||
templateActionType: 'print',
|
||||
templateDialogResolve: null,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@@ -449,6 +475,10 @@ export default {
|
||||
},
|
||||
/** 预览按钮操作 */
|
||||
async handlePreview(row) {
|
||||
this.templateActionType = 'preview';
|
||||
const confirmed = await this.showTemplateDialog();
|
||||
if (!confirmed) return;
|
||||
|
||||
const certificateId = row.certificateId;
|
||||
this.loading = true;
|
||||
try {
|
||||
@@ -468,6 +498,10 @@ export default {
|
||||
},
|
||||
/** 打印按钮操作 */
|
||||
async handlePrint(row) {
|
||||
this.templateActionType = 'print';
|
||||
const confirmed = await this.showTemplateDialog();
|
||||
if (!confirmed) return;
|
||||
|
||||
const certificateId = row.certificateId;
|
||||
await this.preparePrintComponent(certificateId);
|
||||
await this.$nextTick();
|
||||
@@ -517,6 +551,19 @@ export default {
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
showTemplateDialog() {
|
||||
return new Promise((resolve) => {
|
||||
this.templateDialogResolve = resolve;
|
||||
this.templateDialogVisible = true;
|
||||
});
|
||||
},
|
||||
confirmTemplate() {
|
||||
this.templateDialogVisible = false;
|
||||
if (this.templateDialogResolve) {
|
||||
this.templateDialogResolve(true);
|
||||
this.templateDialogResolve = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -538,4 +585,46 @@ export default {
|
||||
color: #1f79b9;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.template-selection {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.template-radio-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.template-radio {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
padding: 15px;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 8px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.template-radio:hover {
|
||||
border-color: #409eff;
|
||||
background-color: #ecf5ff;
|
||||
}
|
||||
|
||||
.template-radio.is-checked {
|
||||
border-color: #409eff;
|
||||
background-color: #ecf5ff;
|
||||
}
|
||||
|
||||
.template-option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.template-option i {
|
||||
font-size: 20px;
|
||||
color: #409eff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,131 +1,18 @@
|
||||
<template>
|
||||
<div class="certificate-print-container" :class="{ 'is-hidden': !preview }">
|
||||
<div ref="certificateContent" class="certificate-pdf-content" :class="{ 'is-preview': preview }">
|
||||
<div class="pdf-header">
|
||||
<div class="header-left">
|
||||
<img src="@/assets/logo/logo.png" class="company-logo" alt="logo" />
|
||||
<div class="company-name-cn">科伦普</div>
|
||||
<div class="company-name-en">KE LUN PU</div>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<div class="main-title">产品质量证明书</div>
|
||||
<div class="main-title-en">PRODUCT QUALITY CERTIFICATE</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="company-full-name">嘉祥科伦普重工有限公司</div>
|
||||
<div class="company-address">山东省济宁市嘉祥县化工园区</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pdf-body">
|
||||
<table class="info-table">
|
||||
<tr>
|
||||
<td class="label-cell">执行标准(SPECIFICATION):</td>
|
||||
<td class="value-cell">{{ certificate.standard || '/' }}</td>
|
||||
<td class="label-cell">证明书号(CERTIFICATE NO.):</td>
|
||||
<td class="value-cell">{{ certificate.certificateNo || '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label-cell">收货单位(CONSIGNEE):</td>
|
||||
<td class="value-cell">{{ certificate.consignee || '-' }}</td>
|
||||
<td class="label-cell">合同号(CONTRACT NO.):</td>
|
||||
<td class="value-cell">{{ certificate.contractNo || '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label-cell">产品名称(PRODUCT):</td>
|
||||
<td class="value-cell">{{ certificate.productName || '' }}</td>
|
||||
<td class="label-cell">签发日期(DATE OF ISSUE):</td>
|
||||
<td class="value-cell">{{ formatDate(certificate.issueDate) || '' }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">序号</th>
|
||||
<th rowspan="2">钢卷号<br>Coil No.</th>
|
||||
<th rowspan="2">炉号<br>Heat No.</th>
|
||||
<th rowspan="2">材质<br>Type</th>
|
||||
<th rowspan="2">规格 Size<br>(mm)</th>
|
||||
<th rowspan="2">件数<br>Pieces</th>
|
||||
<th rowspan="2">重量<br>Weight(t)</th>
|
||||
<th colspan="6">化学成分(%)<br>Chemical Composition</th>
|
||||
<th colspan="3">拉伸试验 Tensile Test<br>(G.L=80mm)</th>
|
||||
<th rowspan="2">硬度试验<br>Hardness Test</th>
|
||||
<th rowspan="2">弯曲试验<br>180° B.T<br>D=0a</th>
|
||||
<th rowspan="2">表面质量</th>
|
||||
<th rowspan="2">表面结构</th>
|
||||
<th rowspan="2">边缘状态</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>C</th>
|
||||
<th>Si</th>
|
||||
<th>Mn</th>
|
||||
<th>P</th>
|
||||
<th>S</th>
|
||||
<th>Als</th>
|
||||
<th>屈服 RP0.2<br>Y.S(MPa)</th>
|
||||
<th>抗拉 T.S<br>(MPa)</th>
|
||||
<th>伸长率 EL<br>(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in items" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.coilNo || '' }}</td>
|
||||
<td>{{ item.heatNo || '' }}</td>
|
||||
<td>{{ item.materialType || '' }}</td>
|
||||
<td>{{ item.size || '' }}</td>
|
||||
<td>{{ item.pieces || '' }}</td>
|
||||
<td>{{ item.weight || '' }}</td>
|
||||
<td>{{ item.c || '/' }}</td>
|
||||
<td>{{ item.si || '/' }}</td>
|
||||
<td>{{ item.mn || '/' }}</td>
|
||||
<td>{{ item.p || '/' }}</td>
|
||||
<td>{{ item.s || '/' }}</td>
|
||||
<td>{{ item.als || '/' }}</td>
|
||||
<td>{{ item.yieldStrength || '/' }}</td>
|
||||
<td>{{ item.tensileStrength || '/' }}</td>
|
||||
<td>{{ item.elongation || '/' }}</td>
|
||||
<td>{{ item.hardness || '/' }}</td>
|
||||
<td>{{ item.bendingTest || '/' }}</td>
|
||||
<td>{{ item.surfaceQuality || '/' }}</td>
|
||||
<td>{{ item.surfaceStructure || '/' }}</td>
|
||||
<td>{{ item.edgeStatus || '/' }}</td>
|
||||
</tr>
|
||||
<tr v-if="items.length === 0">
|
||||
<td colspan="21" class="empty-cell">暂无数据</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class="footer-table">
|
||||
<tr>
|
||||
<td class="footer-label">注释<br>NOTE</td>
|
||||
<td class="footer-content">
|
||||
<pre>{{ certificate.note || '/' }}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer-label">备注<br>REMARK</td>
|
||||
<td class="footer-content footer-remark-cell">
|
||||
<pre class="remark-text">{{ certificate.remark || '/' }}</pre>
|
||||
<div class="signature-area">
|
||||
<img v-if="certificate.approveStatus === 'PASSED'" src="@/assets/images/zhijian.png" class="stamp-image" alt="质检专用章" />
|
||||
<div class="signature-block">
|
||||
<div class="signature-label">质量负责人:</div>
|
||||
<img v-if="certificate.approveStatus === 'PASSED'" src="@/assets/images/yanghongyan.png" class="signature-image" alt="签名" />
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<component
|
||||
:is="currentTemplate"
|
||||
:certificate="certificate"
|
||||
:items="items"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { templateMap } from './templates';
|
||||
|
||||
export default {
|
||||
name: 'CertificatePrintPreview',
|
||||
props: {
|
||||
@@ -140,13 +27,15 @@ export default {
|
||||
preview: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
templateType: {
|
||||
type: String,
|
||||
default: 'chromium'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatDate(dateStr) {
|
||||
if (!dateStr) return '';
|
||||
const date = new Date(dateStr);
|
||||
return `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`;
|
||||
computed: {
|
||||
currentTemplate() {
|
||||
return templateMap[this.templateType] || templateMap.chromium;
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -178,207 +67,4 @@ export default {
|
||||
font-family: "SimSun", "宋体", Arial, sans-serif;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
.pdf-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 8px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.header-left {
|
||||
text-align: center;
|
||||
width: 90px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.company-logo {
|
||||
width: 70px;
|
||||
height: auto;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.company-name-cn {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.company-name-en {
|
||||
font-size: 9px;
|
||||
color: #333;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.header-center {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
letter-spacing: 4px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.main-title-en {
|
||||
font-size: 13px;
|
||||
color: #000;
|
||||
font-family: "Times New Roman", serif;
|
||||
letter-spacing: 1px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.header-right {
|
||||
text-align: right;
|
||||
width: 160px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.company-full-name {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.company-address {
|
||||
font-size: 10px;
|
||||
color: #333;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.pdf-body {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.info-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.info-table td {
|
||||
border: 1px solid #000;
|
||||
padding: 3px 6px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.info-table .label-cell {
|
||||
font-weight: bold;
|
||||
width: 22%;
|
||||
white-space: nowrap;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.info-table .value-cell {
|
||||
width: 28%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.data-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 0;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.data-table th,
|
||||
.data-table td {
|
||||
border: 1px solid #000;
|
||||
padding: 2px 3px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.data-table th {
|
||||
background-color: #f0f0f0;
|
||||
font-weight: bold;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.data-table td {
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.empty-cell {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.footer-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 0;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.footer-table td {
|
||||
border: 1px solid #000;
|
||||
padding: 4px 6px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.footer-label {
|
||||
font-weight: bold;
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-size: 9px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
font-size: 9px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.footer-remark-cell {
|
||||
position: relative;
|
||||
padding-right: 140px;
|
||||
}
|
||||
|
||||
.remark-text {
|
||||
font-size: 9px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.signature-area {
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
bottom: 8px;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.stamp-image {
|
||||
width: 80px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.signature-block {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.signature-label {
|
||||
font-size: 9px;
|
||||
margin-bottom: 2px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.signature-image {
|
||||
height: 35px;
|
||||
width: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,347 @@
|
||||
<template>
|
||||
<div class="certificate-content">
|
||||
<div class="pdf-header">
|
||||
<div class="header-left">
|
||||
<img src="@/assets/logo/logo.png" class="company-logo" alt="logo" />
|
||||
<div class="company-name-cn">科伦普</div>
|
||||
<div class="company-name-en">KE LUN PU</div>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<div class="main-title">镀铬产品质量证明书</div>
|
||||
<div class="main-title-en">CHROMIUM PLATED PRODUCT QUALITY CERTIFICATE</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="company-full-name">嘉祥科伦普重工有限公司</div>
|
||||
<div class="company-address">山东省济宁市嘉祥县化工园区</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pdf-body">
|
||||
<table class="info-table">
|
||||
<tr>
|
||||
<td class="label-cell">执行标准(SPECIFICATION):</td>
|
||||
<td class="value-cell">{{ certificate.standard || '/' }}</td>
|
||||
<td class="label-cell">证明书号(CERTIFICATE NO.):</td>
|
||||
<td class="value-cell">{{ certificate.certificateNo || '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label-cell">收货单位(CONSIGNEE):</td>
|
||||
<td class="value-cell">{{ certificate.consignee || '-' }}</td>
|
||||
<td class="label-cell">合同号(CONTRACT NO.):</td>
|
||||
<td class="value-cell">{{ certificate.contractNo || '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label-cell">产品名称(PRODUCT):</td>
|
||||
<td class="value-cell">{{ certificate.productName || '' }}</td>
|
||||
<td class="label-cell">签发日期(DATE OF ISSUE):</td>
|
||||
<td class="value-cell">{{ formatDate(certificate.issueDate) || '' }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">序号</th>
|
||||
<th rowspan="2">批号</th>
|
||||
<th rowspan="2">原料号</th>
|
||||
<th rowspan="2">规格 Size<br>(mm)</th>
|
||||
<th rowspan="2">件数<br>Pieces</th>
|
||||
<th rowspan="2">重量<br>Weight(t)</th>
|
||||
<th colspan="6">化学成分(%)<br>Chemical Composition</th>
|
||||
<th rowspan="2">规定塑性<br>延伸强度<br>(MPa)</th>
|
||||
<th rowspan="2">硬度H.T</th>
|
||||
<th rowspan="2">调质度</th>
|
||||
<th rowspan="2">表面状态</th>
|
||||
<th rowspan="2">CMHR30T<br>SmT.Sn</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>C</th>
|
||||
<th>Si</th>
|
||||
<th>Mn</th>
|
||||
<th>P</th>
|
||||
<th>S</th>
|
||||
<th>Als</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in items" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.coilNo || '' }}</td>
|
||||
<td>{{ item.rawCoilNo || '' }}</td>
|
||||
<td>{{ item.size || '' }}</td>
|
||||
<td>{{ item.pieces || '' }}</td>
|
||||
<td>{{ item.weight || '' }}</td>
|
||||
<td>{{ item.c || '/' }}</td>
|
||||
<td>{{ item.si || '/' }}</td>
|
||||
<td>{{ item.mn || '/' }}</td>
|
||||
<td>{{ item.p || '/' }}</td>
|
||||
<td>{{ item.s || '/' }}</td>
|
||||
<td>{{ item.als || '/' }}</td>
|
||||
<td>{{ item.plasticExtensionStrength || '/' }}</td>
|
||||
<td>{{ item.hardness || '/' }}</td>
|
||||
<td>{{ item.temperDegree || '/' }}</td>
|
||||
<td>{{ item.surfaceQuality || '/' }}</td>
|
||||
<td>{{ item.coatingMass || '/' }}</td>
|
||||
</tr>
|
||||
<tr v-if="items.length === 0">
|
||||
<td colspan="17" class="empty-cell">暂无数据</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class="footer-table">
|
||||
<tr>
|
||||
<td class="footer-label">注释<br>NOTE</td>
|
||||
<td class="footer-content">
|
||||
<pre>{{ certificate.note || '/' }}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer-label">备注<br>REMARK</td>
|
||||
<td class="footer-content footer-remark-cell">
|
||||
<pre class="remark-text">{{ certificate.remark || '/' }}</pre>
|
||||
<div class="signature-area">
|
||||
<img v-if="certificate.approveStatus === 'PASSED'" src="@/assets/images/zhijian.png" class="stamp-image" alt="质检专用章" />
|
||||
<div class="signature-block">
|
||||
<div class="signature-label">质量负责人:</div>
|
||||
<img v-if="certificate.approveStatus === 'PASSED'" src="@/assets/images/yanghongyan.png" class="signature-image" alt="签名" />
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ChromiumTemplate',
|
||||
props: {
|
||||
certificate: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
items: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatDate(dateStr) {
|
||||
if (!dateStr) return '';
|
||||
const date = new Date(dateStr);
|
||||
return `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.certificate-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.pdf-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 8px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.header-left {
|
||||
text-align: center;
|
||||
width: 90px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.company-logo {
|
||||
width: 70px;
|
||||
height: auto;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.company-name-cn {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.company-name-en {
|
||||
font-size: 9px;
|
||||
color: #333;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.header-center {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
letter-spacing: 4px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.main-title-en {
|
||||
font-size: 13px;
|
||||
color: #000;
|
||||
font-family: "Times New Roman", serif;
|
||||
letter-spacing: 1px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.header-right {
|
||||
text-align: right;
|
||||
width: 160px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.company-full-name {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.company-address {
|
||||
font-size: 10px;
|
||||
color: #333;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.pdf-body {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.info-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.info-table td {
|
||||
border: 1px solid #000;
|
||||
padding: 3px 6px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.info-table .label-cell {
|
||||
font-weight: bold;
|
||||
width: 22%;
|
||||
white-space: nowrap;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.info-table .value-cell {
|
||||
width: 28%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.data-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 0;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.data-table th,
|
||||
.data-table td {
|
||||
border: 1px solid #000;
|
||||
padding: 2px 3px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.data-table th {
|
||||
background-color: #f0f0f0;
|
||||
font-weight: bold;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.data-table td {
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.empty-cell {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.footer-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 0;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.footer-table td {
|
||||
border: 1px solid #000;
|
||||
padding: 4px 6px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.footer-label {
|
||||
font-weight: bold;
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-size: 9px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
font-size: 9px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.footer-remark-cell {
|
||||
position: relative;
|
||||
padding-right: 140px;
|
||||
}
|
||||
|
||||
.remark-text {
|
||||
font-size: 9px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.signature-area {
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
bottom: 8px;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.stamp-image {
|
||||
width: 80px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.signature-block {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.signature-label {
|
||||
font-size: 9px;
|
||||
margin-bottom: 2px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.signature-image {
|
||||
height: 35px;
|
||||
width: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,356 @@
|
||||
<template>
|
||||
<div class="certificate-content">
|
||||
<div class="pdf-header">
|
||||
<div class="header-left">
|
||||
<img src="@/assets/logo/logo.png" class="company-logo" alt="logo" />
|
||||
<div class="company-name-cn">科伦普</div>
|
||||
<div class="company-name-en">KE LUN PU</div>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<div class="main-title">冷硬产品质量证明书</div>
|
||||
<div class="main-title-en">COLD HARD PRODUCT QUALITY CERTIFICATE</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="company-full-name">嘉祥科伦普重工有限公司</div>
|
||||
<div class="company-address">山东省济宁市嘉祥县化工园区</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pdf-body">
|
||||
<table class="info-table">
|
||||
<tr>
|
||||
<td class="label-cell">执行标准(SPECIFICATION):</td>
|
||||
<td class="value-cell">{{ certificate.standard || '/' }}</td>
|
||||
<td class="label-cell">证明书号(CERTIFICATE NO.):</td>
|
||||
<td class="value-cell">{{ certificate.certificateNo || '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label-cell">收货单位(CONSIGNEE):</td>
|
||||
<td class="value-cell">{{ certificate.consignee || '-' }}</td>
|
||||
<td class="label-cell">合同号(CONTRACT NO.):</td>
|
||||
<td class="value-cell">{{ certificate.contractNo || '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label-cell">产品名称(PRODUCT):</td>
|
||||
<td class="value-cell">{{ certificate.productName || '' }}</td>
|
||||
<td class="label-cell">签发日期(DATE OF ISSUE):</td>
|
||||
<td class="value-cell">{{ formatDate(certificate.issueDate) || '' }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">序号</th>
|
||||
<th rowspan="2">钢卷号<br>Coil No.</th>
|
||||
<th rowspan="2">炉号<br>Heat No.</th>
|
||||
<th rowspan="2">材质<br>Type</th>
|
||||
<th rowspan="2">规格 Size<br>(mm)</th>
|
||||
<th rowspan="2">件数<br>Pieces</th>
|
||||
<th rowspan="2">重量<br>Weight(t)</th>
|
||||
<th colspan="6">化学成分(%)<br>Chemical Composition</th>
|
||||
<th colspan="3">拉伸试验 Tensile Test<br>(G.L=80mm)</th>
|
||||
<th rowspan="2">硬度试验<br>Hardness Test</th>
|
||||
<th rowspan="2">弯曲试验<br>180° B.T<br>D=0a</th>
|
||||
<th rowspan="2">表面质量</th>
|
||||
<th rowspan="2">表面结构</th>
|
||||
<th rowspan="2">边缘状态</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>C</th>
|
||||
<th>Si</th>
|
||||
<th>Mn</th>
|
||||
<th>P</th>
|
||||
<th>S</th>
|
||||
<th>Als</th>
|
||||
<th>屈服 RP0.2<br>Y.S(MPa)</th>
|
||||
<th>抗拉 T.S<br>(MPa)</th>
|
||||
<th>伸长率 EL<br>(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in items" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.coilNo || '' }}</td>
|
||||
<td>{{ item.heatNo || '' }}</td>
|
||||
<td>{{ item.materialType || '' }}</td>
|
||||
<td>{{ item.size || '' }}</td>
|
||||
<td>{{ item.pieces || '' }}</td>
|
||||
<td>{{ item.weight || '' }}</td>
|
||||
<td>{{ item.c || '/' }}</td>
|
||||
<td>{{ item.si || '/' }}</td>
|
||||
<td>{{ item.mn || '/' }}</td>
|
||||
<td>{{ item.p || '/' }}</td>
|
||||
<td>{{ item.s || '/' }}</td>
|
||||
<td>{{ item.als || '/' }}</td>
|
||||
<td>{{ item.yieldStrength || '/' }}</td>
|
||||
<td>{{ item.tensileStrength || '/' }}</td>
|
||||
<td>{{ item.elongation || '/' }}</td>
|
||||
<td>{{ item.hardness || '/' }}</td>
|
||||
<td>{{ item.bendingTest || '/' }}</td>
|
||||
<td>{{ item.surfaceQuality || '/' }}</td>
|
||||
<td>{{ item.surfaceStructure || '/' }}</td>
|
||||
<td>{{ item.edgeStatus || '/' }}</td>
|
||||
</tr>
|
||||
<tr v-if="items.length === 0">
|
||||
<td colspan="21" class="empty-cell">暂无数据</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class="footer-table">
|
||||
<tr>
|
||||
<td class="footer-label">注释<br>NOTE</td>
|
||||
<td class="footer-content">
|
||||
<pre>{{ certificate.note || '/' }}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer-label">备注<br>REMARK</td>
|
||||
<td class="footer-content footer-remark-cell">
|
||||
<pre class="remark-text">{{ certificate.remark || '/' }}</pre>
|
||||
<div class="signature-area">
|
||||
<img v-if="certificate.approveStatus === 'PASSED'" src="@/assets/images/zhijian.png" class="stamp-image" alt="质检专用章" />
|
||||
<div class="signature-block">
|
||||
<div class="signature-label">质量负责人:</div>
|
||||
<img v-if="certificate.approveStatus === 'PASSED'" src="@/assets/images/yanghongyan.png" class="signature-image" alt="签名" />
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ColdHardTemplate',
|
||||
props: {
|
||||
certificate: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
items: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatDate(dateStr) {
|
||||
if (!dateStr) return '';
|
||||
const date = new Date(dateStr);
|
||||
return `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.certificate-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.pdf-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 8px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.header-left {
|
||||
text-align: center;
|
||||
width: 90px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.company-logo {
|
||||
width: 70px;
|
||||
height: auto;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.company-name-cn {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.company-name-en {
|
||||
font-size: 9px;
|
||||
color: #333;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.header-center {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
letter-spacing: 4px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.main-title-en {
|
||||
font-size: 13px;
|
||||
color: #000;
|
||||
font-family: "Times New Roman", serif;
|
||||
letter-spacing: 1px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.header-right {
|
||||
text-align: right;
|
||||
width: 160px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.company-full-name {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.company-address {
|
||||
font-size: 10px;
|
||||
color: #333;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.pdf-body {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.info-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.info-table td {
|
||||
border: 1px solid #000;
|
||||
padding: 3px 6px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.info-table .label-cell {
|
||||
font-weight: bold;
|
||||
width: 22%;
|
||||
white-space: nowrap;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.info-table .value-cell {
|
||||
width: 28%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.data-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 0;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.data-table th,
|
||||
.data-table td {
|
||||
border: 1px solid #000;
|
||||
padding: 2px 3px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.data-table th {
|
||||
background-color: #f0f0f0;
|
||||
font-weight: bold;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.data-table td {
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.empty-cell {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.footer-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 0;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.footer-table td {
|
||||
border: 1px solid #000;
|
||||
padding: 4px 6px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.footer-label {
|
||||
font-weight: bold;
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-size: 9px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
font-size: 9px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.footer-remark-cell {
|
||||
position: relative;
|
||||
padding-right: 140px;
|
||||
}
|
||||
|
||||
.remark-text {
|
||||
font-size: 9px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.signature-area {
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
bottom: 8px;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.stamp-image {
|
||||
width: 80px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.signature-block {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.signature-label {
|
||||
font-size: 9px;
|
||||
margin-bottom: 2px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.signature-image {
|
||||
height: 35px;
|
||||
width: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,360 @@
|
||||
<template>
|
||||
<div class="certificate-content">
|
||||
<div class="pdf-header">
|
||||
<div class="header-left">
|
||||
<img src="@/assets/logo/logo.png" class="company-logo" alt="logo" />
|
||||
<div class="company-name-cn">科伦普</div>
|
||||
<div class="company-name-en">KE LUN PU</div>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<div class="main-title">镀锌产品质量证明书</div>
|
||||
<div class="main-title-en">GALVANIZED PRODUCT QUALITY CERTIFICATE</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="company-full-name">嘉祥科伦普重工有限公司</div>
|
||||
<div class="company-address">山东省济宁市嘉祥县化工园区</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pdf-body">
|
||||
<table class="info-table">
|
||||
<tr>
|
||||
<td class="label-cell">执行标准(SPECIFICATION):</td>
|
||||
<td class="value-cell">{{ certificate.standard || '/' }}</td>
|
||||
<td class="label-cell">证明书号(CERTIFICATE NO.):</td>
|
||||
<td class="value-cell">{{ certificate.certificateNo || '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label-cell">收货单位(CONSIGNEE):</td>
|
||||
<td class="value-cell">{{ certificate.consignee || '-' }}</td>
|
||||
<td class="label-cell">合同号(CONTRACT NO.):</td>
|
||||
<td class="value-cell">{{ certificate.contractNo || '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label-cell">产品名称(PRODUCT):</td>
|
||||
<td class="value-cell">{{ certificate.productName || '' }}</td>
|
||||
<td class="label-cell">签发日期(DATE OF ISSUE):</td>
|
||||
<td class="value-cell">{{ formatDate(certificate.issueDate) || '' }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">序号</th>
|
||||
<th rowspan="2">钢卷号<br>Coil No.</th>
|
||||
<th rowspan="2">原料号<br>Material No.</th>
|
||||
<th rowspan="2">材质<br>Type</th>
|
||||
<th rowspan="2">规格 Size<br>(mm)</th>
|
||||
<th rowspan="2">件数<br>Pieces</th>
|
||||
<th rowspan="2">重量<br>Weight(t)</th>
|
||||
<th colspan="6">化学成分(%)<br>Chemical Composition</th>
|
||||
<th colspan="3">拉伸试验 Tensile Test<br>(G.L=80mm)</th>
|
||||
<th rowspan="2">镀层弯曲<br>B.T<br>D=0a</th>
|
||||
<th rowspan="2">表面质量</th>
|
||||
<th rowspan="2">表面结构</th>
|
||||
<th rowspan="2">镀层<br>表面结构</th>
|
||||
<th rowspan="2">表面处理</th>
|
||||
<th rowspan="2">镀层重量COATINGMASS<br>锌层重量双面三点平均值<br>(g/m²)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>C</th>
|
||||
<th>Si</th>
|
||||
<th>Mn</th>
|
||||
<th>P</th>
|
||||
<th>S</th>
|
||||
<th>Als</th>
|
||||
<th>屈服<br>Y.S</th>
|
||||
<th>抗拉<br>T.S</th>
|
||||
<th>伸长率<br>EL</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in items" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.coilNo || '' }}</td>
|
||||
<td>{{ item.rawCoilNo || '' }}</td>
|
||||
<td>{{ item.materialType || '' }}</td>
|
||||
<td>{{ item.size || '' }}</td>
|
||||
<td>{{ item.pieces || '' }}</td>
|
||||
<td>{{ item.weight || '' }}</td>
|
||||
<td>{{ item.c || '/' }}</td>
|
||||
<td>{{ item.si || '/' }}</td>
|
||||
<td>{{ item.mn || '/' }}</td>
|
||||
<td>{{ item.p || '/' }}</td>
|
||||
<td>{{ item.s || '/' }}</td>
|
||||
<td>{{ item.als || '/' }}</td>
|
||||
<td>{{ item.yieldStrength || '/' }}</td>
|
||||
<td>{{ item.tensileStrength || '/' }}</td>
|
||||
<td>{{ item.elongation || '/' }}</td>
|
||||
<td>{{ item.bendingTest || '/' }}</td>
|
||||
<td>{{ item.surfaceQuality || '/' }}</td>
|
||||
<td>{{ item.surfaceStructure || '/' }}</td>
|
||||
<td>{{ item.coatingSurfaceStructure || '/' }}</td>
|
||||
<td>{{ item.surfaceTreatment || '/' }}</td>
|
||||
<td>
|
||||
<div>{{ item.coatingMass || '/' }}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="items.length === 0">
|
||||
<td colspan="22" class="empty-cell">暂无数据</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class="footer-table">
|
||||
<tr>
|
||||
<td class="footer-label">注释<br>NOTE</td>
|
||||
<td class="footer-content">
|
||||
<pre>{{ certificate.note || '/' }}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer-label">备注<br>REMARK</td>
|
||||
<td class="footer-content footer-remark-cell">
|
||||
<pre class="remark-text">{{ certificate.remark || '/' }}</pre>
|
||||
<div class="signature-area">
|
||||
<img v-if="certificate.approveStatus === 'PASSED'" src="@/assets/images/zhijian.png" class="stamp-image" alt="质检专用章" />
|
||||
<div class="signature-block">
|
||||
<div class="signature-label">质量负责人:</div>
|
||||
<img v-if="certificate.approveStatus === 'PASSED'" src="@/assets/images/yanghongyan.png" class="signature-image" alt="签名" />
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'GalvanizingTemplate',
|
||||
props: {
|
||||
certificate: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
items: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatDate(dateStr) {
|
||||
if (!dateStr) return '';
|
||||
const date = new Date(dateStr);
|
||||
return `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.certificate-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.pdf-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 8px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.header-left {
|
||||
text-align: center;
|
||||
width: 90px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.company-logo {
|
||||
width: 70px;
|
||||
height: auto;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.company-name-cn {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.company-name-en {
|
||||
font-size: 9px;
|
||||
color: #333;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.header-center {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
letter-spacing: 4px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.main-title-en {
|
||||
font-size: 13px;
|
||||
color: #000;
|
||||
font-family: "Times New Roman", serif;
|
||||
letter-spacing: 1px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.header-right {
|
||||
text-align: right;
|
||||
width: 160px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.company-full-name {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.company-address {
|
||||
font-size: 10px;
|
||||
color: #333;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.pdf-body {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.info-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.info-table td {
|
||||
border: 1px solid #000;
|
||||
padding: 3px 6px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.info-table .label-cell {
|
||||
font-weight: bold;
|
||||
width: 22%;
|
||||
white-space: nowrap;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.info-table .value-cell {
|
||||
width: 28%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.data-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 0;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.data-table th,
|
||||
.data-table td {
|
||||
border: 1px solid #000;
|
||||
padding: 2px 3px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.data-table th {
|
||||
background-color: #f0f0f0;
|
||||
font-weight: bold;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.data-table td {
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.empty-cell {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.footer-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 0;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.footer-table td {
|
||||
border: 1px solid #000;
|
||||
padding: 4px 6px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.footer-label {
|
||||
font-weight: bold;
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-size: 9px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
font-size: 9px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.footer-remark-cell {
|
||||
position: relative;
|
||||
padding-right: 140px;
|
||||
}
|
||||
|
||||
.remark-text {
|
||||
font-size: 9px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.signature-area {
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
bottom: 8px;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.stamp-image {
|
||||
width: 80px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.signature-block {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.signature-label {
|
||||
font-size: 9px;
|
||||
margin-bottom: 2px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.signature-image {
|
||||
height: 35px;
|
||||
width: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,378 @@
|
||||
<template>
|
||||
<div class="certificate-content">
|
||||
<div class="pdf-header">
|
||||
<div class="header-left">
|
||||
<img src="@/assets/logo/logo.png" class="company-logo" alt="logo" />
|
||||
<div class="company-name-cn">科伦普</div>
|
||||
<div class="company-name-en">KE LUN PU</div>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<div class="main-title">产品质量证明书</div>
|
||||
<div class="main-title-en">PRODUCT QUALITY CERTIFICATE</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="company-full-name">嘉祥科伦普重工有限公司</div>
|
||||
<div class="company-address">山东省济宁市嘉祥县化工园区</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pdf-body">
|
||||
<table class="info-table">
|
||||
<tr>
|
||||
<td class="label-cell">执行标准(SPECIFICATION):</td>
|
||||
<td class="value-cell">{{ certificate.standard || '/' }}</td>
|
||||
<td class="label-cell">证明书号(CERTIFICATE NO.):</td>
|
||||
<td class="value-cell">{{ certificate.certificateNo || '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label-cell">收货单位(CONSIGNEE):</td>
|
||||
<td class="value-cell">{{ certificate.consignee || '-' }}</td>
|
||||
<td class="label-cell">合同号(CONTRACT NO.):</td>
|
||||
<td class="value-cell">{{ certificate.contractNo || '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label-cell">产品名称(PRODUCT):</td>
|
||||
<td class="value-cell">{{ certificate.productName || '' }}</td>
|
||||
<td class="label-cell">签发日期(DATE OF ISSUE):</td>
|
||||
<td class="value-cell">{{ formatDate(certificate.issueDate) || '' }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">序号</th>
|
||||
<th rowspan="2">钢卷号<br>Coil No.</th>
|
||||
<th rowspan="2">炉号<br>Heat No.</th>
|
||||
<th rowspan="2">材质<br>Type</th>
|
||||
<th rowspan="2">规格 Size<br>(mm)</th>
|
||||
<th rowspan="2">件数<br>Pieces</th>
|
||||
<th rowspan="2">重量<br>Weight(t)</th>
|
||||
<th colspan="14">化学成分(%)<br>Chemical Composition</th>
|
||||
<th colspan="3">拉伸试验 Tensile Test<br>(G.L=80mm)</th>
|
||||
<th rowspan="2">硬度试验<br>Hardness Test</th>
|
||||
<th rowspan="2">弯曲试验<br>180° B.T<br>D=0a</th>
|
||||
<th rowspan="2">表面质量</th>
|
||||
<th rowspan="2">表面结构</th>
|
||||
<th rowspan="2">边缘状态</th>
|
||||
<th rowspan="2">规定塑性延伸强度<br>(MPa)</th>
|
||||
<th rowspan="2">镀层表面结构</th>
|
||||
<th rowspan="2">镀层重量<br>(g/m²)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>C</th>
|
||||
<th>Si</th>
|
||||
<th>Mn</th>
|
||||
<th>P</th>
|
||||
<th>S</th>
|
||||
<th>Als</th>
|
||||
<th>Al</th>
|
||||
<th>Ti</th>
|
||||
<th>Cr</th>
|
||||
<th>Ni</th>
|
||||
<th>Cu</th>
|
||||
<th>N</th>
|
||||
<th>Fe</th>
|
||||
<th>B</th>
|
||||
<th>屈服 RP0.2<br>Y.S(MPa)</th>
|
||||
<th>抗拉 T.S<br>(MPa)</th>
|
||||
<th>伸长率 EL<br>(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in items" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.coilNo || '' }}</td>
|
||||
<td>{{ item.heatNo || '' }}</td>
|
||||
<td>{{ item.materialType || '' }}</td>
|
||||
<td>{{ item.size || '' }}</td>
|
||||
<td>{{ item.pieces || '' }}</td>
|
||||
<td>{{ item.weight || '' }}</td>
|
||||
<td>{{ item.c || '/' }}</td>
|
||||
<td>{{ item.si || '/' }}</td>
|
||||
<td>{{ item.mn || '/' }}</td>
|
||||
<td>{{ item.p || '/' }}</td>
|
||||
<td>{{ item.s || '/' }}</td>
|
||||
<td>{{ item.als || '/' }}</td>
|
||||
<td>{{ item.al || '/' }}</td>
|
||||
<td>{{ item.ti || '/' }}</td>
|
||||
<td>{{ item.cr || '/' }}</td>
|
||||
<td>{{ item.ni || '/' }}</td>
|
||||
<td>{{ item.cu || '/' }}</td>
|
||||
<td>{{ item.n || '/' }}</td>
|
||||
<td>{{ item.fe || '/' }}</td>
|
||||
<td>{{ item.b || '/' }}</td>
|
||||
<td>{{ item.yieldStrength || '/' }}</td>
|
||||
<td>{{ item.tensileStrength || '/' }}</td>
|
||||
<td>{{ item.elongation || '/' }}</td>
|
||||
<td>{{ item.hardness || '/' }}</td>
|
||||
<td>{{ item.bendingTest || '/' }}</td>
|
||||
<td>{{ item.surfaceQuality || '/' }}</td>
|
||||
<td>{{ item.surfaceStructure || '/' }}</td>
|
||||
<td>{{ item.edgeStatus || '/' }}</td>
|
||||
<td>{{ item.plasticExtensionStrength || '/' }}</td>
|
||||
<td>{{ item.coatingSurfaceStructure || '/' }}</td>
|
||||
<td>{{ item.coatingMass || '/' }}</td>
|
||||
</tr>
|
||||
<tr v-if="items.length === 0">
|
||||
<td colspan="30" class="empty-cell">暂无数据</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class="footer-table">
|
||||
<tr>
|
||||
<td class="footer-label">注释<br>NOTE</td>
|
||||
<td class="footer-content">
|
||||
<pre>{{ certificate.note || '/' }}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer-label">备注<br>REMARK</td>
|
||||
<td class="footer-content footer-remark-cell">
|
||||
<pre class="remark-text">{{ certificate.remark || '/' }}</pre>
|
||||
<div class="signature-area">
|
||||
<img v-if="certificate.approveStatus === 'PASSED'" src="@/assets/images/zhijian.png" class="stamp-image" alt="质检专用章" />
|
||||
<div class="signature-block">
|
||||
<div class="signature-label">质量负责人:</div>
|
||||
<img v-if="certificate.approveStatus === 'PASSED'" src="@/assets/images/yanghongyan.png" class="signature-image" alt="签名" />
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'RawMaterialTemplate',
|
||||
props: {
|
||||
certificate: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
items: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatDate(dateStr) {
|
||||
if (!dateStr) return '';
|
||||
const date = new Date(dateStr);
|
||||
return `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.certificate-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.pdf-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 8px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.header-left {
|
||||
text-align: center;
|
||||
width: 90px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.company-logo {
|
||||
width: 70px;
|
||||
height: auto;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.company-name-cn {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.company-name-en {
|
||||
font-size: 9px;
|
||||
color: #333;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.header-center {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
letter-spacing: 4px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.main-title-en {
|
||||
font-size: 13px;
|
||||
color: #000;
|
||||
font-family: "Times New Roman", serif;
|
||||
letter-spacing: 1px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.header-right {
|
||||
text-align: right;
|
||||
width: 160px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.company-full-name {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.company-address {
|
||||
font-size: 10px;
|
||||
color: #333;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.pdf-body {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.info-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.info-table td {
|
||||
border: 1px solid #000;
|
||||
padding: 3px 6px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.info-table .label-cell {
|
||||
font-weight: bold;
|
||||
width: 22%;
|
||||
white-space: nowrap;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.info-table .value-cell {
|
||||
width: 28%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.data-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 0;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.data-table th,
|
||||
.data-table td {
|
||||
border: 1px solid #000;
|
||||
padding: 2px 3px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.data-table th {
|
||||
background-color: #f0f0f0;
|
||||
font-weight: bold;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.data-table td {
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.empty-cell {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.footer-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 0;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.footer-table td {
|
||||
border: 1px solid #000;
|
||||
padding: 4px 6px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.footer-label {
|
||||
font-weight: bold;
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-size: 9px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
font-size: 9px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.footer-remark-cell {
|
||||
position: relative;
|
||||
padding-right: 140px;
|
||||
}
|
||||
|
||||
.remark-text {
|
||||
font-size: 9px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.signature-area {
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
bottom: 8px;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.stamp-image {
|
||||
width: 80px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.signature-block {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.signature-label {
|
||||
font-size: 9px;
|
||||
margin-bottom: 2px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.signature-image {
|
||||
height: 35px;
|
||||
width: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,20 @@
|
||||
import ChromiumTemplate from './ChromiumTemplate.vue';
|
||||
import GalvanizingTemplate from './GalvanizingTemplate.vue';
|
||||
import ColdHardTemplate from './ColdHardTemplate.vue';
|
||||
import RawMaterialTemplate from './RawMaterialTemplate.vue';
|
||||
|
||||
export const templateMap = {
|
||||
chromium: ChromiumTemplate,
|
||||
galvanizing: GalvanizingTemplate,
|
||||
coldHard: ColdHardTemplate,
|
||||
rawMaterial: RawMaterialTemplate
|
||||
};
|
||||
|
||||
export const templateOptions = [
|
||||
{ value: 'chromium', label: '镀铬质保书模版' },
|
||||
{ value: 'galvanizing', label: '镀锌质保书模版' },
|
||||
{ value: 'coldHard', label: '冷硬质保书模版' },
|
||||
{ value: 'rawMaterial', label: '原料质保书模版' }
|
||||
];
|
||||
|
||||
export default templateMap;
|
||||
@@ -106,6 +106,11 @@
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="原料号" align="center" prop="rawCoilNo" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.rawCoilNo" style="background-color: #fff3e6;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="炉号" align="center" prop="heatNo" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.heatNo" style="background-color: #e6f7ff;" />
|
||||
@@ -162,6 +167,46 @@
|
||||
<el-input v-model="scope.row.als" style="background-color: #e6f7ff;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Al(%)" align="center" prop="al" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.al" style="background-color: #e6f7ff;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Ti(%)" align="center" prop="ti" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.ti" style="background-color: #e6f7ff;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Cr(%)" align="center" prop="cr" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.cr" style="background-color: #e6f7ff;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Ni(%)" align="center" prop="ni" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.ni" style="background-color: #e6f7ff;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Cu(%)" align="center" prop="cu" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.cu" style="background-color: #e6f7ff;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="N(%)" align="center" prop="n" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.n" style="background-color: #e6f7ff;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Fe(%)" align="center" prop="fe" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.fe" style="background-color: #e6f7ff;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="B(%)" align="center" prop="b" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.b" style="background-color: #e6f7ff;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="屈服强度(MPa)" align="center" prop="yieldStrength" width="130">
|
||||
<template slot-scope="scope">
|
||||
@@ -188,6 +233,11 @@
|
||||
<el-input v-model="scope.row.bendingTest" style="background-color: #f6ffed;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="镀层" align="center" prop="coating" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.coating" style="background-color: #f6ffed;" />
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
|
||||
<el-table-column label="表面质量" align="center" prop="surfaceQuality" width="100">
|
||||
<template slot-scope="scope">
|
||||
@@ -204,6 +254,36 @@
|
||||
<el-input v-model="scope.row.edgeStatus" style="background-color: #f6ffed;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规定塑性延伸强度(MPa)" align="center" prop="plasticExtensionStrength" width="170">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model.number="scope.row.plasticExtensionStrength" style="background-color: #f6ffed;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="镀层表面结构" align="center" prop="coatingSurfaceStructure" width="130">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.coatingSurfaceStructure" style="background-color: #f6ffed;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="镀层重量(g/m²)" align="center" prop="coatingMass" width="130">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model.number="scope.row.coatingMass" style="background-color: #f6ffed;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="表面处理" align="center" prop="surfaceTreatment" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.surfaceTreatment" style="background-color: #f6ffed;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="调制度" align="center" prop="temperDegree" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.temperDegree" style="background-color: #f6ffed;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="锌层重量平均值" align="center" prop="zincCoatingWeight" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model.number="scope.row.zincCoatingWeight" style="background-color: #f6ffed;" />
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="备注" align="center" prop="remark">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.remark" style="background-color: #fff0f6;" />
|
||||
@@ -335,7 +415,25 @@
|
||||
|
||||
<!-- 隐藏的打印组件 -->
|
||||
<CertificatePrintPreview ref="certificatePrint" v-show="false" :certificate="printCertificateData"
|
||||
:items="printItemsData" />
|
||||
:items="printItemsData" :template-type="selectedTemplateType" />
|
||||
|
||||
<!-- 模板选择对话框 -->
|
||||
<el-dialog title="选择质保书模板" :visible.sync="templateDialogVisible" width="500px" append-to-body>
|
||||
<div class="template-selection">
|
||||
<el-radio-group v-model="selectedTemplateType" class="template-radio-group">
|
||||
<el-radio v-for="option in templateOptions" :key="option.value" :label="option.value" class="template-radio">
|
||||
<div class="template-option">
|
||||
<i class="el-icon-document"></i>
|
||||
<span>{{ option.label }}</span>
|
||||
</div>
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="confirmTemplate">确 定</el-button>
|
||||
<el-button @click="templateDialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -347,6 +445,7 @@ import { listChemicalItem } from "@/api/mes/qc/chemicalItem";
|
||||
import { listPhysicalItem } from "@/api/mes/qc/physicalItem";
|
||||
import CoilSelector from "@/components/CoilSelector/index.vue";
|
||||
import CertificatePrintPreview from "./components/CertificatePrintPreview.vue";
|
||||
import { templateOptions } from "./components/templates";
|
||||
import { print as printPdf } from "./lib/printUtils";
|
||||
|
||||
export default {
|
||||
@@ -362,6 +461,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
templateOptions,
|
||||
buttonLoading: false,
|
||||
loading: false,
|
||||
certificateLoading: false,
|
||||
@@ -380,6 +480,9 @@ export default {
|
||||
printComponentVisible: false,
|
||||
printCertificateData: {},
|
||||
printItemsData: [],
|
||||
templateDialogVisible: false,
|
||||
selectedTemplateType: 'chromium',
|
||||
templateDialogResolve: null,
|
||||
certificateForm: {
|
||||
certificateNo: '',
|
||||
contractNo: '',
|
||||
@@ -527,13 +630,15 @@ export default {
|
||||
]);
|
||||
const chem = chemRes.rows && chemRes.rows[0] || {};
|
||||
const phys = physRes.rows && physRes.rows[0] || {};
|
||||
const { c, si, mn, p, s, als, yieldStrength, tensileStrength, elongation, hardness, bendingTest, surfaceQuality, surfaceStructure, edgeStatus } = { ...chem, ...phys };
|
||||
return { c, si, mn, p, s, als, yieldStrength, tensileStrength, elongation, hardness, bendingTest, surfaceQuality, surfaceStructure, edgeStatus };
|
||||
const { c, si, mn, p, s, als, al, ti, cr, ni, cu, n, fe, b } = chem;
|
||||
const { yieldStrength, tensileStrength, elongation, hardness, bendingTest, surfaceQuality, surfaceStructure, edgeStatus, plasticExtensionStrength, coatingSurfaceStructure, coatingMass, coating, surfaceTreatment, zincCoatingWeight } = phys;
|
||||
return { c, si, mn, p, s, als, al, ti, cr, ni, cu, n, fe, b, yieldStrength, tensileStrength, elongation, hardness, bendingTest, surfaceQuality, surfaceStructure, edgeStatus, plasticExtensionStrength, coatingSurfaceStructure, coatingMass, coating, surfaceTreatment, zincCoatingWeight };
|
||||
},
|
||||
async handleCoilSelect(row) {
|
||||
if (this.currentEditRow) {
|
||||
const editRow = this.currentEditRow;
|
||||
editRow.coilNo = row.currentCoilNo;
|
||||
editRow.materialNo = row.enterCoilNo;
|
||||
editRow.materialType = row.material;
|
||||
editRow.size = row.specification;
|
||||
editRow.weight = row.netWeight;
|
||||
@@ -718,6 +823,9 @@ export default {
|
||||
});
|
||||
},
|
||||
async handlePrint() {
|
||||
const confirmed = await this.showTemplateDialog();
|
||||
if (!confirmed) return;
|
||||
|
||||
this.printCertificateData = this.currentCertificateInfo;
|
||||
this.printItemsData = this.certificateItemList || [];
|
||||
this.$nextTick(() => {
|
||||
@@ -725,6 +833,19 @@ export default {
|
||||
console.log(el);
|
||||
printPdf(el);
|
||||
});
|
||||
},
|
||||
showTemplateDialog() {
|
||||
return new Promise((resolve) => {
|
||||
this.templateDialogResolve = resolve;
|
||||
this.templateDialogVisible = true;
|
||||
});
|
||||
},
|
||||
confirmTemplate() {
|
||||
this.templateDialogVisible = false;
|
||||
if (this.templateDialogResolve) {
|
||||
this.templateDialogResolve(true);
|
||||
this.templateDialogResolve = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -899,4 +1020,46 @@ export default {
|
||||
::v-deep .el-table .cell {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.template-selection {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.template-radio-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.template-radio {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
padding: 15px;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 8px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.template-radio:hover {
|
||||
border-color: #409eff;
|
||||
background-color: #ecf5ff;
|
||||
}
|
||||
|
||||
.template-radio.is-checked {
|
||||
border-color: #409eff;
|
||||
background-color: #ecf5ff;
|
||||
}
|
||||
|
||||
.template-option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.template-option i {
|
||||
font-size: 20px;
|
||||
color: #409eff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -265,7 +265,7 @@
|
||||
<i class="el-icon-info" style="margin-right: 4px;"></i>
|
||||
可输入入场卷号或厂家卷号,两者互通匹配
|
||||
</div>
|
||||
<el-form-item label="入场卷号" prop="enterCoilNos">
|
||||
<el-form-item label="入场卷号">
|
||||
<div style="display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px;">
|
||||
<el-tag
|
||||
v-for="(coilNo, index) in selectedEnterCoilNos"
|
||||
@@ -284,8 +284,12 @@
|
||||
:trigger-on-focus="false"
|
||||
clearable
|
||||
@select="handleSelectEnterCoilNo"
|
||||
@blur="validateEnterCoilNos"
|
||||
/>
|
||||
<div style="display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;" v-if="selectedSupplierCoilNos.length > 0">
|
||||
<div v-if="enterCoilNoError" class="el-form-item__error" style="position: static; padding-top: 0;">请输入入场卷号</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="厂家卷号">
|
||||
<div style="display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px;" v-if="selectedSupplierCoilNos.length > 0">
|
||||
<el-tag
|
||||
v-for="(coilNo, index) in selectedSupplierCoilNos"
|
||||
:key="'s-' + index"
|
||||
@@ -299,13 +303,12 @@
|
||||
<el-autocomplete
|
||||
v-model="tempSupplierCoilNo"
|
||||
:fetch-suggestions="querySupplierCoilNo"
|
||||
placeholder="或输入厂家卷号自动匹配"
|
||||
placeholder="输入厂家卷号自动匹配"
|
||||
:loading="supplierCoilNoLoading"
|
||||
:trigger-on-focus="false"
|
||||
clearable
|
||||
size="small"
|
||||
@select="handleSelectSupplierCoilNo"
|
||||
style="margin-top: 6px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
@@ -527,14 +530,12 @@ export default {
|
||||
attachmentLoading: false,
|
||||
attachmentTaskRow: null,
|
||||
attachmentFiles: '',
|
||||
enterCoilNoError: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
taskRules() {
|
||||
return {
|
||||
...this.baseTaskRules,
|
||||
enterCoilNos: [{ required: this.taskForm.taskType === '产品检验', message: '请输入入场卷号', trigger: 'blur' }],
|
||||
};
|
||||
return { ...this.baseTaskRules };
|
||||
},
|
||||
itemReadonly() {
|
||||
if (!this.readonly) return false;
|
||||
@@ -629,7 +630,12 @@ export default {
|
||||
this.taskTitle = "修改检验任务";
|
||||
});
|
||||
},
|
||||
validateEnterCoilNos() {
|
||||
this.enterCoilNoError = this.taskForm.taskType === '产品检验' && this.selectedEnterCoilNos.length === 0;
|
||||
},
|
||||
submitTaskForm() {
|
||||
this.validateEnterCoilNos();
|
||||
if (this.enterCoilNoError) return;
|
||||
this.$refs["taskForm"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
@@ -794,12 +800,13 @@ export default {
|
||||
if (!this.selectedEnterCoilNos.includes(item.value)) {
|
||||
this.selectedEnterCoilNos.push(item.value);
|
||||
}
|
||||
this.tempEnterCoilNo = '';
|
||||
this.taskForm.enterCoilNos = this.selectedEnterCoilNos.join(',');
|
||||
this.validateEnterCoilNos();
|
||||
},
|
||||
removeEnterCoilNo(index) {
|
||||
this.selectedEnterCoilNos.splice(index, 1);
|
||||
this.taskForm.enterCoilNos = this.selectedEnterCoilNos.join(',');
|
||||
this.validateEnterCoilNos();
|
||||
},
|
||||
querySupplierCoilNo(queryString, cb) {
|
||||
if (!queryString || queryString.length < 2) {
|
||||
@@ -830,9 +837,9 @@ export default {
|
||||
if (item.enterCoilNo && !this.selectedEnterCoilNos.includes(item.enterCoilNo)) {
|
||||
this.selectedEnterCoilNos.push(item.enterCoilNo);
|
||||
this.taskForm.enterCoilNos = this.selectedEnterCoilNos.join(',');
|
||||
this.$refs["taskForm"].validateField('enterCoilNos');
|
||||
}
|
||||
this.tempSupplierCoilNo = '';
|
||||
this.validateEnterCoilNos();
|
||||
},
|
||||
removeSupplierCoilNo(index) {
|
||||
this.selectedSupplierCoilNos.splice(index, 1);
|
||||
@@ -870,6 +877,7 @@ export default {
|
||||
this.tempEnterCoilNo = '';
|
||||
this.selectedSupplierCoilNos = [];
|
||||
this.tempSupplierCoilNo = '';
|
||||
this.enterCoilNoError = false;
|
||||
this.resetForm("taskForm");
|
||||
},
|
||||
|
||||
|
||||
@@ -108,14 +108,16 @@
|
||||
<el-card shadow="never" class="detail-card" body-style="padding:10px;overflow:auto">
|
||||
<div slot="header" class="card-header">
|
||||
<span class="card-title"><i class="el-icon-document" /> 磨削台账</span>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-plus"
|
||||
style="margin-left:auto"
|
||||
:disabled="!!editRow"
|
||||
@click="startAdd"
|
||||
>新增磨削记录</el-button>
|
||||
<span style="margin-left:auto;display:flex;gap:8px">
|
||||
<el-button size="mini" type="text" icon="el-icon-setting" @click="openOperatorDict">操作人维护</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-plus"
|
||||
:disabled="!!editRow"
|
||||
@click="startAdd"
|
||||
>新增磨削记录</el-button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
@@ -334,6 +336,52 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 操作人字典维护对话框 -->
|
||||
<el-dialog title="操作人字典维护" :visible.sync="operatorDictOpen" width="650px" append-to-body :close-on-click-modal="false" @closed="operatorDictList = []">
|
||||
<div style="margin-bottom:10px">
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleAddOperator">新增操作人</el-button>
|
||||
</div>
|
||||
<el-table :data="operatorDictList" v-loading="operatorDictLoading" size="small" border style="width:100%">
|
||||
<el-table-column label="姓名" prop="dictLabel" align="center" />
|
||||
<el-table-column label="值" prop="dictValue" align="center" />
|
||||
<el-table-column label="状态" align="center" width="100">
|
||||
<template slot-scope="{row}">
|
||||
<el-tag :type="row.status === '0' ? 'success' : 'danger'" size="mini">
|
||||
{{ row.status === '0' ? '在职' : '离职' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleEditOperator(row)">编辑</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" style="color:#c5221f" @click="handleDeleteOperator(row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 操作人新增/修改对话框 -->
|
||||
<el-dialog :title="operatorFormTitle" :visible.sync="operatorFormOpen" width="400px" append-to-body :close-on-click-modal="false" @close="resetOperatorForm">
|
||||
<el-form ref="operatorForm" :model="operatorForm" :rules="operatorFormRules" label-width="80px" size="small">
|
||||
<el-form-item label="姓名" prop="dictLabel">
|
||||
<el-input v-model="operatorForm.dictLabel" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="值" prop="dictValue">
|
||||
<el-input v-model="operatorForm.dictValue" placeholder="请输入值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="operatorForm.status">
|
||||
<el-radio label="0">在职</el-radio>
|
||||
<el-radio label="1">离职</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" size="small" @click="submitOperatorForm">确 定</el-button>
|
||||
<el-button size="small" @click="operatorFormOpen = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 轧辊新增/修改对话框 -->
|
||||
<el-dialog
|
||||
:title="rollFormTitle"
|
||||
@@ -437,6 +485,7 @@
|
||||
import { listRollInfo, getRollInfo, addRollInfo, updateRollInfo, delRollInfo } from '@/api/mes/roll/rollInfo'
|
||||
import { listRollGrind, addRollGrind, updateRollGrind, delRollGrind, getMonthlyStats } from '@/api/mes/roll/rollGrind'
|
||||
import { listProductionLine } from '@/api/wms/productionLine'
|
||||
import { listData, addData, updateData, delData } from '@/api/system/dict/data'
|
||||
import rollLineMixin from '../rollLineMixin'
|
||||
|
||||
export default {
|
||||
@@ -474,6 +523,17 @@ export default {
|
||||
rollFormRules: {
|
||||
rollNo: [{ required: true, message: '轧辊编号不能为空', trigger: 'blur' }],
|
||||
rollType: [{ required: true, message: '请选择辊型', trigger: 'change' }]
|
||||
},
|
||||
|
||||
operatorDictOpen: false,
|
||||
operatorDictLoading: false,
|
||||
operatorDictList: [],
|
||||
operatorFormOpen: false,
|
||||
operatorFormTitle: '',
|
||||
operatorForm: {},
|
||||
operatorFormRules: {
|
||||
dictLabel: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
|
||||
dictValue: [{ required: true, message: '值不能为空', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -753,6 +813,54 @@ export default {
|
||||
resetRollForm() {
|
||||
this.rollForm = {}
|
||||
this.$nextTick(() => { this.$refs.rollForm && this.$refs.rollForm.clearValidate() })
|
||||
},
|
||||
|
||||
// ── 操作人字典维护 ──────────────────────────────
|
||||
openOperatorDict() {
|
||||
this.operatorDictOpen = true
|
||||
this.loadOperatorDict()
|
||||
},
|
||||
loadOperatorDict() {
|
||||
this.operatorDictLoading = true
|
||||
listData({ dictType: 'mes_roll_operator', pageNum: 1, pageSize: 999 }).then(res => {
|
||||
this.operatorDictList = res.rows || []
|
||||
}).finally(() => { this.operatorDictLoading = false })
|
||||
},
|
||||
handleAddOperator() {
|
||||
this.operatorForm = { dictType: 'mes_roll_operator', dictLabel: '', dictValue: '', status: '0' }
|
||||
this.operatorFormTitle = '新增操作人'
|
||||
this.$nextTick(() => { this.operatorFormOpen = true })
|
||||
},
|
||||
handleEditOperator(row) {
|
||||
this.operatorForm = { ...row }
|
||||
this.operatorFormTitle = '修改操作人'
|
||||
this.$nextTick(() => { this.operatorFormOpen = true })
|
||||
},
|
||||
handleDeleteOperator(row) {
|
||||
this.$modal.confirm(`确认删除操作人【${row.dictLabel}】?`).then(() => {
|
||||
return delData(row.dictCode)
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
this.$store.dispatch('dict/removeDict', 'mes_roll_operator')
|
||||
this.loadOperatorDict()
|
||||
})
|
||||
},
|
||||
submitOperatorForm() {
|
||||
this.$refs.operatorForm.validate(valid => {
|
||||
if (!valid) return
|
||||
const form = { ...this.operatorForm }
|
||||
const api = form.dictCode ? updateData : addData
|
||||
api(form).then(() => {
|
||||
this.$modal.msgSuccess(form.dictCode ? '修改成功' : '新增成功')
|
||||
this.operatorFormOpen = false
|
||||
this.$store.dispatch('dict/removeDict', 'mes_roll_operator')
|
||||
this.loadOperatorDict()
|
||||
})
|
||||
})
|
||||
},
|
||||
resetOperatorForm() {
|
||||
this.operatorForm = {}
|
||||
this.$nextTick(() => { this.$refs.operatorForm && this.$refs.operatorForm.clearValidate() })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,17 +78,54 @@
|
||||
<div class="card-header">
|
||||
<span class="card-title"><i class="el-icon-user" /> 磨辊人统计</span>
|
||||
<span class="card-subtitle" v-if="operatorStats.length">共 {{ operatorStats.length }} 人</span>
|
||||
<el-button size="mini" type="primary" plain icon="el-icon-download" style="margin-left:8px" @click="exportOperatorStats" :disabled="!operatorStats.length">导出</el-button>
|
||||
</div>
|
||||
<el-table :data="operatorStats" size="small" border stripe style="width:100%"
|
||||
v-if="operatorStats.length" :default-sort="{ prop: 'totalGrindAmount', order: 'descending' }">
|
||||
<el-table-column label="序号" type="index" width="50" align="center" />
|
||||
<el-table-column label="磨辊人" prop="operator" min-width="120" sortable />
|
||||
<el-table-column label="磨削次数" prop="grindCount" width="110" align="center" sortable />
|
||||
<el-table-column label="磨削总量(mm)" prop="totalGrindAmount" width="130" align="right" sortable>
|
||||
<template slot-scope="{row}">{{ row.totalGrindAmount.toFixed(2) }}</template>
|
||||
<el-table-column label="序号" type="index" align="center" />
|
||||
<el-table-column label="磨辊人" prop="operator" sortable />
|
||||
<el-table-column label="在职状态" align="center" width="90">
|
||||
<template slot-scope="{row}">
|
||||
<el-tag :type="operatorStatusType(row.operator)" size="mini" disable-transitions>
|
||||
{{ operatorStatusLabel(row.operator) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="平均磨削量(mm)" prop="avgGrindAmount" width="140" align="right" sortable>
|
||||
<template slot-scope="{row}">{{ row.avgGrindAmount.toFixed(2) }}</template>
|
||||
<el-table-column label="CR(中间辊)" align="center">
|
||||
<el-table-column label="磨削次数" prop="crGrindCount" align="center" sortable />
|
||||
<el-table-column label="磨削总量(mm)" align="right" sortable>
|
||||
<template slot-scope="{row}">{{ row.crTotalGrindAmount.toFixed(2) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="平均磨削量(mm)" align="right" sortable>
|
||||
<template slot-scope="{row}">{{ row.crAvgGrindAmount.toFixed(2) }}</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="BR(支撑辊)" align="center">
|
||||
<el-table-column label="磨削次数" prop="brGrindCount" align="center" sortable />
|
||||
<el-table-column label="磨削总量(mm)" align="right" sortable>
|
||||
<template slot-scope="{row}">{{ row.brTotalGrindAmount.toFixed(2) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="平均磨削量(mm)" align="right" sortable>
|
||||
<template slot-scope="{row}">{{ row.brAvgGrindAmount.toFixed(2) }}</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="WR(工作辊)" align="center">
|
||||
<el-table-column label="磨削次数" prop="wrGrindCount" align="center" sortable />
|
||||
<el-table-column label="磨削总量(mm)" align="right" sortable>
|
||||
<template slot-scope="{row}">{{ row.wrTotalGrindAmount.toFixed(2) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="平均磨削量(mm)" align="right" sortable>
|
||||
<template slot-scope="{row}">{{ row.wrAvgGrindAmount.toFixed(2) }}</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合计" align="center">
|
||||
<el-table-column label="磨削次数" prop="grindCount" align="center" sortable />
|
||||
<el-table-column label="磨削总量(mm)" align="right" sortable>
|
||||
<template slot-scope="{row}">{{ row.totalGrindAmount.toFixed(2) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="平均磨削量(mm)" align="right" sortable>
|
||||
<template slot-scope="{row}">{{ row.avgGrindAmount.toFixed(2) }}</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-else description="暂无磨削记录" />
|
||||
@@ -99,6 +136,7 @@
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
import * as XLSX from 'xlsx'
|
||||
import { getRollStats, listRollInfo } from '@/api/mes/roll/rollInfo'
|
||||
import { listRollGrindAll } from '@/api/mes/roll/rollGrind'
|
||||
import rollLineMixin from '../rollLineMixin'
|
||||
@@ -106,6 +144,7 @@ import rollLineMixin from '../rollLineMixin'
|
||||
export default {
|
||||
name: 'RollReport',
|
||||
mixins: [rollLineMixin],
|
||||
dicts: ['mes_roll_operator'],
|
||||
data() {
|
||||
const now = new Date()
|
||||
const sevenDaysAgo = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000)
|
||||
@@ -175,7 +214,7 @@ export default {
|
||||
this.computeSummary(allRecords, rollMap)
|
||||
this.computeDailyTrend(allRecords)
|
||||
this.computeRollTypeDist(allRecords, rollMap)
|
||||
this.computeOperatorStats(allRecords)
|
||||
this.computeOperatorStats(allRecords, rollMap)
|
||||
this.updateCharts()
|
||||
} catch (e) {
|
||||
console.error('加载报表数据失败', e)
|
||||
@@ -214,25 +253,50 @@ export default {
|
||||
const typeMap = {}
|
||||
records.forEach(r => {
|
||||
const roll = rollMap[r.rollId]
|
||||
const type = roll ? (roll.rollType === 'WR' ? '工作辊' : roll.rollType === 'BR' ? '支撑辊' : roll.rollType || '未知') : '未知'
|
||||
const type = roll ? (roll.rollType === 'WR' ? '工作辊' : roll.rollType === 'BR' ? '支撑辊' : roll.rollType === 'CR' ? '中间辊' : roll.rollType || '未知') : '未知'
|
||||
if (!typeMap[type]) typeMap[type] = { name: type, value: 0, grindCount: 0 }
|
||||
typeMap[type].value += Number(r.grindAmount || 0)
|
||||
typeMap[type].grindCount++
|
||||
})
|
||||
this.rollTypeDist = Object.values(typeMap)
|
||||
},
|
||||
computeOperatorStats(records) {
|
||||
computeOperatorStats(records, rollMap) {
|
||||
const opMap = {}
|
||||
records.forEach(r => {
|
||||
const name = r.operator || '未知'
|
||||
if (!opMap[name]) opMap[name] = { operator: name, grindCount: 0, totalGrindAmount: 0 }
|
||||
if (!opMap[name]) opMap[name] = {
|
||||
operator: name,
|
||||
grindCount: 0, totalGrindAmount: 0,
|
||||
crGrindCount: 0, crTotalGrindAmount: 0,
|
||||
brGrindCount: 0, brTotalGrindAmount: 0,
|
||||
wrGrindCount: 0, wrTotalGrindAmount: 0
|
||||
}
|
||||
opMap[name].grindCount++
|
||||
opMap[name].totalGrindAmount += Number(r.grindAmount || 0)
|
||||
const roll = rollMap[r.rollId]
|
||||
const rollType = roll ? (roll.rollType || '') : ''
|
||||
const amount = Number(r.grindAmount || 0)
|
||||
if (rollType === 'CR') {
|
||||
opMap[name].crGrindCount++
|
||||
opMap[name].crTotalGrindAmount += amount
|
||||
} else if (rollType === 'BR') {
|
||||
opMap[name].brGrindCount++
|
||||
opMap[name].brTotalGrindAmount += amount
|
||||
} else if (rollType === 'WR') {
|
||||
opMap[name].wrGrindCount++
|
||||
opMap[name].wrTotalGrindAmount += amount
|
||||
}
|
||||
})
|
||||
this.operatorStats = Object.values(opMap).map(item => ({
|
||||
...item,
|
||||
totalGrindAmount: Number(item.totalGrindAmount.toFixed(2)),
|
||||
avgGrindAmount: item.grindCount > 0 ? Number((item.totalGrindAmount / item.grindCount).toFixed(2)) : 0
|
||||
avgGrindAmount: item.grindCount > 0 ? Number((item.totalGrindAmount / item.grindCount).toFixed(2)) : 0,
|
||||
crTotalGrindAmount: Number(item.crTotalGrindAmount.toFixed(2)),
|
||||
crAvgGrindAmount: item.crGrindCount > 0 ? Number((item.crTotalGrindAmount / item.crGrindCount).toFixed(2)) : 0,
|
||||
brTotalGrindAmount: Number(item.brTotalGrindAmount.toFixed(2)),
|
||||
brAvgGrindAmount: item.brGrindCount > 0 ? Number((item.brTotalGrindAmount / item.brGrindCount).toFixed(2)) : 0,
|
||||
wrTotalGrindAmount: Number(item.wrTotalGrindAmount.toFixed(2)),
|
||||
wrAvgGrindAmount: item.wrGrindCount > 0 ? Number((item.wrTotalGrindAmount / item.wrGrindCount).toFixed(2)) : 0
|
||||
})).sort((a, b) => b.totalGrindAmount - a.totalGrindAmount)
|
||||
},
|
||||
initCharts() {
|
||||
@@ -272,7 +336,7 @@ export default {
|
||||
data: [],
|
||||
emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0,0,0,0.5)' } }
|
||||
}],
|
||||
color: ['#409eff', '#e6a23c', '#909399']
|
||||
color: ['#409eff', '#e6a23c', '#67c23a', '#909399']
|
||||
})
|
||||
},
|
||||
updateCharts() {
|
||||
@@ -303,6 +367,20 @@ export default {
|
||||
this.trendChart && this.trendChart.resize()
|
||||
this.pieChart && this.pieChart.resize()
|
||||
},
|
||||
operatorStatusLabel(name) {
|
||||
if (!name) return ''
|
||||
const items = this.dict?.type?.mes_roll_operator || []
|
||||
const found = items.find(item => item.value === name)
|
||||
if (!found || !found.raw) return '未知'
|
||||
return found.raw.status === '0' ? '在职' : '离职'
|
||||
},
|
||||
operatorStatusType(name) {
|
||||
if (!name) return ''
|
||||
const items = this.dict?.type?.mes_roll_operator || []
|
||||
const found = items.find(item => item.value === name)
|
||||
if (!found || !found.raw) return 'info'
|
||||
return found.raw.status === '0' ? 'success' : 'danger'
|
||||
},
|
||||
handleQuery() {
|
||||
this.loadData()
|
||||
},
|
||||
@@ -313,6 +391,35 @@ export default {
|
||||
const fmt = d => `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`
|
||||
this.dateRange = [fmt(sevenDaysAgo), fmt(now)]
|
||||
this.loadData()
|
||||
},
|
||||
exportOperatorStats() {
|
||||
const rows = [
|
||||
['序号', '磨辊人', '在职状态', 'CR磨削次数', 'CR磨削总量(mm)', 'CR平均磨削量(mm)', 'BR磨削次数', 'BR磨削总量(mm)', 'BR平均磨削量(mm)', 'WR磨削次数', 'WR磨削总量(mm)', 'WR平均磨削量(mm)', '合计磨削次数', '合计磨削总量(mm)', '合计平均磨削量(mm)']
|
||||
]
|
||||
this.operatorStats.forEach((item, idx) => {
|
||||
rows.push([
|
||||
idx + 1,
|
||||
item.operator,
|
||||
this.operatorStatusLabel(item.operator),
|
||||
item.crGrindCount, item.crTotalGrindAmount, item.crAvgGrindAmount,
|
||||
item.brGrindCount, item.brTotalGrindAmount, item.brAvgGrindAmount,
|
||||
item.wrGrindCount, item.wrTotalGrindAmount, item.wrAvgGrindAmount,
|
||||
item.grindCount, item.totalGrindAmount, item.avgGrindAmount
|
||||
])
|
||||
})
|
||||
const ws = XLSX.utils.aoa_to_sheet(rows)
|
||||
const wb = XLSX.utils.book_new()
|
||||
XLSX.utils.book_append_sheet(wb, ws, '磨辊人统计')
|
||||
const buf = XLSX.write(wb, { bookType: 'xlsx', type: 'array' })
|
||||
const blob = new Blob([buf], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
|
||||
const url = URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = `磨辊人统计_${this._beginTime || ''}_${this._endTime ? this._endTime.substring(0, 10) : ''}.xlsx`
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
URL.revokeObjectURL(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
<template>
|
||||
<el-descriptions
|
||||
:column="column"
|
||||
:border="border"
|
||||
size="small"
|
||||
:title="title"
|
||||
>
|
||||
<el-descriptions :column="column" :border="border" size="small" :title="title">
|
||||
<template slot="extra">
|
||||
<slot name="extra"></slot>
|
||||
</template>
|
||||
<el-descriptions-item
|
||||
v-for="(item, index) in filteredFields"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:span="item.span || 1"
|
||||
>
|
||||
<template>
|
||||
<el-descriptions-item v-for="(item, index) in filteredFields" :key="index" :label="item.label"
|
||||
:span="item.span || 1">
|
||||
<template v-if="item.children">
|
||||
<span v-for="(child, cIndex) in item.children" :key="cIndex" style="margin-right: 12px;">
|
||||
{{ child.label }}: {{ child.value || '-' }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ item.value || '-' }}
|
||||
</template>
|
||||
</el-descriptions-item>
|
||||
@@ -37,7 +33,7 @@ export default {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 只显示有值的字段
|
||||
// 只显示有值的字段
|
||||
showOnlyValue: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
@@ -66,9 +62,22 @@ export default {
|
||||
{ label: '切边要求', key: 'trimmingRequirement' },
|
||||
{ label: '原料材质', key: 'packingStatus' },
|
||||
{ label: '包装要求', key: 'packagingRequirement' },
|
||||
{ label: '实测厚度[mm]', key: 'actualThickness' },
|
||||
// 设置对照属性,两个数量显示在一个格子里
|
||||
{
|
||||
label: '长度[m]',
|
||||
children: [
|
||||
{ label: '实测', key: 'actualLength' },
|
||||
{ label: '理论', key: 'theoreticalLength' }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '厚度[mm]',
|
||||
children: [
|
||||
{ label: '实测', key: 'actualThickness' },
|
||||
{ label: '理论', key: 'theoreticalThickness' }
|
||||
]
|
||||
},
|
||||
{ label: '实测宽度[mm]', key: 'actualWidth' },
|
||||
{ label: '长度[m]', key: 'length' },
|
||||
{ label: '毛重[t]', key: 'grossWeight' },
|
||||
{ label: '净重[t]', key: 'netWeight' },
|
||||
{ label: '生产开始', key: 'productionStartTime' },
|
||||
@@ -80,13 +89,29 @@ export default {
|
||||
]
|
||||
},
|
||||
filteredFields() {
|
||||
let fields = this.fields.map(item => ({
|
||||
...item,
|
||||
value: this.coilInfo[item.key]
|
||||
}))
|
||||
let fields = this.fields.map(item => {
|
||||
if (item.children) {
|
||||
return {
|
||||
...item,
|
||||
children: item.children.map(child => ({
|
||||
...child,
|
||||
value: this.coilInfo[child.key]
|
||||
}))
|
||||
}
|
||||
}
|
||||
return {
|
||||
...item,
|
||||
value: this.coilInfo[item.key]
|
||||
}
|
||||
})
|
||||
|
||||
if (this.showOnlyValue) {
|
||||
fields = fields.filter(item => item.value !== undefined && item.value !== null && item.value !== '')
|
||||
fields = fields.filter(item => {
|
||||
if (item.children) {
|
||||
return item.children.some(child => child.value !== undefined && child.value !== null && child.value !== '')
|
||||
}
|
||||
return item.value !== undefined && item.value !== null && item.value !== ''
|
||||
})
|
||||
}
|
||||
|
||||
return fields
|
||||
|
||||
@@ -295,6 +295,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
padding: 1em;
|
||||
/* width: 680.315px; */
|
||||
@@ -318,7 +319,7 @@ export default {
|
||||
font-size: 12px;
|
||||
border: 1px solid #000;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Arial', sans-serif;
|
||||
font-family: var(--label-font);
|
||||
}
|
||||
|
||||
.company-header {
|
||||
@@ -434,9 +435,9 @@ export default {
|
||||
.nob {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-weight: bold;
|
||||
font-weight: 900;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
|
||||
@@ -58,13 +58,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
width: 50em; /* 容器宽度(可根据需求调整) */
|
||||
min-height: 30em; /* 容器最小高度 */
|
||||
border: 1px solid #000;
|
||||
padding: 2px;
|
||||
box-sizing: border-box;
|
||||
font-family: "SimSun", serif;
|
||||
font-family: var(--label-font);
|
||||
font-size: 8px;
|
||||
line-height: 1.2;
|
||||
display: flex;
|
||||
|
||||
@@ -296,6 +296,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
padding: 1em;
|
||||
/* width: 680.315px; */
|
||||
@@ -319,7 +320,7 @@ export default {
|
||||
font-size: 12px;
|
||||
border: 1px solid #000;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Arial', sans-serif;
|
||||
font-family: var(--label-font);
|
||||
}
|
||||
|
||||
.company-header {
|
||||
@@ -437,9 +438,9 @@ export default {
|
||||
height: 100%;
|
||||
border: none;
|
||||
outline: none;
|
||||
font-weight: bold;
|
||||
font-weight: 900;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
background: transparent;
|
||||
text-align: center;
|
||||
font-size: 1.2em;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
<div
|
||||
style="flex: 1; height: 100%; display: flex; align-items: center; justify-content: center; border: 1px solid #333; box-sizing: border-box; padding: 3px; word-break: break-all; overflow-wrap: break-word;"
|
||||
class="value-cell">
|
||||
class="value-cell enter-coil-no">
|
||||
{{ content.enterCoilNo || '' }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -279,6 +279,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
width: 25em;
|
||||
height: 20em;
|
||||
@@ -287,9 +288,8 @@ export default {
|
||||
/* 启用Flex布局 */
|
||||
flex-direction: column;
|
||||
/* 子元素垂直排列 */
|
||||
font-family: "SimSun", serif;
|
||||
font-family: var(--label-font);
|
||||
box-sizing: border-box;
|
||||
/* 确保内边距/边框不影响总尺寸 */
|
||||
}
|
||||
|
||||
.material-label-table {
|
||||
@@ -327,15 +327,21 @@ export default {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.enter-coil-no {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
|
||||
.nob {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-weight: bold;
|
||||
font-weight: 900;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
|
||||
@@ -302,6 +302,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
padding: 1em;
|
||||
/* width: 680.315px; */
|
||||
@@ -325,7 +326,7 @@ export default {
|
||||
font-size: 12px;
|
||||
border: 1px solid #000;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Arial', sans-serif;
|
||||
font-family: var(--label-font);
|
||||
}
|
||||
|
||||
.company-header {
|
||||
@@ -443,9 +444,9 @@ export default {
|
||||
height: 100%;
|
||||
border: none;
|
||||
outline: none;
|
||||
font-weight: bold;
|
||||
font-weight: 900;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
background: transparent;
|
||||
text-align: center;
|
||||
font-size: 1.2em;
|
||||
|
||||
@@ -50,13 +50,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
width: 50em; /* 容器宽度(可根据需求调整) */
|
||||
min-height: 30em; /* 容器最小高度 */
|
||||
border: 1px solid #000;
|
||||
padding: 2px;
|
||||
box-sizing: border-box;
|
||||
font-family: "SimSun", serif;
|
||||
font-family: var(--label-font);
|
||||
font-size: 8px;
|
||||
line-height: 1.2;
|
||||
display: flex;
|
||||
|
||||
@@ -60,13 +60,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.sample-label-container {
|
||||
width: 50em;
|
||||
height: 40em;
|
||||
border: 1px solid #000;
|
||||
padding: 2px;
|
||||
box-sizing: border-box;
|
||||
font-family: "SimSun", serif;
|
||||
font-family: var(--label-font);
|
||||
font-size: 10px;
|
||||
line-height: 1.5;
|
||||
display: flex;
|
||||
|
||||
@@ -166,11 +166,12 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
width: 25em;
|
||||
height: 20em;
|
||||
padding: 16px;
|
||||
font-family: "SimSun", serif;
|
||||
font-family: var(--label-font);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -199,7 +200,8 @@ export default {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
/* 公司名称单元格 */
|
||||
@@ -260,7 +262,7 @@ export default {
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
<!-- 第一行:冷卷号、热卷号 -->
|
||||
<div class="grid-cell label-cell">冷卷号</div>
|
||||
<div class="grid-cell value-cell">
|
||||
<div class="nob">{{ content.currentCoilNo || '' }}</div>
|
||||
<div class="nob current-coil-no">{{ content.currentCoilNo || '' }}</div>
|
||||
</div>
|
||||
<div class="grid-cell label-cell">热卷号</div>
|
||||
<div class="grid-cell value-cell">
|
||||
<div class="nob">{{ content.enterCoilNo || '' }}</div>
|
||||
<div class="nob enter-coil-no">{{ content.enterCoilNo || '' }}</div>
|
||||
</div>
|
||||
|
||||
<!-- 第二行:规格、钢种 -->
|
||||
@@ -170,11 +170,12 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
width: 45em;
|
||||
height: 25em;
|
||||
padding: 16px;
|
||||
font-family: "SimSun", serif;
|
||||
font-family: var(--label-font);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -253,12 +254,17 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-weight: 900;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.current-coil-no, .enter-coil-no {
|
||||
font-size: 1.1em !important;
|
||||
}
|
||||
|
||||
|
||||
/* 打印样式 */
|
||||
@media print {
|
||||
@page {
|
||||
|
||||
@@ -184,6 +184,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
width: 25em;
|
||||
height: 20em;
|
||||
@@ -192,7 +193,7 @@ export default {
|
||||
/* 启用Flex布局 */
|
||||
flex-direction: column;
|
||||
/* 子元素垂直排列 */
|
||||
font-family: "SimSun", serif;
|
||||
font-family: var(--label-font);
|
||||
box-sizing: border-box;
|
||||
/* 确保内边距/边框不影响总尺寸 */
|
||||
}
|
||||
@@ -248,7 +249,7 @@ export default {
|
||||
white-space: normal;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
<!-- 第一行:冷卷号、热卷号 -->
|
||||
<div class="grid-cell label-cell">冷卷号</div>
|
||||
<div class="grid-cell value-cell">
|
||||
<div class="nob">{{ content.currentCoilNo || '' }}</div>
|
||||
<div class="nob current-coil-no">{{ content.currentCoilNo || '' }}</div>
|
||||
</div>
|
||||
<div class="grid-cell label-cell">热卷号</div>
|
||||
<div class="grid-cell value-cell">
|
||||
<div class="nob">{{ content.enterCoilNo || '' }}</div>
|
||||
<div class="nob enter-coil-no">{{ content.enterCoilNo || '' }}</div>
|
||||
</div>
|
||||
|
||||
<!-- 第二行:规格、钢种 -->
|
||||
@@ -170,11 +170,12 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
width: 45em;
|
||||
height: 25em;
|
||||
padding: 16px;
|
||||
font-family: "SimSun", serif;
|
||||
font-family: var(--label-font);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -254,12 +255,17 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-weight: 900;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.current-coil-no, .enter-coil-no {
|
||||
font-size: 1.1em !important;
|
||||
}
|
||||
|
||||
|
||||
/* 打印样式 */
|
||||
@media print {
|
||||
@page {
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
:root {
|
||||
--label-font: '黑体', 'Courier New', 'SimSun', serif;
|
||||
}
|
||||
@@ -642,9 +642,9 @@ export default {
|
||||
isGrindAction() {
|
||||
return this.actionType == 505 || this.actionType == 525 || this.actionType == 206
|
||||
},
|
||||
// 镀锌/酸轧产线免验净重和厚度范围
|
||||
// 镀锌/酸轧/镀铬产线免验净重和厚度范围
|
||||
isExemptFromValidation() {
|
||||
return [11, 200, 520, 206, 501, 521].includes(Number(this.actionType))
|
||||
return [11, 200, 520, 206, 501, 521, 505, 525, 206].includes(Number(this.actionType))
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -154,7 +154,11 @@ export default {
|
||||
{ label: '厂家', value: 'manufacturer' },
|
||||
{ label: '表面处理', value: 'surfaceTreatmentDesc' },
|
||||
{ label: '镀层质量', value: 'zincLayer' },
|
||||
{ label: '长度', value: 'length' },
|
||||
{ label: '实测长度', value: 'actualLength' },
|
||||
{ label: '理论长度', value: 'theoreticalLength' },
|
||||
{ label: '实测厚度', value: 'actualThickness' },
|
||||
{ label: '理论厚度', value: 'theoreticalThickness' },
|
||||
{ label: '实测宽度', value: 'actualWidth' },
|
||||
{ label: '毛重', value: 'grossWeight' },
|
||||
{ label: '净重', value: 'netWeight' },
|
||||
{ label: '创建时间', value: 'createTime' },
|
||||
|
||||
@@ -214,8 +214,8 @@ export default {
|
||||
'基本信息': ['itemTypeDesc', 'warehouseName', 'actualWarehouseName', 'dataTypeText'],
|
||||
'钢卷号': ['enterCoilNo', 'supplierCoilNo', 'currentCoilNo'],
|
||||
'时间': ['createTime', 'exportTime', 'exportBy'],
|
||||
'物理属性': ['netWeight', 'length', 'specification', 'actualThickness'],
|
||||
'材质属性': ['material', 'manufacturer', 'surfaceTreatmentDesc', 'zincLayer', 'packingStatus', 'temperGrade', 'coatingType'],
|
||||
'物理属性': ['netWeight', 'length', 'specification', 'actualThickness', 'theoreticalThickness', 'theoreticalLength'],
|
||||
'材质属性': ['material', 'manufacturer', 'surfaceTreatmentDesc', 'zincLayer', 'packingStatus', 'temperGrade', 'coatingType', 'chromePlateCoilNo'],
|
||||
'用途': ['purpose', 'businessPurpose'],
|
||||
'状态': ['qualityStatus', 'statusDesc', 'isRelatedToOrderText'],
|
||||
'其他': ['itemName', 'itemId', 'packagingRequirement', 'trimmingRequirement', 'transferType', 'saleName', 'remark', 'team'],
|
||||
@@ -391,12 +391,28 @@ export default {
|
||||
openCustomExport() {
|
||||
getExportColumns().then(res => {
|
||||
this.exportColumns = res.data
|
||||
// 读缓存:上次保存的列顺序
|
||||
const cached = localStorage.getItem('custom-export-columns-coil-report-receive')
|
||||
if (cached) {
|
||||
try {
|
||||
const arr = JSON.parse(cached)
|
||||
if (Array.isArray(arr) && arr.length) {
|
||||
this.selectedColumns = [...arr]
|
||||
this.orderedColumns = [...arr]
|
||||
this.customExportVisible = true
|
||||
return
|
||||
}
|
||||
} catch (e) { /* ignore */ }
|
||||
}
|
||||
this.selectedColumns = []
|
||||
this.orderedColumns = []
|
||||
this.customExportVisible = true
|
||||
})
|
||||
},
|
||||
// 执行自定义导出(按 orderedColumns 顺序)
|
||||
doCustomExport() {
|
||||
// 缓存当前配置
|
||||
localStorage.setItem('custom-export-columns-coil-report-receive', JSON.stringify(this.orderedColumns))
|
||||
this.customExportVisible = false
|
||||
this.download('wms/materialCoil/exportCustomOrdered', {
|
||||
coilIds: this.coilIds,
|
||||
|
||||
@@ -1,51 +1,31 @@
|
||||
<template>
|
||||
<div>
|
||||
<ComprehensiveTemplate v-if="!loading" :actionTypes="actionTypes" :actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams" :warehouseOptions="warehouseOptions" :productionLine="productionLine" />
|
||||
<el-empty v-else description="正在加载报表配置..." />
|
||||
</div>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||
import { listReportConfig } from '@/api/wms/reportConfig.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
ComprehensiveTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
actionTypes: [],
|
||||
actionQueryParams: {},
|
||||
baseQueryParams: {},
|
||||
warehouseOptions: [],
|
||||
productionLine: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReportConfig()
|
||||
},
|
||||
methods: {
|
||||
getReportConfig() {
|
||||
this.loading = true
|
||||
listReportConfig({
|
||||
reportCode: 'acid'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.rows.length == 1) {
|
||||
const config = JSON.parse(res.rows[0].configJson)
|
||||
this.actionTypes = config.actionTypes
|
||||
this.actionQueryParams = config.actionQueryParams
|
||||
this.baseQueryParams = config.baseQueryParams
|
||||
this.warehouseOptions = config.warehouseOptions
|
||||
this.productionLine = config.productionLine
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
actionType: '11,120',
|
||||
reportType: 'all',
|
||||
productionLine: '酸轧线',
|
||||
warehouseOptions: [
|
||||
{ label: '酸连轧成品库', value: '1988150099140866050' },
|
||||
{ label: '镀锌原料库', value: '1988150263284953089' },
|
||||
{ label: '脱脂原料库', value: '1988150545175736322' },
|
||||
{ label: '酸连轧纵剪分条原料库', value: '1988150150521090049' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,51 +1,31 @@
|
||||
<template>
|
||||
<div>
|
||||
<DayTemplate v-if="!loading" :actionTypes="actionTypes" :actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams" :warehouseOptions="warehouseOptions" :productionLine="productionLine" />
|
||||
<el-empty v-else description="正在加载报表配置..." />
|
||||
</div>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DayTemplate from '@/views/wms/report/template/day.vue'
|
||||
import { listReportConfig } from '@/api/wms/reportConfig.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'DayReport',
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
DayTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
actionTypes: [],
|
||||
actionQueryParams: {},
|
||||
baseQueryParams: {},
|
||||
warehouseOptions: [],
|
||||
productionLine: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReportConfig()
|
||||
},
|
||||
methods: {
|
||||
getReportConfig() {
|
||||
this.loading = true
|
||||
listReportConfig({
|
||||
reportCode: 'acid'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.rows.length == 1) {
|
||||
const config = JSON.parse(res.rows[0].configJson)
|
||||
this.actionTypes = config.actionTypes
|
||||
this.actionQueryParams = config.actionQueryParams
|
||||
this.baseQueryParams = config.baseQueryParams
|
||||
this.warehouseOptions = config.warehouseOptions
|
||||
this.productionLine = config.productionLine
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
actionType: '11,120',
|
||||
reportType: 'day',
|
||||
productionLine: '酸轧线',
|
||||
warehouseOptions: [
|
||||
{ label: '酸连轧成品库', value: '1988150099140866050' },
|
||||
{ label: '镀锌原料库', value: '1988150263284953089' },
|
||||
{ label: '脱脂原料库', value: '1988150545175736322' },
|
||||
{ label: '酸连轧纵剪分条原料库', value: '1988150150521090049' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,51 +1,31 @@
|
||||
<template>
|
||||
<div>
|
||||
<LossTemplate v-if="!loading" :actionTypes="actionTypes" :actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams" :warehouseOptions="warehouseOptions" :productionLine="productionLine" />
|
||||
<el-empty v-else description="正在加载报表配置..." />
|
||||
</div>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LossTemplate from '@/views/wms/report/template/loss.vue'
|
||||
import { listReportConfig } from '@/api/wms/reportConfig.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'LossReport',
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
LossTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
actionTypes: [],
|
||||
actionQueryParams: {},
|
||||
baseQueryParams: {},
|
||||
warehouseOptions: [],
|
||||
productionLine: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReportConfig()
|
||||
},
|
||||
methods: {
|
||||
getReportConfig() {
|
||||
this.loading = true
|
||||
listReportConfig({
|
||||
reportCode: 'acid'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.rows.length == 1) {
|
||||
const config = JSON.parse(res.rows[0].configJson)
|
||||
this.actionTypes = config.actionTypes
|
||||
this.actionQueryParams = config.actionQueryParams
|
||||
this.baseQueryParams = config.baseQueryParams
|
||||
this.warehouseOptions = config.warehouseOptions
|
||||
this.productionLine = config.productionLine
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
actionType: '11,120',
|
||||
reportType: 'loss',
|
||||
productionLine: '酸轧线',
|
||||
warehouseOptions: [
|
||||
{ label: '酸连轧成品库', value: '1988150099140866050' },
|
||||
{ label: '镀锌原料库', value: '1988150263284953089' },
|
||||
{ label: '脱脂原料库', value: '1988150545175736322' },
|
||||
{ label: '酸连轧纵剪分条原料库', value: '1988150150521090049' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,51 +1,31 @@
|
||||
<template>
|
||||
<div>
|
||||
<MonthTemplate v-if="!loading" :actionTypes="actionTypes" :actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams" :warehouseOptions="warehouseOptions" :productionLine="productionLine" />
|
||||
<el-empty v-else description="正在加载报表配置..." />
|
||||
</div>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MonthTemplate from '@/views/wms/report/template/month.vue'
|
||||
import { listReportConfig } from '@/api/wms/reportConfig.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'MonthReport',
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
MonthTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
actionTypes: [],
|
||||
actionQueryParams: {},
|
||||
baseQueryParams: {},
|
||||
warehouseOptions: [],
|
||||
productionLine: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReportConfig()
|
||||
},
|
||||
methods: {
|
||||
getReportConfig() {
|
||||
this.loading = true
|
||||
listReportConfig({
|
||||
reportCode: 'acid'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.rows.length == 1) {
|
||||
const config = JSON.parse(res.rows[0].configJson)
|
||||
this.actionTypes = config.actionTypes
|
||||
this.actionQueryParams = config.actionQueryParams
|
||||
this.baseQueryParams = config.baseQueryParams
|
||||
this.warehouseOptions = config.warehouseOptions
|
||||
this.productionLine = config.productionLine
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
actionType: '11,120',
|
||||
reportType: 'month',
|
||||
productionLine: '酸轧线',
|
||||
warehouseOptions: [
|
||||
{ label: '酸连轧成品库', value: '1988150099140866050' },
|
||||
{ label: '镀锌原料库', value: '1988150263284953089' },
|
||||
{ label: '脱脂原料库', value: '1988150545175736322' },
|
||||
{ label: '酸连轧纵剪分条原料库', value: '1988150150521090049' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,47 +1,31 @@
|
||||
<template>
|
||||
<div>
|
||||
<OutTemplate v-if="!loading" :baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions" :productionLine="productionLine" />
|
||||
<el-empty v-else description="正在加载报表配置..." />
|
||||
</div>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OutTemplate from "@/views/wms/report/template/out.vue";
|
||||
import { listReportConfig } from '@/api/wms/reportConfig.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'OutReport',
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
OutTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
baseQueryParams: {},
|
||||
warehouseOptions: [],
|
||||
productionLine: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReportConfig()
|
||||
},
|
||||
methods: {
|
||||
getReportConfig() {
|
||||
this.loading = true
|
||||
listReportConfig({
|
||||
reportCode: 'acid'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.rows.length == 1) {
|
||||
const config = JSON.parse(res.rows[0].configJson)
|
||||
this.baseQueryParams = config.baseQueryParams
|
||||
this.warehouseOptions = config.warehouseOptions
|
||||
this.productionLine = config.productionLine
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
actionType: '11,120',
|
||||
reportType: 'out',
|
||||
productionLine: '酸轧线',
|
||||
warehouseOptions: [
|
||||
{ label: '酸连轧成品库', value: '1988150099140866050' },
|
||||
{ label: '镀锌原料库', value: '1988150263284953089' },
|
||||
{ label: '脱脂原料库', value: '1988150545175736322' },
|
||||
{ label: '酸连轧纵剪分条原料库', value: '1988150150521090049' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,51 +1,31 @@
|
||||
<template>
|
||||
<div>
|
||||
<TeamTemplate v-if="!loading" :actionTypes="actionTypes" :actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams" :warehouseOptions="warehouseOptions" :productionLine="productionLine" />
|
||||
<el-empty v-else description="正在加载报表配置..." />
|
||||
</div>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TeamTemplate from '@/views/wms/report/template/team.vue'
|
||||
import { listReportConfig } from '@/api/wms/reportConfig.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'TeamReport',
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
TeamTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
actionTypes: [],
|
||||
actionQueryParams: {},
|
||||
baseQueryParams: {},
|
||||
warehouseOptions: [],
|
||||
productionLine: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReportConfig()
|
||||
},
|
||||
methods: {
|
||||
getReportConfig() {
|
||||
this.loading = true
|
||||
listReportConfig({
|
||||
reportCode: 'acid'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.rows.length == 1) {
|
||||
const config = JSON.parse(res.rows[0].configJson)
|
||||
this.actionTypes = config.actionTypes
|
||||
this.actionQueryParams = config.actionQueryParams
|
||||
this.baseQueryParams = config.baseQueryParams
|
||||
this.warehouseOptions = config.warehouseOptions
|
||||
this.productionLine = config.productionLine
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
actionType: '11,120',
|
||||
reportType: 'team',
|
||||
productionLine: '酸轧线',
|
||||
warehouseOptions: [
|
||||
{ label: '酸连轧成品库', value: '1988150099140866050' },
|
||||
{ label: '镀锌原料库', value: '1988150263284953089' },
|
||||
{ label: '脱脂原料库', value: '1988150545175736322' },
|
||||
{ label: '酸连轧纵剪分条原料库', value: '1988150150521090049' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,51 +1,31 @@
|
||||
<template>
|
||||
<div>
|
||||
<YearTemplate v-if="!loading" :actionTypes="actionTypes" :actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams" :warehouseOptions="warehouseOptions" :productionLine="productionLine" />
|
||||
<el-empty v-else description="正在加载报表配置..." />
|
||||
</div>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import YearTemplate from '@/views/wms/report/template/year.vue'
|
||||
import { listReportConfig } from '@/api/wms/reportConfig.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'YearReport',
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
YearTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
actionTypes: [],
|
||||
actionQueryParams: {},
|
||||
baseQueryParams: {},
|
||||
warehouseOptions: [],
|
||||
productionLine: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReportConfig()
|
||||
},
|
||||
methods: {
|
||||
getReportConfig() {
|
||||
this.loading = true
|
||||
listReportConfig({
|
||||
reportCode: 'acid'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.rows.length == 1) {
|
||||
const config = JSON.parse(res.rows[0].configJson)
|
||||
this.actionTypes = config.actionTypes
|
||||
this.actionQueryParams = config.actionQueryParams
|
||||
this.baseQueryParams = config.baseQueryParams
|
||||
this.warehouseOptions = config.warehouseOptions
|
||||
this.productionLine = config.productionLine
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
actionType: '11,120',
|
||||
reportType: 'year',
|
||||
productionLine: '酸轧线',
|
||||
warehouseOptions: [
|
||||
{ label: '酸连轧成品库', value: '1988150099140866050' },
|
||||
{ label: '镀锌原料库', value: '1988150263284953089' },
|
||||
{ label: '脱脂原料库', value: '1988150545175736322' },
|
||||
{ label: '酸连轧纵剪分条原料库', value: '1988150150521090049' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
51
klp-ui/src/views/wms/report/zha_old/comprehensive.vue
Normal file
51
klp-ui/src/views/wms/report/zha_old/comprehensive.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div>
|
||||
<ComprehensiveTemplate v-if="!loading" :actionTypes="actionTypes" :actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams" :warehouseOptions="warehouseOptions" :productionLine="productionLine" />
|
||||
<el-empty v-else description="正在加载报表配置..." />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||
import { listReportConfig } from '@/api/wms/reportConfig.js'
|
||||
|
||||
export default {
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
ComprehensiveTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
actionTypes: [],
|
||||
actionQueryParams: {},
|
||||
baseQueryParams: {},
|
||||
warehouseOptions: [],
|
||||
productionLine: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReportConfig()
|
||||
},
|
||||
methods: {
|
||||
getReportConfig() {
|
||||
this.loading = true
|
||||
listReportConfig({
|
||||
reportCode: 'acid'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.rows.length == 1) {
|
||||
const config = JSON.parse(res.rows[0].configJson)
|
||||
this.actionTypes = config.actionTypes
|
||||
this.actionQueryParams = config.actionQueryParams
|
||||
this.baseQueryParams = config.baseQueryParams
|
||||
this.warehouseOptions = config.warehouseOptions
|
||||
this.productionLine = config.productionLine
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
51
klp-ui/src/views/wms/report/zha_old/day.vue
Normal file
51
klp-ui/src/views/wms/report/zha_old/day.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div>
|
||||
<DayTemplate v-if="!loading" :actionTypes="actionTypes" :actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams" :warehouseOptions="warehouseOptions" :productionLine="productionLine" />
|
||||
<el-empty v-else description="正在加载报表配置..." />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DayTemplate from '@/views/wms/report/template/day.vue'
|
||||
import { listReportConfig } from '@/api/wms/reportConfig.js'
|
||||
|
||||
export default {
|
||||
name: 'DayReport',
|
||||
components: {
|
||||
DayTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
actionTypes: [],
|
||||
actionQueryParams: {},
|
||||
baseQueryParams: {},
|
||||
warehouseOptions: [],
|
||||
productionLine: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReportConfig()
|
||||
},
|
||||
methods: {
|
||||
getReportConfig() {
|
||||
this.loading = true
|
||||
listReportConfig({
|
||||
reportCode: 'acid'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.rows.length == 1) {
|
||||
const config = JSON.parse(res.rows[0].configJson)
|
||||
this.actionTypes = config.actionTypes
|
||||
this.actionQueryParams = config.actionQueryParams
|
||||
this.baseQueryParams = config.baseQueryParams
|
||||
this.warehouseOptions = config.warehouseOptions
|
||||
this.productionLine = config.productionLine
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
51
klp-ui/src/views/wms/report/zha_old/loss.vue
Normal file
51
klp-ui/src/views/wms/report/zha_old/loss.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div>
|
||||
<LossTemplate v-if="!loading" :actionTypes="actionTypes" :actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams" :warehouseOptions="warehouseOptions" :productionLine="productionLine" />
|
||||
<el-empty v-else description="正在加载报表配置..." />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LossTemplate from '@/views/wms/report/template/loss.vue'
|
||||
import { listReportConfig } from '@/api/wms/reportConfig.js'
|
||||
|
||||
export default {
|
||||
name: 'LossReport',
|
||||
components: {
|
||||
LossTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
actionTypes: [],
|
||||
actionQueryParams: {},
|
||||
baseQueryParams: {},
|
||||
warehouseOptions: [],
|
||||
productionLine: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReportConfig()
|
||||
},
|
||||
methods: {
|
||||
getReportConfig() {
|
||||
this.loading = true
|
||||
listReportConfig({
|
||||
reportCode: 'acid'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.rows.length == 1) {
|
||||
const config = JSON.parse(res.rows[0].configJson)
|
||||
this.actionTypes = config.actionTypes
|
||||
this.actionQueryParams = config.actionQueryParams
|
||||
this.baseQueryParams = config.baseQueryParams
|
||||
this.warehouseOptions = config.warehouseOptions
|
||||
this.productionLine = config.productionLine
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
51
klp-ui/src/views/wms/report/zha_old/month.vue
Normal file
51
klp-ui/src/views/wms/report/zha_old/month.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div>
|
||||
<MonthTemplate v-if="!loading" :actionTypes="actionTypes" :actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams" :warehouseOptions="warehouseOptions" :productionLine="productionLine" />
|
||||
<el-empty v-else description="正在加载报表配置..." />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MonthTemplate from '@/views/wms/report/template/month.vue'
|
||||
import { listReportConfig } from '@/api/wms/reportConfig.js'
|
||||
|
||||
export default {
|
||||
name: 'MonthReport',
|
||||
components: {
|
||||
MonthTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
actionTypes: [],
|
||||
actionQueryParams: {},
|
||||
baseQueryParams: {},
|
||||
warehouseOptions: [],
|
||||
productionLine: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReportConfig()
|
||||
},
|
||||
methods: {
|
||||
getReportConfig() {
|
||||
this.loading = true
|
||||
listReportConfig({
|
||||
reportCode: 'acid'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.rows.length == 1) {
|
||||
const config = JSON.parse(res.rows[0].configJson)
|
||||
this.actionTypes = config.actionTypes
|
||||
this.actionQueryParams = config.actionQueryParams
|
||||
this.baseQueryParams = config.baseQueryParams
|
||||
this.warehouseOptions = config.warehouseOptions
|
||||
this.productionLine = config.productionLine
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
47
klp-ui/src/views/wms/report/zha_old/out.vue
Normal file
47
klp-ui/src/views/wms/report/zha_old/out.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<div>
|
||||
<OutTemplate v-if="!loading" :baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions" :productionLine="productionLine" />
|
||||
<el-empty v-else description="正在加载报表配置..." />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OutTemplate from "@/views/wms/report/template/out.vue";
|
||||
import { listReportConfig } from '@/api/wms/reportConfig.js'
|
||||
|
||||
export default {
|
||||
name: 'OutReport',
|
||||
components: {
|
||||
OutTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
baseQueryParams: {},
|
||||
warehouseOptions: [],
|
||||
productionLine: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReportConfig()
|
||||
},
|
||||
methods: {
|
||||
getReportConfig() {
|
||||
this.loading = true
|
||||
listReportConfig({
|
||||
reportCode: 'acid'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.rows.length == 1) {
|
||||
const config = JSON.parse(res.rows[0].configJson)
|
||||
this.baseQueryParams = config.baseQueryParams
|
||||
this.warehouseOptions = config.warehouseOptions
|
||||
this.productionLine = config.productionLine
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
51
klp-ui/src/views/wms/report/zha_old/team.vue
Normal file
51
klp-ui/src/views/wms/report/zha_old/team.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div>
|
||||
<TeamTemplate v-if="!loading" :actionTypes="actionTypes" :actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams" :warehouseOptions="warehouseOptions" :productionLine="productionLine" />
|
||||
<el-empty v-else description="正在加载报表配置..." />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TeamTemplate from '@/views/wms/report/template/team.vue'
|
||||
import { listReportConfig } from '@/api/wms/reportConfig.js'
|
||||
|
||||
export default {
|
||||
name: 'TeamReport',
|
||||
components: {
|
||||
TeamTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
actionTypes: [],
|
||||
actionQueryParams: {},
|
||||
baseQueryParams: {},
|
||||
warehouseOptions: [],
|
||||
productionLine: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReportConfig()
|
||||
},
|
||||
methods: {
|
||||
getReportConfig() {
|
||||
this.loading = true
|
||||
listReportConfig({
|
||||
reportCode: 'acid'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.rows.length == 1) {
|
||||
const config = JSON.parse(res.rows[0].configJson)
|
||||
this.actionTypes = config.actionTypes
|
||||
this.actionQueryParams = config.actionQueryParams
|
||||
this.baseQueryParams = config.baseQueryParams
|
||||
this.warehouseOptions = config.warehouseOptions
|
||||
this.productionLine = config.productionLine
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
51
klp-ui/src/views/wms/report/zha_old/year.vue
Normal file
51
klp-ui/src/views/wms/report/zha_old/year.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div>
|
||||
<YearTemplate v-if="!loading" :actionTypes="actionTypes" :actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams" :warehouseOptions="warehouseOptions" :productionLine="productionLine" />
|
||||
<el-empty v-else description="正在加载报表配置..." />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import YearTemplate from '@/views/wms/report/template/year.vue'
|
||||
import { listReportConfig } from '@/api/wms/reportConfig.js'
|
||||
|
||||
export default {
|
||||
name: 'YearReport',
|
||||
components: {
|
||||
YearTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
actionTypes: [],
|
||||
actionQueryParams: {},
|
||||
baseQueryParams: {},
|
||||
warehouseOptions: [],
|
||||
productionLine: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReportConfig()
|
||||
},
|
||||
methods: {
|
||||
getReportConfig() {
|
||||
this.loading = true
|
||||
listReportConfig({
|
||||
reportCode: 'acid'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.rows.length == 1) {
|
||||
const config = JSON.parse(res.rows[0].configJson)
|
||||
this.actionTypes = config.actionTypes
|
||||
this.actionQueryParams = config.actionQueryParams
|
||||
this.baseQueryParams = config.baseQueryParams
|
||||
this.warehouseOptions = config.warehouseOptions
|
||||
this.productionLine = config.productionLine
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,26 +1,30 @@
|
||||
<template>
|
||||
<ComprehensiveTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||
import { zincConfig } from '@/views/wms/report/js/config.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
ComprehensiveTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...zincConfig,
|
||||
actionType: 501,
|
||||
reportType: 'all',
|
||||
productionLine: '镀锌线',
|
||||
warehouseOptions: [
|
||||
{ value: '1988150323162836993', label: '镀锌成品库' },
|
||||
{ value: '1988150487185289217', label: '镀锌纵剪分条原料库' },
|
||||
{ value: '2056545127927787522', label: '镀锌待打包' },
|
||||
{ value: '2019583656787259393', label: '技术部' },
|
||||
{ value: '2019583325311414274', label: '小钢卷库' },
|
||||
{ value: '2019583429955104769', label: '废品库' },
|
||||
{ value: '2019583137616310273', label: '退货库' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,26 +1,30 @@
|
||||
<template>
|
||||
<DayTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DayTemplate from '@/views/wms/report/template/day.vue'
|
||||
import { zincConfig } from '@/views/wms/report/js/config.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'DayReport',
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
DayTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...zincConfig,
|
||||
actionType: 501,
|
||||
reportType: 'day',
|
||||
productionLine: '镀锌线',
|
||||
warehouseOptions: [
|
||||
{ value: '1988150323162836993', label: '镀锌成品库' },
|
||||
{ value: '1988150487185289217', label: '镀锌纵剪分条原料库' },
|
||||
{ value: '2056545127927787522', label: '镀锌待打包' },
|
||||
{ value: '2019583656787259393', label: '技术部' },
|
||||
{ value: '2019583325311414274', label: '小钢卷库' },
|
||||
{ value: '2019583429955104769', label: '废品库' },
|
||||
{ value: '2019583137616310273', label: '退货库' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,26 +1,30 @@
|
||||
<template>
|
||||
<LossTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
></LossTemplate>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LossTemplate from '@/views/wms/report/template/loss.vue'
|
||||
import { zincConfig } from '@/views/wms/report/js/config.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'LossReport',
|
||||
components: {
|
||||
LossTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...zincConfig,
|
||||
}
|
||||
export default {
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
actionType: 501,
|
||||
reportType: 'loss',
|
||||
productionLine: '镀锌线',
|
||||
warehouseOptions: [
|
||||
{ value: '1988150323162836993', label: '镀锌成品库' },
|
||||
{ value: '1988150487185289217', label: '镀锌纵剪分条原料库' },
|
||||
{ value: '2056545127927787522', label: '镀锌待打包' },
|
||||
{ value: '2019583656787259393', label: '技术部' },
|
||||
{ value: '2019583325311414274', label: '小钢卷库' },
|
||||
{ value: '2019583429955104769', label: '废品库' },
|
||||
{ value: '2019583137616310273', label: '退货库' },
|
||||
],
|
||||
}
|
||||
}
|
||||
</script>
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,26 +1,30 @@
|
||||
<template>
|
||||
<MonthTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MonthTemplate from '@/views/wms/report/template/month.vue'
|
||||
import { zincConfig } from '@/views/wms/report/js/config.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'MonthReport',
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
MonthTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...zincConfig,
|
||||
actionType: 501,
|
||||
reportType: 'month',
|
||||
productionLine: '镀锌线',
|
||||
warehouseOptions: [
|
||||
{ value: '1988150323162836993', label: '镀锌成品库' },
|
||||
{ value: '1988150487185289217', label: '镀锌纵剪分条原料库' },
|
||||
{ value: '2056545127927787522', label: '镀锌待打包' },
|
||||
{ value: '2019583656787259393', label: '技术部' },
|
||||
{ value: '2019583325311414274', label: '小钢卷库' },
|
||||
{ value: '2019583429955104769', label: '废品库' },
|
||||
{ value: '2019583137616310273', label: '退货库' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,24 +1,30 @@
|
||||
<template>
|
||||
<OutTemplate
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OutTemplate from "@/views/wms/report/template/out.vue";
|
||||
import { zincConfig } from '@/views/wms/report/js/config.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'ZhaTemplate',
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
OutTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...zincConfig,
|
||||
actionType: 501,
|
||||
reportType: 'out',
|
||||
productionLine: '镀锌线',
|
||||
warehouseOptions: [
|
||||
{ value: '1988150323162836993', label: '镀锌成品库' },
|
||||
{ value: '1988150487185289217', label: '镀锌纵剪分条原料库' },
|
||||
{ value: '2056545127927787522', label: '镀锌待打包' },
|
||||
{ value: '2019583656787259393', label: '技术部' },
|
||||
{ value: '2019583325311414274', label: '小钢卷库' },
|
||||
{ value: '2019583429955104769', label: '废品库' },
|
||||
{ value: '2019583137616310273', label: '退货库' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,26 +1,30 @@
|
||||
<template>
|
||||
<TeamTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TeamTemplate from '@/views/wms/report/template/team.vue'
|
||||
import { zincConfig } from '@/views/wms/report/js/config.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'TeamReport',
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
TeamTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...zincConfig,
|
||||
actionType: 501,
|
||||
reportType: 'team',
|
||||
productionLine: '镀锌线',
|
||||
warehouseOptions: [
|
||||
{ value: '1988150323162836993', label: '镀锌成品库' },
|
||||
{ value: '1988150487185289217', label: '镀锌纵剪分条原料库' },
|
||||
{ value: '2056545127927787522', label: '镀锌待打包' },
|
||||
{ value: '2019583656787259393', label: '技术部' },
|
||||
{ value: '2019583325311414274', label: '小钢卷库' },
|
||||
{ value: '2019583429955104769', label: '废品库' },
|
||||
{ value: '2019583137616310273', label: '退货库' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,27 +1,30 @@
|
||||
<template>
|
||||
<YearTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import YearTemplate from '@/views/wms/report/template/year.vue'
|
||||
import { zincConfig } from '@/views/wms/report/js/config.js'
|
||||
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'YearReport',
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
YearTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...zincConfig,
|
||||
actionType: 501,
|
||||
reportType: 'year',
|
||||
productionLine: '镀锌线',
|
||||
warehouseOptions: [
|
||||
{ value: '1988150323162836993', label: '镀锌成品库' },
|
||||
{ value: '1988150487185289217', label: '镀锌纵剪分条原料库' },
|
||||
{ value: '2056545127927787522', label: '镀锌待打包' },
|
||||
{ value: '2019583656787259393', label: '技术部' },
|
||||
{ value: '2019583325311414274', label: '小钢卷库' },
|
||||
{ value: '2019583429955104769', label: '废品库' },
|
||||
{ value: '2019583137616310273', label: '退货库' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
26
klp-ui/src/views/wms/report/zinc_old/comprehensive.vue
Normal file
26
klp-ui/src/views/wms/report/zinc_old/comprehensive.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<ComprehensiveTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||
import { zincConfig } from '@/views/wms/report/js/config.js'
|
||||
|
||||
export default {
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
ComprehensiveTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...zincConfig,
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
26
klp-ui/src/views/wms/report/zinc_old/day.vue
Normal file
26
klp-ui/src/views/wms/report/zinc_old/day.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<DayTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DayTemplate from '@/views/wms/report/template/day.vue'
|
||||
import { zincConfig } from '@/views/wms/report/js/config.js'
|
||||
|
||||
export default {
|
||||
name: 'DayReport',
|
||||
components: {
|
||||
DayTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...zincConfig,
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
26
klp-ui/src/views/wms/report/zinc_old/loss.vue
Normal file
26
klp-ui/src/views/wms/report/zinc_old/loss.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<LossTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
></LossTemplate>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LossTemplate from '@/views/wms/report/template/loss.vue'
|
||||
import { zincConfig } from '@/views/wms/report/js/config.js'
|
||||
|
||||
export default {
|
||||
name: 'LossReport',
|
||||
components: {
|
||||
LossTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...zincConfig,
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
26
klp-ui/src/views/wms/report/zinc_old/month.vue
Normal file
26
klp-ui/src/views/wms/report/zinc_old/month.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<MonthTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MonthTemplate from '@/views/wms/report/template/month.vue'
|
||||
import { zincConfig } from '@/views/wms/report/js/config.js'
|
||||
|
||||
export default {
|
||||
name: 'MonthReport',
|
||||
components: {
|
||||
MonthTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...zincConfig,
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
24
klp-ui/src/views/wms/report/zinc_old/out.vue
Normal file
24
klp-ui/src/views/wms/report/zinc_old/out.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<OutTemplate
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OutTemplate from "@/views/wms/report/template/out.vue";
|
||||
import { zincConfig } from '@/views/wms/report/js/config.js'
|
||||
|
||||
export default {
|
||||
name: 'ZhaTemplate',
|
||||
components: {
|
||||
OutTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...zincConfig,
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
26
klp-ui/src/views/wms/report/zinc_old/team.vue
Normal file
26
klp-ui/src/views/wms/report/zinc_old/team.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<TeamTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TeamTemplate from '@/views/wms/report/template/team.vue'
|
||||
import { zincConfig } from '@/views/wms/report/js/config.js'
|
||||
|
||||
export default {
|
||||
name: 'TeamReport',
|
||||
components: {
|
||||
TeamTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...zincConfig,
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
27
klp-ui/src/views/wms/report/zinc_old/year.vue
Normal file
27
klp-ui/src/views/wms/report/zinc_old/year.vue
Normal file
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<YearTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import YearTemplate from '@/views/wms/report/template/year.vue'
|
||||
import { zincConfig } from '@/views/wms/report/js/config.js'
|
||||
|
||||
|
||||
export default {
|
||||
name: 'YearReport',
|
||||
components: {
|
||||
YearTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...zincConfig,
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user