@@ -20,17 +20,14 @@
:label = "item.label"
:value = "item.value" / >
< / el-select >
< el-selec t v-model = "PickingValu e" placeholder="领料情况" size="small" style="width: 1 20px" clearable >
< el-option
v-for = "item in Picking"
:key = "item.value "
:label = "item.label "
:value = "item.value " / >
< / el-select >
< el-input v-model = "Name" placeholder="名称" clearable style="width: 120px" size="small" / >
< el -input v-model = "materialSpec" placeholder="物料规格" style="width: 120px" clearable size="small" />
< el -input v-model = "materialModel" placeholder="物料型号" style="width: 120px" clearable size="small" />
< el -button size = "small" type = "success" icon = "el-icon-search" style = "margin: 0 0 0 10px" @click ="pageCurrent0=1;pageSize0=300;pageCurrent1=1;pageSize1=300;pageCurrent2=1;pageSize2=300;pageCurrent4=1;pageSize4=20;searchTable()" > 查询 < / el -button >
< el-inpu t v-model = "Nam e" placeholder="物料名称、规格、型号" clearable style="width: 20 0px" size="small" / >
< el-switch
v-model = "PickingValue "
active -color = " # 13ce66 "
inactive -color = " # ff4949 "
style = "margin-left: 5px "/ >
< span > 已领用 < / span >
< el-button size = "small" type = "primary" plain icon = "el-icon-search" style = "margin: 0 0 0 10px" @click ="pageCurrent0=1;pageSize0=300;pageCurrent1=1;pageSize1=300;pageCurrent2=1;pageSize2=300;pageCurrent4=1;pageSize4=20;searchTable()" > 查询 < / el -button >
< / el-row >
< / div >
< el-tabs v-model = "PartType" type="card" @tab-click="searchTable()" >
@@ -254,13 +251,24 @@
< div slot = "header" >
< el-card >
< el-row style = "margin-top: 5px" >
< el-input v-model = "pickingListNumber" clearable size="small" placeholder="领料单编号" style="width:120px;margin-left: 10px" / >
< el-button size = "small" type = "success" icon = "el-icon-search" style = "margin: 0 0 0 10px" @click ="searchList()" > 查询 < / el -button >
< el-button size = "small" type = "primary" icon = "el-icon-plus" style = "margin: 0 0 0 10px" @click ="createList()" > 创建领料单 < / el -button >
< el-date-picker
v-model = "startTime"
size = "small"
type = "daterange"
align = "center"
value -format = " yyyy -MM -dd "
format = "yyyy-MM-dd"
range -separator = " ~ "
style = "width:250px"
start -placeholder = " 开始日期 "
end -placeholder = " 结束日期 " / >
< el-input v-model = "pickingListPeople" clearable size="small" placeholder="制单人" style="width:120px;margin-left: 10px" / >
< el-button size = "small" type = "primary" plain icon = "el-icon-search" style = "margin: 0 0 0 10px" @click ="searchList()" > 查询 < / el -button >
< el-button size = "small" type = "warning" plain icon = "el-icon-plus" style = "margin: 0 0 0 10px" @click ="createList()" > 创建领料单 < / el -button >
< el-tooltip :open-delay = "1200" effect = "dark" content = "为所选领料单增加物料明细" placement = "top" >
< el-button size = "small" type = "warning" icon = "el-icon-bottom" style = "margin: 0 0 5px 10px" @click ="selectInto()" > 选入物料 < / el -button >
< el-button size = "small" type = "success" plain icon = "el-icon-bottom" style = "margin: 0 0 5px 10px" @click ="selectInto()" > 选入物料 < / el -button >
< / el-tooltip >
< el-button :disabled = "Number(审批情况)===1" size = "small" type = "danger" icon = "el-icon-delete" style = "margin: 0 0 0 10px" @click ="dropList()" > 删除领料单 < / el -button >
< el-button :disabled = "Number(审批情况)===1" size = "small" plain type= "danger" icon = "el-icon-delete" style = "margin: 0 0 0 10px" @click ="dropList()" > 删除领料单 < / el -button >
< el-button :disabled = "Number(审批情况)===1" size = "small" plain type = "danger" icon = "el-icon-delete" style = "margin-right: 20px;float: right" @click ="dropListDetail()" > 移除领料明细 < / el -button >
< / el-row >
< / el-card >
@@ -273,7 +281,7 @@
{ { scope . row . 领料单编号 } }
< / template >
< / el-table-column >
< el-table-column label = "领料 人" prop = "领料 人" align = "center" min -width = " 90px " >
< el-table-column label = "制单 人" prop = "制单 人" align = "center" min -width = " 90px " >
< template slot -scope = " scope " >
{ { scope . row . 姓名 } }
< / template >
@@ -340,16 +348,16 @@
{ { scope . row . 出库数量1 } }
< / template >
< / el-table-column >
< el-table-column v-if = "true" label="备料确认" align="center" prop="是否备料确认" min-width="75px" >
< template slot -scope = " scope " >
< el-tag v-if = "Number(scope.row.是否备料确认)===1" type="success" size="mini" > 已备料 < / el -tag >
< el-tag v-else type = "warning" size = "mini" > 未备料 < / el-tag >
< / template >
< / el-table-column >
<!-- < el-table-column v-if = "true" label="备料确认" align="center" prop="是否备料确认" min-width="75px" > - - >
<!-- < template slot -scope = " scope " > -- >
<!-- < el-tag v-if = "Number(scope.row.是否备料确认)===1" type="success" size="mini" > 已备料 < / el -tag > -- >
<!-- < el-tag v-else type = "warning" size = "mini" > 未备料 < / el-tag > -- >
<!-- < / template > -- >
<!-- < / el-table-column > -- >
< el-table-column v-if = "true" label="领料确认" align="center" prop="是否领料确认" width="75px" >
< template slot -scope = " scope " >
< el-tag v-if = "(Number(scope.row.总数量) <= Number(scope.row.出库数量1)) || Number(scope.row.是否领料确认) === 1" type="success" size="mini" > 已领料 < / el -tag >
< el-tag v-else-if = "Number(scope.row.总数量) > Number(scope.row.出库数量1) && Number(scope.row.出库数量1) > 0" type="primary" size="mini" > 未领完 < / el -tag >
< el-tag v-if = "(Number(scope.row.总数量) <= Number(scope.row.出库数量1)) || Number(scope.row.是否领料确认) === 1" type="success" size="mini" > 已领完 < / el -tag >
< el-tag v-else-if = "Number(scope.row.总数量) > Number(scope.row.出库数量1) && Number(scope.row.出库数量1) > 0" type="primary" size="mini" > 部分领用 < / el -tag >
< el-tag v-else-if = "Number(scope.row.出库数量1) === 0" type="warning" size="mini" > 未领料 < / el -tag >
< / template >
< / el-table-column >
@@ -358,7 +366,7 @@
< el-popover placement = "right" width = "500" trigger = "click" >
< el-table :data = "gridData" highlight -current -row size = "mini" show -summary >
< el-table-column width = "50" align = "center" type = "index" label = "序号" / >
< el-table-column min -width = " 100 " align = "center" label = "姓名 " >
< el-table-column min -width = " 100 " align = "center" label = "领料人 " >
< template slot -scope = " scope " >
{ { scope . row . 姓名 } }
< / template >
@@ -384,7 +392,7 @@
< el-dialog v-el-drag-dialog :visible.sync = "dialogFormVisible1" title = "创建领料单" center width = "380px" >
< el-form ref = "form1" :model = "form1" :rules = "rules1" label -position = " left " >
< el-form-item label = "领料 人" prop = "领料人流水号" label -width = " 100px " size = "small" >
< el-form-item label = "制单 人" prop = "领料人流水号" label -width = " 100px " size = "small" >
< el-select v-model = "form1.领料人流水号" placeholder="请选择" size="small" clearable filterable >
< el-option
v-for = "item in pickPerson"
@@ -416,12 +424,13 @@ export default {
审批情况 : '' ,
peopleName : '' ,
ListMX : '' ,
startTime : '' ,
PartType : '基本件' ,
machineNumberValue : '' ,
machineNumber : [ ] ,
MachineNumber : '' ,
tableDataBasic : [ ] ,
PickingValue : '' ,
PickingValue : false ,
Picking : [ {
value : 0 ,
label : '未领'
@@ -462,10 +471,10 @@ export default {
领料单备注 : ''
} ,
rules1 : {
领料人流水号 : [ { required : true , message : '请选择领料 人' } ]
领料人流水号 : [ { required : true , message : '请选择制单 人' } ]
} ,
pickPerson : [ ] ,
pickingListNumber : '' , // 领料单编号
pickingListPeople : '' , // 制单人
pickingListNumberShow : '' , // 领料单编号
pickingListNum : '' , // 领料单流水号
multipleSelection : [ ] ,
@@ -501,7 +510,6 @@ export default {
request ( param ) . then ( res => {
if ( res . data [ 0 ] . result === '1' ) {
this . $message . success ( '操作成功' )
this . pickingListNumber = ''
this . searchList ( )
} else {
this . $message . error ( '操作失败' )
@@ -580,67 +588,68 @@ export default {
} ,
// 标准件
searchTable0 ( ) {
let check1 , check2 , check3 , check4 , check5 , check6
let check1 , check2 , check3
this . machineNumberValue ? check1 = 1 : check1 = 0
this . groupNumberValue ? check2 = 1 : check2 = 0
this . Name ? check3 = 1 : check3 = 0
this . materialModel ? check4 = 1 : check4 = 0
this . materialSpec ? check5 = 1 : check5 = 0
if ( this . PickingValue !== 0 && this . PickingValue !== 1 ) {
check6 = 0
console . log ( this . PickingValue , 111 )
if ( this. PickingValue === false ) {
searchTable ( check1 , this . machineNumberValue , check2 , this . groupNumberValue , check3 , this . Name , 1 , 0 , this . pageCurrent0 , this . pageSize0 , 1 ) . then ( response => {
this . tableData0 = response . data . rows
this . total0 = response . data . total
} )
} else {
check6 = 1
searchTable ( check1 , this . machineNumberValue , check2 , this . groupNumberValue , check3 , this . Name , 1 , 1 , this . pageCurrent0 , this . pageSize0 , 1 ) . then ( response => {
this . tableData0 = response . data . rows
this . total0 = response . data . total
} )
}
searchTable ( check1 , this . machineNumberValue , check2 , this . groupNumberValue , check3 , this . Name , check4 , this . materialModel , check5 , this . materialSpec , check6 , this . PickingValue , this . pageCurrent0 , this . pageSize0 , 1 ) . then ( response => {
this . tableData0 = response . data . rows
this . total0 = response . data . total
} )
} ,
// 外购件
searchTable1 ( ) {
let check1 , check2 , check3 , check4 , check5 , check6
let check1 , check2 , check3
this . machineNumberValue ? check1 = 1 : check1 = 0
this . groupNumberValue ? check2 = 1 : check2 = 0
this . Name ? check3 = 1 : check3 = 0
this . materialModel ? check4 = 1 : check4 = 0
this . materialSpec ? check5 = 1 : check5 = 0
if ( this . PickingValue !== 0 && this . PickingValue !== 1 ) {
check6 = 0
console . log ( this . PickingValue , 111 )
if ( this. PickingValue === false ) {
searchTable ( check1 , this . machineNumberValue , check2 , this . groupNumberValue , check3 , this . Name , 1 , 0 , this . pageCurrent1 , this . pageSize1 , 2 ) . then ( response => {
this . tableData0 = response . data . rows
this . total0 = response . data . total
} )
} else {
check6 = 1
searchTable ( check1 , this . machineNumberValue , check2 , this . groupNumberValue , check3 , this . Name , 1 , 1 , this . pageCurrent1 , this . pageSize1 , 2 ) . then ( response => {
this . tableData0 = response . data . rows
this . total0 = response . data . total
} )
}
searchTable ( check1 , this . machineNumberValue , check2 , this . groupNumberValue , check3 , this . Name , check4 , this . materialModel , check5 , this . materialSpec , check6 , this . PickingValue , this . pageCurrent1 , this . pageSize1 , 2 ) . then ( response => {
this . tableData1 = response . data . rows
this . total1 = response . data . total
} )
} ,
// 基本件
searchTable2 ( ) {
let check1 , check2 , check3 , check4 , check5 , check6
let check1 , check2 , check3
this . machineNumberValue ? check1 = 1 : check1 = 0
this . groupNumberValue ? check2 = 1 : check2 = 0
this . Name ? check3 = 1 : check3 = 0
this . materialModel ? check4 = 1 : check4 = 0
this . materialSpec ? check5 = 1 : check5 = 0
if ( this . PickingValue !== 0 && this . PickingValue !== 1 ) {
check6 = 0
console . log ( this . PickingValue , 111 )
if ( this. PickingValue === false ) {
searchTable ( check1 , this . machineNumberValue , check2 , this . groupNumberValue , check3 , this . Name , 1 , 0 , this . pageCurrent2 , this . pageSize2 , 3 ) . then ( response => {
this . tableData0 = response . data . rows
this . total0 = response . data . total
} )
} else {
check6 = 1
searchTable ( check1 , this . machineNumberValue , check2 , this . groupNumberValue , check3 , this . Name , 1 , 1 , this . pageCurrent2 , this . pageSize2 , 3 ) . then ( response => {
this . tableData0 = response . data . rows
this . total0 = response . data . total
} )
}
searchTable ( check1 , this . machineNumberValue , check2 , this . groupNumberValue , check3 , this . Name , check4 , this . materialModel , check5 , this . materialSpec , check6 , this . PickingValue , this . pageCurrent2 , this . pageSize2 , 3 ) . then ( response => {
this . tableData2 = response . data . rows
this . total2 = response . data . total
} )
} ,
// 离线采购件
searchTable4 ( ) {
this . listLoading = true
this . tableDataBasic = [ ]
let check1 , check2 , check3
let check1
this . Name ? check1 = 1 : check1 = 0
this . materialSpec ? check2 = 1 : check2 = 0
this . materialModel ? check3 = 1 : check3 = 0
searchPart ( check1 , this . Name , check2 , this . materialSpec , check3 , this . materialModel , this . pageCurrent4 , this . pageSize4 ) . then ( response => {
searchPart ( check1 , this . Name , this . pageCurrent4 , this . pageSize4 ) . then ( response => {
this . tableDataBasic = response . data . rows
this . total4 = response . data . total
this . listLoading = false
@@ -689,10 +698,11 @@ export default {
} ,
// 查询领料单列表
searchList ( ) {
let check , isElectrical
this . pickingListNumber ? check = 1 : check = 0
let check , isElectrical , check1
this . pickingListPeople ? check = 1 : check = 0
this . startTime ? check1 = 1 : ( check1 = 0 , this . startTime = '' )
Number ( this . token ) === 37 || Number ( this . token ) === 36 || Number ( this . token ) === 35 ? isElectrical = 1 : isElectrical = 0 // 35电工 36电气部长 37电气副部长
searchList ( this . pageCurrent3 , this . pageSize3 , check , this . pickingListNumber , isElectrical ) . then ( response => {
searchList ( this . pageCurrent3 , this . pageSize3 , check , this . pickingListPeople , isElectrical , check1 , this . startTime [ 0 ] , this . startTime [ 1 ] ). then ( response => {
this . pickListTable1 = response . data . rows
this . total3 = response . data . total
} )
@@ -754,7 +764,6 @@ export default {
request ( param ) . then ( res => {
if ( res . data [ 0 ] . result === '1' ) {
this . $message . success ( '操作成功' )
this . pickingListNumber = ''
this . searchList ( )
} else {
this . $message . error ( '操作失败' )
@@ -793,6 +802,9 @@ export default {
handleSelectionChange ( val ) {
this . multipleSelection = val
} ,
handleSelectionChange1 ( val ) {
this . multipleSelection1 = val
} ,
// 选入
selectInto ( ) {
if ( this . PartType === '离线采购件' ) {