Browse Source

领料申请

master
shenzhouyu 4 months ago
parent
commit
1fabb2eaa7
  1. 4
      src/api/orderIssure/soIssueNotify.js
  2. 205
      src/views/modules/orderIssure/newSoIssueNotify.vue
  3. 2435
      src/views/modules/productionInbound/productionInboundRequest.vue

4
src/api/orderIssure/soIssueNotify.js

@ -43,4 +43,6 @@ export const updateNotifyConfirmStatus= data => createAPI(`/orderIssure/issureNo
export const updateNotifyBatchConfirmStatus= data => createAPI(`/orderIssure/issureNotify/updateNotifyBatchConfirmStatus`,'post',data) export const updateNotifyBatchConfirmStatus= data => createAPI(`/orderIssure/issureNotify/updateNotifyBatchConfirmStatus`,'post',data)
export const getSiteAndBuByUserName = data => createAPI(`/orderIssure/issureNotify/getSiteAndBuByUserName`,'post',data) export const getSiteAndBuByUserName = data => createAPI(`/orderIssure/issureNotify/getSiteAndBuByUserName`,'post',data)
export const getEamWorkShop = data => createAPI(`/orderIssure/issureNotify/getEamWorkShop`,'post',data)
export const getEamWorkShop = data => createAPI(`/orderIssure/issureNotify/getEamWorkShop`,'post',data)
export const getIFSShopOrderByOrderNo = data => createAPI(`/orderIssure/issureNotify/getIFSShopOrderByOrderNo`,'post',data)

205
src/views/modules/orderIssure/newSoIssueNotify.vue

@ -200,8 +200,8 @@
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="'生产订单'">
<el-input v-model="seqNoData.orderno"></el-input>
<el-form-item :label="'生产订单'">
<el-input v-model="seqNoData.orderNo"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="4"> <!-- <el-col :span="4">
@ -209,13 +209,13 @@
<el-input v-model="seqNoData.seqno"></el-input> <el-input v-model="seqNoData.seqno"></el-input>
</el-form-item> </el-form-item>
</el-col> --> </el-col> -->
<el-col :span="4">
<!-- <el-col :span="4">
<el-form-item> <el-form-item>
<span slot="label" style="" @click="getBaseList(515)"><a herf="#">机台</a></span> <span slot="label" style="" @click="getBaseList(515)"><a herf="#">机台</a></span>
<el-input v-model="seqNoData.sResourceid"></el-input> <el-input v-model="seqNoData.sResourceid"></el-input>
</el-form-item> </el-form-item>
</el-col>
</el-col> -->
<el-col :span="4"> <el-col :span="4">
<el-form-item> <el-form-item>
<span slot="label" style="" @click="getBaseList(216)"><a herf="#">加工中心</a></span> <span slot="label" style="" @click="getBaseList(216)"><a herf="#">加工中心</a></span>
@ -223,7 +223,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="'派工日期'">
<el-form-item :label="'日期'">
<el-date-picker style="width: 100%" v-model="seqNoData.startDate" type="date" value-format="yyyy-MM-dd" <el-date-picker style="width: 100%" v-model="seqNoData.startDate" type="date" value-format="yyyy-MM-dd"
placeholder="选择日期"> placeholder="选择日期">
</el-date-picker> </el-date-picker>
@ -246,7 +246,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-table :height="400" :data="seqNoList" border style="width: 100%;">
<el-table :height="400" :data="seqNoList" border style="width: 100%;" class="choose-sos-table">
<el-table-column v-for="(item,index) in columnList2" :key="index" :sortable="item.columnSortable" <el-table-column v-for="(item,index) in columnList2" :key="index" :sortable="item.columnSortable"
:prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip" :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth" :align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
@ -257,9 +257,9 @@
style="width: 100px; height: 80px" /></span> style="width: 100px; height: 80px" /></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="left" header-align="center" align="center" width="60" label="操作">
<el-table-column fixed="left" header-align="center" align="center" width="80" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<a type="text" size="small" @click="chooseSOS(scope.row)">选择</a>
<el-button type="primary" size="mini" plain class="choose-sos-btn" :loading="chooseLoading" @click="chooseSOS(scope.row)">选择</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -271,7 +271,7 @@
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="'生产订单'">
<el-form-item :label="'生产订单'">
<el-input v-model="notifyOrderData.orderNo" disabled></el-input> <el-input v-model="notifyOrderData.orderNo" disabled></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -280,11 +280,11 @@
<el-input v-model="notifyOrderData.seqno" disabled></el-input> <el-input v-model="notifyOrderData.seqno" disabled></el-input>
</el-form-item> </el-form-item>
</el-col> --> </el-col> -->
<el-col :span="6">
<!-- <el-col :span="6">
<el-form-item :label="'机台'"> <el-form-item :label="'机台'">
<el-input v-model="notifyOrderData.sResourceID" disabled></el-input> <el-input v-model="notifyOrderData.sResourceID" disabled></el-input>
</el-form-item> </el-form-item>
</el-col>
</el-col> -->
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="'工单数量'"> <el-form-item :label="'工单数量'">
<el-input v-model="notifyOrderData.qtyRequired" disabled></el-input> <el-input v-model="notifyOrderData.qtyRequired" disabled></el-input>
@ -311,20 +311,21 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<!-- <el-col :span="6">
<el-form-item label="机台"> <el-form-item label="机台">
<el-input v-model="notifyOrderData.locationNo" disabled></el-input> <el-input v-model="notifyOrderData.locationNo" disabled></el-input>
</el-form-item> </el-form-item>
</el-col>
</el-col> -->
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="'此次领料数量'"> <el-form-item :label="'此次领料数量'">
<el-input-number v-model="notifyOrderData.issureQty" style="padding: 0px;width: 100%" :controls="false"
:step="0" :min="0" class="text-right"></el-input-number>
<!-- <el-input-number v-model="notifyOrderData.issureQty" style="padding: 0px;width: 100%" :controls="false"
:step="0" :min="0" class="text-right"></el-input-number> -->
<el-input v-model="notifyOrderData.issureQty" @input=" value=>notifyOrderData.issureQty = value.match(/0$|^[1-9]\d*/) ? value.match(/0$|^[1-9]\d*/)[0] : ''"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="' '"> <el-form-item :label="' '">
<el-button type="primary" @click="qtyAllForSeqNo()" style="margin-top: 4%;">全数领料</el-button>
<el-button type="primary" @click="qtyAllForSeqNo()">全数领料</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -366,7 +367,7 @@
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="'生产订单'">
<el-form-item :label="'生产订单'">
<el-input v-model="sobomData.orderno" disabled></el-input> <el-input v-model="sobomData.orderno" disabled></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -606,7 +607,9 @@ import {
saveSOIssueNotifyOrderList, saveSOIssueNotifyOrderList,
getSOSBOMForIssure, getSOSBOMForIssure,
saveMaterialDetail, saveMaterialDetail,
deleteNotifySOS
deleteNotifySOS,
getIFSShopOrderByOrderNo,
searchNotifyMaterialList,
} from '@/api/orderIssure/soIssueNotify.js' } from '@/api/orderIssure/soIssueNotify.js'
import Chooselist from '@/views/modules/common/Chooselist_eam' import Chooselist from '@/views/modules/common/Chooselist_eam'
import walUploadExcel from './walmart_upload_excel.vue' import walUploadExcel from './walmart_upload_excel.vue'
@ -678,22 +681,20 @@ export default {
itemNo: '', itemNo: '',
notifyOrderData: { notifyOrderData: {
partNo: '', partNo: '',
orderno: '',
itemno: '',
seqno: '',
orderNo: '',
itemNo: '',
seqNo: '',
partDesc: '', partDesc: '',
qtyrequired: '', qtyrequired: '',
sResourceid: '',
sResourceID: '',
issureQty: '', issureQty: '',
locationNo: '', locationNo: '',
needDate: '', needDate: '',
}, },
seqNoData: { seqNoData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
bu: '',
orderno: '',
seqno: '', seqno: '',
sResourceid: '',
sResourceID: '',
sWorkcenterno: '', sWorkcenterno: '',
operatorId: '', operatorId: '',
sShiftno: '', sShiftno: '',
@ -805,7 +806,7 @@ export default {
functionId: 701001, functionId: 701001,
serialNumber: '701001Table1ItemNo', serialNumber: '701001Table1ItemNo',
tableId: '701001Table1', tableId: '701001Table1',
tableName: '领料申请工单子表',
tableName: '领料申请工单子表',
columnProp: 'itemNo', columnProp: 'itemNo',
headerAlign: 'center', headerAlign: 'center',
align: 'right', align: 'right',
@ -841,11 +842,11 @@ export default {
functionId: 701001, functionId: 701001,
serialNumber: '701001Table1SOOrderNo', serialNumber: '701001Table1SOOrderNo',
tableId: '701001Table1', tableId: '701001Table1',
tableName: '领料申请工单子表',
columnProp: 'sOOrderNo',
tableName: '领料申请工单子表',
columnProp: 'soorderNo',
headerAlign: 'center', headerAlign: 'center',
align: 'center', align: 'center',
columnLabel: '生产订单',
columnLabel: '生产订单',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -859,7 +860,7 @@ export default {
functionId: 701001, functionId: 701001,
serialNumber: '701001Table1OpsItemNo', serialNumber: '701001Table1OpsItemNo',
tableId: '701001Table1', tableId: '701001Table1',
tableName: '领料申请工单子表',
tableName: '领料申请工单子表',
columnProp: 'opsItemNo', columnProp: 'opsItemNo',
headerAlign: 'center', headerAlign: 'center',
align: 'right', align: 'right',
@ -877,7 +878,7 @@ export default {
functionId: 701001, functionId: 701001,
serialNumber: '701001Table1ItemDesc', serialNumber: '701001Table1ItemDesc',
tableId: '701001Table1', tableId: '701001Table1',
tableName: '领料申请工单子表',
tableName: '领料申请工单子表',
columnProp: 'itemDesc', columnProp: 'itemDesc',
headerAlign: 'center', headerAlign: 'center',
align: 'left', align: 'left',
@ -895,7 +896,7 @@ export default {
functionId: 701001, functionId: 701001,
serialNumber: '701001Table1LocationNo', serialNumber: '701001Table1LocationNo',
tableId: '701001Table1', tableId: '701001Table1',
tableName: '领料申请工单子表',
tableName: '领料申请工单子表',
columnProp: 'locationNo', columnProp: 'locationNo',
headerAlign: 'center', headerAlign: 'center',
align: 'left', align: 'left',
@ -1206,7 +1207,7 @@ export default {
serialNumber: '701001Table3PartDesc', serialNumber: '701001Table3PartDesc',
tableId: '701001Table3', tableId: '701001Table3',
tableName: '领料申请BOM子表', tableName: '领料申请BOM子表',
columnProp: 'partDesc',
columnProp: 'componentPartDesc',
headerAlign: 'center', headerAlign: 'center',
align: 'left', align: 'left',
columnLabel: '物料描述', columnLabel: '物料描述',
@ -1369,6 +1370,7 @@ export default {
showAddNotifyTypeDialog: false, showAddNotifyTypeDialog: false,
selectedNotifyType: 'production', selectedNotifyType: 'production',
selectedNotifyRemark:'', selectedNotifyRemark:'',
chooseLoading: false,
} }
}, },
@ -1564,7 +1566,27 @@ export default {
}) })
}, },
addNotify() { addNotify() {
this.showAddNotifyTypeDialog = true
//this.showAddNotifyTypeDialog = true
let inData = {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
}
createNotify(inData).then(({ data }) => {
if (data.code === 0) {
this.showAddNotifyTypeDialog = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {},
})
this.getUserNotifyNo()
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定',
})
}
})
}, },
confirmAddNotify() { confirmAddNotify() {
let outWorkOrderFlag = 'N' let outWorkOrderFlag = 'N'
@ -1599,6 +1621,7 @@ export default {
}, },
chooseSOS(row) { chooseSOS(row) {
if (this.dataList.length > 0) { if (this.dataList.length > 0) {
//
let stop = false let stop = false
for (let i = 0; i < this.dataList.length; i++) { for (let i = 0; i < this.dataList.length; i++) {
if (this.dataList[i].seqNo == row.seqno) { if (this.dataList[i].seqNo == row.seqno) {
@ -1612,19 +1635,34 @@ export default {
return false return false
} }
} }
console.log("row",row);
let inData = {
site: '55',
orderNo: '3039496',
}
this.chooseLoading = true
getIFSShopOrderByOrderNo(inData).then(({ data }) => {
if (data.code === 0) {
console.log("data",data);
this.notifyOrderData.partNo = data.shopOrderVo[0].partNo
this.notifyOrderData.orderNo = data.shopOrderVo[0].orderNo
this.notifyOrderData.itemNo = data.shopOrderVo[0].itemNo
this.notifyOrderData.seqNo = data.shopOrderVo[0].seqNo
this.notifyOrderData.partDesc = data.shopOrderVo[0].partDesc
this.notifyOrderData.qtyRequired = data.shopOrderVo[0].lotSize
this.notifyOrderData.sResourceID = row.sResourceID
this.notifyOrderData.issureQty = ''
this.notifyOrderData.needDate = this.dayjs().format('YYYY-MM-DD HH:mm')
this.notifyOrderData.locationNo = row.sResourceID
this.saveSeqNoModalFlag = true
}else {
this.$meassage.error(data.msg)
return;
}
}).finally(() => {
this.chooseLoading = false
})
this.notifyOrderData.partNo = row.partNo
this.notifyOrderData.orderNo = row.orderNo
this.notifyOrderData.itemNo = row.itemNo
this.notifyOrderData.seqNo = row.seqNo
this.notifyOrderData.partDesc = row.partDesc
this.notifyOrderData.qtyRequired = row.qtyRequired
this.notifyOrderData.sResourceID = row.sResourceID
this.notifyOrderData.issureQty = ''
this.notifyOrderData.needDate = this.dayjs().format('YYYY-MM-DD HH:mm')
this.notifyOrderData.locationNo = row.sResourceID
this.saveSeqNoModalFlag = true
}, },
saveSOS() { saveSOS() {
if ( if (
@ -1647,6 +1685,7 @@ export default {
return false return false
} }
let row = this.notifyOrderData let row = this.notifyOrderData
console.log("row",row);
if (this.dataList.length > 0) { if (this.dataList.length > 0) {
let stop = false let stop = false
for (let i = 0; i < this.dataList.length; i++) { for (let i = 0; i < this.dataList.length; i++) {
@ -1661,7 +1700,7 @@ export default {
return false return false
} }
} }
this.$confirm('确定选择工单' + row.seqno + '?', '提示', {
this.$confirm('确定选择工单' + row.orderNo + '?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@ -1669,21 +1708,21 @@ export default {
let inData = { let inData = {
site: this.$store.state.user.site, site: this.$store.state.user.site,
notifyNo: this.notifyNo, notifyNo: this.notifyNo,
fGPartNo: row.partNo,
sOOrderNo: row.orderno,
opsItemNo: row.itemno,
seqNo: row.seqno,
fgPartNo: row.partNo,
soorderNo: row.orderNo,
opsItemNo: row.itemNo,
seqNo: row.seqNo,
locationNo: row.locationNo, locationNo: row.locationNo,
needDate: row.needDate, needDate: row.needDate,
issureQty: row.issureQty, issureQty: row.issureQty,
} }
saveSOIssueNotifyOrderList(inData).then(({ data }) => { saveSOIssueNotifyOrderList(inData).then(({ data }) => {
if (data.code === 0) { if (data.code === 0) {
this.saveSeqNoModalFlag = false this.saveSeqNoModalFlag = false
row.itemNo = data.itemNo
this.getNotifyNoDetail() this.getNotifyNoDetail()
this.enterSOS(row) this.enterSOS(row)
//this.itemNo = data.itemNo
} else { } else {
this.$alert(data.msg, '错误', { this.$alert(data.msg, '错误', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -1702,14 +1741,28 @@ export default {
let rows = { let rows = {
site: this.$store.state.user.site, site: this.$store.state.user.site,
notifyNo: this.notifyNo, notifyNo: this.notifyNo,
orderno: row.sOOrderNo,
seqno: row.seqNo,
partNo: row.fGPartNo,
itemno: row.opsItemNo,
orderNo: row.soorderNo,
seqNo: row.seqNo,
partNo: row.fgPartNo,
itemNo: row.itemNo,
} }
this.itemNo = row.itemNo
//this.searchNotifyMaterialList(rows)
this.enterSOS(rows) this.enterSOS(rows)
}, },
searchNotifyMaterialList(row){
this.bomLoadFlag = true
this.materialModalFlag = true
searchNotifyMaterialList(row).then(({ data }) => {
if (data.code === 0) {
this.sobomList = data.rows
this.bomLoadFlag = false
}
}).catch(()=>{
this.bomLoadFlag = false
})
},
enterSOS(row) { enterSOS(row) {
console.log("row",row); console.log("row",row);
@ -1717,23 +1770,26 @@ export default {
this.materialModalFlag = true this.materialModalFlag = true
this.sobomList = [] this.sobomList = []
this.sobomData = { this.sobomData = {
orderno: row.orderno,
seqno: row.seqno,
orderNo: row.orderNo,
seqNo: row.seqNo,
partNo: row.partNo, partNo: row.partNo,
} }
this.bomLoadFlag = true this.bomLoadFlag = true
let inData = { let inData = {
site: this.$store.state.user.site, site: this.$store.state.user.site,
notifyNo: this.notifyNo, notifyNo: this.notifyNo,
orderno: row.orderno,
seqno: row.seqno,
orderNo: row.orderNo,
seqNo: row.seqNo,
partNo: row.partNo, partNo: row.partNo,
itemno: row.itemno,
itemNo: row.itemNo,
} }
getSOSBOMForIssure(inData).then(({ data }) => { getSOSBOMForIssure(inData).then(({ data }) => {
this.bomLoadFlag = false this.bomLoadFlag = false
if (data.code === 0) { if (data.code === 0) {
this.sobomList = data.rows this.sobomList = data.rows
for (let i = 0; i < this.sobomList.length; i++) {
this.sobomList[i].itemNo = inData.itemNo
}
} }
}) })
}, },
@ -1772,6 +1828,8 @@ export default {
) { ) {
this.sobomList[i].applyQty = 0 this.sobomList[i].applyQty = 0
} }
this.sobomList[i].notifyNo = this.notifyNo
this.sobomList[i].site = this.$store.state.user.site
} }
let materialList = this.sobomList.filter((item) => item.qtyToIssue > 0) let materialList = this.sobomList.filter((item) => item.qtyToIssue > 0)
@ -1923,11 +1981,11 @@ export default {
}) })
return false return false
} }
checkPartStock(this.notifyData).then(({ data }) => {
/* checkPartStock(this.notifyData).then(({ data }) => {
if (data.code === 0) { if (data.code === 0) {
this.xiadaList = data.rows this.xiadaList = data.rows
} }
})
}) */
this.xiadaModelFlag = true this.xiadaModelFlag = true
}, },
xiadaNotify() { xiadaNotify() {
@ -2000,7 +2058,7 @@ export default {
updateBuModel() { updateBuModel() {
if (this.dataList.length > 0) { if (this.dataList.length > 0) {
this.$alert( this.$alert(
'已经选择了工单,无法切换BU,请删除已选工单!',
'已经选择了工单,无法切换BU,请删除已选工单!',
'错误', '错误',
{ {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -2061,7 +2119,7 @@ export default {
}, },
// //
deleteNotifySOS(row) { deleteNotifySOS(row) {
this.$confirm(`是否删除这个工单的申请信息?`, '提示', {
this.$confirm(`是否删除这个工单的申请信息?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@ -2216,4 +2274,17 @@ export default {
height: 20px; height: 20px;
} }
</style> </style>
<style scoped>
/* 选择工单弹窗:紧凑表格与按钮样式 */
.choose-sos-btn {
height: 14px;
box-sizing: border-box;
padding: 0 6px;
line-height: 12px;
font-size: 12px;
display: inline-flex;
align-items: center;
justify-content: center;
}
</style>

2435
src/views/modules/productionInbound/productionInboundRequest.vue
File diff suppressed because it is too large
View File

Loading…
Cancel
Save