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,
});
}
export function AssignAndDessign(data: any) {
return request({
url: '/api/AssignAndDessign/AssignAndDessignM',
method: 'post',
data: data,
});
}
export function AssignShipRequestByCharge(data: any) {
return request({
url: '/api/SaleOut/AssignShipRequestByCharge',

View File

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

View File

@ -419,13 +419,15 @@ async function handleReserve() {
state.button_loading = true
state.BoxList = []
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.MESSAGENAME = 'ModifyERPLocation'
state.ChangeParams.body.AREANAME = state.StorageSelect[0]
state.ChangeParams.body.LOCATIONNAME = state.StorageSelect[1]
for (let item = 0; item < state.column3.length; item++) {
state.BoxList.push({ BoxL: state.column3[item].MATERIALPACKINGNAME })
for (let item = 0; item < state.MaterialPackingUsername.length; item++) {
state.BoxList.push({ BoxL: state.MaterialPackingUsername[item].MATERIALPACKINGNAME })
}
state.ChangeParams.body.BOXList = state.BoxList
// await BpelEvent(state.ChangeParams)