Commit 7132b2f8 authored by 沈翠玲's avatar 沈翠玲

换标接口对接

parent b780621d
...@@ -49,10 +49,14 @@ const install = (Vue, vm) => { ...@@ -49,10 +49,14 @@ const install = (Vue, vm) => {
sapSchDn: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/search/sch_dn?sap-language=ZH&sap-client=' + client, params), sapSchDn: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/search/sch_dn?sap-language=ZH&sap-client=' + client, params),
// 销售拣货单 // 销售拣货单
sapPickingDn: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/picking_dn?sap-language=ZH&sap-client=' + client, params), sapPickingDn: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/picking_dn?sap-language=ZH&sap-client=' + client, params),
// 换标
sapMigoCS: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/pda_migo_cs?sap-client=' + client, params),
// 销售拣货过账 // 销售拣货过账
sapDelv: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/post_delv?sap-language=ZH&sap-client=' + client, params), sapDelv: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/post_delv?sap-language=ZH&sap-client=' + client, params),
// 销售拣货查询bl pl // 销售拣货查询bl pl
sapBlpl: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/search/sch_BLPL?sap-language=ZH&sap-client=' + client, params), sapBlpl: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/search/sch_BLPL?sap-language=ZH&sap-client=' + client, params),
// 换标查询
sapSchblpl: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/search/sch_blpl?sap-client=' + client, params),
// 查询仓位 // 查询仓位
sapLgpla: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/search/sch_LGPLA?sap-language=ZH&sap-client=' + client, params), sapLgpla: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/search/sch_LGPLA?sap-language=ZH&sap-client=' + client, params),
// 装箱 // 装箱
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
}, },
{ {
src: require('@/static/images/xsjh.png'), src: require('@/static/images/xsjh.png'),
text: '换', text: '换',
url: '/pages/salesOutbound/exchangeGoods' url: '/pages/salesOutbound/exchangeGoods'
}, },
] ]
......
<template> <template>
<view> <view>
<StickyNavBar> <StickyNavBar>
<NavBar title="换"></NavBar> <NavBar title="换"></NavBar>
<view class="btn"> <view class="btn">
<uni-easyinput <uni-easyinput
prefixIcon="search" prefixIcon="search"
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
摄像头对准 摄像头对准
</view> </view>
<view class="cardBoxTip3"> <view class="cardBoxTip3">
单号二维码 单号二维码
</view> </view>
<view class="cardBoxTip2"> <view class="cardBoxTip2">
<text class="tipLeft"> <text class="tipLeft">
......
<template> <template>
<view class="lists page"> <view class="lists page">
<StickyNavBar class="listTitle"> <StickyNavBar class="listTitle">
<NavBar title="换"></NavBar> <NavBar title="换"></NavBar>
<view class="headerTitle"> <view class="headerTitle">
<view class="items">交货单号:{{ vbeln }}</view> <view class="items">交货单号:{{ vbeln }}</view>
<view class="items">{{ saleInfo.KUNNR }} | {{ saleInfo.NAME1 }}</view> <view class="items">{{ saleInfo.KUNNR }} | {{ saleInfo.NAME1 }}</view>
...@@ -106,7 +106,11 @@ export default { ...@@ -106,7 +106,11 @@ export default {
}, },
computed: { computed: {
totalNum() { totalNum() {
const count = this.goodsList.filter((item) => item.checkedBox).length; const count = this.goodsList.filter((ele) => {
return (
ele.sumNum == ele?.ZPLDT?.reduce((acc, cur) => acc + cur.PACMG, 0)
);
}).length;
return count || 0; return count || 0;
}, },
/** /**
...@@ -138,6 +142,8 @@ export default { ...@@ -138,6 +142,8 @@ export default {
return this.$u.toast("当前单据已经提交成功!无需继续提交!"); return this.$u.toast("当前单据已经提交成功!无需继续提交!");
} }
const flag = this.goodsList.every((ele) => { const flag = this.goodsList.every((ele) => {
console.log('ele.sumNum', ele.sumNum, ele?.ZPLDT?.reduce((acc, cur) => acc + cur.PACMG, 0))
return ( return (
ele.sumNum == ele?.ZPLDT?.reduce((acc, cur) => acc + cur.PACMG, 0) ele.sumNum == ele?.ZPLDT?.reduce((acc, cur) => acc + cur.PACMG, 0)
); );
...@@ -165,7 +171,7 @@ export default { ...@@ -165,7 +171,7 @@ export default {
// return // return
this.$u.api.sapApi.sapPickingDn(params).then((res) => { this.$u.api.sapApi.sapMigoCS(params).then((res) => {
this.loading = false; this.loading = false;
if (!Array.isArray(res)) { if (!Array.isArray(res)) {
return; return;
...@@ -263,6 +269,7 @@ export default { ...@@ -263,6 +269,7 @@ export default {
const item = this.goodsList.find( const item = this.goodsList.find(
(v) => v.ZSIZE == ele.ZSIZE && ele.MATNR == v.MATNR (v) => v.ZSIZE == ele.ZSIZE && ele.MATNR == v.MATNR
); );
console.log('itemitem', item)
ele.POSNR = item.POSNR ele.POSNR = item.POSNR
if (item) { if (item) {
if (Reflect.has(item, "ZPLDT")) { if (Reflect.has(item, "ZPLDT")) {
...@@ -277,10 +284,10 @@ export default { ...@@ -277,10 +284,10 @@ export default {
const isBL = plnr.startsWith("B"); const isBL = plnr.startsWith("B");
let params = { let params = {
ZCODE: isBL ? plnr : "", ZCODE: isBL ? plnr : "",
plnr: isBL ? "" : plnr, PLNR: isBL ? "" : plnr,
ztype: "005", ztype: "005",
}; };
this.$u.api.sapApi.sapBlpl(params).then((res) => { this.$u.api.sapApi.sapSchblpl(params).then((res) => {
if (res && res.MSG[0].TYPE === "S") { if (res && res.MSG[0].TYPE === "S") {
this.setSalesBoundPL(res.BLPL); this.setSalesBoundPL(res.BLPL);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment