@ -30,181 +30,198 @@
< / e l - f o r m >
< el -row >
<!-- < el -col :span ="12" > -- >
<!-- < h4 class = "form-header h4" > 已选采购订单 < / h4 > -- >
<!-- < el -form :model ="allocatePurchaseOrderQueryParams" ref = "allocateMaterialQueryForm" size = "small" :inline ="true" - - >
<!-- v - show = "showSearch" -- >
<!-- label - width = "68px" > -- >
<!-- < el -form -item label = "订单编号" prop = "poNo" > -- >
<!-- < el -input - - >
<!-- v - model = "allocatePurchaseOrderQueryParams.poNo" -- >
<!-- placeholder = "请输入物料编码" -- >
<!-- style = "width:140px;" -- >
<!-- clearable -- >
<!-- @ keyup . enter . native = "handleAllocateMaterialQuery" -- >
<!-- / > - - >
<!-- < / e l - f o r m - i t e m > - - >
<!-- < el -form -item label = "物料编码" prop = "materialCode" > -- >
<!-- < el -input - - >
<!-- v - model = "allocatePurchaseOrderQueryParams.materialCode" -- >
<!-- placeholder = "请输入物料编码" -- >
<!-- style = "width:140px;" -- >
<!-- clearable -- >
<!-- @ keyup . enter . native = "handleAllocateMaterialQuery" -- >
<!-- / > - - >
<!-- < / e l - f o r m - i t e m > - - >
<!-- < el -form -item label = "物料名称" prop = "materialName" > -- >
<!-- < el -input - - >
<!-- v - model = "allocatePurchaseOrderQueryParams.materialName" -- >
<!-- placeholder = "请输入物料名称" -- >
<!-- style = "width:140px;" -- >
<!-- clearable -- >
<!-- @ keyup . enter . native = "handleAllocateMaterialQuery" -- >
<!-- / > - - >
<!-- < / e l - f o r m - i t e m > - - >
<!-- < el -form -item > -- >
<!-- < el -button type = "primary" icon = "el-icon-search" size = "mini" @click ="handleAllocateMaterialQuery" > 搜 索 - - >
<!-- < / e l - b u t t o n > - - >
<!-- < el -button icon = "el-icon-refresh" size = "mini" @click ="resetAllocateMaterialQuery" > 重 置 < / el -button > -- >
<!-- < el -button - - >
<!-- type = "danger" -- >
<!-- plain -- >
<!-- icon = "el-icon-delete" -- >
<!-- size = "mini" -- >
<!-- @ click = "handleUnallocateBarCodes" -- >
<!-- v - hasPermi = "['mes:saleOrder:bind']" -- >
<!-- > 删除 -- >
<!-- < / e l - b u t t o n > - - >
<!-- < / e l - f o r m - i t e m > - - >
<!-- < / e l - f o r m > - - >
<!-- < el -table v -loading = " allocateLoading " :data ="allocatePurchaseOrderList" - - >
<!-- @ selection - change = "handleAllocateMaterialSelectionChange" > -- >
<!-- < el -table -column type = "selection" width = "55" align = "center" / > -- >
<!-- < el -table -column label = "订单编号" align = "center" prop = "poNo" / > -- >
<!-- < 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 = "specificationParameter" :show-overflow-tooltip ="true" / > -- >
<!-- < el -table -column label = "数量" align = "center" prop = "orderAmount" / > -- >
<!-- < / e l - t a b l e > - - >
<!-- < el -col :span ="12" > -- >
<!-- < h4 class = "form-header h4" > 已选采购订单 < / h4 > -- >
<!-- < el -form :model ="allocatePurchaseOrderQueryParams" ref = "allocateMaterialQueryForm" size = "small" :inline ="true" - - >
<!-- v - show = "showSearch" -- >
<!-- label - width = "68px" > -- >
<!-- < el -form -item label = "订单编号" prop = "poNo" > -- >
<!-- < el -input - - >
<!-- v - model = "allocatePurchaseOrderQueryParams.poNo" -- >
<!-- placeholder = "请输入物料编码" -- >
<!-- style = "width:140px;" -- >
<!-- clearable -- >
<!-- @ keyup . enter . native = "handleAllocateMaterialQuery" -- >
<!-- / > - - >
<!-- < / e l - f o r m - i t e m > - - >
<!-- < el -form -item label = "物料编码" prop = "materialCode" > -- >
<!-- < el -input - - >
<!-- v - model = "allocatePurchaseOrderQueryParams.materialCode" -- >
<!-- placeholder = "请输入物料编码" -- >
<!-- style = "width:140px;" -- >
<!-- clearable -- >
<!-- @ keyup . enter . native = "handleAllocateMaterialQuery" -- >
<!-- / > - - >
<!-- < / e l - f o r m - i t e m > - - >
<!-- < el -form -item label = "物料名称" prop = "materialName" > -- >
<!-- < el -input - - >
<!-- v - model = "allocatePurchaseOrderQueryParams.materialName" -- >
<!-- placeholder = "请输入物料名称" -- >
<!-- style = "width:140px;" -- >
<!-- clearable -- >
<!-- @ keyup . enter . native = "handleAllocateMaterialQuery" -- >
<!-- / > - - >
<!-- < / e l - f o r m - i t e m > - - >
<!-- < el -form -item > -- >
<!-- < el -button type = "primary" icon = "el-icon-search" size = "mini" @click ="handleAllocateMaterialQuery" > 搜 索 - - >
<!-- < / e l - b u t t o n > - - >
<!-- < el -button icon = "el-icon-refresh" size = "mini" @click ="resetAllocateMaterialQuery" > 重 置 < / el -button > -- >
<!-- < el -button - - >
<!-- type = "danger" -- >
<!-- plain -- >
<!-- icon = "el-icon-delete" -- >
<!-- size = "mini" -- >
<!-- @ click = "handleUnallocateBarCodes" -- >
<!-- v - hasPermi = "['mes:saleOrder:bind']" -- >
<!-- > 删除 -- >
<!-- < / e l - b u t t o n > - - >
<!-- < / e l - f o r m - i t e m > - - >
<!-- < / e l - f o r m > - - >
<!-- < el -table v -loading = " allocateLoading " :data ="allocatePurchaseOrderList" - - >
<!-- @ selection - change = "handleAllocateMaterialSelectionChange" > -- >
<!-- < el -table -column type = "selection" width = "55" align = "center" / > -- >
<!-- < el -table -column label = "订单编号" align = "center" prop = "poNo" / > -- >
<!-- < 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 = "specificationParameter" :show-overflow-tooltip ="true" / > -- >
<!-- < el -table -column label = "数量" align = "center" prop = "orderAmount" / > -- >
<!-- < / e l - t a b l e > - - >
<!-- < pagination - - >
<!-- v - show = "allocatePurchaseOrderTotal>0" -- >
<!-- : total = "allocatePurchaseOrderTotal" -- >
<!-- : page . sync = "allocatePurchaseOrderQueryParams.pageNum" -- >
<!-- : limit . sync = "allocatePurchaseOrderQueryParams.pageSize" -- >
<!-- @ pagination = "getAllocatePurchaseOrderList" -- >
<!-- / > - - >
<!-- < / e l - c o l > - - >
<!-- < pagination - - >
<!-- v - show = "allocatePurchaseOrderTotal>0" -- >
<!-- : total = "allocatePurchaseOrderTotal" -- >
<!-- : page . sync = "allocatePurchaseOrderQueryParams.pageNum" -- >
<!-- : limit . sync = "allocatePurchaseOrderQueryParams.pageSize" -- >
<!-- @ pagination = "getAllocatePurchaseOrderList" -- >
<!-- / > - - >
<!-- < / e l - c o l > - - >
<!-- < el -col :span ="12" > -- >
< h4 class = "form-header h4" > 可选采购订单 < / h4 >
< el -form :model ="purchaseOrderQueryParams" ref = "materialQueryForm" size = "small" :inline ="true" v -show = " showSearch "
label - width = "68px" >
< el -form -item label = "订单编号" prop = "poNo" >
< el -input
v - model = "allocatePurchaseOrderQueryParams.poNo"
placeholder = "请输入物料编码"
style = "width:140px;"
clearable
@ keyup . enter . native = "handleAllocateMaterialQuery"
<!-- < el -col :span ="12" > -- >
< h4 class = "form-header h4" > 可选采购订单 < / h4 >
< el -form :model ="purchaseOrderQueryParams" ref = "materialQueryForm" size = "small" :inline ="true" v -show = " showSearch "
label - width = "68px" >
< el -form -item label = "订单编号" prop = "poNo" >
< el -input
v - model = "allocatePurchaseOrderQueryParams.poNo"
placeholder = "请输入物料编码"
style = "width:140px;"
clearable
@ keyup . enter . native = "handleAllocateMaterialQuery"
/ >
< / e l - f o r m - i t e m >
< el -form -item label = "物料编码" prop = "materialCode" >
< el -input
v - model = "purchaseOrderQueryParams.materialCode"
placeholder = "请输入物料编码"
style = "width:140px;"
clearable
@ keyup . enter . native = "handlePurchaseOrderQuery"
/ >
< / e l - f o r m - i t e m >
< el -form -item label = "物料名称" prop = "materialName" >
< el -input
v - model = "purchaseOrderQueryParams.materialName"
placeholder = "请输入物料名称"
style = "width:140px;"
clearable
@ keyup . enter . native = "handlePurchaseOrderQuery"
/ >
< / e l - f o r m - i t e m >
< el -form -item label = "物料规格" prop = "materialSpec" >
< el -input
v - model = "purchaseOrderQueryParams.materialSpec"
placeholder = "请输入物料规格"
style = "width:140px;"
clearable
@ keyup . enter . native = "handlePurchaseOrderQuery"
/ >
< / e l - f o r m - i t e m >
< el -form -item label = "规格参数" prop = "specificationParameter" >
< el -input
v - model = "purchaseOrderQueryParams.specificationParameter"
placeholder = "请输入规格参数"
style = "width:140px;"
clearable
@ keyup . enter . native = "handlePurchaseOrderQuery"
/ >
< / e l - f o r m - i t e m >
< el -form -item label = "常备物料" prop = "alwaysFlag" >
< el -select v -model = " purchaseOrderQueryParams.alwaysFlag " placeholder = "请选择常备物料标识" clearable >
< el -option
v - for = "dict in dict.type.mes_material_bind_flag"
: key = "dict.value"
: label = "dict.label"
: value = "dict.value"
/ >
< / e l - f o r m - i t e m >
< el -form -item label = "物料编码" prop = "materialCode" >
< el -input
v - model = "purchaseOrderQueryParams.materialCode"
placeholder = "请输入物料编码"
style = "width:140px;"
clearable
@ keyup . enter . native = "handlePurchaseOrderQuery"
/ >
< / e l - f o r m - i t e m >
< el -form -item label = "物料名称" prop = "materialName" >
< el -input
v - model = "purchaseOrderQueryParams.materialName"
placeholder = "请输入物料名称"
style = "width:140px;"
clearable
@ keyup . enter . native = "handlePurchaseOrderQuery"
/ >
< / e l - f o r m - i t e m >
< el -form -item label = "物料规格" prop = "materialSpec" >
< el -input
v - model = "purchaseOrderQueryParams.materialSpec"
placeholder = "请输入物料规格"
style = "width:140px;"
clearable
@ keyup . enter . native = "handlePurchaseOrderQuery"
/ >
< / e l - f o r m - i t e m >
< el -form -item label = "规格参数" prop = "specificationParameter" >
< el -input
v - model = "purchaseOrderQueryParams.specificationParameter"
placeholder = "请输入规格参数"
style = "width:140px;"
clearable
@ keyup . enter . native = "handlePurchaseOrderQuery"
/ >
< / e l - f o r m - i t e m >
< el -form -item >
< el -button type = "primary" icon = "el-icon-search" size = "mini" @click ="handlePurchaseOrderQuery" > 搜 索 < / el -button >
< el -button icon = "el-icon-refresh" size = "mini" @click ="resetMaterialQuery" > 重 置 < / el -button >
< el -button
type = "primary"
plain
icon = "el-icon-plus"
size = "mini"
: disabled = "multiple"
@ click = "submitForm"
v - hasPermi = "['mes:saleOrder:bind']"
> 保存
< / e l - b u t t o n >
< el -button
type = "danger"
plain
icon = "el-icon-delete"
size = "mini"
@ click = "handleUnallocateBarCodes"
v - hasPermi = "['mes:saleOrder:bind']"
> 删除
< / e l - b u t t o n >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< el -form -item >
< el -button type = "primary" icon = "el-icon-search" size = "mini" @click ="handlePurchaseOrderQuery" > 搜 索 < / el -button >
< el -button icon = "el-icon-refresh" size = "mini" @click ="resetMaterialQuery" > 重 置 < / el -button >
< el -button
type = "primary"
plain
icon = "el-icon-plus"
size = "mini"
: disabled = "multiple"
@ click = "submitForm"
v - loading = "submitLoading"
v - hasPermi = "['mes:saleOrder:bind']"
> 保存
< / e l - b u t t o n >
<!-- el - button
type = "danger"
plain
icon = "el-icon-delete"
size = "mini"
@ click = "handleUnallocateBarCodes"
v - hasPermi = "['mes:saleOrder:bind']"
> 删除
< / e l - b u t t o n - - >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< el -table v -loading = " selectableLoading "
: data = "purchaseOrderList"
@ selection - change = "handleMaterialSelectionChange"
: row - class - name = "rowSerialNumberProcess"
: row - style = "getRowStyle" >
< el -table -column type = "selection" width = "55" align = "center" / >
< el -table -column label = "序号" align = "center" prop = "serialNumber" / >
< el -table -column label = "订单编号" align = "center" prop = "poNo" / >
< 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 = "specificationParameter" :show-overflow-tooltip ="true" / >
< el -table -column label = "订单数" align = "center" prop = "orderAmount" / >
< el -table -column label = "已绑定数" align = "center" prop = "boundAmount" / >
< el -table -column label = "销售订单绑定数" align = "center" prop = "saleBindAmount" / >
< el -table -column label = "更新绑定数" align = "center" prop = "updateAmount" width = "150" >
< template slot -scope = " scope " >
< el -input -number v -model = " scope.row.updateAmount " size = "mini" / >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "安全库存数" align = "center" prop = "safeAmount" / >
< el -table -column label = "条码数" align = "center" prop = "barcodeAmount" / >
< / e l - t a b l e >
< pagination
v - show = "purchaseOrderTotal>0"
: total = "purchaseOrderTotal"
: page . sync = "purchaseOrderQueryParams.pageNum"
: limit . sync = "purchaseOrderQueryParams.pageSize"
@ pagination = "getUnbindPurchaseOrderList"
/ >
<!-- < / e l - c o l > - - >
< el -table v -loading = " selectableLoading "
: data = "purchaseOrderList"
@ selection - change = "handleMaterialSelectionChange"
: row - class - name = "rowSerialNumberProcess"
: row - style = "getRowStyle" >
< el -table -column type = "selection" width = "55" align = "center" / >
< el -table -column label = "序号" align = "center" prop = "serialNumber" / >
< el -table -column label = "订单编号" align = "center" prop = "poNo" / >
< el -table -column label = "物料编码" align = "center" prop = "materialCode" / >
< el -table -column label = "物料名称" align = "center" prop = "materialName" / >
< el -table -column label = "物料规格" align = "center" prop = "materialSpec" :show-overflow-tooltip ="true" / >
< el -table -column label = "规格参数" align = "center" prop = "specificationParameter" :show-overflow-tooltip ="true" / >
< el -table -column label = "常备物料" align = "center" prop = "alwaysFlag" >
< template slot -scope = " scope " >
< dict -tag :options ="dict.type.mes_material_bind_flag" :value ="scope.row.alwaysFlag" / >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "订单数" align = "center" prop = "orderAmount" / >
< el -table -column label = "已绑定数" align = "center" prop = "boundAmount" / >
< el -table -column label = "安全库存数" align = "center" prop = "safeAmount" / >
< el -table -column label = "销售订单绑定数" align = "center" prop = "orderBindAmount" / >
< el -table -column label = "销售订单条码数" align = "center" prop = "orderBarcodeAmount" / >
< el -table -column label = "更新绑定数" align = "center" prop = "updateAmount" width = "150" >
< template slot -scope = " scope " >
< el -input -number v -model = " scope.row.updateAmount " size = "mini" / >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
< pagination
v - show = "purchaseOrderTotal>0"
: total = "purchaseOrderTotal"
: page . sync = "purchaseOrderQueryParams.pageNum"
: limit . sync = "purchaseOrderQueryParams.pageSize"
@ pagination = "getUnbindPurchaseOrderList"
/ >
<!-- < / e l - c o l > - - >
< / e l - r o w >
< / div >
@ -220,12 +237,14 @@ import {
export default {
name : "BindingPurchase" ,
dicts : [ 'mes_material_bind_flag' ] ,
data ( ) {
return {
/ / 已 选 采 购 订 单 遮 罩 层
allocateLoading : true ,
/ / 可 选 采 购 订 单 遮 罩 层
selectableLoading : true ,
submitLoading : false ,
/ / 已 选 采 购 订 单 选 中 数 组
orderBindIds : [ ] ,
/ / 可 选 采 购 订 单 信 息 选 中 数 组
@ -276,26 +295,31 @@ export default {
materialCode : null ,
materialName : null ,
specificationParameter : null ,
alwaysFlag : null ,
poNo : null
} ,
} ;
} ,
created ( ) {
this . allocateBarCodeBtnDisable = false ;
const saleOrderId = this . $route . params && this . $route . params . saleOrderId ;
let saleorderCode = this . $route . query && this . $route . query . saleorderCode ;
this . purchaseOrderQueryParams . saleOrderId = saleOrderId ;
this . allocatePurchaseOrderQueryParams . saleOrderId = saleOrderId ;
this . saleOrderForm . saleorderCode = saleorderCode ;
this . saleOrderForm . saleOrderId = saleOrderId ;
this . saleOrderForm . materialCode = this . $route . query && this . $route . query . materialCode ;
this . saleOrderForm . materialName = this . $route . query && this . $route . query . materialName ;
this . saleOrderForm . materialModel = this . $route . query && this . $route . query . materialModel ;
/ / t h i s . g e t A l l o c a t e P u r c h a s e O r d e r L i s t ( ) ;
this . getUnbindPurchaseOrderList ( ) ;
this . getUnbindList ( ) ;
} ,
methods : {
getUnbindList ( ) {
const saleOrderId = this . $route . params && this . $route . params . saleOrderId ;
let saleorderCode = this . $route . query && this . $route . query . saleorderCode ;
this . purchaseOrderQueryParams . saleOrderId = saleOrderId ;
this . allocatePurchaseOrderQueryParams . saleOrderId = saleOrderId ;
this . saleOrderForm . saleorderCode = saleorderCode ;
this . saleOrderForm . saleOrderId = saleOrderId ;
this . saleOrderForm . materialId = this . $route . query && this . $route . query . materialId ;
this . saleOrderForm . materialCode = this . $route . query && this . $route . query . materialCode ;
this . saleOrderForm . materialName = this . $route . query && this . $route . query . materialName ;
this . saleOrderForm . materialModel = this . $route . query && this . $route . query . materialModel ;
/ / t h i s . g e t A l l o c a t e P u r c h a s e O r d e r L i s t ( ) ;
this . getUnbindPurchaseOrderList ( ) ;
} ,
/** 查询已选采购订单信息列表 */
getAllocatePurchaseOrderList ( ) {
this . allocateLoading = true ;
@ -310,6 +334,12 @@ export default {
getUnbindPurchaseOrderList ( ) {
this . selectableLoading = true ;
unbindPurchaseOrderList ( this . purchaseOrderQueryParams ) . then ( response => {
response . rows . forEach ( e => {
let orderBindBarcodeAmount = e . orderBindBarcodeAmount . split ( "-" ) ;
e . orderBindAmount = parseInt ( orderBindBarcodeAmount [ 0 ] ) ;
e . orderBarcodeAmount = parseInt ( orderBindBarcodeAmount [ 1 ] ) ;
} ) ;
this . purchaseOrderList = response . rows ;
this . purchaseOrderTotal = response . total ;
this . selectableLoading = false ;
@ -321,8 +351,8 @@ export default {
this . allocatePurchaseOrderQueryParams . pageNum = 1 ;
this . getAllocatePurchaseOrderList ( ) ;
} ,
getRowStyle ( { row } ) {
return row . saleBindAmount > 0 ? { backgroundColor : '#8ee38e' } : { } ;
getRowStyle ( { row } ) {
return row . saleBindAmount > 0 ? { backgroundColor : '#8ee38e' } : { } ;
} ,
/** 已选采购订单重置按钮操作 */
resetAllocateMaterialQuery ( ) {
@ -372,43 +402,58 @@ export default {
} ) . catch ( ( ) => {
} ) ;
} ,
isPositiveInteger ( value ) {
/ / 使 用 正 则 表 达 式 匹 配 正 整 数
return /^[0-9]\d*$/ . test ( value ) ;
} ,
/** 提交按钮 */
submitForm ( ) {
this . allocateBarCodeBtnDisable = true ;
this . submitLoading = true ;
/ / c o n s t p u r c h a s e O r d e r I d s = t h i s . p u r c h a s e O r d e r I d s . j o i n ( " , " ) ;
for ( let obj of this . purchaseOrderSelectableList ) {
obj . saleOrderId = this . saleOrderForm . saleOrderId ;
const orderAmount = obj . orderAmount ;
const boundAmount = obj . boundAmount ;
const saleBindAmount = obj . saleBindAmount ;
const safeAmount = obj . safeAmount ;
const barcodeAmount = obj . barcodeAmount ;
const updateAmount = obj . updateAmount ;
if ( updateAmount == null ) {
this . $modal . msgWarning ( "订单编号:" + obj . poNo + "请输入更新绑定数" ) ;
const orderAmount = obj . orderAmount ? parseInt ( obj . orderAmount ) : 0 ; / / 采 购 订 单 数 量
const boundAmount = obj . boundAmount ? parseInt ( obj . boundAmount ) : 0 ; / / 已 绑 定 总 数
const safeAmount = obj . safeAmount ? parseInt ( obj . safeAmount ) : 0 ; / / 安 全 库 存 数
const orderBindAmount = obj . orderBindAmount ? parseInt ( obj . orderBindAmount ) : 0 ; / / 销 售 订 单 已 绑 定 数
const orderBarcodeAmount = obj . orderBarcodeAmount ? parseInt ( obj . orderBarcodeAmount ) : 0 ; / / 销 售 订 单 已 生 成 条 码 数 量
const updateAmount = obj . updateAmount ? parseInt ( obj . updateAmount ) : 0 ; / / 更 新 绑 定 数
if ( ! this . isPositiveInteger ( updateAmount ) || updateAmount <= 0 ) {
this . submitLoading = false ;
this . $modal . msgError ( "序号为" + ( obj . serialNumber ) + ",绑定数量须为大于0的正整数! " ) ;
return ;
}
if ( updateAmount < orderBarcodeAmount ) {
this . submitLoading = false ;
this . $modal . msgError ( "序号" + ( obj . serialNumber ) + "的绑定数量需不能小于销售订单条码数!" ) ;
return ;
}
/ / ( 已 绑 定 总 数 + 安 全 库 存 数 + 更 新 绑 定 数 量 - 销 售 订 单 已 绑 定 数 ) 需 要 小 于 等 于 采 购 订 单 数 量
let totalBindAmount = boundAmount + safeAmount + updateAmount - orderBindAmount ;
if ( totalBindAmount - orderAmount > 0 ) {
this . submitLoading = false ;
this . $modal . msgError ( "序号" + ( obj . serialNumber ) + "的总绑定数不能大于订单数!" ) ;
return ;
}
/ / ( 已 绑 定 总 数 - 销 售 订 单 已 绑 定 数 + 更 新 绑 定 数 量 ) 需 要 小 于 等 于 采 购 订 单 数 量
/ / i f ( ( b o u n d A m o u n t - s a l e B i n d A m o u n t + u p d a t e A m o u n t ) > o r d e r A m o u n t ) {
/ / t h i s . $ m o d a l . m s g W a r n i n g ( " 订 单 编 号 : " + o b j . p o N o + " 总 绑 定 数 大 于 订 单 数 " ) ;
/ / r e t u r n ;
/ / }
/ / i f ( u p d a t e A m o u n t > b a r c o d e A m o u n t ) {
/ / t h i s . $ m o d a l . m s g W a r n i n g ( " 订 单 编 号 : " + o b j . p o N o + " 绑 定 数 不 能 大 于 条 码 数 " ) ;
/ / r e t u r n ;
/ / }
/ / o b j . s a l e B i n d A m o u n t = u p d a t e A m o u n t ;
}
saveSalesBindPurchase ( this . purchaseOrderSelectableList ) . then ( ( response ) => {
this . saleOrderForm . mesPurchaseOrderList = this . purchaseOrderSelectableList ;
/ / c o n s o l e . l o g ( t h i s . s a l e O r d e r F o r m ) ;
saveSalesBindPurchase ( this . saleOrderForm ) . then ( ( response ) => {
this . $modal . msgSuccess ( "保存成功" ) ;
this . getUnbindPurchaseOrderList ( ) ;
/ / t h i s . g e t A l l o c a t e P u r c h a s e O r d e r L i s t ( ) ;
this . allocateBarCodeBtnDisable = false ;
} ) . catch ( ( ) => {
/ / t h i s . g e t A l l o c a t e P u r c h a s e O r d e r L i s t ( ) ;
/ / t h i s . g e t U n b i n d P u r c h a s e O r d e r L i s t ( ) ;
this . allocateBarCodeBtnDisable = false ;
this . getUnbindList ( ) ;
} ) . finally ( e => {
this . submitLoading = false ;
} ) ;
} ,