@ -1,6 +1,17 @@
< template >
< div class = "app-container" >
< el -form :model ="queryParams" ref = "queryForm" size = "small" :inline ="true" v-show ="showSearch" label-width="100px" >
< el -form -item label = "类型" prop = "saleOrderClassfication" >
< el -select v -model = " queryParams.saleOrderClassfication " placeholder = "请选择类型" clearable >
< el -option
v - for = "dict in dict.type.mes_sale_order_classfication"
: key = "dict.value"
: label = "dict.label"
: value = "dict.value"
/ >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< el -form -item label = "销售订单编号" prop = "saleorderCode" >
< el -input
v - model = "queryParams.saleorderCode"
@ -9,22 +20,6 @@
@ keyup . enter . native = "handleQuery"
/ >
< / e l - f o r m - i t e m >
<!-- < el -form -item label = "所属工厂" prop = "factoryId" > -- >
<!-- < el -input - - >
<!-- v - model = "queryParams.factoryId" -- >
<!-- placeholder = "请输入所属工厂" -- >
<!-- clearable -- >
<!-- @ keyup . enter . native = "handleQuery" -- >
<!-- / > - - >
<!-- < / e l - f o r m - i t e m > - - >
<!-- < el -form -item label = "所属产线" prop = "prodlineId" > -- >
<!-- < el -input - - >
<!-- v - model = "queryParams.prodlineId" -- >
<!-- placeholder = "请输入所属产线" -- >
<!-- clearable -- >
<!-- @ keyup . enter . native = "handleQuery" -- >
<!-- / > - - >
<!-- < / e l - f o r m - i t e m > - - >
< el -form -item label = "物料编码" prop = "materialCode" >
< el -input
v - model = "queryParams.materialCode"
@ -42,6 +37,15 @@
/ >
< / e l - f o r m - i t e m >
< el -form -item label = "物料规格" prop = "materialSpec" >
< el -input
v - model = "queryParams.materialSpec"
placeholder = "请输入物料规格"
clearable
@ keyup . enter . native = "handleQuery"
/ >
< / e l - f o r m - i t e m >
< el -form -item >
< el -button type = "primary" icon = "el-icon-search" size = "mini" @click ="handleQuery" > 搜 索 < / el -button >
< el -button icon = "el-icon-refresh" size = "mini" @click ="resetQuery" > 重 置 < / el -button >
@ -102,7 +106,24 @@
< el -table -column label = "主键标识" align = "center" prop = "saleOrderId" v -if = " columns [ 0 ] .visible " / >
< el -table -column label = "ERP主键" align = "center" prop = "erpId" v -if = " columns [ 1 ] .visible " / >
< el -table -column label = "ERP订单明细ID" align = "center" prop = "fentryId" v -if = " columns [ 2 ] .visible " / >
< el -table -column label = "销售订单编号" align = "center" prop = "saleorderCode" width = "100" v -if = " columns [ 3 ] .visible " / >
< el -table -column label = "类型" align = "center" prop = "saleOrderClassfication" >
< template slot -scope = " scope " >
< dict -tag :options ="dict.type.mes_sale_order_classfication" :value ="scope.row.saleOrderClassfication" / >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "销售订单编号" align = "center" prop = "saleorderCode" v-if ="columns[3].visible" >
< template slot -scope = " scope " >
< el -button
type = "text"
class = "wrap-text-button"
@ mouseover = "hover = true"
@ mouseleave = "hover = false"
@ click = "getRelateList(scope.row)" >
{ { scope . row . saleorderCode } }
< / e l - b u t t o n >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "单据状态" align = "center" prop = "documentStatus" v -if = " columns [ 5 ] .visible " >
< template slot -scope = " scope " >
< dict -tag :options ="dict.type.document_status" :value ="scope.row.documentStatus" / >
@ -111,9 +132,9 @@
< el -table -column label = "所属工厂" align = "center" prop = "factoryId" v -if = " columns [ 6 ] .visible " / >
< el -table -column label = "所属产线" align = "center" prop = "prodlineId" v -if = " columns [ 7 ] .visible " / >
< el -table -column label = "物料ID" align = "center" prop = "materialId" v -if = " columns [ 8 ] .visible " / >
< el -table -column label = "物料编码" align = "center" prop = "materialCode" width = "100" v -if = " columns [ 9 ] .visible " / >
< el -table -column label = "物料名称" align = "center" prop = "materialName" width = "100" v -if = " columns [ 10 ] .visible " / >
< el -table -column label = "物料 组" align = "center" prop = "matkl" v -if = " columns [ 11 ] .visible "/ >
< el -table -column label = "物料编码" align = "center" prop = "materialCode" v -if = " columns [ 9 ] .visible " / >
< el -table -column label = "物料名称" align = "center" prop = "materialName" v -if = " columns [ 10 ] .visible " / >
< el -table -column label = "物料 规格" align = "center" prop = "materialSpec "/ >
< el -table -column label = "订单数量" align = "center" prop = "orderAmount" v -if = " columns [ 12 ] .visible " / >
< el -table -column label = "完成数量" align = "center" prop = "completeAmount" v -if = " columns [ 13 ] .visible " / >
< el -table -column label = "已发布数量" align = "center" prop = "releaseQty" v -if = " columns [ 14 ] .visible " / >
@ -132,26 +153,11 @@
< span > { { parseTime ( scope . row . erpModifyDate , '{y}-{m}-{d} {h}:{i}:{s}' ) } } < / span >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "计划交货日期" align = "center" prop = "planDeliveryDate" width = "180" v-if ="columns[18].visible" >
< el -table -column label = "计划交货日期" align = "center" prop = "planDeliveryDate" v-if ="columns[18].visible" >
< template slot -scope = " scope " >
< span > { { parseTime ( scope . row . planDeliveryDate , '{y}-{m}-{d} {h}:{i}:{s}' ) } } < / span >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "计划开始日期" align = "center" prop = "beginDate" width = "180" v-if ="columns[19].visible" >
< template slot -scope = " scope " >
< span > { { parseTime ( scope . row . beginDate , '{y}-{m}-{d} {h}:{i}:{s}' ) } } < / span >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "计划结束日期" align = "center" prop = "endDate" width = "180" v-if ="columns[20].visible" >
< template slot -scope = " scope " >
< span > { { parseTime ( scope . row . endDate , '{y}-{m}-{d} {h}:{i}:{s}' ) } } < / span >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "完成日期" align = "center" prop = "completeDate" width = "180" v-if ="columns[21].visible" >
< template slot -scope = " scope " >
< span > { { parseTime ( scope . row . completeDate , '{y}-{m}-{d} {h}:{i}:{s}' ) } } < / span >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "备注" align = "center" prop = "remark" v -if = " columns [ 23 ] .visible " / >
< / e l - t a b l e >
@ -163,6 +169,30 @@
@ pagination = "getList"
/ >
< el -dialog :title ="relateTitle" :visible.sync ="relateOpen" append -to -body >
< el -table v-loading ="relateLoading" :data ="relateSaleOrderList" >
< el -table -column label = "销售订单编号" align = "center" prop = "saleorderCode" / >
< el -table -column label = "物料ID" align = "center" prop = "materialId" v -if = " false " / >
< el -table -column label = "物料编码" align = "center" prop = "materialCode" / >
< el -table -column label = "物料名称" align = "center" prop = "materialName" / >
< el -table -column label = "物料规格" align = "center" prop = "materialSpec" / >
< el -table -column label = "订单数量" align = "center" prop = "orderAmount" / >
< el -table -column label = "计划交货日期" align = "center" prop = "planDeliveryDate" >
< template slot -scope = " scope " >
< span > { { parseTime ( scope . row . planDeliveryDate , '{y}-{m}-{d} {h}:{i}:{s}' ) } } < / span >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
< pagination
v - show = "relateTotal>0"
: total = "relateTotal"
: page . sync = "relateQueryParams.pageNum"
: limit . sync = "relateQueryParams.pageSize"
@ pagination = "getRelateList"
/ >
< / e l - d i a l o g >
<!-- 添加或修改销售订单信息对话框 -- >
< el -dialog :title ="title" :visible.sync ="open" width = "500px" append -to -body >
< el -form ref = "form" :model ="form" :rules ="rules" label -width = " 80px " >
@ -293,7 +323,7 @@ import {getSaleOrders} from "@/api/mes/productOrder"
export default {
name : "SaleOrder" ,
dicts : [ 'document_status' , 'is_release' , 'active_flag' ],
dicts : [ 'document_status' , 'is_release' , 'active_flag' ,'mes_sale_order_classfication' ],
data ( ) {
return {
/ / 遮 罩 层
@ -310,6 +340,17 @@ export default {
total : 0 ,
/ / 销 售 订 单 信 息 表 格 数 据
saleOrderList : [ ] ,
relateTotal : 0 ,
/ / 关 联 的 销 售 订 单 数 据
relateSaleOrderList : [ ] ,
/ / 遮 罩 层
relateLoading : true ,
/ / 弹 出 层 标 题
relateTitle : "" ,
/ / 是 否 显 示 弹 出 层
relateOpen : false ,
/ / 弹 出 层 标 题
title : "" ,
/ / 是 否 显 示 弹 出 层
@ -341,6 +382,11 @@ export default {
completeDate : null ,
isFlag : null ,
} ,
relateQueryParams : {
pageNum : 1 ,
pageSize : 10 ,
} ,
/ / 表 单 参 数
form : { } ,
/ / 表 单 校 验
@ -388,6 +434,8 @@ export default {
/** 查询销售订单信息列表 */
getList ( ) {
this . loading = true ;
this . queryParams . selectFlag = "1" ;
this . queryParams . relateFlag = null ;
getSaleOrders ( this . queryParams ) . then ( response => {
this . saleOrderList = response . rows ;
this . total = response . total ;
@ -504,7 +552,29 @@ export default {
this . download ( 'mes/saleOrder/export' , {
... this . queryParams
} , ` saleOrder_ ${ new Date ( ) . getTime ( ) } .xlsx ` )
}
} ,
/** 查询销售订单信息列表 */
getRelateList ( ) {
this . relateOpen = true ;
this . relateTitle = "关联销售订单信息" ;
this . relateLoading = true ;
this . relateQueryParams . selectFlag = null ;
this . relateQueryParams . relateFlag = "1" ;
getSaleOrders ( this . relateQueryParams ) . then ( response => {
this . relateSaleOrderList = response . rows ;
this . relateTotal = response . total ;
this . relateLoading = false ;
} ) ;
} ,
}
} ;
< / script >
< style lang = "less" scoped >
. wrap - text - button {
white - space : normal ; /* 允许文本换行 */
word - break : break - all ; /* 当需要时,允许在单词内换行 */
/* 可以根据需要调整按钮的宽度或其他样式 */
}
< / style >