ruanqi 1 year ago
parent
commit
c06fb7cfe6
  1. 3
      src/api/orderIssure/soIssueNotify.js
  2. 150
      src/views/modules/orderIssure/soIssueNotify/newSoIssueNotify.vue
  3. 253
      src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue

3
src/api/orderIssure/soIssueNotify.js

@ -36,3 +36,6 @@ export const deleteNotifySOSPlus= data => createAPI(`/orderIssure/issureNotify/d
export const updateNotifyStatus= data => createAPI(`/orderIssure/issureNotify/updateNotifyStatus`,'post',data)
export const deleteNotifyMaterial= data => createAPI(`/orderIssure/issureNotify/deleteNotifyMaterial`,'post',data)
export const saveOtherPart= data => createAPI(`/orderIssure/issureNotify/saveOtherPart`,'post',data)
export const getNoControlPartList= data => createAPI(`/orderIssure/issureNotify/getNoControlPartList`,'post',data)
export const searchOtherPart= data => createAPI(`/orderIssure/issureNotify/searchOtherPart`,'post',data)
export const searchNotifyLog= data => createAPI(`/orderIssure/issureNotify/searchNotifyLog`,'post',data)

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

@ -9,6 +9,7 @@
<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-button v-if="notifyNo!=''" type="primary" @click="noBomModel()" class="yzzButtonAn">非BOM物料</el-button>
<el-button v-if="notifyNo!=''" type="primary" @click="noControlModel()" class="yzzButtonAn">不管控物料</el-button>
</el-col>
<el-col :span="4">
<span @click="favoriteFunction()">
@ -500,7 +501,81 @@
</el-table-column>
</el-table>
</el-dialog>
<el-dialog
width="600px"
title="选择不管控物料"
:close-on-click-modal="false"
:visible.sync="noControlPartModelFlag">
<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="searchNoControlPartModel()">{{'查询'}}</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
height="450"
:data="partList2"
border
@row-dblclick="chooseNoControlPartNo"
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 需求数量"
@ -626,6 +701,8 @@
getPartList,
checkPartStock,
saveOtherPart,
getNoControlPartList,
searchOtherPart,
}from "@/api/orderIssure/soIssueNotify.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
export default {
@ -643,8 +720,10 @@
data () {
return {
activeName:'sos',
noControlPartModelFlag: false,
buList:[],
partList:[],
partList2:[],
notifyNo:'',
notifyData:{
site:'',
@ -1389,6 +1468,20 @@
}
this.saveOtherPartModalFlag=true
},
chooseNoControlPartNo(row){
this.otherPartData={
site:this.notifyData.site,
notifyNo:this.notifyData.notifyNo,
itemNo:999,
bOMItemNo:'',
componentPartNo:row.partNo,
qtyToIssue:'',
issueType:'不管控物料',
partDesc:row.partDesc,
umid:row.umid,
}
this.saveOtherPartModalFlag=true
},
tableRowClassName ({row, rowIndex}) {
if(row.qtyToIssue>row.qtyAvailable){
@ -1422,6 +1515,8 @@
this.notifyNo = data.row.notifyNo
this.notifyData=data.row
this.getNotifyNoDetail();
this.searchOtherPart('非BOM物料')
this.searchOtherPart('不管控物料')
}else {
this.notifyNo =''
this.notifyData={
@ -1773,6 +1868,17 @@
this.partModelFlag=true
this. searchPartModel()
},
noControlModel(){
this.partSearch={
site:this.notifyData.site,
sourceBu:this.notifyData.bu,
partNo:'',
partDesc:'',
spec:'',
}
this.noControlPartModelFlag=true
this. searchNoControlPartModel()
},
searchPartModel(){
getPartList(this.partSearch).then(({data})=>{
if (data.code === 0) {
@ -1780,8 +1886,15 @@
}
})
},
searchNoControlPartModel(){
getNoControlPartList(this.partSearch).then(({data})=>{
if (data.code === 0) {
this.partList2=data.rows
}
})
},
xiadaNotifyModel(){
if(this.dataList.length==0){
if(this.dataList.length==0&&this.dataList2.length==0&&this.dataList3.length==0){
this.$alert('没有明细记录无法下达!!', '提示', {
confirmButtonText: '确定'
})
@ -1804,6 +1917,7 @@
// }
xiadaNotify(this.notifyData).then(({data})=>{
if (data.code === 0) {
this.xiadaModelFlag=false
this.getUserNotifyNo()
this.$message.success( '操作成功')
}else {
@ -1825,9 +1939,18 @@
}).then(() => {
saveOtherPart(this.otherPartData).then(({data})=>{
if (data.code === 0) {
this.saveSeqNoModalFlag=false
this.getNotifyNoDetail()
this.itemNo=data.itemNo
this.saveOtherPartModalFlag=false
if(this.otherPartData.issueType==='非BOM物料'){
this.partModelFlag=false
this.activeName='noBom'
this.searchOtherPart('非BOM物料')
}
if(this.otherPartData.issueType==='不管控物料'){
this.noControlPartModelFlag=false
this.activeName='noControl'
this.searchOtherPart('不管控物料')
}
this.$message.success( '操作成功')
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
@ -1896,6 +2019,23 @@
}
})
},
searchOtherPart(type){
let inData={
site:this.notifyData.site,
notifyNo:this.notifyData.notifyNo,
issueType:type
}
searchOtherPart(inData).then(({data}) =>{
if (data && data.code === 0) {
if(type==='非BOM物料'){
this.dataList2=data.rows
}
if(type==='不管控物料'){
this.dataList3=data.rows
}
}
})
},
//
deleteNotifySOS (row) {
this.$confirm(`是否删除这个派工单的申请信息?`, '提示', {

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

@ -118,6 +118,16 @@
border
v-loading="dataListLoading"
style="width: 100%; ">
<el-table-column
header-align="center"
align="center"
width="80"
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-column
v-for="(item,index) in columnList2" :key="index"
:sortable="item.columnSortable"
@ -134,17 +144,6 @@
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>
@ -165,6 +164,16 @@
<!-- <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>-->
<!-- </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="currentRow.status==='已下达'" @click="deleteNotifyMaterial(scope.row)">删除</a>
</template>
</el-table-column>
<el-table-column
v-for="(item,index) in columnList3" :key="index"
:sortable="item.columnSortable"
@ -181,22 +190,46 @@
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="材料汇总" name="sum">
<el-table
:data="dataList4"
:height="height"
border
v-loading="dataListLoading"
style="width: 100%; ">
<!-- <el-table-column-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="80"-->
<!-- fixed="left"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
header-align="center"
align="center"
width="80"
fixed="left"
label="操作">
v-for="(item,index) in columnList4" :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">
<a type="text" size="small" v-if="currentRow.status==='已下达'" @click="deleteNotifyMaterial(scope.row)">删除</a>
<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>
</el-tab-pane>
<el-tab-pane label="材料汇总" name="sum">
<el-tab-pane label="删除记录" name="change">
<el-table
:data="dataList4"
:data="dataList5"
:height="height"
border
v-loading="dataListLoading"
@ -212,7 +245,7 @@
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
v-for="(item,index) in columnList4" :key="index"
v-for="(item,index) in columnList5" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
@ -245,6 +278,7 @@
,deleteNotifySOSPlus
,updateNotifyStatus
,deleteNotifyMaterial
,searchNotifyLog
}from "@/api/orderIssure/soIssueNotify.js"
import Chooselist from '@/views/modules/common/Chooselist'
export default {
@ -260,6 +294,7 @@
dataList2: [],
dataList3: [],
dataList4: [],
dataList5: [],
addOrUpdateVisible:false,
searchData: {
page: 1,
@ -910,6 +945,170 @@
columnWidth: 80
},
],
columnList5:[
{
userId: this.$store.state.user.name,
functionId: 701002,
serialNumber: '701002Table5UpdateType',
tableId: "701002Table5",
tableName: "申请单材料删除记录表",
columnProp: "updateType",
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: '701002Table5ItemNo',
tableId: "701002Table5",
tableName: "申请单材料删除记录表",
columnProp: "itemNo",
headerAlign: "center",
align: "right",
columnLabel: "领料单序号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 701002,
serialNumber: '701002Table5SOOrderNo',
tableId: "701002Table5",
tableName: "申请单材料删除记录表",
columnProp: "sOOrderNo",
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: '701002Table5SeqNo',
tableId: "701002Table5",
tableName: "申请单材料删除记录表",
columnProp: "seqNo",
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: '701002Table5ComponentPartNo',
tableId: "701002Table5",
tableName: "申请单材料删除记录表",
columnProp: "componentPartNo",
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: '701002Table5IssueType',
tableId: "701002Table5",
tableName: "申请单材料删除记录表",
columnProp: "issueType",
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: '701002Table5QtyToIssue',
tableId: "701002Table5",
tableName: "申请单材料删除记录表",
columnProp: "qtyToIssue",
headerAlign: "center",
align: "right",
columnLabel: "要求领料数量",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 701002,
serialNumber: '701002Table5UpdateBy',
tableId: "701002Table5",
tableName: "申请单材料删除记录表",
columnProp: "updateBy",
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: '701002Table5UpdateDate',
tableId: "701002Table5",
tableName: "申请单材料删除记录表",
columnProp: "updateDate",
headerAlign: "center",
align: "center",
columnLabel: "删除时间",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
],
dataRole: {
partTypeDesc: [
{
@ -936,7 +1135,7 @@
},
mounted () {
this.$nextTick(() => {
this.height = (window.innerHeight- 260) / 2
this.height = (window.innerHeight- 250) / 2
})
},
@ -1017,6 +1216,16 @@
this.dataList3 = [];
}
});
}else if(this.activeName==='change'){
searchNotifyLog(this.currentRow).then(({data}) => {
//
if (data && data.code == 0) {
this.dataList5 = data.rows
} else {
this.dataList5 = [];
}
});
}else {
searchSumNotifyMaterialList(this.currentRow).then(({data}) => {
//

Loading…
Cancel
Save