-
+
@@ -286,6 +304,35 @@
关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 下达
+ 取消
+
+
@@ -300,7 +347,8 @@
-
+
@@ -328,6 +376,9 @@ import {
deleteNotifySOS,
getIFSShopOrderByOrderNo,
searchNotifyMaterialList,
+ getShopOrderAndMaterialByShoporder,
+ saveNewSoIssueNotify,
+ searchNotifyMaterialListNew,
} from '@/api/orderIssure/soIssueNotify.js'
import Chooselist from '@/views/modules/common/Chooselist_eam'
import walUploadExcel from './walmart_upload_excel.vue'
@@ -335,9 +386,9 @@ import {
getShopOrderFromIFSWithOrderNo,
getSOSBOMForIssureNew,
searchOtherPart,
- xiadaNotify
+ xiadaNotify,
} from '../../../api/orderIssure/soIssueNotify'
-import {getTableUserListLanguage} from '../../../api/table'
+import { getTableUserListLanguage } from '../../../api/table'
export default {
name: 'newSoIssueNotify',
@@ -375,6 +426,10 @@ export default {
},
dataList2: [],
dataList3: [],
+ materialDetailList: [],
+ materialDetailColumnList: [],
+ currentRow: '',
+ dataListLoading: false,
// 是否收藏
favorite: false,
changeBuFlag: false,
@@ -444,9 +499,9 @@ export default {
columnList4: [
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table4ComponentPartNo',
- tableId: '701001Table4',
+ functionId: 555001,
+ serialNumber: '555001Table4ComponentPartNo',
+ tableId: '555001Table4',
tableName: '非BOM材料明细',
columnProp: 'componentPartNo',
headerAlign: 'center',
@@ -462,9 +517,9 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table4PartDesc',
- tableId: '701001Table4',
+ functionId: 555001,
+ serialNumber: '555001Table4PartDesc',
+ tableId: '555001Table4',
tableName: '非BOM材料明细',
columnProp: 'partDesc',
headerAlign: 'center',
@@ -480,9 +535,9 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table4QtyToIssue',
- tableId: '701001Table4',
+ functionId: 555001,
+ serialNumber: '555001Table4QtyToIssue',
+ tableId: '555001Table4',
tableName: '非BOM材料明细',
columnProp: 'qtyToIssue',
headerAlign: 'center',
@@ -498,9 +553,9 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table4Remark',
- tableId: '701001Table4',
+ functionId: 555001,
+ serialNumber: '555001Table4Remark',
+ tableId: '555001Table4',
tableName: '非BOM材料明细',
columnProp: 'remark',
headerAlign: 'center',
@@ -529,9 +584,9 @@ export default {
columnList: [
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table1ItemNo',
- tableId: '701001Table1',
+ functionId: 555001,
+ serialNumber: '555001Table1ItemNo',
+ tableId: '555001Table1',
tableName: '领料申请工单子表',
columnProp: 'itemNo',
headerAlign: 'center',
@@ -547,9 +602,9 @@ export default {
},
/* {
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table1SeqNo',
- tableId: '701001Table1',
+ functionId: 555001,
+ serialNumber: '555001Table1SeqNo',
+ tableId: '555001Table1',
tableName: '领料申请派工单子表',
columnProp: 'seqNo',
headerAlign: 'center',
@@ -565,9 +620,9 @@ export default {
}, */
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table1SOOrderNo',
- tableId: '701001Table1',
+ functionId: 555001,
+ serialNumber: '555001Table1SOOrderNo',
+ tableId: '555001Table1',
tableName: '领料申请工单子表',
columnProp: 'soorderNo',
headerAlign: 'center',
@@ -583,9 +638,9 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table1ReleaseNo',
- tableId: '701001Table1',
+ functionId: 555001,
+ serialNumber: '555001Table1ReleaseNo',
+ tableId: '555001Table1',
tableName: '领料申请工单子表',
columnProp: 'releaseNo',
headerAlign: 'center',
@@ -601,9 +656,9 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table1SequenceNo',
- tableId: '701001Table1',
+ functionId: 555001,
+ serialNumber: '555001Table1SequenceNo',
+ tableId: '555001Table1',
tableName: '领料申请工单子表',
columnProp: 'sequenceNo',
headerAlign: 'center',
@@ -619,9 +674,9 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table1FgPartNo',
- tableId: '701001Table1',
+ functionId: 555001,
+ serialNumber: '555001Table1FgPartNo',
+ tableId: '555001Table1',
tableName: '领料申请工单子表',
columnProp: 'fgPartNo',
headerAlign: 'center',
@@ -637,9 +692,9 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table1NeedDate',
- tableId: '701001Table1',
+ functionId: 555001,
+ serialNumber: '555001Table1NeedDate',
+ tableId: '555001Table1',
tableName: '领料申请派工单子表',
columnProp: 'needDate',
headerAlign: 'center',
@@ -657,10 +712,10 @@ export default {
columnList2: [
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table2OrderNo',
- tableId: '701001Table2',
- tableName: '查询派工单',
+ functionId: 555001,
+ serialNumber: '555001Table2OrderNo',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
columnProp: 'orderNo',
headerAlign: 'center',
align: 'center',
@@ -671,14 +726,14 @@ export default {
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 130,
+ columnWidth: 100,
},
- {
+ /* {
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table2ReleaseNo',
- tableId: '701001Table2',
- tableName: '查询派工单',
+ functionId: 555001,
+ serialNumber: '555001Table2ReleaseNo',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
columnProp: 'releaseNo',
headerAlign: 'center',
align: 'center',
@@ -689,14 +744,14 @@ export default {
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 80,
+ columnWidth: 100,
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table2SequenceNo',
- tableId: '701001Table2',
- tableName: '查询派工单',
+ functionId: 555001,
+ serialNumber: '555001Table2SequenceNo',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
columnProp: 'sequenceNo',
headerAlign: 'center',
align: 'center',
@@ -708,17 +763,17 @@ export default {
status: true,
fixed: false,
columnWidth: 80,
- },
+ }, */
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table2Status',
- tableId: '701001Table2',
- tableName: '查询派工单',
- columnProp: 'status',
+ functionId: 555001,
+ serialNumber: '555001Table2LineItemNo',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
+ columnProp: 'lineItemNo',
headerAlign: 'center',
- align: 'center',
- columnLabel: '状态',
+ align: 'right',
+ columnLabel: '行号',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -727,16 +782,34 @@ export default {
fixed: false,
columnWidth: 70,
},
+ /* {
+ userId: this.$store.state.user.name,
+ functionId: 555001,
+ serialNumber: '555001Table2Contract',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
+ columnProp: 'contract',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: '合同',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: false,
+ columnWidth: 100,
+ }, */
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table2LotSize',
- tableId: '701001Table2',
- tableName: '查询派工单',
- columnProp: 'lotSize',
+ functionId: 555001,
+ serialNumber: '555001Table2MaterialLineStatus',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
+ columnProp: 'materialLineStatus',
headerAlign: 'center',
- align: 'right',
- columnLabel: '订单数量',
+ align: 'left',
+ columnLabel: '物料行状态',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -747,14 +820,14 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table2QtyComplete',
- tableId: '701001Table2',
- tableName: '查询派工单',
- columnProp: 'qtyComplete',
+ functionId: 555001,
+ serialNumber: '555001Table2ComponentPartNo',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
+ columnProp: 'componentPartNo',
headerAlign: 'center',
- align: 'center',
- columnLabel: '完成数量',
+ align: 'left',
+ columnLabel: '物料号',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -765,14 +838,33 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table2PartNo',
- tableId: '701001Table2',
- tableName: '查询派工单',
- columnProp: 'partNo',
+ functionId: 555001,
+ serialNumber: '555001Table2ComponentPartDesc',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
+ columnProp: 'componentPartDesc',
headerAlign: 'center',
- align: 'center',
- columnLabel: '物料编码',
+ align: 'left',
+ columnLabel: '物料描述',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: false,
+ columnWidth: 180,
+ showOverflowTooltip: true,
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 555001,
+ serialNumber: '555001Table2ApplyQty',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
+ columnProp: 'applyQty',
+ headerAlign: 'center',
+ align: 'right',
+ columnLabel: '本次申请数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -781,157 +873,177 @@ export default {
fixed: false,
columnWidth: 100,
},
+
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table2PartDesc',
- tableId: '701001Table2',
- tableName: '查询派工单',
- columnProp: 'partDesc',
+ functionId: 555001,
+ serialNumber: '555001Table2QtyIssued',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
+ columnProp: 'qtyIssued',
headerAlign: 'center',
- align: 'center',
- columnLabel: '物料描述',
+ align: 'right',
+ columnLabel: '已发数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 200,
+ columnWidth: 100,
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table2Uom',
- tableId: '701001Table2',
- tableName: '查询派工单',
- columnProp: 'uom',
+ functionId: 555001,
+ serialNumber: '555001Table2QtyRequired',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
+ columnProp: 'qtyRequired',
headerAlign: 'center',
- align: 'center',
- columnLabel: '单位',
+ align: 'right',
+ columnLabel: '需求数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 80,
+ columnWidth: 100,
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table2StartDate',
- tableId: '701001Table2',
- tableName: '查询派工单',
- columnProp: 'startDate',
+ functionId: 555001,
+ serialNumber: '555001Table2QtyReserved',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
+ columnProp: 'qtyReserved',
headerAlign: 'center',
- align: 'center',
- columnLabel: '开始生产日期',
+ align: 'right',
+ columnLabel: '预留数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 110,
+ columnWidth: 100,
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table2FinishDate',
- tableId: '701001Table2',
- tableName: '查询派工单',
- columnProp: 'finishDate',
+ functionId: 555001,
+ serialNumber: '555001Table2Uom',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
+ columnProp: 'uom',
headerAlign: 'center',
align: 'center',
- columnLabel: '结束生产日期',
+ columnLabel: '单位',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 110,
+ columnWidth: 80,
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table2NeedDate',
- tableId: '701001Table2',
- tableName: '查询派工单',
- columnProp: 'needDate',
+ functionId: 555001,
+ serialNumber: '555001Table2PartNo',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
+ columnProp: 'partNo',
headerAlign: 'center',
align: 'center',
- columnLabel: '需求日期',
+ columnLabel: '产品编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 110,
+ columnWidth: 120,
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table2Contract',
- tableId: '701001Table2',
- tableName: '查询派工单',
- columnProp: 'contract',
+ functionId: 555001,
+ serialNumber: '555001Table2PartDesc',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
+ columnProp: 'partDesc',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: '产品名称',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: false,
+ columnWidth: 180,
+ showOverflowTooltip: true,
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 555001,
+ serialNumber: '555001Table2StartDate',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
+ columnProp: 'startDate',
headerAlign: 'center',
align: 'center',
- columnLabel: '合同号',
+ columnLabel: '开始日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 100,
+ columnWidth: 110,
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table2CloseCode',
- tableId: '701001Table2',
- tableName: '查询派工单',
- columnProp: 'closeCode',
+ functionId: 555001,
+ serialNumber: '555001Table2FinishDate',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
+ columnProp: 'finishDate',
headerAlign: 'center',
align: 'center',
- columnLabel: '关闭代码',
+ columnLabel: '完成日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 120,
+ columnWidth: 110,
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table2Objstate',
- tableId: '701001Table2',
- tableName: '查询派工单',
- columnProp: 'objstate',
+ functionId: 555001,
+ serialNumber: '555001Table2NeedDate',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
+ columnProp: 'needDate',
headerAlign: 'center',
align: 'center',
- columnLabel: 'objstate',
+ columnLabel: '需求日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 100,
- }
+ columnWidth: 110,
+ },
],
columnList3: [
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table3ComponentPartNo',
- tableId: '701001Table3',
+ functionId: 555001,
+ serialNumber: '555001Table3ComponentPartNo',
+ tableId: '555001Table3',
tableName: '领料申请BOM子表',
columnProp: 'componentPartNo',
headerAlign: 'center',
@@ -947,9 +1059,9 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table3PartDesc',
- tableId: '701001Table3',
+ functionId: 555001,
+ serialNumber: '555001Table3PartDesc',
+ tableId: '555001Table3',
tableName: '领料申请BOM子表',
columnProp: 'componentPartDesc',
headerAlign: 'center',
@@ -965,9 +1077,9 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table3QtyRequired',
- tableId: '701001Table3',
+ functionId: 555001,
+ serialNumber: '555001Table3QtyRequired',
+ tableId: '555001Table3',
tableName: '领料申请BOM子表',
columnProp: 'qtyRequired',
headerAlign: 'center',
@@ -983,9 +1095,9 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table3QtyToIssue',
- tableId: '701001Table3',
+ functionId: 555001,
+ serialNumber: '555001Table3QtyToIssue',
+ tableId: '555001Table3',
tableName: '领料申请BOM子表',
columnProp: 'qtyToIssue',
headerAlign: 'center',
@@ -1001,9 +1113,9 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 701001,
- serialNumber: '701001Table3Remark',
- tableId: '701001Table3',
+ functionId: 555001,
+ serialNumber: '555001Table3Remark',
+ tableId: '555001Table3',
tableName: '领料申请BOM子表',
columnProp: 'remark',
headerAlign: 'center',
@@ -1018,6 +1130,162 @@ export default {
columnWidth: 150,
},
],
+ materialDetailColumnList: [
+ {
+ userId: this.$store.state.user.name,
+ functionId: 701002,
+ serialNumber: '701002Table3ItemNo',
+ tableId: "701002Table3",
+ tableName: "申请单材料明细表",
+ columnProp: "itemNo",
+ headerAlign: "center",
+ align: "right",
+ columnLabel: "申请单序号",
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },{
+ userId: this.$store.state.user.name,
+ functionId: 701002,
+ serialNumber: '701002Table3ComponentPartNo',
+ tableId: "701002Table3",
+ tableName: "申请单材料明细表",
+ columnProp: "componentPartNo",
+ headerAlign: "center",
+ align: "center",
+ columnLabel: "材料编码",
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },{
+ userId: this.$store.state.user.name,
+ functionId: 701002,
+ serialNumber: '701002Table3NeedDate',
+ tableId: "701002Table3",
+ tableName: "申请单材料明细表",
+ columnProp: "needDate",
+ headerAlign: "center",
+ align: "center",
+ columnLabel: "需求时间",
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 110
+ },{
+ userId: this.$store.state.user.name,
+ functionId: 701002,
+ serialNumber: '701002Table3QtyToIssue',
+ tableId: "701002Table3",
+ tableName: "申请单材料明细表",
+ columnProp: "qtyToIssue",
+ headerAlign: "center",
+ align: "right",
+ columnLabel: "申请数量",
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },{
+ userId: this.$store.state.user.name,
+ functionId: 701002,
+ serialNumber: '701002Table3QtyToIssueOriginal',
+ tableId: "701002Table3",
+ tableName: "申请单材料明细表",
+ columnProp: "qtyToIssueOriginal",
+ headerAlign: "center",
+ align: "right",
+ columnLabel: "已发数量",
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },{
+ userId: this.$store.state.user.name,
+ functionId: 701002,
+ serialNumber: '701002Table3IssueType',
+ tableId: "701002Table3",
+ tableName: "申请单材料明细表",
+ columnProp: "issueType",
+ headerAlign: "center",
+ align: "right",
+ columnLabel: "类型",
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },{
+ userId: this.$store.state.user.name,
+ functionId: 701002,
+ serialNumber: '701002Table3Remark',
+ tableId: "701002Table3",
+ tableName: "申请单材料明细表",
+ columnProp: "remark",
+ headerAlign: "center",
+ align: "left",
+ columnLabel: "备注",
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 160
+ },{
+ userId: this.$store.state.user.name,
+ functionId: 701002,
+ serialNumber: '701002Table3SOOrderNo',
+ tableId: "701002Table3",
+ tableName: "申请单材料明细表",
+ columnProp: "soorderNo",
+ headerAlign: "center",
+ align: "left",
+ columnLabel: "生产订单",
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 120
+ },{
+ userId: this.$store.state.user.name,
+ functionId: 701002,
+ serialNumber: '701002Table3BOMItemNo',
+ tableId: "701002Table3",
+ tableName: "申请单材料明细表",
+ columnProp: "bomitemNo",
+ headerAlign: "center",
+ align: "right",
+ columnLabel: "BOM序号",
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },
+ ],
rules: {
groupIdType: [
{
@@ -1077,25 +1345,78 @@ export default {
},
showAddNotifyTypeDialog: false,
selectedNotifyType: 'production',
- selectedNotifyRemark:'',
+ selectedNotifyRemark: '',
+ showXiadaNotifyDialog: false,
+ xiadaNotifyData: {
+ planIssueDate: '',
+ remark: '',
+ },
chooseLoading: false,
+ seqNoModalLoading: false,
+ saveNewLoading: false,
}
},
mounted() {
- this.$nextTick(() => {
- this.height = window.innerHeight - 300
- })
+ this.$nextTick(() => {
+ this.height = window.innerHeight - 220
+ })
},
created() {
// 按钮控制
// this.getButtonAuthData()
-
+ //this.getTableUserColumn(this.$route.meta.menuId+'Table2',2)
this.getUserNotifyNo()
},
methods: {
+ tabClick(tab, event) {
+ // 刷新当前标签页的表格数据
+ this.refreshCurrentTabTable()
+ },
+ refreshCurrentTabTable() {
+ if (this.notifyNo === '' || !this.notifyNo) {
+ return
+ }
+ if (this.activeName === 'sub') {
+ // 使用当前选中的行数据,如果没有则使用申请单基本信息
+ let queryData = {
+ site: this.notifyData.site || this.$store.state.user.site,
+ notifyNo: this.notifyNo,
+ orderType: 'shoporder'
+ }
+ // 如果当前行有数据,合并进去
+ if (this.currentRow && this.currentRow !== '' && this.currentRow.notifyNo) {
+ queryData = {
+ ...this.currentRow,
+ orderType: 'shoporder'
+ }
+ }
+ this.dataListLoading = true
+ searchNotifyMaterialListNew(queryData).then(({ data }) => {
+ this.dataListLoading = false
+ if (data && data.code === 0) {
+ this.materialDetailList = data.rows
+ } else {
+ this.materialDetailList = []
+ }
+ }).catch(() => {
+ this.dataListLoading = false
+ this.materialDetailList = []
+ })
+ }
+ },
+ materialDetailTableRowClassName({ row, rowIndex }) {
+ if (row.qtyToIssueOriginal < row.qtyToIssue && new Date(row.needDate) < new Date(this.dayjs().format("YYYY-MM-DD HH:mm"))) {
+ return 'error-row'
+ }
+ return ''
+ },
+ changeData(row) {
+ this.currentRow = JSON.parse(JSON.stringify(row))
+ this.refreshCurrentTabTable()
+ },
getBaseList(val, type) {
this.tagNo = val
let conSql = ''
@@ -1269,9 +1590,11 @@ export default {
//这边是有个判断的,判断派工单号不能重复
let stop = false
for (let i = 0; i < this.dataList.length; i++) {
- if (this.dataList[i].orderNo == row.orderNo&&
- this.dataList[i].releaseNo == row.releaseNo&&
- this.dataList[i].sequenceNo == row.sequenceNo) {
+ if (
+ this.dataList[i].orderNo == row.orderNo &&
+ this.dataList[i].releaseNo == row.releaseNo &&
+ this.dataList[i].sequenceNo == row.sequenceNo
+ ) {
stop = true
}
}
@@ -1289,28 +1612,29 @@ export default {
sequenceNo: row.sequenceNo,
}
this.chooseLoading = true
- getShopOrderFromIFSWithOrderNo(inData).then(({ data }) => {
- if (data.code === 0) {
- console.log("data",data);
- this.notifyOrderData.partNo = data.rows[0].partNo
- this.notifyOrderData.orderNo = data.rows[0].orderNo
- this.notifyOrderData.site = this.$store.state.user.site
- this.notifyOrderData.partDesc = data.rows[0].partDesc
- this.notifyOrderData.qtyRequired = data.rows[0].lotSize
- this.notifyOrderData.releaseNo = data.rows[0].releaseNo
- this.notifyOrderData.issureQty = ''
- this.notifyOrderData.needDate = this.dayjs().format('YYYY-MM-DD HH:mm')
- this.notifyOrderData.sequenceNo = data.rows[0].sequenceNo
- this.saveSeqNoModalFlag = true
- }else {
- this.$meassage.error(data.msg)
- return;
- }
- }).finally(() => {
- this.chooseLoading = false
- })
-
-
+ getShopOrderFromIFSWithOrderNo(inData)
+ .then(({ data }) => {
+ if (data.code === 0) {
+ console.log('data', data)
+ this.notifyOrderData.partNo = data.rows[0].partNo
+ this.notifyOrderData.orderNo = data.rows[0].orderNo
+ this.notifyOrderData.site = this.$store.state.user.site
+ this.notifyOrderData.partDesc = data.rows[0].partDesc
+ this.notifyOrderData.qtyRequired = data.rows[0].lotSize
+ this.notifyOrderData.releaseNo = data.rows[0].releaseNo
+ this.notifyOrderData.issureQty = ''
+ this.notifyOrderData.needDate =
+ this.dayjs().format('YYYY-MM-DD HH:mm')
+ this.notifyOrderData.sequenceNo = data.rows[0].sequenceNo
+ this.saveSeqNoModalFlag = true
+ } else {
+ this.$meassage.error(data.msg)
+ return
+ }
+ })
+ .finally(() => {
+ this.chooseLoading = false
+ })
},
saveSOS() {
if (
@@ -1330,13 +1654,15 @@ export default {
// return false
// }
let row = this.notifyOrderData
- console.log("row",row,this.dataList);
+ console.log('row', row, this.dataList)
if (this.dataList.length > 0) {
let stop = false
for (let i = 0; i < this.dataList.length; i++) {
- if (this.dataList[i].soorderNo == row.orderNo&&
- this.dataList[i].releaseNo == row.releaseNo&&
- this.dataList[i].sequenceNo == row.sequenceNo) {
+ if (
+ this.dataList[i].soorderNo == row.orderNo &&
+ this.dataList[i].releaseNo == row.releaseNo &&
+ this.dataList[i].sequenceNo == row.sequenceNo
+ ) {
stop = true
}
}
@@ -1401,7 +1727,7 @@ export default {
},
enterSOS(row) {
- console.log("row",row);
+ console.log('row', row)
this.seqNoModalFlag = false
this.materialModalFlag = true
@@ -1430,7 +1756,6 @@ export default {
/* if(!this.sobomList[i].qtyToIssue){
this.$set(this.sobomList[i], 'qtyToIssue', this.sobomList[i].qtyRequired)
} */
-
}
}
})
@@ -1450,7 +1775,7 @@ export default {
startDate: this.dayjs().format('YYYY-MM-DD'),
endDate: this.dayjs().format('YYYY-MM-DD'),
}
-
+ this.seqNoList = []
this.seqNoModalFlag = true
},
searchSOSRouting() {
@@ -1462,18 +1787,88 @@ export default {
this.$message.warning('请输入ReleaseNo!')
return false
}
- if (this.seqNoData.sequenceNo == null || this.seqNoData.sequenceNo == '') {
+ if (
+ this.seqNoData.sequenceNo == null ||
+ this.seqNoData.sequenceNo == ''
+ ) {
this.$message.warning('请输入SequenceNo!')
return false
}
- getShopOrderFromIFSWithOrderNo(this.seqNoData).then(({ data }) => {
- if (data.code === 0) {
- this.seqNoList = data.rows
- }
+ // 初始化seqNoList如果不存在
+ if (!this.seqNoList) {
+ this.seqNoList = []
+ }
+ // 调用接口前判断this.seqNoList是否存在orderNo
+ const orderNoExists = this.seqNoList.some(row => row.orderNo === this.seqNoData.orderNo)
+ if (orderNoExists) {
+ this.$message.warning('该OrderNo的数据已存在,请先删除再添加!')
+ return false
+ }
+
+ const dataListExists = this.dataList.some(row => row.soorderNo === this.seqNoData.orderNo)
+ if (dataListExists) {
+ this.$message.warning('该OrderNo的数据已添加过,请先删除再添加!')
+ return false
+ }
+ this.seqNoModalLoading = true
+ getShopOrderAndMaterialByShoporder(this.seqNoData)
+ .then(({ data }) => {
+ if (data.code === 0) {
+ if (!data.rows || data.rows.length === 0) {
+ this.$message.warning('未查询到数据!')
+ return
+ }
+ // 将返回的数据添加到this.seqNoList中,而不是替换
+ data.rows.forEach(newRow => {
+ // 初始化每行的需求数量(需求数量 - 已发数量 - 预留数量)
+ const qtyRequired = parseFloat(newRow.qtyRequired) || 0
+ const qtyIssued = parseFloat(newRow.qtyIssued) || 0
+ const qtyReserved = parseFloat(newRow.qtyReserved) || 0
+ const applyQty = qtyRequired - qtyIssued - qtyReserved
+ this.$set(newRow, 'applyQty', applyQty > 0 ? applyQty : 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
+ })
+ },
+ deleteSeqNoByOrderNo() {
+ if (this.seqNoData.orderNo == null || this.seqNoData.orderNo == '') {
+ this.$message.warning('请输入OrderNo!')
+ return false
+ }
+ if (this.seqNoList.length === 0) {
+ this.$message.warning('没有可删除的数据!')
+ return false
+ }
+ // 统计要删除的行数
+ const deleteCount = this.seqNoList.filter(row => row.orderNo === this.seqNoData.orderNo).length
+ if (deleteCount === 0) {
+ this.$message.warning('未找到匹配的OrderNo数据!')
+ return false
+ }
+ this.$confirm(`确定要删除OrderNo为 ${this.seqNoData.orderNo} 的 ${deleteCount} 条数据吗?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning',
+ }).then(() => {
+ // 删除所有匹配的orderNo行
+ this.seqNoList = this.seqNoList.filter(row => row.orderNo !== this.seqNoData.orderNo)
+ this.$message.success(`成功删除 ${deleteCount} 条数据`)
+ }).catch(() => {
+ // 用户取消删除
})
},
saveMaterialDetail() {
-
for (let i = 0; i < this.sobomList.length; i++) {
if (
this.sobomList[i].applyQty === '' ||
@@ -1492,7 +1887,7 @@ export default {
})
return false
}
- console.log("this.sobomList",materialList);
+ console.log('this.sobomList', materialList)
saveMaterialDetail(materialList).then(({ data }) => {
if (data.code === 0) {
this.materialModalFlag = false
@@ -1505,6 +1900,45 @@ export default {
}
})
},
+ saveNewSoIssueNotify() {
+ for (let i = 0; i < this.seqNoList.length; i++) {
+ if (
+ this.seqNoList[i].applyQty === '' ||
+ this.seqNoList[i].applyQty == null
+ ) {
+ this.seqNoList[i].applyQty = 0
+ }
+ this.seqNoList[i].notifyNo = this.notifyNo
+ this.seqNoList[i].site = this.$store.state.user.site
+ }
+
+ let materialList = this.seqNoList.filter((item) => item.applyQty > 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
+ saveNewSoIssueNotify(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
+ })
+ },
//导出excel
async createExportData() {
@@ -1556,22 +1990,57 @@ export default {
this.xiadaModelFlag = true
},
xiadaNotify() {
- this.$confirm(`确定进行下达操作?`, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- xiadaNotify(this.notifyData).then(({data}) => {
- if (data.code === 0) {
- this.xiadaModelFlag = false
- this.getUserNotifyNo()
- this.$message.success('操作成功')
- } else {
- this.$alert(data.msg, '错误', {
- confirmButtonText: '确定',
- })
- }
+ // 检查是否有明细记录
+ if (
+ this.dataList.length == 0 &&
+ this.dataList2.length == 0 &&
+ this.dataList3.length == 0
+ ) {
+ this.$alert('没有明细记录无法下达!!', '提示', {
+ confirmButtonText: '确定',
})
+ return false
+ }
+ // 初始化弹框数据
+ this.xiadaNotifyData = {
+ planIssueDate: this.notifyData.planIssueDate || this.dayjs().format('YYYY-MM-DD HH:mm'),
+ 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,
+ }
+ // 执行下达操作
+ xiadaNotify(notifyData).then(({ data }) => {
+ if (data.code === 0) {
+ this.showXiadaNotifyDialog = false
+ this.xiadaModelFlag = false
+ this.getUserNotifyNo()
+ this.$message.success('操作成功')
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定',
+ })
+ }
})
},
saveOtherPart() {
@@ -1646,15 +2115,15 @@ export default {
})
},
importModel() {
- if(this.dataList.length>0){
+ if (this.dataList.length > 0) {
this.$alert('有已申请工单明细无法导入!!', '提示', {
confirmButtonText: '确定',
})
return
}
- let data={
+ let data = {
site: this.notifyData.site,
- notifyNo: this.notifyData.notifyNo
+ notifyNo: this.notifyData.notifyNo,
}
this.$nextTick(() => {
this.$refs.walUploadExcel.init(data)
@@ -1700,7 +2169,6 @@ export default {
this.authDelete = !deleteFlag
},
-
searchTable() {},
getAllNotifyStatus() {
let inData = {
@@ -1713,15 +2181,76 @@ export default {
console.log('notifyStatusList', this.notifyStatusList)
})
},
+ async getTableUserColumn(tableId, columnId) {
+ let queryTableUser = {
+ userId: this.$store.state.user.name,
+ functionId: this.$route.meta.menuId,
+ tableId: tableId,
+ status: true,
+ languageCode: this.$i18n.locale
+ }
+ await getTableUserListLanguage(queryTableUser).then(({data}) => {
+ if (data.rows.length > 0) {
+ //this.columnList1 = []
+ switch (columnId) {
+ case 1:
+ this.columnList1 = data.rows
+ break;
+ case 2:
+ this.columnList2 = data.rows
+ break;
+ case 3:
+ this.columnList3 = data.rows
+ break;
+ case 4:
+ this.columnList4 = data.rows
+ break;
+ }
+ }
+ })
+ },
+
+ // 获取 tableDefault 列
+ async getColumnList (tableId, columnId) {
+ let queryTable= {
+ functionId: this.$route.meta.menuId,
+ tableId: tableId,
+ languageCode: this.$i18n.locale
+ }
+ await getTableDefaultListLanguage(queryTable).then(({data}) => {
+ if (data.rows&&data.rows.length > 0) {
+ switch (columnId) {
+ case 1:
+ this.columnList1 = data.rows
+ break;
+ case 2:
+ this.columnList2 = data.rows
+ break;
+ case 3:
+ this.columnList3 = data.rows
+ break;
+ case 4:
+ this.columnList4 = data.rows
+ break;
+ }
+ } else {
+ // this.showDefault = true.
+ }
+ })
+
+ },
},
}
-