Commit f1be7edb authored by 何远江's avatar 何远江

bug修改

parent 33494f5c
...@@ -66,6 +66,8 @@ const install = (Vue, vm) => { ...@@ -66,6 +66,8 @@ const install = (Vue, vm) => {
sapSearchAllot: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/pda_allot/search_allot?sap-language=ZH&sap-client='+ client, params), sapSearchAllot: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/pda_allot/search_allot?sap-language=ZH&sap-client='+ client, params),
// 工厂调拨下架 // 工厂调拨下架
sapAllot: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/PDA_ALLOT_PD/ALLOT_PD?sap-language=ZH&sap-client='+ client, params), sapAllot: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/PDA_ALLOT_PD/ALLOT_PD?sap-language=ZH&sap-client='+ client, params),
// 跨工厂工作中心调拨查询
sapSearchArbpl: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/SEARCH_ARBPL/SEARCH_ARBPL?sap-language=ZH&sap-client='+ client, params),
}, },
mesApi:{ mesApi:{
...@@ -82,7 +84,12 @@ const install = (Vue, vm) => { ...@@ -82,7 +84,12 @@ const install = (Vue, vm) => {
// 完工入库 // 完工入库
pdaFindPackageLinkInfo: (params = {}) => vm.$u.post(config.adminPath + '/apiPda/search/findPackageLinkInfo', params), pdaFindPackageLinkInfo: (params = {}) => vm.$u.post(config.adminPath + '/apiPda/search/findPackageLinkInfo', params),
// 调拨料回传mes // 调拨料回传mes
pdaAllocation: (params = {}) => vm.$u.post(config.adminPath + '/apiPda/allocation/pdaAllocation', params) pdaAllocation: (params = {}) => vm.$u.post(config.adminPath + '/apiPda/allocation/pdaAllocation', params),
// 工作中心领料查询
pdaWortstation: (params = {}) => vm.$u.get(config.adminPath + '/apiPda/workstationMaterial/pdaWortstation', params),
// 工作中心领料回传mes
pdaworkstationUpadteNum: (params = {}) => vm.$u.post(config.adminPath + '/apiPda/workstationMaterial/pdaworkstationUpadteNum', params),
} }
}; };
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
filterable filterable
v-model="warehouseCode" v-model="warehouseCode"
dataKey="label" dataKey="label"
placeholder="请选择仓库别" placeholder="请选择库存地点"
dataValue="value" dataValue="value"
:localdata="warehouseData" :localdata="warehouseData"
@change="onWarehouseChange" @change="onWarehouseChange"
......
...@@ -103,6 +103,27 @@ ...@@ -103,6 +103,27 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path": "pages/workCenter/workCenterList",
"style": {
"navigationBarTitleText": "工作中心发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/costCenter/costCenter",
"style": {
"navigationBarTitleText": "成本中心发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/costCenter/costCenterList",
"style": {
"navigationBarTitleText": "成本中心发料",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/salesReturns/salesReturns", "path": "pages/salesReturns/salesReturns",
"style": { "style": {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</view> </view>
</view> </view>
<view class="btn"> <view class="btn">
<uni-easyinput prefixIcon="search" :disabled="isDisabled" v-model="wxparams" :focus="isFocus" <uni-easyinput prefixIcon="search" :disabled="isDisabled" v-model.trim="wxparams" :focus="isFocus"
placeholder="请扫描产品包装条码/外箱码" @input="handleInputPlnr"></uni-easyinput> placeholder="请扫描产品包装条码/外箱码" @input="handleInputPlnr"></uni-easyinput>
</view> </view>
<view class="total"> <view class="total">
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
handleInputPlnr(e) { handleInputPlnr(e) {
if (!e) return if (!e) return
if (this.catchPl.length > 0) { if (this.catchPl.length > 0) {
if (!this.catchPl.inculdes(e)) { if (!this.catchPl.includes(e)) {
this.getPlnr(e); this.getPlnr(e);
} else { } else {
this.reset() this.reset()
...@@ -158,25 +158,25 @@ ...@@ -158,25 +158,25 @@
// 查询相同工厂,相同物料编码的条目,且还未分配满数量的 // 查询相同工厂,相同物料编码的条目,且还未分配满数量的
let goods = this.goodsList.find(v => item.MATNR == v.MATNR && item.WERKS == v.RESWK && v let goods = this.goodsList.find(v => item.MATNR == v.MATNR && item.WERKS == v.RESWK && v
.total != v.MENGE) .total != v.MENGE)
// 如果有满足条件的物料 // 如果有满足条件的物料
while (goods != undefined) { while (goods != undefined) {
// 需求量 // 需求量
const reqNum = goods.MENGE - (goods.total || 0) const reqNum = goods.MENGE - (goods.total || 0)
// 如果需求量大于等于剩余量,直接分配 // 如果需求量大于等于剩余量,直接分配
if (reqNum >= remainder) { if (reqNum >= remainder) {
goods.details.push({...item, PACMG: remainder}) goods.details.push({...item, PACMG: remainder})
// 累加已经分配的数量 // 累加已经分配的数量
goods.total += remainder goods.total += remainder
// 终止循环条件 // 终止循环条件
goods = undefined goods = undefined
} else { } else {
// 如果需求量小于剩余量,需要使用拆分 // 如果需求量小于剩余量,需要使用拆分
goods.details.push({...item, PACMG: reqNum}) goods.details.push({...item, PACMG: reqNum})
goods.total += reqNum goods.total += reqNum
remainder -= reqNum remainder -= reqNum
// 还有剩余数量,需要继续遍历添加 // 还有剩余数量,需要继续遍历添加
goods = this.goodsList.find(v => item.MATNR == v.MATNR && item.WERKS == v.RESWK && v goods = this.goodsList.find(v => item.MATNR == v.MATNR && item.WERKS == v.RESWK && v
.total != v.MENGE) .total != v.MENGE)
} }
} }
...@@ -204,6 +204,7 @@ ...@@ -204,6 +204,7 @@
if (res.BLPL.length == 0) { if (res.BLPL.length == 0) {
return this.$u.toast("未查询到该条码信息") return this.$u.toast("未查询到该条码信息")
} }
this.catchPl.push(plnr)
this.setPL(res.BLPL) this.setPL(res.BLPL)
this.reset() this.reset()
}); });
...@@ -347,4 +348,4 @@ ...@@ -347,4 +348,4 @@
.checkedCase { .checkedCase {
margin-top: 10rpx; margin-top: 10rpx;
} }
</style> </style>
...@@ -130,6 +130,11 @@ ...@@ -130,6 +130,11 @@
text: '工作中心发料', text: '工作中心发料',
url: '/pages/workCenter/workCenter' url: '/pages/workCenter/workCenter'
}, },
{
src: require('@/static/images/clycxj.png'),
text: '成本中心发料',
url: '/pages/costCenter/costCenter'
},
] ]
}] }]
}; };
......
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
data.forEach(ele => { data.forEach(ele => {
ele.ERFMG = ele.TOMNG ele.ERFMG = ele.TOMNG
// 添加仓库别 // 添加仓库别
ele.NLBER = this.warehouseCode ele.UMLGO = this.warehouseCode
}); });
this.$u.api.sapApi this.$u.api.sapApi
.sapRrm([ .sapRrm([
......
...@@ -160,7 +160,7 @@ export default { ...@@ -160,7 +160,7 @@ export default {
return; return;
} }
let arr = this.list.filter(ele=>ele.quantityIssued) let arr = this.list.filter(ele=>ele.quantityIssued)
// "windCase": null,是否结案 Y是 N否 // "windCase": null,是否结案 Y是 N否
arr.forEach((ele,index) => { arr.forEach((ele,index) => {
ele.windCase = this.checkedBox ? 'Y': 'N' ele.windCase = this.checkedBox ? 'Y': 'N'
ele.AUFNR = ele.workorderCode ele.AUFNR = ele.workorderCode
...@@ -170,7 +170,7 @@ export default { ...@@ -170,7 +170,7 @@ export default {
ele.RSNUM = ele.requirementNumber || '10' ele.RSNUM = ele.requirementNumber || '10'
ele.RSPOS = ele.requirementProjectNumber || '2' ele.RSPOS = ele.requirementProjectNumber || '2'
// 添加仓库别 // 添加仓库别
ele.NLBER = this.warehouseCode ele.UMLGO = this.warehouseCode
}) })
const params = { const params = {
'zencode': 'A009', 'zencode': 'A009',
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<NavBar title="采购入库扫描"></NavBar> <NavBar title="采购入库扫描"></NavBar>
<FactorySelect v-model="warehouseCode" @change="warehouseChange" /> <FactorySelect v-model="warehouseCode" @change="warehouseChange" />
<view class="btn"> <view class="btn">
<uni-easyinput v-if="vuex_user_factory !== '1010'" prefixIcon="search" class="topSearch" v-model="nlpla" focus placeholder="请扫描位" @change="handleInputNlpla"></uni-easyinput> <uni-easyinput v-if="vuex_user_factory !== '1010'" prefixIcon="search" class="topSearch" v-model="nlpla" focus placeholder="请扫描位" @change="handleInputNlpla"></uni-easyinput>
<uni-easyinput <uni-easyinput
prefixIcon="search" prefixIcon="search"
:disabled="isDisabled" :disabled="isDisabled"
...@@ -105,6 +105,7 @@ export default { ...@@ -105,6 +105,7 @@ export default {
uni.navigateBack(); uni.navigateBack();
}, },
goSubmit() { goSubmit() {
// 根据不同工厂,不同选择
if (this.goodsList.length === 0) { if (this.goodsList.length === 0) {
return; return;
} }
...@@ -113,7 +114,7 @@ export default { ...@@ -113,7 +114,7 @@ export default {
ele.ERFMG = ele.TOMNG ele.ERFMG = ele.TOMNG
ele.ERFME = ele.MEINS ele.ERFME = ele.MEINS
// 添加仓库别 // 添加仓库别
ele.NLBER = this.warehouseCode ele.UMLGO = this.warehouseCode
}); });
this.$u.api.sapApi this.$u.api.sapApi
.sapRrm([ .sapRrm([
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<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>
<view class="items">计划日期:{{ saleInfo.WADAT }}</view> <view class="items">计划日期:{{ saleInfo.WADAT }}</view>
<view class="items">装箱数:{{ catchPL && catchPL.length || 0 }} / {{ Number(saleInfo.XSNUM) }}</view> <view class="items">装箱数:{{ plslen }} / {{ Number(saleInfo.XSNUM) }}</view>
</view> </view>
<view class=""> <view class="">
<view class="btn"> <view class="btn">
...@@ -100,6 +100,11 @@ ...@@ -100,6 +100,11 @@
catchPL() { catchPL() {
return this.vuex_sales_outbound[this.vbeln] || null return this.vuex_sales_outbound[this.vbeln] || null
}, },
plslen() {
return this.goodsList.reduce((acc,cur) => {
return acc + (cur.ZPLDT?.length || 0)
},0)
},
saleInfo() { saleInfo() {
return this.goodsList[0] || {} return this.goodsList[0] || {}
} }
...@@ -245,7 +250,7 @@ ...@@ -245,7 +250,7 @@
getPlnr(plnr) { getPlnr(plnr) {
let params = { let params = {
ZCODE: plnr.includes("BL") ? plnr : "", ZCODE: plnr.includes("BL") ? plnr : "",
plnr: plnr.includes("BL") ? "" : plnr, plnr: plnr.includes("BL") ? "" : plnr,
ztype: '005' ztype: '005'
}; };
this.$u.api.sapApi.sapBlpl(params).then((res) => { this.$u.api.sapApi.sapBlpl(params).then((res) => {
......
...@@ -138,7 +138,7 @@ export default { ...@@ -138,7 +138,7 @@ export default {
ITEM: this.goodsList.map(item => { ITEM: this.goodsList.map(item => {
return { return {
...item, ...item,
NLBER: this.warehouseCode // 添加仓库别 UMLGO: this.warehouseCode // 添加仓库别
} }
}) })
} }
......
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