|
|
|
@ -4,7 +4,8 @@ |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="20"> |
|
|
|
<el-button v-if="notifyNo===''" @click="addNotify()" type="primary" class="yzzButtonAn">新建申请单</el-button> |
|
|
|
<el-button v-if="notifyNo!=''" type="primary" @click="chooseSOSModal()" class="yzzButtonAn">选择SHIPMENT</el-button> |
|
|
|
<el-button v-if="notifyNo!=''" type="primary" @click="chooseSOSModal()" |
|
|
|
class="yzzButtonAn">选择SHIPMENT</el-button> |
|
|
|
<el-button v-if="notifyNo!=''" type="primary" @click="xiadaNotifyModel()" |
|
|
|
class="yzzButtonAn">下达申请单</el-button> |
|
|
|
<el-button v-if="notifyNo!=''" type="primary" @click="deleteNotify()" class="yzzButtonAn">删除申请单</el-button> |
|
|
|
@ -143,7 +144,8 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column fixed="left" header-align="center" align="center" width="80" label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" size="mini" plain class="choose-sos-btn" :loading="chooseLoading" @click="chooseSOS(scope.row)">选择</el-button> |
|
|
|
<el-button type="primary" size="mini" plain class="choose-sos-btn" :loading="chooseLoading" |
|
|
|
@click="chooseSOS(scope.row)">选择</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -173,7 +175,7 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item :label="'客户'"> |
|
|
|
<el-input v-model="notifyOrderData.addressName" disabled style="width: 204%" ></el-input> |
|
|
|
<el-input v-model="notifyOrderData.addressName" disabled style="width: 204%"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
@ -262,7 +264,8 @@ |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="item.columnProp === 'qtyToIssue'"> |
|
|
|
<el-input v-model="scope.row.qtyToIssue" style="height: 11px; width: 98%;" :step="0" :min="0"></el-input> |
|
|
|
<el-input v-model="scope.row.qtyToIssue" style="height: 11px; width: 98%;" :step="0" |
|
|
|
:min="0"></el-input> |
|
|
|
</div> |
|
|
|
<div v-else-if="item.columnProp === 'remark'"> |
|
|
|
<el-input v-model="scope.row.remark" style="padding: 0;width: 100%"></el-input> |
|
|
|
@ -452,7 +455,8 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="备注" class="issueNotify"> |
|
|
|
<el-input type="textarea" v-model="selectedNotifyRemark" :rows="3" placeholder="请输入内容" style="width: 100%"></el-input> |
|
|
|
<el-input type="textarea" v-model="selectedNotifyRemark" :rows="3" placeholder="请输入内容" |
|
|
|
style="width: 100%"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
@ -489,8 +493,7 @@ export default { |
|
|
|
components: { |
|
|
|
Chooselist, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
}, |
|
|
|
watch: {}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
activeName: 'sos', |
|
|
|
@ -955,7 +958,7 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100, |
|
|
|
}, |
|
|
|
/* { |
|
|
|
/* { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701001, |
|
|
|
serialNumber: '701001Table2SWorkcenterno', |
|
|
|
@ -1251,7 +1254,7 @@ export default { |
|
|
|
}, |
|
|
|
showAddNotifyTypeDialog: false, |
|
|
|
selectedNotifyType: 'production', |
|
|
|
selectedNotifyRemark:'', |
|
|
|
selectedNotifyRemark: '', |
|
|
|
chooseLoading: false, |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -1519,25 +1522,29 @@ export default { |
|
|
|
orderNo: row.SHIPMENT_ID, |
|
|
|
} |
|
|
|
this.chooseLoading = true |
|
|
|
getIFSShopOrderByOrderNo(inData).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
console.log("data",data); |
|
|
|
this.notifyOrderData.orderNo = data.shopOrderVo[0].SHIPMENT_ID |
|
|
|
this.notifyOrderData.shipmentType = data.shopOrderVo[0].SHIPMENT_TYPE |
|
|
|
this.notifyOrderData.status = data.shopOrderVo[0].STATE |
|
|
|
this.notifyOrderData.addressName = data.shopOrderVo[0].RECEIVER_ADDRESS_NAME |
|
|
|
this.notifyOrderData.needDate = data.shopOrderVo[0].PLANNED_SHIP_DATE |
|
|
|
this.notifyOrderData.deliveryDate = data.shopOrderVo[0].PLANNED_DELIVERY_DATE |
|
|
|
this.saveSeqNoModalFlag = true |
|
|
|
}else { |
|
|
|
this.$meassage.error(data.msg) |
|
|
|
return; |
|
|
|
} |
|
|
|
}).finally(() => { |
|
|
|
this.chooseLoading = false |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
getIFSShopOrderByOrderNo(inData) |
|
|
|
.then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
console.log('data', data) |
|
|
|
this.notifyOrderData.orderNo = data.shopOrderVo[0].SHIPMENT_ID |
|
|
|
this.notifyOrderData.shipmentType = |
|
|
|
data.shopOrderVo[0].SHIPMENT_TYPE |
|
|
|
this.notifyOrderData.status = data.shopOrderVo[0].STATE |
|
|
|
this.notifyOrderData.addressName = |
|
|
|
data.shopOrderVo[0].RECEIVER_ADDRESS_NAME |
|
|
|
this.notifyOrderData.needDate = |
|
|
|
data.shopOrderVo[0].PLANNED_SHIP_DATE |
|
|
|
this.notifyOrderData.deliveryDate = |
|
|
|
data.shopOrderVo[0].PLANNED_DELIVERY_DATE |
|
|
|
this.saveSeqNoModalFlag = true |
|
|
|
} else { |
|
|
|
this.$meassage.error(data.msg) |
|
|
|
return |
|
|
|
} |
|
|
|
}) |
|
|
|
.finally(() => { |
|
|
|
this.chooseLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
saveSOS() { |
|
|
|
if ( |
|
|
|
@ -1548,7 +1555,7 @@ export default { |
|
|
|
return false |
|
|
|
} |
|
|
|
let row = this.notifyOrderData |
|
|
|
console.log("row",row); |
|
|
|
console.log('row', row) |
|
|
|
if (this.dataList.length > 0) { |
|
|
|
let stop = false |
|
|
|
for (let i = 0; i < this.dataList.length; i++) { |
|
|
|
@ -1557,9 +1564,13 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
if (stop) { |
|
|
|
this.$alert('已经选择过此SHIPMENT,请返回点击明细直接操作!!', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
}) |
|
|
|
this.$alert( |
|
|
|
'已经选择过此SHIPMENT,请返回点击明细直接操作!!', |
|
|
|
'提示', |
|
|
|
{ |
|
|
|
confirmButtonText: '确定', |
|
|
|
} |
|
|
|
) |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1576,14 +1587,17 @@ export default { |
|
|
|
opsItemNo: row.itemNo, |
|
|
|
seqNo: row.seqNo, |
|
|
|
locationNo: row.locationNo, |
|
|
|
needDate: row.needDate+" 00:00", |
|
|
|
needDate: row.needDate + ' 00:00', |
|
|
|
unissureQty: row.unissureQty, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
saveShipmentOrderList(inData).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.saveSeqNoModalFlag = false |
|
|
|
row.itemNo = data.itemNo |
|
|
|
this.saveSeqNoModalFlag = false; |
|
|
|
(() => { |
|
|
|
// 同步代码块:赋值操作在此完成 |
|
|
|
row.itemNo = data.itemNo |
|
|
|
})() |
|
|
|
this.getNotifyNoDetail() |
|
|
|
this.enterSOS(row) |
|
|
|
} else { |
|
|
|
@ -1609,25 +1623,28 @@ export default { |
|
|
|
partNo: row.fgpartNo, |
|
|
|
itemNo: row.itemNo, |
|
|
|
} |
|
|
|
this.sobomData.orderNo = rows.soorderNo |
|
|
|
|
|
|
|
this.searchUnissueNotifyMaterialList(rows) |
|
|
|
//this.enterSOS(rows) |
|
|
|
}, |
|
|
|
searchUnissueNotifyMaterialList(row){ |
|
|
|
searchUnissueNotifyMaterialList(row) { |
|
|
|
this.bomLoadFlag = true |
|
|
|
this.materialModalFlag = true |
|
|
|
searchUnissueNotifyMaterialList(row).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.sobomList = data.rows |
|
|
|
} |
|
|
|
}).finally(() => { |
|
|
|
this.bomLoadFlag = false |
|
|
|
}) |
|
|
|
searchUnissueNotifyMaterialList(row) |
|
|
|
.then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.sobomList = data.rows |
|
|
|
} |
|
|
|
}) |
|
|
|
.finally(() => { |
|
|
|
this.bomLoadFlag = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
enterSOS(row) { |
|
|
|
console.log("row",row); |
|
|
|
|
|
|
|
console.log('row', row) |
|
|
|
|
|
|
|
this.seqNoModalFlag = false |
|
|
|
this.materialModalFlag = true |
|
|
|
this.sobomList = [] |
|
|
|
@ -1652,7 +1669,11 @@ export default { |
|
|
|
for (let i = 0; i < this.sobomList.length; i++) { |
|
|
|
this.sobomList[i].itemNo = inData.itemNo |
|
|
|
if (!this.sobomList[i].qtyToIssue) { |
|
|
|
this.$set(this.sobomList[i], 'qtyToIssue', this.sobomList[i].qtyOnHand) |
|
|
|
this.$set( |
|
|
|
this.sobomList[i], |
|
|
|
'qtyToIssue', |
|
|
|
this.sobomList[i].qtyOnHand |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1682,13 +1703,13 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
saveMaterialDetail() { |
|
|
|
|
|
|
|
for (let i = 0; i < this.sobomList.length; i++) { |
|
|
|
this.sobomList[i].notifyNo = this.notifyNo |
|
|
|
this.sobomList[i].site = this.$store.state.user.site |
|
|
|
this.sobomList[i].bomItemNo = this.sobomList[i].lineItemNo || this.sobomList[i].bomItemNo |
|
|
|
this.sobomList[i].bomItemNo = |
|
|
|
this.sobomList[i].lineItemNo || this.sobomList[i].bomItemNo |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let materialList = this.sobomList.filter((item) => item.qtyToIssue > 0) |
|
|
|
if (materialList.length == 0) { |
|
|
|
this.$alert('没有需要保存的内容!', '提示', { |
|
|
|
@ -1696,7 +1717,7 @@ export default { |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
console.log("this.sobomList",materialList); |
|
|
|
console.log('this.sobomList', materialList) |
|
|
|
saveShipmentMaterialDetail(materialList).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.materialModalFlag = false |
|
|
|
@ -1843,14 +1864,16 @@ export default { |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning', |
|
|
|
}).then(() => { |
|
|
|
updateNotifyStatus(this.notifyData).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.$message.success('下达成功') |
|
|
|
this.getUserNotifyNo() |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.$message.error(data.msg) |
|
|
|
}) |
|
|
|
updateNotifyStatus(this.notifyData) |
|
|
|
.then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.$message.success('下达成功') |
|
|
|
this.getUserNotifyNo() |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message.error(data.msg) |
|
|
|
}) |
|
|
|
}) |
|
|
|
/* checkPartStock(this.notifyData).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
@ -1928,13 +1951,9 @@ export default { |
|
|
|
}, |
|
|
|
updateBuModel() { |
|
|
|
if (this.dataList.length > 0) { |
|
|
|
this.$alert( |
|
|
|
'已经选择了工单,无法切换BU,请删除已选工单!', |
|
|
|
'错误', |
|
|
|
{ |
|
|
|
confirmButtonText: '确定', |
|
|
|
} |
|
|
|
) |
|
|
|
this.$alert('已经选择了工单,无法切换BU,请删除已选工单!', '错误', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
}) |
|
|
|
} |
|
|
|
let inData = { |
|
|
|
site: this.notifyData.site, |
|
|
|
@ -2103,7 +2122,6 @@ export default { |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
|
|
|
|
.board666 .el-table .error-row { |
|
|
|
background: #f86868; |
|
|
|
} |
|
|
|
@ -2133,9 +2151,9 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
.yzzTable /deep/.el-table .cell { |
|
|
|
line-height: 20px; |
|
|
|
font-size: 12px; |
|
|
|
height: 20px; |
|
|
|
line-height: 20px; |
|
|
|
font-size: 12px; |
|
|
|
height: 20px; |
|
|
|
} |
|
|
|
</style> |
|
|
|
<style scoped> |
|
|
|
|