4 changed files with 3464 additions and 7 deletions
-
1995src/views/modules/orderIssure/inboundNotification.vue
-
21src/views/modules/orderIssure/newSoIssueNotify.vue
-
390src/views/modules/productionInbound/productionInboundRequest.vue
-
1065src/views/modules/productionInbound/searchRollRecords.vue
1995
src/views/modules/orderIssure/inboundNotification.vue
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -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
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue