|
|
|
@ -5,7 +5,7 @@ |
|
|
|
<el-col :span="20"> |
|
|
|
<el-button v-if="notifyNo===''" @click="addNotify()" class="yzzButtonAn">新建申请单</el-button> |
|
|
|
<el-button v-if="notifyNo!=''" type="primary" @click="chooseSOSModal()" class="yzzButtonAn">选择派工单</el-button> |
|
|
|
<el-button v-if="notifyNo!=''" type="primary" @click="xiadaNotify()" class="yzzButtonAn">下达申请单</el-button> |
|
|
|
<el-button v-if="notifyNo!=''" type="primary" @click="xiadaNotifyModel()" class="yzzButtonAn">下达申请单</el-button> |
|
|
|
<el-button v-if="notifyNo!=''" type="primary" @click="deleteNotify()" class="yzzButtonAn">删除申请单</el-button> |
|
|
|
<el-button v-if="notifyNo!=''" type="primary" @click="updateBuModel()" class="yzzButtonAn">修改BU</el-button> |
|
|
|
</el-col> |
|
|
|
@ -300,7 +300,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item :label="'BU'" > |
|
|
|
<el-form-item :label="'申请单号'" > |
|
|
|
<el-input v-model="notifyData.notifyNo" disabled ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
@ -334,7 +334,18 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item :label="'派工单号'" > |
|
|
|
<el-input v-model="sobomData.seqno" readonly ></el-input> |
|
|
|
<el-input v-model="sobomData.seqno" readonly ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item :label="'产品编码'" > |
|
|
|
<el-input v-model="sobomData.partNo" readonly ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item :label="' '" > |
|
|
|
<el-button @click="noBomModel()" type="primary" >非BOM物料</el-button> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
@ -386,6 +397,142 @@ |
|
|
|
<el-button type="primary" @click="materialModalFlag=false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog |
|
|
|
width="600px" |
|
|
|
title="选择非BOM物料" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:visible.sync="partModelFlag"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item style="margin-left: 0px" label="物料编码"> |
|
|
|
<el-input v-model="partSearch.partNo" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item style="margin-left: 0px" label="物料名称"> |
|
|
|
<el-input v-model="partSearch.partDesc" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item style="margin-left: 0px" label="规格型号"> |
|
|
|
<el-input v-model="partSearch.spec" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-button type="primary" @click="searchPartModel()">{{'查询'}}</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
height="450" |
|
|
|
:data="partList" |
|
|
|
border |
|
|
|
@row-dblclick="choosePartNo" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
prop="partNo" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="80" |
|
|
|
style="font-size: 20px" |
|
|
|
label="物料编码"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="partDesc" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="120" |
|
|
|
style="font-size: 20px" |
|
|
|
label="物料描述"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="spec" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="120" |
|
|
|
style="font-size: 20px" |
|
|
|
label="规格型号"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="sku" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="80" |
|
|
|
label="SKU"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="umid" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="60" |
|
|
|
label="计量单位"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog |
|
|
|
width="500px" |
|
|
|
title="物料库存 VS 需求数量" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:visible.sync="xiadaModelFlag"> |
|
|
|
<div class="board666"> |
|
|
|
<el-table |
|
|
|
height="300" |
|
|
|
:data="xiadaList" |
|
|
|
border |
|
|
|
:row-class-name="tableRowClassName" |
|
|
|
@row-dblclick="choosePartNo" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
prop="componentPartNo" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="80" |
|
|
|
style="font-size: 20px" |
|
|
|
label="物料编码"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="partDesc" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="120" |
|
|
|
style="font-size: 20px" |
|
|
|
label="物料描述"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="qtyToIssue" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="80" |
|
|
|
style="font-size: 20px" |
|
|
|
label="发料数量"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="qtyOnHand" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="80" |
|
|
|
label="库存数量"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="qtyAvailable" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="80" |
|
|
|
label="可用数量"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center"> |
|
|
|
<el-button type="primary" @click="xiadaNotify()">确定下达</el-button> |
|
|
|
<!-- <el-button type="primary" @click="ToSOS()">重新选择派工单</el-button>--> |
|
|
|
<el-button type="primary" @click="xiadaModelFlag=false">取消</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -413,6 +560,8 @@ |
|
|
|
xiadaNotify, |
|
|
|
updateNotifyBu, |
|
|
|
getBuByUserNameSite, |
|
|
|
getPartList, |
|
|
|
checkPartStock, |
|
|
|
}from "@/api/orderIssure/soIssueNotify.js" |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
|
export default { |
|
|
|
@ -430,6 +579,7 @@ |
|
|
|
data () { |
|
|
|
return { |
|
|
|
buList:[], |
|
|
|
partList:[], |
|
|
|
notifyNo:'', |
|
|
|
notifyData:{ |
|
|
|
site:'', |
|
|
|
@ -445,6 +595,7 @@ |
|
|
|
// 是否收藏 |
|
|
|
favorite: false, |
|
|
|
changeBuFlag: false, |
|
|
|
partModelFlag: false, |
|
|
|
newBu:'', |
|
|
|
// 导出 start |
|
|
|
exportData: [], |
|
|
|
@ -466,7 +617,10 @@ |
|
|
|
sobomData:{ |
|
|
|
orderno:'', |
|
|
|
seqno:'', |
|
|
|
partNo:'', |
|
|
|
}, |
|
|
|
//申请单序号 |
|
|
|
itemNo:'', |
|
|
|
notifyOrderData:{ |
|
|
|
partNo:'', |
|
|
|
orderno:'', |
|
|
|
@ -504,6 +658,7 @@ |
|
|
|
modalDisableFlag:false, |
|
|
|
saveSeqNoModalFlag:false, |
|
|
|
bomLoadFlag:false, |
|
|
|
xiadaList:[], |
|
|
|
modalData:{ |
|
|
|
flag:'', |
|
|
|
bu: '', |
|
|
|
@ -928,7 +1083,7 @@ |
|
|
|
columnProp: 'partDesc', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: '物料编码', |
|
|
|
columnLabel: '物料描述', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
@ -1028,6 +1183,14 @@ |
|
|
|
authUpdate: false, |
|
|
|
authDelete: false, |
|
|
|
menuId: this.$route.meta.menuId, |
|
|
|
partSearch:{ |
|
|
|
site:'', |
|
|
|
sourceBu:'', |
|
|
|
partNo:'', |
|
|
|
partDesc:'', |
|
|
|
spec:'', |
|
|
|
}, |
|
|
|
xiadaModelFlag:false, |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1078,7 +1241,57 @@ |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
choosePartNo(row){ |
|
|
|
let index=0 |
|
|
|
// console.log('1:'+this.sobomList.length) |
|
|
|
// console.log('2:循环开始') |
|
|
|
for (let i = 0; i < this.sobomList.length; i++) { |
|
|
|
if(this.sobomList[i].componentPartNo===row.partNo){ |
|
|
|
this.$alert('该物料已经在清单中!', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
// console.log('3:'+this.sobomList[i].bOMItemNo) |
|
|
|
// console.log('4:'+this.sobomData.seqno+'-') |
|
|
|
if(this.sobomList[i].bOMItemNo.startsWith(this.sobomData.seqno+'-')){ |
|
|
|
// console.log('4.9:'+this.sobomList[i].bOMItemNo.substring((this.sobomData.seqno+'-').length)) |
|
|
|
// console.log('5:'+Number(this.sobomList[i].bOMItemNo.substring((this.sobomData.seqno+'-').length))) |
|
|
|
|
|
|
|
if(Number(this.sobomList[i].bOMItemNo.substring((this.sobomData.seqno+'-').length))>index){ |
|
|
|
index=Number(this.sobomList[i].bOMItemNo.substring((this.sobomData.seqno+'-').length)) |
|
|
|
// console.log('6:'+index) |
|
|
|
// console.log('替换结束') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
// console.log('循环结束') |
|
|
|
index=index+1 |
|
|
|
let inData={ |
|
|
|
site:this.notifyData.site, |
|
|
|
bOMItemNo:this.sobomData.seqno+'-'+index, |
|
|
|
componentPartNo:row.partNo, |
|
|
|
notifyNo:this.notifyData.notifyNo, |
|
|
|
partDesc:row.partDesc, |
|
|
|
itemNo:this.itemNo, |
|
|
|
qtyIssue:'', |
|
|
|
qtyOnHand:'', |
|
|
|
qtyRequired:'', |
|
|
|
qtyToIssue:0, |
|
|
|
} |
|
|
|
this.sobomList.push(inData) |
|
|
|
this.partModelFlag=false |
|
|
|
}, |
|
|
|
tableRowClassName ({row, rowIndex}) { |
|
|
|
if(row.qtyToIssue>row.qtyAvailable){ |
|
|
|
|
|
|
|
return 'error-row' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return '' |
|
|
|
}, |
|
|
|
// 列表方法的回调 |
|
|
|
getBaseData (val) { |
|
|
|
if (this.tagNo === 515) { |
|
|
|
@ -1104,7 +1317,6 @@ |
|
|
|
this.notifyData=data.row |
|
|
|
this.getNotifyNoDetail(); |
|
|
|
}else { |
|
|
|
console.log('!!') |
|
|
|
this.notifyNo ='' |
|
|
|
this.notifyData={ |
|
|
|
site:'', |
|
|
|
@ -1241,6 +1453,7 @@ |
|
|
|
this.saveSeqNoModalFlag=false |
|
|
|
this.getNotifyNoDetail() |
|
|
|
this.enterSOS(row); |
|
|
|
this.itemNo=data.itemNo |
|
|
|
}else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
@ -1264,6 +1477,7 @@ |
|
|
|
partNo:row.fGPartNo, |
|
|
|
itemno:row.opsItemNo, |
|
|
|
} |
|
|
|
this.itemNo=row.itemNo |
|
|
|
this.enterSOS(rows) |
|
|
|
}, |
|
|
|
enterSOS(row){ |
|
|
|
@ -1273,6 +1487,7 @@ |
|
|
|
this.sobomData={ |
|
|
|
orderno:row.orderno, |
|
|
|
seqno:row.seqno, |
|
|
|
partNo:row.partNo, |
|
|
|
} |
|
|
|
this.bomLoadFlag=true |
|
|
|
let inData={ |
|
|
|
@ -1437,15 +1652,40 @@ |
|
|
|
// this.pageIndex = val |
|
|
|
// this.getDataList() |
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
xiadaNotify() { |
|
|
|
noBomModel(){ |
|
|
|
this.partSearch={ |
|
|
|
site:this.notifyData.site, |
|
|
|
sourceBu:this.notifyData.bu, |
|
|
|
partNo:'', |
|
|
|
partDesc:'', |
|
|
|
spec:'', |
|
|
|
} |
|
|
|
this.partModelFlag=true |
|
|
|
this. searchPartModel() |
|
|
|
}, |
|
|
|
searchPartModel(){ |
|
|
|
getPartList(this.partSearch).then(({data})=>{ |
|
|
|
if (data.code === 0) { |
|
|
|
this.partList=data.rows |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
xiadaNotifyModel(){ |
|
|
|
if(this.dataList.length==0){ |
|
|
|
this.$alert('没有明细记录无法下达!!', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
checkPartStock(this.notifyData).then(({data})=>{ |
|
|
|
if (data.code === 0) { |
|
|
|
this.xiadaList=data.rows |
|
|
|
} |
|
|
|
}) |
|
|
|
this.xiadaModelFlag=true |
|
|
|
}, |
|
|
|
xiadaNotify() { |
|
|
|
|
|
|
|
// if(this.notifyData.planIssueDate==null||this.notifyData.planIssueDate==''){ |
|
|
|
// this.$alert('请选择要求发料时间!!', '提示', { |
|
|
|
// confirmButtonText: '确定' |
|
|
|
@ -1626,7 +1866,9 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
|
|
|
|
<style > |
|
|
|
.board666 .el-table .error-row { |
|
|
|
background: #f86868; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|