Browse Source

领料

master
shenzhouyu 5 months ago
parent
commit
edd96b15e5
  1. 1995
      src/views/modules/orderIssure/inboundNotification.vue
  2. 21
      src/views/modules/orderIssure/newSoIssueNotify.vue
  3. 390
      src/views/modules/productionInbound/productionInboundRequest.vue
  4. 1065
      src/views/modules/productionInbound/searchRollRecords.vue

1995
src/views/modules/orderIssure/inboundNotification.vue
File diff suppressed because it is too large
View File

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

@ -267,7 +267,7 @@
<el-button type="primary" @click="seqNoModalFlag = false">关闭</el-button> <el-button type="primary" @click="seqNoModalFlag = false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<el-dialog title="保存工单" :close-on-click-modal="false" v-drag :visible.sync="saveSeqNoModalFlag" width="750px">
<el-dialog title="保存工单" :close-on-click-modal="false" v-drag :visible.sync="saveSeqNoModalFlag" width="750px">
<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">
@ -370,11 +370,11 @@
<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>
<el-col :span="6">
<!-- <el-col :span="6">
<el-form-item :label="'派工单号'"> <el-form-item :label="'派工单号'">
<el-input v-model="sobomData.seqno" disabled></el-input> <el-input v-model="sobomData.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="sobomData.partNo" disabled></el-input> <el-input v-model="sobomData.partNo" disabled></el-input>
@ -606,6 +606,7 @@ import {
saveSOIssueNotifyOrderList, saveSOIssueNotifyOrderList,
getSOSBOMForIssure, getSOSBOMForIssure,
saveMaterialDetail, saveMaterialDetail,
deleteNotifySOS
} 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'
@ -1605,7 +1606,7 @@ export default {
} }
} }
if (stop) { if (stop) {
this.$alert('已经选择过此工单,请返回点击明细直接操作!!', '提示', {
this.$alert('已经选择过此工单,请返回点击明细直接操作!!', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
}) })
return false return false
@ -1654,13 +1655,13 @@ export default {
} }
} }
if (stop) { if (stop) {
this.$alert('已经选择过此工单,请返回点击明细直接操作!!', '提示', {
this.$alert('已经选择过此工单,请返回点击明细直接操作!!', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
}) })
return false return false
} }
} }
this.$confirm('确定选择工单' + row.seqno + '?', '提示', {
this.$confirm('确定选择工单' + row.seqno + '?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@ -1676,12 +1677,13 @@ export default {
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
this.getNotifyNoDetail() this.getNotifyNoDetail()
this.enterSOS(row) this.enterSOS(row)
this.itemNo = data.itemNo
//this.itemNo = data.itemNo
} else { } else {
this.$alert(data.msg, '错误', { this.$alert(data.msg, '错误', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -1709,6 +1711,8 @@ export default {
this.enterSOS(rows) this.enterSOS(rows)
}, },
enterSOS(row) { enterSOS(row) {
console.log("row",row);
this.seqNoModalFlag = false this.seqNoModalFlag = false
this.materialModalFlag = true this.materialModalFlag = true
this.sobomList = [] this.sobomList = []
@ -1760,6 +1764,7 @@ export default {
}) })
}, },
saveMaterialDetail() { saveMaterialDetail() {
for (let i = 0; i < this.sobomList.length; i++) { for (let i = 0; i < this.sobomList.length; i++) {
if ( if (
this.sobomList[i].applyQty === '' || this.sobomList[i].applyQty === '' ||
@ -1768,6 +1773,7 @@ export default {
this.sobomList[i].applyQty = 0 this.sobomList[i].applyQty = 0
} }
} }
let materialList = this.sobomList.filter((item) => item.qtyToIssue > 0) let materialList = this.sobomList.filter((item) => item.qtyToIssue > 0)
if (materialList.length == 0) { if (materialList.length == 0) {
this.$alert('没有需要保存的内容!', '提示', { this.$alert('没有需要保存的内容!', '提示', {
@ -1775,6 +1781,7 @@ export default {
}) })
return false return false
} }
console.log("this.sobomList",materialList);
saveMaterialDetail(materialList).then(({ data }) => { saveMaterialDetail(materialList).then(({ data }) => {
if (data.code === 0) { if (data.code === 0) {
this.materialModalFlag = false this.materialModalFlag = false

390
src/views/modules/productionInbound/productionInboundRequest.vue

@ -0,0 +1,390 @@
<template>
<div>
<el-form label-position="top">
<el-row :gutter="20">
<el-col :span="20">
<!-- <el-button v-if="notifyNo === ''" @click="addNotify()" type="primary">新建入库申请单</el-button>
<el-button v-if="notifyNo !== ''" type="primary" @click="chooseProductionOrder()">选择生产订单</el-button>
<el-button v-if="notifyNo !== ''" type="primary" @click="submitNotify()">下达申请单</el-button>
<el-button v-if="notifyNo !== ''" type="primary" @click="deleteNotify()">删除申请单</el-button> -->
<el-button @click="addNotify()" type="primary">新建入库申请单</el-button>
<el-button type="primary" @click="chooseProductionOrder()">选择生产订单</el-button>
<el-button type="primary" @click="submitNotify()">下达申请单</el-button>
<el-button type="primary" @click="deleteNotify()">删除申请单</el-button>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="4">
<el-form-item label="工厂编码">
<el-input v-model="notifyData.site" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="申请单号">
<el-input v-model="notifyData.notifyNo" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="申请人">
<el-input v-model="notifyData.userName" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="申请时间">
<el-input v-model="notifyData.notifyDate" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="状态">
<el-select v-model="notifyData.status" disabled>
<el-option label="全部" value=""></el-option>
<el-option v-for="item in notifyStatusList" :key="item.listValue" :label="item.listDesc" :value="item.listValue"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="备注">
<el-input v-model="notifyData.remark"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:data="dataList"
@row-click="changeData"
:height="height"
border
highlight-current-row
ref="mainTable"
v-loading="dataListLoading"
style="width: 100%; ">
<el-table-column
v-for="(item,index) in columnList1" :key="index"
:sortable="item.columnSortable"
: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"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
header-align="center"
align="center"
width="80"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.status==='已下达'" @click="closeNotifyModel(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"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 1000]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 选择生产订单弹窗明细编辑弹窗等可后续补充 -->
</div>
</template>
<script>
import {
createInboundRequest,
getInboundRequestDetail,
deleteInboundRequest,
submitInboundRequest,
addInboundRequestDetail,
deleteInboundRequestDetail
} from '@/api/productionInbound/productionInboundRequest.js'
export default {
name: 'ProductionInboundRequest',
data() {
return {
notifyNo: '',
notifyData: {
site: '',
notifyNo: '',
notifyDate: '',
userName: '',
remark: '',
status: ''
},
notifyStatusList: [],
dataList: [],
columnList1:[
{
userId: this.$store.state.user.name,
functionId: 701002,
serialNumber: '701002Table1NotifyNo',
tableId: "701002Table1",
tableName: "生产入库申请主表",
columnProp: "notifyNo",
headerAlign: "center",
align: "center",
columnLabel: "申请单单号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},{
userId: this.$store.state.user.name,
functionId: 701002,
serialNumber: '701002Table1WorkShopName',
tableId: "701002Table1",
tableName: "生产入库申请主表",
columnProp: "workShopName",
headerAlign: "center",
align: "center",
columnLabel: "车间",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},{
userId: this.$store.state.user.name,
functionId: 701002,
serialNumber: '701002Table1NotifyDate',
tableId: "701002Table1",
tableName: "生产入库申请主表",
columnProp: "notifyDate",
headerAlign: "center",
align: "center",
columnLabel: "申请日期",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},{
userId: this.$store.state.user.name,
functionId: 701002,
serialNumber: '701002Table1UserName',
tableId: "701002Table1",
tableName: "生产入库申请主表",
columnProp: "userName",
headerAlign: "center",
align: "left",
columnLabel: "申请账号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},{
userId: this.$store.state.user.name,
functionId: 701002,
serialNumber: '701002Table1UserName',
tableId: "701002Table1",
tableName: "生产入库申请主表",
columnProp: "userDisplay",
headerAlign: "center",
align: "left",
columnLabel: "申请人姓名",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},{
userId: this.$store.state.user.name,
functionId: 701002,
serialNumber: '701002Table1IssueFlag',
tableId: "701002Table1",
tableName: "生产入库申请主表",
columnProp: "issueFlag",
headerAlign: "center",
align: "center",
columnLabel: "是否领料",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},{
userId: this.$store.state.user.name,
functionId: 701002,
serialNumber: '701002Table1IssueResult',
tableId: "701002Table1",
tableName: "生产入库申请主表",
columnProp: "issueResult",
headerAlign: "center",
align: "left",
columnLabel: "领料结果",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 701002,
serialNumber: '701002Table1Status',
tableId: "701002Table1",
tableName: "生产入库申请主表",
columnProp: "status",
headerAlign: "center",
align: "left",
columnLabel: "状态",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},{
userId: this.$store.state.user.name,
functionId: 701002,
serialNumber: '701002Table1Remark',
tableId: "701002Table1",
tableName: "生产入库申请主表",
columnProp: "remark",
headerAlign: "center",
align: "left",
columnLabel: "备注",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 200
},
],
}
},
created() {
this.initPage()
},
methods: {
//
initPage() {
//
// this.getNotifyStatusList()
// this.getCurrentUser()
},
//
addNotify() {
const data = {
site: this.$store.state.user.site || '',
userName: this.$store.state.user.name || ''
}
createInboundRequest(data).then(({ data }) => {
if (data.code === 0) {
this.$message.success('新建成功')
this.notifyNo = data.notifyNo
this.getDetail()
} else {
this.$message.error(data.msg || '新建失败')
}
})
},
//
getDetail() {
if (!this.notifyNo) return
getInboundRequestDetail({ notifyNo: this.notifyNo }).then(({ data }) => {
if (data.code === 0) {
this.notifyData = data.header || {}
this.dataList = data.rows || []
}
})
},
//
deleteNotify() {
if (!this.notifyNo) return
this.$confirm('确定删除该申请单?', '提示', { type: 'warning' }).then(() => {
deleteInboundRequest({ notifyNo: this.notifyNo }).then(({ data }) => {
if (data.code === 0) {
this.$message.success('删除成功')
this.notifyNo = ''
this.notifyData = { site: '', notifyNo: '', notifyDate: '', userName: '', remark: '', status: '' }
this.dataList = []
} else {
this.$message.error(data.msg || '删除失败')
}
})
})
},
//
submitNotify() {
if (!this.notifyNo) return
submitInboundRequest({ notifyNo: this.notifyNo }).then(({ data }) => {
if (data.code === 0) {
this.$message.success('下达成功')
this.getDetail()
} else {
this.$message.error(data.msg || '下达失败')
}
})
},
// /
chooseProductionOrder() {
// addInboundRequestDetail
//
const detail = {
notifyNo: this.notifyNo,
productionOrderNo: 'PO20240601',
partNo: 'PN001',
partDesc: '示例物料',
qty: 10,
remark: ''
}
addInboundRequestDetail(detail).then(({ data }) => {
if (data.code === 0) {
this.$message.success('添加明细成功')
this.getDetail()
} else {
this.$message.error(data.msg || '添加明细失败')
}
})
},
//
deleteDetail(row) {
this.$confirm('确定删除该明细?', '提示', { type: 'warning' }).then(() => {
deleteInboundRequestDetail({ notifyNo: this.notifyNo, itemNo: row.itemNo }).then(({ data }) => {
if (data.code === 0) {
this.$message.success('删除明细成功')
this.getDetail()
} else {
this.$message.error(data.msg || '删除明细失败')
}
})
})
},
//
editDetail(row) {
this.$message.info('编辑明细功能待实现')
}
}
}
</script>

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

Loading…
Cancel
Save