diff --git a/src/api/shipment/shipmentIssue.js b/src/api/shipment/shipmentIssue.js
index 57ae4ce..68553f4 100644
--- a/src/api/shipment/shipmentIssue.js
+++ b/src/api/shipment/shipmentIssue.js
@@ -52,6 +52,10 @@ export const searchNotifyMaterialList = data => createAPI(`/shipmentIssue/search
export const closeInboundNotification = data => createAPI(`/shipmentIssue/closeInboundNotification`,'post',data)
+export const getShipmentAndLineForIssure = data => createAPI(`/shipmentIssue/getShipmentAndLineForIssure`,'post',data)
+
+export const saveNewShipmentAndLine = data => createAPI(`/shipmentIssue/saveNewShipmentAndLine`,'post',data)
+
// ================== rqrq - 发货通知单取消下达功能接口 ==================
// 检查用户是否有未下达的shipment申请单 - rqrq
@@ -64,4 +68,4 @@ export const cancelIssueShipment = data => createAPI(`/shipmentIssue/cancelIssue
export const checkShipmentInventory = data => createAPI(`/shipmentIssue/checkShipmentInventory`,'post',data)
// 推送发货通知单库存预览数据至WCS - rqrq
-export const pushShipmentInventoryToWcs = data => createAPI(`/shipmentIssue/pushShipmentInventoryToWcs`,'post',data)
\ No newline at end of file
+export const pushShipmentInventoryToWcs = data => createAPI(`/shipmentIssue/pushShipmentInventoryToWcs`,'post',data)
diff --git a/src/views/modules/orderIssure/inboundNotification.vue b/src/views/modules/orderIssure/inboundNotification.vue
index 1f7f740..1b7ca40 100644
--- a/src/views/modules/orderIssure/inboundNotification.vue
+++ b/src/views/modules/orderIssure/inboundNotification.vue
@@ -36,7 +36,7 @@
- 查询
+ 查询
diff --git a/src/views/modules/orderIssure/searchIssureNotify.vue b/src/views/modules/orderIssure/searchIssureNotify.vue
index bf8d071..eae93e7 100644
--- a/src/views/modules/orderIssure/searchIssureNotify.vue
+++ b/src/views/modules/orderIssure/searchIssureNotify.vue
@@ -307,12 +307,14 @@
prop="componentPartNo"
label="物料编码"
sortable
+ headerAlign="center"
width="120"
align="left">
@@ -320,12 +322,14 @@
@@ -336,6 +340,7 @@
diff --git a/src/views/modules/shipment/shipmentIssue.vue b/src/views/modules/shipment/shipmentIssue.vue
index de24441..c0354c8 100644
--- a/src/views/modules/shipment/shipmentIssue.vue
+++ b/src/views/modules/shipment/shipmentIssue.vue
@@ -115,18 +115,18 @@
-->
-
+
-
+
- 查询
-
+ 添加
+ 删除
@@ -137,19 +137,24 @@
:align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
:label="item.columnLabel">
- {{ scope.row[item.columnProp] }}
+
+
+
+ {{ scope.row[item.columnProp] }}
-
+
+ 保存
关闭
@@ -288,7 +293,7 @@
保存
-
+
@@ -466,6 +471,35 @@
取消
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 下达
+ 取消
+
+
@@ -485,8 +519,11 @@ import {
saveShipmentMaterialDetail,
updateNotifyStatus,
deleteUnissueNotifyHeader,
+ getShipmentAndLineForIssure,
+ saveNewShipmentAndLine,
} from '@/api/shipment/shipmentIssue.js'
import Chooselist from '@/views/modules/common/Chooselist_eam'
+import { get } from 'lodash'
export default {
name: 'shipmentIssue',
@@ -675,7 +712,7 @@ export default {
tableName: '领料申请工单子表',
columnProp: 'itemNo',
headerAlign: 'center',
- align: 'right',
+ align: 'center',
columnLabel: '序号',
columnHidden: false,
columnImage: false,
@@ -798,10 +835,10 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 701001,
- serialNumber: '701001Table2Orderno',
+ serialNumber: '701001Table2ShipmentId',
tableId: '701001Table2',
tableName: '查询派工单',
- columnProp: 'SHIPMENT_ID',
+ columnProp: 'shipmentId',
headerAlign: 'center',
align: 'center',
columnLabel: 'SHIPMENTID',
@@ -811,145 +848,144 @@ export default {
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 120,
+ columnWidth: 100,
},
- /* {
+ {
userId: this.$store.state.user.name,
functionId: 701001,
- serialNumber: '701001Table2Itemno',
+ serialNumber: '701001Table2InventoryUom',
tableId: '701001Table2',
tableName: '查询派工单',
- columnProp: 'itemNo',
+ columnProp: 'inventoryUom',
headerAlign: 'center',
- align: 'right',
- columnLabel: '工序',
+ align: 'center',
+ columnLabel: '单位',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 50,
+ columnWidth: 60,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
- serialNumber: '701001Table2ItemDesc',
+ serialNumber: '701001Table2InventoryPartNo',
tableId: '701001Table2',
tableName: '查询派工单',
- columnProp: 'itemDesc',
+ columnProp: 'inventoryPartNo',
headerAlign: 'center',
align: 'left',
- columnLabel: '工序名称',
+ columnLabel: '库存物料号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 100,
- }, */
+ columnWidth: 120,
+ },
{
userId: this.$store.state.user.name,
functionId: 701001,
- serialNumber: '701001Table2PartNo',
+ serialNumber: '701001Table2ShipmentLineNo',
tableId: '701001Table2',
tableName: '查询派工单',
- columnProp: 'STATE',
+ columnProp: 'shipmentLineNo',
headerAlign: 'center',
- align: 'left',
- columnLabel: '状态',
+ align: 'right',
+ columnLabel: '行号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 80,
+ columnWidth: 60,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
- serialNumber: '701001Table2PartNo',
+ serialNumber: '701001Table2InventoryQty',
tableId: '701001Table2',
tableName: '查询派工单',
- columnProp: 'RECEIVER_ADDRESS_NAME',
+ columnProp: 'inventoryQty',
headerAlign: 'center',
- align: 'left',
- columnLabel: '客户',
+ align: 'right',
+ columnLabel: '库存数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 120,
- showOverflowTooltip: true,
+ columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
- serialNumber: '701001Table2Qtyrequired',
+ serialNumber: '701001Table2QtyAssigned',
tableId: '701001Table2',
tableName: '查询派工单',
- columnProp: 'SHIPMENT_TYPE',
+ columnProp: 'qtyAssigned',
headerAlign: 'center',
- align: 'center',
- columnLabel: 'SHIPMENT类型',
+ align: 'right',
+ columnLabel: '已分配数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 80,
+ columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
- serialNumber: '701001Table2Qtyreported',
+ serialNumber: '701001Table2QtyToApply',
tableId: '701001Table2',
tableName: '查询派工单',
- columnProp: 'CREATED_DATE',
+ columnProp: 'qtyToApply',
headerAlign: 'center',
- align: 'left',
- columnLabel: '创建时间',
+ align: 'right',
+ columnLabel: '本次申请数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 80,
+ columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
- serialNumber: '701001Table2SScheduleddate',
+ serialNumber: '701001Table2State',
tableId: '701001Table2',
- tableName: '查询工单',
- columnProp: 'PLANNED_SHIP_DATE',
+ tableName: '查询派工单',
+ columnProp: 'state',
headerAlign: 'center',
align: 'left',
- columnLabel: '计划运输时间',
+ columnLabel: '状态',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 100,
+ columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
- serialNumber: '701001Table2SScheduleddate',
+ serialNumber: '701001Table2NextStepFlow',
tableId: '701001Table2',
- tableName: '查询工单',
- columnProp: 'PLANNED_DELIVERY_DATE',
+ tableName: '查询派工单',
+ columnProp: 'nextStepFlow',
headerAlign: 'center',
align: 'left',
- columnLabel: '计划交付时间',
+ columnLabel: '下一步流程',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -958,70 +994,71 @@ export default {
fixed: '',
columnWidth: 100,
},
- /* {
+ {
userId: this.$store.state.user.name,
functionId: 701001,
- serialNumber: '701001Table2SWorkcenterno',
+ serialNumber: '701001Table2ReceiverType',
tableId: '701001Table2',
tableName: '查询派工单',
- columnProp: 'sWorkCenterNo',
+ columnProp: 'receiverType',
headerAlign: 'center',
align: 'left',
- columnLabel: '加工中心编码',
+ columnLabel: '接收方类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 80,
+ columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
- serialNumber: '701001Table2WorkCenterDesc',
+ serialNumber: '701001Table2ReceiverAddressName',
tableId: '701001Table2',
- tableName: '查询工单',
- columnProp: 'workCenterDesc',
+ tableName: '查询派工单',
+ columnProp: 'receiverAddressName',
headerAlign: 'center',
align: 'left',
- columnLabel: '加工中心名称',
+ columnLabel: '接收方地址名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 100,
+ columnWidth: 150,
+ showOverflowTooltip: true,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
- serialNumber: '701001Table2SResourceid',
+ serialNumber: '701001Table2ShipmentType',
tableId: '701001Table2',
tableName: '查询派工单',
- columnProp: 'sResourceID',
+ columnProp: 'shipmentType',
headerAlign: 'center',
- align: 'left',
- columnLabel: '机台编码',
+ align: 'center',
+ columnLabel: '运输类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 60,
+ columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
- serialNumber: '701001Table2ResourceDesc',
+ serialNumber: '701001Table2PlannedShipDate',
tableId: '701001Table2',
tableName: '查询派工单',
- columnProp: 'resourceDesc',
+ columnProp: 'plannedShipDate',
headerAlign: 'center',
- align: 'left',
- columnLabel: '机台名称',
+ align: 'center',
+ columnLabel: '计划运输时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1033,13 +1070,13 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 701001,
- serialNumber: '701001Table2OperatorDesc',
+ serialNumber: '701001Table2PlannedDeliveryDate',
tableId: '701001Table2',
tableName: '查询派工单',
- columnProp: 'operatorDesc',
+ columnProp: 'plannedDeliveryDate',
headerAlign: 'center',
- align: 'left',
- columnLabel: '操作员',
+ align: 'center',
+ columnLabel: '计划交付时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1047,7 +1084,7 @@ export default {
status: true,
fixed: '',
columnWidth: 100,
- },*/
+ },
],
columnList3: [
{
@@ -1062,7 +1099,7 @@ export default {
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
- columnSortable: false,
+ columnSortable: true,
sortLv: 0,
status: true,
fixed: '',
@@ -1256,13 +1293,20 @@ export default {
selectedNotifyType: 'production',
selectedNotifyRemark: '',
chooseLoading: false,
+ seqNoModalLoading: false,
+ saveNewLoading: false,
+ showXiadaNotifyDialog: false,
+ xiadaNotifyData: {
+ planIssueDate: '',
+ remark: '',
+ },
}
},
mounted() {
- /* this.$nextTick(() => {
- this.height = window.innerHeight - 300
- }) */
+ this.$nextTick(() => {
+ this.height = window.innerHeight - 230
+ })
},
created() {
@@ -1546,6 +1590,45 @@ export default {
this.chooseLoading = false
})
},
+ saveNewSoIssueNotify() {
+ for (let i = 0; i < this.seqNoList.length; i++) {
+ if (
+ this.seqNoList[i].qtyToApply === '' ||
+ this.seqNoList[i].qtyToApply == null
+ ) {
+ this.seqNoList[i].qtyToApply = 0
+ }
+ this.seqNoList[i].notifyNo = this.notifyNo
+ this.seqNoList[i].site = this.$store.state.user.site
+ }
+
+ let materialList = this.seqNoList.filter((item) => item.qtyToApply > 0)
+ if (materialList.length == 0) {
+ this.$alert('没有需要保存的内容!', '提示', {
+ confirmButtonText: '确定',
+ })
+ return false
+ }
+ console.log('this.sobomList', materialList)
+ var savaNotify = {
+ site: this.$store.state.user.site,
+ notifyNo: this.notifyNo,
+ userName: this.$store.state.user.name,
+ materialList: materialList,
+ }
+ this.saveNewLoading = true
+ saveNewShipmentAndLine(savaNotify).then(({ data }) => {
+ if (data.code === 0) {
+ this.seqNoModalFlag = false
+ this.getUserNotifyNo()
+ this.$message.success('操作成功')
+ } else {
+ this.$message.error(data.msg)
+ }
+ }).finally(() => {
+ this.saveNewLoading = false
+ })
+ },
saveSOS() {
if (
this.notifyOrderData.needDate == null ||
@@ -1593,8 +1676,8 @@ export default {
saveShipmentOrderList(inData).then(({ data }) => {
if (data.code === 0) {
- this.saveSeqNoModalFlag = false;
- (() => {
+ this.saveSeqNoModalFlag = false
+ ;(() => {
// 同步代码块:赋值操作在此完成
row.itemNo = data.itemNo
})()
@@ -1693,14 +1776,74 @@ export default {
operatorId: '',
}
//this.searchSOSRouting()查询工单列表
+ this.seqNoList = []
this.seqNoModalFlag = true
},
searchSOSRouting() {
- getShipmentListForIssure(this.seqNoData).then(({ data }) => {
+ if (this.seqNoData.orderNo == null || this.seqNoData.orderNo == '') {
+ this.$message.warning('请输入shipmentid!')
+ return false
+ }
+ if (!this.seqNoList) {
+ this.seqNoList = []
+ }
+ // 调用接口前判断this.seqNoList是否存在orderNo
+ const orderNoExists = this.seqNoList.some(row => row.shipmentId === this.seqNoData.orderNo)
+ if (orderNoExists) {
+ this.$message.warning('该shipmentId的数据已存在,请先删除再添加!')
+ return false
+ }
+
+ const dataListExists = this.dataList.some(row => row.soorderNo === this.seqNoData.orderNo)
+ if (dataListExists) {
+ this.$message.warning('该shipmentId的数据已添加过,请先删除再添加!')
+ return false
+ }
+ this.seqNoModalLoading = true
+ getShipmentAndLineForIssure(this.seqNoData).then(({ data }) => {
if (data.code === 0) {
- this.seqNoList = data.rows
- }
+ // 将返回的数据添加到this.seqNoList中,而不是替换
+ data.rows.forEach((newRow) => {
+ // 初始化每行的需求数量(需求数量 - 已发数量 - 预留数量)
+ const inventoryQty = parseFloat(newRow.inventoryQty) || 0
+ const qtyAssigned = parseFloat(newRow.qtyAssigned) || 0
+ const qtyToApply = inventoryQty - qtyAssigned
+ this.$set(
+ newRow,
+ 'qtyToApply',
+ qtyToApply > 0 ? qtyToApply : 0
+ )
+ // 添加到列表中
+ this.seqNoList.push(newRow)
+ })
+ this.$message.success(`成功添加 ${data.rows.length} 条数据`)
+ }else {
+ this.$message.error(data.msg)
+ }
+ }).catch((e) => {
+ this.$message.error(e.msg || '查询失败')
+ return
+ }).finally(() => {
+ this.seqNoModalLoading = false
+ })
+ },
+ deleteFromSeqNoList() {
+ if (!this.seqNoData.orderNo || this.seqNoData.orderNo.trim() === '') {
+ this.$message.warning('请输入shipmentId')
+ return
+ }
+ const orderNo = this.seqNoData.orderNo.trim()
+ const originalLength = this.seqNoList.length
+ // 过滤掉 shipmentId 和 orderNo 相同的数据
+ this.seqNoList = this.seqNoList.filter((item) => {
+ return item.shipmentId !== orderNo
})
+ const deletedCount = originalLength - this.seqNoList.length
+ if (deletedCount > 0) {
+ this.$message.success(`成功删除 ${deletedCount} 条数据`)
+ } else {
+ this.$message.warning('未找到匹配的数据')
+ }
},
saveMaterialDetail() {
for (let i = 0; i < this.sobomList.length; i++) {
@@ -1721,7 +1864,6 @@ export default {
saveShipmentMaterialDetail(materialList).then(({ data }) => {
if (data.code === 0) {
this.materialModalFlag = false
- this.chooseSOSModal()
this.$message.success('操作成功')
} else {
this.$alert(data.msg, '错误', {
@@ -1849,38 +1991,56 @@ export default {
})
},
xiadaNotifyModel() {
+ // 检查是否有明细记录
if (
- this.dataList.length == 0 &&
- this.dataList2.length == 0 &&
- this.dataList3.length == 0
+ this.dataList.length == 0
) {
this.$alert('没有明细记录无法下达!!', '提示', {
confirmButtonText: '确定',
})
return false
}
- this.$confirm('确定下达' + '?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- }).then(() => {
- 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 }) => {
+ // 初始化弹框数据
+ this.xiadaNotifyData = {
+ planIssueDate: this.notifyData.planIssueDate || this.dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ remark: this.notifyData.remark || '',
+ }
+ // 打开弹框
+ this.showXiadaNotifyDialog = true
+ },
+ confirmXiadaNotify() {
+ if (
+ this.dataList.length == 0
+ ) {
+ this.$alert('没有明细记录无法下达!!', '提示', {
+ confirmButtonText: '确定',
+ })
+ return false
+ }
+ // 验证要求发料时间
+ if (!this.xiadaNotifyData.planIssueDate || this.xiadaNotifyData.planIssueDate === '') {
+ this.$message.warning('请选择要求发料时间!')
+ return false
+ }
+ // 准备下达数据
+ const notifyData = {
+ ...this.notifyData,
+ planIssueDate: this.xiadaNotifyData.planIssueDate,
+ remark: this.xiadaNotifyData.remark,
+ }
+ // 执行下达操作
+ updateNotifyStatus(notifyData).then(({ data }) => {
if (data.code === 0) {
- this.xiadaList = data.rows
+ this.showXiadaNotifyDialog = false
+ this.xiadaModelFlag = false
+ this.getUserNotifyNo()
+ this.$message.success('操作成功')
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定',
+ })
}
- }) */
- //this.xiadaModelFlag = true
+ })
},
xiadaNotify() {
xiadaNotify(this.notifyData).then(({ data }) => {
@@ -2155,6 +2315,9 @@ export default {
font-size: 12px;
height: 20px;
}
+.qtyToApplyClass /deep/.el-input__inner {
+ height: 14px !important;
+}