@@ -9,13 +9,7 @@
< el-input v-model = "queryParams.currentCoilNo" placeholder="请输入当前钢卷号" clearable
< el-input v-model = "queryParams.currentCoilNo" placeholder="请输入当前钢卷号" clearable
@keyup.enter.native ="handleQuery" / >
@keyup.enter.native ="handleQuery" / >
< / el-form-item >
< / el-form-item >
<!-- < el-form-item label = "数据状态" >
< el-form-item label = "逻辑库位" prop = "warehouseId" v-if = "!hideWarehouseQuery && !leftWarehouseQuery" >
< el-select v-model = "queryParams.dataType" placeholder="请选择数据状态" clearable >
< el-option :value = "0" label = "历史数据" > 历史数据 < / el-option >
< el-option :value = "1" label = "当前数据" > 当前数据 < / el-option >
< / el-select >
< / el-form-item > -- >
< el-form-item label = "逻辑库位" prop = "warehouseId" v-if = "!hideWarehouseQuery" >
< warehouse -select v-model = "queryParams.warehouseId" placeholder="请选择仓库/库区/库位"
< warehouse -select v-model = "queryParams.warehouseId" placeholder="请选择仓库/库区/库位"
style = "width: 100%; display: inline-block;" clearable / >
style = "width: 100%; display: inline-block;" clearable / >
< / el-form-item >
< / el-form-item >
@@ -45,9 +39,6 @@
clearable @keyup.enter.native ="handleQuery" / >
clearable @keyup.enter.native ="handleQuery" / >
< / el-form-item >
< / el-form-item >
<!-- < MaterialSelect :hideType = "hideType" :itemId.sync = "queryParams.itemIds" :itemType.sync = "queryParams.itemType"
:multiple = "true" / > -- >
< el-form-item v-if = "showWaybill" label="发货状态" >
< el-form-item v-if = "showWaybill" label="发货状态" >
< el -select v-model = "queryParams.status" placeholder="请选择发货状态" clearable >
< el -select v-model = "queryParams.status" placeholder="请选择发货状态" clearable >
< el-option :value = "0" label = "未发货" > 未发货 < / el-option >
< el-option :value = "0" label = "未发货" > 未发货 < / el-option >
@@ -79,13 +70,14 @@
< / el-form >
< / el-form >
< el-row :gutter = "10" class = "mb8" v-if = "showControl" >
< el-row :gutter = "10" class = "mb8" v-if = "showControl" >
< el -col :span = "1.5" >
< ! - - < el -col :span = "1.5" >
< el-button type = "success" plain icon = "el-icon-edit" size = "mini" :disabled = "single"
< el-button type = "success" plain icon = "el-icon-edit" size = "mini" :disabled = "single"
@click ="handleCheck" > 修正 < / el -button >
@click ="handleCheck" > 修正 < / el -button >
< / el-col >
< / el-col > -- >
< el-col :span = "1.5" >
< el-col :span = "1.5" >
< el-button type = "warning" plain icon = "el-icon-download" size = "mini" @click ="handleExportAll" > 导出 < / el -button >
< el-button type = "warning" plain icon = "el-icon-download" size = "mini" @click ="handleExportAll" > 导出 < / el -button >
< / el-col >
< / el-col >
< el-col :span = "2" v-if = "canExportAll" >
< el-col :span = "2" v-if = "canExportAll" >
< el -button type = "info" plain icon = "el-icon-printer" size = "mini" :disabled = "multiple"
< el -button type = "info" plain icon = "el-icon-printer" size = "mini" :disabled = "multiple"
@click ="handleBatchPrintLabel" > 批量打印标签 < / el -button >
@click ="handleBatchPrintLabel" > 批量打印标签 < / el -button >
@@ -94,13 +86,25 @@
< el -checkbox v-model = "queryParams.orderBy" v-loading="loading" @change="getList"
< el -checkbox v-model = "queryParams.orderBy" v-loading="loading" @change="getList"
label = "orderBy" > 按实际库区排序 < / el-checkbox >
label = "orderBy" > 按实际库区排序 < / el-checkbox >
< / el-col >
< / el-col >
< right-toolbar :showSearch.sync = "showSearch" @queryTable ="getList" > < / right -toolbar >
< right-toolbar :showSearch.sync = "showSearch" @queryTable ="getList" > < / right -toolbar >
< / el-row >
< / el-row >
< KLPTable v-loading = "loading" :data="materialCoilList" @selection-change="handleSelectionChange" :floatLayer="true"
< div style = "display: flex; align-items: flex-start;" >
:floatLayerConfig = "floatLayerConfig" @ row -click = " handleRowClick "
< div v-if = "leftWarehouseQuery"
: style = "{
width: '220px',
height: showAbnormal ? 'calc(100vh - 400px)' : 'calc(100vh - 300px)',
backgroundColor: '#ffffff',
overflowY: 'auto',
overflowX: 'hidden' }" >
< warehouse-tree warehouseType = "logic" @ node -click = " handleWarehouseNodeClick " / >
< / div >
< div style = "flex: 1;" >
< KLPTable v-loading = "loading" :data="materialCoilList" @selection-change="handleSelectionChange"
:floatLayer = "true" :floatLayerConfig = "floatLayerConfig" @ row -click = " handleRowClick "
: height = "showAbnormal ? 'calc(100vh - 400px)' : 'calc(100vh - 300px)'" >
: height = "showAbnormal ? 'calc(100vh - 400px)' : 'calc(100vh - 300px)'" >
< el-table-column type = "selection" width = "55" align = "center" / >
<!-- < el-table-column type = "selection" width = "55" align = "center" / > -- >
< el-table-column label = "入场钢卷号" align = "center" prop = "enterCoilNo" >
< el-table-column label = "入场钢卷号" align = "center" prop = "enterCoilNo" >
< template slot -scope = " scope " >
< template slot -scope = " scope " >
< coil-no :coil-no = "scope.row.enterCoilNo" > < / coil-no >
< coil-no :coil-no = "scope.row.enterCoilNo" > < / coil-no >
@@ -126,7 +130,8 @@
< el-table-column label = "发货时间" v-if = "showExportTime" align="center" prop="exportTime" width="205" >
< el-table-column label = "发货时间" v-if = "showExportTime" align="center" prop="exportTime" width="205" >
< template slot -scope = " scope " >
< template slot -scope = " scope " >
< el-date-picker @change ="handleExportTimeChange(scope.row)" v-if = "canEditExportTime" style="width: 100%"
< el-date-picker @change ="handleExportTimeChange(scope.row)" v-if = "canEditExportTime" style="width: 100%"
v-model = "scope.row.exportTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择发货时间" / >
v-model = "scope.row.exportTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
placeholder = "选择发货时间" / >
< div v-else > {{ scope.row.exportTime }} < / div >
< div v-else > {{ scope.row.exportTime }} < / div >
< / template >
< / template >
< / el -table -column >
< / el -table -column >
@@ -134,7 +139,8 @@
< template slot -scope = " scope " >
< template slot -scope = " scope " >
< el-select v-model = "scope.row.exportBy" placeholder="请选择发货人" filterable
< el-select v-model = "scope.row.exportBy" placeholder="请选择发货人" filterable
@change ="handleExportByNameChange(scope.row)" >
@change ="handleExportByNameChange(scope.row)" >
< el -option v-for = "item in userList" :key="item.userName" :value="item.userName" :label="item.nickName" / >
< el -option v-for = "item in userList" :key="item.userName" :value="item.userName"
:label = "item.nickName" / >
< / el-select >
< / el-select >
< / template >
< / template >
< / el-table-column >
< / el-table-column >
@@ -261,13 +267,16 @@
< / template >
< / template >
< / el-table-column >
< / el-table-column >
< el-table-column label = "生产开始" align = "center" prop = "productionStartTime" v-if = "showProductionTimeEdit" width="150" >
< el-table-column label = "生产开始" align = "center" prop = "productionStartTime" v-if = "showProductionTimeEdit"
width = "150" >
< / el-table-column >
< / el-table-column >
< el-table-column label = "生产结束" align = "center" prop = "productionEndTime" v-if = "showProductionTimeEdit" width="150" >
< el-table-column label = "生产结束" align = "center" prop = "productionEndTime" v-if = "showProductionTimeEdit"
width = "150" >
< / el-table-column >
< / el-table-column >
< el-table-column label = "生产耗时" align = "center" prop = "productionDuration" v-if = "showProductionTimeEdit" width="150" >
< el-table-column label = "生产耗时" align = "center" prop = "productionDuration" v-if = "showProductionTimeEdit"
width = "150" >
< template slot -scope = " scope " >
< template slot -scope = " scope " >
{ { formatDuration ( scope . row . productionDuration * 60 * 1000 ) } }
{ { formatDuration ( scope . row . productionDuration * 60 * 1000 ) } }
< / template >
< / template >
@@ -307,9 +316,19 @@
< / template >
< / template >
< / el-table-column >
< / el-table-column >
< / KLPTable >
< / KLPTable >
< / div >
< / div >
< pagination v-show = "total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
< div v-show = "total > 0" style="display: flex; justify-content: flex-end; align-items: flex-end; gap: 10px;" >
< span >
总净重 : { { statistics . total _net _weight || 0 } } t
< / span >
< pagination :total = "total" :page.sync = "queryParams.pageNum" :limit.sync = "queryParams.pageSize"
@pagination ="getList" / >
@pagination ="getList" / >
< / div >
<!-- 添加或修改钢卷物料对话框 -- >
<!-- 添加或修改钢卷物料对话框 -- >
< el-dialog :title = "title" :visible.sync = "open" width = "500px" append -to -body >
< el-dialog :title = "title" :visible.sync = "open" width = "500px" append -to -body >
@@ -467,7 +486,6 @@
@change ="(value) => { productionTimeForm.productionEndTime = value; calculateProductionDuration(); }" / >
@change ="(value) => { productionTimeForm.productionEndTime = value; calculateProductionDuration(); }" / >
< / el-form-item >
< / el-form-item >
< el-form-item label = "生产耗时" prop = "productionDuration" >
< el-form-item label = "生产耗时" prop = "productionDuration" >
<!-- < div > { { productionTimeForm . formattedDuration } } < / div > -- >
< el-input v-model = "productionTimeForm.formattedDuration" placeholder="自动计算" disabled / >
< el-input v-model = "productionTimeForm.formattedDuration" placeholder="自动计算" disabled / >
< / el-form-item >
< / el-form-item >
< / el-form >
< / el-form >
@@ -501,6 +519,7 @@ import {
cancelExportCoil ,
cancelExportCoil ,
checkCoilNo ,
checkCoilNo ,
returnCoil ,
returnCoil ,
getCoilStatisticsList
} from "@/api/wms/coil" ;
} from "@/api/wms/coil" ;
import { listBoundCoil } from "@/api/wms/deliveryWaybillDetail" ;
import { listBoundCoil } from "@/api/wms/deliveryWaybillDetail" ;
import { addPendingAction } from "@/api/wms/pendingAction" ;
import { addPendingAction } from "@/api/wms/pendingAction" ;
@@ -530,6 +549,7 @@ import LogTable from "@/views/wms/warehouse/components/LogTable.vue";
import { getCoilTagPrintType } from '@/views/wms/coil/js/coilPrint' ;
import { getCoilTagPrintType } from '@/views/wms/coil/js/coilPrint' ;
import DragResizeBox from '@/components/DragResizeBox/index.vue' ;
import DragResizeBox from '@/components/DragResizeBox/index.vue' ;
import ProcessFlow from '../components/ProcessFlow.vue' ;
import ProcessFlow from '../components/ProcessFlow.vue' ;
import WarehouseTree from '@/components/KLPService/WarehouseTree/index.vue' ;
import { listDeliveryWaybillDetail , delDeliveryWaybillDetail } from "@/api/wms/deliveryWaybillDetail" ;
import { listDeliveryWaybillDetail , delDeliveryWaybillDetail } from "@/api/wms/deliveryWaybillDetail" ;
export default {
export default {
@@ -553,6 +573,7 @@ export default {
LogTable ,
LogTable ,
ProcessFlow ,
ProcessFlow ,
DragResizeBox ,
DragResizeBox ,
WarehouseTree ,
} ,
} ,
dicts : [ 'product_coil_status' , 'coil_material' , 'coil_itemname' , 'coil_manufacturer' , 'coil_quality_status' , 'wms_next_warehouse' , 'coil_business_purpose' ] ,
dicts : [ 'product_coil_status' , 'coil_material' , 'coil_itemname' , 'coil_manufacturer' , 'coil_quality_status' , 'wms_next_warehouse' , 'coil_business_purpose' ] ,
props : {
props : {
@@ -650,6 +671,10 @@ export default {
type : Boolean ,
type : Boolean ,
default : false ,
default : false ,
} ,
} ,
leftWarehouseQuery : {
type : Boolean ,
default : false ,
} ,
} ,
} ,
data ( ) {
data ( ) {
return {
return {
@@ -746,27 +771,6 @@ export default {
] ,
] ,
currentCoilNo : [
currentCoilNo : [
{ required : true , message : "当前钢卷号不能为空" , trigger : "blur" } ,
{ required : true , message : "当前钢卷号不能为空" , trigger : "blur" } ,
// 仅在新增的时候校验
// {
// validator: (rule, value, callback) => {
// // if (this.form.coilId) {
// // // 修改时会有coilId, 不触发校验
// // console.log('修改时会有coilId, 不触发校验');
// // callback();
// // } else {
// // 没有coilId则为新增 触发校验
// checkCoilNo({ currentCoilNo: value, coilId: this.form.coilId }).then(res => {
// const { duplicateType } = res.data;
// if (duplicateType === 'current' || duplicateType === 'both') {
// // alert('当前钢卷号重复,请重新输入');
// callback(new Error('当前钢卷号重复,请重新输入'));
// } else {
// callback();
// }
// })
// // }
// }, trigger: 'blur'
// }
] ,
] ,
itemId : [
itemId : [
{ required : true , message : "物品ID不能为空" , trigger : "blur" }
{ required : true , message : "物品ID不能为空" , trigger : "blur" }
@@ -846,6 +850,7 @@ export default {
// 统计数据:已发货的数量和未发货的数量
// 统计数据:已发货的数量和未发货的数量
shippedCount : 0 ,
shippedCount : 0 ,
unshippedCount : 0 ,
unshippedCount : 0 ,
statistics : { } ,
} ;
} ;
} ,
} ,
computed : {
computed : {
@@ -894,6 +899,11 @@ export default {
// 初始化时计算一次
// 初始化时计算一次
this . calculateProductionDuration ( ) ;
this . calculateProductionDuration ( ) ;
} ,
} ,
// 处理逻辑库位点击事件
handleWarehouseNodeClick ( node ) {
this . queryParams . warehouseId = node . warehouseId ;
this . getList ( ) ;
} ,
async handleRemoveFromWaybill ( row ) {
async handleRemoveFromWaybill ( row ) {
const coilId = row . coilId ;
const coilId = row . coilId ;
// 根据id查询所在的单据明细
// 根据id查询所在的单据明细
@@ -1087,6 +1097,9 @@ export default {
this . total = response . total ;
this . total = response . total ;
this . loading = false ;
this . loading = false ;
} ) ;
} ) ;
getCoilStatisticsList ( query ) . then ( res => {
this . statistics = res . data || [ ] ;
} )
} ,
} ,
/** 追溯按钮操作 */
/** 追溯按钮操作 */
handleTrace ( row ) {
handleTrace ( row ) {
@@ -1626,4 +1639,8 @@ export default {
box - sizing : border - box ;
box - sizing : border - box ;
overflow : hidden ;
overflow : hidden ;
}
}
: : v - deep . el - table {
margin - top : 0 ;
}
< / style >
< / style >