Browse Source

Merge remote-tracking branch 'origin/master'

java8
yuejiayang 1 year ago
parent
commit
af9ba86e0e
  1. 6
      src/api/orderIssure/soIssueNotify.js
  2. 262
      src/views/modules/orderIssure/soIssueNotify/newSoIssueNotify.vue
  3. 187
      src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue
  4. 1126
      src/views/modules/orderIssure/soIssueNotify/searchIssureNotifyForCK.vue

6
src/api/orderIssure/soIssueNotify.js

@ -29,3 +29,9 @@ export const searchSumNotifyMaterialList= data => createAPI(`/orderIssure/issure
export const updateNotifyBu= data => createAPI(`/orderIssure/issureNotify/updateNotifyBu`,'post',data)
export const getBuByUserNameSite= data => createAPI(`/pms/eam/getBuByUserNameSite`,'post',data)
export const getPartList= data => createAPI(`/orderIssure/issureNotify/getPartList`,'post',data)
export const checkPartStock= data => createAPI(`/orderIssure/issureNotify/checkPartStock`,'post',data)
export const deleteNotifySOSPlus= data => createAPI(`/orderIssure/issureNotify/deleteNotifySOSPlus`,'post',data)
export const updateNotifyStatus= data => createAPI(`/orderIssure/issureNotify/updateNotifyStatus`,'post',data)
export const deleteNotifyMaterial= data => createAPI(`/orderIssure/issureNotify/deleteNotifyMaterial`,'post',data)

262
src/views/modules/orderIssure/soIssueNotify/newSoIssueNotify.vue

@ -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>

187
src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue

@ -29,6 +29,20 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="是否领料" >
<el-select v-model="searchData.issueFlag" placeholder="请选择" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="Y" value="Y"></el-option>
<el-option label="N" value="N"></el-option>
</el-select>
</el-form-item>
<el-form-item label="领料结果" >
<el-select v-model="searchData.issueResult" placeholder="请选择" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="部分发料" value="部分发料"></el-option>
<el-option label="全部发料" value="全部发料"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="searchTable()">查询</el-button>
<download-excel
@ -73,18 +87,17 @@
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="150"-->
<!-- fixed="left"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <a type="text" size="small" @click="updateModel(scope.row)">编辑</a>-->
<!-- <a type="text" size="small" @click="deleteData(scope.row)">删除</a>-->
<!-- <a type="text" size="small" @click="scanRoll(scope.row)">扫描</a>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
header-align="center"
align="center"
width="80"
fixed="left"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.status==='已下达'" @click="closeNotify(scope.row)">结束</a>
<a type="text" size="small" v-if="scope.row.status==='已关闭'" @click="openNotify(scope.row)">打开</a>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@ -121,6 +134,17 @@
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
header-align="center"
align="center"
width="80"
fixed="left"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" v-if="currentRow.status==='已下达'" @click="deleteNotifySOSPlus(scope.row)">删除</a>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
@ -157,6 +181,17 @@
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
header-align="center"
align="center"
width="80"
fixed="left"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" v-if="currentRow.status==='已下达'" @click="deleteNotifyMaterial(scope.row)">删除</a>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="材料汇总" name="sum">
@ -207,7 +242,9 @@
,searchNotifyOrderList
,searchNotifyMaterialList
,searchSumNotifyMaterialList
,deleteNotifySOSPlus
,updateNotifyStatus
,deleteNotifyMaterial
}from "@/api/orderIssure/soIssueNotify.js"
import Chooselist from '@/views/modules/common/Chooselist'
export default {
@ -230,9 +267,11 @@
site:this.$store.state.user.site,
userName: '',
notifyNo: '',
issueFlag: '',
issueResult: '',
startDate: this.dayjs().format("YYYY-MM-DD"),
endDate: this.dayjs().format("YYYY-MM-DD"),
sql: " and a.status!='已计划' ",
},
exportList:[],
pageIndex: 1,
@ -729,6 +768,23 @@
status: true,
fixed: '',
columnWidth: 80
},{
userId: this.$store.state.user.name,
functionId: 701002,
serialNumber: '701002Table3QtyToIssueOriginal',
tableId: "701002Table3",
tableName: "申请单材料明细表",
columnProp: "qtyToIssueOriginal",
headerAlign: "center",
align: "right",
columnLabel: "已发数量",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
],
columnList4:[
@ -942,7 +998,108 @@
}
});
},
closeNotify(row){
this.$confirm('确认关闭?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let inData={
site:row.site,
notifyNo:row.notifyNo,
status:'已关闭',
}
updateNotifyStatus(inData).then(({data}) => {
if (data && data.code === 0) {
this.searchTable()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
openNotify(row){
this.$confirm('确认打开?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let inData={
site:row.site,
notifyNo:row.notifyNo,
status:'已下达',
}
updateNotifyStatus(inData).then(({data}) => {
if (data && data.code === 0) {
this.searchTable()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
deleteNotifyMaterial(row){
this.$confirm('确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteNotifyMaterial(row).then(({data}) => {
if (data && data.code === 0) {
this.refreshCurrentTabTable()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
deleteNotifySOSPlus(row){
this.$confirm('确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteNotifySOSPlus(row).then(({data}) => {
if (data && data.code === 0) {
this.refreshCurrentTabTable()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
//excel
//excel
async createExportData() {

1126
src/views/modules/orderIssure/soIssueNotify/searchIssureNotifyForCK.vue
File diff suppressed because it is too large
View File

Loading…
Cancel
Save