refactor(wms report): 优化产线筛选组件样式与默认值
1. 将产线下拉选择替换为单选按钮组,提升筛选交互体验 2. 设置产线筛选默认值为酸轧线对应编码 3. 新增工序配置工具类与产线元数据工具类,统一管理工序与产线数据
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
<div class="app-container comparison-report" v-loading="loading">
|
||||
<!-- 查询条件 -->
|
||||
<el-card shadow="never" class="filter-card">
|
||||
<div class="line-tabs-row">
|
||||
<el-radio-group v-model="actionTypes" size="small" @change="handleQuery">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button v-for="line in lineOptions" :key="line.value" :label="line.value">{{ line.label }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-form label-width="70px" inline class="filter-form">
|
||||
<el-form-item label="产线">
|
||||
<el-select style="width: 150px;" v-model="actionTypes" placeholder="产线" clearable @change="handleQuery" size="small">
|
||||
<el-option label="全部" value="" />
|
||||
<el-option v-for="line in lineOptions" :key="line.value" :label="line.label" :value="line.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="品质">
|
||||
<muti-select v-model="queryParams.qualityStatusCsv" :options="dict.type.coil_quality_status"
|
||||
placeholder="品质" clearable style="width: 150px;" size="small" />
|
||||
@@ -176,7 +176,7 @@ export default {
|
||||
baseStartTime: baseMonthStart, baseEndTime: baseMonthEnd,
|
||||
queryParams: { enterCoilNo: '', currentCoilNo: '', itemName: '', itemSpecification: '', itemMaterial: '', itemManufacturer: '', qualityStatusCsv: '' },
|
||||
lossColumns: [], outputColumns: [],
|
||||
actionTypes: '',
|
||||
actionTypes: '11,120,201,520',
|
||||
lineOptions: [
|
||||
{ label: '酸轧线', value: '11,120,201,520' }, { label: '镀锌线', value: '202,501,521' },
|
||||
{ label: '双机架', value: '205,504,524' }, { label: '镀铬线', value: '206,505,525' },
|
||||
@@ -355,6 +355,7 @@ export default {
|
||||
.comparison-report { min-width: 900px; }
|
||||
.filter-card { margin-bottom: 8px; }
|
||||
.filter-card >>> .el-card__body { padding: 8px 12px 8px; }
|
||||
.line-tabs-row { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #eee; }
|
||||
.filter-form { margin-bottom: 0; }
|
||||
.filter-form .el-form-item { margin-bottom: 6px; margin-right: 4px; }
|
||||
.filter-form >>> .el-form-item__label { font-size: 12px; }
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
<div v-loading="loading" class="app-container line-report">
|
||||
<!-- 查询条件 -->
|
||||
<div class="filter-area">
|
||||
<div class="line-tabs-row">
|
||||
<el-radio-group v-model="actionTypes" size="small" @change="handleQuery">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button v-for="line in lineOptions" :key="line.value" :label="line.value">{{ line.label }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-form label-width="70px" inline class="filter-form">
|
||||
<el-form-item label="产线">
|
||||
<el-select v-model="actionTypes" style="width: 150px;" placeholder="产线" clearable size="small" @change="handleQuery">
|
||||
<el-option label="全部" value="" />
|
||||
<el-option v-for="line in lineOptions" :key="line.value" :label="line.label" :value="line.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="品质">
|
||||
<muti-select
|
||||
v-model="queryParams.qualityStatusCsv"
|
||||
@@ -236,7 +236,7 @@ export default {
|
||||
enterCoilNo: '', currentCoilNo: '', itemName: '', itemSpecification: '',
|
||||
itemMaterial: '', itemManufacturer: '', qualityStatusCsv: ''
|
||||
},
|
||||
actionTypes: '',
|
||||
actionTypes: '11,120,201,520',
|
||||
lineOptions: [
|
||||
{ label: '酸轧线', value: '11,120,201,520' }, { label: '镀锌线', value: '202,501,521' },
|
||||
{ label: '双机架', value: '205,504,524' }, { label: '镀铬线', value: '206,505,525' },
|
||||
@@ -810,6 +810,7 @@ export default {
|
||||
<style scoped>
|
||||
.line-report { min-width: 900px; }
|
||||
.filter-area { background: #fff; padding: 8px 12px; margin-bottom: 8px; border-bottom: 1px solid #e4e7ed; }
|
||||
.line-tabs-row { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #eee; }
|
||||
.filter-form { margin-bottom: 0; }
|
||||
.filter-form .el-form-item { margin-bottom: 6px; margin-right: 4px; }
|
||||
.filter-form >>> .el-form-item__label { font-size: 12px; }
|
||||
|
||||
48
klp-ui/src/views/wms/warehouse/processes.js
Normal file
48
klp-ui/src/views/wms/warehouse/processes.js
Normal file
@@ -0,0 +1,48 @@
|
||||
export const PROCESSES = [
|
||||
{ name: '酸连轧工序', actionType: 11, api: 'pendingAction', lockValue: 3 },
|
||||
{ name: '酸轧分条工序', actionType: 120, api: 'pendingAction', lockValue: 4 },
|
||||
{ name: '酸轧合卷', actionType: 201, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '镀锌合卷', actionType: 202, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '脱脂合卷', actionType: 203, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '拉矫平整合卷', actionType: 204, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '双机架合卷', actionType: 205, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '镀铬合卷', actionType: 206, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '镀锌工序', actionType: 501, api: 'specialSplit' },
|
||||
{ name: '脱脂工序', actionType: 502, api: 'specialSplit' },
|
||||
{ name: '拉矫平整工序', actionType: 503, api: 'specialSplit' },
|
||||
{ name: '双机架工序', actionType: 504, api: 'specialSplit' },
|
||||
{ name: '镀铬工序', actionType: 505, api: 'specialSplit' },
|
||||
{ name: '纵剪分条工序', actionType: 506, api: 'specialSplit' },
|
||||
{ name: '酸轧修复工序', actionType: 520, api: 'specialSplit' },
|
||||
{ name: '镀锌修复工序', actionType: 521, api: 'specialSplit' },
|
||||
{ name: '脱脂修复工序', actionType: 522, api: 'specialSplit' },
|
||||
{ name: '拉矫修复工序', actionType: 523, api: 'specialSplit' },
|
||||
{ name: '双机架修复工序', actionType: 524, api: 'specialSplit' },
|
||||
{ name: '镀铬修复工序', actionType: 525, api: 'specialSplit' },
|
||||
]
|
||||
|
||||
/**
|
||||
* 酸轧加工(actionType=11)、酸轧分条(actionType=120)、所有合卷(actionType 200-210)使用 addPendingAction
|
||||
* 其他工序使用 startSpecialSplit
|
||||
*/
|
||||
export function getProcessApi(actionType) {
|
||||
if (actionType === 11 || actionType === 120 || (actionType >= 200 && actionType <= 210)) {
|
||||
return 'pendingAction'
|
||||
}
|
||||
return 'specialSplit'
|
||||
}
|
||||
|
||||
export function getLockValue(actionType) {
|
||||
if (actionType === 11) return 3
|
||||
if (actionType === 120) return 4
|
||||
if (actionType >= 200 && actionType <= 210) return 5
|
||||
return undefined
|
||||
}
|
||||
|
||||
export function getProcessByName(name) {
|
||||
return PROCESSES.find(p => p.name === name)
|
||||
}
|
||||
|
||||
export function getProcessByActionType(actionType) {
|
||||
return PROCESSES.find(p => p.actionType === actionType)
|
||||
}
|
||||
Reference in New Issue
Block a user