@ -25,20 +25,44 @@
< / e l - f o r m - i t e m >
< / e l - f o r m >
< div style = "text-align: center" >
< el -button type = "success" v-if ="(!$route.query || $route.query.id==='2')" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="getMaterials('0')" > 领 料
< el -button type = "success" v -if = " ( ! $ route.query | | $ route.query.id = = = ' 2 ' ) "
: disabled = "form.planDetailStatus === '已完成' || !form.planDetailCode"
@ click = "getMaterials('0')" > 领料
< / e l - b u t t o n >
< el -button type = "warning" v-if ="(!$route.query || $route.query.id==='2')" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="handleMaterialConfirmForm()" > 扫 描
< el -button type = "info" v -if = " ( ! $ route.query | | $ route.query.id = = = ' 2 ' ) "
: disabled = "form.planDetailStatus === '已完成' || !form.planDetailCode"
@ click = "completeCollectMaterials()" > 完成领料
< / e l - b u t t o n >
< el -button type = "danger" @click ="returnMaterial()" v-if ="(!$route.query || $route.query.id==='2')" :disabled="!form.planDetailCode" > 退 料
< el -button type = "warning" v -if = " ( ! $ route.query | | $ route.query.id = = = ' 2 ' ) "
: disabled = "form.planDetailStatus === '已完成' || !form.planDetailCode"
@ click = "handleMaterialConfirmForm()" > 扫描
< / e l - b u t t o n >
< el -button type = "primary" v-if ="($route.query && $route.query.id) !== '2'" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="getMaterials('1')" >
< el -button type = "danger" @click ="returnMaterial()" v -if = " ( ! $ route.query | | $ route.query.id = = = ' 2 ' ) "
: disabled = "!form.planDetailCode" > 退料
< / e l - b u t t o n >
< el -button type = "info" @click ="completeReturnMaterials()" v -if = " ( ! $ route.query | | $ route.query.id = = = ' 2 ' ) "
: disabled = "!form.planDetailCode" > 完成退料
< / e l - b u t t o n >
< el -button type = "primary" v -if = " ( $ route.query & & $ route.query.id ) ! = = ' 2 ' "
: disabled = "form.planDetailStatus === '已完成' || !form.planDetailCode"
@ click = "getMaterials('1')" >
领柜体
< / e l - b u t t o n >
< el -button v-if ="($route.query && $route.query.id) !== '2'" type="info" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="handleBindBarcode" > 绑 定
< el -button type = "danger" v -if = " ( $ route.query & & $ route.query.id ) ! = = ' 2 ' "
: disabled = "form.planDetailStatus === '已完成' || !form.planDetailCode"
@ click = "print()" >
条码
< / e l - b u t t o n >
< el -button v-if ="($route.query && $route.query.id) !== '2'" type="warning" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="handleRawBack" > 返 库
<!-- el - button v - if = "($route.query && $route.query.id) !== '2'" type = "info"
: disabled = "form.planDetailStatus === '已完成' || !form.planDetailCode"
@ click = "handleBindBarcode" > 绑定
< / e l - b u t t o n - - >
< el -button v -if = " ( $ route.query & & $ route.query.id ) ! = = ' 2 ' " type = "warning"
: disabled = "form.planDetailStatus === '已完成' || !form.planDetailCode" @ click = "handleRawBack" > 返库
< / e l - b u t t o n >
< el -button : disabled = "form.planDetailStatus === '已完成' || !form.planDetailCode" type = "success"
@ click = "finish" > 完成
< / e l - b u t t o n >
< el -button : disabled = "form.planDetailStatus === '已完成' || !form.planDetailCode" type = "primary" @click ="finish" > 完 成 < / el -button >
< el -popover
v - if = "($route.query && $route.query.id) !== '2'"
v - model = "assignModel"
@ -61,11 +85,12 @@
< div style = "float:right;margin-top: 8px" >
< el -button type = "primary" :loading ="submitAssignLoading" @click ="completeStation" > 确 定 < / el -button >
< / div >
< el -button slot = "reference" type = "success" : disabled = "form.planDetailStatus === '已完成' || !form.planDetailCode" >下发
< / e l - b u t t o n >
<!-- el - button slot = "reference" type = "success" : disabled = "form.planDetailStatus === '已完成' || !form.planDetailCode" >下发
< / e l - b u t t o n -- >
< / e l - p o p o v e r >
< / div >
< / div >
< / div >
@ -160,15 +185,6 @@
>
SOP预览
< / e l - b u t t o n >
< el -button
v - if = "($route.query && $route.query.id) !== '2'"
size = "small"
style = "margin-right: 12px"
type = "text"
@ click = "print(scope.row)"
>
条码打印
< / e l - b u t t o n >
<!-- < el -button - - >
<!-- size = "small" -- >
<!-- type = "text" -- >
@ -200,7 +216,7 @@
trigger = "click" >
< div >
< div style = "margin: 15px 0;" >
< el -input placeholder = "请扫描或输入 物料 条码" v-model ="input1" class="input-with-select" >
< el -input placeholder = "请扫描或输入 背板 条码" v-model ="input1" class="input-with-select" >
< el -button slot = "append" icon = "el-icon-full-screen" > < / e l - b u t t o n >
< / e l - i n p u t >
< / div >
@ -353,7 +369,7 @@
title = "柜体绑定"
width = "40%" >
< el -form ref = "bindBarcodeForm" :model ="bindBarcodeForm" :rules ="bindBarcodeRules" label -width = " 80px " >
< el -form -item label = " 成品 条码" prop = "productBarcode" >
< el -form -item label = " 背板 条码" prop = "productBarcode" >
< el -input v-model ="bindBarcodeForm.productBarcode" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item label = "物料条码" prop = "materialBarcode" >
@ -369,16 +385,16 @@
< el -dialog
: visible . sync = "rawBackVisible"
title = "柜体返库"
width = " 40% ">
width = " 500px ">
< el -form ref = "rawBackForm" :model ="rawBackForm" :rules ="rawBackRules" label -width = " 80px " >
< el -form -item label = "返库仓库" prop = "warehouseId" >
< el -select v-model ="rawBackForm.warehouseId" placeholder="请选择返库仓库" >
< el -select v-model ="rawBackForm.warehouseId" placeholder="请选择返库仓库" style="width:380px" >
< el -option v -for = " item in warehouseList " :key ="item.warehouseId" :label ="item.warehouseName"
: value = "item.warehouseId" > < / e l - o p t i o n >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< el -form -item label = " 物料 条码" prop = "materialBarcode" >
< el -input v-model ="rawBackForm.materialBarcode" > < / el -input >
< el -form -item label = " 柜体 条码" prop = "materialBarcode" >
< el -input v-model ="rawBackForm.materialBarcode" suffix-icon="el-icon-full-screen" style="width:380px" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< div slot = "footer" class = "dialog-footer" >
@ -423,12 +439,14 @@
< el -input v -model = " returnModelForm.materialName " autocomplete = "off" disabled > < / e l - i n p u t >
< / e l - f o r m - i t e m >
< el -form -item label = "物料条码" >
< el -input placeholder = "请输入内容" v-model ="returnModelForm.materialBarcode" class="input-with-select" @blur="setReturnModelForm" >
< el -input placeholder = "请输入内容" v -model = " returnModelForm.materialBarcode " class = "input-with-select"
@ blur = "setReturnModelForm" >
< el -button slot = "append" icon = "el-icon-search" > < / e l - b u t t o n >
< / e l - i n p u t >
< / e l - f o r m - i t e m >
< el -form -item label = "仓库" >
< el -select v-model ="returnModelForm.warehouseId" placeholder="请选择仓库" :disabled="!returnModelForm.materialBarcode" >
< el -select v -model = " returnModelForm.warehouseId " placeholder = "请选择仓库"
: disabled = "!returnModelForm.materialBarcode" >
< el -option :label ="i.label" :key ="i.value" :value ="i.value" v-for ="i in WarehousesList" > < / el -option >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
@ -437,7 +455,8 @@
< / e l - f o r m - i t e m >
< el -form -item label = "退库类型" prop = "taskType" >
< el -select v-model ="returnModelForm.taskType" placeholder="请选择退库类型" >
< el -option :label ="i.label" :key ="i.value" :value ="i.value" v-for ="i in dict.type.wms_raw_return_task_type" > < / el -option >
< el -option :label ="i.label" :key ="i.value" :value ="i.value"
v - for = "i in dict.type.wms_raw_return_task_type" > < / e l - o p t i o n >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< el -form -item label = "申请原因" >
@ -549,6 +568,7 @@ import PrintPage from '@/views/mes/barcode/endProductIndex'
import Chart from '@/components/board/Chart'
import * as echarts from 'echarts'
import {
getLoginStationInfo ,
completeProductPlanDetail ,
getNewestProductPlanDetail ,
getProductPlans ,
@ -559,7 +579,8 @@ import {
getWarehouses ,
bindBarcode ,
applyRawBack ,
assignTask , scanMaterial2Confirm , applyRawReturn
assignTask , scanMaterial2Confirm , applyRawReturn ,
getNewestOutstockCabinet , completeCollectMaterials , completeReturnMaterials
} from "@/api/board" ;
const setState = ( e ) => {
@ -636,6 +657,7 @@ export default {
tableData : [ ] ,
nowStation : null ,
loginStationInfo : { } ,
stationData : [
{
stationName : '五楼装配工位1' ,
@ -701,19 +723,34 @@ export default {
}
} ,
async mounted ( ) {
setInterval ( ( ) => {
this . $notify . info ( {
title : '通知' ,
message : '通知公告' ,
position : 'bottom-right' ,
duration : 0
/ / s e t I n t e r v a l ( ( ) = > {
/ / t h i s . $ n o t i f y . i n f o ( {
/ / t i t l e : ' 通 知 ' ,
/ / m e s s a g e : ' 通 知 公 告 ' ,
/ / p o s i t i o n : ' b o t t o m - r i g h t ' ,
/ / d u r a t i o n : 0
/ / } ) ;
/ / } , 6 0 * 1 0 0 0 )
getLoginStationInfo ( ) . then ( e => {
this . loginStationInfo = e . data ;
this . getProductPlans ( ) ;
this . getChartData ( ) ;
} ) ;
} , 60 * 1000 )
} ,
methods : {
getProductPlans ( ) {
getProductPlans ( { pageNum : this . nowNum1 , pageSize : 5 } ) . then ( e => {
this . tableData = e . rows
this . totalNum1 = Math . ceil ( e . total / 5 )
this . tableClick ( e . rows [ 0 ] )
} )
} ,
getChartData ( ) {
this . $refs . chart2 . setData ( {
tooltip : {
trigger : 'axis' ,
@ -877,7 +914,6 @@ export default {
]
} )
} ,
methods : {
async logout ( ) {
this . $confirm ( '确定退出系统吗?' , '提示' , {
@ -1373,6 +1409,8 @@ export default {
saleOrderId : this . form ? . saleOrderId ,
applyReason : '' ,
taskType : '1' ,
stationId : this . loginStationInfo . stationId ,
endStationCode : this . loginStationInfo . stationCode ,
wmsRawOutstockDetailList : [ ]
}
/ / 获 取 仓 库 信 息
@ -1430,9 +1468,17 @@ export default {
} )
} ,
print ( val ) {
this . PrintData = val
print ( ) {
getNewestOutstockCabinet ( { planDetailCode : this . form . planDetailCode } ) . then ( response => {
if ( ! response . data ) {
this . $modal . msgWarning ( "请先领取柜体" ) ;
return ;
}
this . PrintData = this . form
this . PrintData . bindBarcode = response . data . materialBatch ;
this . PrintData . barcodeType = '4' ; / / 背 板
this . printModel = true
} ) ;
} ,
assignClick ( ) {
this . assignModel = true
@ -1516,7 +1562,6 @@ export default {
} ,
/ / 表 单 重 置
resetMaterialConfirm ( ) {
this . materialConfirmForm = {
@ -1661,6 +1706,18 @@ export default {
return [ 'png' , 'jpg' , 'jpeg' ] . includes ( name . toLowerCase ( ) )
} ,
completeCollectMaterials ( ) {
completeCollectMaterials ( { endStationCode : this . loginStationInfo . stationCode } ) . then ( v => {
this . $modal . msgSuccess ( "操作成功" ) ;
} )
} ,
completeReturnMaterials ( ) {
completeReturnMaterials ( { endStationCode : this . loginStationInfo . stationCode } ) . then ( v => {
this . $modal . msgSuccess ( "操作成功" ) ;
} )
} ,
}
}
< / script >