Compare commits

..

2 Commits

Author SHA1 Message Date
李兴辉
6776d1bfd1 Merge remote-tracking branch 'origin/main' 2025-03-21 18:33:18 +08:00
李兴辉
2117d55f9d 采购退货 2025-03-21 18:32:44 +08:00
3 changed files with 45 additions and 41 deletions

View File

@ -72,6 +72,13 @@ export function DeAssignShipRequest(data: any) {
data: data, data: data,
}); });
} }
export function AssignAndDessign(data: any) {
return request({
url: '/api/AssignAndDessign/AssignAndDessignM',
method: 'post',
data: data,
});
}
export function AssignShipRequestByCharge(data: any) { export function AssignShipRequestByCharge(data: any) {
return request({ return request({
url: '/api/SaleOut/AssignShipRequestByCharge', url: '/api/SaleOut/AssignShipRequestByCharge',

View File

@ -128,6 +128,8 @@ import { useRouter } from "vue-router";
import { create } from "sortablejs"; import { create } from "sortablejs";
import { FirstInFirstOut, IFTRUE } from '@/utils/CommonUtil' import { FirstInFirstOut, IFTRUE } from '@/utils/CommonUtil'
import { bTableHeight } from "../../../composables/calcTableHeight"; import { bTableHeight } from "../../../composables/calcTableHeight";
import { AssignAndDessign } from '@/api/StockOut'
import { localStorage } from '@/utils/storage'
const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(440); const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(440);
const queryFormRef = ref(ElForm); const queryFormRef = ref(ElForm);
@ -153,7 +155,7 @@ const state: any = reactive({
queryId: "", queryId: "",
version: "", version: "",
params: { params: {
SITENAME: 'SDK',//localStorage.getItem("siteName"), SITENAME: 'SDK',//localStorage.get("siteName"),
DELIVERYTYPE: "", // DELIVERYTYPE: "", //
SUPPLIERNAME: "", SUPPLIERNAME: "",
RECEIVEREQUESTNAME: "", RECEIVEREQUESTNAME: "",
@ -211,7 +213,7 @@ const state: any = reactive({
header: { header: {
MESSAGENAME: '', MESSAGENAME: '',
LANGUAGE: 'Chinese', LANGUAGE: 'Chinese',
EventUser: localStorage.getItem('userId') || '10975133' EventUser: localStorage.get('userId')
}, },
body: { body: {
RECEIVEREQUESTNAME: '', RECEIVEREQUESTNAME: '',
@ -388,25 +390,21 @@ async function LeftIn() {
if (state.MaterialPackingList.length > 0 && state.column4.length > 0) { if (state.MaterialPackingList.length > 0 && state.column4.length > 0) {
state.loading = true; state.loading = true;
state.ChangeParams.header.MESSAGENAME = 'AssignReceiveRequestToBox2ForSDK'; let boxList = [];
state.ChangeParams.body.RECEIVEREQUESTDETAILNAME = state.queryParams.params.SHIPREQUESTDETAILNAME
// state.ChangeParams.body.RECEIVEREQUESTDETAILNAME = "0001"
state.ChangeParams.body.RECEIVEREQUESTNAME = state.queryParams.params.SHIPREQUESTNAME
state.ChangeParams.body.MATERIALQUANTITY = 0
// state.column4 MATERIALPACKINGNAME packingNames
state.ChangeParams.body.objPara = []
for (const item of state.column4) { for (const item of state.column4) {
state.ChangeParams.body.objPara.push(item.MATERIALPACKINGNAME); boxList.push({
state.ChangeParams.body.MATERIALQUANTITY += item.MATERIALQUANTITY; materialPackingName: item.MATERIALPACKINGNAME,
siteName: "SDK"
});
} }
// packingNames let param = {
if (state.ChangeParams.body.objPara.length > 0) { userId: localStorage.get('userId'),
state.ChangeParams.body.MATERIALPACKINGNAME = state.ChangeParams.body.objPara.join(";"); opType: "Assign",
} else { receiveRequestName: state.queryParams.params.SHIPREQUESTNAME,
// packingNames receiveRequestDetailName: state.queryParams.params.SHIPREQUESTDETAILNAME,
state.ChangeParams.body.MATERIALPACKINGNAME = ""; boxList : boxList
} };
await BpelEvent(state.ChangeParams).then((res: any) => { AssignAndDessign(param).then((res: any) => {
if (IFTRUE(res)) { if (IFTRUE(res)) {
handle(tempRow, tempevent, tempcolumn); handle(tempRow, tempevent, tempcolumn);
handleQuery(); handleQuery();
@ -439,25 +437,22 @@ async function LeftIn() {
async function RightIn() { async function RightIn() {
if (state.column3.length > 0) { if (state.column3.length > 0) {
state.loading2 = true; state.loading2 = true;
state.ChangeParams.header.MESSAGENAME = 'DeassignShipRequestFromBox2'; let boxList = [];
state.ChangeParams.body.RECEIVEREQUESTDETAILNAME = state.RightqueryParams.params.RECEIVEREQUESTDETAILNAME
state.ChangeParams.body.RECEIVEREQUESTNAME = state.RightqueryParams.params.RECEIVEREQUESTNAME
state.ChangeParams.body.MATERIALQUANTITY = 0
// state.column4 MATERIALPACKINGNAME packingNames
state.ChangeParams.body.objPara = []
for (const item of state.column3) { for (const item of state.column3) {
state.ChangeParams.body.objPara.push(item.MATERIALPACKINGNAME); boxList.push({
state.ChangeParams.body.MATERIALQUANTITY += item.MATERIALQUANTITY; materialPackingName: item.MATERIALPACKINGNAME,
siteName: "SDK"
});
} }
// packingNames let param = {
if (state.ChangeParams.body.objPara.length > 0) { userId: localStorage.get('userId'),
state.ChangeParams.body.MATERIALPACKINGNAME = state.ChangeParams.body.objPara.join(";"); opType: "Dessign",
} else { receiveRequestName: state.queryParams.params.SHIPREQUESTNAME,
// packingNames receiveRequestDetailName: state.queryParams.params.SHIPREQUESTDETAILNAME,
state.ChangeParams.body.MATERIALPACKINGNAME = ""; boxList : boxList
} };
await BpelEvent(state.ChangeParams).then((res: any) => { AssignAndDessign(param).then((res: any) => {
if (IFTRUE(res)) { if (IFTRUE(res)) {
handle(tempRow, tempevent, tempcolumn); handle(tempRow, tempevent, tempcolumn);
handleQuery(); handleQuery();
@ -496,7 +491,7 @@ async function handleStockOut() {
state.button_state = true; state.button_state = true;
state.button_loadings = true; state.button_loadings = true;
state.ReserveParams.header.MESSAGENAME = 'CompleteShipRequestForPurReturn' state.ReserveParams.header.MESSAGENAME = 'CompleteShipRequestForPurReturn'
state.ReserveParams.body.SITENAME = localStorage.getItem("siteName") == null ? "SDK" : localStorage.getItem("siteName"); state.ReserveParams.body.SITENAME = localStorage.get("siteName") == null ? "SDK" : localStorage.get("siteName");
state.ReserveParams.body.RECEIVEREQUESTNAME = state.queryParams.params.RECEIVEREQUESTNAME state.ReserveParams.body.RECEIVEREQUESTNAME = state.queryParams.params.RECEIVEREQUESTNAME
state.ReserveParams.body.RECEIVEREQUESTNAME = state.queryParams.params.RECEIVEREQUESTNAME state.ReserveParams.body.RECEIVEREQUESTNAME = state.queryParams.params.RECEIVEREQUESTNAME
state.ReserveParams.body.RECEIVEREQUESTDETAILNAME = state.queryParams.params.SHIPREQUESTDETAILNAME state.ReserveParams.body.RECEIVEREQUESTDETAILNAME = state.queryParams.params.SHIPREQUESTDETAILNAME

View File

@ -419,13 +419,15 @@ async function handleReserve() {
state.button_loading = true state.button_loading = true
state.BoxList = [] state.BoxList = []
state.Button_state = true state.Button_state = true
if (state.column3.length > 0 || state.column4.length > 0) { console.log(state.column3)
console.log(state.column4)
if (state.MaterialPackingUsername.length > 0 ) {
state.ChangeParams.header.EVENTUSER = localStorage.getItem('userId') || '10975133' state.ChangeParams.header.EVENTUSER = localStorage.getItem('userId') || '10975133'
state.ChangeParams.header.MESSAGENAME = 'ModifyERPLocation' state.ChangeParams.header.MESSAGENAME = 'ModifyERPLocation'
state.ChangeParams.body.AREANAME = state.StorageSelect[0] state.ChangeParams.body.AREANAME = state.StorageSelect[0]
state.ChangeParams.body.LOCATIONNAME = state.StorageSelect[1] state.ChangeParams.body.LOCATIONNAME = state.StorageSelect[1]
for (let item = 0; item < state.column3.length; item++) { for (let item = 0; item < state.MaterialPackingUsername.length; item++) {
state.BoxList.push({ BoxL: state.column3[item].MATERIALPACKINGNAME }) state.BoxList.push({ BoxL: state.MaterialPackingUsername[item].MATERIALPACKINGNAME })
} }
state.ChangeParams.body.BOXList = state.BoxList state.ChangeParams.body.BOXList = state.BoxList
// await BpelEvent(state.ChangeParams) // await BpelEvent(state.ChangeParams)