ruanqi 1 year ago
parent
commit
7725f3567d
  1. 191
      src/views/modules/orderIssure/soIssueNotify/newSoIssueNotify.vue
  2. 120
      src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue

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

@ -52,16 +52,16 @@
<el-input v-model="notifyData.enteredDate" disabled ></el-input> <el-input v-model="notifyData.enteredDate" disabled ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4">
<el-form-item :label="'要求发料日期'" >
<el-date-picker
v-model="notifyData.planIssueDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<!-- <el-col :span="4">-->
<!-- <el-form-item :label="'要求发料日期'" >-->
<!-- <el-date-picker-->
<!-- v-model="notifyData.planIssueDate"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="选择日期">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row> </el-row>
<el-row :gutter="20" v-if="notifyNo!=''"> <el-row :gutter="20" v-if="notifyNo!=''">
<el-col :span="24"> <el-col :span="24">
@ -105,7 +105,7 @@
width="100" width="100"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<a type="text" size="small" @click="enterSOSDetail(scope.row)">选择</a>
<a type="text" size="small" @click="enterSOSDetail(scope.row)">物料</a>
<a type="text" size="small" @click="deleteNotifySOS(scope.row)">删除</a> <a type="text" size="small" @click="deleteNotifySOS(scope.row)">删除</a>
</template> </template>
</el-table-column> </el-table-column>
@ -145,13 +145,25 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="'操作员'" >
<el-input v-model="seqNoData.operatorId" ></el-input>
<el-form-item :label="'派工日期'" >
<el-date-picker
style="width: 100%"
v-model="seqNoData.startDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="'班次'" >
<el-input v-model="seqNoData.sShiftno" ></el-input>
<el-form-item :label="'到'" >
<el-date-picker
style="width: 100%"
v-model="seqNoData.endDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -199,7 +211,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="800px">
<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">
@ -229,14 +241,33 @@
<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>
<el-col :span="12">
<el-col :span="18">
<el-form-item :label="'物料名称'" > <el-form-item :label="'物料名称'" >
<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-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item :label="'要求发料日期'" >
<el-date-picker
style="width: 165px"
v-model="notifyOrderData.needDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item >
<span slot="label" style="" @click="getBaseList(215)"><a herf="#">库位</a></span>
<el-input v-model="notifyOrderData.locationNo" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="'此次领料数量'" > <el-form-item :label="'此次领料数量'" >
<el-input v-model="notifyOrderData.issureQty" type="number" ></el-input>
<el-input v-model="notifyOrderData.issureQty" type="number" style="text-align: right" ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -252,12 +283,12 @@
<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" ></el-input>
<el-input v-model="sobomData.orderno" readonly ></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" ></el-input>
<el-input v-model="sobomData.seqno" readonly ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -295,11 +326,11 @@
</div> </div>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="saveMaterialDetail()">保存</el-button> <el-button type="primary" @click="saveMaterialDetail()">保存</el-button>
<el-button type="primary" @click="ToSOS()">重新选择派工单</el-button>
<!-- <el-button type="primary" @click="ToSOS()">重新选择派工单</el-button>-->
<el-button type="primary" @click="materialModalFlag=false">关闭</el-button> <el-button type="primary" @click="materialModalFlag=false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div> </div>
</template> </template>
@ -326,20 +357,18 @@
xiadaNotify, xiadaNotify,
}from "@/api/orderIssure/soIssueNotify.js" }from "@/api/orderIssure/soIssueNotify.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
export default { export default {
components: {
Chooselist
},
watch: { watch: {
searchData: {
notifyOrderData: {
deep: true, deep: true,
handler: function (newV, oldV) { handler: function (newV, oldV) {
this.searchData.groupID = this.searchData.groupID.toUpperCase()
this.notifyOrderData.locationNo = this.notifyOrderData.locationNo.toUpperCase()
} }
}, },
modalData: {
deep: true,
handler: function (newV, oldV) {
this.modalData.groupID = this.modalData.groupID.toUpperCase()
}
}
}, },
data () { data () {
return { return {
@ -386,6 +415,8 @@
qtyrequired:'', qtyrequired:'',
sResourceid:'', sResourceid:'',
issureQty:'', issureQty:'',
locationNo:'',
needDate:'',
}, },
seqNoData:{ seqNoData:{
site: this.$store.state.user.site, site: this.$store.state.user.site,
@ -395,6 +426,8 @@
sWorkcenterno:'', sWorkcenterno:'',
operatorId:'', operatorId:'',
sShiftno:'', sShiftno:'',
startDate:'',
endDate:'',
}, },
seqNoList:[], seqNoList:[],
height: 200, height: 200,
@ -502,7 +535,7 @@
columnProp: 'itemDesc', columnProp: 'itemDesc',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
columnLabel: '在用',
columnLabel: '工序名称',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -511,6 +544,44 @@
fixed: '', fixed: '',
columnWidth: 100, columnWidth: 100,
}, },
{
userId: this.$store.state.user.name,
functionId: 701001002,
serialNumber: '701001002Table1LocationNo',
tableId: "701001002Table1",
tableName: "领料申请派工单子表",
columnProp: 'locationNo',
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: 701001002,
serialNumber: '701001002Table1NeedDate',
tableId: "701001002Table1",
tableName: "领料申请派工单子表",
columnProp: 'needDate',
headerAlign: "center",
align: "left",
columnLabel: '要求发料时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 701001002, functionId: 701001002,
@ -784,7 +855,7 @@
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 80,
columnWidth: 50,
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -802,7 +873,7 @@
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 120,
columnWidth: 220,
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -820,7 +891,7 @@
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 80,
columnWidth: 50,
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -838,7 +909,7 @@
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 80,
columnWidth: 50,
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -856,7 +927,7 @@
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 100,
columnWidth: 60,
}, },
], ],
rules:{ rules:{
@ -922,6 +993,27 @@
}, },
methods: { methods: {
getBaseList (val,type) {
this.tagNo = val
this.$nextTick(() => {
let strVal = ''
if (val === 215) {
strVal = this.notifyOrderData.locationNo
this.$refs.baseList.init(val, strVal)
}
})
},
//
getBaseData (val) {
if (this.tagNo === 215) {
this.notifyOrderData.locationNo = val.location_id
}
},
getUserNotifyNo(){ getUserNotifyNo(){
let inData={ let inData={
site:this.$store.state.user.site, site:this.$store.state.user.site,
@ -996,9 +1088,19 @@
this.notifyOrderData.qtyrequired=row.qtyrequired this.notifyOrderData.qtyrequired=row.qtyrequired
this.notifyOrderData.sResourceid=row.sResourceid this.notifyOrderData.sResourceid=row.sResourceid
this.notifyOrderData.issureQty='' this.notifyOrderData.issureQty=''
this.notifyOrderData.needDate=this.dayjs().format("YYYY-MM-DD hh:mm")
this.notifyOrderData.locationNo='';
this.saveSeqNoModalFlag=true this.saveSeqNoModalFlag=true
}, },
saveSOS(){ saveSOS(){
if(this.notifyOrderData.needDate==null||this.notifyOrderData.needDate==''){
this.$message.warning('请选择时间!')
return false
}
if(this.notifyOrderData.locationNo==null||this.notifyOrderData.locationNo==''){
this.$message.warning('请输入库位!')
return false
}
if(this.notifyOrderData.issureQty==null||this.notifyOrderData.issureQty==''||this.notifyOrderData.issureQty<=0){ if(this.notifyOrderData.issureQty==null||this.notifyOrderData.issureQty==''||this.notifyOrderData.issureQty<=0){
this.$message.warning('请填写领取数量!') this.$message.warning('请填写领取数量!')
return false return false
@ -1030,6 +1132,8 @@
sOOrderNo:row.orderno, sOOrderNo:row.orderno,
opsItemNo:row.itemno, opsItemNo:row.itemno,
seqNo:row.seqno, seqNo:row.seqno,
locationNo:row.locationNo,
needDate:row.needDate,
issureQty:row.issureQty, issureQty:row.issureQty,
outWorkOrderFlag:'N', outWorkOrderFlag:'N',
} }
@ -1095,6 +1199,8 @@
sWorkcenterno:'', sWorkcenterno:'',
operatorId:'', operatorId:'',
sShiftno:'', sShiftno:'',
startDate: this.dayjs().format('YYYY-MM-DD'),
endDate: this.dayjs().format('YYYY-MM-DD'),
} }
this.searchSOSRouting() this.searchSOSRouting()
this.seqNoModalFlag=true; this.seqNoModalFlag=true;
@ -1122,6 +1228,7 @@
saveMaterialDetail(materialList).then(({data})=>{ saveMaterialDetail(materialList).then(({data})=>{
if (data.code === 0) { if (data.code === 0) {
this.materialModalFlag=false this.materialModalFlag=false
this.chooseSOSModal();
this.$message.success( '操作成功') this.$message.success( '操作成功')
}else { }else {
this.$alert(data.msg, '错误', { this.$alert(data.msg, '错误', {
@ -1233,12 +1340,12 @@
}) })
return false return false
} }
if(this.notifyData.planIssueDate==null||this.notifyData.planIssueDate==''){
this.$alert('请选择要求发料日期!!', '提示', {
confirmButtonText: '确定'
})
return false
}
// if(this.notifyData.planIssueDate==null||this.notifyData.planIssueDate==''){
// this.$alert('!', '', {
// confirmButtonText: ''
// })
// return false
// }
xiadaNotify(this.notifyData).then(({data})=>{ xiadaNotify(this.notifyData).then(({data})=>{
if (data.code === 0) { if (data.code === 0) {
this.getUserNotifyNo() this.getUserNotifyNo()

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

@ -250,7 +250,7 @@
columnProp: "notifyNo", columnProp: "notifyNo",
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: "发料单号",
columnLabel: "申请单单号",
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -343,40 +343,40 @@
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 120 columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 701002,
serialNumber: '701002Table1PlanIssueDate',
tableId: "701002Table1",
tableName: "领料申请主表",
columnProp: "planIssueDate",
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: '701002Table1RealIssueDate',
tableId: "701002Table1",
tableName: "领料申请主表",
columnProp: "realIssueDate",
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: '701002Table1PlanIssueDate',
// tableId: "701002Table1",
// tableName: "",
// columnProp: "planIssueDate",
// 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: '701002Table1RealIssueDate',
// tableId: "701002Table1",
// tableName: "",
// columnProp: "realIssueDate",
// headerAlign: "center",
// align: "left",
// columnLabel: "",
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// columnWidth: 100
},{ },{
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 701002, functionId: 701002,
@ -533,7 +533,46 @@
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 120 columnWidth: 120
}, {
},
{
userId: this.$store.state.user.name,
functionId: 701002,
serialNumber: '701002Table2LocationNo',
tableId: "701002Table2",
tableName: "领料申请派工单子表",
columnProp: 'locationNo',
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: '701002Table2NeedDate',
tableId: "701002Table2",
tableName: "领料申请派工单子表",
columnProp: 'needDate',
headerAlign: "center",
align: "left",
columnLabel: '要求发料时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 701002, functionId: 701002,
serialNumber: '701002Table2IssureQty', serialNumber: '701002Table2IssureQty',
@ -792,6 +831,15 @@
}) })
}, },
// watch: {
// searchData: {
// deep: true,
// handler: function (newV, oldV) {
// this.searchData.partNo = this.searchData.partNo.toUpperCase()
// }
// },
// },
methods: { methods: {
// S // S
getBaseList (val, type) { getBaseList (val, type) {

Loading…
Cancel
Save