diff --git a/src/api/orderIssure/soIssueNotify.js b/src/api/orderIssure/soIssueNotify.js
index a110ab3..2ed4da4 100644
--- a/src/api/orderIssure/soIssueNotify.js
+++ b/src/api/orderIssure/soIssueNotify.js
@@ -25,3 +25,7 @@ export const searchNotifyOrderList= data => createAPI(`/orderIssure/issureNotify
export const searchNotifyMaterialList= data => createAPI(`/orderIssure/issureNotify/searchNotifyMaterialList`,'post',data)
export const searchSumNotifyMaterialList= data => createAPI(`/orderIssure/issureNotify/searchSumNotifyMaterialList`,'post',data)
+
+export const updateNotifyBu= data => createAPI(`/orderIssure/issureNotify/updateNotifyBu`,'post',data)
+
+export const getBuByUserNameSite= data => createAPI(`/pms/eam/getBuByUserNameSite`,'post',data)
diff --git a/src/views/modules/orderIssure/soIssueNotify/newSoIssueNotify.vue b/src/views/modules/orderIssure/soIssueNotify/newSoIssueNotify.vue
index 1923540..9ac046b 100644
--- a/src/views/modules/orderIssure/soIssueNotify/newSoIssueNotify.vue
+++ b/src/views/modules/orderIssure/soIssueNotify/newSoIssueNotify.vue
@@ -7,6 +7,7 @@
选择派工单
下达申请单
删除申请单
+ 修改BU
@@ -32,22 +33,27 @@
-
+
-
+
+
+
+
+
+
-
+
-
+
@@ -64,7 +70,7 @@
-
+
@@ -135,12 +141,15 @@
-
+
+ 机台
+
-
+
+ 加工中心
@@ -249,7 +258,7 @@
-
+
-
+
+
+
+
+
+ 全数领料
@@ -277,7 +291,38 @@
关闭
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+
+ 关闭
+
+
@@ -316,11 +361,21 @@
-
+
+
+
+ 全数领料
+
+
@@ -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(`是否删除这个派工单的申请信息?`, '提示', {
diff --git a/src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue b/src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue
index 58cf813..1c7bc79 100644
--- a/src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue
+++ b/src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue
@@ -207,6 +207,7 @@
,searchNotifyOrderList
,searchNotifyMaterialList
,searchSumNotifyMaterialList
+
}from "@/api/orderIssure/soIssueNotify.js"
import Chooselist from '@/views/modules/common/Chooselist'
export default {
@@ -229,8 +230,8 @@
site:this.$store.state.user.site,
userName: '',
notifyNo: '',
- startDate: '',
- endDate: '',
+ startDate: this.dayjs().format("YYYY-MM-DD"),
+ endDate: this.dayjs().format("YYYY-MM-DD"),
},
exportList:[],
@@ -267,7 +268,7 @@
columnProp: "notifyDate",
headerAlign: "center",
align: "center",
- columnLabel: "申请时间",
+ columnLabel: "申请日期",
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -423,14 +424,14 @@
columnProp: "itemNo",
headerAlign: "center",
align: "right",
- columnLabel: "申请单序号",
+ columnLabel: "序号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 60
+ columnWidth: 40
},{
userId: this.$store.state.user.name,
functionId: 701002,
@@ -532,7 +533,7 @@
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 120
+ columnWidth: 200
},
{
userId: this.$store.state.user.name,