|
|
|
@ -7,6 +7,7 @@ |
|
|
|
<el-button v-if="notifyNo!=''" type="primary" @click="chooseSOSModal()" class="yzzButtonAn">选择派工单</el-button> |
|
|
|
<el-button v-if="notifyNo!=''" type="primary" @click="xiadaNotify()" class="yzzButtonAn">下达申请单</el-button> |
|
|
|
<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-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<span @click="favoriteFunction()"> |
|
|
|
@ -32,22 +33,27 @@ |
|
|
|
<!-- </el-col>--> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="20" v-if="notifyNo!=''"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-col :span="2"> |
|
|
|
<el-form-item :label="'工厂编码'" > |
|
|
|
<el-input v-model="notifyData.site" disabled ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-col :span="2"> |
|
|
|
<el-form-item :label="'BU'" > |
|
|
|
<el-input v-model="notifyData.bu" disabled ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="2"> |
|
|
|
<el-form-item :label="'申请单号'" > |
|
|
|
<el-input v-model="notifyData.notifyNo" disabled ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-col :span="2"> |
|
|
|
<el-form-item :label="'申请账号'" > |
|
|
|
<el-input v-model="notifyData.userName" disabled ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item :label="'申请时间'" > |
|
|
|
<el-input v-model="notifyData.enteredDate" disabled ></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -64,7 +70,7 @@ |
|
|
|
<!-- </el-col>--> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="20" v-if="notifyNo!=''"> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-col :span="11"> |
|
|
|
<el-form-item :label="'备注'" > |
|
|
|
<el-input v-model="notifyData.remark" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -135,12 +141,15 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item :label="'机台'" > |
|
|
|
<el-form-item > |
|
|
|
<span slot="label" style="" @click="getBaseList(515)"><a herf="#">机台</a></span> |
|
|
|
|
|
|
|
<el-input v-model="seqNoData.sResourceid" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item :label="'加工中心'" > |
|
|
|
<el-form-item > |
|
|
|
<span slot="label" style="" @click="getBaseList(216)"><a herf="#">加工中心</a></span> |
|
|
|
<el-input v-model="seqNoData.sWorkcenterno" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
@ -249,7 +258,7 @@ |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item :label="'要求发料日期'" > |
|
|
|
<el-form-item :label="'要求发料时间'" > |
|
|
|
<el-date-picker |
|
|
|
style="width: 165px" |
|
|
|
v-model="notifyOrderData.needDate" |
|
|
|
@ -267,7 +276,12 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item :label="'此次领料数量'" > |
|
|
|
<el-input v-model="notifyOrderData.issureQty" type="number" style="text-align: right" ></el-input> |
|
|
|
<el-input-number v-model="notifyOrderData.issureQty" style="padding: 0;width: 100%" :controls="false" :step="0" :min="0" ></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item :label="' '" > |
|
|
|
<el-button type="primary" @click="qtyAllForSeqNo()">全数领料</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
@ -277,7 +291,38 @@ |
|
|
|
<el-button type="primary" @click="saveSeqNoModalFlag=false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="变更BU" :close-on-click-modal="false" v-drag :visible.sync="changeBuFlag" width="350px"> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item :label="'工厂编码'" > |
|
|
|
<el-input v-model="notifyData.site" disabled ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item :label="'BU'" > |
|
|
|
<el-input v-model="notifyData.notifyNo" disabled ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item :label="'BU'" > |
|
|
|
<el-select v-model="newBu" placeholder="请选择" style="width: 100%"> |
|
|
|
<el-option |
|
|
|
v-for = "i in buList" |
|
|
|
:label = "i.buNo+' - '+i.buDesc" |
|
|
|
:value = "i.buNo"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center"> |
|
|
|
<el-button type="primary" @click="saveNewBu()">保存</el-button> |
|
|
|
<!-- <el-button type="primary" @click="ToSOS()">重新选择派工单</el-button>--> |
|
|
|
<el-button type="primary" @click="changeBuFlag=false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog title="申请明细" :close-on-click-modal="false" v-drag :visible.sync="materialModalFlag" width="800px"> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
@ -316,11 +361,21 @@ |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</div> |
|
|
|
<div v-else> |
|
|
|
<el-input-number v-model="scope.row.qtyToIssue" style="padding: 0;width: 100%" :controls="false"></el-input-number> |
|
|
|
<el-input-number v-model="scope.row.qtyToIssue" style="padding: 0;width: 100%" :step="0" :min="0" :controls="false"></el-input-number> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="50" |
|
|
|
label="项目编码"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" @click="qtyAllForBom(scope.row)" style="width: 100%">全数领料</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
@ -355,7 +410,8 @@ |
|
|
|
deleteNotifySOS, |
|
|
|
deleteNotify, |
|
|
|
xiadaNotify, |
|
|
|
|
|
|
|
updateNotifyBu, |
|
|
|
getBuByUserNameSite, |
|
|
|
}from "@/api/orderIssure/soIssueNotify.js" |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
|
export default { |
|
|
|
@ -372,9 +428,11 @@ |
|
|
|
}, |
|
|
|
data () { |
|
|
|
return { |
|
|
|
buList:[], |
|
|
|
notifyNo:'', |
|
|
|
notifyData:{ |
|
|
|
site:'', |
|
|
|
bu:'', |
|
|
|
notifyNo:'', |
|
|
|
notifyDate:'', |
|
|
|
enteredDate:'', |
|
|
|
@ -385,6 +443,8 @@ |
|
|
|
}, |
|
|
|
// 是否收藏 |
|
|
|
favorite: false, |
|
|
|
changeBuFlag: false, |
|
|
|
newBu:'', |
|
|
|
// 导出 start |
|
|
|
exportData: [], |
|
|
|
exportName: "设备分组" + this.dayjs().format('YYYYMMDDHHmmss'), |
|
|
|
@ -420,6 +480,7 @@ |
|
|
|
}, |
|
|
|
seqNoData:{ |
|
|
|
site: this.$store.state.user.site, |
|
|
|
bu:'', |
|
|
|
orderno:'', |
|
|
|
seqno:'', |
|
|
|
sResourceid:'', |
|
|
|
@ -995,9 +1056,20 @@ |
|
|
|
methods: { |
|
|
|
getBaseList (val,type) { |
|
|
|
this.tagNo = val |
|
|
|
let conSql='' |
|
|
|
this.$nextTick(() => { |
|
|
|
let strVal = '' |
|
|
|
|
|
|
|
if (val === 515) { |
|
|
|
strVal = this.seqNoData.sResourceid |
|
|
|
conSql = " and site = '" + this.notifyData.site + "'" + " and bu_no = '" + this.notifyData.bu + "'" |
|
|
|
this.$refs.baseList.init(val, strVal,conSql) |
|
|
|
} |
|
|
|
if (val === 216) { |
|
|
|
strVal = this.seqNoData.sWorkcenterno |
|
|
|
conSql = " and site = '" + this.notifyData.site + "'" + " and bu_no = '" + this.notifyData.bu + "'" |
|
|
|
this.$refs.baseList.init(val, strVal,conSql) |
|
|
|
} |
|
|
|
if (val === 215) { |
|
|
|
strVal = this.notifyOrderData.locationNo |
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
@ -1008,10 +1080,15 @@ |
|
|
|
|
|
|
|
// 列表方法的回调 |
|
|
|
getBaseData (val) { |
|
|
|
|
|
|
|
if (this.tagNo === 515) { |
|
|
|
this.seqNoData.sResourceid = val.resource_id |
|
|
|
} |
|
|
|
if (this.tagNo === 215) { |
|
|
|
this.notifyOrderData.locationNo = val.location_id |
|
|
|
} |
|
|
|
if (this.tagNo === 216) { |
|
|
|
this.seqNoData.sWorkcenterno = val.work_center_no |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
getUserNotifyNo(){ |
|
|
|
@ -1150,6 +1227,12 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
qtyAllForSeqNo(){ |
|
|
|
this.notifyOrderData.issureQty=this.notifyOrderData.qtyrequired |
|
|
|
}, |
|
|
|
qtyAllForBom(row){ |
|
|
|
row.qtyToIssue=row.qtyRequired |
|
|
|
}, |
|
|
|
enterSOSDetail(row){ |
|
|
|
let rows={ |
|
|
|
site:this.$store.state.user.site, |
|
|
|
@ -1193,6 +1276,7 @@ |
|
|
|
chooseSOSModal(){ |
|
|
|
this.seqNoData={ |
|
|
|
site: this.$store.state.user.site, |
|
|
|
bu:this.notifyData.bu, |
|
|
|
orderno:'', |
|
|
|
seqno:'', |
|
|
|
sResourceid:'', |
|
|
|
@ -1341,7 +1425,7 @@ |
|
|
|
return false |
|
|
|
} |
|
|
|
// if(this.notifyData.planIssueDate==null||this.notifyData.planIssueDate==''){ |
|
|
|
// this.$alert('请选择要求发料日期!!', '提示', { |
|
|
|
// this.$alert('请选择要求发料时间!!', '提示', { |
|
|
|
// confirmButtonText: '确定' |
|
|
|
// }) |
|
|
|
// return false |
|
|
|
@ -1376,8 +1460,47 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
updateBuModel(){ |
|
|
|
if(this.dataList.length>0){ |
|
|
|
this.$alert('已经选择了派工单,无法切换BU,请删除已选派工单!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
let inData={ |
|
|
|
site:this.notifyData.site, |
|
|
|
username:this.$store.state.user.name, |
|
|
|
} |
|
|
|
getBuByUserNameSite(inData).then(({data}) =>{ |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.buList=data.rows |
|
|
|
} |
|
|
|
}) |
|
|
|
this.newBu=this.notifyData.bu |
|
|
|
this.changeBuFlag=true |
|
|
|
}, |
|
|
|
saveNewBu(){ |
|
|
|
let inData={ |
|
|
|
bu:this.newBu, |
|
|
|
site:this.notifyData.site, |
|
|
|
notifyNo:this.notifyData.notifyNo, |
|
|
|
} |
|
|
|
updateNotifyBu(inData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.notifyData.bu=this.newBu |
|
|
|
this.changeBuFlag=false |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 删除 |
|
|
|
deleteNotifySOS (row) { |
|
|
|
this.$confirm(`是否删除这个派工单的申请信息?`, '提示', { |
|
|
|
|