refactor(wms/coil): 优化卷号匹配与表格布局,调整功能按钮权限
1. 修复卷号匹配字段名不统一问题,将encoilid改为coilId适配新逻辑 2. 调整CoilSelector的列名从镀铬卷号改为工序卷号 3. 调整base.vue表格列位置与注释代码,新增correctButton参数控制数据修正按钮 4. 在ship.vue中传入correctButton参数,优化发货页面功能
This commit is contained in:
@@ -12,7 +12,7 @@ export const defaultColumns = [
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
label: '镀铬卷号',
|
||||
label: '工序卷号',
|
||||
align: 'center',
|
||||
prop: 'chromelCoilNo',
|
||||
showOverflowTooltip: true
|
||||
@@ -90,7 +90,7 @@ export const fullPageDefaultColumns = [
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
label: '镀铬卷号',
|
||||
label: '工序卷号',
|
||||
align: 'center',
|
||||
prop: 'chromelCoilNo',
|
||||
showOverflowTooltip: true
|
||||
@@ -183,7 +183,7 @@ export const fullPageDefaultColumns = [
|
||||
export const optionalColumns = [
|
||||
{ label: '入场卷号', value: 'enterCoilNo' },
|
||||
{ label: '当前卷号', value: 'currentCoilNo' },
|
||||
{ label: '镀铬卷号', value: 'chromelCoilNo' },
|
||||
{ label: '工序卷号', value: 'chromelCoilNo' },
|
||||
{ label: '厂家钢卷号', value: 'supplierCoilNo' },
|
||||
{ label: '逻辑库区', value: 'warehouseName' },
|
||||
{ label: '实际库区', value: 'actualWarehouseName' },
|
||||
|
||||
@@ -129,7 +129,7 @@ export default {
|
||||
fr.start_time = excoil.start_date ?? excoil.START_DATE ?? null
|
||||
fr.end_time = excoil.end_date ?? excoil.END_DATE ?? null
|
||||
}
|
||||
this.bestMatch = fr
|
||||
this.bestMatch = this.normalizeExcoilRow(fr)
|
||||
}).catch(() => {}).finally(() => { this.matchLoading = false })
|
||||
},
|
||||
loadRecentList() {
|
||||
@@ -148,12 +148,12 @@ export default {
|
||||
return val
|
||||
},
|
||||
normalizeExcoilRow(row) {
|
||||
console.log(row, '标准化')
|
||||
const g = k => row[k] != null ? row[k] : (row[k.toUpperCase()] != null ? row[k.toUpperCase()] : null)
|
||||
return {
|
||||
hot_coilid: g('hot_coilid'),
|
||||
encoilid: g('encoilid'),
|
||||
excoilid: g('excoilid'),
|
||||
coilId: g('coilid') || g('encoilid') || g('excoilid'),
|
||||
exit_thick: g('exit_thick'),
|
||||
exit_width: g('exit_width'),
|
||||
exit_length: g('exit_length'),
|
||||
|
||||
@@ -155,6 +155,44 @@
|
||||
:floatLayer="true" :floatLayerConfig="floatLayerConfig" @row-click="handleRowClick"
|
||||
:height="showAbnormal ? 'calc(100vh - 400px)' : 'calc(100vh - 300px)'" border>
|
||||
<el-table-column v-if="showWaybill" type="selection" width="55" align="center" />
|
||||
<el-table-column label="发货计划" align="center" prop="nextWarehouseId" v-if="showWaybill || isShipView"
|
||||
width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.bindPlanName || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="发货单据" align="center" prop="nextWarehouseId" v-if="showWaybill || isShipView"
|
||||
width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="top" width="400" trigger="hover">
|
||||
<div>
|
||||
<el-descriptions :column="2" :border="false">
|
||||
<el-descriptions-item label="单据名称">
|
||||
{{ scope.row.bindWaybillName || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="车牌号">
|
||||
{{ scope.row.bindLicensePlate || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="收货单位">
|
||||
{{ scope.row.bindConsigneeUnit || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="负责人">
|
||||
{{ scope.row.bindPrincipal || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="单据状态">
|
||||
<el-tag v-if="scope.row.bindWaybillStatus === 0" type="info" size="mini">未发货</el-tag>
|
||||
<el-tag v-else-if="scope.row.bindWaybillStatus === 1" type="info" size="mini">已发货</el-tag>
|
||||
<el-tag v-else-if="scope.row.bindWaybillStatus === 2" type="info" size="mini">未打印</el-tag>
|
||||
<el-tag v-else-if="scope.row.bindWaybillStatus === 3" type="info" size="mini">已打印</el-tag>
|
||||
<el-tag v-else type="danger" size="mini">未知状态</el-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div slot="reference" class="text-ellipsis" v-text>{{ scope.row.bindLicensePlate || '-' }}</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo">
|
||||
<template slot-scope="scope">
|
||||
<coil-no :coil-no="scope.row.enterCoilNo"></coil-no>
|
||||
@@ -256,45 +294,6 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="发货计划" align="center" prop="nextWarehouseId"
|
||||
v-if="showWaybill || isShipView" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.bindPlanName || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="发货单据" align="center" prop="nextWarehouseId"
|
||||
v-if="showWaybill || isShipView" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="top" width="400" trigger="hover">
|
||||
<div>
|
||||
<el-descriptions :column="2" :border="false">
|
||||
<el-descriptions-item label="单据名称">
|
||||
{{ scope.row.bindWaybillName || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="车牌号">
|
||||
{{ scope.row.bindLicensePlate || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="收货单位">
|
||||
{{ scope.row.bindConsigneeUnit || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="负责人">
|
||||
{{ scope.row.bindPrincipal || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="单据状态">
|
||||
<el-tag v-if="scope.row.bindWaybillStatus === 0" type="info" size="mini">未发货</el-tag>
|
||||
<el-tag v-else-if="scope.row.bindWaybillStatus === 1" type="info" size="mini">已发货</el-tag>
|
||||
<el-tag v-else-if="scope.row.bindWaybillStatus === 2" type="info" size="mini">未打印</el-tag>
|
||||
<el-tag v-else-if="scope.row.bindWaybillStatus === 3" type="info" size="mini">已打印</el-tag>
|
||||
<el-tag v-else type="danger" size="mini">未知状态</el-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div slot="reference" class="text-ellipsis" v-text>{{ scope.row.bindLicensePlate || '-' }}</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="发货状态" align="center" prop="status" v-if="showWaybill" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status === 1" type="success" size="mini">已发货</el-tag>
|
||||
@@ -369,8 +368,9 @@
|
||||
退货钢卷
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCheck(scope.row)"
|
||||
v-if="showControl">数据修正</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-search" @click="handleTrace(scope.row)">生产追溯</el-button>
|
||||
v-if="showControl || correctButton">数据修正</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-search"
|
||||
@click="handleTrace(scope.row)">生产追溯</el-button>
|
||||
<el-button size="mini" v-if="showWaybill" type="text" icon="el-icon-close"
|
||||
@click="handleRemoveFromWaybill(scope.row)">
|
||||
移出货单
|
||||
@@ -467,14 +467,14 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="质量状态" prop="qualityStatus">
|
||||
<el-select v-model="form.qualityStatus" placeholder="请选择质量状态" style="width: 100%">
|
||||
<el-option v-for="item in dict.type.coil_quality_status" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="切边要求" prop="trimmingRequirement">
|
||||
<el-select v-model="form.trimmingRequirement" placeholder="请选择切边要求" style="width: 100%">
|
||||
@@ -594,7 +594,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" v-if="form.coilId">
|
||||
<!-- <el-row :gutter="20" v-if="form.coilId">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker v-model="form.createTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@@ -609,7 +609,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
<el-row :gutter="20" v-if="form.coilId">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="绑定合同" prop="contractId">
|
||||
@@ -1117,6 +1117,10 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
correctButton: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
:showControl="showControl"
|
||||
:showExportTime="showExportTime"
|
||||
:isShipView="isShipView"
|
||||
:correctButton="correctButton"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -32,6 +33,7 @@ export default {
|
||||
showStatus: false,
|
||||
hideType: false,
|
||||
showExportTime: true,
|
||||
correctButton: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -699,8 +699,11 @@ export default {
|
||||
this.$set(this.updateForm, 'productionEndTime', this.formatDateTime(data.end_date))
|
||||
}
|
||||
|
||||
if (data.encoilid) {
|
||||
this.$set(this.updateForm, 'chromePlateCoilNo', data.encoilid)
|
||||
console.log(data, 'fill')
|
||||
|
||||
if (data.coilId) {
|
||||
console.log(data.coilId)
|
||||
this.$set(this.updateForm, 'chromePlateCoilNo', data.coilId)
|
||||
}
|
||||
|
||||
if (data.start_date || data.end_date) this.calculateProductionDuration()
|
||||
|
||||
Reference in New Issue
Block a user